Lines Matching refs:nbytes

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()
100 mlen = (nbytes + 1) * sizeof((*ubuf)[0]); in file_encoding()
106 mlen = (nbytes + 1) * sizeof(nbuf[0]); in file_encoding()
113 if (looks_ascii(buf, nbytes, *ubuf, ulen)) { in file_encoding()
114 if (looks_utf7(buf, nbytes, *ubuf, ulen) > 0) { in file_encoding()
123 } else if (looks_utf8_with_BOM(buf, nbytes, *ubuf, ulen) > 0) { in file_encoding()
127 } else if (file_looks_utf8(buf, nbytes, *ubuf, ulen) > 1) { in file_encoding()
131 } else if ((ucs_type = looks_ucs32(buf, nbytes, *ubuf, ulen)) != 0) { in file_encoding()
140 } else if ((ucs_type = looks_ucs16(buf, nbytes, *ubuf, ulen)) != 0) { in file_encoding()
149 } else if (looks_latin1(buf, nbytes, *ubuf, ulen)) { in file_encoding()
153 } else if (looks_extended(buf, nbytes, *ubuf, ulen)) { in file_encoding()
158 from_ebcdic(buf, nbytes, nbuf); in file_encoding()
160 if (looks_ascii(nbuf, nbytes, *ubuf, ulen)) { in file_encoding()
164 } else if (looks_latin1(nbuf, nbytes, *ubuf, ulen)) { in file_encoding()
265 looks_ ## NAME(const unsigned char *buf, size_t nbytes, file_unichar_t *ubuf, \
274 for (i = 0; i < nbytes; i++) { \
362 file_looks_utf8(const unsigned char *buf, size_t nbytes, file_unichar_t *ubuf, in file_looks_utf8() argument
373 for (i = 0; i < nbytes; i++) { in file_looks_utf8()
414 if (i >= nbytes) in file_looks_utf8()
442 looks_utf8_with_BOM(const unsigned char *buf, size_t nbytes, in looks_utf8_with_BOM() argument
445 if (nbytes > 3 && buf[0] == 0xef && buf[1] == 0xbb && buf[2] == 0xbf) in looks_utf8_with_BOM()
446 return file_looks_utf8(buf + 3, nbytes - 3, ubuf, ulen); in looks_utf8_with_BOM()
452 looks_utf7(const unsigned char *buf, size_t nbytes, file_unichar_t *ubuf, in looks_utf7() argument
455 if (nbytes > 4 && buf[0] == '+' && buf[1] == '/' && buf[2] == 'v') in looks_utf7()
472 looks_ucs16(const unsigned char *bf, size_t nbytes, file_unichar_t *ubf, in looks_ucs16() argument
478 if (nbytes < 2) in looks_ucs16()
490 for (i = 2; i + 1 < nbytes; i += 2) { in looks_ucs16()
511 looks_ucs32(const unsigned char *bf, size_t nbytes, file_unichar_t *ubf, in looks_ucs32() argument
517 if (nbytes < 4) in looks_ucs32()
529 for (i = 4; i + 3 < nbytes; i += 4) { in looks_ucs32()
637 from_ebcdic(const unsigned char *buf, size_t nbytes, unsigned char *out) in from_ebcdic() argument
641 for (i = 0; i < nbytes; i++) { in from_ebcdic()