aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/main.c b/main.c
index e0380e94..9b1f982e 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.187 2014/08/23 22:26:06 schwarze Exp $ */
+/* $Id: main.c,v 1.188 2014/08/30 18:08:10 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2011, 2012, 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -154,7 +154,7 @@ main(int argc, char *argv[])
show_usage = 0;
outmode = OUTMODE_DEF;
- while (-1 != (c = getopt(argc, argv, "aC:cfI:ikM:m:O:S:s:T:VW:w"))) {
+ while (-1 != (c = getopt(argc, argv, "aC:cfI:iklM:m:O:S:s:T:VW:w"))) {
switch (c) {
case 'a':
outmode = OUTMODE_ALL;
@@ -189,6 +189,10 @@ main(int argc, char *argv[])
case 'k':
search.argmode = ARG_EXPR;
break;
+ case 'l':
+ search.argmode = ARG_FILE;
+ outmode = OUTMODE_ALL;
+ break;
case 'M':
defpaths = optarg;
break;
@@ -408,22 +412,23 @@ usage(enum argmode argmode)
switch (argmode) {
case ARG_FILE:
- fputs("usage: mandoc [-V] [-Ios=name] [-mformat]"
- " [-Ooption] [-Toutput] [-Wlevel]\n"
+ fputs("usage: mandoc [-acfklV] [-Ios=name] "
+ "[-mformat] [-Ooption] [-Toutput] [-Wlevel]\n"
"\t [file ...]\n", stderr);
break;
case ARG_NAME:
- fputs("usage: man [-acfhkVw] [-C file] "
+ fputs("usage: man [-acfhklVw] [-C file] "
"[-M path] [-m path] [-S arch] [-s section]\n"
"\t [section] name ...\n", stderr);
break;
case ARG_WORD:
- fputs("usage: whatis [-V] [-C file] [-M path] [-m path] "
- "[-S arch] [-s section] name ...\n", stderr);
+ fputs("usage: whatis [-acfklVw] [-C file] "
+ "[-M path] [-m path] [-O outkey] [-S arch]\n"
+ "\t [-s section] name ...\n", stderr);
break;
case ARG_EXPR:
- fputs("usage: apropos [-V] [-C file] [-M path] [-m path] "
- "[-O outkey] [-S arch]\n"
+ fputs("usage: apropos [-acfklVw] [-C file] "
+ "[-M path] [-m path] [-O outkey] [-S arch]\n"
"\t [-s section] expression ...\n", stderr);
break;
}