diff options
author | Dmitri Pal <dpal@redhat.com> | 2012-12-24 13:33:44 -0500 |
---|---|---|
committer | Ondrej Kos <okos@redhat.com> | 2013-01-24 08:34:48 +0100 |
commit | fa00e2e16e5c1d3ac56f1bbd3a84875642d0bb39 (patch) | |
tree | f97d1297511421e2b2b30c5a53f1f62a1e0f1311 /ini/ini_print.c | |
parent | 3b9baa61367f2b651c8068efc99ce017331622e0 (diff) | |
download | ding-libs-fa00e2e16e5c1d3ac56f1bbd3a84875642d0bb39.tar.gz ding-libs-fa00e2e16e5c1d3ac56f1bbd3a84875642d0bb39.tar.xz ding-libs-fa00e2e16e5c1d3ac56f1bbd3a84875642d0bb39.zip |
Introducing parsing flags
1. Added definition of the parsing flags to the header.
2. Added new argument to the parser.
3. Added function to check the correctness of the line.
4. Added new constants and strings for errors.
5. Refactored function that handles spaces.
6. Moved handle_space since it now calls handle_kvp.
7. Updated handle_kvp to trim spaces at the beginning.
8. Adjusted line inspection to handle any space character.
9. Adjusted exising unit tests. Added parameter to the call.
10. Found couple places where there was a space at the end
of the line and cleaned them.
The additional unit tests will be added in the follow up patch.
Diffstat (limited to 'ini/ini_print.c')
-rw-r--r-- | ini/ini_print.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ini/ini_print.c b/ini/ini_print.c index d2d01c1..1812cd6 100644 --- a/ini/ini_print.c +++ b/ini/ini_print.c @@ -122,7 +122,11 @@ static const char *parsing_error_str(int parsing_error) _("Duplicate key is not allowed."), _("Duplicate key is detected while " "merging sections."), - _("Duplicate section is not allowed.") + _("Duplicate section is not allowed."), + _("Invalid character at the " + "beginning of the line."), + _("Invalid tab character at the " + "beginning of the line.") }; /* Check the range */ |