Lines Matching refs:ubuf

76     file_unichar_t **ubuf, size_t *ulen, const char **code,  in file_encoding()  argument
86 if (ubuf == NULL) in file_encoding()
87 ubuf = &udefbuf; in file_encoding()
99 mlen = (nbytes + 1) * sizeof((*ubuf)[0]); in file_encoding()
100 *ubuf = CAST(file_unichar_t *, calloc(CAST(size_t, 1), mlen)); in file_encoding()
101 if (*ubuf == NULL) { in file_encoding()
105 if (looks_ascii(buf, nbytes, *ubuf, ulen)) { in file_encoding()
106 if (looks_utf7(buf, nbytes, *ubuf, ulen) > 0) { in file_encoding()
115 } else if (looks_utf8_with_BOM(buf, nbytes, *ubuf, ulen) > 0) { in file_encoding()
119 } else if (file_looks_utf8(buf, nbytes, *ubuf, ulen) > 1) { in file_encoding()
123 } else if ((ucs_type = looks_ucs32(buf, nbytes, *ubuf, ulen)) != 0) { in file_encoding()
132 } else if ((ucs_type = looks_ucs16(buf, nbytes, *ubuf, ulen)) != 0) { in file_encoding()
141 } else if (looks_latin1(buf, nbytes, *ubuf, ulen)) { in file_encoding()
145 } else if (looks_extended(buf, nbytes, *ubuf, ulen)) { in file_encoding()
159 if (looks_ascii(nbuf, nbytes, *ubuf, ulen)) { in file_encoding()
163 } else if (looks_latin1(nbuf, nbytes, *ubuf, ulen)) { in file_encoding()
177 if (ubuf == &udefbuf) in file_encoding()
264 looks_ ## NAME(const unsigned char *buf, size_t nbytes, file_unichar_t *ubuf, \
277 ubuf[(*ulen)++] = buf[i]; \
350 file_looks_utf8(const unsigned char *buf, size_t nbytes, file_unichar_t *ubuf, in file_looks_utf8() argument
358 if (ubuf) in file_looks_utf8()
371 if (ubuf) in file_looks_utf8()
372 ubuf[(*ulen)++] = buf[i]; in file_looks_utf8()
416 if (ubuf) in file_looks_utf8()
417 ubuf[(*ulen)++] = c; in file_looks_utf8()
432 file_unichar_t *ubuf, size_t *ulen) in looks_utf8_with_BOM() argument
435 return file_looks_utf8(buf + 3, nbytes - 3, ubuf, ulen); in looks_utf8_with_BOM()
441 looks_utf7(const unsigned char *buf, size_t nbytes, file_unichar_t *ubuf, in looks_utf7() argument
450 if (ubuf) in looks_utf7()