Home
last modified time | relevance | path

Searched refs:buf (Results 51 – 75 of 349) sorted by relevance

12345678910>>...14

/PHP-7.2/ext/fileinfo/libmagic/
H A Dcdf_time.c170 cdf_ctime(const time_t *sec, char *buf) in cdf_ctime() argument
172 char *ptr = ctime_r(sec, buf); in cdf_ctime()
174 return buf; in cdf_ctime()
175 (void)snprintf(buf, 26, "*Bad* %#16.16" INT64_T_FORMAT "x\n", in cdf_ctime()
177 return buf; in cdf_ctime()
186 char buf[25]; in main() local
192 p = cdf_ctime(&ts.tv_sec, buf); in main()
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()
206 buf, vbuf) == -1) in cdf_file_property_info()
237 ", %s: %s", buf, c) == -1) in cdf_file_property_info()
263 char buf[256]; in cdf_file_catalog() local
275 cdf_u16tos8(buf, ce[i].ce_namlen, ce[i].ce_name), in cdf_file_catalog()
348 format_clsid(char *buf, size_t len, const uint64_t uuid[2]) { in format_clsid() argument
349 snprintf(buf, len, "%.8" PRIx64 "-%.4" PRIx64 "-%.4" PRIx64 "-%.4" in format_clsid()
356 return buf; in format_clsid()
533 file_trycdf(struct magic_set *ms, int fd, const unsigned char *buf, in file_trycdf() argument
[all …]
H A Dis_tar.c63 file_is_tar(struct magic_set *ms, const unsigned char *buf, size_t nbytes) in file_is_tar() argument
75 tar = is_tar(buf, nbytes); in file_is_tar()
93 is_tar(const unsigned char *buf, size_t nbytes) in is_tar() argument
95 const union record *header = (const union record *)(const void *)buf; in is_tar()
H A Dmagic.c218 unsigned char *buf; in file_or_stream() local
235 if ((buf = CAST(unsigned char *, emalloc(ms->bytes_max + SLOP))) == NULL) in file_or_stream()
269 if ((nbytes = php_stream_read(stream, (char *)buf, ms->bytes_max - nbytes)) < 0) { in file_or_stream()
274 (void)memset(buf + nbytes, 0, SLOP); /* NUL terminate */ in file_or_stream()
275 if (file_buffer(ms, stream, inname, buf, (size_t)nbytes) == -1) in file_or_stream()
279 efree(buf); in file_or_stream()
290 magic_buffer(struct magic_set *ms, const void *buf, size_t nb) in magic_buffer() argument
300 if (file_buffer(ms, NULL, NULL, buf, nb) == -1) { in magic_buffer()
311 return (ms->event_flags & EVENT_HAD_ERR) ? ms->o.buf : NULL; in magic_error()
/PHP-7.2/ext/gd/libgd/
H A Dgd_io.c36 unsigned char buf[2]; in Putword() local
38 buf[0] = w & 0xff; in Putword()
39 buf[1] = (w / 256) & 0xff; in Putword()
40 (ctx->putBuf) (ctx, (char *) buf, 2); in Putword()
181 int gdPutBuf (const void *buf, int size, gdIOCtx * ctx) in gdPutBuf() argument
184 return (ctx->putBuf) (ctx, buf, size); in gdPutBuf()
188 int gdGetBuf (void *buf, int size, gdIOCtx * ctx) in gdGetBuf() argument
190 return (ctx->getBuf) (ctx, buf, size); in gdGetBuf()
/PHP-7.2/ext/pdo/
H A Dpdo_sql_parser.c532 zend_string *buf; in pdo_parse_params() local
535 if (!buf) { in pdo_parse_params()
536 buf = ZSTR_EMPTY_ALLOC(); in pdo_parse_params()
543 if (buf) { in pdo_parse_params()
544 zend_string_release(buf); in pdo_parse_params()
548 if (buf) { in pdo_parse_params()
549 zend_string_release(buf); in pdo_parse_params()
559 zend_string *buf = NULL; in pdo_parse_params() local
595 if (buf) { in pdo_parse_params()
603 if (buf) { in pdo_parse_params()
[all …]
H A Dpdo_sql_parser.re217 zend_string *buf;
220 if (!buf) {
221 buf = ZSTR_EMPTY_ALLOC();
228 if (buf) {
229 zend_string_release(buf);
233 if (buf) {
234 zend_string_release(buf);
244 zend_string *buf = NULL;
280 if (buf) {
288 if (buf) {
[all …]
/PHP-7.2/ext/zip/lib/
H A Dzip_error_to_str.c44 zip_error_to_str(char *buf, zip_uint64_t len, int ze, int se) in zip_error_to_str() argument
49 return snprintf(buf, len, "Unknown error %d", ze); in zip_error_to_str()
66 return snprintf(buf, len, "%s%s%s", in zip_error_to_str()
H A Dzip_filerange_crc.c44 Bytef buf[BUFSIZE]; in _zip_filerange_crc() local
61 if ((n = zip_source_read(src, buf, (zip_uint64_t)n)) < 0) { in _zip_filerange_crc()
70 *crcp = crc32(*crcp, buf, (uInt)n); in _zip_filerange_crc()
H A Dzip_error_strerror.c46 char buf[128], *s; in zip_error_strerror() local
51 sprintf(buf, "Unknown error %d", err->zip_err); in zip_error_strerror()
53 ss = buf; in zip_error_strerror()
/PHP-7.2/ext/json/
H A Djson.c189 PHP_JSON_API int php_json_encode_ex(smart_str *buf, zval *val, int options, zend_long depth) /* {{{… in php_json_encode_ex() argument
197 return_code = php_json_encode_zval(buf, val, options, &encoder); in php_json_encode_ex()
204 PHP_JSON_API int php_json_encode(smart_str *buf, zval *val, int options) /* {{{ */ in php_json_encode() argument
206 return php_json_encode_ex(buf, val, options, JSON_G(encode_max_depth)); in php_json_encode()
232 smart_str buf = {0}; in PHP_FUNCTION() local
245 php_json_encode_zval(&buf, parameter, (int)options, &encoder); in PHP_FUNCTION()
249 smart_str_free(&buf); in PHP_FUNCTION()
253 smart_str_0(&buf); /* copy? */ in PHP_FUNCTION()
254 if (buf.s) { in PHP_FUNCTION()
255 RETURN_NEW_STR(buf.s); in PHP_FUNCTION()
/PHP-7.2/ext/dba/libcdb/
H A Dcdb_make.c41 static int cdb_make_write(struct cdb_make *c, char *buf, uint32 sz) { in cdb_make_write() argument
42 return php_stream_write(c->fp, buf, sz) == sz ? 0 : -1; in cdb_make_write()
106 char buf[8]; in cdb_make_addbegin() local
117 uint32_pack(buf, keylen); in cdb_make_addbegin()
118 uint32_pack(buf + 4, datalen); in cdb_make_addbegin()
119 if (cdb_make_write(c, buf, 8) != 0) in cdb_make_addbegin()
140 char buf[8]; in cdb_make_finish() local
212 uint32_pack(buf, c->hash[u].h); in cdb_make_finish()
213 uint32_pack(buf + 4, c->hash[u].p); in cdb_make_finish()
214 if (cdb_make_write(c, buf, 8) != 0) in cdb_make_finish()
/PHP-7.2/Zend/
H A Dzend.c173 buf.len = max_len; in ZEND_INI_END()
176 smart_string_0(&buf); in ZEND_INI_END()
178 if (buf.c) { in ZEND_INI_END()
179 *pbuf = buf.c; in ZEND_INI_END()
180 return buf.len; in ZEND_INI_END()
202 smart_str buf = {0}; in zend_vstrpprintf() local
206 if (!buf.s) { in zend_vstrpprintf()
214 smart_str_0(&buf); in zend_vstrpprintf()
215 return buf.s; in zend_vstrpprintf()
447 smart_str_0(&buf); in zend_print_zval_r_to_str()
[all …]
/PHP-7.2/ext/zlib/tests/
H A Dinflate_get_status.phpt17 $buf = '';
21 $buf .= inflate_add($ctx, substr($compressed, $i, 1));
28 echo '$buf = ' . $buf;
57 $buf = Hello world.
H A Dgzreadgzwriteplain.phpt20 while ($buf = gzread($fp, 8192)) {
21 $data .= $buf;
34 while ($buf = gzread($fp, 8192)) {
35 $data .= $buf;
/PHP-7.2/sapi/phpdbg/
H A Dphpdbg_out.c831 od.nextb = buf; in strx_printv()
861 *buf = NULL; in phpdbg_xml_vasprintf()
864 *buf = emalloc(++cc); in phpdbg_xml_vasprintf()
866 efree(*buf); in phpdbg_xml_vasprintf()
867 *buf = NULL; in phpdbg_xml_vasprintf()
917 int len = tmp - *buf; in phpdbg_encode_xml()
918 *buf = erealloc(*buf, len + 1); in phpdbg_encode_xml()
931 if ((*buf)[i] < 0x20) { in phpdbg_encode_ctrl_chars()
946 efree(*buf); in phpdbg_encode_ctrl_chars()
1038 efree(buf); in phpdbg_process_print()
[all …]
H A Dphpdbg_list.c158 char *buffer = data->buf + linestart; in phpdbg_list_file()
254 data.buf = estrndup(bufptr, len); in phpdbg_compile_file()
259 efree(data.buf); in phpdbg_compile_file()
263 data.buf[data.len] = '\0'; in phpdbg_compile_file()
267 for (line = 0, bufptr = data.buf - 1, endptr = data.buf + data.len; ++bufptr < endptr;) { in phpdbg_compile_file()
269 dataptr->line[++line] = (uint32_t)(bufptr - data.buf) + 1; in phpdbg_compile_file()
275 dataptr->line[line] = endptr - data.buf; in phpdbg_compile_file()
337 …for (line = 0, bufptr = dataptr->buf - 1, endptr = dataptr->buf + dataptr->len; ++bufptr < endptr;… in phpdbg_compile_string()
339 dataptr->line[++line] = (uint32_t)(bufptr - dataptr->buf) + 1; in phpdbg_compile_string()
343 dataptr->line[line] = endptr - dataptr->buf; in phpdbg_compile_string()
[all …]
H A Dphpdbg_rinit_hook.c60 char buf[(1 << 8) + 1]; in PHP_RINIT_FUNCTION() local
76 while ((buflen = recv(s, buf, sizeof(buf) - 1, 0)) > 0) { in PHP_RINIT_FUNCTION()
77 php_write(buf, buflen); in PHP_RINIT_FUNCTION()
/PHP-7.2/win32/
H A Dglob.c625 char buf[MAXPATHLEN]; local
643 if (g_Ctoc(pathbuf, buf, sizeof(buf)))
837 char buf[MAXPATHLEN]; local
840 strlcpy(buf, ".", sizeof buf);
842 if (g_Ctoc(str, buf, sizeof(buf)))
849 return(opendir(buf));
858 char buf[MAXPATHLEN]; local
860 if (g_Ctoc(fn, buf, sizeof(buf)))
875 if (g_Ctoc(fn, buf, sizeof(buf)))
895 g_Ctoc(str, buf, len) in g_Ctoc() argument
[all …]
/PHP-7.2/main/streams/
H A Dfilter.c81 bucket->buf = pemalloc(buflen, 1); in php_stream_bucket_new()
82 memcpy(bucket->buf, buf, buflen); in php_stream_bucket_new()
86 bucket->buf = buf; in php_stream_bucket_new()
117 retval->buf = pemalloc(retval->buflen, retval->is_persistent); in php_stream_bucket_make_writeable()
118 memcpy(retval->buf, bucket->buf, retval->buflen); in php_stream_bucket_make_writeable()
133 (*left)->buf = pemalloc(length, in->is_persistent); in php_stream_bucket_split()
135 memcpy((*left)->buf, in->buf, length); in php_stream_bucket_split()
141 (*right)->buf = pemalloc((*right)->buflen, in->is_persistent); in php_stream_bucket_split()
142 memcpy((*right)->buf, in->buf + length, (*right)->buflen); in php_stream_bucket_split()
154 pefree(bucket->buf, bucket->is_persistent); in php_stream_bucket_delref()
[all …]
/PHP-7.2/ext/mysqlnd/
H A Dmysqlnd_loaddata.c67 int mysqlnd_local_infile_read(void * ptr, zend_uchar * buf, unsigned int buf_len) in mysqlnd_local_infile_read() argument
74 count = (int) php_stream_read(info->fd, (char *) buf, buf_len); in mysqlnd_local_infile_read()
144 zend_uchar *buf = NULL; in mysqlnd_handle_local_infile() local
169 buf = (zend_uchar *) mnd_ecalloc(1, buflen); in mysqlnd_handle_local_infile()
187 …while ((bufsize = infile.local_infile_read (info, buf + MYSQLND_HEADER_SIZE, buflen - MYSQLND_HEAD… in mysqlnd_handle_local_infile()
188 if ((ret = net->data->m.send(net, vio, buf, bufsize, conn->stats, conn->error_info)) == 0) { in mysqlnd_handle_local_infile()
227 if (buf) { in mysqlnd_handle_local_infile()
228 mnd_efree(buf); in mysqlnd_handle_local_infile()
/PHP-7.2/sapi/fpm/fpm/
H A Dfpm_stdio.c113 char buf[max_buf_size]; local
135 res = read(fd, buf + in_buf, max_buf_size - 1 - in_buf);
168 buf[in_buf] = '\0';
182 nl = strchr(buf, '\n');
190 …(int) child->pid, is_stdout ? "stdout" : "stderr", buf, is_last_message ? ", pipe is closed" : "");
193 int out_buf = 1 + nl - buf;
194 memmove(buf, buf + out_buf, in_buf - out_buf);
/PHP-7.2/ext/xmlrpc/libxmlrpc/
H A Dxml_element.c329 if(buf && *buf) { in xml_elem_entity_escape()
334 bufcopy = buf; in xml_elem_entity_escape()
349 bufcopy=buf; in xml_elem_entity_escape()
509 if(buf) { in simplestring_out_fptr()
536 simplestring buf; in xml_elem_serialize_to_string() local
537 simplestring_init(&buf); in xml_elem_serialize_to_string()
542 *buf_len = buf.len; in xml_elem_serialize_to_string()
545 return buf.str; in xml_elem_serialize_to_string()
687 char buf[100] = ""; in xml_elem_parse_buf() local
727 snprintf(buf, in xml_elem_parse_buf()
[all …]
/PHP-7.2/ext/openssl/tests/
H A Dbug72333.phpt46 function blocking_fwrite($fp, $buf) {
50 $result = fwrite($fp, $buf);
55 if ($total >= strlen($buf)) {
58 $buf = substr($buf, $total);
/PHP-7.2/main/
H A Dphp_reentrancy.h74 PHPAPI char *php_ctime_r(const time_t *clock, char *buf);
78 char *ctime_r(const time_t *clock, char *buf);
85 PHPAPI char *php_asctime_r(const struct tm *tm, char *buf);
89 char *asctime_r(const struct tm *tm, char *buf);

Completed in 60 milliseconds

12345678910>>...14