Lines Matching refs:ctx
34 gdIOCtx ctx; member
44 static int sourceGetchar (gdIOCtx * ctx);
45 static int sinkPutbuf (gdIOCtx * ctx, const void *buf, int size);
46 static void sinkPutchar (gdIOCtx * ctx, int a);
47 static void gdFreeSsCtx (gdIOCtx * ctx);
52 ssIOCtxPtr ctx; in gdNewSSCtx() local
54 ctx = (ssIOCtxPtr) gdMalloc (sizeof (ssIOCtx)); in gdNewSSCtx()
56 ctx->src = src; in gdNewSSCtx()
57 ctx->snk = snk; in gdNewSSCtx()
59 ctx->ctx.getC = sourceGetchar; in gdNewSSCtx()
60 ctx->ctx.getBuf = sourceGetbuf; in gdNewSSCtx()
62 ctx->ctx.putC = sinkPutchar; in gdNewSSCtx()
63 ctx->ctx.putBuf = sinkPutbuf; in gdNewSSCtx()
65 ctx->ctx.tell = NULL; in gdNewSSCtx()
66 ctx->ctx.seek = NULL; in gdNewSSCtx()
68 ctx->ctx.gd_free = gdFreeSsCtx; in gdNewSSCtx()
70 return (gdIOCtx *) ctx; in gdNewSSCtx()
73 static void gdFreeSsCtx (gdIOCtx * ctx) in gdFreeSsCtx() argument
75 gdFree(ctx); in gdFreeSsCtx()
79 static int sourceGetbuf (gdIOCtx * ctx, void *buf, int size) in sourceGetbuf() argument
84 lctx = (ssIOCtx *) ctx; in sourceGetbuf()
102 static int sourceGetchar (gdIOCtx * ctx) in sourceGetchar() argument
107 res = sourceGetbuf (ctx, &buf, 1); in sourceGetchar()
116 static int sinkPutbuf (gdIOCtx * ctx, const void *buf, int size) in sinkPutbuf() argument
121 lctx = (ssIOCtx *) ctx; in sinkPutbuf()
132 static void sinkPutchar (gdIOCtx * ctx, int a) in sinkPutchar() argument
137 sinkPutbuf (ctx, &b, 1); in sinkPutchar()