diff options
author | Jérémy Zurcher <jeremy.zurcher@heraeus.com> | 2014-01-03 16:43:15 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy.zurcher@heraeus.com> | 2014-01-03 16:43:15 +0100 |
commit | eb9c210d7412455363153ea2bdc5aca5aaa30384 (patch) | |
tree | b079a409893dbd1c663d51337d903a63864dde3a /config_parser.h | |
download | config-parser-eb9c210d7412455363153ea2bdc5aca5aaa30384.zip config-parser-eb9c210d7412455363153ea2bdc5aca5aaa30384.tar.gz |
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 */ + |