diff options
author | Dmitri Pal <dpal@redhat.com> | 2010-07-28 16:27:09 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2010-09-22 14:57:53 -0400 |
commit | fed9fb7462a5ee8afcae8741cb66d8167f9372b1 (patch) | |
tree | 76870c24eb88e06aee6693c3cd291ff40901bebe /ini | |
parent | 22e8ad54ccaa756931c88eb205301722d597c99d (diff) | |
download | ding-libs-fed9fb7462a5ee8afcae8741cb66d8167f9372b1.tar.gz ding-libs-fed9fb7462a5ee8afcae8741cb66d8167f9372b1.tar.xz ding-libs-fed9fb7462a5ee8afcae8741cb66d8167f9372b1.zip |
Add error codes for the new parser
Diffstat (limited to 'ini')
-rw-r--r-- | ini/ini_config.h | 12 | ||||
-rw-r--r-- | ini/ini_print.c | 5 |
2 files changed, 12 insertions, 5 deletions
diff --git a/ini/ini_config.h b/ini/ini_config.h index 28e1af8..c69e235 100644 --- a/ini/ini_config.h +++ b/ini/ini_config.h @@ -226,15 +226,19 @@ #define ERR_NOSECTION 3 /** @brief Section name too long (Error). */ #define ERR_SECTIONLONG 4 -/** @brief No equal sign (Warning). */ +/** @brief No equal sign (Error). */ #define ERR_NOEQUAL 5 -/** @brief No key before equal sign (Warning). */ +/** @brief No key before equal sign (Error). */ #define ERR_NOKEY 6 -/** @brief Key is too long (Warning). */ +/** @brief Key is too long (Error). */ #define ERR_LONGKEY 7 +/** @brief Failed to read line (Error). */ +#define ERR_READ 8 +/** @brief Line starts with space when it should not (Error). */ +#define ERR_SPACE 9 /** @brief Size of the error array. */ -#define ERR_MAXPARSE ERR_LONGKEY +#define ERR_MAXPARSE ERR_SPACE /** * @} diff --git a/ini/ini_print.c b/ini/ini_print.c index e8f9186..60771d3 100644 --- a/ini/ini_print.c +++ b/ini/ini_print.c @@ -75,7 +75,10 @@ const char *parsing_error_str(int parsing_error) _("Section name is too long."), _("Equal sign is missing."), _("Property name is missing."), - _("Property name is too long.") + _("Property name is too long."), + _("Failed to read line."), + _("Invalid space character at the " + "beginning of the line.") }; /* Check the range */ |