Lines Matching refs:nbytes

86 	size_t nbytes = b->flen;  in file_encoding()  local
102 if (nbytes > ms->encoding_max) in file_encoding()
103 nbytes = ms->encoding_max; in file_encoding()
105 mlen = (nbytes + 1) * sizeof((*ubuf)[0]); in file_encoding()
111 if (looks_ascii(buf, nbytes, *ubuf, ulen)) { in file_encoding()
112 if (looks_utf7(buf, nbytes, *ubuf, ulen) > 0) { in file_encoding()
121 } else if (looks_utf8_with_BOM(buf, nbytes, *ubuf, ulen) > 0) { in file_encoding()
125 } else if (file_looks_utf8(buf, nbytes, *ubuf, ulen) > 1) { in file_encoding()
129 } else if ((ucs_type = looks_ucs32(buf, nbytes, *ubuf, ulen)) != 0) { in file_encoding()
138 } else if ((ucs_type = looks_ucs16(buf, nbytes, *ubuf, ulen)) != 0) { in file_encoding()
147 } else if (looks_latin1(buf, nbytes, *ubuf, ulen)) { in file_encoding()
151 } else if (looks_extended(buf, nbytes, *ubuf, ulen)) { in file_encoding()
158 mlen = (nbytes + 1) * sizeof(nbuf[0]); in file_encoding()
163 from_ebcdic(buf, nbytes, nbuf); in file_encoding()
165 if (looks_ascii(nbuf, nbytes, *ubuf, ulen)) { in file_encoding()
169 } else if (looks_latin1(nbuf, nbytes, *ubuf, ulen)) { in file_encoding()
270 looks_ ## NAME(const unsigned char *buf, size_t nbytes, file_unichar_t *ubuf, \
277 for (i = 0; i < nbytes; i++) { \
356 file_looks_utf8(const unsigned char *buf, size_t nbytes, file_unichar_t *ubuf, in file_looks_utf8() argument
367 for (i = 0; i < nbytes; i++) { in file_looks_utf8()
409 if (i >= nbytes) in file_looks_utf8()
437 looks_utf8_with_BOM(const unsigned char *buf, size_t nbytes, in looks_utf8_with_BOM() argument
440 if (nbytes > 3 && buf[0] == 0xef && buf[1] == 0xbb && buf[2] == 0xbf) in looks_utf8_with_BOM()
441 return file_looks_utf8(buf + 3, nbytes - 3, ubuf, ulen); in looks_utf8_with_BOM()
447 looks_utf7(const unsigned char *buf, size_t nbytes, file_unichar_t *ubuf, in looks_utf7() argument
450 if (nbytes > 4 && buf[0] == '+' && buf[1] == '/' && buf[2] == 'v') in looks_utf7()
471 looks_ucs16(const unsigned char *bf, size_t nbytes, file_unichar_t *ubf, in looks_ucs16() argument
478 if (nbytes < 2) in looks_ucs16()
491 for (i = 2; i + 1 < nbytes; i += 2) { in looks_ucs16()
531 looks_ucs32(const unsigned char *bf, size_t nbytes, file_unichar_t *ubf, in looks_ucs32() argument
537 if (nbytes < 4) in looks_ucs32()
549 for (i = 4; i + 3 < nbytes; i += 4) { in looks_ucs32()
657 from_ebcdic(const unsigned char *buf, size_t nbytes, unsigned char *out) in from_ebcdic() argument
661 for (i = 0; i < nbytes; i++) { in from_ebcdic()