diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2004-12-17 13:56:34 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2004-12-17 13:56:34 +0000 |
commit | 2f4c3783023e9130333498814dc5c3235e1ea2dd (patch) | |
tree | 508b29e129875bb758cf6f418e63b55208e6f414 | |
parent | e7b8f8265513d82983e9d6895d329b211e258e08 (diff) | |
download | gpsd-2f4c3783023e9130333498814dc5c3235e1ea2dd.tar.gz |
Added -v.
-rw-r--r-- | gps.c | 6 | ||||
-rw-r--r-- | gpsd.c | 5 | ||||
-rw-r--r-- | gpsd.spec.in | 5 | ||||
-rw-r--r-- | gpsd.xml | 21 | ||||
-rw-r--r-- | xgpsspeed.c | 5 |
5 files changed, 34 insertions, 8 deletions
@@ -28,6 +28,7 @@ #include <Xm/Protocols.h> #include <X11/Shell.h> +#include "config.h" #include "gps.h" extern void register_canvas(Widget w, GC gc); @@ -295,8 +296,11 @@ int main(int argc, char *argv[]) int option; char *colon, *server = NULL, *port = DEFAULT_GPSD_PORT; - while ((option = getopt(argc, argv, "h")) != -1) { + while ((option = getopt(argc, argv, "hv")) != -1) { switch (option) { + case 'v': + printf("gps %s\n", VERSION); + exit(0); case 'h': case '?': default: @@ -406,7 +406,7 @@ int main(int argc, char *argv[]) char gpstype = 'n'; debuglevel = 1; - while ((option = getopt(argc, argv, "D:S:d:hnp:s:" + while ((option = getopt(argc, argv, "D:S:d:hnp:s:v" #if TRIPMATE_ENABLE || defined(ZODIAC_ENABLE) "i:" #endif /* TRIPMATE_ENABLE || defined(ZODIAC_ENABLE) */ @@ -462,6 +462,9 @@ int main(int argc, char *argv[]) case 's': gpsd_speed = atoi(optarg); break; + case 'v': + printf("gpsd %s\n", VERSION); + exit(0); case 'h': case '?': default: usage(); diff --git a/gpsd.spec.in b/gpsd.spec.in index 3f4478fc..b6212b14 100644 --- a/gpsd.spec.in +++ b/gpsd.spec.in @@ -119,6 +119,11 @@ if [ -f /etc/udev/rules.d/ ] then rm /etc/udev/rules.d/80-gpsd.rules %{_libdir}/python*/site-packages/gpsd.py %changelog +* Fri Dec 17 2004 Eric S. Raymond <esr@snark.thyrsus.com> - @VERSION@-1 +- Use gmtime instead of localtime when guessing the day or year of a date; + this avoids jitter in the day after 19:00 GMT. Added -v option to dump + version and exit. + * Thu Dec 9 2004 Eric S. Raymond <esr@snark.thyrsus.com> - 2.4-1 - Minor bugs in gpsd.py fixed. M now returns 0 status if GPGSA not yet seen; this change also fixes a bug where gpsd claimed it was confused @@ -28,11 +28,13 @@ and speedometer</refpurpose> <arg choice='opt'>-n </arg> <arg choice='opt'>-h </arg> <arg choice='opt'>-D <replaceable>debuglevel</replaceable></arg> + <arg choice='opt'>-v </arg> </cmdsynopsis> <cmdsynopsis> <command>gps</command> <arg choice='opt'><replaceable>X-options</replaceable></arg> <arg choice='opt'>-h </arg> + <arg choice='opt'>-v </arg> <arg choice='opt'><replaceable>server</replaceable></arg> </cmdsynopsis> <cmdsynopsis> @@ -40,6 +42,7 @@ and speedometer</refpurpose> <arg choice='opt'>-rv</arg> <arg choice='opt'>-nc <replaceable>X-color</replaceable></arg> <arg choice='opt'>-h </arg> + <arg choice='opt'>-v </arg> <arg choice='opt'><replaceable>server</replaceable></arg> </cmdsynopsis> @@ -135,6 +138,12 @@ monitoring of the GPS data stream.</para> incoming sentence and actions to standard error.</para> </listitem> </varlistentry> +<varlistentry> +<term>-v</term> +<listitem> +<para>Dump version and exit.</para> +</listitem> +</varlistentry> </variablelist> <para><application>gpsd</application> should be able to query any GPS @@ -297,7 +306,8 @@ current GPS animation and (for GPSes that support the feature) the locations of accessible satellites.</para> <para><application>gps</application> accepts an -h option as for -<application>gpsd</application>. An optional argument may specify an +<application>gpsd</application>, or a -v option to dump the package +version and exit. An optional argument may specify an server to get data from; a colon-separated suffix is taken as a port number. The misfeature of previous versions that allowed it to direct-connect to the serial device has been removed.</para> @@ -307,10 +317,11 @@ direct-connect to the serial device has been removed.</para> <para><application>xgpsspeed</application> is a speedometer that uses position information from the GPS. It accepts an -h option and -optional argument as for <application>gps</application>. -Additionally, it accepts -rv (reverse video) and -nc (needle color) -options. The misfeature of previous versions that allowed it to -direct-connect to the serial device has been removed.</para> +optional argument as for <application>gps</application>, or a -v +option to dump the package version and exit. Additionally, it accepts +-rv (reverse video) and -nc (needle color) options. The misfeature of +previous versions that allowed it to direct-connect to the serial +device has been removed.</para> </refsect2> </refsect1> diff --git a/xgpsspeed.c b/xgpsspeed.c index 76a8d8da..a5298e67 100644 --- a/xgpsspeed.c +++ b/xgpsspeed.c @@ -60,8 +60,11 @@ int main(int argc, char **argv) toplevel = XtVaAppInitialize(&app, "xpsspeed.ad", options, XtNumber(options), &argc, argv, fallback_resources, NULL); - while ((option = getopt(argc, argv, "h")) != -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); |