Home
last modified time | relevance | path

Searched refs:nbytes (Results 1 – 19 of 19) sorted by relevance

/php-src/ext/fileinfo/libmagic/
H A Dencoding.c80 size_t nbytes = b->flen; in file_encoding() local
96 if (nbytes > ms->encoding_max) in file_encoding()
97 nbytes = ms->encoding_max; in file_encoding()
157 from_ebcdic(buf, nbytes, nbuf); in file_encoding()
271 for (i = 0; i < nbytes; i++) { \
361 for (i = 0; i < nbytes; i++) { in file_looks_utf8()
403 if (i >= nbytes) in file_looks_utf8()
472 if (nbytes < 2) in looks_ucs16()
485 for (i = 2; i + 1 < nbytes; i += 2) { in looks_ucs16()
531 if (nbytes < 4) in looks_ucs32()
[all …]
H A Dis_simh.c112 uint32_t nbytes, cbytes; in simh_parse() local
118 while (ue - uc >= CAST(ptrdiff_t, sizeof(nbytes))) { in simh_parse()
119 nbytes = getlen(&uc); in simh_parse()
120 if ((nt > 0 || nr > 0) && nbytes == 0xFFFFFFFF) in simh_parse()
123 if (nbytes == 0) { in simh_parse()
132 uc += nbytes; in simh_parse()
133 if (ue - uc < CAST(ptrdiff_t, sizeof(nbytes))) in simh_parse()
136 if (nbytes != cbytes) in simh_parse()
H A Dascmagic.c62 trim_nuls(const unsigned char *buf, size_t nbytes) in trim_nuls() argument
64 while (nbytes > 1 && buf[nbytes - 1] == '\0') in trim_nuls()
65 nbytes--; in trim_nuls()
67 return nbytes; in trim_nuls()
111 size_t nbytes = b->flen; in file_ascmagic_with_encoding() local
133 nbytes = trim_nuls(buf, nbytes); in file_ascmagic_with_encoding()
136 if (nbytes <= 1) { in file_ascmagic_with_encoding()
H A Dsoftmagic.c846 size_t nbytes = b->flen; in moffset() local
1343 if (offset > nbytes) in mcopy()
1412 if (offset >= nbytes) in mcopy()
1446 if (offset >= nbytes) { in mcopy()
1451 nbytes = nbytes - offset; in mcopy()
1453 nbytes = size; in mcopy()
1461 if (nbytes < sizeof(*p)) in mcopy()
1463 sizeof(*p) - nbytes); in mcopy()
1879 if (nbytes < offset) in mget()
1889 if (nbytes < offset) in mget()
[all …]
H A Dis_tar.c66 size_t nbytes = b->flen; in file_is_tar() local
77 tar = is_tar(buf, nbytes); in file_is_tar()
99 is_tar(const unsigned char *buf, size_t nbytes) in is_tar() argument
110 if (nbytes < sizeof(*header)) in is_tar()
H A Dmagic.c201 ssize_t nbytes = 0; /* number of bytes read from a datafile */ in file_or_stream() local
251 if ((nbytes = php_stream_read(stream, (char *)buf, ms->bytes_max - nbytes)) < 0) { in file_or_stream()
256 (void)memset(buf + nbytes, 0, SLOP); /* NUL terminate */ in file_or_stream()
257 if (file_buffer(ms, stream, &sb, inname, buf, CAST(size_t, nbytes)) == -1) in file_or_stream()
H A Delfclass.h27 if (nbytes <= sizeof(elfhdr))
H A Dder.c266 der_offs(struct magic_set *ms, struct magic *m, size_t nbytes) in der_offs() argument
269 size_t offs = 0, len = ms->search.s_len ? ms->search.s_len : nbytes; in der_offs()
295 if (offs + tlen > nbytes) in der_offs()
H A Dcompress.c282 size_t nbytes = b->flen; in file_zmagic() local
291 if (nbytes < CAST(size_t, abs(compr[i].maglen))) in file_zmagic()
312 nsz = nbytes; in file_zmagic()
343 if (file_buffer(ms, NULL, NULL, NULL, buf, nbytes) == -1) in file_zmagic()
477 size_t nbytes) in file_pipe2file() argument
523 if (swrite(tfd, startbuf, nbytes) != CAST(ssize_t, nbytes)) in file_pipe2file()
H A Dreadcdf.c534 size_t nbytes = b->flen; in file_trycdf() local
547 info.i_len = nbytes; in file_trycdf()
/php-src/ext/gd/libgd/
H A Dgd_jpeg.c613 ssize_t nbytes = 0; in fill_input_buffer() local
619 while (nbytes < INPUT_BUF_SIZE) { in fill_input_buffer()
620 int got = gdGetBuf(src->buffer + nbytes, INPUT_BUF_SIZE - nbytes, src->infile); in fill_input_buffer()
624 if (!nbytes) { in fill_input_buffer()
625 nbytes = -1; in fill_input_buffer()
629 nbytes += got; in fill_input_buffer()
632 if (nbytes <= 0) { in fill_input_buffer()
640 nbytes = 2; in fill_input_buffer()
644 src->pub.bytes_in_buffer = nbytes; in fill_input_buffer()
/php-src/ext/mbstring/
H A Dmbstring.h56 MBSTRING_API char *php_mb_safe_strrchr(const char *s, unsigned int c, size_t nbytes, const mbfl_enc…
H A Dmbstring.c5977 MBSTRING_API char *php_mb_safe_strrchr(const char *s, unsigned int c, size_t nbytes, const mbfl_enc… in php_mb_safe_strrchr() argument
5982 if (nbytes == (size_t)-1) { in php_mb_safe_strrchr()
5999 size_t bcnt = nbytes; in php_mb_safe_strrchr()
/php-src/ext/iconv/
H A Diconv.c147 static php_iconv_err_t _php_iconv_strlen(size_t *pretval, const char *str, size_t nbytes, const cha…
149 static php_iconv_err_t _php_iconv_substr(smart_str *pretval, const char *str, size_t nbytes, zend_l…
548 static php_iconv_err_t _php_iconv_strlen(size_t *pretval, const char *str, size_t nbytes, const cha… in _php_iconv_strlen() argument
579 more = nbytes > 0; in _php_iconv_strlen()
581 for (in_p = str, in_left = nbytes, cnt = 0; more;) { in _php_iconv_strlen()
624 const char *str, size_t nbytes, zend_long offset, zend_long len, const char *enc) in _php_iconv_substr() argument
642 err = _php_iconv_strlen(&total_len, str, nbytes, enc); in _php_iconv_substr()
686 more = nbytes > 0 && len > 0; in _php_iconv_substr()
688 for (in_p = str, in_left = nbytes, cnt = 0; more; ++cnt) { in _php_iconv_substr()
/php-src/ext/fileinfo/
H A Dlibmagic.patch1248 nsz = nbytes;
1267 - if (file_buffer(ms, -1, NULL, NULL, buf, nbytes) == -1)
1381 nbytes = ms->encoding_max;
1383 mlen = (nbytes + 1) * sizeof((*ubuf)[0]);
1392 mlen = (nbytes + 1) * sizeof(nbuf[0]);
2665 - while ((r = sread(fd, RCAST(void *, &buf[nbytes]),
2666 - CAST(size_t, ms->bytes_max - nbytes), 1)) > 0) {
2667 - nbytes += r;
2672 - if (nbytes == 0 && inname) {
2695 + if ((nbytes = php_stream_read(stream, (char *)buf, ms->bytes_max - nbytes)) < 0) {
[all …]
/php-src/main/streams/
H A Dstreams.c1645 size_t nbytes = (size_t)result; in _php_stream_copy_to_stream_ex() local
1646 haveread += nbytes; in _php_stream_copy_to_stream_ex()
1648 src->position += nbytes; in _php_stream_copy_to_stream_ex()
1649 dest->position += nbytes; in _php_stream_copy_to_stream_ex()
1651 if ((maxlen != PHP_STREAM_COPY_ALL && nbytes == maxlen) || php_stream_eof(src)) { in _php_stream_copy_to_stream_ex()
/php-src/ext/pgsql/
H A Dpgsql.c2515 int nbytes; in PHP_FUNCTION() local
2532 if ((nbytes = lo_read((PGconn *)pgsql->conn, pgsql->lofd, ZSTR_VAL(buf), ZSTR_LEN(buf)))<0) { in PHP_FUNCTION()
2537 ZSTR_VAL(buf)[nbytes] = '\0'; in PHP_FUNCTION()
2538 buf = zend_string_truncate(buf, nbytes, 0); in PHP_FUNCTION()
2550 size_t nbytes; in PHP_FUNCTION() local
2576 if ((nbytes = lo_write((PGconn *)pgsql->conn, pgsql->lofd, ZSTR_VAL(str), len)) == (size_t)-1) { in PHP_FUNCTION()
2580 RETURN_LONG(nbytes); in PHP_FUNCTION()
2589 volatile int nbytes; in PHP_FUNCTION() local
2601 while ((nbytes = lo_read((PGconn *)pgsql->conn, pgsql->lofd, buf, PGSQL_LO_READ_BUF_SIZE))>0) { in PHP_FUNCTION()
2602 PHPWRITE(buf, nbytes); in PHP_FUNCTION()
[all …]
/php-src/ext/standard/
H A Dbasic_functions.c1362 size_t nbytes; local
1381 nbytes = php_stream_write(stream, message, message_len);
1383 if (nbytes != message_len) {
/php-src/ext/odbc/
H A Dphp_odbc.c1022 int fp, nbytes; in PHP_FUNCTION() local
1026 while ((nbytes = read(fp, &buf, 4096)) > 0) { in PHP_FUNCTION()
1027 SQLPutData(result->stmt, (void*)&buf, nbytes); in PHP_FUNCTION()

Completed in 145 milliseconds