summaryrefslogtreecommitdiffstats
path: root/ini/ini_defines.h
diff options
context:
space:
mode:
authorDmitri Pal <dpal@redhat.com>2012-12-04 19:38:58 -0500
committerOndrej Kos <okos@redhat.com>2012-12-06 14:23:26 +0100
commit854d077f8a7ded3f5c25f58fa4bfc46aa55095db (patch)
treef6946568ffca0856343cf17bdbf603cff7738cb6 /ini/ini_defines.h
parent85831de020e701104d0bcfbb274e5978faf31723 (diff)
downloadding-libs-854d077f8a7ded3f5c25f58fa4bfc46aa55095db.tar.gz
ding-libs-854d077f8a7ded3f5c25f58fa4bfc46aa55095db.tar.xz
ding-libs-854d077f8a7ded3f5c25f58fa4bfc46aa55095db.zip
Improve parser
1. Move the last comment into the config object Last comment in the file was previously treated as a special value in the last section in the configuration object. That created difficulties while merging. Storing an orphan comment as part of the config object is a better approach 2. Since the structure of the config object changed the internal header and serialization required update. 3. Parser code was updated to: - deal with the last comment on the top level - make sure the right error codes are returned in different modes - pass right information through the layers which caused some refactoring of the internal calls - prevent using an already used configuration object as an input to parser.
Diffstat (limited to 'ini/ini_defines.h')
-rw-r--r--ini/ini_defines.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/ini/ini_defines.h b/ini/ini_defines.h
index b861f0e..db898c3 100644
--- a/ini/ini_defines.h
+++ b/ini/ini_defines.h
@@ -63,7 +63,6 @@
#define INI_ERROR_NAME "errname"
#define INI_CONFIG_NAME "INI"
-#define INI_SPECIAL_KEY "="
#define INI_SECTION_KEY "["
/* Internal sizes. MAX_KEY is defined in config.h */
@@ -81,6 +80,8 @@
/* This constant belongs here. */
#define COL_CLASS_INI_BASE 20000
+#define COL_CLASS_INI_CONFIG COL_CLASS_INI_BASE + 0
+
/**
* @brief A one level collection of parse errors.
*