aboutsummaryrefslogtreecommitdiffstatshomepage
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
commit3e70fef168168465342e0c00dce021b0952eb50b (patch)
tree19b8d4b4f478a0d3b90537bee030fbe822131b63 /main.c
parentde239793dd69c5f9b3cf6f0ffce3c9c90af80668 (diff)
downloadmandoc-3e70fef168168465342e0c00dce021b0952eb50b.tar.gz
mandoc-3e70fef168168465342e0c00dce021b0952eb50b.tar.zst
mandoc-3e70fef168168465342e0c00dce021b0952eb50b.zip
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.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/main.c b/main.c
index 795c6493..740bd86e 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.60 2010/03/22 20:43:00 kristaps Exp $ */
+/* $Id: main.c,v 1.61 2010/04/12 19:27:22 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -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;
}