diff options
author | Hugo Hörnquist <hugo@hornquist.se> | 2019-02-22 14:39:34 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@hornquist.se> | 2019-02-22 14:39:34 +0100 |
commit | a608b90f8c146430803871e20d043b60a278248b (patch) | |
tree | 194e6e80cd5403cc64d1e4915f9be45a462d3918 /parse.h | |
parent | strbuf (diff) | |
download | calp-a608b90f8c146430803871e20d043b60a278248b.tar.gz calp-a608b90f8c146430803871e20d043b60a278248b.tar.xz |
rest
Diffstat (limited to 'parse.h')
-rw-r--r-- | parse.h | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -7,9 +7,9 @@ #include "strbuf.h" #include "vcal.h" -#define TYPE vcomponent +// #define TYPE vcomponent #include "linked_list.h" -#undef TYPE +// #undef TYPE /* * The standard says that no line should be longer than 75 octets. @@ -26,7 +26,7 @@ typedef enum { * Struct holding most state information needed while parsing. * Kept together for simplicity. */ -typedef struct { +struct parse_ctx { char* filename; llist<strbuf> key_stack; llist<vcomponent> comp_stack; @@ -40,10 +40,11 @@ typedef struct { int pcolumn; strbuf str; -} parse_ctx; -INIT_F(parse_ctx, char* filename); -FREE_F(parse_ctx); + parse_ctx (const char* filename); + + ~parse_ctx (); +}; int handle_kv( content_line* cline, |