Home
last modified time | relevance | path

Searched refs:buf (Results 1 – 25 of 362) sorted by relevance

12345678910>>...15

/php-src/ext/gd/libgd/
H A Dgdxpm.c23 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 Dgd_gif_in.c137 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-src/ext/dba/libflatfile/
H A Dflatfile.c87 if (php_stream_gets(dba->fp, buf, sizeof(buf))) { in flatfile_fetch()
118 buf = erealloc(buf, buf_size); in flatfile_delete()
141 buf = erealloc(buf, buf_size); in flatfile_delete()
146 efree(buf); in flatfile_delete()
168 buf = erealloc(buf, buf_size); in flatfile_findkey()
184 buf = erealloc(buf, buf_size); in flatfile_findkey()
188 efree(buf); in flatfile_findkey()
208 buf = erealloc(buf, buf_size); in flatfile_firstkey()
224 buf = erealloc(buf, buf_size); in flatfile_firstkey()
250 buf = erealloc(buf, buf_size); in flatfile_nextkey()
[all …]
/php-src/ext/json/
H A Djson_encoder.c61 smart_str_appendc(buf, c); in php_json_pretty_print_char()
161 smart_str_appendc(buf, '{'); in php_json_encode_array()
191 buf->s) { in php_json_encode_array()
192 ZSTR_LEN(buf->s) -= 4; in php_json_encode_array()
219 smart_str_appendc(buf, '}'); in php_json_encode_array()
244 smart_str_appendc(buf, '['); in php_json_encode_array()
246 smart_str_appendc(buf, '{'); in php_json_encode_array()
307 buf->s) { in php_json_encode_array()
308 ZSTR_LEN(buf->s) -= 4; in php_json_encode_array()
398 checkpoint = buf->s ? ZSTR_LEN(buf->s) : 0; in php_json_escape_string()
[all …]
/php-src/ext/mbstring/libmbfl/mbfl/
H A Dmbfl_encoding.h157 buf->state = buf->errors = 0; in mb_convert_buf_init()
159 buf->out = (unsigned char*)ZSTR_VAL(buf->str); in mb_convert_buf_init()
160 buf->limit = buf->out + initsize; in mb_convert_buf_init()
176 #define MB_CONVERT_BUF_STORE(buf, _out, _limit) (buf)->out = _out; (buf)->limit = _limit argument
178 #define MB_CONVERT_BUF_LOAD(buf, _out, _limit) _out = (buf)->out; _limit = (buf)->limit argument
233 ZEND_ASSERT(buf->out <= buf->limit); in mb_convert_buf_result_raw()
240 *(buf->out) = '\0'; in mb_convert_buf_result_raw()
274 efree(buf->str); in mb_convert_buf_free()
279 return buf->out - (unsigned char*)ZSTR_VAL(buf->str); in mb_convert_buf_len()
284 buf->out = (unsigned char*)ZSTR_VAL(buf->str) + len; in mb_convert_buf_reset()
[all …]
H A Dmbfilter_8bit.c39 static size_t mb_8bit_to_wchar(unsigned char **in, size_t *in_len, uint32_t *buf, size_t bufsize, u…
40 static void mb_wchar_to_8bit(uint32_t *in, size_t len, mb_convert_buf *buf, bool end);
97 static size_t mb_8bit_to_wchar(unsigned char **in, size_t *in_len, uint32_t *buf, size_t bufsize, u… in mb_8bit_to_wchar() argument
100 uint32_t *out = buf, *limit = buf + bufsize; in mb_8bit_to_wchar()
109 return out - buf; in mb_8bit_to_wchar()
112 static void mb_wchar_to_8bit(uint32_t *in, size_t len, mb_convert_buf *buf, bool end) in mb_wchar_to_8bit() argument
115 MB_CONVERT_BUF_LOAD(buf, out, limit); in mb_wchar_to_8bit()
116 MB_CONVERT_BUF_ENSURE(buf, out, limit, len); in mb_wchar_to_8bit()
123 MB_CONVERT_ERROR(buf, out, limit, w, mb_wchar_to_8bit); in mb_wchar_to_8bit()
124 MB_CONVERT_BUF_ENSURE(buf, out, limit, len); in mb_wchar_to_8bit()
[all …]
/php-src/Zend/
H A Dzend_stream.c101 char buf; in zend_stream_getc() local
132 *buf = file_handle->buf; in zend_stream_fixup()
169 efree(*buf); in zend_stream_fixup()
172 file_handle->buf = *buf; in zend_stream_fixup()
184 *buf = safe_erealloc(*buf, size, 2, 0); in zend_stream_fixup()
189 efree(*buf); in zend_stream_fixup()
195 *buf = safe_erealloc(*buf, size, 1, ZEND_MMAP_AHEAD); in zend_stream_fixup()
197 file_handle->buf = *buf; in zend_stream_fixup()
201 *buf = erealloc(*buf, ZEND_MMAP_AHEAD); in zend_stream_fixup()
202 file_handle->buf = *buf; in zend_stream_fixup()
[all …]
H A Dzend_vm_trace_handlers.h31 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 …]
/php-src/ext/dba/libcdb/
H A Dcdb.c46 char buf[32]; in cdb_match() local
50 n = sizeof(buf); in cdb_match()
53 if (cdb_read(c, buf, n, pos) == -1) in cdb_match()
55 if (memcmp(buf, key, n)) in cdb_match()
119 buf += r; in cdb_read()
129 char buf[8]; in cdb_findnext() local
137 uint32_unpack(buf + 4,&c->hslots); in cdb_findnext()
140 uint32_unpack(buf, &c->hpos); in cdb_findnext()
151 uint32_unpack(buf + 4, &pos); in cdb_findnext()
158 uint32_unpack(buf, &u); in cdb_findnext()
[all …]
/php-src/main/
H A Dreentrancy.c57 if (ctime_r(clock, buf) == buf) in php_ctime_r()
58 return (buf); in php_ctime_r()
64 if (asctime_r(tm, buf) == buf) in php_asctime_r()
65 return (buf); in php_asctime_r()
88 return (buf); in php_ctime_r()
94 if (asctime_r(tm, buf, 26) != -1) in php_asctime_r()
95 return (buf); in php_asctime_r()
139 strcpy(buf, tmp); in php_ctime_r()
140 tmp = buf; in php_ctime_r()
160 strcpy(buf, tmp); in php_asctime_r()
[all …]
/php-src/ext/standard/
H A Dvar.c684 smart_str buf = {0}; in php_var_export() local
686 smart_str_0(&buf); in php_var_export()
688 PHPWRITE(ZSTR_VAL(buf.s), ZSTR_LEN(buf.s)); in php_var_export()
690 smart_str_free(&buf); in php_var_export()
699 smart_str buf = {0}; in PHP_FUNCTION() local
708 smart_str_0 (&buf); in PHP_FUNCTION()
711 smart_str_free(&buf); in PHP_FUNCTION()
715 PHPWRITE(ZSTR_VAL(buf.s), ZSTR_LEN(buf.s)); in PHP_FUNCTION()
1322 smart_str_0(buf); in php_var_serialize()
1360 smart_str buf = {0}; in PHP_FUNCTION() local
[all …]
H A Dhead.c87 smart_str buf = {0}; in php_setcookie() local
131 smart_str_append(&buf, name); in php_setcookie()
133 smart_str_append(&buf, dt); in php_setcookie()
138 smart_str_append(&buf, name); in php_setcookie()
139 smart_str_appendc(&buf, '='); in php_setcookie()
145 smart_str_append(&buf, value); in php_setcookie()
154 smart_str_append(&buf, dt); in php_setcookie()
169 smart_str_append(&buf, path); in php_setcookie()
173 smart_str_append(&buf, domain); in php_setcookie()
186 ctr.line = ZSTR_VAL(buf.s); in php_setcookie()
[all …]
/php-src/ext/session/
H A Dmod_files.c123 buf[n++] = *p++; in ps_files_path_create()
130 buf[n] = '\0'; in ps_files_path_create()
132 return buf; in ps_files_path_create()
154 char buf[MAXPATHLEN]; in ps_files_open() local
173 if (!ps_files_path_create(buf, sizeof(buf), data, key)) { in ps_files_open()
258 buf = wrote > -1 ? buf + wrote : 0; in ps_files_write()
285 char buf[MAXPATHLEN]; in ps_files_cleanup_dir() local
340 if (!key || !ps_files_path_create(buf, sizeof(buf), data, key)) { in ps_files_key_exists()
505 buf = read_in > -1 ? buf + read_in : 0; in PS_READ_FUNC()
568 if (!ps_files_path_create(buf, sizeof(buf), data, key)) { in PS_UPDATE_TIMESTAMP_FUNC()
[all …]
/php-src/ext/mbstring/libmbfl/filters/
H A Dmbfilter_singlebyte.c105 uint32_t *out = buf, *limit = buf + bufsize; \
112 return out - buf; \
162 uint32_t *out = buf, *limit = buf + bufsize; in mb_ascii_to_wchar()
171 return out - buf; in mb_ascii_to_wchar()
177 MB_CONVERT_BUF_LOAD(buf, out, limit); in mb_wchar_to_ascii()
216 uint32_t *out = buf, *limit = buf + bufsize; in mb_8859_1_to_wchar()
224 return out - buf; in mb_8859_1_to_wchar()
532 uint32_t *out = buf, *limit = buf + bufsize; in mb_cp1252_to_wchar()
546 return out - buf; in mb_cp1252_to_wchar()
733 uint32_t *out = buf, *limit = buf + bufsize; in mb_armscii8_to_wchar()
[all …]
H A Dmbfilter_7bit.c34 static size_t mb_7bit_to_wchar(unsigned char **in, size_t *in_len, uint32_t *buf, size_t bufsize, u…
35 static void mb_wchar_to_7bit(uint32_t *in, size_t len, mb_convert_buf *buf, bool end);
89 static size_t mb_7bit_to_wchar(unsigned char **in, size_t *in_len, uint32_t *buf, size_t bufsize, u… in mb_7bit_to_wchar() argument
92 uint32_t *out = buf, *limit = buf + bufsize; in mb_7bit_to_wchar()
101 return out - buf; in mb_7bit_to_wchar()
104 static void mb_wchar_to_7bit(uint32_t *in, size_t len, mb_convert_buf *buf, bool end) in mb_wchar_to_7bit() argument
107 MB_CONVERT_BUF_LOAD(buf, out, limit); in mb_wchar_to_7bit()
108 MB_CONVERT_BUF_ENSURE(buf, out, limit, len); in mb_wchar_to_7bit()
115 MB_CONVERT_ERROR(buf, out, limit, w, mb_wchar_to_7bit); in mb_wchar_to_7bit()
116 MB_CONVERT_BUF_ENSURE(buf, out, limit, len); in mb_wchar_to_7bit()
[all …]
H A Dmbfilter_ucs2.c273 uint32_t *out = buf, *limit = buf + bufsize; in mb_ucs2be_to_wchar()
290 return out - buf; in mb_ucs2be_to_wchar()
296 MB_CONVERT_BUF_LOAD(buf, out, limit); in mb_wchar_to_ucs2be()
297 MB_CONVERT_BUF_ENSURE(buf, out, limit, len * 2); in mb_wchar_to_ucs2be()
305 MB_CONVERT_BUF_ENSURE(buf, out, limit, len * 2); in mb_wchar_to_ucs2be()
309 MB_CONVERT_BUF_STORE(buf, out, limit); in mb_wchar_to_ucs2be()
315 uint32_t *out = buf, *limit = buf + bufsize; in mb_ucs2le_to_wchar()
332 return out - buf; in mb_ucs2le_to_wchar()
338 MB_CONVERT_BUF_LOAD(buf, out, limit); in mb_wchar_to_ucs2le()
339 MB_CONVERT_BUF_ENSURE(buf, out, limit, len * 2); in mb_wchar_to_ucs2le()
[all …]
H A Dmbfilter_utf16.c523 uint32_t *out = buf, *limit = buf + bufsize - 1; in mb_utf16be_to_wchar_default()
567 return out - buf; in mb_utf16be_to_wchar_default()
573 MB_CONVERT_BUF_LOAD(buf, out, limit); in mb_wchar_to_utf16be_default()
592 MB_CONVERT_BUF_STORE(buf, out, limit); in mb_wchar_to_utf16be_default()
601 uint32_t *out = buf, *limit = buf + bufsize - 1; in mb_utf16le_to_wchar_default()
645 return out - buf; in mb_utf16le_to_wchar_default()
651 MB_CONVERT_BUF_LOAD(buf, out, limit); in mb_wchar_to_utf16le_default()
685 uint32_t *out = buf; in mb_utf16be_to_wchar_avx2()
791 return out - buf; in mb_utf16be_to_wchar_avx2()
885 uint32_t *out = buf; in mb_utf16le_to_wchar_avx2()
[all …]
H A Dmbfilter_utf32.c288 uint32_t *out = buf, *limit = buf + bufsize; in mb_utf32be_to_wchar()
312 return out - buf; in mb_utf32be_to_wchar()
318 MB_CONVERT_BUF_LOAD(buf, out, limit); in mb_wchar_to_utf32be()
319 MB_CONVERT_BUF_ENSURE(buf, out, limit, len * 4); in mb_wchar_to_utf32be()
327 MB_CONVERT_BUF_ENSURE(buf, out, limit, len * 4); in mb_wchar_to_utf32be()
331 MB_CONVERT_BUF_STORE(buf, out, limit); in mb_wchar_to_utf32be()
337 uint32_t *out = buf, *limit = buf + bufsize; in mb_utf32le_to_wchar()
361 return out - buf; in mb_utf32le_to_wchar()
367 MB_CONVERT_BUF_LOAD(buf, out, limit); in mb_wchar_to_utf32le()
368 MB_CONVERT_BUF_ENSURE(buf, out, limit, len * 4); in mb_wchar_to_utf32le()
[all …]
H A Dmbfilter_ucs4.c356 uint32_t *out = buf, *limit = buf + bufsize; in mb_ucs4be_to_wchar()
375 return out - buf; in mb_ucs4be_to_wchar()
381 MB_CONVERT_BUF_LOAD(buf, out, limit); in mb_wchar_to_ucs4be()
382 MB_CONVERT_BUF_ENSURE(buf, out, limit, len * 4); in mb_wchar_to_ucs4be()
390 MB_CONVERT_BUF_ENSURE(buf, out, limit, len * 4); in mb_wchar_to_ucs4be()
394 MB_CONVERT_BUF_STORE(buf, out, limit); in mb_wchar_to_ucs4be()
400 uint32_t *out = buf, *limit = buf + bufsize; in mb_ucs4le_to_wchar()
419 return out - buf; in mb_ucs4le_to_wchar()
425 MB_CONVERT_BUF_LOAD(buf, out, limit); in mb_wchar_to_ucs4le()
426 MB_CONVERT_BUF_ENSURE(buf, out, limit, len * 4); in mb_wchar_to_ucs4le()
[all …]
/php-src/sapi/fpm/fpm/
H A Dfpm_php_trace.c42 char buf[1024]; in fpm_php_trace_dump() local
49 zlog_print_time(&tv, buf, sizeof(buf)); in fpm_php_trace_dump()
59 if (0 > fpm_trace_get_strz(buf, sizeof(buf), path_translated)) { in fpm_php_trace_dump()
63 fprintf(slowlog, "script_filename = %s\n", buf); in fpm_php_trace_dump()
100 memcpy(buf, "[INCLUDE_OR_EVAL]", sizeof("[INCLUDE_OR_EVAL]")); in fpm_php_trace_dump()
105 if (0 > fpm_trace_get_strz(buf, sizeof(buf), function_name + offsetof(zend_string, val))) { in fpm_php_trace_dump()
111 memcpy(buf, "???", sizeof("???")); in fpm_php_trace_dump()
116 fprintf(slowlog, "%s()", buf); in fpm_php_trace_dump()
118 *buf = '\0'; in fpm_php_trace_dump()
151 if (0 > fpm_trace_get_strz(buf, sizeof(buf), file_name + offsetof(zend_string, val))) { in fpm_php_trace_dump()
[all …]
H A Dzlog.c200 char buf[MAX_BUF_LENGTH]; in vzlog() local
242 buf[len] = '\0'; in vzlog()
244 buf[len++] = '\n'; in vzlog()
248 buf[len++] = '\n'; in vzlog()
292 char *buf; in zlog_stream_buf_alloc_ex() local
295 buf = realloc(stream->buf.data, size); in zlog_stream_buf_alloc_ex()
297 if (buf == NULL) { in zlog_stream_buf_alloc_ex()
301 stream->buf.data = buf; in zlog_stream_buf_alloc_ex()
302 stream->buf.size = size; in zlog_stream_buf_alloc_ex()
687 stream->buf.data, stream->buf.size, stream->use_syslog); in zlog_stream_prefix_ex()
[all …]
/php-src/sapi/phpdbg/
H A Dphpdbg_io.c26 PHPDBG_API int phpdbg_consume_stdin_line(char *buf) { in ZEND_EXTERN_MODULE_GLOBALS()
30 memcpy(buf, PHPDBG_G(input_buffer), bytes); in ZEND_EXTERN_MODULE_GLOBALS()
42 if (buf[i] == '\x03') { in ZEND_EXTERN_MODULE_GLOBALS()
44 memmove(buf + i, buf + i + 1, len + bytes - i - 1); in ZEND_EXTERN_MODULE_GLOBALS()
50 if (buf[i] == '\n') { in ZEND_EXTERN_MODULE_GLOBALS()
53 memcpy(PHPDBG_G(input_buffer), buf + i + 1, PHPDBG_G(input_buflen)); in ZEND_EXTERN_MODULE_GLOBALS()
56 buf[i + 1] = 0; in ZEND_EXTERN_MODULE_GLOBALS()
63 …} while ((bytes = phpdbg_mixed_read(PHPDBG_G(io)[PHPDBG_STDIN].fd, buf + len, PHPDBG_MAX_CMD - len… in ZEND_EXTERN_MODULE_GLOBALS()
95 char buf[PHPDBG_MAX_CMD]; in phpdbg_output_pager() local
97 phpdbg_consume_stdin_line(buf); in phpdbg_output_pager()
[all …]
/php-src/ext/fileinfo/libmagic/
H A Dascmagic.c64 while (nbytes > 1 && buf[nbytes - 1] == '\0') in trim_nuls()
133 nbytes = trim_nuls(buf, nbytes); in file_ascmagic_with_encoding()
341 unsigned char *end = buf + len; in encode_utf8()
345 if (end - buf < 1) in encode_utf8()
347 *buf++ = CAST(unsigned char, ubuf[i]); in encode_utf8()
351 if (end - buf < 2) in encode_utf8()
357 if (end - buf < 3) in encode_utf8()
363 if (end - buf < 4) in encode_utf8()
369 if (end - buf < 5) in encode_utf8()
375 if (end - buf < 6) in encode_utf8()
[all …]
H A Dencoding.c277 ubuf[(*ulen)++] = buf[i]; \
384 c = buf[i] & 0x1f; in file_looks_utf8()
387 c = buf[i] & 0x0f; in file_looks_utf8()
390 c = buf[i] & 0x07; in file_looks_utf8()
393 c = buf[i] & 0x03; in file_looks_utf8()
396 c = buf[i] & 0x01; in file_looks_utf8()
407 (buf[i] < ar->lo || buf[i] > ar->hi)) in file_looks_utf8()
410 if ((buf[i] & 0x80) == 0 || (buf[i] & 0x40)) in file_looks_utf8()
434 if (nbytes > 3 && buf[0] == 0xef && buf[1] == 0xbb && buf[2] == 0xbf) in looks_utf8_with_BOM()
444 if (nbytes > 4 && buf[0] == '+' && buf[1] == '/' && buf[2] == 'v') in looks_utf7()
[all …]
/php-src/Zend/Optimizer/
H A Dzend_worklist.h26 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()
52 stack->buf[stack->len++] = i; in zend_worklist_stack_push()
58 return stack->buf[stack->len - 1]; in zend_worklist_stack_peek()
64 return stack->buf[--stack->len]; in zend_worklist_stack_pop()
73 …(w)->stack.buf = (int*)do_alloca(ZEND_MM_ALIGNED_SIZE(sizeof(int) * _len) + sizeof(zend_ulong) * z…
76 (w)->visited = (zend_bitset)((char*)(w)->stack.buf + ZEND_MM_ALIGNED_SIZE(sizeof(int) * _len)); \
81 free_alloca((w)->stack.buf, use_heap)

Completed in 59 milliseconds

12345678910>>...15