From 73dc4c66c0d62309c59ac410ef41aabcb49a9d3d Mon Sep 17 00:00:00 2001 From: erg Date: Wed, 8 Aug 2007 23:00:58 +0000 Subject: [PATCH] Fix option code so that -? is handled correctly. --- cmd/tools/acyclic.c | 2 +- cmd/tools/bcomps.c | 2 +- cmd/tools/ccomps.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/tools/acyclic.c b/cmd/tools/acyclic.c index 8dbd44d78..84d45b2ad 100644 --- a/cmd/tools/acyclic.c +++ b/cmd/tools/acyclic.c @@ -139,7 +139,7 @@ static void init(int argc, char *argv[]) cmd = argv[0]; aginit(); - while ((c = getopt(argc, argv, ":vno:")) != -1) + while ((c = getopt(argc, argv, ":vno:?")) != -1) switch (c) { case 'o': outFile = openFile(optarg, "w"); diff --git a/cmd/tools/bcomps.c b/cmd/tools/bcomps.c index 847b0c388..4d16d3d29 100644 --- a/cmd/tools/bcomps.c +++ b/cmd/tools/bcomps.c @@ -331,7 +331,7 @@ static void init(int argc, char *argv[]) int c; aginit(); - while ((c = getopt(argc, argv, ":o:xstv")) != -1) { + while ((c = getopt(argc, argv, ":o:xstv?")) != -1) { switch (c) { case 'o': outfile = optarg; diff --git a/cmd/tools/ccomps.c b/cmd/tools/ccomps.c index b4848d34e..4c8f42d59 100644 --- a/cmd/tools/ccomps.c +++ b/cmd/tools/ccomps.c @@ -124,7 +124,7 @@ static void init(int argc, char *argv[]) int c; aginit(); - while ((c = getopt(argc, argv, ":o:xCX:nsv")) != -1) { + while ((c = getopt(argc, argv, ":o:xCX:nsv?")) != -1) { switch (c) { case 'o': outfile = optarg; -- 2.40.0