diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2010-06-08 00:11:48 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2010-06-08 00:11:48 +0000 |
commit | 6be10e9272f14dcb8b06b99ef3f93cd512c93c06 (patch) | |
tree | 33a1dcaf8ce15e10b11392e60edffa466ca9d94c /usr.bin/mandoc/main.c | |
parent | 70facb8307224a9045933d4777f2fcfc34197391 (diff) |
Merge more bits that will be going into 1.10.1:
Clean up vertical spacing in the SYNOPSIS, making the code much more
systematic; this doesn't solve all SYNOPSIS problems yet, in particular
not those related to keeps, indentation and the low-level .nr roff
instruction, but it's a nice step forward and i couldn't find relevant
regressions. (from kristaps)
Besides,
* make the output width configurable (default: -Owidth=80) (kristaps)
* use mmap with MAP_SHARED (from Joerg Sonnenberger)
Diffstat (limited to 'usr.bin/mandoc/main.c')
-rw-r--r-- | usr.bin/mandoc/main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/mandoc/main.c b/usr.bin/mandoc/main.c index 19ffe247f4a..37c0df0fec2 100644 --- a/usr.bin/mandoc/main.c +++ b/usr.bin/mandoc/main.c @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.34 2010/06/06 20:30:08 schwarze Exp $ */ +/* $Id: main.c,v 1.35 2010/06/08 00:11:47 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -384,7 +384,7 @@ read_whole_file(struct curparse *curp, struct buf *fb, int *with_mmap) *with_mmap = 1; fb->sz = (size_t)st.st_size; fb->buf = mmap(NULL, fb->sz, PROT_READ, - MAP_FILE, curp->fd, 0); + MAP_FILE|MAP_SHARED, curp->fd, 0); if (fb->buf != MAP_FAILED) return(1); } @@ -590,7 +590,7 @@ fdesc(struct curparse *curp) case (OUTT_LINT): break; default: - curp->outdata = ascii_alloc(80); + curp->outdata = ascii_alloc(curp->outopts); curp->outman = terminal_man; curp->outmdoc = terminal_mdoc; curp->outfree = terminal_free; |