From 806c80ef1d9f307a8386c90d661a9d26f212190c Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Sat, 23 Jul 2011 13:31:03 +0000 Subject: Raise a warning when text follows the `EN'. --- eqn.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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); } -- cgit