Home
last modified time | relevance | path

Searched refs:ctx (Results 1 – 25 of 93) sorted by relevance

1234

/PHP-7.0/ext/gd/libgd/
H A Dgd_io.c45 (ctx->putC) (ctx, c & 0xff); in Putchar()
50 (ctx->putC) (ctx, c); in gdPutC()
73 return ((ctx->getC) (ctx)); in gdGetC()
79 r = (ctx->getC) (ctx); in gdGetByte()
88 r = (ctx->getC) (ctx); in gdGetWord()
91 r = (ctx->getC) (ctx); in gdGetWord()
101 r = (ctx->getC) (ctx); in gdGetInt()
105 r = (ctx->getC) (ctx); in gdGetInt()
109 r = (ctx->getC) (ctx); in gdGetInt()
115 r = (ctx->getC) (ctx); in gdGetInt()
[all …]
H A Dgd_gif_out.c194 if( ctx->curx == ctx->Width ) { in BumpPixel()
268 memset(&ctx, 0, sizeof(ctx)); in GIFEncode()
283 ctx.CountDown = (long)ctx.Width * (long)ctx.Height; in GIFEncode()
301 ctx.curx = ctx.cury = 0; in GIFEncode()
516 ctx->maxcode = MAXCODE(ctx->n_bits = ctx->g_init_bits);
519 ctx->EOFCode = ctx->ClearCode + 1;
520 ctx->free_ent = ctx->ClearCode + 2;
631 ctx->cur_bits += ctx->n_bits;
643 if ( ctx->free_ent > ctx->maxcode || ctx->clear_flg ) {
647 ctx->maxcode = MAXCODE (ctx->n_bits = ctx->g_init_bits);
[all …]
H A Dgd_io_file.c33 gdIOCtx ctx; member
51 fileIOCtx *ctx; in gdNewFileCtx() local
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()
[all …]
H A Dgd_io_ss.c34 gdIOCtx ctx; member
52 ssIOCtxPtr ctx; in gdNewSSCtx() local
56 ctx->src = src; 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()
[all …]
H A Dgd_io_dp.c41 gdIOCtx ctx; member
72 dpIOCtx *ctx; in gdNewDynamicCtxEx() local
79 ctx->dp = dp; in gdNewDynamicCtxEx()
81 ctx->ctx.getC = dynamicGetchar; in gdNewDynamicCtxEx()
82 ctx->ctx.putC = dynamicPutchar; in gdNewDynamicCtxEx()
84 ctx->ctx.getBuf = dynamicGetbuf; in gdNewDynamicCtxEx()
85 ctx->ctx.putBuf = dynamicPutbuf; in gdNewDynamicCtxEx()
87 ctx->ctx.seek = dynamicSeek; in gdNewDynamicCtxEx()
88 ctx->ctx.tell = dynamicTell; in gdNewDynamicCtxEx()
90 ctx->ctx.gd_free = gdFreeDynamicCtx; in gdNewDynamicCtxEx()
[all …]
H A Dgd_io.h27 void Putword(int w, gdIOCtx *ctx);
28 void Putchar(int c, gdIOCtx *ctx);
30 void gdPutC(const unsigned char c, gdIOCtx *ctx);
32 void gdPutWord(int w, gdIOCtx *ctx);
33 void gdPutInt(int w, gdIOCtx *ctx);
35 int gdGetC(gdIOCtx *ctx);
37 int gdGetByte(int *result, gdIOCtx *ctx);
38 int gdGetWord(int *result, gdIOCtx *ctx);
39 int gdGetInt(int *result, gdIOCtx *ctx);
41 int gdSeek(gdIOCtx *ctx, const int);
[all …]
/PHP-7.0/ext/zip/lib/
H A Dzip_source_deflate.c70 if ((ctx=(struct deflate *)malloc(sizeof(*ctx))) == NULL) { in zip_source_deflate()
117 ret = deflate(&ctx->zstr, ctx->eof ? Z_FINISH : 0); in compress_read()
121 if (ctx->can_store && ctx->zstr.total_in <= ctx->zstr.total_out) { in compress_read()
123 ctx->size = ctx->zstr.total_in; in compress_read()
124 memcpy(data, ctx->buffer, ctx->size); in compress_read()
143 else if (ctx->eof && ctx->zstr.avail_in == 0) in compress_read()
162 ctx->size = ctx->zstr.total_in; in compress_read()
169 ctx->zstr.next_in = (Bytef *)ctx->buffer; in compress_read()
254 ctx->zstr.next_in = (Bytef *)ctx->buffer; in decompress_read()
364 ctx->zstr.next_in = (Bytef *)ctx->buffer; in deflate_decompress()
[all …]
H A Dzip_source_filep.c132 free(ctx); in _zip_source_file_or_p()
140 memcpy(&ctx->st, st, sizeof(ctx->st)); in _zip_source_file_or_p()
167 free(ctx); in _zip_source_file_or_p()
248 if (rename(ctx->tmpname, ctx->fname) < 0) { in read_file()
288 if (_zip_fseek_u(ctx->f, ctx->start, SEEK_SET, &ctx->error) < 0) { in read_file()
292 ctx->current = ctx->start; in read_file()
297 n = ctx->end-ctx->current; in read_file()
383 if (_zip_fseek_u(ctx->f, ctx->current, SEEK_SET, &ctx->error) < 0) { in read_file()
409 memcpy(data, &ctx->st, sizeof(ctx->st)); in read_file()
415 if (ctx->f) in read_file()
[all …]
H A Dzip_source_win32handle.c101 ctx->closep = ctx->fname ? 1 : closep; in _zip_source_win32_handle_or_name()
103 memcpy(&ctx->st, st, sizeof(ctx->st)); in _zip_source_win32_handle_or_name()
167 if (ctx->ops->op_rename_temp(ctx) < 0) { in _win32_read_file()
196 if ((ctx->h = ctx->ops->op_open(ctx)) == INVALID_HANDLE_VALUE) { in _win32_read_file()
202 if (ctx->closep && ctx->start > 0) { in _win32_read_file()
203 if (_zip_seek_win32_u(ctx->h, ctx->start, SEEK_SET, &ctx->error) < 0) { in _win32_read_file()
207 ctx->current = ctx->start; in _win32_read_file()
212 n = ctx->end - ctx->current; in _win32_read_file()
250 ctx->ops->op_remove(ctx->tmpname); in _win32_read_file()
346 h = ctx->ops->op_open(ctx); in _win32_read_file()
[all …]
H A Dzip_source_crc.c64 if ((ctx=(struct crc_context *)malloc(sizeof(*ctx))) == NULL) { in zip_source_crc()
71 ctx->crc_complete = 0; in zip_source_crc()
72 ctx->crc_position = 0; in zip_source_crc()
74 ctx->size = 0; in zip_source_crc()
100 if (ctx->crc_position == ctx->position) { in crc_read()
102 ctx->size = ctx->position; in crc_read()
123 else if (!ctx->crc_complete && ctx->position <= ctx->crc_position) { in crc_read()
126 for (i = ctx->crc_position - ctx->position; i < (zip_uint64_t)n; i += nn) { in crc_read()
148 st->size = ctx->size; in crc_read()
149 st->crc = ctx->crc; in crc_read()
[all …]
H A Dzip_source_window.c63 struct window *ctx; in _zip_source_window_new() local
70 if ((ctx=(struct window *)malloc(sizeof(*ctx))) == NULL) { in _zip_source_window_new()
84 free(ctx); in _zip_source_window_new()
149 ctx->offset = ctx->start; in window_read()
153 if (len > ctx->end - ctx->offset) in window_read()
154 len = ctx->end - ctx->offset; in window_read()
174 if (ctx->offset < ctx->end) { in window_read()
183 …new_offset = zip_source_seek_compute_offset(ctx->offset - ctx->start, ctx->end - ctx->start, data,… in window_read()
189 ctx->offset = (zip_uint64_t)new_offset + ctx->start; in window_read()
199 if (_zip_stat_merge(st, &ctx->stat, &ctx->error) < 0) { in window_read()
[all …]
H A Dzip_source_pkware.c63 struct trad_pkware *ctx; in zip_source_pkware() local
75 if ((ctx=(struct trad_pkware *)malloc(sizeof(*ctx))) == NULL) { in zip_source_pkware()
82 ctx->key[0] = KEY0; in zip_source_pkware()
83 ctx->key[1] = KEY1; in zip_source_pkware()
84 ctx->key[2] = KEY2; in zip_source_pkware()
88 pkware_free(ctx); in zip_source_pkware()
119 ctx->key[0] = (zip_uint32_t)crc32(ctx->key[0] ^ 0xffffffffUL, &b, 1) ^ 0xffffffffUL; in decrypt()
120 ctx->key[1] = (ctx->key[1] + (ctx->key[0] & 0xff)) * 134775813 + 1; in decrypt()
122 ctx->key[2] = (zip_uint32_t)crc32(ctx->key[2] ^ 0xffffffffUL, &b, 1) ^ 0xffffffffUL; in decrypt()
167 struct trad_pkware *ctx; in pkware_decrypt() local
[all …]
H A Dzip_source_buffer.c95 if ((ctx=(struct read_data *)malloc(sizeof(*ctx))) == NULL) { in zip_source_buffer_create()
102 free(ctx); in zip_source_buffer_create()
106 ctx->out = NULL; in zip_source_buffer_create()
112 free(ctx); in zip_source_buffer_create()
138 ctx->in = ctx->out; in read_data()
139 ctx->out = NULL; in read_data()
171 ctx->in = empty; in read_data()
177 ctx->out = NULL; in read_data()
181 return buffer_seek(ctx->in, data, len, &ctx->error); in read_data()
184 return buffer_seek(ctx->out, data, len, &ctx->error); in read_data()
[all …]
H A Dzip_source_win32a.c41 static HANDLE _win32_open_a(_zip_source_win32_read_file_t *ctx);
42 static HANDLE _win32_create_temp_a(_zip_source_win32_read_file_t *ctx, void **temp, zip_uint32_t va…
43 static int _win32_rename_temp_a(_zip_source_win32_read_file_t *ctx);
84 _win32_open_a(_zip_source_win32_read_file_t *ctx) in _win32_open_a() argument
86 …return CreateFileA(ctx->fname, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTI… in _win32_open_a()
91 _win32_create_temp_a(_zip_source_win32_read_file_t *ctx, void **temp, zip_uint32_t value, PSECURITY… in _win32_create_temp_a() argument
95 len = strlen((const char *)ctx->fname) + 10; in _win32_create_temp_a()
98 zip_error_set(&ctx->error, ZIP_ER_MEMORY, 0); in _win32_create_temp_a()
102 if (sprintf((char *)*temp, "%s.%08x", (const char *)ctx->fname, value) != len - 1) { in _win32_create_temp_a()
111 _win32_rename_temp_a(_zip_source_win32_read_file_t *ctx) in _win32_rename_temp_a() argument
[all …]
/PHP-7.0/ext/gd/
H A Dgd_ctx.c23 #define CTX_PUTC(c,ctx) ctx->putC(ctx, c) argument
42 if(ctx) { in _php_image_output_ctxfree()
43 efree(ctx); in _php_image_output_ctxfree()
61 if(ctx->data) { in _php_image_stream_ctxfree()
64 if(ctx) { in _php_image_stream_ctxfree()
65 efree(ctx); in _php_image_stream_ctxfree()
72 if(ctx->data) { in _php_image_stream_ctxfreeandclose()
76 if(ctx) { in _php_image_stream_ctxfreeandclose()
77 efree(ctx); in _php_image_stream_ctxfreeandclose()
167 if (!ctx) { in _php_image_output_ctx()
[all …]
/PHP-7.0/ext/sockets/
H A Dconversions.c186 do_from_to_zval_err(&ctx->err, &ctx->keys, "user", fmt, ap); in do_from_zval_err()
195 do_from_to_zval_err(&ctx->err, &ctx->keys, "native", fmt, ap); in do_to_zval_err()
722 if (ctx->sock->type != AF_INET && ctx->sock->type != AF_INET6) { in from_zval_write_sockaddr_aux()
1275 do_from_zval_err(ctx, in from_zval_write_ifindex()
1449 ser_context ctx; in from_zval_run_conversions() local
1458 memset(&ctx, 0, sizeof(ctx)); in from_zval_run_conversions()
1462 ctx.sock = sock; in from_zval_run_conversions()
1475 *err = ctx.err; in from_zval_run_conversions()
1492 res_context ctx; in to_zval_run_conversions() local
1499 memset(&ctx, 0, sizeof(ctx)); in to_zval_run_conversions()
[all …]
H A Dconversions.h35 typedef void (from_zval_write_field)(const zval *arr_value, char *field, ser_context *ctx);
36 typedef void (to_zval_read_field)(const char *data, zval *zv, res_context *ctx);
46 void from_zval_write_int(const zval *arr_value, char *field, ser_context *ctx);
47 void to_zval_read_int(const char *data, zval *zv, res_context *ctx);
51 void to_zval_read_in6_pktinfo(const char *data, zval *zv, res_context *ctx);
55 void from_zval_write_ucred(const zval *container, char *ucred_c, ser_context *ctx);
56 void to_zval_read_ucred(const char *data, zval *zv, res_context *ctx);
60 size_t calculate_scm_rights_space(const zval *arr, ser_context *ctx);
61 void from_zval_write_fd_array(const zval *arr, char *int_arr, ser_context *ctx);
62 void to_zval_read_fd_array(const char *data, zval *zv, res_context *ctx);
[all …]
/PHP-7.0/sapi/apache2handler/
H A Dsapi_apache2.c79 r = ctx->r; in ZEND_TSRMLS_CACHE_DEFINE()
173 ap_set_content_type(ctx->r, apr_pstrdup(ctx->r->pool, ctx->content_type)); in php_apache_sapi_send_headers()
188 r = ctx->r; in php_apache_sapi_read_post()
221 ctx->finfo.st_uid = ctx->r->finfo.user; in php_apache_sapi_get_stat()
222 ctx->finfo.st_gid = ctx->r->finfo.group; in php_apache_sapi_get_stat()
224 ctx->finfo.st_dev = ctx->r->finfo.device; in php_apache_sapi_get_stat()
225 ctx->finfo.st_ino = ctx->r->finfo.inode; in php_apache_sapi_get_stat()
236 ctx->finfo.st_size = ctx->r->finfo.size; in php_apache_sapi_get_stat()
237 ctx->finfo.st_nlink = ctx->r->finfo.nlink; in php_apache_sapi_get_stat()
305 r = ctx->r; in php_apache_sapi_flush()
[all …]
/PHP-7.0/ext/standard/
H A Dcrypt_sha256.c191 ctx->H[0] = a; in sha256_process_block()
192 ctx->H[1] = b; in sha256_process_block()
193 ctx->H[2] = c; in sha256_process_block()
194 ctx->H[3] = d; in sha256_process_block()
214 ctx->total[0] = ctx->total[1] = 0; in sha256_init_ctx()
245 sha256_process_block(ctx->buffer, bytes + pad + 8, ctx); in sha256_finish_ctx()
267 sha256_process_block(ctx->buffer, ctx->buflen & ~63, ctx); in sha256_process_bytes()
270 memcpy(ctx->buffer, &ctx->buffer[(left_over + add) & ~63], ctx->buflen); in sha256_process_bytes()
305 sha256_process_block(ctx->buffer, 64, ctx); in sha256_process_bytes()
307 memcpy(ctx->buffer, &ctx->buffer[64], left_over); in sha256_process_bytes()
[all …]
H A Dcrypt_sha512.c218 ctx->H[0] = a; in sha512_process_block()
219 ctx->H[1] = b; in sha512_process_block()
220 ctx->H[2] = c; in sha512_process_block()
221 ctx->H[3] = d; in sha512_process_block()
222 ctx->H[4] = e; in sha512_process_block()
223 ctx->H[5] = f; in sha512_process_block()
241 ctx->total[0] = ctx->total[1] = 0; in sha512_init_ctx()
294 sha512_process_block(ctx->buffer, ctx->buflen & ~127, ctx); in sha512_process_bytes()
338 sha512_process_block(ctx->buffer, 128, ctx); in sha512_process_bytes()
340 memcpy(ctx->buffer, &ctx->buffer[128], left_over); in sha512_process_bytes()
[all …]
H A Dmd5.c332 body(ctx, ctx->buffer, 64); in PHP_MD5Update()
355 body(ctx, ctx->buffer, 64); in PHP_MD5Final()
363 ctx->buffer[56] = ctx->lo; in PHP_MD5Final()
364 ctx->buffer[57] = ctx->lo >> 8; in PHP_MD5Final()
365 ctx->buffer[58] = ctx->lo >> 16; in PHP_MD5Final()
366 ctx->buffer[59] = ctx->lo >> 24; in PHP_MD5Final()
367 ctx->buffer[60] = ctx->hi; in PHP_MD5Final()
368 ctx->buffer[61] = ctx->hi >> 8; in PHP_MD5Final()
369 ctx->buffer[62] = ctx->hi >> 16; in PHP_MD5Final()
370 ctx->buffer[63] = ctx->hi >> 24; in PHP_MD5Final()
[all …]
H A Durl_scanner_ex.c64 if (ctx->tags) in PHP_INI_MH()
257 if (strncasecmp(ZSTR_VAL(ctx->arg.s), ctx->lookup_data, ZSTR_LEN(ctx->arg.s)) == 0) in tag_arg()
263 append_modified_url(&ctx->val, &ctx->result, &ctx->url_app, PG(arg_separator).output); in tag_arg()
265 smart_str_append_smart_str(&ctx->result, &ctx->val); in tag_arg()
317 if (doit && ctx->val.s && ctx->lookup_data && *ctx->lookup_data) { in handle_form()
322 e = ZSTR_VAL(ctx->val.s) + ZSTR_LEN(ctx->val.s); in handle_form()
362 …if ((ctx->lookup_data = zend_hash_str_find_ptr(ctx->tags, ZSTR_VAL(ctx->tag.s), ZSTR_LEN(ctx->tag.… in handle_tag()
391 YYLIMIT = ZSTR_VAL(ctx->buf.s) + ZSTR_LEN(ctx->buf.s); in xx_mainloop()
944 smart_str_append(&ctx->result, ctx->buf.s); in url_adapt_ext()
992 if (ctx->buf.s && ZSTR_LEN(ctx->buf.s)) { in php_url_scanner_output_handler()
[all …]
H A Durl_scanner_ex.re62 if (ctx->tags)
192 if (strncasecmp(ZSTR_VAL(ctx->arg.s), ctx->lookup_data, ZSTR_LEN(ctx->arg.s)) == 0)
198 append_modified_url(&ctx->val, &ctx->result, &ctx->url_app, PG(arg_separator).output);
200 smart_str_append_smart_str(&ctx->result, &ctx->val);
252 if (doit && ctx->val.s && ctx->lookup_data && *ctx->lookup_data) {
257 e = ZSTR_VAL(ctx->val.s) + ZSTR_LEN(ctx->val.s);
297 …if ((ctx->lookup_data = zend_hash_str_find_ptr(ctx->tags, ZSTR_VAL(ctx->tag.s), ZSTR_LEN(ctx->tag.…
326 YYLIMIT = ZSTR_VAL(ctx->buf.s) + ZSTR_LEN(ctx->buf.s);
461 smart_str_append(&ctx->result, ctx->buf.s);
509 if (ctx->buf.s && ZSTR_LEN(ctx->buf.s)) {
[all …]
/PHP-7.0/Zend/tests/
H A Dbug36214.phpt19 $ctx = new context;
20 $ctx->comment_preview = array();
21 $ctx->comment_preview[0] = 1;
22 $ctx->comment_preview[1] = 2;
23 var_dump($ctx->comment_preview);
28 $ctx->comment_preview = $comment_preview;
29 var_dump($ctx->comment_preview);
31 $ctx->comment_preview = new ArrayObject();
32 $ctx->comment_preview[0] = 1;
33 $ctx->comment_preview[1] = 2;
[all …]
/PHP-7.0/ext/zlib/
H A Dzlib.c73 efree(ctx); in deflate_rsrc_dtor()
83 efree(ctx); in inflate_rsrc_dtor()
153 …if (!(ctx->buffer.aptr = erealloc_recoverable(ctx->buffer.data, ctx->buffer.used + ctx->buffer.fre… in php_zlib_output_handler_ex()
157 ctx->buffer.data = ctx->buffer.aptr; in php_zlib_output_handler_ex()
169 ctx->Z.avail_in = ctx->buffer.used; in php_zlib_output_handler_ex()
170 ctx->Z.next_in = (Bytef *) ctx->buffer.data; in php_zlib_output_handler_ex()
188 … memmove(ctx->buffer.data, ctx->buffer.data + ctx->buffer.used - ctx->Z.avail_in, ctx->Z.avail_in); in php_zlib_output_handler_ex()
190 ctx->buffer.free += ctx->buffer.used - ctx->Z.avail_in; in php_zlib_output_handler_ex()
191 ctx->buffer.used = ctx->Z.avail_in; in php_zlib_output_handler_ex()
525 if (ctx.out.data && ctx.out.free) { in PHP_FUNCTION()
[all …]

Completed in 70 milliseconds

1234