Lines Matching refs:a_in

257  *@param a_in the input utf8 buffer to convert.
270 cr_utils_utf8_to_ucs4 (const guchar * a_in,
285 g_return_val_if_fail (a_in && a_in_len
301 if (a_in[in_index] <= 0x7F) {
307 c = a_in[in_index];
310 } else if ((a_in[in_index] & 0xE0) == 0xC0) {
316 c = a_in[in_index] & 0x1F;
319 } else if ((a_in[in_index] & 0xF0) == 0xE0) {
325 c = a_in[in_index] & 0x0F;
328 } else if ((a_in[in_index] & 0xF8) == 0xF0) {
334 c = a_in[in_index] & 0x7;
337 } else if ((a_in[in_index] & 0xFC) == 0xF8) {
344 c = a_in[in_index] & 3;
347 } else if ((a_in[in_index] & 0xFE) == 0xFC) {
354 c = a_in[in_index] & 1;
371 if ((a_in[in_index] & 0xC0) != 0x80) {
375 c = (c << 6) | (a_in[in_index] & 0x3F);
420 *@param a_in the starting address of the utf8 buffer.
428 cr_utils_read_char_from_utf8_buf (const guchar * a_in,
442 g_return_val_if_fail (a_in && a_out && a_out
450 if (*a_in <= 0x7F) {
456 c = *a_in;
459 } else if ((*a_in & 0xE0) == 0xC0) {
465 c = *a_in & 0x1F;
468 } else if ((*a_in & 0xF0) == 0xE0) {
474 c = *a_in & 0x0F;
477 } else if ((*a_in & 0xF8) == 0xF0) {
483 c = *a_in & 0x7;
486 } else if ((*a_in & 0xFC) == 0xF8) {
493 c = *a_in & 3;
496 } else if ((*a_in & 0xFE) == 0xFC) {
503 c = *a_in & 1;
522 if ((a_in[in_index] & 0xC0) != 0x80) {
526 c = (c << 6) | (a_in[in_index] & 0x3F);
698 *@param a_in the input string to convert.
710 cr_utils_utf8_str_to_ucs4 (const guchar * a_in,
716 g_return_val_if_fail (a_in && a_in_len
719 status = cr_utils_utf8_str_len_as_ucs4 (a_in,
720 &a_in[*a_in_len - 1],
727 status = cr_utils_utf8_to_ucs4 (a_in, a_in_len, *a_out, a_out_len);
735 *@param a_in the input ucs4 buffer to convert.
748 cr_utils_ucs4_to_utf8 (const guint32 * a_in,
756 g_return_val_if_fail (a_in && a_in_len && a_out && a_out_len,
771 if (a_in[in_index] <= 0x7F) {
772 a_out[out_index] = a_in[in_index];
774 } else if (a_in[in_index] <= 0x7FF) {
775 a_out[out_index] = (0xC0 | (a_in[in_index] >> 6));
777 (0x80 | (a_in[in_index] & 0x3F));
779 } else if (a_in[in_index] <= 0xFFFF) {
780 a_out[out_index] = (0xE0 | (a_in[in_index] >> 12));
782 (0x80 | ((a_in[in_index] >> 6) & 0x3F));
784 (0x80 | (a_in[in_index] & 0x3F));
786 } else if (a_in[in_index] <= 0x1FFFFF) {
787 a_out[out_index] = (0xF0 | (a_in[in_index] >> 18));
789 = (0x80 | ((a_in[in_index] >> 12) & 0x3F));
791 = (0x80 | ((a_in[in_index] >> 6) & 0x3F));
793 = (0x80 | (a_in[in_index] & 0x3F));
795 } else if (a_in[in_index] <= 0x3FFFFFF) {
796 a_out[out_index] = (0xF8 | (a_in[in_index] >> 24));
798 (0x80 | (a_in[in_index] >> 18));
800 = (0x80 | ((a_in[in_index] >> 12) & 0x3F));
802 = (0x80 | ((a_in[in_index] >> 6) & 0x3F));
804 = (0x80 | (a_in[in_index] & 0x3F));
806 } else if (a_in[in_index] <= 0x7FFFFFFF) {
807 a_out[out_index] = (0xFC | (a_in[in_index] >> 30));
809 (0x80 | (a_in[in_index] >> 24));
811 = (0x80 | ((a_in[in_index] >> 18) & 0x3F));
813 = (0x80 | ((a_in[in_index] >> 12) & 0x3F));
815 = (0x80 | ((a_in[in_index] >> 6) & 0x3F));
817 = (0x80 | (a_in[in_index] & 0x3F));
834 *@param a_in the input string to convert.
845 cr_utils_ucs4_str_to_utf8 (const guint32 * a_in,
851 g_return_val_if_fail (a_in && a_in_len && a_out
854 status = cr_utils_ucs4_str_len_as_utf8 (a_in,
855 &a_in[*a_out_len - 1],
860 status = cr_utils_ucs4_to_utf8 (a_in, a_in_len, *a_out, a_out_len);
870 *@param a_in the input ucs1 buffer.
886 cr_utils_ucs1_to_utf8 (const guchar * a_in,
895 g_return_val_if_fail (a_in && a_in_len
914 if (a_in[in_index] <= 0x7F) {
915 a_out[out_index] = a_in[in_index];
918 a_out[out_index] = (0xC0 | (a_in[in_index] >> 6));
920 (0x80 | (a_in[in_index] & 0x3F));
941 cr_utils_ucs1_str_to_utf8 (const guchar * a_in,
948 g_return_val_if_fail (a_in && a_in_len && a_out
957 status = cr_utils_ucs1_str_len_as_utf8 (a_in, &a_in[*a_in_len - 1],
964 status = cr_utils_ucs1_to_utf8 (a_in, a_in_len, *a_out, &out_len);
977 *@param a_in the input utf8 buffer to convert.
995 cr_utils_utf8_to_ucs1 (const guchar * a_in,
1010 g_return_val_if_fail (a_in && a_in_len
1025 if (a_in[in_index] <= 0x7F) {
1031 c = a_in[in_index];
1034 } else if ((a_in[in_index] & 0xE0) == 0xC0) {
1040 c = a_in[in_index] & 0x1F;
1043 } else if ((a_in[in_index] & 0xF0) == 0xE0) {
1049 c = a_in[in_index] & 0x0F;
1052 } else if ((a_in[in_index] & 0xF8) == 0xF0) {
1058 c = a_in[in_index] & 0x7;
1061 } else if ((a_in[in_index] & 0xFC) == 0xF8) {
1068 c = a_in[in_index] & 3;
1071 } else if ((a_in[in_index] & 0xFE) == 0xFC) {
1078 c = a_in[in_index] & 1;
1100 if ((a_in[in_index] & 0xC0) != 0x80) {
1105 c = (c << 6) | (a_in[in_index] & 0x3F);
1141 cr_utils_utf8_str_to_ucs1 (const guchar * a_in,
1147 g_return_val_if_fail (a_in && a_in_len
1156 status = cr_utils_utf8_str_len_as_ucs4 (a_in, &a_in[*a_in_len - 1],
1163 status = cr_utils_utf8_to_ucs1 (a_in, a_in_len, *a_out, a_out_len);