aboutsummaryrefslogtreecommitdiff
path: root/parse.h
diff options
context:
space:
mode:
Diffstat (limited to 'parse.h')
-rw-r--r--parse.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/parse.h b/parse.h
index ea60461f..ad1cebc2 100644
--- a/parse.h
+++ b/parse.h
@@ -7,6 +7,10 @@
#include "strbuf.h"
#include "vcal.h"
+#define TYPE vcomponent
+#include "linked_list.h"
+#undef TYPE
+
/*
* Max length of a line.
* TODO update this to allow longer lines, in case someone doesn't
@@ -28,18 +32,19 @@ typedef enum {
} scope_context;
typedef struct {
- scope_context scope;
- strbuf* skip_to;
+ char* filename;
+ LLIST(strbuf) key_stack;
+ LLIST(vcomponent) comp_stack;
} parse_ctx;
+INIT_F(parse_ctx, char* filename);
+
int handle_kv(
- vcomponent* cal,
- vcomponent* ev,
content_line* cline,
int line,
parse_ctx* ctx
);
-int parse_file(char* fname, FILE* f, vcomponent* cal);
+int parse_file(char* filename, FILE* f, vcomponent* cal);
#endif /* PARSE_H */