Lines Matching refs:ulen

70     size_t *ulen, const char **code, const char **code_mime, const char **type)  in file_encoding()  argument
82 if (ulen == NULL) in file_encoding()
83 ulen = &udeflen; in file_encoding()
86 *ulen = 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()
103 DPRINTF(("utf-7 %" SIZE_T_FORMAT "u\n", *ulen)); in file_encoding()
107 DPRINTF(("ascii %" SIZE_T_FORMAT "u\n", *ulen)); in file_encoding()
111 } else if (looks_utf8_with_BOM(buf, nbytes, *ubuf, ulen) > 0) { in file_encoding()
112 DPRINTF(("utf8/bom %" SIZE_T_FORMAT "u\n", *ulen)); in file_encoding()
115 } else if (file_looks_utf8(buf, nbytes, *ubuf, ulen) > 1) { in file_encoding()
116 DPRINTF(("utf8 %" SIZE_T_FORMAT "u\n", *ulen)); in file_encoding()
119 } else if ((ucs_type = looks_ucs16(buf, nbytes, *ubuf, ulen)) != 0) { in file_encoding()
127 DPRINTF(("ucs16 %" SIZE_T_FORMAT "u\n", *ulen)); in file_encoding()
128 } else if (looks_latin1(buf, nbytes, *ubuf, ulen)) { in file_encoding()
129 DPRINTF(("latin1 %" SIZE_T_FORMAT "u\n", *ulen)); in file_encoding()
132 } else if (looks_extended(buf, nbytes, *ubuf, ulen)) { in file_encoding()
133 DPRINTF(("extended %" SIZE_T_FORMAT "u\n", *ulen)); in file_encoding()
139 if (looks_ascii(nbuf, nbytes, *ubuf, ulen)) { in file_encoding()
140 DPRINTF(("ebcdic %" SIZE_T_FORMAT "u\n", *ulen)); in file_encoding()
143 } else if (looks_latin1(nbuf, nbytes, *ubuf, ulen)) { in file_encoding()
145 *ulen)); in file_encoding()
244 size_t *ulen) in looks_ascii() argument
248 *ulen = 0; in looks_ascii()
256 ubuf[(*ulen)++] = buf[i]; in looks_ascii()
263 looks_latin1(const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t *ulen) in looks_latin1() argument
267 *ulen = 0; in looks_latin1()
275 ubuf[(*ulen)++] = buf[i]; in looks_latin1()
283 size_t *ulen) in looks_extended() argument
287 *ulen = 0; in looks_extended()
295 ubuf[(*ulen)++] = buf[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
321 *ulen = 0; in file_looks_utf8()
334 ubuf[(*ulen)++] = buf[i]; in file_looks_utf8()
370 ubuf[(*ulen)++] = c; in file_looks_utf8()
385 size_t *ulen) in looks_utf8_with_BOM() argument
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
403 *ulen = 0; in looks_utf7()
414 size_t *ulen) in looks_ucs16() argument
429 *ulen = 0; in looks_ucs16()
435 ubuf[(*ulen)++] = buf[i + 1] + 256 * buf[i]; in looks_ucs16()
437 ubuf[(*ulen)++] = buf[i] + 256 * buf[i + 1]; in looks_ucs16()
439 if (ubuf[*ulen - 1] == 0xfffe) in looks_ucs16()
441 if (ubuf[*ulen - 1] < 128 && in looks_ucs16()
442 text_chars[(size_t)ubuf[*ulen - 1]] != T) in looks_ucs16()