summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-04-12 19:27:22 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-04-12 19:27:22 +0000
commit7b80ac431dae320548b72553a9c99f7a327dc76a (patch)
treef13c24800a20600c06940ea8342eadbda1b4454b /main.c
parent36b1bcee466390f66c8760f6c0d805a97cda8a16 (diff)
downloadmandoc-7b80ac431dae320548b72553a9c99f7a327dc76a.tar.gz
Merge patch by Jason McIntyre cleaning on mandoc.1: `Ar' -> `Cm' and other readability fixes.
Merge modified patch by Joerg Sonnenberger that rewinds to whitespace when encountering trailing line-comments.
Diffstat (limited to 'main.c')
-rw-r--r--main.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/main.c b/main.c
index 98957c56..f6ae57e4 100644
--- a/main.c
+++ b/main.c
@@ -228,9 +228,9 @@ static void
usage(void)
{
- (void)fprintf(stderr, "usage: %s [-V] [-foption...] "
+ (void)fprintf(stderr, "usage: %s [-V] [-foption] "
"[-mformat] [-Ooption] [-Toutput] "
- "[-Werr...]\n", progname);
+ "[-Werr] [file...]\n", progname);
exit(EXIT_FAILURE);
}
@@ -380,6 +380,12 @@ fdesc(struct buf *blk, struct buf *ln, struct curparse *curp)
comment = 1;
pos -= 2;
+ for (; pos > 0; --pos) {
+ if (ln->buf[pos] != ' ')
+ break;
+ if (ln->buf[pos - 1] == '\\')
+ break;
+ }
continue;
}