projects
/
browser-switch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add independent config file parsing functions
[browser-switch]
/
configfile.h
diff --git
a/configfile.h
b/configfile.h
index
c7863a7
..
c655274
100644
(file)
--- a/
configfile.h
+++ b/
configfile.h
@@
-47,6
+47,19
@@
#define REGEX_CONFIG2_FLAGS REG_EXTENDED|REG_NEWLINE
#define REGEX_CONFIG2_FLAGS REG_EXTENDED|REG_NEWLINE
+struct swb_config_line {
+ /* Whether or not the line has been parsed */
+ int parsed;
+ /* If parsed, the config key; otherwise, the entire line */
+ char *key;
+ /* If parsed, the config value */
+ char *value;
+};
+
FILE *open_config_file(void);
FILE *open_config_file(void);
+int parse_config_file_begin(void);
+void parse_config_file_end(void);
+int parse_config_file_line(FILE *fp, struct swb_config_line *line);
+
#endif /* _CONFIGFILE_H */
#endif /* _CONFIGFILE_H */