summaryrefslogtreecommitdiff
path: root/src/gd_io.h
diff options
context:
space:
mode:
authorpierre <none@none>2006-04-05 15:35:53 +0000
committerpierre <none@none>2006-04-05 15:35:53 +0000
commit084ba37adc6c46cf5536ad11b7dbbeb01364cde1 (patch)
tree84753c7aca35269a4a96051dc57f3a8568c80abb /src/gd_io.h
parentec7d9f2a8062276d8c427e6a9b4ed943d8bf8b23 (diff)
downloadlibgd-084ba37adc6c46cf5536ad11b7dbbeb01364cde1.tar.gz
- sync to 1.6.0GD_1_6_0
Diffstat (limited to 'src/gd_io.h')
-rw-r--r--src/gd_io.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/gd_io.h b/src/gd_io.h
new file mode 100644
index 0000000..5c0bd24
--- /dev/null
+++ b/src/gd_io.h
@@ -0,0 +1,39 @@
+#ifndef GD_IO_H
+#define GD_IO_H 1
+
+#include <stdio.h>
+
+typedef struct gdIOCtx {
+ int (*getC)(struct gdIOCtx*);
+ int (*getBuf)(struct gdIOCtx*, void*, int);
+
+ void (*putC)(struct gdIOCtx*, int);
+ int (*putBuf)(struct gdIOCtx*, const void*, int);
+
+ int (*seek)(struct gdIOCtx*, const int);
+ long (*tell)(struct gdIOCtx*);
+
+ void (*free)(struct gdIOCtx*);
+
+} gdIOCtx;
+
+typedef struct gdIOCtx *gdIOCtxPtr;
+
+void Putword(int w, gdIOCtx *ctx);
+void Putchar(int c, gdIOCtx *ctx);
+
+void gdPutC(const unsigned char c, gdIOCtx *ctx);
+int gdPutBuf(const void *, int, gdIOCtx*);
+void gdPutWord(int w, gdIOCtx *ctx);
+void gdPutInt(int w, gdIOCtx *ctx);
+
+int gdGetC(gdIOCtx *ctx);
+int gdGetBuf(void *, int, gdIOCtx*);
+int gdGetByte(int *result, gdIOCtx *ctx);
+int gdGetWord(int *result, gdIOCtx *ctx);
+int gdGetInt(int *result, gdIOCtx *ctx);
+
+int gdSeek(gdIOCtx *ctx, const int);
+long gdTell(gdIOCtx *ctx);
+
+#endif