Lines Matching refs:nbytes
1395 - if (file_buffer(ms, -1, NULL, NULL, buf, nbytes) == -1) {
1396 + if (file_buffer(ms, NULL, NULL, NULL, buf, nbytes) == -1) {
1552 - size_t nbytes = b->flen;
1553 + size_t nbytes = b->flen > 64*1024 ? 64*1024 : b->flen;
1565 mlen = (nbytes + 1) * sizeof((*ubuf)[0]);
1571 mlen = (nbytes + 1) * sizeof(nbuf[0]);
1594 -looks_ascii(const unsigned char *buf, size_t nbytes, unichar *ubuf,
1595 +looks_ascii(const unsigned char *buf, size_t nbytes, unicodechar *ubuf,
1603 -looks_latin1(const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t *ulen)
1604 +looks_latin1(const unsigned char *buf, size_t nbytes, unicodechar *ubuf, size_t *ulen)
1612 -looks_extended(const unsigned char *buf, size_t nbytes, unichar *ubuf,
1613 +looks_extended(const unsigned char *buf, size_t nbytes, unicodechar *ubuf,
1621 -file_looks_utf8(const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t *ulen)
1622 +file_looks_utf8(const unsigned char *buf, size_t nbytes, unicodechar *ubuf, size_t *ulen)
1635 -looks_utf8_with_BOM(const unsigned char *buf, size_t nbytes, unichar *ubuf,
1636 +looks_utf8_with_BOM(const unsigned char *buf, size_t nbytes, unicodechar *ubuf,
1639 if (nbytes > 3 && buf[0] == 0xef && buf[1] == 0xbb && buf[2] == 0xbf)
1644 -looks_utf7(const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t *ulen)
1645 +looks_utf7(const unsigned char *buf, size_t nbytes, unicodechar *ubuf, size_t *ulen)
1647 if (nbytes > 4 && buf[0] == '+' && buf[1] == '/' && buf[2] == 'v')
1653 -looks_ucs16(const unsigned char *bf, size_t nbytes, unichar *ubf,
1654 +looks_ucs16(const unsigned char *bf, size_t nbytes, unicodechar *ubf,
1675 -looks_ucs32(const unsigned char *bf, size_t nbytes, unichar *ubf,
1676 +looks_ucs32(const unsigned char *bf, size_t nbytes, unicodechar *ubf,
2996 ssize_t nbytes = 0; /* number of bytes read from a datafile */
3080 - while ((r = sread(fd, RCAST(void *, &buf[nbytes]),
3081 - CAST(size_t, ms->bytes_max - nbytes), 1)) > 0) {
3082 - nbytes += r;
3087 - if (nbytes == 0 && inname) {
3102 - if ((nbytes = read(fd, RCAST(void *, buf), howmany)) == -1) {
3110 + if ((nbytes = php_stream_read(stream, (char *)buf, ms->bytes_max - nbytes)) < 0) {
3115 (void)memset(buf + nbytes, 0, SLOP); /* NUL terminate */
3116 - if (file_buffer(ms, fd, okstat ? &sb : NULL, inname, buf, CAST(size_t, nbytes)) == -1)
3117 + if (file_buffer(ms, stream, &sb, inname, buf, CAST(size_t, nbytes)) == -1)