Lines Matching refs:ubuf

76     file_unichar_t **ubuf, size_t *ulen, const char **code,  in file_encoding()  argument
87 if (ubuf == NULL) in file_encoding()
88 ubuf = &udefbuf; in file_encoding()
100 mlen = (nbytes + 1) * sizeof((*ubuf)[0]); in file_encoding()
101 *ubuf = CAST(file_unichar_t *, ecalloc(CAST(size_t, 1), mlen)); in file_encoding()
102 if (*ubuf == NULL) { in file_encoding()
113 if (looks_ascii(buf, nbytes, *ubuf, ulen)) { in file_encoding()
114 if (looks_utf7(buf, nbytes, *ubuf, ulen) > 0) { in file_encoding()
123 } else if (looks_utf8_with_BOM(buf, nbytes, *ubuf, ulen) > 0) { in file_encoding()
127 } else if (file_looks_utf8(buf, nbytes, *ubuf, ulen) > 1) { in file_encoding()
131 } else if ((ucs_type = looks_ucs32(buf, nbytes, *ubuf, ulen)) != 0) { in file_encoding()
140 } else if ((ucs_type = looks_ucs16(buf, nbytes, *ubuf, ulen)) != 0) { in file_encoding()
149 } else if (looks_latin1(buf, nbytes, *ubuf, ulen)) { in file_encoding()
153 } else if (looks_extended(buf, nbytes, *ubuf, ulen)) { in file_encoding()
160 if (looks_ascii(nbuf, nbytes, *ubuf, ulen)) { in file_encoding()
164 } else if (looks_latin1(nbuf, nbytes, *ubuf, ulen)) { in file_encoding()
178 if (ubuf == &udefbuf) in file_encoding()
265 looks_ ## NAME(const unsigned char *buf, size_t nbytes, file_unichar_t *ubuf, \
280 ubuf[(*ulen)++] = buf[i]; \
362 file_looks_utf8(const unsigned char *buf, size_t nbytes, file_unichar_t *ubuf, in file_looks_utf8() argument
370 if (ubuf) in file_looks_utf8()
383 if (ubuf) in file_looks_utf8()
384 ubuf[(*ulen)++] = buf[i]; in file_looks_utf8()
427 if (ubuf) in file_looks_utf8()
428 ubuf[(*ulen)++] = c; in file_looks_utf8()
443 file_unichar_t *ubuf, size_t *ulen) in looks_utf8_with_BOM() argument
446 return file_looks_utf8(buf + 3, nbytes - 3, ubuf, ulen); in looks_utf8_with_BOM()
452 looks_utf7(const unsigned char *buf, size_t nbytes, file_unichar_t *ubuf, in looks_utf7() argument
461 if (ubuf) in looks_utf7()