From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from localhost (fantadrom.bsd.lv [local]) by fantadrom.bsd.lv (OpenSMTPD) with ESMTPA id 759b4316 for ; Thu, 10 Nov 2016 07:48:20 -0500 (EST) Date: Thu, 10 Nov 2016 07:48:20 -0500 (EST) Message-Id: <103563495723131142.enqueue@fantadrom.bsd.lv> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: schwarze@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: warn about trailing whitespace at the end of comments; missing X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- warn about trailing whitespace at the end of comments; missing feature noticed by jmc@ Modified Files: -------------- mdocml: read.c Revision Data ------------- Index: read.c =================================================================== RCS file: /home/cvs/mdocml/mdocml/read.c,v retrieving revision 1.152 retrieving revision 1.153 diff -Lread.c -Lread.c -u -p -r1.152 -r1.153 --- read.c +++ read.c @@ -423,11 +423,17 @@ mparse_buf_r(struct mparse *curp, struct i += 2; /* Comment, skip to end of line */ for (; i < blk.sz; ++i) { - if ('\n' == blk.buf[i]) { - ++i; - ++lnn; - break; - } + if (blk.buf[i] != '\n') + continue; + if (blk.buf[i - 1] == ' ' || + blk.buf[i - 1] == '\t') + mandoc_msg( + MANDOCERR_SPACE_EOL, + curp, curp->line, + pos, NULL); + ++i; + ++lnn; + break; } /* Backout trailing whitespaces */ -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv