From 3e70fef168168465342e0c00dce021b0952eb50b Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Mon, 12 Apr 2010 19:27:22 +0000 Subject: 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. --- main.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'main.c') 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 * @@ -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; } -- cgit v1.2.3