Lines Matching refs:c
369 #define li_cton(c,n) \ argument
370 (((n) = (c) - '0') <= 9 || (((n) = ((c)&0xdf) - 'A') <= 5 ? ((n) += 10) : 0))
729 unsigned int c; in buffer_append_bs_escaped() local
732 c = *(const unsigned char *)s; in buffer_append_bs_escaped()
733 } while (c >= ' ' && c <= '~' && c != '"' && c != '\\' && ++s < end); in buffer_append_bs_escaped()
745 switch (c) { in buffer_append_bs_escaped()
747 c = "0000000abtnvfr"[c]; in buffer_append_bs_escaped()
752 d[1] = c; in buffer_append_bs_escaped()
759 d[2] = hex_chars_uc[c >> 4]; in buffer_append_bs_escaped()
760 d[3] = hex_chars_uc[c & 0xF]; in buffer_append_bs_escaped()
777 unsigned int c; in buffer_append_bs_escaped_json() local
780 c = *(const unsigned char *)s; in buffer_append_bs_escaped_json()
781 } while (c >= ' ' && c != '"' && c != '\\' && ++s < end); in buffer_append_bs_escaped_json()
793 switch (c) { in buffer_append_bs_escaped_json()
795 c = "0000000abtnvfr"[c]; in buffer_append_bs_escaped_json()
800 d[1] = c; in buffer_append_bs_escaped_json()
808 d[4] = hex_chars_uc[c >> 4]; in buffer_append_bs_escaped_json()
809 d[5] = hex_chars_uc[c & 0xF]; in buffer_append_bs_escaped_json()
846 const unsigned char *c = (unsigned char *)b->ptr; in buffer_is_valid_UTF8() local
847 while (*c) { in buffer_is_valid_UTF8()
850 if ( c[0] < 0x80 ) { ++c; continue; } in buffer_is_valid_UTF8()
852 if ( 0xc2 <= c[0] && c[0] <= 0xdf in buffer_is_valid_UTF8()
853 && 0x80 <= c[1] && c[1] <= 0xbf ) { c+=2; continue; } in buffer_is_valid_UTF8()
855 if ( ( ( 0xe0 == c[0] in buffer_is_valid_UTF8()
856 && 0xa0 <= c[1] && c[1] <= 0xbf) in buffer_is_valid_UTF8()
857 || ( 0xe1 <= c[0] && c[0] <= 0xef && c[0] != 0xed in buffer_is_valid_UTF8()
858 && 0x80 <= c[1] && c[1] <= 0xbf) in buffer_is_valid_UTF8()
859 || ( 0xed == c[0] in buffer_is_valid_UTF8()
860 && 0x80 <= c[1] && c[1] <= 0x9f) ) in buffer_is_valid_UTF8()
861 && 0x80 <= c[2] && c[2] <= 0xbf ) { c+=3; continue; } in buffer_is_valid_UTF8()
863 if ( ( ( 0xf0 == c[0] in buffer_is_valid_UTF8()
864 && 0x90 <= c[1] && c[1] <= 0xbf) in buffer_is_valid_UTF8()
865 || ( 0xf1 <= c[0] && c[0] <= 0xf3 in buffer_is_valid_UTF8()
866 && 0x80 <= c[1] && c[1] <= 0xbf) in buffer_is_valid_UTF8()
867 || ( 0xf4 == c[0] in buffer_is_valid_UTF8()
868 && 0x80 <= c[1] && c[1] <= 0x8f) ) in buffer_is_valid_UTF8()
869 && 0x80 <= c[2] && c[2] <= 0xbf in buffer_is_valid_UTF8()
870 && 0x80 <= c[3] && c[3] <= 0xbf ) { c+=4; continue; } in buffer_is_valid_UTF8()