summaryrefslogtreecommitdiffstats
path: root/config_parser.h
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy.zurcher@heraeus.com>2014-01-03 16:43:15 +0100
committerJérémy Zurcher <jeremy.zurcher@heraeus.com>2014-01-03 16:43:15 +0100
commiteb9c210d7412455363153ea2bdc5aca5aaa30384 (patch)
treeb079a409893dbd1c663d51337d903a63864dde3a /config_parser.h
downloadconfig-parser-master.zip
config-parser-master.tar.gz
Initial commitHEADmaster
Diffstat (limited to 'config_parser.h')
-rw-r--r--config_parser.h34
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 */
+