Lines Matching refs:ulen

68 …set *ms, const unsigned char *buf, size_t nbytes, unichar **ubuf, size_t *ulen, const char **code,…  in file_encoding()  argument
75 *ulen = 0; in file_encoding()
90 if (looks_ascii(buf, nbytes, *ubuf, ulen)) { in file_encoding()
91 DPRINTF(("ascii %" SIZE_T_FORMAT "u\n", *ulen)); in file_encoding()
94 } else if (looks_utf8_with_BOM(buf, nbytes, *ubuf, ulen) > 0) { in file_encoding()
95 DPRINTF(("utf8/bom %" SIZE_T_FORMAT "u\n", *ulen)); in file_encoding()
98 } else if (file_looks_utf8(buf, nbytes, *ubuf, ulen) > 1) { in file_encoding()
99 DPRINTF(("utf8 %" SIZE_T_FORMAT "u\n", *ulen)); in file_encoding()
103 } else if ((ucs_type = looks_ucs16(buf, nbytes, *ubuf, ulen)) != 0) { in file_encoding()
111 DPRINTF(("ucs16 %" SIZE_T_FORMAT "u\n", *ulen)); in file_encoding()
112 } else if (looks_latin1(buf, nbytes, *ubuf, ulen)) { in file_encoding()
113 DPRINTF(("latin1 %" SIZE_T_FORMAT "u\n", *ulen)); in file_encoding()
116 } else if (looks_extended(buf, nbytes, *ubuf, ulen)) { in file_encoding()
117 DPRINTF(("extended %" SIZE_T_FORMAT "u\n", *ulen)); in file_encoding()
123 if (looks_ascii(nbuf, nbytes, *ubuf, ulen)) { in file_encoding()
124 DPRINTF(("ebcdic %" SIZE_T_FORMAT "u\n", *ulen)); in file_encoding()
127 } else if (looks_latin1(nbuf, nbytes, *ubuf, ulen)) { in file_encoding()
129 *ulen)); in file_encoding()
226 size_t *ulen) in looks_ascii() argument
230 *ulen = 0; in looks_ascii()
238 ubuf[(*ulen)++] = buf[i]; in looks_ascii()
245 looks_latin1(const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t *ulen) in looks_latin1() argument
249 *ulen = 0; in looks_latin1()
257 ubuf[(*ulen)++] = buf[i]; in looks_latin1()
265 size_t *ulen) in looks_extended() argument
269 *ulen = 0; in looks_extended()
277 ubuf[(*ulen)++] = buf[i]; in looks_extended()
295 file_looks_utf8(const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t *ulen) in file_looks_utf8() argument
303 *ulen = 0; in file_looks_utf8()
316 ubuf[(*ulen)++] = buf[i]; in file_looks_utf8()
352 ubuf[(*ulen)++] = c; in file_looks_utf8()
367 size_t *ulen) in looks_utf8_with_BOM() argument
370 return file_looks_utf8(buf + 3, nbytes - 3, ubuf, ulen); in looks_utf8_with_BOM()
377 size_t *ulen) in looks_ucs16() argument
392 *ulen = 0; in looks_ucs16()
398 ubuf[(*ulen)++] = buf[i + 1] + 256 * buf[i]; in looks_ucs16()
400 ubuf[(*ulen)++] = buf[i] + 256 * buf[i + 1]; in looks_ucs16()
402 if (ubuf[*ulen - 1] == 0xfffe) in looks_ucs16()
404 if (ubuf[*ulen - 1] < 128 && in looks_ucs16()
405 text_chars[(size_t)ubuf[*ulen - 1]] != T) in looks_ucs16()