aboutsummaryrefslogtreecommitdiff
path: root/parse.h
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2019-02-03 21:35:13 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2019-02-03 21:35:13 +0100
commit7b22939c20afa4f4a08c13a25d71f2720f0b6a29 (patch)
treecca1ec10d242fcaca03104c0fc86656223d1bdb9 /parse.h
parentUpdate gitignore to contain parse and *.x. (diff)
downloadcalp-7b22939c20afa4f4a08c13a25d71f2720f0b6a29.tar.gz
calp-7b22939c20afa4f4a08c13a25d71f2720f0b6a29.tar.xz
Loads of memmory fixes, among other.
Diffstat (limited to 'parse.h')
-rw-r--r--parse.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/parse.h b/parse.h
index 76611599..667ccd35 100644
--- a/parse.h
+++ b/parse.h
@@ -25,17 +25,24 @@ typedef enum {
} part_context;
typedef enum {
- s_none, s_calendar, s_event
+ s_none = 1, s_calendar, s_event,
+ s_skip
} scope_context;
+typedef struct {
+ scope_context scope;
+ strbuf* skip_to;
+} parse_ctx;
+
int handle_kv(
vcalendar* cal,
vevent* ev,
content_line* cline,
int line,
- scope_context* s_ctx
+ // scope_context* s_ctx
+ parse_ctx* ctx
);
-int parse_file(FILE* f, vcalendar* cal);
+int parse_file(char* fname, FILE* f, vcalendar* cal);
#endif /* PARSE_H */