index 82b2a2494658bee0af78ef1de7aa975818d996fc..e0abba83a42463db0e08a839169b63181785d7b4 100644 (file)
--- a/src/libcroco/cr-style.c
+++ b/src/libcroco/cr-style.c
{"font-weight", PROP_ID_FONT_WEIGHT},
{"white-space", PROP_ID_WHITE_SPACE},
/*must be the last one */
- {NULL, (CRPropertyID)0}
+ {NULL, (enum CRPropertyID)0}
};
/**
{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 {
{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 {
{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
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
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) ;
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) ;
{
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;
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;
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;
*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 {
}
/*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);
/*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);