Lines Matching refs:nbytes

80 	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()
99 mlen = (nbytes + 1) * sizeof((*ubuf)[0]); in file_encoding()
105 if (looks_ascii(buf, nbytes, *ubuf, ulen)) { in file_encoding()
106 if (looks_utf7(buf, nbytes, *ubuf, ulen) > 0) { in file_encoding()
115 } else if (looks_utf8_with_BOM(buf, nbytes, *ubuf, ulen) > 0) { in file_encoding()
119 } else if (file_looks_utf8(buf, nbytes, *ubuf, ulen) > 1) { in file_encoding()
123 } else if ((ucs_type = looks_ucs32(buf, nbytes, *ubuf, ulen)) != 0) { in file_encoding()
132 } else if ((ucs_type = looks_ucs16(buf, nbytes, *ubuf, ulen)) != 0) { in file_encoding()
141 } else if (looks_latin1(buf, nbytes, *ubuf, ulen)) { in file_encoding()
145 } else if (looks_extended(buf, nbytes, *ubuf, ulen)) { in file_encoding()
152 mlen = (nbytes + 1) * sizeof(nbuf[0]); in file_encoding()
157 from_ebcdic(buf, nbytes, nbuf); in file_encoding()
159 if (looks_ascii(nbuf, nbytes, *ubuf, ulen)) { in file_encoding()
163 } else if (looks_latin1(nbuf, nbytes, *ubuf, ulen)) { in file_encoding()
264 looks_ ## NAME(const unsigned char *buf, size_t nbytes, file_unichar_t *ubuf, \
271 for (i = 0; i < nbytes; i++) { \
350 file_looks_utf8(const unsigned char *buf, size_t nbytes, file_unichar_t *ubuf, in file_looks_utf8() argument
361 for (i = 0; i < nbytes; i++) { in file_looks_utf8()
403 if (i >= nbytes) in file_looks_utf8()
431 looks_utf8_with_BOM(const unsigned char *buf, size_t nbytes, in looks_utf8_with_BOM() argument
434 if (nbytes > 3 && buf[0] == 0xef && buf[1] == 0xbb && buf[2] == 0xbf) in looks_utf8_with_BOM()
435 return file_looks_utf8(buf + 3, nbytes - 3, ubuf, ulen); in looks_utf8_with_BOM()
441 looks_utf7(const unsigned char *buf, size_t nbytes, file_unichar_t *ubuf, in looks_utf7() argument
444 if (nbytes > 4 && buf[0] == '+' && buf[1] == '/' && buf[2] == 'v') in looks_utf7()
465 looks_ucs16(const unsigned char *bf, size_t nbytes, file_unichar_t *ubf, in looks_ucs16() argument
472 if (nbytes < 2) in looks_ucs16()
485 for (i = 2; i + 1 < nbytes; i += 2) { in looks_ucs16()
525 looks_ucs32(const unsigned char *bf, size_t nbytes, file_unichar_t *ubf, in looks_ucs32() argument
531 if (nbytes < 4) in looks_ucs32()
543 for (i = 4; i + 3 < nbytes; i += 4) { in looks_ucs32()
651 from_ebcdic(const unsigned char *buf, size_t nbytes, unsigned char *out) in from_ebcdic() argument
655 for (i = 0; i < nbytes; i++) { in from_ebcdic()