Home
last modified time | relevance | path

Searched refs:buf (Results 76 – 100 of 355) sorted by relevance

12345678910>>...15

/php-src/Zend/
H A Dzend_smart_str.h145 char buf[32]; in smart_str_append_long_ex() local
146 char *result = zend_print_long_to_buf(buf + sizeof(buf) - 1, num); in smart_str_append_long_ex()
147 smart_str_appendl_ex(dest, result, buf + sizeof(buf) - 1 - result, persistent); in smart_str_append_long_ex()
156 char buf[32]; in smart_str_append_unsigned_ex() local
157 char *result = zend_print_ulong_to_buf(buf + sizeof(buf) - 1, num); in smart_str_append_unsigned_ex()
158 smart_str_appendl_ex(dest, result, buf + sizeof(buf) - 1 - result, persistent); in smart_str_append_unsigned_ex()
/php-src/ext/standard/
H A Dhtml.c402 buf[0] = k; in php_utf32_utf8()
681 (*buf)++; in process_numeric_entity()
692 *buf = endptr; in process_numeric_entity()
712 *start = *buf; in process_named_entity_html()
719 while ((**buf >= 'a' && **buf <= 'z') || in process_named_entity_html()
720 (**buf >= 'A' && **buf <= 'Z') || in process_named_entity_html()
721 (**buf >= '0' && **buf <= '9')) { in process_named_entity_html()
722 (*buf)++; in process_named_entity_html()
774 *buf = code; in write_octet_sequence()
790 *buf = code; in write_octet_sequence()
[all …]
H A Dinfo.c68 char *buf; in php_info_printf() local
73 len = vspprintf(&buf, 0, fmt, argv); in php_info_printf()
77 efree(buf); in php_info_printf()
728 struct utsname buf; in php_get_uname() local
733 php_uname = buf.sysname; in php_get_uname()
735 php_uname = buf.release; in php_get_uname()
737 php_uname = buf.nodename; in php_get_uname()
739 php_uname = buf.version; in php_get_uname()
741 php_uname = buf.machine; in php_get_uname()
744 buf.sysname, buf.nodename, buf.release, buf.version, in php_get_uname()
[all …]
H A Dcrc32.c135 char buf[1024]; in php_crc32_stream_bulk_update() local
139 n = (n < sizeof(buf)) ? n : sizeof(buf); /* tweak to buf size */ in php_crc32_stream_bulk_update()
141 n = php_stream_read(fp, buf, n); in php_crc32_stream_bulk_update()
143 *crc = php_crc32_bulk_update(*crc, buf, n); in php_crc32_stream_bulk_update()
H A Dscanf.c924 buf[0] = '\0'; in php_sscanf_internal()
927 width = sizeof(buf) - 1; in php_sscanf_internal()
931 for (end = buf; width > 0; width--) { in php_sscanf_internal()
992 if ((flags & SCAN_XOK) && (end == buf+1)) { in php_sscanf_internal()
1036 value = (zend_long) (*fn)(buf, NULL, base); in php_sscanf_internal()
1038 snprintf(buf, sizeof(buf), ZEND_ULONG_FMT, value); /* INTL: ISO digit */ in php_sscanf_internal()
1044 ZEND_TRY_ASSIGN_REF_STRING(current, buf); in php_sscanf_internal()
1065 buf[0] = '\0'; /* call me pedantic */ in php_sscanf_internal()
1067 width = sizeof(buf) - 1; in php_sscanf_internal()
1070 for (end = buf; width > 0; width--) { in php_sscanf_internal()
[all …]
/php-src/sapi/phpdbg/
H A Dphpdbg_list.c154 char *buffer = data->buf + linestart; in phpdbg_list_file()
247 data.buf = estrndup(bufptr, len); in phpdbg_compile_file()
252 efree(data.buf); in phpdbg_compile_file()
256 data.buf[data.len] = '\0'; in phpdbg_compile_file()
260 for (line = 0, bufptr = data.buf - 1, endptr = data.buf + data.len; ++bufptr < endptr;) { in phpdbg_compile_file()
262 dataptr->line[++line] = (uint32_t)(bufptr - data.buf) + 1; in phpdbg_compile_file()
268 dataptr->line[line] = endptr - data.buf; in phpdbg_compile_file()
327 …for (line = 0, bufptr = dataptr->buf - 1, endptr = dataptr->buf + dataptr->len; ++bufptr < endptr;… in phpdbg_compile_string()
329 dataptr->line[++line] = (uint32_t)(bufptr - dataptr->buf) + 1; in phpdbg_compile_string()
333 dataptr->line[line] = endptr - dataptr->buf; in phpdbg_compile_string()
[all …]
/php-src/sapi/fpm/fpm/
H A Dfpm_stdio.c172 char buf[1024]; local
218 in_buf = read(fd, buf, sizeof(buf) - 1);
229 !memcmp(buf, &FPM_STDIO_CMD_FLUSH[cmd_pos], sizeof(FPM_STDIO_CMD_FLUSH) - cmd_pos)) {
238 switch (buf[pos]) {
240 zlog_stream_str(log_stream, buf + start, pos - start);
246 if (!memcmp(buf + pos, FPM_STDIO_CMD_FLUSH, sizeof(FPM_STDIO_CMD_FLUSH))) {
247 zlog_stream_str(log_stream, buf + start, pos - start);
252 } else if (!memcmp(buf + pos, FPM_STDIO_CMD_FLUSH, in_buf - pos)) {
254 zlog_stream_str(log_stream, buf + start, pos - start);
261 zlog_stream_str(log_stream, buf + start, pos - start);
/php-src/main/
H A Dphp_memory_streams.h38 …p_stream_temp_open(mode, max_memory_usage, buf, length) _php_stream_temp_open((mode), (max_memory_… argument
43 PHPAPI php_stream *_php_stream_memory_open(int mode, zend_string *buf STREAMS_DC);
48 PHPAPI php_stream *_php_stream_temp_open(int mode, size_t max_memory_usage, const char *buf, size_t…
H A Dspprintf.h25 PHPAPI void php_printf_to_smart_string(smart_string *buf, const char *format, va_list ap);
26 PHPAPI void php_printf_to_smart_str(smart_str *buf, const char *format, va_list ap);
H A Dexplicit_bzero.c40 volatile unsigned char *buf = (volatile unsigned char *)dst; in php_explicit_bzero()
43 buf[i] = 0; in php_explicit_bzero()
/php-src/ext/dom/lexbor/lexbor/core/
H A Dconv.h19 lexbor_conv_float_to_data(double num, lxb_char_t *buf, size_t len);
22 lexbor_conv_long_to_data(long num, lxb_char_t *buf, size_t len);
25 lexbor_conv_int64_to_data(int64_t num, lxb_char_t *buf, size_t len);
/php-src/ext/fileinfo/libmagic/
H A Dreadcdf.c141 char buf[64]; in cdf_file_property_info() local
153 cdf_print_property_name(buf, sizeof(buf), info[i].pi_id); in cdf_file_property_info()
163 if (NOTMIME(ms) && file_printf(ms, ", %s: %d", buf, in cdf_file_property_info()
168 if (NOTMIME(ms) && file_printf(ms, ", %s: %u", buf, in cdf_file_property_info()
173 if (NOTMIME(ms) && file_printf(ms, ", %s: %g", buf, in cdf_file_property_info()
206 buf, vbuf) == -1) in cdf_file_property_info()
223 ", %s: %s", buf, tbuf) == -1) in cdf_file_property_info()
234 ", %s: %s", buf, c) == -1) in cdf_file_property_info()
260 char buf[256]; in cdf_file_catalog() local
353 return buf; in format_clsid()
[all …]
H A Dmagic.c199 unsigned char *buf; in file_or_stream() local
212 if ((buf = CAST(unsigned char *, emalloc(ms->bytes_max + SLOP))) == NULL) in file_or_stream()
251 if ((nbytes = php_stream_read(stream, (char *)buf, ms->bytes_max - nbytes)) < 0) { in file_or_stream()
256 (void)memset(buf + nbytes, 0, SLOP); /* NUL terminate */ in file_or_stream()
257 if (file_buffer(ms, stream, &sb, inname, buf, CAST(size_t, nbytes)) == -1) in file_or_stream()
261 efree(buf); in file_or_stream()
272 magic_buffer(struct magic_set *ms, const void *buf, size_t nb) in magic_buffer() argument
282 if (file_buffer(ms, NULL, NULL, NULL, buf, nb) == -1) { in magic_buffer()
294 return (ms->event_flags & EVENT_HAD_ERR) ? ms->o.buf : NULL; in magic_error()
H A Dis_tar.c65 const unsigned char *buf = CAST(const unsigned char *, b->fbuf); in file_is_tar() local
77 tar = is_tar(buf, nbytes); in file_is_tar()
99 is_tar(const unsigned char *buf, size_t nbytes) in is_tar() argument
104 RCAST(const void *, buf)); in is_tar()
/php-src/ext/mysqlnd/
H A Dmysqlnd_loaddata.c65 int mysqlnd_local_infile_read(void * ptr, zend_uchar * buf, unsigned int buf_len) in mysqlnd_local_infile_read() argument
72 count = (int) php_stream_read(info->fd, (char *) buf, buf_len); in mysqlnd_local_infile_read()
142 zend_uchar *buf = NULL; in mysqlnd_handle_local_infile() local
205 buf = (zend_uchar *) mnd_ecalloc(1, buflen); in mysqlnd_handle_local_infile()
223 …while ((bufsize = infile.local_infile_read (info, buf + MYSQLND_HEADER_SIZE, buflen - MYSQLND_HEAD… in mysqlnd_handle_local_infile()
224 if ((ret = net->data->m.send(net, vio, buf, bufsize, conn->stats, conn->error_info)) == 0) { in mysqlnd_handle_local_infile()
262 if (buf) { in mysqlnd_handle_local_infile()
263 mnd_efree(buf); in mysqlnd_handle_local_infile()
H A Dmysqlnd_wireprotocol.c202 const zend_uchar *p = buf; in php_mysqlnd_read_error_from_line()
335 const zend_uchar * p = buf; in php_mysqlnd_greet_read()
1365 zend_uchar *buf = NULL; in php_mysqlnd_read_row_ex() local
1367 buf = erealloc(buf, *data_size + header.size); in php_mysqlnd_read_row_ex()
1368 p = buf + *data_size; in php_mysqlnd_read_row_ex()
1375 efree(buf); in php_mysqlnd_read_row_ex()
1379 efree(buf); in php_mysqlnd_read_row_ex()
1385 if (buf) { in php_mysqlnd_read_row_ex()
1387 efree(buf); in php_mysqlnd_read_row_ex()
1768 zend_uchar *p = buf; in php_mysqlnd_prepare_read()
[all …]
/php-src/sapi/fuzzer/
H A Dfuzzer-mbstring.c28 mb_convert_buf buf; in convert_encoding() local
29 mb_convert_buf_init(&buf, Size, '?', MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR); in convert_encoding()
34 ToEncoding->from_wchar(wchar_buf, out_len, &buf, !Size); in convert_encoding()
37 *NumErrors = buf.errors; in convert_encoding()
38 zend_string *result = mb_convert_buf_result(&buf, ToEncoding); in convert_encoding()
/php-src/Zend/tests/
H A Dbug70805.phpt17 … unset($GLOBALS["a"]); // this will be called in gc_colloct_roots and put $a into gc roots buf
42 unset($a); // This one cannot be put into roots buf because it's full, thus gc_colloct_roots will b…
43 // but C::__destructor which is called in gc_colloct_roots will put $a into buf
44 // which will make $a be put into gc roots buf twice
/php-src/win32/
H A Dioutil.h263 PW32IO size_t php_win32_ioutil_dirname(char *buf, size_t len);
268 PW32IO wchar_t *php_win32_ioutil_getcwd_w(wchar_t *buf, size_t len);
518 if (!buf && !len) { in php_win32_ioutil_getcwd()
520 buf = tmp_bufa; in php_win32_ioutil_getcwd()
522 memmove(buf, tmp_bufa, tmp_bufa_len + 1); in php_win32_ioutil_getcwd()
526 return buf; in php_win32_ioutil_getcwd()
742 PW32IO int php_win32_ioutil_fstat(int fd, php_win32_ioutil_stat_t *buf);
755 ret = php_win32_ioutil_stat_ex_w(pathw, pathw_len, buf, lstat); in php_win32_ioutil_stat_ex()
761 #define php_win32_ioutil_stat(path, buf) php_win32_ioutil_stat_ex(path, buf, 0) argument
762 #define php_win32_ioutil_lstat(path, buf) php_win32_ioutil_stat_ex(path, buf, 1) argument
[all …]
/php-src/ext/mbstring/libmbfl/filters/
H A Dmbfilter_utf7.c507 uint32_t *out = buf, *limit = buf + bufsize; in mb_utf7_to_wchar()
619 return out - buf; in mb_utf7_to_wchar()
628 #define RESTORE_CONVERSION_STATE() base64 = (buf->state & 1); nbits = (buf->state >> 1) & 0x7; cach…
633 MB_CONVERT_BUF_LOAD(buf, out, limit); in mb_wchar_to_utf7()
639 MB_CONVERT_BUF_ENSURE(buf, out, limit, len); in mb_wchar_to_utf7()
664 MB_CONVERT_BUF_ENSURE(buf, out, limit, len); in mb_wchar_to_utf7()
674 MB_CONVERT_BUF_ENSURE(buf, out, limit, 7); in mb_wchar_to_utf7()
679 MB_CONVERT_BUF_ENSURE(buf, out, limit, 4); in mb_wchar_to_utf7()
695 buf->state = 0; in mb_wchar_to_utf7()
712 MB_CONVERT_BUF_ENSURE(buf, out, limit, 1); in mb_wchar_to_utf7()
[all …]
/php-src/ext/dom/
H A Dhtml5_serializer.h24 zend_result (*write_string)(void *application_data, const char *buf);
25 zend_result (*write_string_len)(void *application_data, const char *buf, size_t len);
/php-src/ext/gd/libgd/
H A Dgd_io_file.c77 static int filePutbuf (gdIOCtx * ctx, const void *buf, int size) in filePutbuf() argument
82 return fwrite(buf, 1, size, fctx->f); in filePutbuf()
86 static int fileGetbuf (gdIOCtx * ctx, void *buf, int size) in fileGetbuf() argument
91 return fread(buf, 1, size, fctx->f); in fileGetbuf()
/php-src/ext/ftp/
H A Dftp.c937 char *ptr = data->buf; in ftp_get()
985 char *ptr = data->buf; in ftp_send_stream_to_data_socket()
1014 ptr = data->buf; in ftp_send_stream_to_data_socket()
1480 char buf[256]; in my_send() local
1497 buf = (char*) buf + sent; in my_send()
1518 char buf[256]; in my_recv() local
1592 char buf[256]; in data_available() local
1615 char buf[256]; in data_writeable() local
1639 char buf[256]; in my_accept() local
1924 nread = SSL_read(ssl_handle, buf, sizeof(buf)); in ftp_ssl_shutdown()
[all …]
/php-src/ext/json/
H A Dphp_json_encoder.h36 zend_result php_json_encode_zval(smart_str *buf, zval *val, int options, php_json_encoder *encoder);
38 zend_result php_json_escape_string(smart_str *buf, const char *s, size_t len, int options, php_json…
/php-src/ext/mbstring/
H A Dmbstring.c2623 MB_CONVERT_BUF_ENSURE((&buf), buf.out, buf.limit, ZSTR_LEN(marker)); in mb_trim_string()
6222 buf.out = mb_convert_buf_add(buf.out, ' '); in mb_mime_header_encode()
6226 MB_CONVERT_BUF_ENSURE(&buf, buf.out, buf.limit, 1); in mb_mime_header_encode()
6227 buf.out = mb_convert_buf_add(buf.out, ' '); in mb_mime_header_encode()
6236 buf.out = mb_convert_buf_add(buf.out, ' '); in mb_mime_header_encode()
6240 MB_CONVERT_BUF_ENSURE(&buf, buf.out, buf.limit, (e - word_start) + 1); in mb_mime_header_encode()
6241 buf.out = mb_convert_buf_add(buf.out, ' '); in mb_mime_header_encode()
6279 MB_CONVERT_BUF_ENSURE(&buf, buf.out, buf.limit, (e - word_start) + 1); in mb_mime_header_encode()
6319 MB_CONVERT_BUF_ENSURE(&buf, buf.out, buf.limit, strlen(outcode->mime_name) + 5); in mb_mime_header_encode()
6361 MB_CONVERT_BUF_ENSURE(&buf, buf.out, buf.limit, 2); in mb_mime_header_encode()
[all …]

Completed in 83 milliseconds

12345678910>>...15