summaryrefslogtreecommitdiffstats
path: root/eqn.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-07-23 13:31:03 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-07-23 13:31:03 +0000
commit806c80ef1d9f307a8386c90d661a9d26f212190c (patch)
tree2707e2fbfc19012082ad490b617658eaabaaaa84 /eqn.c
parenta7a54c9b7efa4e0e902e2bd8a744520aefefb825 (diff)
downloadmandoc-806c80ef1d9f307a8386c90d661a9d26f212190c.tar.gz
Raise a warning when text follows the `EN'.
Diffstat (limited to 'eqn.c')
-rw-r--r--eqn.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/eqn.c b/eqn.c
index ffdf7a96..8cdef7b6 100644
--- a/eqn.c
+++ b/eqn.c
@@ -285,9 +285,15 @@ eqn_read(struct eqn_node **epp, int ln,
* validate the full equation.
*/
- if (0 == strcmp(p, ".EN")) {
+ if (0 == strncmp(p, ".EN", 3)) {
er = eqn_end(ep);
*epp = NULL;
+ p += 3;
+ while (' ' == *p || '\t' == *p)
+ p++;
+ if ('\0' == *p)
+ return(er);
+ mandoc_msg(MANDOCERR_ARGSLOST, ep->parse, ln, pos, NULL);
return(er);
}