From 3089a1b55afe00d988cd16b8de6fe2cd08ff48f5 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Wed, 9 Nov 2011 10:53:48 +0000 Subject: Change getopt() to be more like schwarze@'s suggestions. --- apropos.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'apropos.c') 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 * @@ -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); } -- cgit v1.2.3-56-ge451