Lines Matching refs:ctx
33 gdIOCtx ctx; member
42 static int fileGetchar (gdIOCtx * ctx);
46 static void gdFreeFileCtx (gdIOCtx * ctx);
51 fileIOCtx *ctx; in gdNewFileCtx() local
53 ctx = (fileIOCtx *) gdMalloc(sizeof (fileIOCtx)); in gdNewFileCtx()
55 ctx->f = f; in gdNewFileCtx()
57 ctx->ctx.getC = fileGetchar; in gdNewFileCtx()
58 ctx->ctx.putC = filePutchar; in gdNewFileCtx()
60 ctx->ctx.getBuf = fileGetbuf; in gdNewFileCtx()
61 ctx->ctx.putBuf = filePutbuf; in gdNewFileCtx()
63 ctx->ctx.tell = fileTell; in gdNewFileCtx()
64 ctx->ctx.seek = fileSeek; in gdNewFileCtx()
66 ctx->ctx.gd_free = gdFreeFileCtx; in gdNewFileCtx()
68 return (gdIOCtx *) ctx; in gdNewFileCtx()
71 static void gdFreeFileCtx (gdIOCtx * ctx) in gdFreeFileCtx() argument
73 gdFree(ctx); in gdFreeFileCtx()
77 static int filePutbuf (gdIOCtx * ctx, const void *buf, int size) in filePutbuf() argument
80 fctx = (fileIOCtx *) ctx; in filePutbuf()
86 static int fileGetbuf (gdIOCtx * ctx, void *buf, int size) in fileGetbuf() argument
89 fctx = (fileIOCtx *) ctx; in fileGetbuf()
94 static void filePutchar (gdIOCtx * ctx, int a) in filePutchar() argument
98 fctx = (fileIOCtx *) ctx; in filePutchar()
105 static int fileGetchar (gdIOCtx * ctx) in fileGetchar() argument
108 fctx = (fileIOCtx *) ctx; in fileGetchar()
114 static int fileSeek (struct gdIOCtx *ctx, const int pos) in fileSeek() argument
117 fctx = (fileIOCtx *) ctx; in fileSeek()
122 static long fileTell (struct gdIOCtx *ctx) in fileTell() argument
125 fctx = (fileIOCtx *) ctx; in fileTell()