diff options
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; |