/PHP-7.3/ext/gd/libgd/ |
H A D | gdxpm.c | 23 char buf[5]; in gdImageCreateFromXpm() local 49 buf[1] = '\0'; in gdImageCreateFromXpm() 51 red = strtol(buf, NULL, 16); in gdImageCreateFromXpm() 57 blue = strtol(buf, NULL, 16); in gdImageCreateFromXpm() 61 buf[2] = '\0'; in gdImageCreateFromXpm() 64 red = strtol(buf, NULL, 16); in gdImageCreateFromXpm() 72 blue = strtol(buf, NULL, 16); in gdImageCreateFromXpm() 76 buf[3] = '\0'; in gdImageCreateFromXpm() 80 red = strtol(buf, NULL, 16); in gdImageCreateFromXpm() 97 buf[4] = '\0'; in gdImageCreateFromXpm() [all …]
|
H A D | gd_gif_in.c | 137 unsigned char buf[16]; in gdImageCreateFromGifCtx() local 180 screen_width = imw = LM_to_uint(buf[0],buf[1]); in gdImageCreateFromGifCtx() 181 screen_height = imh = LM_to_uint(buf[2],buf[3]); in gdImageCreateFromGifCtx() 222 left = LM_to_uint(buf[0], buf[1]); in gdImageCreateFromGifCtx() 223 top = LM_to_uint(buf[2], buf[3]); in gdImageCreateFromGifCtx() 224 width = LM_to_uint(buf[4], buf[5]); in gdImageCreateFromGifCtx() 225 height = LM_to_uint(buf[6], buf[7]); in gdImageCreateFromGifCtx() 306 unsigned char buf[256]; in DoExtension() local 315 Gif89.delayTime = LM_to_uint(buf[1],buf[2]); in DoExtension() 396 scd->buf[0] = scd->buf[scd->last_byte-2]; in GetCode_() [all …]
|
/PHP-7.3/ext/json/ |
H A D | json_encoder.c | 75 smart_str_appendc(buf, c); in php_json_pretty_print_char() 152 smart_str_appendc(buf, '['); in php_json_encode_array() 154 smart_str_appendc(buf, '{'); in php_json_encode_array() 195 buf->s) { in php_json_encode_array() 196 ZSTR_LEN(buf->s) -= 4; in php_json_encode_array() 214 smart_str_appendc(buf, ':'); in php_json_encode_array() 243 smart_str_appendc(buf, ']'); in php_json_encode_array() 245 smart_str_appendc(buf, '}'); in php_json_encode_array() 283 checkpoint = buf->s ? ZSTR_LEN(buf->s) : 0; in php_json_escape_string() 287 smart_str_appendc(buf, '"'); in php_json_escape_string() [all …]
|
/PHP-7.3/ext/dba/libflatfile/ |
H A D | flatfile.c | 91 if (php_stream_gets(dba->fp, buf, sizeof(buf))) { in flatfile_fetch() 123 buf = erealloc(buf, buf_size); in flatfile_delete() 146 buf = erealloc(buf, buf_size); in flatfile_delete() 151 efree(buf); in flatfile_delete() 174 buf = erealloc(buf, buf_size); in flatfile_findkey() 190 buf = erealloc(buf, buf_size); in flatfile_findkey() 194 efree(buf); in flatfile_findkey() 215 buf = erealloc(buf, buf_size); in flatfile_firstkey() 231 buf = erealloc(buf, buf_size); in flatfile_firstkey() 258 buf = erealloc(buf, buf_size); in flatfile_nextkey() [all …]
|
/PHP-7.3/ext/standard/ |
H A D | var.c | 586 smart_str buf = {0}; in php_var_export() local 588 smart_str_0(&buf); in php_var_export() 589 PHPWRITE(ZSTR_VAL(buf.s), ZSTR_LEN(buf.s)); in php_var_export() 590 smart_str_free(&buf); in php_var_export() 600 smart_str buf = {0}; in PHP_FUNCTION() local 609 smart_str_0 (&buf); in PHP_FUNCTION() 614 PHPWRITE(ZSTR_VAL(buf.s), ZSTR_LEN(buf.s)); in PHP_FUNCTION() 1024 smart_str_0(buf); in php_var_serialize() 1063 smart_str buf = {0}; in PHP_FUNCTION() local 1078 if (buf.s) { in PHP_FUNCTION() [all …]
|
H A D | head.c | 88 smart_str buf = {0}; in php_setcookie() local 122 smart_str_append(&buf, name); in php_setcookie() 124 smart_str_append(&buf, dt); in php_setcookie() 129 smart_str_append(&buf, name); in php_setcookie() 130 smart_str_appendc(&buf, '='); in php_setcookie() 136 smart_str_append(&buf, value); in php_setcookie() 148 smart_str_free(&buf); in php_setcookie() 153 smart_str_append(&buf, dt); in php_setcookie() 168 smart_str_append(&buf, path); in php_setcookie() 185 ctr.line = ZSTR_VAL(buf.s); in php_setcookie() [all …]
|
H A D | exec.c | 99 char *buf; in php_exec() local 129 b = buf; in php_exec() 135 bufl += b - buf; in php_exec() 137 buf = erealloc(buf, buflen); in php_exec() 138 b = buf + bufl; in php_exec() 144 bufl += b - buf; in php_exec() 158 buf[bufl] = '\0'; in php_exec() 162 b = buf; in php_exec() 178 buf[bufl] = '\0'; in php_exec() 192 PHPWRITE(buf, bufl); in php_exec() [all …]
|
/PHP-7.3/ext/fileinfo/libmagic/ |
H A D | encoding.c | 341 c = buf[i] & 0x1f; in file_looks_utf8() 344 c = buf[i] & 0x0f; in file_looks_utf8() 347 c = buf[i] & 0x07; in file_looks_utf8() 363 if ((buf[i] & 0x80) == 0 || (buf[i] & 0x40)) in file_looks_utf8() 387 if (nbytes > 3 && buf[0] == 0xef && buf[1] == 0xbb && buf[2] == 0xbf) in looks_utf8_with_BOM() 396 if (nbytes > 4 && buf[0] == '+' && buf[1] == '/' && buf[2] == 'v') in looks_utf7() 397 switch (buf[3]) { in looks_utf7() 422 if (buf[0] == 0xff && buf[1] == 0xfe) in looks_ucs16() 424 else if (buf[0] == 0xfe && buf[1] == 0xff) in looks_ucs16() 435 ubuf[(*ulen)++] = buf[i + 1] + 256 * buf[i]; in looks_ucs16() [all …]
|
H A D | ascmagic.c | 104 const unsigned char *buf = b->fbuf; in file_ascmagic_with_encoding() local 127 nbytes = trim_nuls(buf, nbytes); in file_ascmagic_with_encoding() 322 unsigned char *end = buf + len; in encode_utf8() 326 if (end - buf < 1) in encode_utf8() 328 *buf++ = (unsigned char)ubuf[i]; in encode_utf8() 330 if (end - buf < 2) in encode_utf8() 335 if (end - buf < 3) in encode_utf8() 341 if (end - buf < 4) in encode_utf8() 348 if (end - buf < 5) in encode_utf8() 356 if (end - buf < 6) in encode_utf8() [all …]
|
H A D | funcs.c | 71 len = spprintf(&newstr, 0, "%s%s", ms->o.buf, (buf ? buf : "")); in file_printf() 72 if (buf) { in file_printf() 73 efree(buf); in file_printf() 78 ms->o.buf = buf; in file_printf() 106 file_printf(ms, "%s (%s)", (*buf ? buf : ""), strerror(error)); in file_error_core() 111 if (buf) { in file_error_core() 112 efree(buf); in file_error_core() 467 return ms->o.buf == NULL ? 0 : strlen(ms->o.buf); in file_printedlen() 518 pb->buf = ms->o.buf; in file_push_buffer() 540 ms->o.buf = pb->buf; in file_pop_buffer() [all …]
|
H A D | der.c | 213 strlcpy(buf, der__tag[tag], len); in der_tag() 215 snprintf(buf, len, "%#x", tag); in der_tag() 216 return buf; in der_tag() 281 char buf[128]; in der_cmp() local 291 der_tag(buf, sizeof(buf), tag); in der_cmp() 294 buf, s); in der_cmp() 295 size_t slen = strlen(buf); in der_cmp() 297 if (strncmp(buf, s, slen) != 0) in der_cmp() 326 der_data(buf, sizeof(buf), tag, b + offs, tlen); in der_cmp() 360 char buf[128]; in printdata() local [all …]
|
/PHP-7.3/Zend/ |
H A D | zend_vm_trace_handlers.h | 31 char buf[256]; in zend_vm_trace() local 37 memcpy(buf, last, last_len); in zend_vm_trace() 38 buf[last_len] = ' '; in zend_vm_trace() 39 memcpy(buf + last_len + 1, op, op_len + 1); in zend_vm_trace() 89 char buf[256]; in zend_vm_trace_init() local 94 if (fgets(buf, sizeof(buf)-1, f)) { in zend_vm_trace_init() 95 len = strlen(buf); in zend_vm_trace_init() 96 while (len > 0 && buf[len-1] <= ' ') { in zend_vm_trace_init() 98 buf[len] = 0; in zend_vm_trace_init() 100 while (len > 0 && buf[len-1] >= '0' && buf[len-1] <= '9') { in zend_vm_trace_init() [all …]
|
H A D | zend_stream.c | 63 zend_stat_t buf; in zend_stream_stdio_fsizer() local 105 zend_stat_t buf; in zend_stream_fsize() local 142 char buf; in zend_stream_getc() local 201 *buf = file_handle->handle.stream.mmap.buf; in zend_stream_fixup() 234 file_handle->handle.stream.mmap.buf = *buf; in zend_stream_fixup() 254 *buf = safe_erealloc(*buf, size, 2, 0); in zend_stream_fixup() 261 *buf = safe_erealloc(*buf, size, 1, ZEND_MMAP_AHEAD); in zend_stream_fixup() 263 file_handle->handle.stream.mmap.buf = *buf; in zend_stream_fixup() 267 *buf = erealloc(*buf, ZEND_MMAP_AHEAD); in zend_stream_fixup() 268 file_handle->handle.stream.mmap.buf = *buf; in zend_stream_fixup() [all …]
|
/PHP-7.3/ext/dba/libcdb/ |
H A D | cdb.c | 48 char buf[32]; in cdb_match() local 52 n = sizeof(buf); in cdb_match() 55 if (cdb_read(c, buf, n, pos) == -1) in cdb_match() 57 if (memcmp(buf, key, n)) in cdb_match() 121 buf += r; in cdb_read() 131 char buf[8]; in cdb_findnext() local 139 uint32_unpack(buf + 4,&c->hslots); in cdb_findnext() 142 uint32_unpack(buf, &c->hpos); in cdb_findnext() 153 uint32_unpack(buf + 4, &pos); in cdb_findnext() 160 uint32_unpack(buf, &u); in cdb_findnext() [all …]
|
/PHP-7.3/ext/session/ |
H A D | mod_files.c | 127 buf[n++] = *p++; in ps_files_path_create() 134 buf[n] = '\0'; in ps_files_path_create() 136 return buf; in ps_files_path_create() 158 char buf[MAXPATHLEN]; in ps_files_open() local 177 if (!ps_files_path_create(buf, sizeof(buf), data, key)) { in ps_files_open() 262 buf = wrote > -1 ? buf + wrote : 0; in ps_files_write() 290 char buf[MAXPATHLEN]; in ps_files_cleanup_dir() local 348 if (!key || !ps_files_path_create(buf, sizeof(buf), data, key)) { in ps_files_key_exists() 514 buf = read_in > -1 ? buf + read_in : 0; in PS_READ_FUNC() 579 if (!ps_files_path_create(buf, sizeof(buf), data, ZSTR_VAL(key))) { in PS_UPDATE_TIMESTAMP_FUNC() [all …]
|
/PHP-7.3/main/ |
H A D | reentrancy.c | 61 if (ctime_r(clock, buf) == buf) in php_ctime_r() 62 return (buf); in php_ctime_r() 68 if (asctime_r(tm, buf) == buf) in php_asctime_r() 69 return (buf); in php_asctime_r() 92 return (buf); in php_ctime_r() 98 if (asctime_r(tm, buf, 26) != -1) in php_asctime_r() 99 return (buf); in php_asctime_r() 191 strcpy(buf, tmp); in php_ctime_r() 192 tmp = buf; in php_ctime_r() 212 strcpy(buf, tmp); in php_asctime_r() [all …]
|
/PHP-7.3/ext/mysqlnd/ |
H A D | mysqlnd_connection.h | 47 #define SET_NEW_MESSAGE(buf, buf_len, message, len) \ argument 49 if ((buf)) { \ 50 mnd_efree((buf)); \ 53 (buf) = mnd_pestrndup((message), (len), 0); \ 55 (buf) = NULL; \ 60 #define SET_EMPTY_MESSAGE(buf, buf_len) \ argument 62 if ((buf)) { \ 63 mnd_efree((buf)); \ 64 (buf) = NULL; \
|
/PHP-7.3/ext/mbstring/oniguruma/src/ |
H A D | regint.h | 357 #define BB_INIT(buf,size) bbuf_init((BBuf* )(buf), (size)) argument 369 (buf)->p = (UChar* )xrealloc((buf)->p, (buf)->alloc);\ 377 (buf)->p = (UChar* )xrealloc((buf)->p, new_alloc);\ 397 #define BB_ADD(buf,bytes,n) BB_WRITE((buf),(buf)->used,(bytes),(n)) argument 398 #define BB_ADD1(buf,byte) BB_WRITE1((buf),(buf)->used,(byte)) argument 399 #define BB_GET_ADD_ADDRESS(buf) ((buf)->p + (buf)->used) argument 400 #define BB_GET_OFFSET_POS(buf) ((buf)->used) argument 405 xmemmove((buf)->p + (to), (buf)->p + (from), (n));\ 411 xmemmove((buf)->p + (to), (buf)->p + (from), (n));\ 416 xmemmove((buf)->p + (to), (buf)->p + (from), (buf)->used - (from));\ [all …]
|
/PHP-7.3/sapi/fpm/fpm/ |
H A D | zlog.c | 237 buf[len] = '\0'; in vzlog() 239 buf[len++] = '\n'; in vzlog() 243 buf[len++] = '\n'; in vzlog() 287 char *buf; in zlog_stream_buf_alloc_ex() local 290 if (stream->buf.data) { in zlog_stream_buf_alloc_ex() 292 buf = realloc(stream->buf.data, size); in zlog_stream_buf_alloc_ex() 295 buf = malloc(size); in zlog_stream_buf_alloc_ex() 298 if (buf == NULL) { in zlog_stream_buf_alloc_ex() 302 stream->buf.data = buf; in zlog_stream_buf_alloc_ex() 303 stream->buf.size = size; in zlog_stream_buf_alloc_ex() [all …]
|
H A D | fpm_php_trace.c | 47 char buf[buf_size]; in fpm_php_trace_dump() local 54 zlog_print_time(&tv, buf, buf_size); in fpm_php_trace_dump() 56 fprintf(slowlog, "\n%s [pool %s] pid %d\n", buf, child->wp->config->name, (int) pid); in fpm_php_trace_dump() 64 if (0 > fpm_trace_get_strz(buf, buf_size, path_translated)) { in fpm_php_trace_dump() 68 fprintf(slowlog, "script_filename = %s\n", buf); in fpm_php_trace_dump() 105 memcpy(buf, "[INCLUDE_OR_EVAL]", sizeof("[INCLUDE_OR_EVAL]")); in fpm_php_trace_dump() 116 memcpy(buf, "???", sizeof("???")); in fpm_php_trace_dump() 121 fprintf(slowlog, "%s()", buf); in fpm_php_trace_dump() 123 *buf = '\0'; in fpm_php_trace_dump() 156 if (0 > fpm_trace_get_strz(buf, buf_size, file_name + offsetof(zend_string, val))) { in fpm_php_trace_dump() [all …]
|
/PHP-7.3/ext/opcache/Optimizer/ |
H A D | zend_worklist.h | 26 int *buf; member 32 (s)->buf = (int*)do_alloca(sizeof(int) * _len, use_heap); \ 38 free_alloca((s)->buf, use_heap) 44 stack->buf = (int*)zend_arena_calloc(arena, sizeof(*stack->buf), len); in zend_worklist_stack_prepare() 54 stack->buf[stack->len++] = i; in zend_worklist_stack_push() 60 return stack->buf[stack->len - 1]; in zend_worklist_stack_peek() 66 return stack->buf[--stack->len]; in zend_worklist_stack_pop() 75 …(w)->stack.buf = (int*)do_alloca(ZEND_MM_ALIGNED_SIZE(sizeof(int) * _len) + sizeof(zend_ulong) * z… 78 (w)->visited = (zend_bitset)((char*)(w)->stack.buf + ZEND_MM_ALIGNED_SIZE(sizeof(int) * _len)); \ 83 free_alloca((w)->stack.buf, use_heap)
|
/PHP-7.3/sapi/phpdbg/ |
H A D | phpdbg_io.c | 67 if (buf[i] == '\x03') { in ZEND_EXTERN_MODULE_GLOBALS() 69 memmove(buf + i, buf + i + 1, len + bytes - i - 1); in ZEND_EXTERN_MODULE_GLOBALS() 75 if (buf[i] == '\n') { in ZEND_EXTERN_MODULE_GLOBALS() 81 buf[i + 1] = 0; in ZEND_EXTERN_MODULE_GLOBALS() 205 char buf[PHPDBG_MAX_CMD]; local 208 if (*buf == 'q') { 303 char buf[128]; local 305 snprintf(buf, sizeof(buf), "Could not translate address '%s'", addr); 307 zend_quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, buf, strlen(buf)); 312 char buf[256]; local [all …]
|
H A D | phpdbg_rinit_hook.c | 60 char buf[(1 << 8) + 1]; in PHP_RINIT_FUNCTION() local 73 buf[0] = (msglen >> 0) & 0xff; in PHP_RINIT_FUNCTION() 74 buf[1] = (msglen >> 8) & 0xff; in PHP_RINIT_FUNCTION() 75 buf[2] = (msglen >> 16) & 0xff; in PHP_RINIT_FUNCTION() 76 buf[3] = (msglen >> 24) & 0xff; in PHP_RINIT_FUNCTION() 77 send(s, buf, 4, 0); in PHP_RINIT_FUNCTION() 80 while ((buflen = recv(s, buf, sizeof(buf) - 1, 0)) > 0) { in PHP_RINIT_FUNCTION() 81 php_write(buf, buflen); in PHP_RINIT_FUNCTION()
|
/PHP-7.3/ext/mbstring/libmbfl/tests/conv_encoding.tests/ |
H A D | gen_exp.c | 120 buf[0] = k; in utf32_utf8() 123 buf[0] = 0xc0 | (k >> 6); in utf32_utf8() 124 buf[1] = 0x80 | (k & 0x3f); in utf32_utf8() 127 buf[0] = 0xe0 | (k >> 12); in utf32_utf8() 132 buf[0] = 0xf0 | (k >> 18); in utf32_utf8() 138 buf[0] = 0xf8 | (k >> 24); in utf32_utf8() 145 buf[0] = 0xfc | (k >> 30); in utf32_utf8() 153 buf[retval] = '\0'; in utf32_utf8() 382 char buf[1024]; in main() local 408 while (fgets(buf, sizeof(buf), fp)) { in main() [all …]
|
/PHP-7.3/ext/zip/lib/ |
H A D | zip_utf-8.c | 192 _zip_unicode_to_utf8(zip_uint32_t codepoint, zip_uint8_t *buf) in _zip_unicode_to_utf8() argument 195 buf[0] = codepoint & 0xff; in _zip_unicode_to_utf8() 199 buf[0] = (zip_uint8_t)(UTF_8_LEN_2_MATCH | ((codepoint >> 6) & 0x1f)); in _zip_unicode_to_utf8() 200 buf[1] = (zip_uint8_t)(UTF_8_CONTINUE_MATCH | (codepoint & 0x3f)); in _zip_unicode_to_utf8() 204 buf[0] = (zip_uint8_t)(UTF_8_LEN_3_MATCH | ((codepoint >> 12) & 0x0f)); in _zip_unicode_to_utf8() 205 buf[1] = (zip_uint8_t)(UTF_8_CONTINUE_MATCH | ((codepoint >> 6) & 0x3f)); in _zip_unicode_to_utf8() 206 buf[2] = (zip_uint8_t)(UTF_8_CONTINUE_MATCH | (codepoint & 0x3f)); in _zip_unicode_to_utf8() 209 buf[0] = (zip_uint8_t)(UTF_8_LEN_4_MATCH | ((codepoint >> 18) & 0x07)); in _zip_unicode_to_utf8() 210 buf[1] = (zip_uint8_t)(UTF_8_CONTINUE_MATCH | ((codepoint >> 12) & 0x3f)); in _zip_unicode_to_utf8() 211 buf[2] = (zip_uint8_t)(UTF_8_CONTINUE_MATCH | ((codepoint >> 6) & 0x3f)); in _zip_unicode_to_utf8() [all …]
|