diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-07-22 14:59:02 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-07-22 14:59:02 +0000 |
commit | bf7102688102ef67c2fde9e395308692aa679c51 (patch) | |
tree | ead3a3ce6b26846c12147b2a46fa295231ef38c1 /eqn.c | |
parent | a45ffeccc960ff652ba7f2aeebec3a920827306b (diff) | |
download | mandoc-bf7102688102ef67c2fde9e395308692aa679c51.tar.gz |
Check for and throw away `gfont' eqn macros.
Diffstat (limited to 'eqn.c')
-rw-r--r-- | eqn.c | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -126,6 +126,7 @@ enum eqnpartt { EQN_DEFINE = 0, EQN_SET, EQN_UNDEF, + EQN_GFONT, EQN_GSIZE, EQN__MAX }; @@ -136,6 +137,7 @@ static struct eqn_box *eqn_box_alloc(struct eqn_node *, static void eqn_box_free(struct eqn_box *); static struct eqn_def *eqn_def_find(struct eqn_node *, const char *, size_t); +static int eqn_do_gfont(struct eqn_node *); static int eqn_do_gsize(struct eqn_node *); static int eqn_do_define(struct eqn_node *); static int eqn_do_set(struct eqn_node *); @@ -152,7 +154,8 @@ static const struct eqnpart eqnparts[EQN__MAX] = { { { "define", 6 }, eqn_do_define }, /* EQN_DEFINE */ { { "set", 3 }, eqn_do_set }, /* EQN_SET */ { { "undef", 5 }, eqn_do_undef }, /* EQN_UNDEF */ - { { "gsize", 5 }, eqn_do_gsize }, /* EQN_UNDEF */ + { { "gfont", 5 }, eqn_do_gfont }, /* EQN_GFONT */ + { { "gsize", 5 }, eqn_do_gsize }, /* EQN_GSIZE */ }; static const struct eqnstr eqnmarks[EQNMARK__MAX] = { @@ -765,6 +768,18 @@ eqn_do_define(struct eqn_node *ep) } static int +eqn_do_gfont(struct eqn_node *ep) +{ + const char *start; + + if (NULL == (start = eqn_nextrawtok(ep, NULL))) { + EQN_MSG(MANDOCERR_EQNEOF, ep); + return(0); + } + return(1); +} + +static int eqn_do_gsize(struct eqn_node *ep) { const char *start; |