* mdocml: Raise a warning when text follows the `EN'.
@ 2011-07-23 13:31 kristaps
0 siblings, 0 replies; only message in thread
From: kristaps @ 2011-07-23 13:31 UTC (permalink / raw)
To: source
Log Message:
-----------
Raise a warning when text follows the `EN'.
Modified Files:
--------------
mdocml:
eqn.c
Revision Data
-------------
Index: eqn.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/eqn.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -Leqn.c -Leqn.c -u -p -r1.34 -r1.35
--- eqn.c
+++ 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);
}
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-07-23 13:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-23 13:31 mdocml: Raise a warning when text follows the `EN' kristaps
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).