discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Ingo Schwarze <schwarze@usta.de>
To: discuss@mdocml.bsd.lv
Subject: Re: Discarding non-ASCII input
Date: Sun, 5 Feb 2012 13:06:10 +0100	[thread overview]
Message-ID: <20120205120610.GA17423@iris.usta.de> (raw)
In-Reply-To: <20120205115803.GA2763@britannica.bec.de>

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

  reply	other threads:[~2012-02-05 12:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-05  0:45 Joerg Sonnenberger
2012-02-05 10:17 ` Ingo Schwarze
2012-02-05 11:58   ` Joerg Sonnenberger
2012-02-05 12:06     ` Ingo Schwarze [this message]
2012-02-05 14:35       ` Joerg Sonnenberger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120205120610.GA17423@iris.usta.de \
    --to=schwarze@usta.de \
    --cc=discuss@mdocml.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).