| /PHP_TRUNK/ext/zip/lib/ |
| H A D | zip_error_to_str.c | 48 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 D | zip_filerange_crc.c | 50 Bytef buf[BUFSIZE]; 62 if ((n=fread(buf, 1, n, fp)) <= 0) { 67 *crcp = crc32(*crcp, buf, n); 48 Bytef buf[BUFSIZE]; local
|
| /PHP_TRUNK/sapi/fpm/fpm/ |
| H A D | fpm_php_trace.c | 49 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 D | fpm_trace.c | 11 int fpm_trace_get_strz(char *buf, size_t sz, long addr) /* {{{ */ argument 30 *buf++ = lc[i]; 33 *buf = '\0';
|
| H A D | fpm_trace_pread.c | 38 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 D | zlog.c | 104 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_TRUNK/ext/fileinfo/libmagic/ |
| H A D | encoding.c | 68 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 D | ascmagic.c | 62 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 D | funcs.c | 63 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_TRUNK/ext/ftp/tests/ |
| H A D | server.inc | 62 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/gd/libgd/ |
| H A D | gd_color.c | 17 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 D | gd_gif_in.c | 76 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 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) 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 D | gdxpm.c | 23 char buf[5]; local 44 buf[1] = '\0'; 45 buf[0] = image.colorTable[i].c_color[1]; 46 red = strtol(buf, NULL, 16); 48 buf[0] = image.colorTable[i].c_color[2]; 49 green = strtol(buf, NULL, 16); 51 buf[0] = image.colorTable[i].c_color[3]; 52 blue = strtol(buf, NULL, 16); 56 buf[2] = '\0'; 57 buf[ [all...] |
| /PHP_TRUNK/ext/mbstring/oniguruma/ |
| H A D | regposerr.c | 72 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/Zend/ |
| H A D | zend_stream.c | 53 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_TRUNK/ext/dba/libcdb/ |
| H A D | cdb.c | 48 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 D | flatfile.c | 88 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/ext/json/ |
| H A D | json.c | 170 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, '{'); 256 json_pretty_print_char(buf, option 399 json_escape_string(smart_str *buf, char *s, int len, int options TSRMLS_DC) argument 557 json_encode_serializable_object(smart_str *buf, zval *val, int options TSRMLS_DC) argument 603 php_json_encode(smart_str *buf, zval *val, int options TSRMLS_DC) argument 764 smart_str buf = {0}; local [all...] |
| /PHP_TRUNK/ext/standard/ |
| H A D | exec.c | 63 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 D | var.c | 335 #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 587 php_var_serialize_long(smart_str *buf, long val) argument 595 php_var_serialize_string(smart_str *buf, char *str, int len) argument 605 php_var_serialize_class_name(smart_str *buf, zval *struc TSRMLS_DC) argument 620 php_var_serialize_class(smart_str *buf, zval *struc, zval *retval_ptr, HashTable *var_hash TSRMLS_DC) argument 711 php_var_serialize_intern(smart_str *buf, zval *struc, HashTable *var_hash TSRMLS_DC) argument 908 php_var_serialize(smart_str *buf, zval **struc, php_serialize_data_t *var_hash TSRMLS_DC) argument 921 smart_str buf = {0}; local 952 char *buf = NULL; local [all...] |
| /PHP_TRUNK/main/ |
| H A D | php_memory_streams.h | 34 #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);
|
| /PHP_TRUNK/win32/ |
| H A D | winutil.c | 27 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 D | winutil.h | 23 PHPAPI php_win32_get_random_bytes(unsigned char *buf, size_t size);
|
| /PHP_TRUNK/ext/session/ |
| H A D | mod_files.c | 99 static char *ps_files_path_create(char *buf, size_t buflen, ps_files *data, const char *key) argument 113 memcpy(buf, data->basedir, data->basedir_len); 115 buf[n++] = PHP_DIR_SEPARATOR; 117 buf[n++] = *p++; 118 buf[n++] = PHP_DIR_SEPARATOR; 120 memcpy(buf + n, FILE_PREFIX, sizeof(FILE_PREFIX) - 1); 122 memcpy(buf + n, key, key_len); 124 buf[n] = '\0'; 126 return buf; 148 char buf[MAXPATHLE local 209 char buf[MAXPATHLEN]; local 420 char buf[MAXPATHLEN]; local [all...] |