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 0479bf90 for ; Sun, 8 Jan 2017 21:22:07 -0500 (EST) Date: Sun, 8 Jan 2017 21:22:07 -0500 (EST) Message-Id: <14626129272047372381.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: merge rev. X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- merge rev. 1.154: improve message "whitespace at end of input line" Tags: ---- VERSION_1_13 Modified Files: -------------- mdocml: read.c Revision Data ------------- Index: read.c =================================================================== RCS file: /home/cvs/mdocml/mdocml/read.c,v retrieving revision 1.150.2.2 retrieving revision 1.150.2.3 diff -Lread.c -Lread.c -u -p -r1.150.2.2 -r1.150.2.3 --- read.c +++ read.c @@ -317,6 +317,7 @@ mparse_buf_r(struct mparse *curp, struct const char *save_file; char *cp; size_t pos; /* byte number in the ln buffer */ + size_t j; /* auxiliary byte number in the blk buffer */ enum rofferr rr; int of; int lnn; /* line number in the real file */ @@ -422,6 +423,7 @@ mparse_buf_r(struct mparse *curp, struct } if ('"' == blk.buf[i + 1] || '#' == blk.buf[i + 1]) { + j = i; i += 2; /* Comment, skip to end of line */ for (; i < blk.sz; ++i) { @@ -432,7 +434,7 @@ mparse_buf_r(struct mparse *curp, struct mandoc_msg( MANDOCERR_SPACE_EOL, curp, curp->line, - pos, NULL); + pos + i-1 - j, NULL); ++i; ++lnn; break; -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv