summaryrefslogtreecommitdiffstats
path: root/ini/ini_defines.h
diff options
context:
space:
mode:
authorDmitri Pal <dpal@redhat.com>2010-08-02 21:44:15 -0400
committerStephen Gallagher <sgallagh@redhat.com>2010-09-22 14:57:53 -0400
commita54a8e53a97d104490966e36d40e9b0b419ad050 (patch)
tree0bffb1517c4daaa645a917d1938e067a44696322 /ini/ini_defines.h
parentfbaa3ff3a5e45bffea373d0bea4ccd206db37a45 (diff)
downloadding-libs-a54a8e53a97d104490966e36d40e9b0b419ad050.tar.gz
ding-libs-a54a8e53a97d104490966e36d40e9b0b419ad050.tar.xz
ding-libs-a54a8e53a97d104490966e36d40e9b0b419ad050.zip
Introducing configuration file object
The patch contains two major pieces of work: * The beginning of the new INI interface significantly re-thought and reworked. * The implementation of the file object. Parsing was adjusted to use this object.
Diffstat (limited to 'ini/ini_defines.h')
-rw-r--r--ini/ini_defines.h29
1 files changed, 23 insertions, 6 deletions
diff --git a/ini/ini_defines.h b/ini/ini_defines.h
index efa9c98..bead998 100644
--- a/ini/ini_defines.h
+++ b/ini/ini_defines.h
@@ -46,8 +46,8 @@
#define FAILED_TO_PROC_V _("Internal Error. Failed to process list of validation errors.\n")
#define ERROR_HEADER_V _("Validation errors and warnings in file: %s\n")
-#define LINE_FORMAT _("%s (%d) on line %d: %s\n")
-
+#define LINE_FORMAT _("%s (%d) on line %d: %s")
+#define MAX_ERROR_LINE 120
/* Codes that parsing function can return */
#define RET_PAIR 0
@@ -59,6 +59,7 @@
#define RET_ERROR 6
#define INI_ERROR "errors"
+#define INI_METADATA "meta"
#define INI_ERROR_NAME "errname"
#define INI_CONFIG_NAME "INI"
@@ -73,10 +74,26 @@
#define CONVERSION_BUFFER 80
/* Size of the block for a value */
-#define INI_VALUE_BLOCK 100
-
-/* This constant belongs here. Move from ini_config - TBD */
-/* #define COL_CLASS_INI_BASE 20000 */
+#define INI_VALUE_BLOCK 100
+
+/* Default boundary */
+#define INI_WRAP_BOUNDARY 80
+
+/* This constant belongs here. */
+#define COL_CLASS_INI_BASE 20000
+/**
+ * @brief A one level collection of parse errors.
+ *
+ * Collection stores \ref parse_error structures.
+ */
+#define COL_CLASS_INI_PERROR COL_CLASS_INI_BASE + 2
+
+/**
+ * @brief Collection of metadata.
+ *
+ * Collection that stores metadata.
+ */
+#define COL_CLASS_INI_META COL_CLASS_INI_BASE + 4
/* Different error string functions can be passed as callbacks */