summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/mandoc/main.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/usr.bin/mandoc/main.c b/usr.bin/mandoc/main.c
index 63ac156010b..bcf541409d1 100644
--- a/usr.bin/mandoc/main.c
+++ b/usr.bin/mandoc/main.c
@@ -1,7 +1,7 @@
-/* $OpenBSD: main.c,v 1.244 2020/01/20 10:29:31 schwarze Exp $ */
+/* $OpenBSD: main.c,v 1.245 2020/02/06 19:41:34 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
- * Copyright (c) 2010-2012, 2014-2019 Ingo Schwarze <schwarze@openbsd.org>
+ * Copyright (c) 2010-2012, 2014-2020 Ingo Schwarze <schwarze@openbsd.org>
* Copyright (c) 2010 Joerg Sonnenberger <joerg@netbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
@@ -309,7 +309,8 @@ main(int argc, char *argv[])
/* Postprocess options. */
- if (outmode == OUTMODE_DEF) {
+ switch (outmode) {
+ case OUTMODE_DEF:
switch (search.argmode) {
case ARG_FILE:
outmode = OUTMODE_ALL;
@@ -322,6 +323,16 @@ main(int argc, char *argv[])
outmode = OUTMODE_LST;
break;
}
+ break;
+ case OUTMODE_FLN:
+ if (search.argmode == ARG_FILE)
+ outmode = OUTMODE_ALL;
+ break;
+ case OUTMODE_ALL:
+ break;
+ case OUTMODE_LST:
+ case OUTMODE_ONE:
+ abort();
}
if (oarg != NULL) {