Lines Matching refs:nbytes

73 	size_t nbytes = b->flen;  in file_encoding()  local
90 mlen = (nbytes + 1) * sizeof((*ubuf)[0]); in file_encoding()
95 mlen = (nbytes + 1) * sizeof(nbuf[0]); in file_encoding()
101 if (looks_ascii(buf, nbytes, *ubuf, ulen)) { in file_encoding()
102 if (looks_utf7(buf, nbytes, *ubuf, ulen) > 0) { in file_encoding()
111 } else if (looks_utf8_with_BOM(buf, nbytes, *ubuf, ulen) > 0) { in file_encoding()
115 } else if (file_looks_utf8(buf, nbytes, *ubuf, ulen) > 1) { in file_encoding()
119 } else if ((ucs_type = looks_ucs16(buf, nbytes, *ubuf, ulen)) != 0) { in file_encoding()
128 } else if (looks_latin1(buf, nbytes, *ubuf, ulen)) { in file_encoding()
132 } else if (looks_extended(buf, nbytes, *ubuf, ulen)) { in file_encoding()
137 from_ebcdic(buf, nbytes, nbuf); in file_encoding()
139 if (looks_ascii(nbuf, nbytes, *ubuf, ulen)) { in file_encoding()
143 } else if (looks_latin1(nbuf, nbytes, *ubuf, ulen)) { in file_encoding()
243 looks_ascii(const unsigned char *buf, size_t nbytes, unichar *ubuf, in looks_ascii() argument
250 for (i = 0; i < nbytes; i++) { in looks_ascii()
263 looks_latin1(const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t *ulen) in looks_latin1() argument
269 for (i = 0; i < nbytes; i++) { in looks_latin1()
282 looks_extended(const unsigned char *buf, size_t nbytes, unichar *ubuf, in looks_extended() argument
289 for (i = 0; i < nbytes; i++) { in looks_extended()
313 file_looks_utf8(const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t *ulen) in file_looks_utf8() argument
323 for (i = 0; i < nbytes; i++) { in file_looks_utf8()
360 if (i >= nbytes) in file_looks_utf8()
384 looks_utf8_with_BOM(const unsigned char *buf, size_t nbytes, unichar *ubuf, in looks_utf8_with_BOM() argument
387 if (nbytes > 3 && buf[0] == 0xef && buf[1] == 0xbb && buf[2] == 0xbf) in looks_utf8_with_BOM()
388 return file_looks_utf8(buf + 3, nbytes - 3, ubuf, ulen); in looks_utf8_with_BOM()
394 looks_utf7(const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t *ulen) in looks_utf7() argument
396 if (nbytes > 4 && buf[0] == '+' && buf[1] == '/' && buf[2] == 'v') in looks_utf7()
413 looks_ucs16(const unsigned char *buf, size_t nbytes, unichar *ubuf, in looks_ucs16() argument
419 if (nbytes < 2) in looks_ucs16()
431 for (i = 2; i + 1 < nbytes; i += 2) { in looks_ucs16()
534 from_ebcdic(const unsigned char *buf, size_t nbytes, unsigned char *out) in from_ebcdic() argument
538 for (i = 0; i < nbytes; i++) { in from_ebcdic()