summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBob Jamison <ishmalius@gmail.com>2006-11-15 13:44:09 +0000
committerishmal <ishmal@users.sourceforge.net>2006-11-15 13:44:09 +0000
commit421cab2d4f1984e554ef19bac545e356adcf1230 (patch)
treeebc71f5a364103a4029b3539d1ba72e66f639d2d /src
parentMake C++ - compilable. Mostly remove pointer casting problems. Fix a few pla... (diff)
downloadinkscape-421cab2d4f1984e554ef19bac545e356adcf1230.tar.gz
inkscape-421cab2d4f1984e554ef19bac545e356adcf1230.zip
More compile error cleanup
(bzr r1955)
Diffstat (limited to 'src')
-rw-r--r--src/libcroco/cr-enc-handler.c4
-rw-r--r--src/libcroco/cr-fonts.c2
-rw-r--r--src/libcroco/cr-parser.c6
-rw-r--r--src/libcroco/cr-parsing-location.c2
-rw-r--r--src/libcroco/cr-style.c43
5 files changed, 30 insertions, 27 deletions
diff --git a/src/libcroco/cr-enc-handler.c b/src/libcroco/cr-enc-handler.c
index 456ac51fa..973a5f373 100644
--- a/src/libcroco/cr-enc-handler.c
+++ b/src/libcroco/cr-enc-handler.c
@@ -57,7 +57,7 @@ static struct CREncAlias gv_default_aliases[] = {
{"UCS-4", CR_UCS_4},
{"UCS_4", CR_UCS_4},
{"ASCII", CR_ASCII},
- {(char *)0, (CREncoding)0}
+ {(char *)0, (enum CREncoding)0}
};
static CREncHandler gv_default_enc_handlers[] = {
@@ -70,7 +70,7 @@ static CREncHandler gv_default_enc_handlers[] = {
{CR_ASCII, cr_utils_ucs1_to_utf8, cr_utils_utf8_to_ucs1,
cr_utils_ucs1_str_len_as_utf8, cr_utils_utf8_str_len_as_ucs1},
- {(CREncoding)0, NULL, NULL, NULL, NULL}
+ {(enum CREncoding)0, NULL, NULL, NULL, NULL}
};
/**
diff --git a/src/libcroco/cr-fonts.c b/src/libcroco/cr-fonts.c
index 63d8412f2..14438c344 100644
--- a/src/libcroco/cr-fonts.c
+++ b/src/libcroco/cr-fonts.c
@@ -613,7 +613,7 @@ cr_font_weight_get_bolder (enum CRFontWeight a_weight)
cr_utils_trace_info ("FONT_WEIGHT_BOLDER or FONT_WEIGHT_LIGHTER should not appear here") ;
return FONT_WEIGHT_NORMAL ;
} else {
- return (CRFontWeight)(a_weight << 1) ;
+ return (enum CRFontWeight)(a_weight << 1) ;
}
}
diff --git a/src/libcroco/cr-parser.c b/src/libcroco/cr-parser.c
index 2b411a8d4..5b0a56f32 100644
--- a/src/libcroco/cr-parser.c
+++ b/src/libcroco/cr-parser.c
@@ -1675,14 +1675,14 @@ cr_parser_parse_simple_selector (CRParser * a_this, CRSimpleSel ** a_sel)
if (token && token->type == DELIM_TK
&& token->u.unichar == '*') {
int comb = (int)sel->type_mask | (int) UNIVERSAL_SELECTOR;
- sel->type_mask = (SimpleSelectorType)comb;
+ sel->type_mask = (enum SimpleSelectorType)comb;
//sel->type_mask |= UNIVERSAL_SELECTOR;
sel->name = cr_string_new_from_string ("*");
found_sel = TRUE;
} else if (token && token->type == IDENT_TK) {
sel->name = token->u.str;
int comb = (int)sel->type_mask | (int) TYPE_SELECTOR;
- sel->type_mask = (SimpleSelectorType)comb;
+ sel->type_mask = (enum SimpleSelectorType)comb;
//sel->type_mask |= TYPE_SELECTOR;
token->u.str = NULL;
found_sel = TRUE;
@@ -1961,7 +1961,7 @@ cr_parser_parse_simple_sels (CRParser * a_this,
break;
if (comb && sel) {
- sel->combinator = (Combinator)comb;
+ sel->combinator = (enum Combinator)comb;
comb = 0;
}
if (sel) {
diff --git a/src/libcroco/cr-parsing-location.c b/src/libcroco/cr-parsing-location.c
index 49e8a3ce9..38a75a6e6 100644
--- a/src/libcroco/cr-parsing-location.c
+++ b/src/libcroco/cr-parsing-location.c
@@ -95,7 +95,7 @@ cr_parsing_location_to_string (CRParsingLocation *a_this,
g_return_val_if_fail (a_this, NULL) ;
if (!a_mask) {
- a_mask = (CRParsingLocationSerialisationMask)
+ a_mask = (enum CRParsingLocationSerialisationMask)
((int)DUMP_LINE | (int)DUMP_COLUMN | (int)DUMP_BYTE_OFFSET) ;
}
GString *result = (GString *)g_string_new (NULL) ;
diff --git a/src/libcroco/cr-style.c b/src/libcroco/cr-style.c
index 82b2a2494..e0abba83a 100644
--- a/src/libcroco/cr-style.c
+++ b/src/libcroco/cr-style.c
@@ -142,7 +142,7 @@ static CRPropertyDesc gv_prop_table[] = {
{"font-weight", PROP_ID_FONT_WEIGHT},
{"white-space", PROP_ID_WHITE_SPACE},
/*must be the last one */
- {NULL, (CRPropertyID)0}
+ {NULL, (enum CRPropertyID)0}
};
/**
@@ -185,7 +185,7 @@ static struct CRNumPropEnumDumpInfo gv_num_props_dump_infos[] = {
{NUM_PROP_MARGIN_BOTTOM, "margin-bottom"},
{NUM_PROP_MARGIN_LEFT, "margin-left"},
{NUM_PROP_WIDTH, "width"},
- {(CRNumProp)0, NULL}
+ {(enum CRNumProp)0, NULL}
};
struct CRRgbPropEnumDumpInfo {
@@ -200,7 +200,7 @@ static struct CRRgbPropEnumDumpInfo gv_rgb_props_dump_infos[] = {
{RGB_PROP_BORDER_LEFT_COLOR, "left-color"},
{RGB_PROP_COLOR, "color"},
{RGB_PROP_BACKGROUND_COLOR, "background-color"},
- {(CRRgbProp)0, NULL}
+ {(enum CRRgbProp)0, NULL}
};
struct CRBorderStylePropEnumDumpInfo {
@@ -215,7 +215,7 @@ static struct CRBorderStylePropEnumDumpInfo gv_border_style_props_dump_infos[]
{BORDER_STYLE_PROP_RIGHT, "border-style-right"},
{BORDER_STYLE_PROP_BOTTOM, "boder-style-bottom"},
{BORDER_STYLE_PROP_LEFT, "border-style-left"},
- {(CRBorderStyleProp)0, NULL}
+ {(enum CRBorderStyleProp)0, NULL}
};
static enum CRStatus
@@ -425,7 +425,7 @@ cr_style_get_prop_id (const guchar * a_prop)
if (!raw_id) {
return PROP_ID_NOT_KNOWN;
}
- return (CRPropertyID)GPOINTER_TO_INT (raw_id);
+ return (enum CRPropertyID)GPOINTER_TO_INT (raw_id);
}
static enum CRStatus
@@ -576,9 +576,9 @@ set_prop_border_width_from_value (CRStyle *a_style,
if (!cur_term)
return CR_ERROR ;
- for (int dir = (int) DIR_TOP ;
- dir < (int)NB_DIRS ; dir++) {
- CRDirection direction = (CRDirection)dir;
+ int dir;
+ for (dir = (int) DIR_TOP ; dir < (int)NB_DIRS ; dir++) {
+ enum CRDirection direction = (enum CRDirection)dir;
set_prop_border_x_width_from_value (a_style,
cur_term,
direction) ;
@@ -704,9 +704,9 @@ set_prop_border_style_from_value (CRStyle *a_style,
return CR_ERROR ;
}
- for (int dir = (int)DIR_TOP ; dir < (int)NB_DIRS ; dir++)
- {
- CRDirection direction = (CRDirection)dir;
+ int dir;
+ for (dir = (int)DIR_TOP ; dir < (int)NB_DIRS ; dir++) {
+ enum CRDirection direction = (enum CRDirection)dir;
set_prop_border_x_style_from_value (a_style,
cur_term,
direction) ;
@@ -1163,10 +1163,11 @@ set_prop_border_from_value (CRStyle * a_style, CRTerm * a_value)
{
g_return_val_if_fail (a_style && a_value, CR_BAD_PARAM_ERROR);
- for (int direction = 0; direction < NB_DIRS; direction++) {
+ int dir;
+ for (dir = 0; dir < (int)NB_DIRS; dir++) {
set_prop_border_x_from_value (a_style,
a_value,
- (CRDirection)direction);
+ (enum CRDirection)dir);
}
return CR_OK;
@@ -1189,9 +1190,10 @@ set_prop_padding_from_value (CRStyle * a_style, CRTerm * a_value)
if (!cur_term)
return CR_ERROR ;
- for (int direction = 0; direction < (int)NB_DIRS; direction++) {
+ int dir;
+ for (dir = 0; dir < (int)NB_DIRS; dir++) {
set_prop_padding_x_from_value (a_style,
- cur_term, (CRDirection)direction);
+ cur_term, (enum CRDirection)dir);
}
cur_term = cur_term->next;
@@ -1240,9 +1242,10 @@ set_prop_margin_from_value (CRStyle * a_style, CRTerm * a_value)
if (!cur_term)
return CR_OK;
- for (int direction = 0; direction < (int)NB_DIRS; direction++) {
+ int dir;
+ for (dir = 0; dir < (int)NB_DIRS; dir++) {
set_prop_margin_x_from_value(a_style,
- cur_term, (CRDirection)direction);
+ cur_term, (enum CRDirection)dir);
}
cur_term = cur_term->next;
@@ -2673,7 +2676,7 @@ cr_style_to_string (CRStyle * a_this, GString ** a_str, guint a_nb_indent)
*before outputing it value
*/
cr_utils_dump_n_chars2 (' ', str, indent);
- tmp_str = (gchar *) num_prop_code_to_string ((CRNumProp)i);
+ tmp_str = (gchar *) num_prop_code_to_string ((enum CRNumProp)i);
if (tmp_str) {
g_string_append_printf (str, "%s: ", tmp_str);
} else {
@@ -2687,7 +2690,7 @@ cr_style_to_string (CRStyle * a_this, GString ** a_str, guint a_nb_indent)
}
/*loop over the rgb_props and to_string() them all */
for (i = RGB_PROP_BORDER_TOP_COLOR; i < NB_RGB_PROPS; i++) {
- tmp_str = (gchar *) rgb_prop_code_to_string ((CRRgbProp)i);
+ tmp_str = (gchar *) rgb_prop_code_to_string ((enum CRRgbProp)i);
cr_utils_dump_n_chars2 (' ', str, indent);
if (tmp_str) {
g_string_append_printf (str, "%s: ", tmp_str);
@@ -2703,7 +2706,7 @@ cr_style_to_string (CRStyle * a_this, GString ** a_str, guint a_nb_indent)
/*loop over the border_style_props and to_string() them */
for (i = BORDER_STYLE_PROP_TOP; i < NB_BORDER_STYLE_PROPS; i++) {
tmp_str = (gchar *)
- border_style_prop_code_to_string ((CRBorderStyleProp)i);
+ border_style_prop_code_to_string ((enum CRBorderStyleProp)i);
cr_utils_dump_n_chars2 (' ', str, indent);
if (tmp_str) {
g_string_append_printf (str, "%s: ", tmp_str);