• Home
  • Raw
  • Download

Lines Matching refs:out

169 asciiToUTF8(unsigned char* out, int *outlen,  in asciiToUTF8()  argument
171 unsigned char* outstart = out; in asciiToUTF8()
174 unsigned char* outend = out + *outlen; in asciiToUTF8()
179 while ((in < inend) && (out - outstart + 5 < *outlen)) { in asciiToUTF8()
182 if (out >= outend) in asciiToUTF8()
185 *out++ = c; in asciiToUTF8()
187 *outlen = out - outstart; in asciiToUTF8()
194 *outlen = out - outstart; in asciiToUTF8()
216 UTF8Toascii(unsigned char* out, int *outlen, in UTF8Toascii() argument
220 const unsigned char* outstart = out; in UTF8Toascii()
226 if ((out == NULL) || (outlen == NULL) || (inlen == NULL)) return(-1); in UTF8Toascii()
236 outend = out + (*outlen); in UTF8Toascii()
242 *outlen = out - outstart; in UTF8Toascii()
250 *outlen = out - outstart; in UTF8Toascii()
268 if (out >= outend) in UTF8Toascii()
270 *out++ = c; in UTF8Toascii()
273 *outlen = out - outstart; in UTF8Toascii()
279 *outlen = out - outstart; in UTF8Toascii()
300 isolat1ToUTF8(unsigned char* out, int *outlen, in isolat1ToUTF8() argument
302 unsigned char* outstart = out; in isolat1ToUTF8()
308 if ((out == NULL) || (in == NULL) || (outlen == NULL) || (inlen == NULL)) in isolat1ToUTF8()
311 outend = out + *outlen; in isolat1ToUTF8()
315 while (in < inend && out < outend - 1) { in isolat1ToUTF8()
317 *out++ = (((*in) >> 6) & 0x1F) | 0xC0; in isolat1ToUTF8()
318 *out++ = ((*in) & 0x3F) | 0x80; in isolat1ToUTF8()
321 if (instop - in > outend - out) instop = in + (outend - out); in isolat1ToUTF8()
323 *out++ = *in++; in isolat1ToUTF8()
326 if (in < inend && out < outend && *in < 0x80) { in isolat1ToUTF8()
327 *out++ = *in++; in isolat1ToUTF8()
329 *outlen = out - outstart; in isolat1ToUTF8()
348 UTF8ToUTF8(unsigned char* out, int *outlen, in UTF8ToUTF8() argument
353 if ((out == NULL) || (inb == NULL) || (outlen == NULL) || (inlenb == NULL)) in UTF8ToUTF8()
363 memcpy(out, inb, len); in UTF8ToUTF8()
389 UTF8Toisolat1(unsigned char* out, int *outlen, in UTF8Toisolat1() argument
393 const unsigned char* outstart = out; in UTF8Toisolat1()
399 if ((out == NULL) || (outlen == NULL) || (inlen == NULL)) return(-1); in UTF8Toisolat1()
409 outend = out + (*outlen); in UTF8Toisolat1()
415 *outlen = out - outstart; in UTF8Toisolat1()
423 *outlen = out - outstart; in UTF8Toisolat1()
436 *outlen = out - outstart; in UTF8Toisolat1()
446 if (out >= outend) in UTF8Toisolat1()
448 *out++ = c; in UTF8Toisolat1()
451 *outlen = out - outstart; in UTF8Toisolat1()
457 *outlen = out - outstart; in UTF8Toisolat1()
481 UTF16LEToUTF8(unsigned char* out, int *outlen, in UTF16LEToUTF8() argument
484 unsigned char* outstart = out; in UTF16LEToUTF8()
486 unsigned char* outend = out + *outlen; in UTF16LEToUTF8()
497 while ((in < inend) && (out - outstart + 5 < *outlen)) { in UTF16LEToUTF8()
525 *outlen = out - outstart; in UTF16LEToUTF8()
532 if (out >= outend) in UTF16LEToUTF8()
534 if (c < 0x80) { *out++= c; bits= -6; } in UTF16LEToUTF8()
535 else if (c < 0x800) { *out++= ((c >> 6) & 0x1F) | 0xC0; bits= 0; } in UTF16LEToUTF8()
536 else if (c < 0x10000) { *out++= ((c >> 12) & 0x0F) | 0xE0; bits= 6; } in UTF16LEToUTF8()
537 else { *out++= ((c >> 18) & 0x07) | 0xF0; bits= 12; } in UTF16LEToUTF8()
540 if (out >= outend) in UTF16LEToUTF8()
542 *out++= ((c >> bits) & 0x3F) | 0x80; in UTF16LEToUTF8()
546 *outlen = out - outstart; in UTF16LEToUTF8()
569 unsigned short* out = (unsigned short*) outb; in UTF8ToUTF16LE() local
572 unsigned short* outstart= out; in UTF8ToUTF16LE()
581 if ((out == NULL) || (outlen == NULL) || (inlen == NULL)) return(-1); in UTF8ToUTF16LE()
588 outend = out + (*outlen / 2); in UTF8ToUTF16LE()
594 *outlen = (out - outstart) * 2; in UTF8ToUTF16LE()
602 *outlen = (out - outstart) * 2; in UTF8ToUTF16LE()
620 if (out >= outend) in UTF8ToUTF16LE()
623 *out++ = c; in UTF8ToUTF16LE()
625 tmp = (unsigned char *) out; in UTF8ToUTF16LE()
628 out++; in UTF8ToUTF16LE()
632 if (out+1 >= outend) in UTF8ToUTF16LE()
636 *out++ = 0xD800 | (c >> 10); in UTF8ToUTF16LE()
637 *out++ = 0xDC00 | (c & 0x03FF); in UTF8ToUTF16LE()
640 tmp = (unsigned char *) out; in UTF8ToUTF16LE()
643 out++; in UTF8ToUTF16LE()
646 tmp = (unsigned char *) out; in UTF8ToUTF16LE()
649 out++; in UTF8ToUTF16LE()
656 *outlen = (out - outstart) * 2; in UTF8ToUTF16LE()
719 UTF16BEToUTF8(unsigned char* out, int *outlen, in UTF16BEToUTF8() argument
722 unsigned char* outstart = out; in UTF16BEToUTF8()
724 unsigned char* outend = out + *outlen; in UTF16BEToUTF8()
747 *outlen = out - outstart; in UTF16BEToUTF8()
767 *outlen = out - outstart; in UTF16BEToUTF8()
774 if (out >= outend) in UTF16BEToUTF8()
776 if (c < 0x80) { *out++= c; bits= -6; } in UTF16BEToUTF8()
777 else if (c < 0x800) { *out++= ((c >> 6) & 0x1F) | 0xC0; bits= 0; } in UTF16BEToUTF8()
778 else if (c < 0x10000) { *out++= ((c >> 12) & 0x0F) | 0xE0; bits= 6; } in UTF16BEToUTF8()
779 else { *out++= ((c >> 18) & 0x07) | 0xF0; bits= 12; } in UTF16BEToUTF8()
782 if (out >= outend) in UTF16BEToUTF8()
784 *out++= ((c >> bits) & 0x3F) | 0x80; in UTF16BEToUTF8()
788 *outlen = out - outstart; in UTF16BEToUTF8()
811 unsigned short* out = (unsigned short*) outb; in UTF8ToUTF16BE() local
814 unsigned short* outstart= out; in UTF8ToUTF16BE()
830 outend = out + (*outlen / 2); in UTF8ToUTF16BE()
836 *outlen = out - outstart; in UTF8ToUTF16BE()
844 *outlen = out - outstart; in UTF8ToUTF16BE()
861 if (out >= outend) break; in UTF8ToUTF16BE()
863 tmp = (unsigned char *) out; in UTF8ToUTF16BE()
866 out++; in UTF8ToUTF16BE()
868 *out++ = c; in UTF8ToUTF16BE()
872 if (out+1 >= outend) break; in UTF8ToUTF16BE()
876 tmp = (unsigned char *) out; in UTF8ToUTF16BE()
879 out++; in UTF8ToUTF16BE()
882 tmp = (unsigned char *) out; in UTF8ToUTF16BE()
885 out++; in UTF8ToUTF16BE()
887 *out++ = 0xD800 | (c >> 10); in UTF8ToUTF16BE()
888 *out++ = 0xDC00 | (c & 0x03FF); in UTF8ToUTF16BE()
895 *outlen = (out - outstart) * 2; in UTF8ToUTF16BE()
1778 xmlIconvWrapper(iconv_t cd, unsigned char *out, int *outlen, in xmlIconvWrapper() argument
1782 char *icv_out = (char *) out; in xmlIconvWrapper()
1785 if ((out == NULL) || (outlen == NULL) || (inlen == NULL) || (in == NULL)) { in xmlIconvWrapper()
1845 xmlUconvWrapper(uconv_t *cd, int toUnicode, unsigned char *out, int *outlen, in xmlUconvWrapper() argument
1848 char *ucv_out = (char *) out; in xmlUconvWrapper()
1851 if ((out == NULL) || (outlen == NULL) || (inlen == NULL) || (in == NULL)) { in xmlUconvWrapper()
1875 *outlen = ucv_out - (char *) out; in xmlUconvWrapper()
1908 xmlCharEncFirstLine(xmlCharEncodingHandler *handler, xmlBufferPtr out, in xmlCharEncFirstLine() argument
1915 if (out == NULL) return(-1); in xmlCharEncFirstLine()
1919 written = out->size - out->use; in xmlCharEncFirstLine()
1930 xmlBufferGrow(out, toconv); in xmlCharEncFirstLine()
1931 written = out->size - out->use - 1; in xmlCharEncFirstLine()
1935 ret = handler->input(&out->content[out->use], &written, in xmlCharEncFirstLine()
1938 out->use += written; in xmlCharEncFirstLine()
1939 out->content[out->use] = 0; in xmlCharEncFirstLine()
1943 ret = xmlIconvWrapper(handler->iconv_in, &out->content[out->use], in xmlCharEncFirstLine()
1946 out->use += written; in xmlCharEncFirstLine()
1947 out->content[out->use] = 0; in xmlCharEncFirstLine()
1953 ret = xmlUconvWrapper(handler->uconv_in, 1, &out->content[out->use], in xmlCharEncFirstLine()
1956 out->use += written; in xmlCharEncFirstLine()
1957 out->content[out->use] = 0; in xmlCharEncFirstLine()
2006 xmlCharEncInFunc(xmlCharEncodingHandler * handler, xmlBufferPtr out, in xmlCharEncInFunc() argument
2015 if (out == NULL) in xmlCharEncInFunc()
2023 written = out->size - out->use; in xmlCharEncInFunc()
2025 xmlBufferGrow(out, out->size + toconv * 2); in xmlCharEncInFunc()
2026 written = out->size - out->use - 1; in xmlCharEncInFunc()
2029 ret = handler->input(&out->content[out->use], &written, in xmlCharEncInFunc()
2032 out->use += written; in xmlCharEncInFunc()
2033 out->content[out->use] = 0; in xmlCharEncInFunc()
2037 ret = xmlIconvWrapper(handler->iconv_in, &out->content[out->use], in xmlCharEncInFunc()
2040 out->use += written; in xmlCharEncInFunc()
2041 out->content[out->use] = 0; in xmlCharEncInFunc()
2048 ret = xmlUconvWrapper(handler->uconv_in, 1, &out->content[out->use], in xmlCharEncInFunc()
2051 out->use += written; in xmlCharEncInFunc()
2052 out->content[out->use] = 0; in xmlCharEncInFunc()
2118 xmlCharEncOutFunc(xmlCharEncodingHandler *handler, xmlBufferPtr out, in xmlCharEncOutFunc() argument
2127 if (out == NULL) return(-1); in xmlCharEncOutFunc()
2131 written = out->size - out->use; in xmlCharEncOutFunc()
2142 ret = handler->output(&out->content[out->use], &written, in xmlCharEncOutFunc()
2145 out->use += written; in xmlCharEncOutFunc()
2146 out->content[out->use] = 0; in xmlCharEncOutFunc()
2151 ret = xmlIconvWrapper(handler->iconv_out, &out->content[out->use], in xmlCharEncOutFunc()
2153 out->use += written; in xmlCharEncOutFunc()
2154 out->content[out->use] = 0; in xmlCharEncOutFunc()
2160 &out->content[out->use], in xmlCharEncOutFunc()
2162 out->use += written; in xmlCharEncOutFunc()
2163 out->content[out->use] = 0; in xmlCharEncOutFunc()
2180 xmlBufferGrow(out, toconv * 4); in xmlCharEncOutFunc()
2181 written = out->size - out->use - 1; in xmlCharEncOutFunc()
2184 ret = handler->output(&out->content[out->use], &written, in xmlCharEncOutFunc()
2188 out->use += written; in xmlCharEncOutFunc()
2191 out->content[out->use] = 0; in xmlCharEncOutFunc()
2195 ret = xmlIconvWrapper(handler->iconv_out, &out->content[out->use], in xmlCharEncOutFunc()
2198 out->use += written; in xmlCharEncOutFunc()
2200 out->content[out->use] = 0; in xmlCharEncOutFunc()
2215 &out->content[out->use], in xmlCharEncOutFunc()
2218 out->use += written; in xmlCharEncOutFunc()
2220 out->content[out->use] = 0; in xmlCharEncOutFunc()
2484 UTF8ToISO8859x(unsigned char* out, int *outlen, in UTF8ToISO8859x() argument
2487 const unsigned char* outstart = out; in UTF8ToISO8859x()
2491 if ((out == NULL) || (outlen == NULL) || (inlen == NULL) || in UTF8ToISO8859x()
2506 *out++ = d; in UTF8ToISO8859x()
2509 *outlen = out - outstart; in UTF8ToISO8859x()
2516 *outlen = out - outstart; in UTF8ToISO8859x()
2523 *outlen = out - outstart; in UTF8ToISO8859x()
2532 *outlen = out - outstart; in UTF8ToISO8859x()
2536 *out++ = d; in UTF8ToISO8859x()
2542 *outlen = out - outstart; in UTF8ToISO8859x()
2549 *outlen = out - outstart; in UTF8ToISO8859x()
2556 *outlen = out - outstart; in UTF8ToISO8859x()
2567 *outlen = out - outstart; in UTF8ToISO8859x()
2571 *out++ = d; in UTF8ToISO8859x()
2574 *outlen = out - outstart; in UTF8ToISO8859x()
2579 *outlen = out - outstart; in UTF8ToISO8859x()
2598 ISO8859xToUTF8(unsigned char* out, int *outlen, in ISO8859xToUTF8() argument
2601 unsigned char* outstart = out; in ISO8859xToUTF8()
2608 if ((out == NULL) || (outlen == NULL) || (inlen == NULL) || in ISO8859xToUTF8()
2611 outend = out + *outlen; in ISO8859xToUTF8()
2615 while (in < inend && out < outend - 1) { in ISO8859xToUTF8()
2620 *outlen = out - outstart; in ISO8859xToUTF8()
2625 *out++ = ((c >> 6) & 0x1F) | 0xC0; in ISO8859xToUTF8()
2626 *out++ = (c & 0x3F) | 0x80; in ISO8859xToUTF8()
2628 *out++ = ((c >> 12) & 0x0F) | 0xE0; in ISO8859xToUTF8()
2629 *out++ = ((c >> 6) & 0x3F) | 0x80; in ISO8859xToUTF8()
2630 *out++ = (c & 0x3F) | 0x80; in ISO8859xToUTF8()
2635 if (instop - in > outend - out) instop = in + (outend - out); in ISO8859xToUTF8()
2637 *out++ = c; in ISO8859xToUTF8()
2642 if (in < inend && out < outend && c < 0x80) { in ISO8859xToUTF8()
2643 *out++ = c; in ISO8859xToUTF8()
2646 *outlen = out - outstart; in ISO8859xToUTF8()
3387 static int ISO8859_2ToUTF8 (unsigned char* out, int *outlen, in ISO8859_2ToUTF8() argument
3389 return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_2); in ISO8859_2ToUTF8()
3391 static int UTF8ToISO8859_2 (unsigned char* out, int *outlen, in UTF8ToISO8859_2() argument
3393 return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_2); in UTF8ToISO8859_2()
3396 static int ISO8859_3ToUTF8 (unsigned char* out, int *outlen, in ISO8859_3ToUTF8() argument
3398 return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_3); in ISO8859_3ToUTF8()
3400 static int UTF8ToISO8859_3 (unsigned char* out, int *outlen, in UTF8ToISO8859_3() argument
3402 return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_3); in UTF8ToISO8859_3()
3405 static int ISO8859_4ToUTF8 (unsigned char* out, int *outlen, in ISO8859_4ToUTF8() argument
3407 return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_4); in ISO8859_4ToUTF8()
3409 static int UTF8ToISO8859_4 (unsigned char* out, int *outlen, in UTF8ToISO8859_4() argument
3411 return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_4); in UTF8ToISO8859_4()
3414 static int ISO8859_5ToUTF8 (unsigned char* out, int *outlen, in ISO8859_5ToUTF8() argument
3416 return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_5); in ISO8859_5ToUTF8()
3418 static int UTF8ToISO8859_5 (unsigned char* out, int *outlen, in UTF8ToISO8859_5() argument
3420 return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_5); in UTF8ToISO8859_5()
3423 static int ISO8859_6ToUTF8 (unsigned char* out, int *outlen, in ISO8859_6ToUTF8() argument
3425 return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_6); in ISO8859_6ToUTF8()
3427 static int UTF8ToISO8859_6 (unsigned char* out, int *outlen, in UTF8ToISO8859_6() argument
3429 return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_6); in UTF8ToISO8859_6()
3432 static int ISO8859_7ToUTF8 (unsigned char* out, int *outlen, in ISO8859_7ToUTF8() argument
3434 return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_7); in ISO8859_7ToUTF8()
3436 static int UTF8ToISO8859_7 (unsigned char* out, int *outlen, in UTF8ToISO8859_7() argument
3438 return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_7); in UTF8ToISO8859_7()
3441 static int ISO8859_8ToUTF8 (unsigned char* out, int *outlen, in ISO8859_8ToUTF8() argument
3443 return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_8); in ISO8859_8ToUTF8()
3445 static int UTF8ToISO8859_8 (unsigned char* out, int *outlen, in UTF8ToISO8859_8() argument
3447 return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_8); in UTF8ToISO8859_8()
3450 static int ISO8859_9ToUTF8 (unsigned char* out, int *outlen, in ISO8859_9ToUTF8() argument
3452 return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_9); in ISO8859_9ToUTF8()
3454 static int UTF8ToISO8859_9 (unsigned char* out, int *outlen, in UTF8ToISO8859_9() argument
3456 return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_9); in UTF8ToISO8859_9()
3459 static int ISO8859_10ToUTF8 (unsigned char* out, int *outlen, in ISO8859_10ToUTF8() argument
3461 return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_10); in ISO8859_10ToUTF8()
3463 static int UTF8ToISO8859_10 (unsigned char* out, int *outlen, in UTF8ToISO8859_10() argument
3465 return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_10); in UTF8ToISO8859_10()
3468 static int ISO8859_11ToUTF8 (unsigned char* out, int *outlen, in ISO8859_11ToUTF8() argument
3470 return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_11); in ISO8859_11ToUTF8()
3472 static int UTF8ToISO8859_11 (unsigned char* out, int *outlen, in UTF8ToISO8859_11() argument
3474 return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_11); in UTF8ToISO8859_11()
3477 static int ISO8859_13ToUTF8 (unsigned char* out, int *outlen, in ISO8859_13ToUTF8() argument
3479 return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_13); in ISO8859_13ToUTF8()
3481 static int UTF8ToISO8859_13 (unsigned char* out, int *outlen, in UTF8ToISO8859_13() argument
3483 return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_13); in UTF8ToISO8859_13()
3486 static int ISO8859_14ToUTF8 (unsigned char* out, int *outlen, in ISO8859_14ToUTF8() argument
3488 return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_14); in ISO8859_14ToUTF8()
3490 static int UTF8ToISO8859_14 (unsigned char* out, int *outlen, in UTF8ToISO8859_14() argument
3492 return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_14); in UTF8ToISO8859_14()
3495 static int ISO8859_15ToUTF8 (unsigned char* out, int *outlen, in ISO8859_15ToUTF8() argument
3497 return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_15); in ISO8859_15ToUTF8()
3499 static int UTF8ToISO8859_15 (unsigned char* out, int *outlen, in UTF8ToISO8859_15() argument
3501 return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_15); in UTF8ToISO8859_15()
3504 static int ISO8859_16ToUTF8 (unsigned char* out, int *outlen, in ISO8859_16ToUTF8() argument
3506 return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_16); in ISO8859_16ToUTF8()
3508 static int UTF8ToISO8859_16 (unsigned char* out, int *outlen, in UTF8ToISO8859_16() argument
3510 return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_16); in UTF8ToISO8859_16()