source: CIVL/include/headers/gd_io.h@ 1aaefd4

main test-branch
Last change on this file since 1aaefd4 was ea777aa, checked in by Alex Wilton <awilton@…>, 3 years ago

Moved examples, include, build_default.properties, common.xml, and README out from dev.civl.com into the root of the repo.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5704 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 1.2 KB
RevLine 
[aad342c]1#ifdef __cplusplus
2extern "C" {
3#endif
4
5#ifndef GD_IO_H
6#define GD_IO_H 1
7
8#include <stdio.h>
9
10#ifdef VMS
11# define Putchar gdPutchar
12#endif
13
14 typedef struct gdIOCtx {
15 int (*getC)(struct gdIOCtx *);
16 int (*getBuf)(struct gdIOCtx *, void *, int);
17 void (*putC)(struct gdIOCtx *, int);
18 int (*putBuf)(struct gdIOCtx *, const void *, int);
19 /* seek must return 1 on SUCCESS, 0 on FAILURE. Unlike fseek! */
20 int (*seek)(struct gdIOCtx *, const int);
21 long (*tell)(struct gdIOCtx *);
22 void (*gd_free)(struct gdIOCtx *);
23 void *data;
24 }
25 gdIOCtx;
26
27 typedef struct gdIOCtx *gdIOCtxPtr;
28
29 void Putword(int w, gdIOCtx *ctx);
30 void Putchar(int c, gdIOCtx *ctx);
31
32 void gdPutC(const unsigned char c, gdIOCtx *ctx);
33 int gdPutBuf(const void *, int, gdIOCtx *);
34 void gdPutWord(int w, gdIOCtx *ctx);
35 void gdPutInt(int w, gdIOCtx *ctx);
36
37 int gdGetC(gdIOCtx *ctx);
38 int gdGetBuf(void *, int, gdIOCtx *);
39 int gdGetByte(int *result, gdIOCtx *ctx);
40 int gdGetWord(int *result, gdIOCtx *ctx);
41 int gdGetWordLSB(signed short int *result, gdIOCtx *ctx);
42 int gdGetInt(int *result, gdIOCtx *ctx);
43 int gdGetIntLSB(signed int *result, gdIOCtx *ctx);
44
45 int gdSeek(gdIOCtx *ctx, const int offset);
46 long gdTell(gdIOCtx *ctx);
47
48#endif
49
50#ifdef __cplusplus
51}
52#endif
Note: See TracBrowser for help on using the repository browser.