aboutsummaryrefslogtreecommitdiff
path: root/parse.h
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@hornquist.se>2019-02-22 14:39:34 +0100
committerHugo Hörnquist <hugo@hornquist.se>2019-02-22 14:39:34 +0100
commita608b90f8c146430803871e20d043b60a278248b (patch)
tree194e6e80cd5403cc64d1e4915f9be45a462d3918 /parse.h
parentstrbuf (diff)
downloadcalp-a608b90f8c146430803871e20d043b60a278248b.tar.gz
calp-a608b90f8c146430803871e20d043b60a278248b.tar.xz
rest
Diffstat (limited to 'parse.h')
-rw-r--r--parse.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/parse.h b/parse.h
index f166d502..ab85e5a1 100644
--- a/parse.h
+++ b/parse.h
@@ -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,