Lines Matching refs:nbytes
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()
71 file_ascmagic(struct magic_set *ms, const unsigned char *buf, size_t nbytes, in file_ascmagic() argument
85 nbytes = trim_nuls(buf, nbytes); in file_ascmagic()
88 if (file_encoding(ms, buf, nbytes, &ubuf, &ulen, &code, &code_mime, in file_ascmagic()
92 rv = file_ascmagic_with_encoding(ms, buf, nbytes, ubuf, ulen, code, in file_ascmagic()
102 size_t nbytes, unichar *ubuf, size_t ulen, const char *code, in file_ascmagic_with_encoding() argument
129 nbytes = trim_nuls(buf, nbytes); in file_ascmagic_with_encoding()
132 if (nbytes <= 1) { in file_ascmagic_with_encoding()
188 if (seen_cr && nbytes < HOWMANY) in file_ascmagic_with_encoding()