Home
last modified time | relevance | path

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

/PHP-8.3/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 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()
212 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
110 if (nbytes < sizeof(*header)) in is_tar()
H A Dsoftmagic.c843 size_t nbytes = b->flen; in moffset() local
1339 if (offset > nbytes) in mcopy()
1408 if (offset >= nbytes) in mcopy()
1439 if (offset >= nbytes) { in mcopy()
1444 nbytes = nbytes - offset; in mcopy()
1446 nbytes = sizeof(*p); in mcopy()
1454 if (nbytes < sizeof(*p)) in mcopy()
1456 sizeof(*p) - nbytes); in mcopy()
1847 if (nbytes < offset) in mget()
1857 if (nbytes < offset) in mget()
[all …]
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 Dcompress.c262 size_t nbytes = b->flen; in file_zmagic() local
271 if (nbytes < CAST(size_t, abs(compr[i].maglen))) in file_zmagic()
292 nsz = nbytes; in file_zmagic()
320 if (file_buffer(ms, NULL, NULL, NULL, buf, nbytes) == -1) { in file_zmagic()
453 size_t nbytes) in file_pipe2file() argument
499 if (swrite(tfd, startbuf, nbytes) != CAST(ssize_t, nbytes)) in file_pipe2file()
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 Dreadcdf.c534 size_t nbytes = b->flen; in file_trycdf() local
547 info.i_len = nbytes; in file_trycdf()
/PHP-8.3/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.3/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.c5715 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
5720 if (nbytes == (size_t)-1) { in php_mb_safe_strrchr()
5737 size_t bcnt = nbytes; in php_mb_safe_strrchr()
/PHP-8.3/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-8.3/ext/fileinfo/
H A Dlibmagic.patch1256 - if (file_buffer(ms, -1, NULL, NULL, buf, nbytes) == -1) {
1257 + if (file_buffer(ms, NULL, NULL, NULL, buf, nbytes) == -1) {
1369 nbytes = ms->encoding_max;
1371 mlen = (nbytes + 1) * sizeof((*ubuf)[0]);
1380 mlen = (nbytes + 1) * sizeof(nbuf[0]);
2589 - while ((r = sread(fd, RCAST(void *, &buf[nbytes]),
2590 - CAST(size_t, ms->bytes_max - nbytes), 1)) > 0) {
2591 - nbytes += r;
2596 - if (nbytes == 0 && inname) {
2619 + if ((nbytes = php_stream_read(stream, (char *)buf, ms->bytes_max - nbytes)) < 0) {
[all …]
/PHP-8.3/main/streams/
H A Dstreams.c1650 size_t nbytes = (size_t)result; in _php_stream_copy_to_stream_ex() local
1651 haveread += nbytes; in _php_stream_copy_to_stream_ex()
1653 src->position += nbytes; in _php_stream_copy_to_stream_ex()
1654 dest->position += nbytes; in _php_stream_copy_to_stream_ex()
1656 if ((maxlen != PHP_STREAM_COPY_ALL && nbytes == maxlen) || php_stream_eof(src)) { in _php_stream_copy_to_stream_ex()
/PHP-8.3/ext/pgsql/
H A Dpgsql.c2506 int nbytes; in PHP_FUNCTION() local
2523 if ((nbytes = lo_read((PGconn *)pgsql->conn, pgsql->lofd, ZSTR_VAL(buf), ZSTR_LEN(buf)))<0) { in PHP_FUNCTION()
2528 ZSTR_VAL(buf)[nbytes] = '\0'; in PHP_FUNCTION()
2529 buf = zend_string_truncate(buf, nbytes, 0); in PHP_FUNCTION()
2541 size_t nbytes; in PHP_FUNCTION() local
2567 if ((nbytes = lo_write((PGconn *)pgsql->conn, pgsql->lofd, ZSTR_VAL(str), len)) == (size_t)-1) { in PHP_FUNCTION()
2571 RETURN_LONG(nbytes); in PHP_FUNCTION()
2580 volatile int nbytes; in PHP_FUNCTION() local
2592 while ((nbytes = lo_read((PGconn *)pgsql->conn, pgsql->lofd, buf, PGSQL_LO_READ_BUF_SIZE))>0) { in PHP_FUNCTION()
2593 PHPWRITE(buf, nbytes); in PHP_FUNCTION()
[all …]
/PHP-8.3/ext/standard/
H A Dbasic_functions.c1397 size_t nbytes; local
1416 nbytes = php_stream_write(stream, message, message_len);
1418 if (nbytes != message_len) {
/PHP-8.3/ext/odbc/
H A Dphp_odbc.c1032 int fp, nbytes; in PHP_FUNCTION() local
1036 while ((nbytes = read(fp, &buf, 4096)) > 0) { in PHP_FUNCTION()
1037 SQLPutData(result->stmt, (void*)&buf, nbytes); in PHP_FUNCTION()

Completed in 90 milliseconds