/PHP-7.0/ext/json/ |
H A D | json_encoder.c | 78 smart_str_appendc(buf, c); in php_json_pretty_print_char() 138 smart_str_appendc(buf, '['); in php_json_encode_array() 140 smart_str_appendc(buf, '{'); in php_json_encode_array() 162 smart_str_appendc(buf, ','); in php_json_encode_array() 234 smart_str_appendc(buf, ']'); in php_json_encode_array() 236 smart_str_appendc(buf, '}'); in php_json_encode_array() 316 checkpoint = buf->s ? ZSTR_LEN(buf->s) : 0; in php_json_escape_string() 319 smart_str_alloc(buf, len+2, 0); in php_json_escape_string() 320 smart_str_appendc(buf, '"'); in php_json_escape_string() 328 if (buf->s) { in php_json_escape_string() [all …]
|
/PHP-7.0/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 | 136 unsigned char buf[16]; in gdImageCreateFromGifCtx() local 179 screen_width = imw = LM_to_uint(buf[0],buf[1]); in gdImageCreateFromGifCtx() 180 screen_height = imh = LM_to_uint(buf[2],buf[3]); in gdImageCreateFromGifCtx() 221 left = LM_to_uint(buf[0], buf[1]); in gdImageCreateFromGifCtx() 222 top = LM_to_uint(buf[2], buf[3]); in gdImageCreateFromGifCtx() 223 width = LM_to_uint(buf[4], buf[5]); in gdImageCreateFromGifCtx() 224 height = LM_to_uint(buf[6], buf[7]); in gdImageCreateFromGifCtx() 305 unsigned char buf[256]; in DoExtension() local 314 Gif89.delayTime = LM_to_uint(buf[1],buf[2]); in DoExtension() 395 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.0/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.0/ext/standard/ |
H A D | var.c | 556 smart_str buf = {0}; in php_var_export() local 558 smart_str_0(&buf); in php_var_export() 559 PHPWRITE(ZSTR_VAL(buf.s), ZSTR_LEN(buf.s)); in php_var_export() 560 smart_str_free(&buf); in php_var_export() 570 smart_str buf = {0}; in PHP_FUNCTION() local 577 smart_str_0 (&buf); in PHP_FUNCTION() 582 PHPWRITE(ZSTR_VAL(buf.s), ZSTR_LEN(buf.s)); in PHP_FUNCTION() 1001 smart_str_0(buf); in php_var_serialize() 1011 smart_str buf = {0}; in PHP_FUNCTION() local 1026 if (buf.s) { in PHP_FUNCTION() [all …]
|
H A D | exec.c | 96 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() 168 buf[bufl] = '\0'; in php_exec() 182 PHPWRITE(buf, bufl); in php_exec() [all …]
|
/PHP-7.0/ext/fileinfo/libmagic/ |
H A D | ascmagic.c | 85 nbytes = trim_nuls(buf, nbytes); in file_ascmagic() 129 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 | 322 c = buf[i] & 0x1f; in file_looks_utf8() 325 c = buf[i] & 0x0f; in file_looks_utf8() 328 c = buf[i] & 0x07; in file_looks_utf8() 331 c = buf[i] & 0x03; in file_looks_utf8() 334 c = buf[i] & 0x01; in file_looks_utf8() 344 if ((buf[i] & 0x80) == 0 || (buf[i] & 0x40)) in file_looks_utf8() 368 if (nbytes > 3 && buf[0] == 0xef && buf[1] == 0xbb && buf[2] == 0xbf) in looks_utf8_with_BOM() 384 if (buf[0] == 0xff && buf[1] == 0xfe) in looks_ucs16() 386 else if (buf[0] == 0xfe && buf[1] == 0xff) in looks_ucs16() 397 ubuf[(*ulen)++] = buf[i + 1] + 256 * buf[i]; in looks_ucs16() [all …]
|
H A D | funcs.c | 73 len = spprintf(&newstr, 0, "%s%s", ms->o.buf, (buf ? buf : "")); in file_printf() 74 if (buf) { in file_printf() 75 efree(buf); in file_printf() 80 ms->o.buf = buf; in file_printf() 108 file_printf(ms, "%s (%s)", (*buf ? buf : ""), strerror(error)); in file_error_core() 113 if (buf) { in file_error_core() 114 efree(buf); in file_error_core() 426 return ms->o.buf == NULL ? 0 : strlen(ms->o.buf); in file_printedlen() 480 pb->buf = ms->o.buf; in file_push_buffer() 502 ms->o.buf = pb->buf; in file_pop_buffer() [all …]
|
/PHP-7.0/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.0/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 213 *buf = file_handle->handle.stream.mmap.buf; 246 file_handle->handle.stream.mmap.buf = *buf; 266 *buf = safe_erealloc(*buf, size, 2, 0); 273 *buf = safe_erealloc(*buf, size, 1, ZEND_MMAP_AHEAD); 275 file_handle->handle.stream.mmap.buf = *buf; 279 *buf = erealloc(*buf, ZEND_MMAP_AHEAD); 280 file_handle->handle.stream.mmap.buf = *buf; [all …]
|
/PHP-7.0/sapi/fpm/fpm/ |
H A D | zlog.c | 105 char buf[MAX_LINE_LENGTH]; in vzlog() local 114 len = vsnprintf(buf, buf_size, fmt, ap); in vzlog() 120 external_logger(flags & ZLOG_LEVEL_MASK, buf, len); in vzlog() 122 memset(buf, '\0', buf_size); in vzlog() 143 len = zlog_print_time(&tv, buf, buf_size); in vzlog() 161 len += vsnprintf(buf + len, buf_size - len, fmt, args); in vzlog() 183 buf[len] = '\0'; in vzlog() 184 php_syslog(syslog_priorities[zlog_level], "%s", buf); in vzlog() 185 buf[len++] = '\n'; in vzlog() 189 buf[len++] = '\n'; in vzlog() [all …]
|
H A D | fpm_php_trace.c | 49 char buf[buf_size]; in fpm_php_trace_dump() local 56 zlog_print_time(&tv, buf, buf_size); in fpm_php_trace_dump() 58 fprintf(slowlog, "\n%s [pool %s] pid %d\n", buf, child->wp->config->name, (int) pid); in fpm_php_trace_dump() 66 if (0 > fpm_trace_get_strz(buf, buf_size, path_translated)) { in fpm_php_trace_dump() 70 fprintf(slowlog, "script_filename = %s\n", buf); in fpm_php_trace_dump() 107 memcpy(buf, "[INCLUDE_OR_EVAL]", sizeof("[INCLUDE_OR_EVAL]")); in fpm_php_trace_dump() 118 memcpy(buf, "???", sizeof("???")); in fpm_php_trace_dump() 123 fprintf(slowlog, "%s()", buf); in fpm_php_trace_dump() 125 *buf = '\0'; in fpm_php_trace_dump() 158 if (0 > fpm_trace_get_strz(buf, buf_size, file_name + offsetof(zend_string, val))) { in fpm_php_trace_dump() [all …]
|
/PHP-7.0/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.0/ext/mbstring/oniguruma/ |
H A D | regint.h | 357 (buf)->p = (UChar* )xrealloc((buf)->p, (buf)->alloc);\ 363 (buf)->p = (UChar* )xrealloc((buf)->p, (buf)->alloc);\ 371 (buf)->p = (UChar* )xrealloc((buf)->p, new_alloc);\ 391 #define BBUF_ADD(buf,bytes,n) BBUF_WRITE((buf),(buf)->used,(bytes),(n)) argument 392 #define BBUF_ADD1(buf,byte) BBUF_WRITE1((buf),(buf)->used,(byte)) argument 393 #define BBUF_GET_ADD_ADDRESS(buf) ((buf)->p + (buf)->used) argument 394 #define BBUF_GET_OFFSET_POS(buf) ((buf)->used) argument 399 xmemmove((buf)->p + (to), (buf)->p + (from), (n));\ 405 xmemmove((buf)->p + (to), (buf)->p + (from), (n));\ 410 xmemmove((buf)->p + (to), (buf)->p + (from), (buf)->used - (from));\ [all …]
|
/PHP-7.0/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.0/sapi/phpdbg/ |
H A D | phpdbg_io.c | 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() 208 if (*buf == 'q') { 303 char buf[128]; local 308 zend_quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, buf, strlen(buf)); 313 char buf[256]; local 318 zend_quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, buf, strlen(buf)); 328 char buf[128]; local 332 buf[wrote] = '\0'; [all …]
|
/PHP-7.0/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.0/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.0/ext/xmlrpc/libxmlrpc/ |
H A D | xml_to_soap.c | 92 char buf[128], *p; in parse_array_type_info() local 93 snprintf(buf, sizeof(buf), "%s", array_type); in parse_array_type_info() 94 p = strchr(buf, '['); in parse_array_type_info() 367 XMLRPC_SetValueBase64(xCurrent, buf.data, buf.offset); in xml_element_to_SOAP_REQUEST_worker() 368 buffer_delete(&buf); in xml_element_to_SOAP_REQUEST_worker() 439 char buf[BUF_SIZE]; in SOAP_to_xml_element_worker() local 459 snprintf(buf, sizeof(buf), "%s[%i]", type, XMLRPC_VectorSize(node)); in SOAP_to_xml_element_worker() 533 simplestring_addn(&elem_val->text, buf.data, buf.offset ); in SOAP_to_xml_element_worker() 534 buffer_delete(&buf); in SOAP_to_xml_element_worker() 630 char buf[128]; in SOAP_REQUEST_to_xml_element() local [all …]
|
/PHP-7.0/win32/ |
H A D | winutil.c | 27 char *buf = NULL; in php_win32_error_to_msg() local 31 NULL, error, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR)&buf, 0, NULL in php_win32_error_to_msg() 34 return (buf ? (char *) buf : ""); in php_win32_error_to_msg() 80 PHPAPI int php_win32_get_random_bytes(unsigned char *buf, size_t size) { /* {{{ */ in php_win32_get_random_bytes() argument 116 ret = CryptGenRandom(hCryptProv, (DWORD)size, buf); in php_win32_get_random_bytes()
|
/PHP-7.0/ext/dba/ |
H A D | dba_cdb.c | 140 # define php_cdb_read(cdb, buf, len, pos) cdb_read(cdb, buf, len, pos) argument 144 # define php_cdb_read(cdb, buf, len, pos) cdb_read(cdb, buf, len, pos) argument 215 # define cdb_file_read(fildes, buf, size) php_stream_read(fildes, buf, size) argument 217 # define cdb_file_read(fildes, buf, size) read(fildes, buf, size) argument 249 char buf[8]; in DBA_FIRSTKEY_FUNC() local 262 uint32_unpack(buf, &cdb->eod); in DBA_FIRSTKEY_FUNC() 268 uint32_unpack(buf, &klen); in DBA_FIRSTKEY_FUNC() 269 uint32_unpack(buf + 4, &dlen); in DBA_FIRSTKEY_FUNC() 290 char buf[8]; in DBA_NEXTKEY_FUNC() local 300 uint32_unpack(buf, &klen); in DBA_NEXTKEY_FUNC() [all …]
|
/PHP-7.0/ext/filter/ |
H A D | sanitizing_filters.c | 115 zend_string *buf; in php_filter_strip() local 135 ZSTR_VAL(buf)[c] = '\0'; in php_filter_strip() local 136 ZSTR_LEN(buf) = c; in php_filter_strip() 138 ZVAL_NEW_STR(value, buf); in php_filter_strip() 162 zend_string *buf; in filter_map_apply() local 174 ZSTR_VAL(buf)[c] = '\0'; in filter_map_apply() local 175 ZSTR_LEN(buf) = c; in filter_map_apply() 259 zend_string *buf; in php_filter_full_special_chars() local 269 ZVAL_STR(value, buf); in php_filter_full_special_chars() 373 zend_string *buf; in php_filter_magic_quotes() local [all …]
|
/PHP-7.0/ext/ftp/tests/ |
H A D | server.inc | 65 var_dump($buf); 101 $buf = fread($s, 2048); 110 dump_and_exit($buf); 127 dump_and_exit($buf); 131 $buf = fread($s, 2048); 135 dump_and_exit($buf); 148 dump_and_exit($buf); 165 dump_and_exit($buf); 179 user_auth($buf); 318 user_auth($buf); [all …]
|