diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2011-12-04 14:23:29 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2011-12-04 14:23:29 +0000 |
commit | 472358268a3a5ae7eff4dbde1e48f925e8c7d82b (patch) | |
tree | 6bc75e67b797b88b9f141ae0ff5a9e5cf1ddd335 | |
parent | 7c0b7e474e29ae0b4e927c6d06ad2881e2f95eec (diff) | |
download | mandoc-472358268a3a5ae7eff4dbde1e48f925e8c7d82b.tar.gz mandoc-472358268a3a5ae7eff4dbde1e48f925e8c7d82b.tar.zst mandoc-472358268a3a5ae7eff4dbde1e48f925e8c7d82b.zip |
Fix parsing of file names given on the command line; i broke it
when adding support for formatted manual pages.
-rw-r--r-- | mandocdb.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -1,4 +1,4 @@ -/* $Id: mandocdb.c,v 1.23 2011/12/03 18:47:09 kristaps Exp $ */ +/* $Id: mandocdb.c,v 1.24 2011/12/04 14:23:29 schwarze Exp $ */ /* * Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2011 Ingo Schwarze <schwarze@openbsd.org> @@ -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) |