summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2004-12-31 23:01:05 +0000
committerEric S. Raymond <esr@thyrsus.com>2004-12-31 23:01:05 +0000
commitbb5e772ee92e48d3c17ffa0acab1a018502e4c50 (patch)
tree6cc71ed0f54f75ba7a39929488d7a3b441fa4adf
parentcfaaf52d00d8be6dabab4a0d48a6d4792c206c17 (diff)
downloadgpsd-bb5e772ee92e48d3c17ffa0acab1a018502e4c50.tar.gz
Header cleanup.
-rw-r--r--libgpsd_core.c6
-rw-r--r--xgpsspeed.c15
2 files changed, 7 insertions, 14 deletions
diff --git a/libgpsd_core.c b/libgpsd_core.c
index 228e9460..aa085089 100644
--- a/libgpsd_core.c
+++ b/libgpsd_core.c
@@ -1,7 +1,4 @@
-/*
- * This provides the interface to the library that supports direct access to
- * GPSes on serial or USB devices.
- */
+/* libgpsd_core.c -- irect access to GPSes on serial or USB devices. */
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
@@ -9,6 +6,7 @@
#include <netdb.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
+#include "config.h"
#ifdef HAVE_SYS_FILIO_H
#include <sys/filio.h> /* for FIONREAD on BSD systems */
#endif
diff --git a/xgpsspeed.c b/xgpsspeed.c
index f5f367ef..60a142ee 100644
--- a/xgpsspeed.c
+++ b/xgpsspeed.c
@@ -1,11 +1,10 @@
/* GPS speedometer as a wrapper around an Athena widget Tachometer
* - Derrick J Brashear <shadow@dementia.org>
- * Tachometer widget from Kerberometer (xklife)
*/
-#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
+#include <getopt.h>
#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/Shell.h>
@@ -23,7 +22,6 @@ static XrmOptionDescRec options[] = {
{"-nc", "*needleColor", XrmoptionSepArg, NULL},
{"-needlecolor","*needleColor", XrmoptionSepArg, NULL},
};
-
String fallback_resources[] = {NULL};
static struct gps_data_t *gpsdata;
@@ -31,12 +29,11 @@ static Widget tacho;
static void update_display(char *buf UNUSED)
{
- TachometerSetValue(tacho, rint(gpsdata->speed * KNOTS_TO_MPH));
+ TachometerSetValue(tacho, rint(gpsdata->speed * KNOTS_TO_MPH));
}
static void handle_input(XtPointer client_data UNUSED,
- int *source UNUSED,
- XtInputId * id UNUSED)
+ int *source UNUSED, XtInputId * id UNUSED)
{
gps_poll(gpsdata);
}
@@ -46,8 +43,7 @@ int main(int argc, char **argv)
Arg args[10];
XtAppContext app;
int option;
- char *colon, *server = NULL;
- char *port = DEFAULT_GPSD_PORT;
+ char *colon, *server = NULL, *port = DEFAULT_GPSD_PORT;
Widget toplevel, base;
toplevel = XtVaAppInitialize(&app, "xpsspeed.ad",
@@ -91,8 +87,7 @@ int main(int argc, char **argv)
XtCreateManagedWidget("name", labelWidgetClass, base, args, 1);
/**** Tachometer widget ****/
- tacho = XtCreateManagedWidget("meter",
- tachometerWidgetClass, base, NULL, 0);
+ tacho = XtCreateManagedWidget("meter", tachometerWidgetClass,base,NULL,0);
XtRealizeWidget(toplevel);
if (!(gpsdata = gps_open(server, DEFAULT_GPSD_PORT))) {