index b591770f818d4d904bc29080e85b4cda7db815cc..859b6c5536021eb54d3c3607af1d8bbfe73ca8cf 100644 (file)
--- a/src/libcroco/cr-tknzr.c
+++ b/src/libcroco/cr-tknzr.c
*/
#define SKIP_CHARS(a_tknzr, a_nb_chars) \
{ \
-glong nb_chars = a_nb_chars ; \
+gulong nb_chars = a_nb_chars ; \
status = cr_input_consume_chars \
(PRIVATE (a_tknzr)->input,0, &nb_chars) ; \
CHECK_PARSING_STATUS (status, TRUE) ; \
}
if (cr_utils_is_white_space (cur_char) == TRUE) {
- glong nb_chars = -1; /*consume all spaces */
+ gulong nb_chars = -1; /*consume all spaces */
status = cr_input_consume_white_spaces
(PRIVATE (a_this)->input, &nb_chars);
guchar next_chars[2] = { 0 };
PEEK_BYTE (a_this, 1, &next_chars[0]);
- PEEK_BYTE (a_this, 2, &next_chars[1]);
if (next_chars[0] == '\\') {
guchar *tmp_char_ptr1 = NULL,
*tmp_char_ptr2 = NULL;
guint32 esc_code = 0;
+ PEEK_BYTE (a_this, 2, &next_chars[1]);
+
if (next_chars[1] == '\'' || next_chars[1] == '"') {
g_string_append_unichar (str->stryng,
next_chars[1]);
status = cr_tknzr_parse_num (a_this, &num);
ENSURE_PARSING_COND ((status == CR_OK) && (num != NULL));
- red = num->val;
+ red = (glong)num->val;
cr_num_destroy (num);
num = NULL;
}
if (i == 0) {
- green = num->val;
+ green = (glong)num->val;
} else if (i == 1) {
- blue = num->val;
+ blue = (glong)num->val;
}
if (num) {
CRTknzr *
cr_tknzr_new (CRInput * a_input)
{
- CRTknzr *result = NULL;
-
- result = g_try_malloc (sizeof (CRTknzr));
+ CRTknzr *result = (CRTknzr *)g_try_malloc (sizeof (CRTknzr));
if (result == NULL) {
cr_utils_trace_info ("Out of memory");
memset (result, 0, sizeof (CRTknzr));
- result->priv = g_try_malloc (sizeof (CRTknzrPriv));
+ result->priv = (CRTknzrPriv *)g_try_malloc (sizeof (CRTknzrPriv));
if (result->priv == NULL) {
cr_utils_trace_info ("Out of memory");
enum CREncoding a_enc)
{
CRTknzr *result = NULL;
- CRInput *input = NULL;
-
- input = cr_input_new_from_uri (a_file_uri, a_enc);
+ CRInput *input = cr_input_new_from_uri ((gchar *)a_file_uri, a_enc);
g_return_val_if_fail (input != NULL, NULL);
result = cr_tknzr_new (input);
}
return cr_input_consume_chars (PRIVATE (a_this)->input,
- a_char, a_nb_char);
+ a_char, (gulong *)a_nb_char);
}
enum CRStatus
next_bytes[0] = BYTE (input, 1, NULL);
next_bytes[1] = BYTE (input, 2, NULL);
next_bytes[2] = BYTE (input, 3, NULL);
- next_bytes[3] = BYTE (input, 3, NULL);
+ next_bytes[3] = BYTE (input, 4, NULL);
if (next_bytes[0] == 'e'
&& next_bytes[1] == 'm') {