/PHP-7.2/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 …]
|
H A D | gd_io_ss.c | 45 static int sinkPutbuf (gdIOCtx * ctx, const void *buf, int size); 79 static int sourceGetbuf (gdIOCtx * ctx, void *buf, int size) in sourceGetbuf() argument 86 res = ((lctx->src->source) (lctx->src->context, buf, size)); in sourceGetbuf() 105 unsigned char buf; in sourceGetchar() local 107 res = sourceGetbuf (ctx, &buf, 1); in sourceGetchar() 110 return buf; in sourceGetchar() 116 static int sinkPutbuf (gdIOCtx * ctx, const void *buf, int size) in sinkPutbuf() argument 123 res = (lctx->snk->sink) (lctx->snk->context, buf, size); in sinkPutbuf()
|
/PHP-7.2/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() 243 smart_str_appendc(buf, ']'); in php_json_encode_array() 245 smart_str_appendc(buf, '}'); in php_json_encode_array() 282 checkpoint = buf->s ? ZSTR_LEN(buf->s) : 0; in php_json_escape_string() 286 smart_str_appendc(buf, '"'); in php_json_escape_string() 306 if (buf->s) { in php_json_escape_string() [all …]
|
/PHP-7.2/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.2/ext/standard/ |
H A D | var.c | 566 smart_str buf = {0}; in php_var_export() local 568 smart_str_0(&buf); in php_var_export() 569 PHPWRITE(ZSTR_VAL(buf.s), ZSTR_LEN(buf.s)); in php_var_export() 570 smart_str_free(&buf); in php_var_export() 580 smart_str buf = {0}; in PHP_FUNCTION() local 589 smart_str_0 (&buf); in PHP_FUNCTION() 594 PHPWRITE(ZSTR_VAL(buf.s), ZSTR_LEN(buf.s)); in PHP_FUNCTION() 992 smart_str_0(buf); in php_var_serialize() 1031 smart_str buf = {0}; in PHP_FUNCTION() local 1046 if (buf.s) { in PHP_FUNCTION() [all …]
|
H A D | exec.c | 100 char *buf; in php_exec() local 130 b = buf; in php_exec() 136 bufl += b - buf; in php_exec() 138 buf = erealloc(buf, buflen); in php_exec() 139 b = buf + bufl; in php_exec() 145 bufl += b - buf; in php_exec() 159 buf[bufl] = '\0'; in php_exec() 163 b = buf; in php_exec() 172 buf[bufl] = '\0'; in php_exec() 186 PHPWRITE(buf, bufl); in php_exec() [all …]
|
/PHP-7.2/ext/fileinfo/libmagic/ |
H A D | ascmagic.c | 82 nbytes = trim_nuls(buf, nbytes); in file_ascmagic() 123 nbytes = trim_nuls(buf, nbytes); in file_ascmagic_with_encoding() 315 unsigned char *end = buf + len; in encode_utf8() 319 if (end - buf < 1) in encode_utf8() 321 *buf++ = (unsigned char)ubuf[i]; in encode_utf8() 323 if (end - buf < 2) in encode_utf8() 328 if (end - buf < 3) in encode_utf8() 334 if (end - buf < 4) in encode_utf8() 341 if (end - buf < 5) in encode_utf8() 349 if (end - buf < 6) in encode_utf8() [all …]
|
H A D | encoding.c | 329 c = buf[i] & 0x1f; in file_looks_utf8() 332 c = buf[i] & 0x0f; in file_looks_utf8() 335 c = buf[i] & 0x07; in file_looks_utf8() 351 if ((buf[i] & 0x80) == 0 || (buf[i] & 0x40)) in file_looks_utf8() 375 if (nbytes > 3 && buf[0] == 0xef && buf[1] == 0xbb && buf[2] == 0xbf) in looks_utf8_with_BOM() 384 if (nbytes > 4 && buf[0] == '+' && buf[1] == '/' && buf[2] == 'v') in looks_utf7() 385 switch (buf[3]) { in looks_utf7() 410 if (buf[0] == 0xff && buf[1] == 0xfe) in looks_ucs16() 412 else if (buf[0] == 0xfe && buf[1] == 0xff) in looks_ucs16() 423 ubuf[(*ulen)++] = buf[i + 1] + 256 * buf[i]; in looks_ucs16() [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() 461 return ms->o.buf == NULL ? 0 : strlen(ms->o.buf); in file_printedlen() 515 pb->buf = ms->o.buf; in file_push_buffer() 537 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 …]
|
H A D | compress.c | 260 buf = CAST(const char *, buf) + rv; in swrite() 329 buf = CAST(char *, CCAST(void *, buf)) + rv; in sread() 340 char buf[4096]; in file_pipe2file() local 344 (void)strlcpy(buf, "/tmp/file.XXXXXX", sizeof buf); in file_pipe2file() 356 tfd = mkstemp(buf); in file_pipe2file() 358 (void)unlink(buf); in file_pipe2file() 371 while ((r = sread(fd, buf, sizeof(buf), 1)) > 0) in file_pipe2file() 502 *buf = NULL; in makeerror() 580 char *buf; in filter_error() local 583 buf = (char *)ubuf; in filter_error() [all …]
|
/PHP-7.2/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.2/Zend/ |
H A D | zend_stream.c | 66 zend_stat_t buf; in zend_stream_stdio_fsizer() local 108 zend_stat_t buf; in zend_stream_fsize() local 145 char buf; in zend_stream_getc() local 204 *buf = file_handle->handle.stream.mmap.buf; in zend_stream_fixup() 237 file_handle->handle.stream.mmap.buf = *buf; in zend_stream_fixup() 257 *buf = safe_erealloc(*buf, size, 2, 0); in zend_stream_fixup() 264 *buf = safe_erealloc(*buf, size, 1, ZEND_MMAP_AHEAD); in zend_stream_fixup() 266 file_handle->handle.stream.mmap.buf = *buf; in zend_stream_fixup() 270 *buf = erealloc(*buf, ZEND_MMAP_AHEAD); in zend_stream_fixup() 271 file_handle->handle.stream.mmap.buf = *buf; in zend_stream_fixup() [all …]
|
/PHP-7.2/ext/mbstring/oniguruma/src/ |
H A D | regint.h | 331 (buf)->p = (UChar* )xrealloc((buf)->p, (buf)->alloc);\ 337 (buf)->p = (UChar* )xrealloc((buf)->p, (buf)->alloc);\ 345 (buf)->p = (UChar* )xrealloc((buf)->p, new_alloc);\ 365 #define BBUF_ADD(buf,bytes,n) BBUF_WRITE((buf),(buf)->used,(bytes),(n)) argument 366 #define BBUF_ADD1(buf,byte) BBUF_WRITE1((buf),(buf)->used,(byte)) argument 367 #define BBUF_GET_ADD_ADDRESS(buf) ((buf)->p + (buf)->used) argument 368 #define BBUF_GET_OFFSET_POS(buf) ((buf)->used) argument 373 xmemmove((buf)->p + (to), (buf)->p + (from), (n));\ 379 xmemmove((buf)->p + (to), (buf)->p + (from), (n));\ 384 xmemmove((buf)->p + (to), (buf)->p + (from), (buf)->used - (from));\ [all …]
|
/PHP-7.2/sapi/fpm/fpm/ |
H A D | zlog.c | 104 char buf[MAX_LINE_LENGTH]; in vzlog() local 113 len = vsnprintf(buf, buf_size, fmt, ap); in vzlog() 119 external_logger(flags & ZLOG_LEVEL_MASK, buf, len); in vzlog() 121 memset(buf, '\0', buf_size); in vzlog() 142 len = zlog_print_time(&tv, buf, buf_size); in vzlog() 160 len += vsnprintf(buf + len, buf_size - len, fmt, args); in vzlog() 182 buf[len] = '\0'; in vzlog() 183 php_syslog(syslog_priorities[zlog_level], "%s", buf); in vzlog() 184 buf[len++] = '\n'; in vzlog() 188 buf[len++] = '\n'; in vzlog() [all …]
|
H A D | fpm_php_trace.c | 48 char buf[buf_size]; in fpm_php_trace_dump() local 55 zlog_print_time(&tv, buf, buf_size); in fpm_php_trace_dump() 57 fprintf(slowlog, "\n%s [pool %s] pid %d\n", buf, child->wp->config->name, (int) pid); in fpm_php_trace_dump() 65 if (0 > fpm_trace_get_strz(buf, buf_size, path_translated)) { in fpm_php_trace_dump() 69 fprintf(slowlog, "script_filename = %s\n", buf); in fpm_php_trace_dump() 106 memcpy(buf, "[INCLUDE_OR_EVAL]", sizeof("[INCLUDE_OR_EVAL]")); in fpm_php_trace_dump() 117 memcpy(buf, "???", sizeof("???")); in fpm_php_trace_dump() 122 fprintf(slowlog, "%s()", buf); in fpm_php_trace_dump() 124 *buf = '\0'; in fpm_php_trace_dump() 157 if (0 > fpm_trace_get_strz(buf, buf_size, file_name + offsetof(zend_string, val))) { in fpm_php_trace_dump() [all …]
|
/PHP-7.2/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.2/main/ |
H A D | reentrancy.c | 63 if (ctime_r(clock, buf) == buf) in php_ctime_r() 64 return (buf); in php_ctime_r() 70 if (asctime_r(tm, buf) == buf) in php_asctime_r() 71 return (buf); in php_asctime_r() 94 return (buf); in php_ctime_r() 100 if (asctime_r(tm, buf, 26) != -1) in php_asctime_r() 101 return (buf); in php_asctime_r() 204 strcpy(buf, tmp); in php_ctime_r() 208 return buf; in php_ctime_r() 222 strcpy(buf, tmp); in php_asctime_r() [all …]
|
/PHP-7.2/ext/mysqlnd/ |
H A D | mysqlnd_connection.h | 47 #define SET_NEW_MESSAGE(buf, buf_len, message, len, persistent) \ argument 49 if ((buf)) { \ 50 mnd_pefree((buf), (persistent)); \ 53 (buf) = mnd_pestrndup((message), (len), (persistent)); \ 55 (buf) = NULL; \ 60 #define SET_EMPTY_MESSAGE(buf, buf_len, persistent) \ argument 62 if ((buf)) { \ 63 mnd_pefree((buf), (persistent)); \ 64 (buf) = NULL; \
|
/PHP-7.2/ext/opcache/Optimizer/ |
H A D | zend_worklist.h | 28 int *buf; member 34 (s)->buf = (int*)do_alloca(sizeof(int) * _len, use_heap); \ 40 free_alloca((s)->buf, use_heap) 46 stack->buf = (int*)zend_arena_calloc(arena, sizeof(*stack->buf), len); in zend_worklist_stack_prepare() 56 stack->buf[stack->len++] = i; in zend_worklist_stack_push() 62 return stack->buf[stack->len - 1]; in zend_worklist_stack_peek() 68 return stack->buf[--stack->len]; in zend_worklist_stack_pop() 77 …(w)->stack.buf = (int*)do_alloca(ZEND_MM_ALIGNED_SIZE(sizeof(int) * _len) + sizeof(zend_ulong) * z… 80 (w)->visited = (zend_bitset)((char*)(w)->stack.buf + ZEND_MM_ALIGNED_SIZE(sizeof(int) * _len)); \ 85 free_alloca((w)->stack.buf, use_heap)
|
/PHP-7.2/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 …]
|
/PHP-7.2/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.2/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 …]
|
/PHP-7.2/ext/xmlrpc/libxmlrpc/ |
H A D | xml_to_soap.c | 89 char buf[128], *p; in parse_array_type_info() local 90 snprintf(buf, sizeof(buf), "%s", array_type); in parse_array_type_info() 91 p = strchr(buf, '['); in parse_array_type_info() 364 XMLRPC_SetValueBase64(xCurrent, buf.data, buf.offset); in xml_element_to_SOAP_REQUEST_worker() 365 buffer_delete(&buf); in xml_element_to_SOAP_REQUEST_worker() 436 char buf[BUF_SIZE]; in SOAP_to_xml_element_worker() local 456 snprintf(buf, sizeof(buf), "%s[%i]", type, XMLRPC_VectorSize(node)); in SOAP_to_xml_element_worker() 530 simplestring_addn(&elem_val->text, buf.data, buf.offset ); in SOAP_to_xml_element_worker() 531 buffer_delete(&buf); in SOAP_to_xml_element_worker() 627 char buf[128]; in SOAP_REQUEST_to_xml_element() local [all …]
|