summaryrefslogtreecommitdiffstats
path: root/src/parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser.c')
-rw-r--r--src/parser.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/parser.c b/src/parser.c
index 5009ca1..e4bffb4 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -3,12 +3,6 @@
#include "parser.h"
#include "util.h"
-typedef enum parser_type {
- TITLE = 0,
- ITEMS,
- STEPS,
-} pt;
-
static const int
parse_title(const char * s, recipe * r, pt * type)
{
@@ -24,16 +18,16 @@ parse_title(const char * s, recipe * r, pt * type)
r->title = strdup(r->filename);
rc = 1;
}
- *type = ITEMS;
+ if (type) *type = ITEMS;
return rc;
}
-static const int
+int
parse_item(const char * s, recipe * r, pt * type, char * error)
{
fdebug("^ item\n");
if (!strcmp(s, "---")) {
- *type = STEPS;
+ if (type) *type = STEPS;
return 0;
}