Lines Matching refs:ctx
23 #define CTX_PUTC(c,ctx) ctx->putC(ctx, c) argument
25 static void _php_image_output_putc(struct gdIOCtx *ctx, int c) in _php_image_output_putc() argument
36 static int _php_image_output_putbuf(struct gdIOCtx *ctx, const void* buf, int l) in _php_image_output_putbuf() argument
42 static void _php_image_output_ctxfree(struct gdIOCtx *ctx) in _php_image_output_ctxfree() argument
44 if(ctx) { in _php_image_output_ctxfree()
45 efree(ctx); in _php_image_output_ctxfree()
49 static void _php_image_stream_putc(struct gdIOCtx *ctx, int c) { in _php_image_stream_putc() argument
51 php_stream * stream = (php_stream *)ctx->data; in _php_image_stream_putc()
56 static int _php_image_stream_putbuf(struct gdIOCtx *ctx, const void* buf, int l) in _php_image_stream_putbuf() argument
58 php_stream * stream = (php_stream *)ctx->data; in _php_image_stream_putbuf()
63 static void _php_image_stream_ctxfree(struct gdIOCtx *ctx) in _php_image_stream_ctxfree() argument
67 if(ctx->data) { in _php_image_stream_ctxfree()
68 php_stream_close((php_stream *) ctx->data); in _php_image_stream_ctxfree()
69 ctx->data = NULL; in _php_image_stream_ctxfree()
71 if(ctx) { in _php_image_stream_ctxfree()
72 efree(ctx); in _php_image_stream_ctxfree()
87 gdIOCtx *ctx = NULL; in _php_image_output_ctx() local
141 ctx = emalloc(sizeof(gdIOCtx)); in _php_image_output_ctx()
142 ctx->putC = _php_image_output_putc; in _php_image_output_ctx()
143 ctx->putBuf = _php_image_output_putbuf; in _php_image_output_ctx()
144 ctx->gd_free = _php_image_output_ctxfree; in _php_image_output_ctx()
153 if (!ctx) { in _php_image_output_ctx()
154 ctx = emalloc(sizeof(gdIOCtx)); in _php_image_output_ctx()
155 ctx->putC = _php_image_stream_putc; in _php_image_output_ctx()
156 ctx->putBuf = _php_image_stream_putbuf; in _php_image_output_ctx()
157 ctx->gd_free = _php_image_stream_ctxfree; in _php_image_output_ctx()
158 ctx->data = (void *)stream; in _php_image_output_ctx()
167 (*func_p)(im, ctx, q); in _php_image_output_ctx()
173 (*func_p)(im, ctx, q); in _php_image_output_ctx()
176 (*func_p)(im, ctx, q, f); in _php_image_output_ctx()
187 (*func_p)(im, file, q, ctx); in _php_image_output_ctx()
189 (*func_p)(im, q, ctx); in _php_image_output_ctx()
193 (*func_p)(im, ctx); in _php_image_output_ctx()
198 ctx->gd_free(ctx); in _php_image_output_ctx()
200 ctx->free(ctx); in _php_image_output_ctx()