aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.me.uk>2019-04-06 22:46:16 +0200
committerThomas White <taw@bitwiz.me.uk>2019-04-06 22:46:16 +0200
commit42b06297f2e311057c1dea19d5c14cc44e126da6 (patch)
tree03f3336240dba93bd76ad7ea42453e40ee2a3f92
parentcb559aa47b65cb02a59ef972b2cda938b35db138 (diff)
Parsing fixes
-rw-r--r--libstorycode/storycode.l2
-rw-r--r--libstorycode/storycode.y4
2 files changed, 2 insertions, 4 deletions
diff --git a/libstorycode/storycode.l b/libstorycode/storycode.l
index e7f3961..9a247cd 100644
--- a/libstorycode/storycode.l
+++ b/libstorycode/storycode.l
@@ -55,7 +55,7 @@ GEOMETRY { BEGIN(geom); return SC_GEOMETRY; }
TEXT { return SC_TEXTFRAME; }
IMAGE { return SC_IMAGEFRAME; }
FOOTER { return SC_FOOTER; }
-FONT { BEGIN(font); return SC_FONT; }
+FONT[ ] { BEGIN(font); return SC_FONT; }
PAD { BEGIN(pad); return SC_PAD; }
PARASPACE { BEGIN(paraspace); return SC_PARASPACE; }
ALIGN { BEGIN(align); return SC_ALIGN; }
diff --git a/libstorycode/storycode.y b/libstorycode/storycode.y
index d2508e2..4e3c6d0 100644
--- a/libstorycode/storycode.y
+++ b/libstorycode/storycode.y
@@ -106,12 +106,10 @@
ctx->ss = stylesheet_new();
ctx->s = slide_new();
- ctx->n_str = 0;
ctx->max_str = 32;
ctx->str = malloc(ctx->max_str*sizeof(char *));
if ( ctx->str == NULL ) ctx->max_str = 0;
-
- ctx->mask = 0;
+ str_reset(ctx);
}
%{