Searched defs:nbytes (Results 1 - 14 of 14) sorted by relevance

/PHP_TRUNK/ext/fileinfo/libmagic/
H A Dis_tar.c63 file_is_tar(struct magic_set *ms, const unsigned char *buf, size_t nbytes) argument
75 tar = is_tar(buf, nbytes);
93 is_tar(const unsigned char *buf, size_t nbytes) argument
100 if (nbytes < sizeof(union record))
H A Dascmagic.c62 trim_nuls(const unsigned char *buf, size_t nbytes) argument
64 while (nbytes > 1 && buf[nbytes - 1] == '\0')
65 nbytes--;
67 return nbytes;
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, ubu
101 file_ascmagic_with_encoding(struct magic_set *ms, const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t ulen, const char *code, const char *type, int text) argument
[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
79 mlen = (nbytes + 1) * sizeof((*ubuf)[0]);
84 mlen = (nbytes + 1) * sizeof(nbuf[0]);
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, nbu
225 looks_ascii(const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t *ulen) argument
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 Dcompress.c104 const unsigned char *buf, size_t nbytes)
118 if (nbytes < compr[i].maglen)
122 nbytes)) != NODATA) {
132 if (file_buffer(ms, -1, NULL, buf, nbytes) == -1)
244 size_t nbytes)
274 if (swrite(tfd, startbuf, nbytes) != (ssize_t)nbytes)
103 file_zmagic(struct magic_set *ms, int fd, const char *name, const unsigned char *buf, size_t nbytes) argument
243 file_pipe2file(struct magic_set *ms, int fd, const void *startbuf, size_t nbytes) argument
H A Dreadcdf.c319 size_t nbytes)
333 info.i_len = nbytes;
318 file_trycdf(struct magic_set *ms, int fd, const unsigned char *buf, size_t nbytes) argument
H A Dmagic.c354 ssize_t nbytes = 0; /* number of bytes read from a datafile */ local
402 if ((nbytes = php_stream_read(stream, (char *)buf, HOWMANY)) < 0) {
407 (void)memset(buf + nbytes, 0, SLOP); /* NUL terminate */
408 if (file_buffer(ms, stream, inname, buf, (size_t)nbytes) == -1)
H A Dsoftmagic.c85 /*ARGSUSED1*/ /* nbytes passed for regularity, maybe need later */
87 file_softmagic(struct magic_set *ms, const unsigned char *buf, size_t nbytes, argument
93 if ((rv = match(ms, ml->magic, ml->nmagic, buf, nbytes, 0, mode,
130 const unsigned char *s, size_t nbytes, size_t offset, int mode, int text,
168 switch (mget(ms, s, m, nbytes, offset, cont_level, mode, text,
257 switch (mget(ms, s, m, nbytes, offset, cont_level, mode,
1043 const unsigned char *s, uint32_t offset, size_t nbytes, struct magic *m)
1053 ms->search.s_len = nbytes - offset;
1071 if (bytecnt > nbytes) {
1072 bytecnt = nbytes;
129 match(struct magic_set *ms, struct magic *magic, uint32_t nmagic, const unsigned char *s, size_t nbytes, size_t offset, int mode, int text, int flip, int recursion_level, int *printed_something, int *need_separator, int *returnval) argument
1042 mcopy(struct magic_set *ms, union VALUETYPE *p, int type, int indir, const unsigned char *s, uint32_t offset, size_t nbytes, struct magic *m) argument
1158 mget(struct magic_set *ms, const unsigned char *s, struct magic *m, size_t nbytes, size_t o, unsigned int cont_level, int mode, int text, int flip, int recursion_level, int *printed_something, int *need_separator, int *returnval) argument
[all...]
/PHP_TRUNK/ext/gd/libgd/
H A Dgd_jpeg.c600 ssize_t nbytes = 0; local
606 while (nbytes < INPUT_BUF_SIZE) {
607 int got = gdGetBuf(src->buffer + nbytes, INPUT_BUF_SIZE - nbytes, src->infile);
611 if (!nbytes) {
612 nbytes = -1;
616 nbytes += got;
619 if (nbytes <= 0) {
627 nbytes = 2;
631 src->pub.bytes_in_buffer = nbytes;
[all...]
/PHP_TRUNK/netware/
H A Dstart.c45 size_t nbytes, size_t *bytesRead, void *buffer ),
36 _NonAppStart( void *NLMHandle, void *errorScreen, const char *cmdLine, const char *loadDirPath, size_t uninitializedDataLength, void *NLMFileHandle, int (*readRoutineP)( int conn, void *fileHandle, size_t offset, size_t nbytes, size_t *bytesRead, void *buffer ), size_t customDataOffset, size_t customDataSize, int messageCount, const char **messages ) argument
/PHP_TRUNK/ext/ereg/regex/
H A Dregcomp.c1005 register size_t nbytes; local
1014 nbytes = nc / CHAR_BIT * css;
1021 p->g->setbits = (uch *)malloc(nbytes);
1024 nbytes);
1030 (void) memset((unsigned char *)p->g->setbits + (nbytes - css),
/PHP_TRUNK/ext/iconv/
H A Diconv.c205 static php_iconv_err_t _php_iconv_strlen(size_t *pretval, const char *str, size_t nbytes, const char *enc);
207 static php_iconv_err_t _php_iconv_substr(smart_str *pretval, const char *str, size_t nbytes, zend_long offset, zend_long len, const char *enc);
708 static php_iconv_err_t _php_iconv_strlen(size_t *pretval, const char *str, size_t nbytes, const char *enc) argument
743 for (in_p = str, in_left = nbytes, cnt = 0; in_left > 0; cnt+=2) {
793 const char *str, size_t nbytes, zend_long offset, zend_long len, const char *enc)
810 err = _php_iconv_strlen(&total_len, str, nbytes, enc);
864 for (in_p = str, in_left = nbytes, cnt = 0; in_left > 0 && len > 0; ++cnt) {
792 _php_iconv_substr(smart_str *pretval, const char *str, size_t nbytes, zend_long offset, zend_long len, const char *enc) argument
/PHP_TRUNK/ext/mbstring/
H A Dmbstring.c4630 MBSTRING_API char *php_mb_safe_strrchr_ex(const char *s, unsigned int c, size_t nbytes, const mbfl_encoding *enc) argument
4635 if (nbytes == (size_t)-1) {
4652 register size_t bcnt = nbytes;
4671 MBSTRING_API char *php_mb_safe_strrchr(const char *s, unsigned int c, size_t nbytes) argument
4673 return php_mb_safe_strrchr_ex(s, c, nbytes, MBSTRG(internal_encoding));
/PHP_TRUNK/ext/odbc/
H A Dphp_odbc.c1402 int fp, nbytes; local
1406 while ((nbytes = read(fp, &buf, 4096)) > 0) {
1407 SQLPutData(result->stmt, (void*)&buf, nbytes);
/PHP_TRUNK/ext/pgsql/
H A Dpgsql.c3465 int nbytes, argc = ZEND_NUM_ARGS(); local
3480 if ((nbytes = lo_read((PGconn *)pgsql->conn, pgsql->lofd, buf->val, buf->len))<0) {
3485 buf->len = nbytes;
3498 size_t str_len, nbytes; local
3524 if ((nbytes = lo_write((PGconn *)pgsql->conn, pgsql->lofd, str, len)) == -1) {
3528 RETURN_LONG(nbytes);
3538 volatile int nbytes; local
3549 while ((nbytes = lo_read((PGconn *)pgsql->conn, pgsql->lofd, buf, PGSQL_LO_READ_BUF_SIZE))>0) {
3550 PHPWRITE(buf, nbytes);
3551 tbytes += nbytes;
[all...]

Completed in 34 milliseconds