diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-07-23 13:31:03 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-07-23 13:31:03 +0000 |
commit | 120b20293594a2d47c4e480f65706a805f0e629b (patch) | |
tree | 9eba773c68e77564bfc05c38f9a9bcf7b51223e6 | |
parent | a83e8b87ddf1712de4e78f26949891740aa3898a (diff) | |
download | mandoc-120b20293594a2d47c4e480f65706a805f0e629b.tar.gz mandoc-120b20293594a2d47c4e480f65706a805f0e629b.tar.zst mandoc-120b20293594a2d47c4e480f65706a805f0e629b.zip |
Raise a warning when text follows the `EN'.
-rw-r--r-- | eqn.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $Id: eqn.c,v 1.34 2011/07/23 12:10:16 kristaps Exp $ */ +/* $Id: eqn.c,v 1.35 2011/07/23 13:31:03 kristaps Exp $ */ /* * Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -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); } |