Lines Matching refs:a_in
258 *@param a_in the input utf8 buffer to convert.
271 cr_utils_utf8_to_ucs4 (const guchar * a_in,
286 g_return_val_if_fail (a_in && a_in_len
302 if (a_in[in_index] <= 0x7F) {
308 c = a_in[in_index];
311 } else if ((a_in[in_index] & 0xE0) == 0xC0) {
317 c = a_in[in_index] & 0x1F;
320 } else if ((a_in[in_index] & 0xF0) == 0xE0) {
326 c = a_in[in_index] & 0x0F;
329 } else if ((a_in[in_index] & 0xF8) == 0xF0) {
335 c = a_in[in_index] & 0x7;
338 } else if ((a_in[in_index] & 0xFC) == 0xF8) {
345 c = a_in[in_index] & 3;
348 } else if ((a_in[in_index] & 0xFE) == 0xFC) {
355 c = a_in[in_index] & 1;
372 if ((a_in[in_index] & 0xC0) != 0x80) {
376 c = (c << 6) | (a_in[in_index] & 0x3F);
421 *@param a_in the starting address of the utf8 buffer.
429 cr_utils_read_char_from_utf8_buf (const guchar * a_in,
444 g_return_val_if_fail (a_in && a_out && a_out
454 if (*a_in <= 0x7F) {
460 c = *a_in;
463 } else if ((*a_in & 0xE0) == 0xC0) {
469 c = *a_in & 0x1F;
472 } else if ((*a_in & 0xF0) == 0xE0) {
478 c = *a_in & 0x0F;
481 } else if ((*a_in & 0xF8) == 0xF0) {
487 c = *a_in & 0x7;
490 } else if ((*a_in & 0xFC) == 0xF8) {
497 c = *a_in & 3;
500 } else if ((*a_in & 0xFE) == 0xFC) {
507 c = *a_in & 1;
526 if ((a_in[in_index] & 0xC0) != 0x80) {
530 c = (c << 6) | (a_in[in_index] & 0x3F);
702 *@param a_in the input string to convert.
714 cr_utils_utf8_str_to_ucs4 (const guchar * a_in,
720 g_return_val_if_fail (a_in && a_in_len
723 status = cr_utils_utf8_str_len_as_ucs4 (a_in,
724 &a_in[*a_in_len - 1],
731 status = cr_utils_utf8_to_ucs4 (a_in, a_in_len, *a_out, a_out_len);
739 *@param a_in the input ucs4 buffer to convert.
752 cr_utils_ucs4_to_utf8 (const guint32 * a_in,
760 g_return_val_if_fail (a_in && a_in_len && a_out && a_out_len,
775 if (a_in[in_index] <= 0x7F) {
776 a_out[out_index] = a_in[in_index];
778 } else if (a_in[in_index] <= 0x7FF) {
779 a_out[out_index] = (0xC0 | (a_in[in_index] >> 6));
781 (0x80 | (a_in[in_index] & 0x3F));
783 } else if (a_in[in_index] <= 0xFFFF) {
784 a_out[out_index] = (0xE0 | (a_in[in_index] >> 12));
786 (0x80 | ((a_in[in_index] >> 6) & 0x3F));
788 (0x80 | (a_in[in_index] & 0x3F));
790 } else if (a_in[in_index] <= 0x1FFFFF) {
791 a_out[out_index] = (0xF0 | (a_in[in_index] >> 18));
793 = (0x80 | ((a_in[in_index] >> 12) & 0x3F));
795 = (0x80 | ((a_in[in_index] >> 6) & 0x3F));
797 = (0x80 | (a_in[in_index] & 0x3F));
799 } else if (a_in[in_index] <= 0x3FFFFFF) {
800 a_out[out_index] = (0xF8 | (a_in[in_index] >> 24));
802 (0x80 | (a_in[in_index] >> 18));
804 = (0x80 | ((a_in[in_index] >> 12) & 0x3F));
806 = (0x80 | ((a_in[in_index] >> 6) & 0x3F));
808 = (0x80 | (a_in[in_index] & 0x3F));
810 } else if (a_in[in_index] <= 0x7FFFFFFF) {
811 a_out[out_index] = (0xFC | (a_in[in_index] >> 30));
813 (0x80 | (a_in[in_index] >> 24));
815 = (0x80 | ((a_in[in_index] >> 18) & 0x3F));
817 = (0x80 | ((a_in[in_index] >> 12) & 0x3F));
819 = (0x80 | ((a_in[in_index] >> 6) & 0x3F));
821 = (0x80 | (a_in[in_index] & 0x3F));
838 *@param a_in the input string to convert.
849 cr_utils_ucs4_str_to_utf8 (const guint32 * a_in,
855 g_return_val_if_fail (a_in && a_in_len && a_out
858 status = cr_utils_ucs4_str_len_as_utf8 (a_in,
859 &a_in[*a_out_len - 1],
864 status = cr_utils_ucs4_to_utf8 (a_in, a_in_len, *a_out, a_out_len);
874 *@param a_in the input ucs1 buffer.
890 cr_utils_ucs1_to_utf8 (const guchar * a_in,
899 g_return_val_if_fail (a_in && a_in_len
923 if (a_in[in_index] <= 0x7F) {
924 a_out[out_index] = a_in[in_index];
927 a_out[out_index] = (0xC0 | (a_in[in_index] >> 6));
929 (0x80 | (a_in[in_index] & 0x3F));
951 cr_utils_ucs1_str_to_utf8 (const guchar * a_in,
959 g_return_val_if_fail (a_in && a_in_len && a_out
968 status = cr_utils_ucs1_str_len_as_utf8 (a_in, &a_in[*a_in_len - 1],
977 status = cr_utils_ucs1_to_utf8 (a_in, a_in_len, *a_out, &out_len);
990 *@param a_in the input utf8 buffer to convert.
1008 cr_utils_utf8_to_ucs1 (const guchar * a_in,
1023 g_return_val_if_fail (a_in && a_in_len
1039 if (a_in[in_index] <= 0x7F) {
1045 c = a_in[in_index];
1048 } else if ((a_in[in_index] & 0xE0) == 0xC0) {
1054 c = a_in[in_index] & 0x1F;
1057 } else if ((a_in[in_index] & 0xF0) == 0xE0) {
1063 c = a_in[in_index] & 0x0F;
1066 } else if ((a_in[in_index] & 0xF8) == 0xF0) {
1072 c = a_in[in_index] & 0x7;
1075 } else if ((a_in[in_index] & 0xFC) == 0xF8) {
1082 c = a_in[in_index] & 3;
1085 } else if ((a_in[in_index] & 0xFE) == 0xFC) {
1092 c = a_in[in_index] & 1;
1115 if ((a_in[in_index] & 0xC0) != 0x80) {
1120 c = (c << 6) | (a_in[in_index] & 0x3F);
1156 cr_utils_utf8_str_to_ucs1 (const guchar * a_in,
1162 g_return_val_if_fail (a_in && a_in_len
1171 status = cr_utils_utf8_str_len_as_ucs4 (a_in, &a_in[*a_in_len - 1],
1178 status = cr_utils_utf8_to_ucs1 (a_in, a_in_len, *a_out, a_out_len);