diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2015-02-20 22:40:38 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2015-02-20 22:40:38 +0000 |
commit | b6009097ae3ad6c24b2fbc8e50140a6bbb5986cd (patch) | |
tree | c24a08f6e09cbe73d2c03dab1473fe62fc629d4d /read.c | |
parent | d7e3b62507641810b48e783f4ff9ff51ab2f5215 (diff) | |
download | mandoc-b6009097ae3ad6c24b2fbc8e50140a6bbb5986cd.tar.gz |
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.
Diffstat (limited to 'read.c')
-rw-r--r-- | read.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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; } |