Lines Matching defs:ulen

65  * ubuf, and the number of characters converted in ulen.
68 file_encoding(struct magic_set *ms, const unsigned char *buf, size_t nbytes, unichar **ubuf, size_t *ulen, const char **code, const char **code_mime, const char **type)
75 *ulen = 0;
90 if (looks_ascii(buf, nbytes, *ubuf, ulen)) {
91 DPRINTF(("ascii %" SIZE_T_FORMAT "u\n", *ulen));
94 } else if (looks_utf8_with_BOM(buf, nbytes, *ubuf, ulen) > 0) {
95 DPRINTF(("utf8/bom %" SIZE_T_FORMAT "u\n", *ulen));
98 } else if (file_looks_utf8(buf, nbytes, *ubuf, ulen) > 1) {
99 DPRINTF(("utf8 %" SIZE_T_FORMAT "u\n", *ulen));
102 } else if ((ucs_type = looks_ucs16(buf, nbytes, *ubuf, ulen)) != 0) {
110 DPRINTF(("ucs16 %" SIZE_T_FORMAT "u\n", *ulen));
111 } else if (looks_latin1(buf, nbytes, *ubuf, ulen)) {
112 DPRINTF(("latin1 %" SIZE_T_FORMAT "u\n", *ulen));
115 } else if (looks_extended(buf, nbytes, *ubuf, ulen)) {
116 DPRINTF(("extended %" SIZE_T_FORMAT "u\n", *ulen));
122 if (looks_ascii(nbuf, nbytes, *ubuf, ulen)) {
123 DPRINTF(("ebcdic %" SIZE_T_FORMAT "u\n", *ulen));
126 } else if (looks_latin1(nbuf, nbytes, *ubuf, ulen)) {
128 *ulen));
225 size_t *ulen)
229 *ulen = 0;
237 ubuf[(*ulen)++] = buf[i];
244 looks_latin1(const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t *ulen)
248 *ulen = 0;
256 ubuf[(*ulen)++] = buf[i];
264 size_t *ulen)
268 *ulen = 0;
276 ubuf[(*ulen)++] = buf[i];
290 * If ubuf is non-NULL on entry, text is decoded into ubuf, *ulen;
294 file_looks_utf8(const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t *ulen)
302 *ulen = 0;
315 ubuf[(*ulen)++] = buf[i];
351 ubuf[(*ulen)++] = c;
366 size_t *ulen)
369 return file_looks_utf8(buf + 3, nbytes - 3, ubuf, ulen);
376 size_t *ulen)
391 *ulen = 0;
397 ubuf[(*ulen)++] = buf[i + 1] + 256 * buf[i];
399 ubuf[(*ulen)++] = buf[i] + 256 * buf[i + 1];
401 if (ubuf[*ulen - 1] == 0xfffe)
403 if (ubuf[*ulen - 1] < 128 &&
404 text_chars[(size_t)ubuf[*ulen - 1]] != T)