summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-09-15 04:42:46 (GMT)
committerWerner Almesberger <werner@almesberger.net>2016-09-15 04:42:46 (GMT)
commit3354a349dfc3300514da00be1eb94475007e0808 (patch)
treead6a0a133c1199457e770283b4ebdefdf5050c80 /main
parent34566e8471bce5f74f5951368ef6223cd00577b7 (diff)
downloadeeshow-3354a349dfc3300514da00be1eb94475007e0808.zip
eeshow-3354a349dfc3300514da00be1eb94475007e0808.tar.gz
eeshow-3354a349dfc3300514da00be1eb94475007e0808.tar.bz2
main/: show usage on -h, without complaints (suggested by Roman Pavelka)
Diffstat (limited to 'main')
-rw-r--r--main/eediff.c3
-rw-r--r--main/eeplot.c3
-rw-r--r--main/eeshow.c3
-rw-r--r--main/eetest.c3
4 files changed, 8 insertions, 4 deletions
diff --git a/main/eediff.c b/main/eediff.c
index 5f14dff..8bbd547 100644
--- a/main/eediff.c
+++ b/main/eediff.c
@@ -64,7 +64,7 @@ void usage(const char *name)
}
-#define OPTIONS "vL:OPV"
+#define OPTIONS "hvL:OPV"
int main(int argc, char **argv)
@@ -96,6 +96,7 @@ int main(int argc, char **argv)
case 'V':
fprintf(stderr, "%s %sZ\n", version, build_date);
return 1;
+ case 'h':
case '?':
usage(*argv);
default:
diff --git a/main/eeplot.c b/main/eeplot.c
index 86bc4e7..c5c19d1 100644
--- a/main/eeplot.c
+++ b/main/eeplot.c
@@ -132,7 +132,7 @@ void usage(const char *name)
}
-#define OPTIONS "1evL:OPV"
+#define OPTIONS "1ehvL:OPV"
int main(int argc, char **argv)
@@ -180,6 +180,7 @@ int main(int argc, char **argv)
case 'V':
fprintf(stderr, "%s %sZ\n", version, build_date);
return 1;
+ case 'h':
case '?':
usage(*argv);
default:
diff --git a/main/eeshow.c b/main/eeshow.c
index 00b0f62..5af1f43 100644
--- a/main/eeshow.c
+++ b/main/eeshow.c
@@ -71,7 +71,7 @@ int main(int argc, char **argv)
gtk_init(&argc, &argv);
setlocale(LC_ALL, "C"); /* restore sanity */
- while ((c = getopt(argc, argv, "1vE:LN:OPV")) != EOF)
+ while ((c = getopt(argc, argv, "1hvE:LN:OPV")) != EOF)
switch (c) {
case '1':
one_sheet = 1;
@@ -99,6 +99,7 @@ int main(int argc, char **argv)
case 'V':
fprintf(stderr, "%s %sZ\n", version, build_date);
return 1;
+ case 'h':
default:
usage(*argv);
}
diff --git a/main/eetest.c b/main/eetest.c
index 2eba134..db8b333 100644
--- a/main/eetest.c
+++ b/main/eetest.c
@@ -70,7 +70,7 @@ int main(int argc, char **argv)
run_under_gdb(argc, argv);
- while ((c = getopt(argc, argv, "vC:F:H:SV")) != EOF)
+ while ((c = getopt(argc, argv, "hvC:F:H:SV")) != EOF)
switch (c) {
case 'v':
verbose++;
@@ -90,6 +90,7 @@ int main(int argc, char **argv)
case 'V':
fprintf(stderr, "%s %sZ\n", version, build_date);
return 1;
+ case 'h':
default:
usage(*argv);
}