98 #define CROCO_LOG_DOMAIN "LIBCROCO" 101 #define cr_utils_trace(a_log_level, a_msg) \ 102 g_log (CROCO_LOG_DOMAIN, \ 103 G_LOG_LEVEL_CRITICAL, \ 104 "file %s: line %d (%s): %s\n", \ 107 __PRETTY_FUNCTION__, \ 111 #define cr_utils_trace(a_log_level, a_msg) \ 112 g_log (CROCO_LOG_DOMAIN, \ 113 G_LOG_LEVEL_CRITICAL, \ 114 "file %s: line %d: %s\n", \ 127 #define cr_utils_trace_info(a_msg) \ 128 cr_utils_trace (G_LOG_LEVEL_INFO, a_msg) 137 #define cr_utils_trace_debug(a_msg) \ 138 cr_utils_trace (G_LOG_LEVEL_DEBUG, a_msg) ; 148 guint32 *a_out, gulong *a_consumed) ;
152 guchar *a_out, gulong *a_out_len) ;
156 guchar *a_out, gulong *a_out_len) ;
160 guchar *a_out, gulong *a_out_len) ;
164 const guchar *a_in_end,
168 const guchar *a_in_end,
172 const guchar *a_in_end,
176 const guint32 *a_in_end,
194 guint32 *a_out, gulong *a_out_len) ;
199 guchar **a_out, gulong *a_out_len) ;
enum CRStatus cr_utils_utf8_str_to_ucs4(const guchar *a_in, gulong *a_in_len, guint32 **a_out, gulong *a_out_len)
Converts an utf8 string into an ucs4 string.
void cr_utils_dump_n_chars2(guchar a_char, GString *a_string, glong a_nb)
enum CRStatus cr_utils_utf8_to_ucs4(const guchar *a_in, gulong *a_in_len, guint32 *a_out, gulong *a_out_len)
Converts an utf8 buffer into an ucs4 buffer.
CREncoding
Encoding values.
enum CRStatus cr_utils_read_char_from_utf8_buf(const guchar *a_in, gulong a_in_len, guint32 *a_out, gulong *a_consumed)
Reads a character from an utf8 buffer.
CRStatus
The status type returned by the methods of the croco library.
enum CRStatus cr_utils_ucs4_str_to_utf8(const guint32 *a_in, gulong *a_in_len, guchar **a_out, gulong *a_out_len)
Converts an ucs4 string into an utf8 string.
GList * cr_utils_dup_glist_of_string(GList const *a_list)
Duplicates a list of GString instances.
CRSeekPos
Values used by cr_input_seek_position() ;.
gboolean cr_utils_is_newline(guint32 a_char)
Returns true if the character is a newline as defined in the css spec in the chap 4....
enum CRStatus cr_utils_utf8_to_ucs1(const guchar *a_in, gulong *a_in_len, guchar *a_out, gulong *a_out_len)
Converts an utf8 buffer into an ucs1 buffer.
gboolean cr_utils_is_nonascii(guint32 a_char)
Returns true if the character is a nonascii character (as defined in the css spec chap 4....
enum CRStatus cr_utils_utf8_str_to_ucs1(const guchar *a_in_start, gulong *a_in_len, guchar **a_out, gulong *a_out_len)
Converts an utf8 buffer into an ucs1 buffer.
enum CRStatus cr_utils_ucs1_str_to_utf8(const guchar *a_in_start, gulong *a_in_len, guchar **a_out, gulong *a_len)
Converts an ucs1 string into an utf8 string.
GList * cr_utils_dup_glist_of_cr_string(GList const *a_list_of_strings)
Duplicate a GList where the GList::data is a CRString.
enum CRStatus cr_utils_ucs1_str_len_as_utf8(const guchar *a_in_start, const guchar *a_in_end, gulong *a_len)
Given an ucsA string, this function returns the size (in bytes) this string would have occupied if it...
gboolean cr_utils_is_white_space(guint32 a_char)
Returns TRUE if a_char is a white space as defined in the css spec in chap 4.1.1.
enum CRStatus cr_utils_ucs1_to_utf8(const guchar *a_in, gulong *a_in_len, guchar *a_out, gulong *a_out_len)
Converts an ucs1 buffer into an utf8 buffer.
void cr_utils_dump_n_chars(guchar a_char, FILE *a_fp, glong a_nb)
Dumps a character a_nb times on a file.
enum CRStatus cr_utils_ucs4_str_len_as_utf8(const guint32 *a_in_start, const guint32 *a_in_end, gulong *a_len)
Given an ucs4 string, this function returns the size (in bytes) this string would have occupied if it...
enum CRStatus cr_utils_ucs4_to_utf8(const guint32 *a_in, gulong *a_in_len, guchar *a_out, gulong *a_out_len)
Converts an ucs4 buffer into an utf8 buffer.
gboolean cr_utils_is_hexa_char(guint32 a_char)
returns TRUE if the char is part of an hexa num char: i.e hexa_char ::= [0-9A-F]
enum CRStatus cr_utils_utf8_str_len_as_ucs4(const guchar *a_in_start, const guchar *a_in_end, gulong *a_len)
Given an utf8 string buffer, calculates the length of this string if it was encoded in ucs4.
enum CRStatus cr_utils_utf8_str_len_as_ucs1(const guchar *a_in_start, const guchar *a_in_end, gulong *a_len)