Lines Matching refs:ulen

69 …set *ms, const unsigned char *buf, size_t nbytes, unichar **ubuf, size_t *ulen, const char **code,…  in file_encoding()  argument
76 *ulen = 0; in file_encoding()
91 if (looks_ascii(buf, nbytes, *ubuf, ulen)) { in file_encoding()
92 if (looks_utf7(buf, nbytes, *ubuf, ulen) > 0) { in file_encoding()
93 DPRINTF(("utf-7 %" SIZE_T_FORMAT "u\n", *ulen)); in file_encoding()
97 DPRINTF(("ascii %" SIZE_T_FORMAT "u\n", *ulen)); in file_encoding()
101 } else if (looks_utf8_with_BOM(buf, nbytes, *ubuf, ulen) > 0) { in file_encoding()
102 DPRINTF(("utf8/bom %" SIZE_T_FORMAT "u\n", *ulen)); in file_encoding()
105 } else if (file_looks_utf8(buf, nbytes, *ubuf, ulen) > 1) { in file_encoding()
106 DPRINTF(("utf8 %" SIZE_T_FORMAT "u\n", *ulen)); in file_encoding()
109 } else if ((ucs_type = looks_ucs16(buf, nbytes, *ubuf, ulen)) != 0) { in file_encoding()
117 DPRINTF(("ucs16 %" SIZE_T_FORMAT "u\n", *ulen)); in file_encoding()
118 } else if (looks_latin1(buf, nbytes, *ubuf, ulen)) { in file_encoding()
119 DPRINTF(("latin1 %" SIZE_T_FORMAT "u\n", *ulen)); in file_encoding()
122 } else if (looks_extended(buf, nbytes, *ubuf, ulen)) { in file_encoding()
123 DPRINTF(("extended %" SIZE_T_FORMAT "u\n", *ulen)); in file_encoding()
129 if (looks_ascii(nbuf, nbytes, *ubuf, ulen)) { in file_encoding()
130 DPRINTF(("ebcdic %" SIZE_T_FORMAT "u\n", *ulen)); in file_encoding()
133 } else if (looks_latin1(nbuf, nbytes, *ubuf, ulen)) { in file_encoding()
135 *ulen)); in file_encoding()
232 size_t *ulen) in looks_ascii() argument
236 *ulen = 0; in looks_ascii()
244 ubuf[(*ulen)++] = buf[i]; in looks_ascii()
251 looks_latin1(const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t *ulen) in looks_latin1() argument
255 *ulen = 0; in looks_latin1()
263 ubuf[(*ulen)++] = buf[i]; in looks_latin1()
271 size_t *ulen) in looks_extended() argument
275 *ulen = 0; in looks_extended()
283 ubuf[(*ulen)++] = buf[i]; in looks_extended()
301 file_looks_utf8(const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t *ulen) in file_looks_utf8() argument
309 *ulen = 0; in file_looks_utf8()
322 ubuf[(*ulen)++] = buf[i]; in file_looks_utf8()
358 ubuf[(*ulen)++] = c; in file_looks_utf8()
373 size_t *ulen) in looks_utf8_with_BOM() argument
376 return file_looks_utf8(buf + 3, nbytes - 3, ubuf, ulen); in looks_utf8_with_BOM()
382 looks_utf7(const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t *ulen) in looks_utf7() argument
391 *ulen = 0; in looks_utf7()
402 size_t *ulen) in looks_ucs16() argument
417 *ulen = 0; in looks_ucs16()
423 ubuf[(*ulen)++] = buf[i + 1] + 256 * buf[i]; in looks_ucs16()
425 ubuf[(*ulen)++] = buf[i] + 256 * buf[i + 1]; in looks_ucs16()
427 if (ubuf[*ulen - 1] == 0xfffe) in looks_ucs16()
429 if (ubuf[*ulen - 1] < 128 && in looks_ucs16()
430 text_chars[(size_t)ubuf[*ulen - 1]] != T) in looks_ucs16()