diff options
| author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-07-19 22:57:00 +0000 |
|---|---|---|
| committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-07-19 22:57:00 +0000 |
| commit | dcb3fcb042612bfbb311a488379c65024bafd52b (patch) | |
| tree | ce29b24ad433b8d8a4e0b450ca458bcde69a9a88 /include | |
| parent | c29684afd61b841c93517f378aaa1fd7750b038d (diff) | |
| download | busybox-w32-dcb3fcb042612bfbb311a488379c65024bafd52b.tar.gz busybox-w32-dcb3fcb042612bfbb311a488379c65024bafd52b.tar.bz2 busybox-w32-dcb3fcb042612bfbb311a488379c65024bafd52b.zip | |
libbb: config_read() update
Diffstat (limited to 'include')
| -rw-r--r-- | include/libbb.h | 14 |
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; | |||
| 990 | /* | 990 | /* |
| 991 | * Config file parser | 991 | * Config file parser |
| 992 | */ | 992 | */ |
| 993 | #define PARSE_DONT_REDUCE 0x00010000 // do not treat consecutive delimiters as one | 993 | enum { |
| 994 | #define PARSE_DONT_TRIM 0x00020000 // do not trim line of leading and trailing delimiters | 994 | PARSE_DONT_REDUCE = 0x00010000, // do not treat consecutive delimiters as one |
| 995 | #define PARSE_LAST_IS_GREEDY 0x00040000 // last token takes whole remainder of the line | 995 | PARSE_DONT_TRIM = 0x00020000, // do not trim line of leading and trailing delimiters |
| 996 | //#define PARSE_DONT_NULL 0x00080000 // do not set tokens[] to NULL | 996 | PARSE_LAST_IS_GREEDY = 0x00040000, // last token takes whole remainder of the line |
| 997 | // PARSE_DONT_NULL = 0x00080000, // do not set tokens[] to NULL | ||
| 998 | // keep a copy of current line | ||
| 999 | PARSE_KEEP_COPY = 0x00200000 * ENABLE_DEBUG_CROND_OPTION, | ||
| 1000 | }; | ||
| 997 | typedef struct parser_t { | 1001 | typedef struct parser_t { |
| 998 | FILE *fp; | 1002 | FILE *fp; |
| 999 | char *line; | 1003 | char *line; |
| 1000 | USE_FEATURE_PARSE_COPY(char *data;) | 1004 | char *data; |
| 1001 | int lineno; | 1005 | int lineno; |
| 1002 | } parser_t; | 1006 | } parser_t; |
| 1003 | parser_t* config_open(const char *filename) FAST_FUNC; | 1007 | parser_t* config_open(const char *filename) FAST_FUNC; |
