diff options
Diffstat (limited to 'config_parser.h')
-rw-r--r-- | config_parser.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/config_parser.h b/config_parser.h new file mode 100644 index 0000000..73941f8 --- /dev/null +++ b/config_parser.h @@ -0,0 +1,34 @@ +/* + * + * File : config_parser.c + * + * Author : Zurcher Jeremy + * + * Date : + * + * Purpose : + * + */ + +#ifndef CONFIG_PARSER_H +#define CONFIG_PARSER_H + +#define BUFFLEN 64 + +/** + * callback + * @param token the parsed token + * @param incomplete set to 1 if the token is too big for the buffer + */ +typedef int(*config_callback)(char *token, int incomplete); + +/** + * read_config + * + * @param filename the path to the configuration file to parse + * @param callback function called with each token + */ +int parse_config(char *filename, config_callback callabck); + +#endif /* CONFIG_PARSER_H */ + |