From d5ba4ec690d23e78c49f85a785f68f1867a04ddc Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Fri, 20 Feb 2015 22:40:38 +0000 Subject: Completely delete all carriage return characters from the input. No change to messages about them (ignore them right before line feeds, report errors elsewhere). naddy@ found a manual in the wild containing lots of these (ysm(1)), and i can't imagine a situation where dropping them could be problematic. --- read.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'read.c') diff --git a/read.c b/read.c index 5f6775e3..69d81f5a 100644 --- a/read.c +++ b/read.c @@ -1,4 +1,4 @@ -/* $Id: read.c,v 1.126 2015/02/06 16:06:25 schwarze Exp $ */ +/* $Id: read.c,v 1.127 2015/02/20 22:40:38 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010-2015 Ingo Schwarze @@ -399,7 +399,8 @@ mparse_buf_r(struct mparse *curp, struct buf blk, size_t i, int start) MANDOCERR_CHAR_UNSUPP, curp, curp->line, pos, "0x%x", c); i++; - ln.buf[pos++] = '?'; + if (c != '\r') + ln.buf[pos++] = '?'; continue; } -- cgit v1.2.3-56-ge451