summaryrefslogtreecommitdiff
path: root/ext/gd/libgd/gd_io.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2013-03-14 05:42:27 +0000
committer <>2013-04-03 16:25:08 +0000
commitc4dd7a1a684490673e25aaf4fabec5df138854c4 (patch)
tree4d57c44caae4480efff02b90b9be86f44bf25409 /ext/gd/libgd/gd_io.h
downloadphp2-master.tar.gz
Imported from /home/lorry/working-area/delta_php2/php-5.4.13.tar.bz2.HEADphp-5.4.13master
Diffstat (limited to 'ext/gd/libgd/gd_io.h')
-rw-r--r--ext/gd/libgd/gd_io.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/ext/gd/libgd/gd_io.h b/ext/gd/libgd/gd_io.h
new file mode 100644
index 0000000..a4d66bb
--- /dev/null
+++ b/ext/gd/libgd/gd_io.h
@@ -0,0 +1,44 @@
+#ifndef GD_IO_H
+#define GD_IO_H 1
+
+#include <stdio.h>
+
+#ifdef VMS
+#define Putchar gdPutchar
+#endif
+
+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 (*gd_free)(struct gdIOCtx*);
+
+ void *data;
+} 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