Home
last modified time | relevance | path

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

/PHP-8.0/ext/fileinfo/libmagic/
H A Dencoding.c95 mlen = (nbytes + 1) * sizeof(nbuf[0]); in file_encoding()
147 from_ebcdic(buf, nbytes, nbuf); in file_encoding()
260 for (i = 0; i < nbytes; i++) { in looks_ascii()
279 for (i = 0; i < nbytes; i++) { in looks_latin1()
299 for (i = 0; i < nbytes; i++) { in looks_extended()
333 for (i = 0; i < nbytes; i++) { in file_looks_utf8()
370 if (i >= nbytes) in file_looks_utf8()
429 if (nbytes < 2) in looks_ucs16()
441 for (i = 2; i + 1 < nbytes; i += 2) { in looks_ucs16()
468 if (nbytes < 4) in looks_ucs32()
[all …]
H A Dascmagic.c61 trim_nuls(const unsigned char *buf, size_t nbytes) in trim_nuls() argument
63 while (nbytes > 1 && buf[nbytes - 1] == '\0') in trim_nuls()
64 nbytes--; in trim_nuls()
66 return nbytes; in trim_nuls()
110 size_t nbytes = b->flen; in file_ascmagic_with_encoding() local
132 nbytes = trim_nuls(buf, nbytes); in file_ascmagic_with_encoding()
135 if (nbytes <= 1) { in file_ascmagic_with_encoding()
206 if (seen_cr && nbytes < ms->bytes_max) in file_ascmagic_with_encoding()
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
107 if (nbytes < sizeof(*header)) in is_tar()
H A Dsoftmagic.c853 size_t nbytes = b->flen; in moffset() local
1334 if (offset > nbytes) in mcopy()
1403 if (offset >= nbytes) in mcopy()
1434 if (offset >= nbytes) { in mcopy()
1439 nbytes = nbytes - offset; in mcopy()
1441 nbytes = sizeof(*p); in mcopy()
1449 if (nbytes < sizeof(*p)) in mcopy()
1451 sizeof(*p) - nbytes); in mcopy()
1807 if (nbytes < offset) in mget()
1817 if (nbytes < offset) in mget()
[all …]
H A Dmagic.c192 ssize_t nbytes = 0; /* number of bytes read from a datafile */ in file_or_stream() local
242 if ((nbytes = php_stream_read(stream, (char *)buf, ms->bytes_max - nbytes)) < 0) { in file_or_stream()
247 (void)memset(buf + nbytes, 0, SLOP); /* NUL terminate */ in file_or_stream()
248 if (file_buffer(ms, stream, &sb, inname, buf, CAST(size_t, nbytes)) == -1) in file_or_stream()
H A Dcompress.c258 size_t nbytes = b->flen; in file_zmagic() local
267 if (nbytes < CAST(size_t, abs(compr[i].maglen))) in file_zmagic()
288 nsz = nbytes; in file_zmagic()
316 if (file_buffer(ms, NULL, NULL, NULL, buf, nbytes) == -1) { in file_zmagic()
449 size_t nbytes) in file_pipe2file() argument
481 if (swrite(tfd, startbuf, nbytes) != CAST(ssize_t, nbytes)) in file_pipe2file()
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()
294 if (offs + tlen > nbytes) in der_offs()
H A Delfclass.h27 if (nbytes <= sizeof(elfhdr))
H A Dreadcdf.c536 size_t nbytes = b->flen; in file_trycdf() local
549 info.i_len = nbytes; in file_trycdf()
/PHP-8.0/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-8.0/ext/mbstring/
H A Dmbstring.h57 size_t nbytes, const mbfl_encoding *enc);
59 size_t nbytes);
H A Dmbstring.c4282 MBSTRING_API char *php_mb_safe_strrchr_ex(const char *s, unsigned int c, size_t nbytes, const mbfl_… in php_mb_safe_strrchr_ex() argument
4287 if (nbytes == (size_t)-1) { in php_mb_safe_strrchr_ex()
4304 register size_t bcnt = nbytes; in php_mb_safe_strrchr_ex()
4323 MBSTRING_API char *php_mb_safe_strrchr(const char *s, unsigned int c, size_t nbytes) in php_mb_safe_strrchr() argument
4325 return php_mb_safe_strrchr_ex(s, c, nbytes, MBSTRG(internal_encoding)); in php_mb_safe_strrchr()
/PHP-8.0/ext/fileinfo/
H A Dlibmagic.patch1395 - if (file_buffer(ms, -1, 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]);
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) {
3110 + if ((nbytes = php_stream_read(stream, (char *)buf, ms->bytes_max - nbytes)) < 0) {
[all …]
/PHP-8.0/ext/iconv/
H A Diconv.c116 static php_iconv_err_t _php_iconv_strlen(size_t *pretval, const char *str, size_t nbytes, const cha…
118 static php_iconv_err_t _php_iconv_substr(smart_str *pretval, const char *str, size_t nbytes, zend_l…
540 static php_iconv_err_t _php_iconv_strlen(size_t *pretval, const char *str, size_t nbytes, const cha… in _php_iconv_strlen() argument
571 more = nbytes > 0; in _php_iconv_strlen()
573 for (in_p = str, in_left = nbytes, cnt = 0; more;) { in _php_iconv_strlen()
616 const char *str, size_t nbytes, zend_long offset, zend_long len, const char *enc) in _php_iconv_substr() argument
634 err = _php_iconv_strlen(&total_len, str, nbytes, enc); in _php_iconv_substr()
678 more = nbytes > 0 && len > 0; in _php_iconv_substr()
680 for (in_p = str, in_left = nbytes, cnt = 0; more; ++cnt) { in _php_iconv_substr()
/PHP-8.0/ext/pgsql/
H A Dpgsql.c2584 int nbytes, argc = ZEND_NUM_ARGS(); in PHP_FUNCTION() local
2601 if ((nbytes = lo_read((PGconn *)pgsql->conn, pgsql->lofd, ZSTR_VAL(buf), ZSTR_LEN(buf)))<0) { in PHP_FUNCTION()
2606 ZSTR_LEN(buf) = nbytes; in PHP_FUNCTION()
2619 size_t str_len, nbytes; in PHP_FUNCTION() local
2646 if ((nbytes = lo_write((PGconn *)pgsql->conn, pgsql->lofd, str, len)) == (size_t)-1) { in PHP_FUNCTION()
2650 RETURN_LONG(nbytes); in PHP_FUNCTION()
2659 volatile int nbytes; in PHP_FUNCTION() local
2672 while ((nbytes = lo_read((PGconn *)pgsql->conn, pgsql->lofd, buf, PGSQL_LO_READ_BUF_SIZE))>0) { in PHP_FUNCTION()
2673 PHPWRITE(buf, nbytes); in PHP_FUNCTION()
2674 tbytes += nbytes; in PHP_FUNCTION()
/PHP-8.0/ext/standard/
H A Dbasic_functions.c1460 size_t nbytes; local
1479 nbytes = php_stream_write(stream, message, message_len);
1481 if (nbytes != message_len) {
/PHP-8.0/ext/odbc/
H A Dphp_odbc.c1099 int fp, nbytes; in PHP_FUNCTION() local
1103 while ((nbytes = read(fp, &buf, 4096)) > 0) { in PHP_FUNCTION()
1104 SQLPutData(result->stmt, (void*)&buf, nbytes); in PHP_FUNCTION()

Completed in 133 milliseconds