summaryrefslogtreecommitdiff
path: root/display.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2004-10-04 18:58:59 +0000
committerEric S. Raymond <esr@thyrsus.com>2004-10-04 18:58:59 +0000
commit365e6920239bff9a4bc1eab1b18702fe3f7a8ef2 (patch)
tree5811884e6378c7a0d83ce43ad05cbf9000738dc2 /display.c
parenta11ee6bbbf2cad8948c7cb388fe09fdf1fa96046 (diff)
downloadgpsd-365e6920239bff9a4bc1eab1b18702fe3f7a8ef2.tar.gz
More code-polishing.
Diffstat (limited to 'display.c')
-rw-r--r--display.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/display.c b/display.c
index da174b1a..742ea50f 100644
--- a/display.c
+++ b/display.c
@@ -1,4 +1,3 @@
-#include "config.h"
#include <Xm/Xm.h>
#include <math.h>
@@ -49,8 +48,6 @@ void register_canvas(Widget w, GC gc)
diameter = min(width, height) - RM;
}
-/* #define PCORRECT */
-
static void pol2cart(double azimuth, double elevation, double *xout, double *yout)
{
double sinelev;
@@ -74,21 +71,17 @@ static void draw_arc(int x, int y, int diam)
XDrawArc(XtDisplay(draww), pixmap, drawGC,
x - diam / 2, y - diam / 2, /* x,y */
diam, diam, /* width, height */
- 0, 360 * 64 /* angle1, angle2 */
- );
+ 0, 360 * 64); /* angle1, angle2 */
}
static int get_status(struct gps_data_t *gpsdata, int satellite)
{
- int i, s;
+ int i;
for (i = 0; i < MAXCHANNELS; i++)
if (satellite == gpsdata->PRN[i]) {
- s = gpsdata->ss[i];
-
- if (s<20) return 1;
- if (s<40) return 2;
-
+ if (gpsdata->ss[i]<20) return 1;
+ if (gpsdata->ss[i]<40) return 2;
return 7;
}
return 0;