summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2011-12-04 14:11:56 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2011-12-04 14:11:56 +0000
commit941756471e3d04f78a6ab2965cfdd430f28cbe9f (patch)
tree86a73db6e2c49f1a4e5e6d0511e4d4c149df6594
parentf122ce50d433d3dd2d144855fe179efede812ddf (diff)
Fix parsing of file names given on the command line; i broke it
when adding support for formatted manual pages.
-rw-r--r--usr.bin/mandoc/mandocdb.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/usr.bin/mandoc/mandocdb.c b/usr.bin/mandoc/mandocdb.c
index 0205feac77c..63ecc402356 100644
--- a/usr.bin/mandoc/mandocdb.c
+++ b/usr.bin/mandoc/mandocdb.c
@@ -1,4 +1,4 @@
-/* $Id: mandocdb.c,v 1.17 2011/12/03 14:53:12 schwarze Exp $ */
+/* $Id: mandocdb.c,v 1.18 2011/12/04 14:11:55 schwarze Exp $ */
/*
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011 Ingo Schwarze <schwarze@openbsd.org>
@@ -1405,13 +1405,12 @@ ofile_argbuild(int argc, char *argv[], struct of **of)
*p = '\0';
continue;
}
- if (strncmp("man", p + 1, 3)) {
+ if (0 == strncmp("man", p + 1, 3))
src_form |= MANDOC_SRC;
- arch = p + 1;
- } else if (strncmp("cat", p + 1, 3)) {
+ else if (0 == strncmp("cat", p + 1, 3))
src_form |= MANDOC_FORM;
+ else
arch = p + 1;
- }
break;
}
if (NULL == title)