diff options
Diffstat (limited to 'gconf/gconf-gram.y')
-rw-r--r-- | gconf/gconf-gram.y | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/gconf/gconf-gram.y b/gconf/gconf-gram.y index 66b5416..c2d833b 100644 --- a/gconf/gconf-gram.y +++ b/gconf/gconf-gram.y @@ -594,8 +594,9 @@ string_to_sockaddr (struct gconf_sockaddr *sp, const char *string) return 0; } -static int -string_convert (void *target, enum gconf_data_type type, const char *string) +int +gconf_string_convert (void *target, enum gconf_data_type type, + const char *string) { uintmax_t uval; intmax_t sval; @@ -699,11 +700,14 @@ string_convert (void *target, enum gconf_data_type type, const char *string) /* FIXME: */ case gconf_type_cidr: - - case gconf_type_section: gconf_error (&gconf_current_locus, 0, _("INTERNAL ERROR at %s:%d"), __FILE__, __LINE__); abort(); + + case gconf_type_section: + gconf_error (&gconf_current_locus, 0, + _("Invalid use of block statement")); + return 1; } return 0; } @@ -828,7 +832,7 @@ process_ident (struct gconf_keyword *kwp, gconf_value_t *value) else { void *ptr = xmalloc (size); - if (string_convert (ptr, type, vp->v.string) == 0) + if (gconf_string_convert (ptr, type, vp->v.string) == 0) gl_list_add_last (list, ptr); else free (ptr); @@ -871,7 +875,7 @@ process_ident (struct gconf_keyword *kwp, gconf_value_t *value) else { ptr = xmalloc (size); - if (string_convert (ptr, type, value->v.string)) + if (gconf_string_convert (ptr, type, value->v.string)) { free (ptr); gl_list_free (list); @@ -882,6 +886,6 @@ process_ident (struct gconf_keyword *kwp, gconf_value_t *value) *(gl_list_t*)target = list; } else - string_convert (target, GCONF_TYPE (kwp->type), value->v.string); + gconf_string_convert (target, GCONF_TYPE (kwp->type), value->v.string); } |