Lines Matching refs:a_in
281 cr_utils_utf8_to_ucs4 (const guchar * a_in, in cr_utils_utf8_to_ucs4() argument
296 g_return_val_if_fail (a_in && a_in_len in cr_utils_utf8_to_ucs4()
312 if (a_in[in_index] <= 0x7F) { in cr_utils_utf8_to_ucs4()
318 c = a_in[in_index]; in cr_utils_utf8_to_ucs4()
321 } else if ((a_in[in_index] & 0xE0) == 0xC0) { in cr_utils_utf8_to_ucs4()
327 c = a_in[in_index] & 0x1F; in cr_utils_utf8_to_ucs4()
330 } else if ((a_in[in_index] & 0xF0) == 0xE0) { in cr_utils_utf8_to_ucs4()
336 c = a_in[in_index] & 0x0F; in cr_utils_utf8_to_ucs4()
339 } else if ((a_in[in_index] & 0xF8) == 0xF0) { in cr_utils_utf8_to_ucs4()
345 c = a_in[in_index] & 0x7; in cr_utils_utf8_to_ucs4()
348 } else if ((a_in[in_index] & 0xFC) == 0xF8) { in cr_utils_utf8_to_ucs4()
355 c = a_in[in_index] & 3; in cr_utils_utf8_to_ucs4()
358 } else if ((a_in[in_index] & 0xFE) == 0xFC) { in cr_utils_utf8_to_ucs4()
365 c = a_in[in_index] & 1; in cr_utils_utf8_to_ucs4()
382 if ((a_in[in_index] & 0xC0) != 0x80) { in cr_utils_utf8_to_ucs4()
386 c = (c << 6) | (a_in[in_index] & 0x3F); in cr_utils_utf8_to_ucs4()
439 cr_utils_read_char_from_utf8_buf (const guchar * a_in, in cr_utils_read_char_from_utf8_buf() argument
453 g_return_val_if_fail (a_in && a_out && a_out in cr_utils_read_char_from_utf8_buf()
461 if (*a_in <= 0x7F) { in cr_utils_read_char_from_utf8_buf()
467 c = *a_in; in cr_utils_read_char_from_utf8_buf()
470 } else if ((*a_in & 0xE0) == 0xC0) { in cr_utils_read_char_from_utf8_buf()
476 c = *a_in & 0x1F; in cr_utils_read_char_from_utf8_buf()
479 } else if ((*a_in & 0xF0) == 0xE0) { in cr_utils_read_char_from_utf8_buf()
485 c = *a_in & 0x0F; in cr_utils_read_char_from_utf8_buf()
488 } else if ((*a_in & 0xF8) == 0xF0) { in cr_utils_read_char_from_utf8_buf()
494 c = *a_in & 0x7; in cr_utils_read_char_from_utf8_buf()
497 } else if ((*a_in & 0xFC) == 0xF8) { in cr_utils_read_char_from_utf8_buf()
504 c = *a_in & 3; in cr_utils_read_char_from_utf8_buf()
507 } else if ((*a_in & 0xFE) == 0xFC) { in cr_utils_read_char_from_utf8_buf()
514 c = *a_in & 1; in cr_utils_read_char_from_utf8_buf()
533 if ((a_in[in_index] & 0xC0) != 0x80) { in cr_utils_read_char_from_utf8_buf()
537 c = (c << 6) | (a_in[in_index] & 0x3F); in cr_utils_read_char_from_utf8_buf()
721 cr_utils_utf8_str_to_ucs4 (const guchar * a_in, in cr_utils_utf8_str_to_ucs4() argument
727 g_return_val_if_fail (a_in && a_in_len in cr_utils_utf8_str_to_ucs4()
730 status = cr_utils_utf8_str_len_as_ucs4 (a_in, in cr_utils_utf8_str_to_ucs4()
731 &a_in[*a_in_len - 1], in cr_utils_utf8_str_to_ucs4()
738 status = cr_utils_utf8_to_ucs4 (a_in, a_in_len, *a_out, a_out_len); in cr_utils_utf8_str_to_ucs4()
759 cr_utils_ucs4_to_utf8 (const guint32 * a_in, in cr_utils_ucs4_to_utf8() argument
767 g_return_val_if_fail (a_in && a_in_len && a_out && a_out_len, in cr_utils_ucs4_to_utf8()
782 if (a_in[in_index] <= 0x7F) { in cr_utils_ucs4_to_utf8()
783 a_out[out_index] = a_in[in_index]; in cr_utils_ucs4_to_utf8()
785 } else if (a_in[in_index] <= 0x7FF) { in cr_utils_ucs4_to_utf8()
786 a_out[out_index] = (0xC0 | (a_in[in_index] >> 6)); in cr_utils_ucs4_to_utf8()
788 (0x80 | (a_in[in_index] & 0x3F)); in cr_utils_ucs4_to_utf8()
790 } else if (a_in[in_index] <= 0xFFFF) { in cr_utils_ucs4_to_utf8()
791 a_out[out_index] = (0xE0 | (a_in[in_index] >> 12)); in cr_utils_ucs4_to_utf8()
793 (0x80 | ((a_in[in_index] >> 6) & 0x3F)); in cr_utils_ucs4_to_utf8()
795 (0x80 | (a_in[in_index] & 0x3F)); in cr_utils_ucs4_to_utf8()
797 } else if (a_in[in_index] <= 0x1FFFFF) { in cr_utils_ucs4_to_utf8()
798 a_out[out_index] = (0xF0 | (a_in[in_index] >> 18)); in cr_utils_ucs4_to_utf8()
800 = (0x80 | ((a_in[in_index] >> 12) & 0x3F)); in cr_utils_ucs4_to_utf8()
802 = (0x80 | ((a_in[in_index] >> 6) & 0x3F)); in cr_utils_ucs4_to_utf8()
804 = (0x80 | (a_in[in_index] & 0x3F)); in cr_utils_ucs4_to_utf8()
806 } else if (a_in[in_index] <= 0x3FFFFFF) { in cr_utils_ucs4_to_utf8()
807 a_out[out_index] = (0xF8 | (a_in[in_index] >> 24)); in cr_utils_ucs4_to_utf8()
809 (0x80 | (a_in[in_index] >> 18)); in cr_utils_ucs4_to_utf8()
811 = (0x80 | ((a_in[in_index] >> 12) & 0x3F)); in cr_utils_ucs4_to_utf8()
813 = (0x80 | ((a_in[in_index] >> 6) & 0x3F)); in cr_utils_ucs4_to_utf8()
815 = (0x80 | (a_in[in_index] & 0x3F)); in cr_utils_ucs4_to_utf8()
817 } else if (a_in[in_index] <= 0x7FFFFFFF) { in cr_utils_ucs4_to_utf8()
818 a_out[out_index] = (0xFC | (a_in[in_index] >> 30)); in cr_utils_ucs4_to_utf8()
820 (0x80 | (a_in[in_index] >> 24)); in cr_utils_ucs4_to_utf8()
822 = (0x80 | ((a_in[in_index] >> 18) & 0x3F)); in cr_utils_ucs4_to_utf8()
824 = (0x80 | ((a_in[in_index] >> 12) & 0x3F)); in cr_utils_ucs4_to_utf8()
826 = (0x80 | ((a_in[in_index] >> 6) & 0x3F)); in cr_utils_ucs4_to_utf8()
828 = (0x80 | (a_in[in_index] & 0x3F)); in cr_utils_ucs4_to_utf8()
856 cr_utils_ucs4_str_to_utf8 (const guint32 * a_in, in cr_utils_ucs4_str_to_utf8() argument
862 g_return_val_if_fail (a_in && a_in_len && a_out in cr_utils_ucs4_str_to_utf8()
865 status = cr_utils_ucs4_str_len_as_utf8 (a_in, in cr_utils_ucs4_str_to_utf8()
866 &a_in[*a_out_len - 1], in cr_utils_ucs4_str_to_utf8()
871 status = cr_utils_ucs4_to_utf8 (a_in, a_in_len, *a_out, a_out_len); in cr_utils_ucs4_str_to_utf8()
897 cr_utils_ucs1_to_utf8 (const guchar * a_in, in cr_utils_ucs1_to_utf8() argument
906 g_return_val_if_fail (a_in && a_in_len in cr_utils_ucs1_to_utf8()
925 if (a_in[in_index] <= 0x7F) { in cr_utils_ucs1_to_utf8()
926 a_out[out_index] = a_in[in_index]; in cr_utils_ucs1_to_utf8()
929 a_out[out_index] = (0xC0 | (a_in[in_index] >> 6)); in cr_utils_ucs1_to_utf8()
931 (0x80 | (a_in[in_index] & 0x3F)); in cr_utils_ucs1_to_utf8()
952 cr_utils_ucs1_str_to_utf8 (const guchar * a_in, in cr_utils_ucs1_str_to_utf8() argument
959 g_return_val_if_fail (a_in && a_in_len && a_out in cr_utils_ucs1_str_to_utf8()
968 status = cr_utils_ucs1_str_len_as_utf8 (a_in, &a_in[*a_in_len - 1], in cr_utils_ucs1_str_to_utf8()
975 status = cr_utils_ucs1_to_utf8 (a_in, a_in_len, *a_out, &out_len); in cr_utils_ucs1_str_to_utf8()
1006 cr_utils_utf8_to_ucs1 (const guchar * a_in, in cr_utils_utf8_to_ucs1() argument
1021 g_return_val_if_fail (a_in && a_in_len in cr_utils_utf8_to_ucs1()
1036 if (a_in[in_index] <= 0x7F) { in cr_utils_utf8_to_ucs1()
1042 c = a_in[in_index]; in cr_utils_utf8_to_ucs1()
1045 } else if ((a_in[in_index] & 0xE0) == 0xC0) { in cr_utils_utf8_to_ucs1()
1051 c = a_in[in_index] & 0x1F; in cr_utils_utf8_to_ucs1()
1054 } else if ((a_in[in_index] & 0xF0) == 0xE0) { in cr_utils_utf8_to_ucs1()
1060 c = a_in[in_index] & 0x0F; in cr_utils_utf8_to_ucs1()
1063 } else if ((a_in[in_index] & 0xF8) == 0xF0) { in cr_utils_utf8_to_ucs1()
1069 c = a_in[in_index] & 0x7; in cr_utils_utf8_to_ucs1()
1072 } else if ((a_in[in_index] & 0xFC) == 0xF8) { in cr_utils_utf8_to_ucs1()
1079 c = a_in[in_index] & 3; in cr_utils_utf8_to_ucs1()
1082 } else if ((a_in[in_index] & 0xFE) == 0xFC) { in cr_utils_utf8_to_ucs1()
1089 c = a_in[in_index] & 1; in cr_utils_utf8_to_ucs1()
1111 if ((a_in[in_index] & 0xC0) != 0x80) { in cr_utils_utf8_to_ucs1()
1116 c = (c << 6) | (a_in[in_index] & 0x3F); in cr_utils_utf8_to_ucs1()
1152 cr_utils_utf8_str_to_ucs1 (const guchar * a_in, in cr_utils_utf8_str_to_ucs1() argument
1158 g_return_val_if_fail (a_in && a_in_len in cr_utils_utf8_str_to_ucs1()
1167 status = cr_utils_utf8_str_len_as_ucs4 (a_in, &a_in[*a_in_len - 1], in cr_utils_utf8_str_to_ucs1()
1174 status = cr_utils_utf8_to_ucs1 (a_in, a_in_len, *a_out, a_out_len); in cr_utils_utf8_str_to_ucs1()