Home
last modified time | relevance | path

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

12345678910>>...13

/PHP-7.4/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 …]
H A Dgd_io_ss.c45 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()
H A Dgd_color_match.c12 unsigned long *buf; /* stores our calculations */ in gdImageColorMatch() local
31 buf = (unsigned long *)safe_emalloc(sizeof(unsigned long), 5 * gdMaxColors, 0); in gdImageColorMatch()
32 memset( buf, 0, sizeof(unsigned long) * 5 * gdMaxColors ); in gdImageColorMatch()
38 bp = buf + (color * 5); in gdImageColorMatch()
46 bp = buf; in gdImageColorMatch()
58 gdFree(buf); in gdImageColorMatch()
/PHP-7.4/ext/json/
H A Djson_encoder.c75 smart_str_appendc(buf, c); in php_json_pretty_print_char()
154 smart_str_appendc(buf, '['); in php_json_encode_array()
156 smart_str_appendc(buf, '{'); in php_json_encode_array()
197 buf->s) { in php_json_encode_array()
198 ZSTR_LEN(buf->s) -= 4; in php_json_encode_array()
216 smart_str_appendc(buf, ':'); in php_json_encode_array()
247 smart_str_appendc(buf, ']'); in php_json_encode_array()
249 smart_str_appendc(buf, '}'); in php_json_encode_array()
287 checkpoint = buf->s ? ZSTR_LEN(buf->s) : 0; in php_json_escape_string()
291 smart_str_appendc(buf, '"'); in php_json_escape_string()
[all …]
/PHP-7.4/ext/dba/libflatfile/
H A Dflatfile.c91 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.4/Zend/
H A Dzend_stream.c42 zend_stat_t buf; in zend_stream_stdio_fsizer() local
90 char buf; in zend_stream_getc() local
121 *buf = file_handle->buf; in zend_stream_fixup()
158 efree(*buf); in zend_stream_fixup()
161 file_handle->buf = *buf; in zend_stream_fixup()
173 *buf = safe_erealloc(*buf, size, 2, 0); in zend_stream_fixup()
184 *buf = safe_erealloc(*buf, size, 1, ZEND_MMAP_AHEAD); in zend_stream_fixup()
186 file_handle->buf = *buf; in zend_stream_fixup()
190 *buf = erealloc(*buf, ZEND_MMAP_AHEAD); in zend_stream_fixup()
191 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-7.4/ext/standard/
H A Dvar.c620 smart_str buf = {0}; in php_var_export() local
622 smart_str_0(&buf); in php_var_export()
623 PHPWRITE(ZSTR_VAL(buf.s), ZSTR_LEN(buf.s)); in php_var_export()
624 smart_str_free(&buf); in php_var_export()
634 smart_str buf = {0}; in PHP_FUNCTION() local
643 smart_str_0 (&buf); in PHP_FUNCTION()
648 PHPWRITE(ZSTR_VAL(buf.s), ZSTR_LEN(buf.s)); in PHP_FUNCTION()
1135 smart_str_0(buf); in php_var_serialize()
1174 smart_str buf = {0}; in PHP_FUNCTION() local
1189 if (buf.s) { in PHP_FUNCTION()
[all …]
H A Dhead.c84 smart_str buf = {0}; in php_setcookie() local
118 smart_str_append(&buf, name); in php_setcookie()
120 smart_str_append(&buf, dt); in php_setcookie()
125 smart_str_append(&buf, name); in php_setcookie()
126 smart_str_appendc(&buf, '='); in php_setcookie()
132 smart_str_append(&buf, value); in php_setcookie()
144 smart_str_free(&buf); in php_setcookie()
149 smart_str_append(&buf, dt); in php_setcookie()
164 smart_str_append(&buf, path); in php_setcookie()
181 ctr.line = ZSTR_VAL(buf.s); in php_setcookie()
[all …]
H A Dexec.c96 char *buf; in php_exec() local
126 b = buf; in php_exec()
132 bufl += b - buf; in php_exec()
134 buf = erealloc(buf, buflen); in php_exec()
135 b = buf + bufl; in php_exec()
141 bufl += b - buf; in php_exec()
155 buf[bufl] = '\0'; in php_exec()
159 b = buf; in php_exec()
175 buf[bufl] = '\0'; in php_exec()
190 PHPWRITE(buf, read); in php_exec()
[all …]
/PHP-7.4/ext/dba/libcdb/
H A Dcdb.c48 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.4/ext/fileinfo/libmagic/
H A Dascmagic.c64 while (nbytes > 1 && buf[nbytes - 1] == '\0') in trim_nuls()
134 nbytes = trim_nuls(buf, nbytes); in file_ascmagic_with_encoding()
344 unsigned char *end = buf + len; in encode_utf8()
348 if (end - buf < 1) in encode_utf8()
350 *buf++ = CAST(unsigned char, ubuf[i]); in encode_utf8()
352 if (end - buf < 2) in encode_utf8()
357 if (end - buf < 3) in encode_utf8()
363 if (end - buf < 4) in encode_utf8()
370 if (end - buf < 5) in encode_utf8()
378 if (end - buf < 6) in encode_utf8()
[all …]
H A Dencoding.c267 ubuf[(*ulen)++] = buf[i]; in looks_ascii()
286 ubuf[(*ulen)++] = buf[i]; in looks_latin1()
352 c = buf[i] & 0x1f; in file_looks_utf8()
355 c = buf[i] & 0x0f; in file_looks_utf8()
358 c = buf[i] & 0x07; in file_looks_utf8()
361 c = buf[i] & 0x03; in file_looks_utf8()
364 c = buf[i] & 0x01; in file_looks_utf8()
374 if ((buf[i] & 0x80) == 0 || (buf[i] & 0x40)) in file_looks_utf8()
398 if (nbytes > 3 && buf[0] == 0xef && buf[1] == 0xbb && buf[2] == 0xbf) in looks_utf8_with_BOM()
407 if (nbytes > 4 && buf[0] == '+' && buf[1] == '/' && buf[2] == 'v') in looks_utf7()
[all …]
H A Dfuncs.c68 spprintf(&newstr, 0, "%s%s", ms->o.buf, (buf ? buf : "")); in file_printf()
69 if (buf) { in file_printf()
70 efree(buf); in file_printf()
75 ms->o.buf = buf; in file_printf()
103 file_printf(ms, "%s (%s)", (*buf ? buf : ""), strerror(error)); in file_error_core()
108 if (buf) { in file_error_core()
109 efree(buf); in file_error_core()
517 return ms->o.buf == NULL ? 0 : strlen(ms->o.buf); in file_printedlen()
568 pb->buf = ms->o.buf; in file_push_buffer()
590 ms->o.buf = pb->buf; in file_pop_buffer()
[all …]
H A Dcompress.c103 if ((buf[0] & 0xf) != 8 || (buf[0] & 0x80) != 0) in zlibcmp()
106 x = buf[0] | (buf[1] << 8); in zlibcmp()
108 x = buf[1] | (buf[0] << 8); in zlibcmp()
341 buf = CAST(const char *, buf) + rv; in swrite()
410 buf = CAST(char *, CCAST(void *, buf)) + rv; in sread()
421 char buf[4096]; in file_pipe2file() local
425 (void)strlcpy(buf, "/tmp/file.XXXXXX", sizeof buf); in file_pipe2file()
453 while ((r = sread(fd, buf, sizeof(buf), 1)) > 0) in file_pipe2file()
583 *buf = NULL; in makeerror()
651 char *buf; in filter_error() local
[all …]
/PHP-7.4/ext/session/
H A Dmod_files.c127 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()
289 char buf[MAXPATHLEN]; in ps_files_cleanup_dir() local
347 if (!key || !ps_files_path_create(buf, sizeof(buf), data, key)) { in ps_files_key_exists()
513 buf = read_in > -1 ? buf + read_in : 0; in PS_READ_FUNC()
576 if (!ps_files_path_create(buf, sizeof(buf), data, ZSTR_VAL(key))) { in PS_UPDATE_TIMESTAMP_FUNC()
[all …]
/PHP-7.4/main/
H A Dreentrancy.c61 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()
143 strcpy(buf, tmp); in php_ctime_r()
144 tmp = buf; in php_ctime_r()
164 strcpy(buf, tmp); in php_asctime_r()
[all …]
/PHP-7.4/ext/mysqlnd/
H A Dmysqlnd_connection.h47 #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.4/ext/opcache/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()
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.4/sapi/fpm/fpm/
H A Dzlog.c237 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 Dfpm_php_trace.c47 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.4/sapi/phpdbg/
H A Dphpdbg_io.c67 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 Dphpdbg_rinit_hook.c60 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.4/ext/filter/
H A Dsanitizing_filters.c114 zend_string *buf; in php_filter_strip() local
134 ZSTR_VAL(buf)[c] = '\0'; in php_filter_strip() local
135 ZSTR_LEN(buf) = c; in php_filter_strip()
161 zend_string *buf; in filter_map_apply() local
173 ZSTR_VAL(buf)[c] = '\0'; in filter_map_apply() local
174 ZSTR_LEN(buf) = c; in filter_map_apply()
258 zend_string *buf; in php_filter_full_special_chars() local
268 ZVAL_STR(value, buf); in php_filter_full_special_chars()
375 ZVAL_STR(value, buf); in php_filter_add_slashes()
382 zend_string *buf; in php_filter_magic_quotes() local
[all …]

Completed in 83 milliseconds

12345678910>>...13