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

1234567891011>>

/PHP_TRUNK/sapi/fpm/fpm/
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...]
H A Dfpm_php_trace.c51 char buf[buf_size];
57 zlog_print_time(&tv, buf, buf_size);
59 fprintf(slowlog, "\n%s [pool %s] pid %d\n", buf, child->wp->config->name, (int) pid);
61 if (0 > fpm_trace_get_strz(buf, buf_size, (long) &SG(request_info).path_translated)) {
65 fprintf(slowlog, "script_filename = %s\n", buf);
86 if (0 > fpm_trace_get_strz(buf, buf_size, function + offsetof(zend_function, common.function_name))) {
90 fprintf(slowlog, "%s()", buf);
99 *buf = '\0';
104 if (0 > fpm_trace_get_strz(buf, buf_size, op_array + offsetof(zend_op_array, filename))) {
124 fprintf(slowlog, " %s:%u\n", *buf
[all...]
/PHP_TRUNK/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_TRUNK/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_TRUNK/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_TRUNK/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, (uInt)n);
48 Bytef buf[BUFSIZE]; local
/PHP_TRUNK/ext/fileinfo/libmagic/
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 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
90 if (looks_ascii(buf, nbytes, *ubuf, ulen)) {
94 } else if (looks_utf8_with_BOM(buf, nbytes, *ubuf, ulen) > 0) {
98 } else if (file_looks_utf8(buf, nbytes, *ubuf, ulen) > 1) {
103 } else if ((ucs_type = looks_ucs16(buf, nbytes, *ubuf, ulen)) != 0) {
112 } else if (looks_latin1(buf, nbytes, *ubuf, ulen)) {
116 } else if (looks_extended(buf, nbytes, *ubuf, ulen)) {
121 from_ebcdic(buf, nbytes, nbuf);
225 looks_ascii(const unsigned char *buf, size_t nbytes, unichar *ubuf, argument
233 int t = text_chars[buf[
245 looks_latin1(const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t *ulen) argument
264 looks_extended(const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t *ulen) argument
295 file_looks_utf8(const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t *ulen) argument
366 looks_utf8_with_BOM(const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t *ulen) argument
376 looks_ucs16(const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t *ulen) argument
497 from_ebcdic(const unsigned char *buf, size_t nbytes, unsigned char *out) argument
[all...]
H A Dfuncs.c66 char *buf = NULL, *newstr; local
69 len = vspprintf(&buf, 0, fmt, ap);
72 if (ms->o.buf != NULL) {
73 len = spprintf(&newstr, 0, "%s%s", ms->o.buf, (buf ? buf : ""));
74 if (buf) {
75 efree(buf);
77 efree(ms->o.buf);
78 ms->o.buf
93 char *buf = NULL; local
164 file_buffer(struct magic_set *ms, php_stream *stream, const char *inname, const void *buf, size_t nb) argument
[all...]
/PHP_TRUNK/Zend/
H A Dzend_stream.c52 static size_t zend_stream_stdio_reader(void *handle, char *buf, size_t len TSRMLS_DC) /* {{{ */ argument
54 return fread(buf, 1, len, (FILE*)handle);
66 zend_stat_t buf; local
67 if (handle && zend_fstat(fileno((FILE*)handle), &buf) == 0) {
69 if (!S_ISREG(buf.st_mode)) {
73 return buf.st_size;
84 if (stream->mmap.buf) {
85 efree(stream->mmap.buf);
90 stream->mmap.buf = 0;
108 zend_stat_t buf; local
145 char buf; local
153 zend_stream_read(zend_file_handle *file_handle, char *buf, size_t len TSRMLS_DC) argument
180 zend_stream_fixup(zend_file_handle *file_handle, char **buf, size_t *len TSRMLS_DC) argument
[all...]
/PHP_TRUNK/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_TRUNK/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_TRUNK/main/
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_TRUNK/ext/json/
H A Djson.c170 static void json_escape_string(smart_str *buf, char *s, size_t len, int options TSRMLS_DC);
201 static inline void json_pretty_print_char(smart_str *buf, int options, char c TSRMLS_DC) /* {{{ */ argument
204 smart_str_appendc(buf, c);
209 static inline void json_pretty_print_indent(smart_str *buf, int options TSRMLS_DC) /* {{{ */ argument
215 smart_str_appendl(buf, " ", 4);
223 static void json_encode_array(smart_str *buf, zval *val, int options TSRMLS_DC) /* {{{ */ argument
238 smart_str_appendl(buf, "null", 4);
243 smart_str_appendc(buf, '[');
245 smart_str_appendc(buf, '{');
267 smart_str_appendc(buf, ',');
383 json_escape_string(smart_str *buf, char *s, size_t len, int options TSRMLS_DC) argument
553 json_encode_serializable_object(smart_str *buf, zval *val, int options TSRMLS_DC) argument
602 php_json_encode(smart_str *buf, zval *val, int options TSRMLS_DC) argument
773 smart_str buf = {0}; local
[all...]
/PHP_TRUNK/sapi/phpdbg/
H A Dphpdbg_io.c51 PHPDBG_API int phpdbg_consume_stdin_line(char *buf TSRMLS_DC) {
55 memcpy(buf, PHPDBG_G(input_buffer), bytes);
67 if (buf[i] == '\x03') {
69 memmove(buf + i, buf + i + 1, len + bytes - i - 1);
75 if (buf[i] == '\n') {
78 memcpy(PHPDBG_G(input_buffer), buf + i + 1, PHPDBG_G(input_buflen));
81 buf[i + 1] = 0;
88 } while ((bytes = phpdbg_mixed_read(PHPDBG_G(io)[PHPDBG_STDIN].fd, buf + len, PHPDBG_MAX_CMD - len, -1 TSRMLS_CC)) > 0);
263 char buf[12 local
273 char buf[256]; local
288 char buf[128]; local
[all...]
/PHP_TRUNK/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
116 ret = CryptGenRandom(hCryptProv, (DWORD)size, buf);
H A Dwinutil.h23 PHPAPI int php_win32_get_random_bytes(unsigned char *buf, size_t size);
/PHP_TRUNK/ext/standard/
H A Dexec.c63 char *buf; local
89 buf = (char *) emalloc(EXEC_INPUT_BUF);
93 b = buf;
98 if (buflen < (bufl + (b - buf) + EXEC_INPUT_BUF)) {
99 bufl += b - buf;
101 buf = erealloc(buf, buflen);
102 b = buf + bufl;
107 } else if (b != buf) {
108 bufl += b - buf;
[all...]
H A Dvar.c389 #define buffer_append_spaces(buf, num_spaces) \
394 smart_str_appendl(buf, tmp_spaces, tmp_spaces_len); \
398 static void php_array_element_export(zval *zv, zend_ulong index, zend_string *key, int level, smart_str *buf TSRMLS_DC) /* {{{ */
401 buffer_append_spaces(buf, level+1);
402 smart_str_append_long(buf, (zend_long) index);
403 smart_str_appendl(buf, " => ", 4);
410 buffer_append_spaces(buf, level + 1);
412 smart_str_appendc(buf, '\'');
413 smart_str_append(buf, tmp_str);
414 smart_str_appendl(buf, "'
562 smart_str buf = {0}; local
577 smart_str buf = {0}; local
643 php_var_serialize_long(smart_str *buf, zend_long val) argument
651 php_var_serialize_string(smart_str *buf, char *str, size_t len) argument
661 php_var_serialize_class_name(smart_str *buf, zval *struc TSRMLS_DC) argument
676 php_var_serialize_class(smart_str *buf, zval *struc, zval *retval_ptr, php_serialize_data_t var_hash TSRMLS_DC) argument
773 php_var_serialize_intern(smart_str *buf, zval *struc, php_serialize_data_t var_hash TSRMLS_DC) argument
957 php_var_serialize(smart_str *buf, zval *struc, php_serialize_data_t *data TSRMLS_DC) argument
970 smart_str buf = {0}; local
997 char *buf = NULL; local
[all...]

Completed in 30 milliseconds

1234567891011>>