diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2004-12-30 17:17:12 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2004-12-30 17:17:12 +0000 |
commit | 9dab22db52ddfb8cb3d692af28a95e6410056989 (patch) | |
tree | ea9c464201590c9a63cfa16d348bdf8cd6a0b0c6 /xgpsspeed.c | |
parent | 208101c8a5b5946f24c9186cb2730b93475e33b3 (diff) | |
download | gpsd-9dab22db52ddfb8cb3d692af28a95e6410056989.tar.gz |
Add ? and v as options.
Diffstat (limited to 'xgpsspeed.c')
-rw-r--r-- | xgpsspeed.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/xgpsspeed.c b/xgpsspeed.c index ad702a35..c8f21b21 100644 --- a/xgpsspeed.c +++ b/xgpsspeed.c @@ -6,9 +6,6 @@ #include <unistd.h> #include <stdlib.h> -#if defined(HAVE_GETOPT_H) -#include <getopt.h> -#endif /* HAVE_GETOPT_H */ #include <errno.h> #include <stdio.h> #include <math.h> @@ -63,14 +60,13 @@ int main(int argc, char **argv) toplevel = XtVaAppInitialize(&app, "xpsspeed.ad", options, XtNumber(options), &argc, argv, fallback_resources, NULL); - while ((option = getopt(argc, argv, "hv")) != -1) { + while ((option = getopt(argc, argv, "?hv")) != -1) { switch (option) { case 'v': printf("xgpsspeed %s\n", VERSION); exit(0); - case 'h': case '?': - default: - fputs("usage: gps [-h] [-rv] [-nc] [-needlecolor] [server[:port]]\n", stderr); + case 'h': case '?': default: + fputs("usage: gps [-?] [-h] [-v] [-rv] [-nc] [-needlecolor] [server[:port]]\n", stderr); exit(1); } } |