summaryrefslogtreecommitdiffstats
path: root/mandocdb.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2011-12-04 14:23:29 +0000
committerIngo Schwarze <schwarze@openbsd.org>2011-12-04 14:23:29 +0000
commitd894c471306c4cb24738dcc1d17fcaaccaec3df9 (patch)
treebe8ba6a5b44262e83db8d0bc87a7973f5d9db085 /mandocdb.c
parent104a65153587e466515ddab8bd99fccb419f651c (diff)
downloadmandoc-d894c471306c4cb24738dcc1d17fcaaccaec3df9.tar.gz
Fix parsing of file names given on the command line; i broke it
when adding support for formatted manual pages.
Diffstat (limited to 'mandocdb.c')
-rw-r--r--mandocdb.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/mandocdb.c b/mandocdb.c
index 2c03da2a..a1450d3c 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -1417,13 +1417,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)