Searched refs:buf (Results 1 - 25 of 298) sorted by relevance

1234567891011>>

/PHP_5_5/ext/zip/lib/
H A Dzip_error_to_str.c48 zip_error_to_str(char *buf, zip_uint64_t len, int ze, int se)
53 return snprintf(buf, len, "Unknown error %d", ze);
70 return snprintf(buf, len, "%s%s%s",
46 zip_error_to_str(char *buf, zip_uint64_t len, int ze, int se) argument
H A Dzip_filerange_crc.c50 Bytef buf[BUFSIZE];
62 if ((n=fread(buf, 1, n, fp)) <= 0) {
67 *crcp = crc32(*crcp, buf, n);
48 Bytef buf[BUFSIZE]; local
/PHP_5_5/sapi/fpm/fpm/
H A Dfpm_php_trace.c49 char buf[buf_size]; local
55 zlog_print_time(&tv, buf, buf_size);
57 fprintf(slowlog, "\n%s [pool %s] pid %d\n", buf, child->wp->config->name, (int) pid);
59 if (0 > fpm_trace_get_strz(buf, buf_size, (long) &SG(request_info).path_translated)) {
63 fprintf(slowlog, "script_filename = %s\n", buf);
84 if (0 > fpm_trace_get_strz(buf, buf_size, function + offsetof(zend_function, common.function_name))) {
88 fprintf(slowlog, "%s()", buf);
97 *buf = '\0';
102 if (0 > fpm_trace_get_strz(buf, buf_size, op_array + offsetof(zend_op_array, filename))) {
122 fprintf(slowlog, " %s:%u\n", *buf
[all...]
H A Dfpm_trace.c11 int fpm_trace_get_strz(char *buf, size_t sz, long addr) /* {{{ */ argument
30 *buf++ = lc[i];
33 *buf = '\0';
H A Dfpm_trace_pread.c38 char buf[128]; local
40 sprintf(buf, "/proc/%d/" PROC_MEM_FILE, (int) pid);
41 mem_file = open(buf, O_RDONLY);
43 zlog(ZLOG_SYSERROR, "failed to open %s", buf);
H A Dzlog.c104 char buf[MAX_LINE_LENGTH]; local
113 len = vsnprintf(buf, buf_size, fmt, args);
116 memcpy(buf + buf_size - sizeof("..."), "...", sizeof("...") - 1);
119 external_logger(flags & ZLOG_LEVEL_MASK, buf, len);
121 memset(buf, '\0', buf_size);
133 len += snprintf(buf, buf_size, "[%s] %s(), line %d: ", level_names[flags & ZLOG_LEVEL_MASK], function, line);
135 len += snprintf(buf, buf_size, "[%s] ", level_names[flags & ZLOG_LEVEL_MASK]);
142 len = zlog_print_time(&tv, buf, buf_size);
146 len += snprintf(buf + len, buf_size - len, "%s: pid %d, %s(), line %d: ", level_names[flags & ZLOG_LEVEL_MASK], getpid(), function, line);
148 len += snprintf(buf
[all...]
/PHP_5_5/ext/fileinfo/libmagic/
H A Dencoding.c68 file_encoding(struct magic_set *ms, const unsigned char *buf, size_t nbytes, unichar **ubuf, size_t *ulen, const char **code, const char **code_mime, const char **type) argument
86 if (looks_ascii(buf, nbytes, *ubuf, ulen)) {
90 } else if (looks_utf8_with_BOM(buf, nbytes, *ubuf, ulen) > 0) {
94 } else if (file_looks_utf8(buf, nbytes, *ubuf, ulen) > 1) {
99 } else if ((ucs_type = looks_ucs16(buf, nbytes, *ubuf, ulen)) != 0) {
108 } else if (looks_latin1(buf, nbytes, *ubuf, ulen)) {
112 } else if (looks_extended(buf, nbytes, *ubuf, ulen)) {
117 from_ebcdic(buf, nbytes, nbuf);
221 looks_ascii(const unsigned char *buf, size_t nbytes, unichar *ubuf, argument
229 int t = text_chars[buf[
241 looks_latin1(const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t *ulen) argument
260 looks_extended(const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t *ulen) argument
291 file_looks_utf8(const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t *ulen) argument
362 looks_utf8_with_BOM(const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t *ulen) argument
372 looks_ucs16(const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t *ulen) argument
493 from_ebcdic(const unsigned char *buf, size_t nbytes, unsigned char *out) argument
[all...]
H A Dascmagic.c62 trim_nuls(const unsigned char *buf, size_t nbytes) argument
64 while (nbytes > 1 && buf[nbytes - 1] == '\0')
71 file_ascmagic(struct magic_set *ms, const unsigned char *buf, size_t nbytes, argument
85 nbytes = trim_nuls(buf, nbytes);
88 if (file_encoding(ms, buf, nbytes, &ubuf, &ulen, &code, &code_mime,
92 rv = file_ascmagic_with_encoding(ms, buf, nbytes, ubuf, ulen, code,
101 file_ascmagic_with_encoding(struct magic_set *ms, const unsigned char *buf, argument
129 nbytes = trim_nuls(buf, nbytes);
311 encode_utf8(unsigned char *buf, size_t len, unichar *ubuf, size_t ulen) argument
314 unsigned char *end = buf
[all...]
H A Dfuncs.c63 char *buf = NULL, *newstr; local
66 len = vspprintf(&buf, 0, fmt, ap);
69 if (ms->o.buf != NULL) {
70 len = spprintf(&newstr, 0, "%s%s", ms->o.buf, (buf ? buf : ""));
71 if (buf) {
72 efree(buf);
74 efree(ms->o.buf);
75 ms->o.buf
90 char *buf = NULL; local
161 file_buffer(struct magic_set *ms, php_stream *stream, const char *inname, const void *buf, size_t nb) argument
[all...]
/PHP_5_5/ext/gd/libgd/
H A Dgd_color.c17 unsigned long *buf; /* stores our calculations */ local
18 unsigned long *bp; /* buf ptr */
36 buf = (unsigned long *)safe_emalloc(sizeof(unsigned long), 5 * im2->colorsTotal, 0);
37 memset( buf, 0, sizeof(unsigned long) * 5 * im2->colorsTotal );
43 bp = buf + (color * 5);
51 bp = buf;
63 gdFree(buf);
H A Dgd_gif_in.c76 unsigned char buf[280]; member in struct:__anon132
93 static int GetDataBlock (gdIOCtx *fd, unsigned char *buf, int *ZeroDataBlockP);
134 unsigned char buf[16]; local
149 if (! ReadOK(fd,buf,6)) {
152 if (strncmp((char *)buf,"GIF",3) != 0) {
156 if (memcmp((char *)buf+3, "87a", 3) == 0) {
158 } else if (memcmp((char *)buf+3, "89a", 3) == 0) {
164 if (! ReadOK(fd,buf,7)) {
168 BitPixel = 2<<(buf[4]&0x07);
170 ColorResolution = (int) (((buf[
300 unsigned char buf[256]; local
327 GetDataBlock_(gdIOCtx *fd, unsigned char *buf, int *ZeroDataBlockP) argument
346 GetDataBlock(gdIOCtx *fd, unsigned char *buf, int *ZeroDataBlockP) argument
476 unsigned char buf[260]; local
[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) argument
86 res = ((lctx->src->source) (lctx->src->context, buf, size));
105 unsigned char buf; local
107 res = sourceGetbuf (ctx, &buf, 1);
110 return buf;
116 static int sinkPutbuf (gdIOCtx * ctx, const void *buf, int size) argument
123 res = (lctx->snk->sink) (lctx->snk->context, buf, size);
H A Dgdxpm.c23 char buf[5]; local
49 buf[1] = '\0';
50 buf[0] = image.colorTable[i].c_color[1];
51 red = strtol(buf, NULL, 16);
53 buf[0] = image.colorTable[i].c_color[2];
54 green = strtol(buf, NULL, 16);
56 buf[0] = image.colorTable[i].c_color[3];
57 blue = strtol(buf, NULL, 16);
61 buf[2] = '\0';
62 buf[
[all...]
/PHP_5_5/ext/mbstring/oniguruma/
H A Dregposerr.c72 regerror(int posix_ecode, const regex_t* reg ARG_UNUSED, char* buf, argument
93 if (buf != NULL && size > 0) {
94 strncpy(buf, s, size - 1);
95 buf[size - 1] = '\0';
/PHP_5_5/ext/ftp/tests/
H A Dserver.inc62 function dump_and_exit($buf)
64 var_dump($buf);
100 $buf = fread($s, 2048);
103 function user_auth($buf) {
107 if ($buf !== "AUTH TLS\r\n") {
109 dump_and_exit($buf);
124 if (!preg_match('/^PBSZ \d+\r\n$/', $buf = fread($s, 2048))) {
126 dump_and_exit($buf);
130 $buf = fread($s, 2048);
132 if ($buf !
[all...]
/PHP_5_5/ext/standard/
H A Dexec.c63 char *buf; local
88 buf = (char *) emalloc(EXEC_INPUT_BUF);
92 b = buf;
97 if (buflen < (bufl + (b - buf) + EXEC_INPUT_BUF)) {
98 bufl += b - buf;
100 buf = erealloc(buf, buflen);
101 b = buf + bufl;
106 } else if (b != buf) {
107 bufl += b - buf;
[all...]
H A Dvar.c335 #define buffer_append_spaces(buf, num_spaces) \
340 smart_str_appendl(buf, tmp_spaces, tmp_spaces_len); \
347 smart_str *buf; local
350 buf = va_arg(args, smart_str *);
353 buffer_append_spaces(buf, level+1);
354 smart_str_append_long(buf, (long) hash_key->h);
355 smart_str_appendl(buf, " => ", 4);
363 buffer_append_spaces(buf, level + 1);
365 smart_str_appendc(buf, '\'');
366 smart_str_appendl(buf, tmp_st
384 smart_str *buf; local
511 smart_str buf = {0}; local
526 smart_str buf = {0}; local
585 php_var_serialize_long(smart_str *buf, long val) argument
593 php_var_serialize_string(smart_str *buf, char *str, int len) argument
603 php_var_serialize_class_name(smart_str *buf, zval *struc TSRMLS_DC) argument
618 php_var_serialize_class(smart_str *buf, zval *struc, zval *retval_ptr, HashTable *var_hash TSRMLS_DC) argument
709 php_var_serialize_intern(smart_str *buf, zval *struc, HashTable *var_hash TSRMLS_DC) argument
906 php_var_serialize(smart_str *buf, zval **struc, php_serialize_data_t *var_hash TSRMLS_DC) argument
919 smart_str buf = {0}; local
950 char *buf = NULL; local
[all...]
/PHP_5_5/main/
H A Dphp_memory_streams.h34 #define php_stream_memory_open(mode, buf, length) _php_stream_memory_open((mode), (buf), (length) STREAMS_CC TSRMLS_CC)
40 #define php_stream_temp_open(mode, max_memory_usage, buf, length) _php_stream_temp_open((mode), (max_memory_usage), (buf), (length) STREAMS_CC TSRMLS_CC)
44 PHPAPI php_stream *_php_stream_memory_open(int mode, char *buf, size_t length STREAMS_DC TSRMLS_DC);
48 PHPAPI php_stream *_php_stream_temp_open(int mode, size_t max_memory_usage, char *buf, size_t length STREAMS_DC TSRMLS_DC);
H A Dreentrancy.c61 PHPAPI char *php_ctime_r(const time_t *clock, char *buf) argument
63 if (ctime_r(clock, buf) == buf)
64 return (buf);
68 PHPAPI char *php_asctime_r(const struct tm *tm, char *buf) argument
70 if (asctime_r(tm, buf) == buf)
71 return (buf);
91 PHPAPI char *php_ctime_r(const time_t *clock, char *buf) argument
93 if (ctime_r(clock, buf, 2
98 php_asctime_r(const struct tm *tm, char *buf) argument
197 php_ctime_r(const time_t *clock, char *buf) argument
215 php_asctime_r(const struct tm *tm, char *buf) argument
[all...]
/PHP_5_5/Zend/
H A Dzend_stream.c53 static size_t zend_stream_stdio_reader(void *handle, char *buf, size_t len TSRMLS_DC) /* {{{ */ argument
55 return fread(buf, 1, len, (FILE*)handle);
67 struct stat buf; local
68 if (handle && fstat(fileno((FILE*)handle), &buf) == 0) {
70 if (!S_ISREG(buf.st_mode)) {
74 return buf.st_size;
85 if (stream->mmap.buf) {
86 efree(stream->mmap.buf);
91 stream->mmap.buf = 0;
109 struct stat buf; local
146 char buf; local
154 zend_stream_read(zend_file_handle *file_handle, char *buf, size_t len TSRMLS_DC) argument
181 zend_stream_fixup(zend_file_handle *file_handle, char **buf, size_t *len TSRMLS_DC) argument
[all...]
/PHP_5_5/ext/dba/libcdb/
H A Dcdb.c48 char buf[32]; local
52 n = sizeof(buf);
55 if (cdb_read(c, buf, n, pos TSRMLS_CC) == -1)
57 if (memcmp(buf, key, n))
68 uint32 cdb_hash(char *buf, unsigned int len) argument
71 const unsigned char * b = (unsigned char *)buf;
104 int cdb_read(struct cdb *c, char *buf, unsigned int len, uint32 pos TSRMLS_DC) argument
113 r = php_stream_read(c->fp, buf, len);
121 buf += r;
131 char buf[ local
[all...]
/PHP_5_5/ext/dba/libflatfile/
H A Dflatfile.c88 char buf[16]; local
91 if (php_stream_gets(dba->fp, buf, sizeof(buf))) {
92 value_datum.dsize = atoi(buf);
110 char *buf = emalloc(buf_size); local
117 if (!php_stream_gets(dba->fp, buf, 15)) {
120 num = atoi(buf);
123 buf = erealloc(buf, buf_size);
128 num = php_stream_read(dba->fp, buf, nu
166 char *buf = emalloc(buf_size); local
216 char *buf = emalloc(buf_size); local
264 char *buf = emalloc(buf_size); local
[all...]
/PHP_5_5/win32/
H A Dwinutil.c27 char *buf = NULL; local
31 NULL, error, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR)&buf, 0, NULL
34 return (buf ? (char *) buf : "");
80 PHPAPI int php_win32_get_random_bytes(unsigned char *buf, size_t size) { /* {{{ */ argument
118 ret = CryptGenRandom(hCryptProv, size, buf);
H A Dwinutil.h23 PHPAPI php_win32_get_random_bytes(unsigned char *buf, size_t size);
/PHP_5_5/ext/json/
H A Djson.c170 static void json_escape_string(smart_str *buf, char *s, int len, int options TSRMLS_DC);
209 static inline void json_pretty_print_char(smart_str *buf, int options, char c TSRMLS_DC) /* {{{ */ argument
212 smart_str_appendc(buf, c);
217 static inline void json_pretty_print_indent(smart_str *buf, int options TSRMLS_DC) /* {{{ */ argument
223 smart_str_appendl(buf, " ", 4);
231 static void json_encode_array(smart_str *buf, zval **val, int options TSRMLS_DC) /* {{{ */ argument
246 smart_str_appendl(buf, "null", 4);
251 smart_str_appendc(buf, '[');
253 smart_str_appendc(buf, '{');
283 smart_str_appendc(buf, ',');
401 json_escape_string(smart_str *buf, char *s, int len, int options TSRMLS_DC) argument
559 json_encode_serializable_object(smart_str *buf, zval *val, int options TSRMLS_DC) argument
605 php_json_encode(smart_str *buf, zval *val, int options TSRMLS_DC) argument
780 smart_str buf = {0}; local
[all...]

Completed in 23 milliseconds

1234567891011>>