aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-07-19 22:57:00 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-07-19 22:57:00 +0000
commitdcb3fcb042612bfbb311a488379c65024bafd52b (patch)
treece29b24ad433b8d8a4e0b450ca458bcde69a9a88 /include
parentc29684afd61b841c93517f378aaa1fd7750b038d (diff)
downloadbusybox-dcb3fcb042612bfbb311a488379c65024bafd52b.tar.gz
libbb: config_read() update
Diffstat (limited to 'include')
-rw-r--r--include/libbb.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/include/libbb.h b/include/libbb.h
index af6c1385d..4e4e37911 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -990,14 +990,18 @@ int bb_parse_mode(const char* s, mode_t* theMode) FAST_FUNC;
/*
* Config file parser
*/
-#define PARSE_DONT_REDUCE 0x00010000 // do not treat consecutive delimiters as one
-#define PARSE_DONT_TRIM 0x00020000 // do not trim line of leading and trailing delimiters
-#define PARSE_LAST_IS_GREEDY 0x00040000 // last token takes whole remainder of the line
-//#define PARSE_DONT_NULL 0x00080000 // do not set tokens[] to NULL
+enum {
+ PARSE_DONT_REDUCE = 0x00010000, // do not treat consecutive delimiters as one
+ PARSE_DONT_TRIM = 0x00020000, // do not trim line of leading and trailing delimiters
+ PARSE_LAST_IS_GREEDY = 0x00040000, // last token takes whole remainder of the line
+// PARSE_DONT_NULL = 0x00080000, // do not set tokens[] to NULL
+ // keep a copy of current line
+ PARSE_KEEP_COPY = 0x00200000 * ENABLE_DEBUG_CROND_OPTION,
+};
typedef struct parser_t {
FILE *fp;
char *line;
- USE_FEATURE_PARSE_COPY(char *data;)
+ char *data;
int lineno;
} parser_t;
parser_t* config_open(const char *filename) FAST_FUNC;