/PHP-8.1/ext/fileinfo/libmagic/ |
H A D | encoding.c | 80 size_t nbytes = b->flen; in file_encoding() local 97 if (nbytes > ms->encoding_max) in file_encoding() 98 nbytes = ms->encoding_max; in file_encoding() 106 mlen = (nbytes + 1) * sizeof(nbuf[0]); in file_encoding() 158 from_ebcdic(buf, nbytes, nbuf); in file_encoding() 274 for (i = 0; i < nbytes; i++) { \ 373 for (i = 0; i < nbytes; i++) { in file_looks_utf8() 414 if (i >= nbytes) in file_looks_utf8() 478 if (nbytes < 2) in looks_ucs16() 517 if (nbytes < 4) in looks_ucs32() [all …]
|
H A D | ascmagic.c | 62 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() 210 if (seen_cr && nbytes < ms->bytes_max) in file_ascmagic_with_encoding()
|
H A D | is_tar.c | 66 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 D | softmagic.c | 838 size_t nbytes = b->flen; in moffset() local 1320 if (offset > nbytes) in mcopy() 1389 if (offset >= nbytes) in mcopy() 1420 if (offset >= nbytes) { in mcopy() 1425 nbytes = nbytes - offset; in mcopy() 1427 nbytes = sizeof(*p); in mcopy() 1435 if (nbytes < sizeof(*p)) in mcopy() 1437 sizeof(*p) - nbytes); in mcopy() 1812 if (nbytes < offset) in mget() 1822 if (nbytes < offset) in mget() [all …]
|
H A D | magic.c | 192 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 D | compress.c | 258 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 D | der.c | 265 der_offs(struct magic_set *ms, struct magic *m, size_t nbytes) in der_offs() argument 268 size_t offs = 0, len = ms->search.s_len ? ms->search.s_len : nbytes; in der_offs() 293 if (offs + tlen > nbytes) in der_offs()
|
H A D | elfclass.h | 27 if (nbytes <= sizeof(elfhdr))
|
H A D | readcdf.c | 536 size_t nbytes = b->flen; in file_trycdf() local 549 info.i_len = nbytes; in file_trycdf()
|
/PHP-8.1/ext/gd/libgd/ |
H A D | gd_jpeg.c | 613 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.1/ext/mbstring/ |
H A D | mbstring.h | 57 size_t nbytes, const mbfl_encoding *enc); 59 size_t nbytes);
|
H A D | mbstring.c | 4289 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 4294 if (nbytes == (size_t)-1) { in php_mb_safe_strrchr_ex() 4311 size_t bcnt = nbytes; in php_mb_safe_strrchr_ex() 4330 MBSTRING_API char *php_mb_safe_strrchr(const char *s, unsigned int c, size_t nbytes) in php_mb_safe_strrchr() argument 4332 return php_mb_safe_strrchr_ex(s, c, nbytes, MBSTRG(internal_encoding)); in php_mb_safe_strrchr()
|
/PHP-8.1/ext/iconv/ |
H A D | iconv.c | 124 static php_iconv_err_t _php_iconv_strlen(size_t *pretval, const char *str, size_t nbytes, const cha… 126 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-8.1/ext/fileinfo/ |
H A D | libmagic.patch | 1358 - if (file_buffer(ms, -1, NULL, NULL, buf, nbytes) == -1) { 1359 + if (file_buffer(ms, NULL, NULL, NULL, buf, nbytes) == -1) { 1480 nbytes = ms->encoding_max; 1482 mlen = (nbytes + 1) * sizeof((*ubuf)[0]); 1489 mlen = (nbytes + 1) * sizeof(nbuf[0]); 2808 - while ((r = sread(fd, RCAST(void *, &buf[nbytes]), 2809 - CAST(size_t, ms->bytes_max - nbytes), 1)) > 0) { 2810 - nbytes += r; 2815 - if (nbytes == 0 && inname) { 2838 + if ((nbytes = php_stream_read(stream, (char *)buf, ms->bytes_max - nbytes)) < 0) { [all …]
|
/PHP-8.1/ext/pgsql/ |
H A D | pgsql.c | 2585 int nbytes; in PHP_FUNCTION() local 2602 if ((nbytes = lo_read((PGconn *)pgsql->conn, pgsql->lofd, ZSTR_VAL(buf), ZSTR_LEN(buf)))<0) { in PHP_FUNCTION() 2608 ZSTR_LEN(buf) = nbytes; in PHP_FUNCTION() 2621 size_t nbytes; in PHP_FUNCTION() local 2647 if ((nbytes = lo_write((PGconn *)pgsql->conn, pgsql->lofd, ZSTR_VAL(str), len)) == (size_t)-1) { in PHP_FUNCTION() 2651 RETURN_LONG(nbytes); in PHP_FUNCTION() 2660 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.1/ext/standard/ |
H A D | basic_functions.c | 1459 size_t nbytes; local 1478 nbytes = php_stream_write(stream, message, message_len); 1480 if (nbytes != message_len) {
|
/PHP-8.1/ext/odbc/ |
H A D | php_odbc.c | 1104 int fp, nbytes; in PHP_FUNCTION() local 1108 while ((nbytes = read(fp, &buf, 4096)) > 0) { in PHP_FUNCTION() 1109 SQLPutData(result->stmt, (void*)&buf, nbytes); in PHP_FUNCTION()
|