From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailout.scc.kit.edu (mailout.scc.kit.edu [129.13.185.202]) by krisdoz.my.domain (8.14.5/8.14.5) with ESMTP id q15C6A96003159 for ; Sun, 5 Feb 2012 07:06:11 -0500 (EST) Received: from hekate.usta.de (asta-nat.asta.uni-karlsruhe.de [172.22.63.82]) by scc-mailout-02.scc.kit.edu with esmtp (Exim 4.72 #1) id 1Ru0rC-0005fl-9m; Sun, 05 Feb 2012 13:06:10 +0100 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.77) (envelope-from ) id 1Ru0rC-0003I0-A6 for discuss@mdocml.bsd.lv; Sun, 05 Feb 2012 13:06:10 +0100 Received: from iris.usta.de ([172.24.96.5] helo=usta.de) by donnerwolke.usta.de with esmtp (Exim 4.72) (envelope-from ) id 1Ru0rC-0005P4-90 for discuss@mdocml.bsd.lv; Sun, 05 Feb 2012 13:06:10 +0100 Received: from schwarze by usta.de with local (Exim 4.77) (envelope-from ) id 1Ru0rC-000539-8G for discuss@mdocml.bsd.lv; Sun, 05 Feb 2012 13:06:10 +0100 Date: Sun, 5 Feb 2012 13:06:10 +0100 From: Ingo Schwarze To: discuss@mdocml.bsd.lv Subject: Re: Discarding non-ASCII input Message-ID: <20120205120610.GA17423@iris.usta.de> References: <20120205004542.GA17831@britannica.bec.de> <20120205101744.GA15816@iris.usta.de> <20120205115803.GA2763@britannica.bec.de> X-Mailinglist: mdocml-discuss Reply-To: discuss@mdocml.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120205115803.GA2763@britannica.bec.de> User-Agent: Mutt/1.5.21 (2010-09-15) Hi Joerg, Joerg Sonnenberger wrote on Sun, Feb 05, 2012 at 12:58:03PM +0100: > On Sun, Feb 05, 2012 at 11:17:44AM +0100, Ingo Schwarze wrote: >> You might also wish to replace the "ignoring byte" by NULL >> when changing this. > If you mean \0, that wouldn't help too much, since it still doesn't > count as argument. The idea is to translate something that most likely > is an argument into something that preserves this. Sorry for being too terse and not clear; i just meant the error message a few lines above your change, as in the following UNTESTED patch, to be added to what you already have. I'm fine with the '?' you propose and don't want to change that to '\0'. Thanks, Ingo Index: read.c =================================================================== RCS file: /cvs/src/usr.bin/mandoc/read.c,v retrieving revision 1.5 diff -u -p -r1.5 read.c --- read.c 5 Nov 2011 16:02:18 -0000 1.5 +++ read.c 5 Feb 2012 12:02:04 -0000 @@ -325,7 +325,7 @@ mparse_buf_r(struct mparse *curp, struct if ( ! (isascii(c) && (isgraph(c) || isblank(c)))) { mandoc_msg(MANDOCERR_BADCHAR, curp, - curp->line, pos, "ignoring byte"); + curp->line, pos, NULL); i++; continue; } -- To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv