Home
last modified time | relevance | path

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

12345678910>>...13

/PHP-8.0/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-8.0/ext/json/
H A Djson_encoder.c73 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()
245 smart_str_appendc(buf, ']'); in php_json_encode_array()
247 smart_str_appendc(buf, '}'); in php_json_encode_array()
285 checkpoint = buf->s ? ZSTR_LEN(buf->s) : 0; in php_json_escape_string()
289 smart_str_appendc(buf, '"'); in php_json_escape_string()
[all …]
/PHP-8.0/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-8.0/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-8.0/ext/standard/
H A Dvar.c602 smart_str buf = {0}; in php_var_export() local
604 smart_str_0(&buf); in php_var_export()
605 PHPWRITE(ZSTR_VAL(buf.s), ZSTR_LEN(buf.s)); in php_var_export()
606 smart_str_free(&buf); in php_var_export()
615 smart_str buf = {0}; in PHP_FUNCTION() local
624 smart_str_0 (&buf); in PHP_FUNCTION()
629 PHPWRITE(ZSTR_VAL(buf.s), ZSTR_LEN(buf.s)); in PHP_FUNCTION()
1113 smart_str_0(buf); in php_var_serialize()
1151 smart_str buf = {0}; in PHP_FUNCTION() local
1166 if (buf.s) { in PHP_FUNCTION()
[all …]
H A Dhead.c87 smart_str buf = {0}; in php_setcookie() local
123 smart_str_append(&buf, name); in php_setcookie()
125 smart_str_append(&buf, dt); in php_setcookie()
130 smart_str_append(&buf, name); in php_setcookie()
131 smart_str_appendc(&buf, '='); in php_setcookie()
137 smart_str_append(&buf, value); in php_setcookie()
149 smart_str_free(&buf); in php_setcookie()
155 smart_str_append(&buf, dt); in php_setcookie()
170 smart_str_append(&buf, path); in php_setcookie()
187 ctr.line = ZSTR_VAL(buf.s); in php_setcookie()
[all …]
H A Dexec.c89 buf[bufl] = '\0'; in strip_trailing_whitespace()
96 PHPWRITE(buf, bufl); in handle_line()
117 char *buf; in php_exec() local
146 b = buf; in php_exec()
152 bufl += b - buf; in php_exec()
154 buf = erealloc(buf, buflen); in php_exec()
155 b = buf + bufl; in php_exec()
161 bufl += b - buf; in php_exec()
165 b = buf; in php_exec()
168 if (buf != b) { in php_exec()
[all …]
/PHP-8.0/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-8.0/ext/fileinfo/libmagic/
H A Dascmagic.c63 while (nbytes > 1 && buf[nbytes - 1] == '\0') in trim_nuls()
132 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()
349 if (end - buf < 2) in encode_utf8()
354 if (end - buf < 3) in encode_utf8()
360 if (end - buf < 4) in encode_utf8()
367 if (end - buf < 5) in encode_utf8()
375 if (end - buf < 6) in encode_utf8()
[all …]
H A Dencoding.c266 ubuf[(*ulen)++] = buf[i]; in looks_ascii()
285 ubuf[(*ulen)++] = buf[i]; in looks_latin1()
351 c = buf[i] & 0x1f; in file_looks_utf8()
354 c = buf[i] & 0x0f; in file_looks_utf8()
357 c = buf[i] & 0x07; in file_looks_utf8()
360 c = buf[i] & 0x03; in file_looks_utf8()
363 c = buf[i] & 0x01; in file_looks_utf8()
373 if ((buf[i] & 0x80) == 0 || (buf[i] & 0x40)) in file_looks_utf8()
397 if (nbytes > 3 && buf[0] == 0xef && buf[1] == 0xbb && buf[2] == 0xbf) in looks_utf8_with_BOM()
406 if (nbytes > 4 && buf[0] == '+' && buf[1] == '/' && buf[2] == 'v') in looks_utf7()
[all …]
H A Dfuncs.c64 return buf; in file_copystr()
140 spprintf(&newstr, 0, "%s%s", ms->o.buf, (buf ? buf : "")); in file_printf()
141 if (buf) { in file_printf()
142 efree(buf); in file_printf()
147 ms->o.buf = buf; in file_printf()
180 if (buf) { in file_error_core()
181 efree(buf); in file_error_core()
601 return ms->o.buf == NULL ? 0 : strlen(ms->o.buf); in file_printedlen()
652 pb->buf = ms->o.buf; in file_push_buffer()
676 ms->o.buf = pb->buf; in file_pop_buffer()
[all …]
H A Dcompress.c110 if ((buf[0] & 0xf) != 8 || (buf[0] & 0x80) != 0) in zlibcmp()
113 x = buf[0] | (buf[1] << 8); in zlibcmp()
115 x = buf[1] | (buf[0] << 8); in zlibcmp()
127 if (buf[0] != 0x5d || buf[1] || buf[2]) in lzmacmp()
129 if (buf[12] && buf[12] != 0xff) in lzmacmp()
371 buf = CAST(const char *, buf) + rv; in swrite()
440 buf = CAST(char *, CCAST(void *, buf)) + rv; in sread()
455 (void)strlcpy(buf, "/tmp/file.XXXXXX", sizeof buf); in file_pipe2file()
484 while ((r = sread(fd, buf, sizeof(buf), 1)) > 0) in file_pipe2file()
766 char *buf; in filter_error() local
[all …]
/PHP-8.0/main/
H A Dreentrancy.c59 if (ctime_r(clock, buf) == buf) in php_ctime_r()
60 return (buf); in php_ctime_r()
66 if (asctime_r(tm, buf) == buf) in php_asctime_r()
67 return (buf); in php_asctime_r()
90 return (buf); in php_ctime_r()
96 if (asctime_r(tm, buf, 26) != -1) in php_asctime_r()
97 return (buf); in php_asctime_r()
141 strcpy(buf, tmp); in php_ctime_r()
142 tmp = buf; in php_ctime_r()
162 strcpy(buf, tmp); in php_asctime_r()
[all …]
/PHP-8.0/ext/session/
H A Dmod_files.c125 buf[n++] = *p++; in ps_files_path_create()
132 buf[n] = '\0'; in ps_files_path_create()
134 return buf; in ps_files_path_create()
156 char buf[MAXPATHLEN]; in ps_files_open() local
175 if (!ps_files_path_create(buf, sizeof(buf), data, key)) { in ps_files_open()
260 buf = wrote > -1 ? buf + wrote : 0; in ps_files_write()
287 char buf[MAXPATHLEN]; in ps_files_cleanup_dir() local
345 if (!key || !ps_files_path_create(buf, sizeof(buf), data, key)) { in ps_files_key_exists()
511 buf = read_in > -1 ? buf + read_in : 0; in PS_READ_FUNC()
574 if (!ps_files_path_create(buf, sizeof(buf), data, ZSTR_VAL(key))) { in PS_UPDATE_TIMESTAMP_FUNC()
[all …]
/PHP-8.0/ext/mysqlnd/
H A Dmysqlnd_connection.h45 #define SET_NEW_MESSAGE(buf, buf_len, message, len) \ argument
47 if ((buf)) { \
48 mnd_efree((buf)); \
51 (buf) = mnd_pestrndup((message), (len), 0); \
53 (buf) = NULL; \
58 #define SET_EMPTY_MESSAGE(buf, buf_len) \ argument
60 if ((buf)) { \
61 mnd_efree((buf)); \
62 (buf) = NULL; \
/PHP-8.0/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-8.0/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.c43 char buf[buf_size]; in fpm_php_trace_dump() local
50 zlog_print_time(&tv, buf, buf_size); in fpm_php_trace_dump()
52 fprintf(slowlog, "\n%s [pool %s] pid %d\n", buf, child->wp->config->name, (int) pid); in fpm_php_trace_dump()
60 if (0 > fpm_trace_get_strz(buf, buf_size, path_translated)) { in fpm_php_trace_dump()
64 fprintf(slowlog, "script_filename = %s\n", buf); in fpm_php_trace_dump()
101 memcpy(buf, "[INCLUDE_OR_EVAL]", sizeof("[INCLUDE_OR_EVAL]")); in fpm_php_trace_dump()
112 memcpy(buf, "???", sizeof("???")); in fpm_php_trace_dump()
117 fprintf(slowlog, "%s()", buf); in fpm_php_trace_dump()
119 *buf = '\0'; in fpm_php_trace_dump()
152 if (0 > fpm_trace_get_strz(buf, buf_size, file_name + offsetof(zend_string, val))) { in fpm_php_trace_dump()
[all …]
/PHP-8.0/sapi/phpdbg/
H A Dphpdbg_rinit_hook.c58 char buf[(1 << 8) + 1]; in PHP_RINIT_FUNCTION() local
71 buf[0] = (msglen >> 0) & 0xff; in PHP_RINIT_FUNCTION()
72 buf[1] = (msglen >> 8) & 0xff; in PHP_RINIT_FUNCTION()
73 buf[2] = (msglen >> 16) & 0xff; in PHP_RINIT_FUNCTION()
74 buf[3] = (msglen >> 24) & 0xff; in PHP_RINIT_FUNCTION()
75 send(s, buf, 4, 0); in PHP_RINIT_FUNCTION()
78 while ((buflen = recv(s, buf, sizeof(buf) - 1, 0)) > 0) { in PHP_RINIT_FUNCTION()
79 php_write(buf, buflen); in PHP_RINIT_FUNCTION()
H A Dphpdbg_io.c65 if (buf[i] == '\x03') { in ZEND_EXTERN_MODULE_GLOBALS()
67 memmove(buf + i, buf + i + 1, len + bytes - i - 1); in ZEND_EXTERN_MODULE_GLOBALS()
73 if (buf[i] == '\n') { in ZEND_EXTERN_MODULE_GLOBALS()
79 buf[i + 1] = 0; in ZEND_EXTERN_MODULE_GLOBALS()
203 char buf[PHPDBG_MAX_CMD]; local
206 if (*buf == 'q') {
301 char buf[128]; local
303 snprintf(buf, sizeof(buf), "Could not translate address '%s'", addr);
305 zend_quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, buf, strlen(buf));
310 char buf[256]; local
[all …]
/PHP-8.0/win32/
H A Dioutil.c491 if (!buf) { in php_win32_ioutil_getcwd_w()
507 buf = tmp_buf; in php_win32_ioutil_getcwd_w()
517 return (wchar_t *)buf; in php_win32_ioutil_getcwd_w()
637 *buf = tmp; in php_win32_ioutil_normalize_path_w()
874 buf->st_dev = _buf.st_dev; in php_win32_ioutil_fstat_int()
875 buf->st_ino = _buf.st_ino; in php_win32_ioutil_fstat_int()
878 buf->st_uid = _buf.st_uid; in php_win32_ioutil_fstat_int()
918 buf->st_rdev = buf->st_uid = buf->st_gid = 0; in php_win32_ioutil_fstat_int()
922 buf->st_mode = 0; in php_win32_ioutil_fstat_int()
1004 buf->st_mode = S_IFLNK; in php_win32_ioutil_stat_ex_w()
[all …]

Completed in 57 milliseconds

12345678910>>...13