diff options
author | Dmitri Pal <dpal@redhat.com> | 2009-12-07 09:24:32 -0500 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2009-12-10 17:20:18 -0500 |
commit | d7a4c5c28d4c8cab9f9679c75114d8810ed87777 (patch) | |
tree | 63a6230861dce4c8ac96b704c2bbeb8764d19748 /common/ini | |
parent | a505858c04d011c54ee0c1015cf5d8d069ff39be (diff) | |
download | sssd_unused-d7a4c5c28d4c8cab9f9679c75114d8810ed87777.tar.gz sssd_unused-d7a4c5c28d4c8cab9f9679c75114d8810ed87777.tar.xz sssd_unused-d7a4c5c28d4c8cab9f9679c75114d8810ed87777.zip |
INI: Cleaning FIXME comments.
Added configurable key length.
Changed comments for the functions that
are currently not used and reserved for
future functionality.
Diffstat (limited to 'common/ini')
-rw-r--r-- | common/ini/configure.ac | 2 | ||||
-rw-r--r-- | common/ini/ini_config.c | 16 | ||||
-rw-r--r-- | common/ini/ini_config.h | 5 |
3 files changed, 16 insertions, 7 deletions
diff --git a/common/ini/configure.ac b/common/ini/configure.ac index c5991244..ef8f0de9 100644 --- a/common/ini/configure.ac +++ b/common/ini/configure.ac @@ -21,5 +21,7 @@ AC_ARG_ENABLE([trace], [trace_level="0"]) AS_IF([test ["$trace_level" -gt "0"] -a ["$trace_level" -lt "8"] ],[AC_SUBST([TRACE_VAR],["-DTRACE_LEVEL=$trace_level"])]) +AC_DEFINE([MAX_KEY], [1024], [Max length of the key in the INI file.]) + AC_CONFIG_FILES([Makefile ini_config.pc]) AC_OUTPUT diff --git a/common/ini/ini_config.c b/common/ini/ini_config.c index bd4fa79c..6766dfad 100644 --- a/common/ini/ini_config.c +++ b/common/ini/ini_config.c @@ -110,11 +110,15 @@ const char *parsing_error_str(int parsing_error) return str_error[parsing_error-1]; } -/* Function to return grammar error */ +/* Function to return grammar error. + * This functions is currently not used. + * It is planned to be used by the INI + * file grammar parser. + */ const char *grammar_error_str(int grammar_error) { const char *placeholder= _("Unknown grammar error."); - /* FIXME - this is a temporary placeholder !!!! */ + /* THIS IS A TEMPORARY PLACEHOLDER !!!! */ const char *str_error[] = { _(""), _(""), _(""), @@ -131,11 +135,15 @@ const char *grammar_error_str(int grammar_error) return str_error[grammar_error-1]; } -/* Function to return validation error */ +/* Function to return validation error. + * This functions is currently not used. + * It is planned to be used by the INI + * file grammar validator. + */ const char *validation_error_str(int validation_error) { const char *placeholder= _("Unknown validation error."); - /* FIXME - this is a temporary placeholder !!!! */ + /* THIS IS A TEMPORARY PLACEHOLDER !!!! */ const char *str_error[] = { _(""), _(""), _(""), diff --git a/common/ini/ini_config.h b/common/ini/ini_config.h index 5ae49814..f7e04153 100644 --- a/common/ini/ini_config.h +++ b/common/ini/ini_config.h @@ -26,6 +26,7 @@ #include <limits.h> #include <stdio.h> #include "collection.h" +#include "config.h" /* Name of the default (missing section in the INI file */ #define INI_DEFAULT_SECTION "default" @@ -68,9 +69,7 @@ -/* Internal sizes */ -/* FIXME - make them configurable via config.h */ -#define MAX_KEY 1024 +/* Internal sizes. MAX_KEY is defined in config.h */ #define MAX_VALUE PATH_MAX #define BUFFER_SIZE MAX_KEY + MAX_VALUE + 3 |