/PHP-7.4/ext/fileinfo/libmagic/ |
H A D | encoding.c | 96 mlen = (nbytes + 1) * sizeof(nbuf[0]); in file_encoding() 148 from_ebcdic(buf, nbytes, nbuf); in file_encoding() 261 for (i = 0; i < nbytes; i++) { in looks_ascii() 280 for (i = 0; i < nbytes; i++) { in looks_latin1() 300 for (i = 0; i < nbytes; i++) { in looks_extended() 334 for (i = 0; i < nbytes; i++) { in file_looks_utf8() 371 if (i >= nbytes) in file_looks_utf8() 430 if (nbytes < 2) in looks_ucs16() 442 for (i = 2; i + 1 < nbytes; i += 2) { in looks_ucs16() 469 if (nbytes < 4) in looks_ucs32() [all …]
|
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 | 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 134 nbytes = trim_nuls(buf, nbytes); in file_ascmagic_with_encoding() 137 if (nbytes <= 1) { in file_ascmagic_with_encoding() 205 if (seen_cr && nbytes < ms->bytes_max) in file_ascmagic_with_encoding()
|
H A D | softmagic.c | 834 size_t nbytes = b->flen; in moffset() local 1301 if (offset > nbytes) in mcopy() 1370 if (offset >= nbytes) in mcopy() 1395 if (offset >= nbytes) { in mcopy() 1400 nbytes = nbytes - offset; in mcopy() 1402 nbytes = sizeof(*p); in mcopy() 1410 if (nbytes < sizeof(*p)) in mcopy() 1412 sizeof(*p) - nbytes); in mcopy() 1742 if (nbytes < offset) in mget() 1752 if (nbytes < offset) in mget() [all …]
|
H A D | magic.c | 229 ssize_t nbytes = 0; /* number of bytes read from a datafile */ in file_or_stream() local 279 if ((nbytes = php_stream_read(stream, (char *)buf, ms->bytes_max - nbytes)) < 0) { in file_or_stream() 284 (void)memset(buf + nbytes, 0, SLOP); /* NUL terminate */ in file_or_stream() 285 if (file_buffer(ms, stream, &sb, inname, buf, CAST(size_t, nbytes)) == -1) in file_or_stream()
|
H A D | compress.c | 227 size_t nbytes = b->flen; in file_zmagic() local 236 if (nbytes < compr[i].maglen) in file_zmagic() 258 nsz = nbytes; in file_zmagic() 286 if (file_buffer(ms, NULL, NULL, NULL, buf, nbytes) == -1) { in file_zmagic() 419 size_t nbytes) in file_pipe2file() argument 450 if (swrite(tfd, startbuf, nbytes) != CAST(ssize_t, nbytes)) in file_pipe2file()
|
H A D | der.c | 244 der_offs(struct magic_set *ms, struct magic *m, size_t nbytes) in der_offs() argument 247 size_t offs = 0, len = ms->search.s_len ? ms->search.s_len : nbytes; in der_offs() 268 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-7.4/ext/gd/libgd/ |
H A D | gd_jpeg.c | 616 ssize_t nbytes = 0; in fill_input_buffer() local 622 while (nbytes < INPUT_BUF_SIZE) { in fill_input_buffer() 623 int got = gdGetBuf(src->buffer + nbytes, INPUT_BUF_SIZE - nbytes, src->infile); in fill_input_buffer() 627 if (!nbytes) { in fill_input_buffer() 628 nbytes = -1; in fill_input_buffer() 632 nbytes += got; in fill_input_buffer() 635 if (nbytes <= 0) { in fill_input_buffer() 643 nbytes = 2; in fill_input_buffer() 647 src->pub.bytes_in_buffer = nbytes; in fill_input_buffer()
|
/PHP-7.4/ext/mbstring/ |
H A D | mbstring.h | 115 size_t nbytes, const mbfl_encoding *enc); 117 size_t nbytes);
|
H A D | mbstring.c | 5262 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 5267 if (nbytes == (size_t)-1) { in php_mb_safe_strrchr_ex() 5284 register size_t bcnt = nbytes; in php_mb_safe_strrchr_ex() 5303 MBSTRING_API char *php_mb_safe_strrchr(const char *s, unsigned int c, size_t nbytes) in php_mb_safe_strrchr() argument 5305 return php_mb_safe_strrchr_ex(s, c, nbytes, MBSTRG(internal_encoding)); in php_mb_safe_strrchr()
|
/PHP-7.4/ext/iconv/ |
H A D | iconv.c | 200 static php_iconv_err_t _php_iconv_strlen(size_t *pretval, const char *str, size_t nbytes, const cha… 202 static php_iconv_err_t _php_iconv_substr(smart_str *pretval, const char *str, size_t nbytes, zend_l… 712 static php_iconv_err_t _php_iconv_strlen(size_t *pretval, const char *str, size_t nbytes, const cha… in _php_iconv_strlen() argument 747 more = nbytes > 0; in _php_iconv_strlen() 749 for (in_p = str, in_left = nbytes, cnt = 0; more;) { in _php_iconv_strlen() 796 const char *str, size_t nbytes, zend_long offset, zend_long len, const char *enc) in _php_iconv_substr() argument 814 err = _php_iconv_strlen(&total_len, str, nbytes, enc); in _php_iconv_substr() 867 more = nbytes > 0 && len > 0; in _php_iconv_substr() 869 for (in_p = str, in_left = nbytes, cnt = 0; more; ++cnt) { in _php_iconv_substr()
|
/PHP-7.4/ext/fileinfo/ |
H A D | libmagic.patch | 1463 - if (file_buffer(ms, -1, NULL, NULL, buf, nbytes) == -1) { 1613 - size_t nbytes = b->flen; 1614 + size_t nbytes = b->flen > 64*1024 ? 64*1024 : b->flen; 1621 mlen = (nbytes + 1) * sizeof((*ubuf)[0]); 1627 mlen = (nbytes + 1) * sizeof(nbuf[0]); 2987 - while ((r = sread(fd, RCAST(void *, &buf[nbytes]), 2988 - CAST(size_t, ms->bytes_max - nbytes), 1)) > 0) { 2989 - nbytes += r; 2994 - if (nbytes == 0 && inname) { 3017 + if ((nbytes = php_stream_read(stream, (char *)buf, ms->bytes_max - nbytes)) < 0) { [all …]
|
/PHP-7.4/ext/pgsql/ |
H A D | pgsql.c | 3532 int nbytes, argc = ZEND_NUM_ARGS(); local 3549 if ((nbytes = lo_read((PGconn *)pgsql->conn, pgsql->lofd, ZSTR_VAL(buf), ZSTR_LEN(buf)))<0) { 3554 ZSTR_LEN(buf) = nbytes; 3567 size_t str_len, nbytes; local 3595 if ((nbytes = lo_write((PGconn *)pgsql->conn, pgsql->lofd, str, len)) == (size_t)-1) { 3599 RETURN_LONG(nbytes); 3609 volatile int nbytes; local 3622 while ((nbytes = lo_read((PGconn *)pgsql->conn, pgsql->lofd, buf, PGSQL_LO_READ_BUF_SIZE))>0) { 3623 PHPWRITE(buf, nbytes); 3624 tbytes += nbytes;
|
/PHP-7.4/ext/odbc/ |
H A D | php_odbc.c | 1455 int fp, nbytes; in PHP_FUNCTION() local 1459 while ((nbytes = read(fp, &buf, 4096)) > 0) { in PHP_FUNCTION() 1460 SQLPutData(result->stmt, (void*)&buf, nbytes); in PHP_FUNCTION()
|
/PHP-7.4/ext/standard/ |
H A D | basic_functions.c | 4835 size_t nbytes; local 4855 nbytes = php_stream_write(stream, message, message_len); 4857 if (nbytes != message_len) {
|