aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/apropos.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-11-09 10:53:48 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-11-09 10:53:48 +0000
commit3089a1b55afe00d988cd16b8de6fe2cd08ff48f5 (patch)
tree8f5f5cfb76fd4d7b780e10271b52866b45ee6970 /apropos.c
parentff0dac07cf742459dbb509973cdfb2ca6af903f9 (diff)
downloadmandoc-3089a1b55afe00d988cd16b8de6fe2cd08ff48f5.tar.gz
mandoc-3089a1b55afe00d988cd16b8de6fe2cd08ff48f5.tar.zst
mandoc-3089a1b55afe00d988cd16b8de6fe2cd08ff48f5.zip
Change getopt() to be more like schwarze@'s suggestions.
Diffstat (limited to 'apropos.c')
-rw-r--r--apropos.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/apropos.c b/apropos.c
index 69f1088b..4e438e99 100644
--- a/apropos.c
+++ b/apropos.c
@@ -1,4 +1,4 @@
-/* $Id: apropos.c,v 1.8 2011/11/09 01:24:23 kristaps Exp $ */
+/* $Id: apropos.c,v 1.9 2011/11/09 10:53:48 kristaps Exp $ */
/*
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -72,12 +72,12 @@ main(int argc, char *argv[])
else
++progname;
- while (-1 != (ch = getopt(argc, argv, "a:c:I:t:")))
+ while (-1 != (ch = getopt(argc, argv, "S:s:It:")))
switch (ch) {
- case ('a'):
+ case ('S'):
opts.arch = optarg;
break;
- case ('c'):
+ case ('s'):
opts.cat = optarg;
break;
case ('I'):
@@ -159,8 +159,8 @@ usage(void)
fprintf(stderr, "usage: %s "
"[-I] "
- "[-a arch] "
- "[-c cat] "
+ "[-S arch] "
+ "[-s section] "
"[-t type[,...]] "
"key\n", progname);
}