Searched refs:ubuf (Results 1 - 4 of 4) sorted by relevance

/PHP_TRUNK/ext/fileinfo/libmagic/
H A Dascmagic.c74 unichar *ubuf = NULL; local
88 if (file_encoding(ms, buf, nbytes, &ubuf, &ulen, &code, &code_mime,
92 rv = file_ascmagic_with_encoding(ms, buf, nbytes, ubuf, ulen, code,
95 free(ubuf);
102 size_t nbytes, unichar *ubuf, size_t ulen, const char *code,
138 /* Convert ubuf to UTF-8 and try text soft magic */
146 if ((utf8_end = encode_utf8(utf8_buf, mlen, ubuf, ulen))
156 if (ubuf[i] == '\n') {
165 seen_cr = (ubuf[i] == '\r');
169 if (ubuf[
101 file_ascmagic_with_encoding(struct magic_set *ms, const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t ulen, const char *code, const char *type, int text) argument
311 encode_utf8(unsigned char *buf, size_t len, unichar *ubuf, size_t ulen) argument
[all...]
H A Dencoding.c65 * 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) argument
79 mlen = (nbytes + 1) * sizeof((*ubuf)[0]);
80 if ((*ubuf = CAST(unichar *, calloc((size_t)1, mlen))) == NULL) {
90 if (looks_ascii(buf, nbytes, *ubuf, ulen)) {
94 } else if (looks_utf8_with_BOM(buf, nbytes, *ubuf, ulen) > 0) {
98 } else if (file_looks_utf8(buf, nbytes, *ubuf, ulen) > 1) {
103 } else if ((ucs_type = looks_ucs16(buf, nbytes, *ubuf, ulen)) != 0) {
112 } else if (looks_latin1(buf, nbytes, *ubuf, ulen)) {
116 } else if (looks_extended(buf, nbytes, *ubuf, ule
225 looks_ascii(const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t *ulen) argument
245 looks_latin1(const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t *ulen) argument
264 looks_extended(const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t *ulen) argument
295 file_looks_utf8(const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t *ulen) argument
366 looks_utf8_with_BOM(const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t *ulen) argument
376 looks_ucs16(const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t *ulen) argument
[all...]
H A Dfuncs.c169 const unsigned char *ubuf = CAST(const unsigned char *, buf); local
188 looks_text = file_encoding(ms, ubuf, nb, &u8buf, &ulen,
207 if ((m = file_zmagic(ms, stream, inname, ubuf, nb)) != 0) {
215 if ((m = file_is_tar(ms, ubuf, nb)) != 0) {
226 if ((m = file_trycdf(ms, fd, ubuf, nb)) != 0) {
236 if ((m = file_softmagic(ms, ubuf, nb, 0, BINTEST,
252 if ((m = file_tryelf(ms, fd, ubuf, nb)) != 0)
264 if ((m = file_ascmagic(ms, ubuf, nb, looks_text)) != 0) {
273 if ((m = file_ascmagic_with_encoding( ms, ubuf,
/PHP_TRUNK/ext/session/
H A Dsession.c1125 static inline void strcpy_gmt(char *ubuf, time_t *when) /* {{{ */ argument
1134 ubuf[0] = '\0';
1143 memcpy(ubuf, buf, n);
1144 ubuf[n] = '\0';

Completed in 8 milliseconds