diff options
author | 2015-02-20 22:40:05 +0000 | |
---|---|---|
committer | 2015-02-20 22:40:05 +0000 | |
commit | 46ec38c00af2d6f01ff400aa820785a5e0d8eba6 (patch) | |
tree | a63701c26ee53de60b945761a8573c5dd4f71d3b | |
parent | UpdateHostKeys fixes: (diff) | |
download | wireguard-openbsd-46ec38c00af2d6f01ff400aa820785a5e0d8eba6.tar.xz wireguard-openbsd-46ec38c00af2d6f01ff400aa820785a5e0d8eba6.zip |
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.
-rw-r--r-- | usr.bin/mandoc/read.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/mandoc/read.c b/usr.bin/mandoc/read.c index 5b148833a2a..bd20829759f 100644 --- a/usr.bin/mandoc/read.c +++ b/usr.bin/mandoc/read.c @@ -1,4 +1,4 @@ -/* $OpenBSD: read.c,v 1.101 2015/02/06 16:05:51 schwarze Exp $ */ +/* $OpenBSD: read.c,v 1.102 2015/02/20 22:40:05 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010-2015 Ingo Schwarze <schwarze@openbsd.org> @@ -394,7 +394,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; } |