summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2012-09-07 06:24:26 -0400
committerEric S. Raymond <esr@thyrsus.com>2012-09-07 06:24:26 -0400
commit620f7445dcacfbb740c55a9e4b891593c3f94910 (patch)
treee092711dae9ac1af540a2e5469493f13303248c1
parent76b2aaba9575d60230387555822b18ceeb07353a (diff)
downloadgpsd-620f7445dcacfbb740c55a9e4b891593c3f94910.tar.gz
Nuke trailing whitespace in C source.
-rw-r--r--ais_json.c26
-rw-r--r--bits.c40
-rw-r--r--bits.h6
-rw-r--r--bsd_base64.c4
-rw-r--r--bsd_base64.h2
-rw-r--r--cgps.c14
-rw-r--r--crc24q.c2
-rw-r--r--driver_ais.c6
-rw-r--r--driver_evermore.c8
-rw-r--r--driver_garmin.c10
-rw-r--r--driver_italk.c4
-rw-r--r--driver_navcom.c2
-rw-r--r--driver_nmea0183.c32
-rw-r--r--driver_nmea2000.c12
-rw-r--r--driver_oncore.c14
-rw-r--r--driver_proto.c26
-rw-r--r--driver_rtcm3.c8
-rw-r--r--driver_sirf.c14
-rw-r--r--driver_tsip.c18
-rw-r--r--driver_ubx.c16
-rw-r--r--driver_zodiac.c12
-rw-r--r--drivers.c34
-rw-r--r--geoid.c2
-rw-r--r--gps.h114
-rw-r--r--gps_json.h18
-rw-r--r--gpsctl.c60
-rw-r--r--gpsd.c22
-rw-r--r--gpsd_json.c48
-rw-r--r--gpsdclient.c14
-rw-r--r--gpsdclient.h4
-rw-r--r--gpsdctl.c2
-rw-r--r--gpsdecode.c22
-rw-r--r--gpsmon.c8
-rw-r--r--gpspacket.c8
-rw-r--r--gpspipe.c8
-rw-r--r--gpsutils.c4
-rw-r--r--gpxlogger.c4
-rw-r--r--isgps.c24
-rw-r--r--json.c6
-rw-r--r--json.h16
-rw-r--r--lcdgps.c2
-rw-r--r--libgps.h12
-rw-r--r--libgps_core.c12
-rw-r--r--libgps_dbus.c2
-rw-r--r--libgps_json.c2
-rw-r--r--libgps_shm.c18
-rw-r--r--libgps_sock.c4
-rw-r--r--libgpsd_core.c22
-rw-r--r--libgpsmm.cpp6
-rw-r--r--libgpsmm.h2
-rw-r--r--monitor_proto.c14
-rw-r--r--monitor_tnt.c10
-rw-r--r--net_ntrip.c20
-rw-r--r--netlib.c6
-rw-r--r--ntpshm.c62
-rw-r--r--packet.c2
-rw-r--r--packet_states.h8
-rw-r--r--pseudonmea.c8
-rw-r--r--rtcm2_json.c8
-rw-r--r--serial.c18
-rw-r--r--shared_json.c6
-rw-r--r--shmexport.c10
-rw-r--r--srecord.c4
-rw-r--r--strl.c2
-rw-r--r--subframe.c2
-rw-r--r--test_geoid.c2
-rw-r--r--test_gpsmm.cpp4
-rw-r--r--test_packet.c84
-rw-r--r--timebase.c20
69 files changed, 533 insertions, 533 deletions
diff --git a/ais_json.c b/ais_json.c
index 55bf795b..22c0ecdf 100644
--- a/ais_json.c
+++ b/ais_json.c
@@ -22,7 +22,7 @@ representations to libgps structures.
/* FIXME: kluges because we don't want to include gpsd.h here */
extern int gpsd_hexpack(/*@in@*/const char *, /*@out@*/char *, size_t);
-int json_ais_read(const char *, char *, size_t, struct ais_t *,
+int json_ais_read(const char *, char *, size_t, struct ais_t *,
/*@null@*/const char **);
/*@ -mustdefine @*/
@@ -104,7 +104,7 @@ int json_ais_read(const char *buf,
&ais->type4.month,
&ais->type4.day,
&ais->type4.hour,
- &ais->type4.minute,
+ &ais->type4.minute,
&ais->type4.second);
}
} else if (strstr(buf, "\"type\":5,") != NULL) {
@@ -118,7 +118,7 @@ int json_ais_read(const char *buf,
(void)sscanf(eta, "%02u-%02uT%02u:%02uZ",
&ais->type5.month,
&ais->type5.day,
- &ais->type5.hour,
+ &ais->type5.hour,
&ais->type5.minute);
}
} else if (strstr(buf, "\"type\":6,") != NULL) {
@@ -135,7 +135,7 @@ int json_ais_read(const char *buf,
(void)sscanf(departure, "%02u-%02uT%02u:%02uZ",
&ais->type6.dac1fid12.lmonth,
&ais->type6.dac1fid12.lday,
- &ais->type6.dac1fid12.lhour,
+ &ais->type6.dac1fid12.lhour,
&ais->type6.dac1fid12.lminute);
ais->type6.dac1fid12.nmonth = AIS_MONTH_NOT_AVAILABLE;
ais->type6.dac1fid12.nday = AIS_DAY_NOT_AVAILABLE;
@@ -145,7 +145,7 @@ int json_ais_read(const char *buf,
(void)sscanf(eta, "%02u-%02uT%02u:%02uZ",
&ais->type6.dac1fid12.nmonth,
&ais->type6.dac1fid12.nday,
- &ais->type6.dac1fid12.nhour,
+ &ais->type6.dac1fid12.nhour,
&ais->type6.dac1fid12.nminute);
}
imo = true;
@@ -168,7 +168,7 @@ int json_ais_read(const char *buf,
(void)sscanf(arrival, "%02u-%02uT%02u:%02uZ",
&ais->type6.dac1fid18.month,
&ais->type6.dac1fid18.day,
- &ais->type6.dac1fid18.hour,
+ &ais->type6.dac1fid18.hour,
&ais->type6.dac1fid18.minute);
}
imo = true;
@@ -184,7 +184,7 @@ int json_ais_read(const char *buf,
(void)sscanf(arrival, "%02u-%02uT%02u:%02uZ",
&ais->type6.dac1fid20.month,
&ais->type6.dac1fid20.day,
- &ais->type6.dac1fid20.hour,
+ &ais->type6.dac1fid20.hour,
&ais->type6.dac1fid20.minute);
}
imo = true;
@@ -204,7 +204,7 @@ int json_ais_read(const char *buf,
(void)sscanf(start, "%02u-%02uT%02u:%02uZ",
&ais->type6.dac1fid28.month,
&ais->type6.dac1fid28.day,
- &ais->type6.dac1fid28.hour,
+ &ais->type6.dac1fid28.hour,
&ais->type6.dac1fid28.minute);
}
imo = true;
@@ -245,7 +245,7 @@ int json_ais_read(const char *buf,
// cppcheck-suppress uninitvar
(void)sscanf(timestamp, "%02uT%02u:%02uZ",
&ais->type8.dac1fid11.day,
- &ais->type8.dac1fid11.hour,
+ &ais->type8.dac1fid11.hour,
&ais->type8.dac1fid11.minute);
}
imo = true;
@@ -261,7 +261,7 @@ int json_ais_read(const char *buf,
(void)sscanf(departure, "%02u-%02uT%02u:%02uZ",
&ais->type8.dac1fid13.fmonth,
&ais->type8.dac1fid13.fday,
- &ais->type8.dac1fid13.fhour,
+ &ais->type8.dac1fid13.fhour,
&ais->type8.dac1fid13.fminute);
ais->type8.dac1fid13.tmonth = AIS_MONTH_NOT_AVAILABLE;
ais->type8.dac1fid13.tday = AIS_DAY_NOT_AVAILABLE;
@@ -271,7 +271,7 @@ int json_ais_read(const char *buf,
(void)sscanf(eta, "%02u-%02uT%02u:%02uZ",
&ais->type8.dac1fid13.tmonth,
&ais->type8.dac1fid13.tday,
- &ais->type8.dac1fid13.thour,
+ &ais->type8.dac1fid13.thour,
&ais->type8.dac1fid13.tminute);
}
imo = true;
@@ -299,7 +299,7 @@ int json_ais_read(const char *buf,
(void)sscanf(start, "%02u-%02uT%02u:%02uZ",
&ais->type8.dac1fid27.month,
&ais->type8.dac1fid27.day,
- &ais->type8.dac1fid27.hour,
+ &ais->type8.dac1fid27.hour,
&ais->type8.dac1fid27.minute);
}
imo = true;
@@ -317,7 +317,7 @@ int json_ais_read(const char *buf,
// cppcheck-suppress uninitvar
(void)sscanf(timestamp, "%02uT%02u:%02uZ",
&ais->type8.dac1fid31.day,
- &ais->type8.dac1fid31.hour,
+ &ais->type8.dac1fid31.hour,
&ais->type8.dac1fid31.minute);
}
imo = true;
diff --git a/bits.c b/bits.c
index e6938501..31b332a7 100644
--- a/bits.c
+++ b/bits.c
@@ -90,7 +90,7 @@ float getlef32(const char *buf, int off)
i_f.i = getles32(buf, off);
return i_f.f;
}
-
+
double getled64(const char *buf, int off)
{
union long_double l_d;
@@ -121,7 +121,7 @@ void putbef32(char *buf, int off, float val)
union int_float i_f;
i_f.f = val;
- /* this would be a putbe32 call if not for a signedness issue */
+ /* this would be a putbe32 call if not for a signedness issue */
buf[off] = (char)(((i_f.i) >> 16) >> 8);
}
/*@+shiftimplementation@*/
@@ -132,33 +132,33 @@ u_int16_t swap_u16(u_int16_t i)
/* byte-swap a 16-bit unsigned int */
{
u_int8_t c1, c2;
-
+
c1 = i & 255;
c2 = (i >> 8) & 255;
-
+
return (c1 << 8) + c2;
}
// cppcheck-suppress unusedFunction
-u_int32_t swap_u32(u_int32_t i)
+u_int32_t swap_u32(u_int32_t i)
/* byte-swap a 32-bit unsigned int */
{
- u_int8_t c1, c2, c3, c4;
-
+ u_int8_t c1, c2, c3, c4;
+
c1 = i & 255;
c2 = (i >> 8) & 255;
c3 = (i >> 16) & 255;
c4 = (i >> 24) & 255;
-
+
return ((u_int32_t)c1 << 24) + ((u_int32_t)c2 << 16) + ((u_int32_t)c3 << 8) + c4;
}
-
+
// cppcheck-suppress unusedFunction
-u_int64_t swap_u64(u_int64_t i)
+u_int64_t swap_u64(u_int64_t i)
/* byte-swap a 64-bit unsigned int */
{
- u_int8_t c1, c2, c3, c4, c5, c6, c7, c8;
-
+ u_int8_t c1, c2, c3, c4, c5, c6, c7, c8;
+
c1 = i & 255;
c2 = (i >> 8) & 255;
c3 = (i >> 16) & 255;
@@ -167,14 +167,14 @@ u_int64_t swap_u64(u_int64_t i)
c6 = (i >> 40) & 255;
c7 = (i >> 48) & 255;
c8 = (i >> 56) & 255;
-
- return ((u_int64_t)c1 << 56) +
- ((u_int64_t)c2 << 48) +
- ((u_int64_t)c3 << 40) +
- ((u_int64_t)c4 << 32) +
- ((u_int64_t)c5 << 24) +
- ((u_int64_t)c6 << 16) +
- ((u_int64_t)c7 << 8) +
+
+ return ((u_int64_t)c1 << 56) +
+ ((u_int64_t)c2 << 48) +
+ ((u_int64_t)c3 << 40) +
+ ((u_int64_t)c4 << 32) +
+ ((u_int64_t)c5 << 24) +
+ ((u_int64_t)c6 << 16) +
+ ((u_int64_t)c7 << 8) +
c8;
}
#endif /* __UNUSED__ */
diff --git a/bits.h b/bits.h
index 05eea3f9..ac493e7f 100644
--- a/bits.h
+++ b/bits.h
@@ -4,7 +4,7 @@
* These macros extract bytes, words, longwords, floats, doubles, or
* bitfields of arbitrary length and size from a message that contains
* these items in either MSB-first or LSB-first byte order.
- *
+ *
* We enforce data sizes of integral types in the casts on these.
* Both 32- and 64-bit systems with gcc are OK with this set.
*
@@ -28,7 +28,7 @@
#define getleu32(buf, off) ((uint32_t)(((uint16_t)getleu16((buf),(off)+2) << 16) | (uint16_t)getleu16((buf), (off))))
#define getles64(buf, off) ((int64_t)(((uint64_t)getleu32(buf, (off)+4) << 32) | getleu32(buf, (off))))
#define getleu64(buf, off) ((uint64_t)(((uint64_t)getleu32(buf, (off)+4) << 32) | getleu32(buf, (off))))
-extern float getlef32(const char *, int);
+extern float getlef32(const char *, int);
extern double getled64(const char *, int);
#define putle16(buf, off, w) do {putbyte(buf, (off)+1, (uint)(w) >> 8); putbyte(buf, (off), (w));} while (0)
@@ -41,7 +41,7 @@ extern double getled64(const char *, int);
#define getbeu32(buf, off) ((uint32_t)(((uint16_t)getbeu16(buf, (off)) << 16) | getbeu16(buf, (off)+2)))
#define getbes64(buf, off) ((int64_t)(((uint64_t)getbeu32(buf, (off)) << 32) | getbeu32(buf, (off)+4)))
#define getbeu64(buf, off) ((uint64_t)(((uint64_t)getbeu32(buf, (off)) << 32) | getbeu32(buf, (off)+4)))
-extern float getbef32(const char *, int);
+extern float getbef32(const char *, int);
extern double getbed64(const char *, int);
#define putbe16(buf,off,w) do {putbyte(buf, (off), (w) >> 8); putbyte(buf, (off)+1, (w));} while (0)
diff --git a/bsd_base64.c b/bsd_base64.c
index 8e2bf101..cedecafb 100644
--- a/bsd_base64.c
+++ b/bsd_base64.c
@@ -107,9 +107,9 @@ static const char Pad64 = '=';
end of the data is performed using the '=' character.
Since all base64 input is an integral number of octets, only the
- -------------------------------------------------
+ -------------------------------------------------
following cases can arise:
-
+
(1) the final quantum of encoding input is an integral
multiple of 24 bits; here, the final unit of encoded
output will be an integral multiple of 4 characters
diff --git a/bsd_base64.h b/bsd_base64.h
index 8ff1217d..d0972bd7 100644
--- a/bsd_base64.h
+++ b/bsd_base64.h
@@ -7,7 +7,7 @@
#ifndef HAVE___B64_NTOP
# ifndef HAVE_B64_NTOP
-int b64_ntop(unsigned char const *src, size_t srclength, char *target,
+int b64_ntop(unsigned char const *src, size_t srclength, char *target,
size_t targsize);
int b64_pton(char const *src, unsigned char *target, size_t targsize);
# endif /* !HAVE_B64_NTOP */
diff --git a/cgps.c b/cgps.c
index c32d1154..3fe1db23 100644
--- a/cgps.c
+++ b/cgps.c
@@ -13,7 +13,7 @@
/*
* The True North compass fails with current gpsd versions for reasons
* the dev team has been unable to diagnose due to not having test hardware.
- * The support for it is conditioned out in order to simplify moving
+ * The support for it is conditioned out in order to simplify moving
* to the new JSON-based protocol and reduce startup time.
*/
#undef TRUENORTH
@@ -177,13 +177,13 @@ static void windowsetup(void)
/* inotialize curses and set up screen windows */
{
/* Set the window sizes per the following criteria:
- *
+ *
* 1. Set the window size to display the maximum number of
- * satellites possible, but not more than can be fit in a
+ * satellites possible, but not more than can be fit in a
* window the size of the GPS report window. We have to set
* the limit that way because MAXCHANNELS has been made large
* in order to prepare for survey-grade receivers..
- *
+ *
* 2. If the screen size will not allow for the full complement of
* satellites to be displayed, set the windows sizes smaller, but
* not smaller than the number of lines necessary to display all of
@@ -191,7 +191,7 @@ static void windowsetup(void)
* will be truncated to fit the available window size. (TODO: If
* the satellite list is truncated, omit the satellites not used to
* obtain the current fix.)
- *
+ *
* 3. If the screen is large enough to display all possible
* satellites (MAXCHANNELS - 2) with space still left at the bottom,
* add a window at the bottom in which to scroll raw gpsd data.
@@ -344,7 +344,7 @@ static void windowsetup(void)
static void resize(int sig UNUSED)
/* cope with terminal resize */
{
- if (!isendwin())
+ if (!isendwin())
{
(void)endwin();
windowsetup();
@@ -626,7 +626,7 @@ static void update_gps_panel(struct gps_data_t *gpsdata)
(double)(timestamp()-gpsdata->fix.time));
else
(void)snprintf(scr, sizeof(scr), "n/a");
- (void)mvwprintw(datawin, 14, DATAWIN_VALUE_OFFSET + 5, "%-*s", 22,
+ (void)mvwprintw(datawin, 14, DATAWIN_VALUE_OFFSET + 5, "%-*s", 22,
scr);
/* Fill in the grid square (esr thought *this* one was interesting). */
/*@-branchstate@*/
diff --git a/crc24q.c b/crc24q.c
index dfa90cbb..9d1cb050 100644
--- a/crc24q.c
+++ b/crc24q.c
@@ -5,7 +5,7 @@
*
* x^24+ x^23+ x^18+ x^17+ x^14+ x^11+ x^10+ x^7+ x^6+ x^5+ x^4+ x^3+ x+1
*
- * This corresponds to a mask of 0x1864CFB. For a primer on CRC theory,
+ * This corresponds to a mask of 0x1864CFB. For a primer on CRC theory,
* including detailed discussion of how and why the error polynomial is
* expressed by this mask, see <http://www.ross.net/crc/>.
*
diff --git a/driver_ais.c b/driver_ais.c
index af58fcaa..0fc883ce 100644
--- a/driver_ais.c
+++ b/driver_ais.c
@@ -9,7 +9,7 @@
* 22-23, and 25-27 has not.
* For the special IMO messages (types 6 and 8), only the following have been
* tested against known-good decodings:
- * - IMO236 met/hydro message: Type=8, DAC=1, FI=11
+ * - IMO236 met/hydro message: Type=8, DAC=1, FI=11
* - IMO289 met/hydro message: Type=8, DAC=1, FI=31
*
* This file is Copyright (c) 2010 by the GPSD project
@@ -407,7 +407,7 @@ bool ais_binary_decode(struct ais_t *ais,
ais->type8.dac1fid11.wspeed = UBITS(121, 7);
ais->type8.dac1fid11.wgust = UBITS(128, 7);
ais->type8.dac1fid11.wdir = UBITS(135, 9);
- ais->type8.dac1fid11.wgustdir = UBITS(144, 9);
+ ais->type8.dac1fid11.wgustdir = UBITS(144, 9);
ais->type8.dac1fid11.airtemp = UBITS(153, 11);
ais->type8.dac1fid11.humidity = UBITS(164, 7);
ais->type8.dac1fid11.dewpoint = UBITS(171, 10);
@@ -551,7 +551,7 @@ bool ais_binary_decode(struct ais_t *ais,
ais->type8.dac1fid31.wspeed = UBITS(122, 7);
ais->type8.dac1fid31.wgust = UBITS(129, 7);
ais->type8.dac1fid31.wdir = UBITS(136, 9);
- ais->type8.dac1fid31.wgustdir = UBITS(145, 9);
+ ais->type8.dac1fid31.wgustdir = UBITS(145, 9);
ais->type8.dac1fid31.airtemp = SBITS(154, 11);
ais->type8.dac1fid31.humidity = UBITS(165, 7);
ais->type8.dac1fid31.dewpoint = SBITS(172, 10);
diff --git a/driver_evermore.c b/driver_evermore.c
index 0117e23f..52fa7452 100644
--- a/driver_evermore.c
+++ b/driver_evermore.c
@@ -1,14 +1,14 @@
/*
*
* This is the gpsd driver for EverMore GPSes. They have both an NMEA and
- * a binary reporting mode, with the interesting property that they will
+ * a binary reporting mode, with the interesting property that they will
* cheerfully accept binary commands (such as speed changes) while in NMEA
* mode.
*
* Binary mode would give us atomic fix reports, but it has one large drawback:
* the Navigation Data Out message doesn't report a leap-second offset, so it
* is not actually possible to collect a leap-second offset from it. Therefore
- * we'll normally run the driver in NMEA mode.
+ * we'll normally run the driver in NMEA mode.
*
* About the only thing binary mode gives that NMEA won't is TDOP and raw
* pseudoranges, but gpsd does its own DOPs from skyview. By default we'll
@@ -185,11 +185,11 @@ gps_mask_t evermore_parse(struct gps_device_t * session, unsigned char *buf,
(unsigned short)getleu16(buf2, 3),
(double)getleu32(buf2, 5) * 0.01);
ecef_to_wgs84fix(&session->newdata, &session->gpsdata.separation,
- (double)getles32(buf2, 9) * 1.0,
+ (double)getles32(buf2, 9) * 1.0,
(double)getles32(buf2, 13) * 1.0,
(double)getles32(buf2, 17) * 1.0,
(double)getles16(buf2, 21) / 10.0,
- (double)getles16(buf2, 23) / 10.0,
+ (double)getles16(buf2, 23) / 10.0,
(double)getles16(buf2, 25) / 10.0);
used = (unsigned char)getub(buf2, 27) & 0x0f;
//visible = (getub(buf2, 27) & 0xf0) >> 4;
diff --git a/driver_garmin.c b/driver_garmin.c
index 9a85e545..c3cab894 100644
--- a/driver_garmin.c
+++ b/driver_garmin.c
@@ -483,7 +483,7 @@ gps_mask_t PrintSERPacket(struct gps_device_t *session, unsigned char pkt_id,
CLEAR_IS | REPORT_IS;
/*
* Garmin documentation says we should wait until four good fixes
- * have been seen before trying to use the device for precision
+ * have been seen before trying to use the device for precision
* time service.
*/
if (session->fixcnt > 3)
@@ -516,8 +516,8 @@ gps_mask_t PrintSERPacket(struct gps_device_t *session, unsigned char pkt_id,
gpsd_report(LOG_INF,
"Garmin: PVT RMD Sat: %3u, cycles: %9u, pr: %16.6f, "
"phase: %7.3f, slp_dtct: %3s, snr: %3u, Valid: %3s\n",
- (int)rmd->sv[i].svid + 1,
- GPSD_LE32TOH(rmd->sv[i].cycles),
+ (int)rmd->sv[i].svid + 1,
+ GPSD_LE32TOH(rmd->sv[i].cycles),
rmd->sv[i].pr,
(GPSD_LE16TOH(rmd->sv[i].phase) * 360.0) / 2048.0,
rmd->sv[i].slp_dtct != 0 ? "Yes" : "No",
@@ -537,7 +537,7 @@ gps_mask_t PrintSERPacket(struct gps_device_t *session, unsigned char pkt_id,
for (i = 0, j = 0; i < GARMIN_CHANNELS; i++, sats++) {
gpsd_report(LOG_INF,
"Garmin: Sat %3d, snr: %5u, elev: %2d, Azmth: %3d, Stat: %x\n",
- sats->svid, GPSD_LE16TOH(sats->snr), sats->elev,
+ sats->svid, GPSD_LE16TOH(sats->snr), sats->elev,
GPSD_LE16TOH(sats->azmth),
sats->status);
@@ -909,7 +909,7 @@ static bool garmin_usb_detect(struct gps_device_t *session UNUSED)
#ifdef HAVE_LIBUSB
if (!is_usb_device(session->gpsdata.dev.path, 0x091e, 0x0003))
return false;
-
+
if (!gpsd_set_raw(session)) {
gpsd_report(LOG_ERROR,
"Garmin: garmin_usb_detect: error changing port attributes: %s\n",
diff --git a/driver_italk.c b/driver_italk.c
index b3310a85..b4214d0d 100644
--- a/driver_italk.c
+++ b/driver_italk.c
@@ -6,7 +6,7 @@
*
* Week counters are not limited to 10 bits. It's unknown what
* the firmware is doing to disambiguate them, if anything; it might just
- * be adding a fixed offset based on a hidden epoch value, in which case
+ * be adding a fixed offset based on a hidden epoch value, in which case
* unhappy things will occur on the next rollover.
*/
#include <stdio.h>
@@ -199,7 +199,7 @@ static gps_mask_t decode_itk_subframe(struct gps_device_t *session,
unsigned char *buf, size_t len)
{
unsigned short flags, prn, sf;
- unsigned int i;
+ unsigned int i;
uint32_t words[10];
if (len != 64) {
diff --git a/driver_navcom.c b/driver_navcom.c
index f9c601a8..498abc4c 100644
--- a/driver_navcom.c
+++ b/driver_navcom.c
@@ -28,7 +28,7 @@
*
* Week counters are not limited to 10 bits. It's unknown what
* the firmware is doing to disambiguate them, if anything; it might just
- * be adding a fixed offset based on a hidden epoch value, in which case
+ * be adding a fixed offset based on a hidden epoch value, in which case
* unhappy things will occur on the next rollover.
*
* This file is Copyright (c) 2010 by the GPSD project
diff --git a/driver_nmea0183.c b/driver_nmea0183.c
index 3494cef8..65b6fe14 100644
--- a/driver_nmea0183.c
+++ b/driver_nmea0183.c
@@ -337,14 +337,14 @@ static gps_mask_t processGPGGA(int c UNUSED, char *field[],
* is only issued once per cycle we can detect this here (it would be
* nicer to do it on GSA but GSA has no timestamp).
*/
- session->driver.nmea.latch_mode = strncmp(field[1],
+ session->driver.nmea.latch_mode = strncmp(field[1],
session->driver.nmea.last_gga_timestamp,
sizeof(session->driver.nmea.last_gga_timestamp))==0;
if (session->driver.nmea.latch_mode) {
session->gpsdata.status = STATUS_NO_FIX;
session->newdata.mode = MODE_NO_FIX;
} else
- (void)strlcpy(session->driver.nmea.last_gga_timestamp,
+ (void)strlcpy(session->driver.nmea.last_gga_timestamp,
field[1],
sizeof(session->driver.nmea.last_gga_timestamp));
/* if we have a fix and the mode latch is off, go... */
@@ -760,7 +760,7 @@ static gps_mask_t processGPZDA(int c UNUSED, char *field[],
/*
* This looks like a GPS week-counter rollover.
*/
- gpsd_report(LOG_WARN, "ZDA year %d less than clock year, "
+ gpsd_report(LOG_WARN, "ZDA year %d less than clock year, "
"probable GPS week rollover lossage\n", year);
}
session->driver.nmea.date.tm_year = year - 1900;
@@ -775,11 +775,11 @@ static gps_mask_t processGPZDA(int c UNUSED, char *field[],
static gps_mask_t processHDT(int c UNUSED, char *field[],
struct gps_device_t *session)
{
- /*
+ /*
* $HEHDT,341.8,T*21
*
* HDT,x.x*hh<cr><lf>
- *
+ *
* The only data field is true heading in degrees.
* The following field is required to be 'T' indicating a true heading.
* It is followed by a mandatory nmea_checksum.
@@ -854,7 +854,7 @@ static gps_mask_t processDBT(int c UNUSED, char *field[],
/*
* Hack: We report depth below keep as negative altitude because there's
- * no better place to put it. Should work in practice as nobody is
+ * no better place to put it. Should work in practice as nobody is
* likely to be operating a depth sounder at varying altitudes.
*/
gpsd_report(LOG_RAW, "mode %d, depth %lf.\n",
@@ -871,9 +871,9 @@ static gps_mask_t processTNTHTM(int c UNUSED, char *field[],
* Proprietary sentence for True North Technologies Magnetic Compass.
* This may also apply to some Honeywell units since they may have been
* designed by True North.
-
+
$PTNTHTM,14223,N,169,N,-43,N,13641,2454*15
-
+
HTM,x.x,a,x.x,a,x.x,a,x.x,x.x*hh<cr><lf>
Fields in order:
1. True heading (compass measurement + deviation + variation)
@@ -892,7 +892,7 @@ static gps_mask_t processTNTHTM(int c UNUSED, char *field[],
7. dip angle
8. relative magnitude horizontal component of earth's magnetic field
*hh mandatory nmea_checksum
-
+
By default, angles are reported as 26-bit integers: weirdly, the
technical manual says either 0 to 65535 or -32768 to 32767 can
occur as a range.
@@ -937,7 +937,7 @@ static gps_mask_t processOHPR(int c UNUSED, char *field[],
{
/*
* Proprietary sentence for OceanServer Magnetic Compass.
-
+
OHPR,x.x,x.x,x.x,x.x,x.x,x.x,x.x,x.x,x.x,x.x,x.x,x.x,x.x,x.x,x.x,x.x,x.x,x.x*hh<cr><lf>
Fields in order:
1. Azimuth
@@ -1081,7 +1081,7 @@ gps_mask_t nmea_parse(char *sentence, struct gps_device_t * session)
} nmea_phrase[] = {
/*@ -nullassign @*/
{"PGRMC", 0, false, NULL}, /* ignore Garmin Sensor Config */
- {"PGRME", 7, false, processPGRME},
+ {"PGRME", 7, false, processPGRME},
{"PGRMI", 0, false, NULL}, /* ignore Garmin Sensor Init */
{"PGRMO", 0, false, NULL}, /* ignore Garmin Sentence Enable */
/*
@@ -1194,11 +1194,11 @@ gps_mask_t nmea_parse(char *sentence, struct gps_device_t * session)
(nmea_phrase[i].decoder) (count,
session->driver.nmea.field,
session);
- (void)strlcpy(session->gpsdata.tag,
- nmea_phrase[i].name,
+ (void)strlcpy(session->gpsdata.tag,
+ nmea_phrase[i].name,
MAXTAGLEN);
if (nmea_phrase[i].cycle_continue)
- session->driver.nmea.cycle_continue = true;
+ session->driver.nmea.cycle_continue = true;
/*
* Must force this to be nz, as we're going to rely on a zero
* value to mean "no previous tag" later.
@@ -1233,7 +1233,7 @@ gps_mask_t nmea_parse(char *sentence, struct gps_device_t * session)
* Garmins in binary mode; safest to do it in case we're
* talking to a Garmin in text mode.)
*/
- if (session->fixcnt > 3)
+ if (session->fixcnt > 3)
retval |= PPSTIME_IS;
}
@@ -1277,7 +1277,7 @@ gps_mask_t nmea_parse(char *sentence, struct gps_device_t * session)
}
}
} else {
- /* extend the cycle to an un-timestamped sentence? */
+ /* extend the cycle to an un-timestamped sentence? */
if ((session->driver.nmea.lasttag & session->driver.nmea.cycle_enders) != 0)
gpsd_report(LOG_PROG,
"%s is just after a cycle ender.\n",
diff --git a/driver_nmea2000.c b/driver_nmea2000.c
index 6232e7cc..ac879509 100644
--- a/driver_nmea2000.c
+++ b/driver_nmea2000.c
@@ -305,7 +305,7 @@ static gps_mask_t hnd_129029(unsigned char *bu, int len, PGN *pgn, struct gps_de
mask = 0;
session->driver.nmea2000.sid[3] = bu[0];
-
+
/*@-type@*//* splint has a bug here */
session->newdata.time = getleu16(bu,1) * 24*60*60 + getleu32(bu, 3)/1e4;
/*@+type@*/
@@ -668,7 +668,7 @@ static void find_pgn(struct can_frame *frame, struct gps_device_t *session)
work = search_pgnlist(source_pgn, session->driver.nmea2000.pgnlist);
} else {
PGN *pgnlist;
-
+
pgnlist = &gpspgn[0];
work = search_pgnlist(source_pgn, pgnlist);
if (work == NULL) {
@@ -749,7 +749,7 @@ static void find_pgn(struct can_frame *frame, struct gps_device_t *session)
static ssize_t nmea2000_get(struct gps_device_t *session)
-{
+{
struct can_frame frame;
ssize_t status;
@@ -771,10 +771,10 @@ static ssize_t nmea2000_get(struct gps_device_t *session)
/*@-mustfreeonly@*/
static gps_mask_t nmea2000_parse_input(struct gps_device_t *session)
-{
+{
gps_mask_t mask;
PGN *work;
-
+
// printf("NMEA2000 parse_input called\n");
mask = 0;
work = (PGN *) session->driver.nmea2000.workpgn;
@@ -884,7 +884,7 @@ int nmea2000_open(struct gps_device_t *session)
/* Locate the interface you wish to use */
strlcpy(ifr.ifr_name, interface_name, sizeof(ifr.ifr_name));
- status = ioctl(sock, SIOCGIFINDEX, &ifr); /* ifr.ifr_ifindex gets filled
+ status = ioctl(sock, SIOCGIFINDEX, &ifr); /* ifr.ifr_ifindex gets filled
* with that device's index */
if (status != 0) {
diff --git a/driver_oncore.c b/driver_oncore.c
index b020c7f6..1cdefa5d 100644
--- a/driver_oncore.c
+++ b/driver_oncore.c
@@ -177,7 +177,7 @@ oncore_msg_navsol(struct gps_device_t *session, unsigned char *buf,
break;
}
st++;
- /* bit 7 of the status word: sat used for position */
+ /* bit 7 of the status word: sat used for position */
if (status & 0x80)
session->gpsdata.used[nsv++] = sv;
/* bit 2 of the status word: using for time solution */
@@ -435,7 +435,7 @@ static void oncore_event_hook(struct gps_device_t *session, event_t event)
if (session->context->readonly)
return;
- /*
+ /*
* Some oncore VP variants that have not been used after long
* power-down will be silent on startup. Provoke
* identification by requesting the firmware version.
@@ -460,7 +460,7 @@ static void oncore_event_hook(struct gps_device_t *session, event_t event)
#ifdef NTPSHM_ENABLE
static double oncore_ntp_offset(struct gps_device_t *session UNUSED)
{
- /*
+ /*
* Only one sentence (NAVSOL) ships time. 0.175 seems best at
* 9600 for UT+, not sure what the fudge should be at other baud
* rates or for other models.
@@ -474,9 +474,9 @@ static bool oncore_set_speed(struct gps_device_t *session UNUSED,
speed_t speed UNUSED,
char parity UNUSED, int stopbits UNUSED)
{
- /*
+ /*
* Set port operating mode, speed, parity, stopbits etc. here.
- * Note: parity is passed as 'N'/'E'/'O', but you should program
+ * Note: parity is passed as 'N'/'E'/'O', but you should program
* defensively and allow 0/1/2 as well.
*/
return false;
@@ -491,9 +491,9 @@ static void oncore_set_mode(struct gps_device_t *session, int mode)
/* send the mode switch control string */
/* oncore_to_nmea(session->gpsdata.gps_fd,session->gpsdata.baudrate); */
session->gpsdata.dev.driver_mode = MODE_NMEA;
- /*
+ /*
* Anticipatory switching works only when the packet getter is the
- * generic one and it recognizes packets of the type this driver
+ * generic one and it recognizes packets of the type this driver
* is expecting. This should be the normal case.
*/
(void)gpsd_switch_driver(session, "Generic NMEA");
diff --git a/driver_proto.c b/driver_proto.c
index 316c67e2..2ef2bf7c 100644
--- a/driver_proto.c
+++ b/driver_proto.c
@@ -92,11 +92,11 @@ _proto__msg_navsol(struct gps_device_t *session, unsigned char *buf, size_t data
session->newdata.eps = GET_SPEED_ERROR();
session->gpsdata.satellites_used = GET_SATELLITES_USED();
/*
- * Do *not* clear DOPs in a navigation solution message;
- * instead, opportunistically pick up whatever it gives
- * us and replace whatever values we computed from the
+ * Do *not* clear DOPs in a navigation solution message;
+ * instead, opportunistically pick up whatever it gives
+ * us and replace whatever values we computed from the
* visibility matrix for he last skyview. The reason to trust
- * the chip returns over what we compute is that some
+ * the chip returns over what we compute is that some
* chips have internal deweighting albums to throw out sats
* that increase DOP.
*/
@@ -115,7 +115,7 @@ _proto__msg_navsol(struct gps_device_t *session, unsigned char *buf, size_t data
*/
mask |= MODE_SET | STATUS_SET | REPORT_IS;
- /*
+ /*
* At the end of each packet-cracking function, report at LOG_DATA level
* the fields it potentially set and the transfer mask. Doing this
* makes it relatively easy to track down data-management problems.
@@ -339,8 +339,8 @@ static ssize_t _proto__control_send(struct gps_device_t *session,
/* CONSTRUCT THE MESSAGE */
- /*
- * This copy to a public assembly buffer
+ /*
+ * This copy to a public assembly buffer
* enables gpsmon to snoop the control message
* after it has been sent.
*/
@@ -380,7 +380,7 @@ static void _proto__event_hook(struct gps_device_t *session, event_t event)
*/
}
if (event == event_configure) {
- /*
+ /*
* Change sentence mix and set reporting modes as needed.
* Called immediately after event_identified fires, then just
* after every packet received thereafter, but you probably
@@ -405,7 +405,7 @@ static void _proto__event_hook(struct gps_device_t *session, event_t event)
*/
} else if (event == event_reactivate) {
/*
- * Fires when a device is reactivated after having been closed.
+ * Fires when a device is reactivated after having been closed.
* Use this hook for re-establishing device settings that
* it doesn't hold through closes.
*/
@@ -438,9 +438,9 @@ static gps_mask_t _proto__parse_input(struct gps_device_t *session)
static bool _proto__set_speed(struct gps_device_t *session,
speed_t speed, char parity, int stopbits)
{
- /*
+ /*
* Set port operating mode, speed, parity, stopbits etc. here.
- * Note: parity is passed as 'N'/'E'/'O', but you should program
+ * Note: parity is passed as 'N'/'E'/'O', but you should program
* defensively and allow 0/1/2 as well.
*/
}
@@ -453,9 +453,9 @@ static void _proto__set_mode(struct gps_device_t *session, int mode)
if (mode == MODE_NMEA) {
// _proto__to_nmea(session->gpsdata.gps_fd,session->gpsdata.baudrate); /* send the mode switch control string */
session->gpsdata.driver_mode = MODE_NMEA;
- /*
+ /*
* Anticipatory switching works only when the packet getter is the
- * generic one and it recognizes packets of the type this driver
+ * generic one and it recognizes packets of the type this driver
* is expecting. This should be the normal case.
*/
(void)gpsd_switch_driver(session, "Generic NMEA");
diff --git a/driver_rtcm3.c b/driver_rtcm3.c
index 7c9e9b22..93e955d8 100644
--- a/driver_rtcm3.c
+++ b/driver_rtcm3.c
@@ -4,9 +4,9 @@ This is a decoder for RTCM-104 3.x, a serial protocol used for
broadcasting pseudorange corrections from differential-GPS reference
stations. The applicable specification is RTCM 10403.1: RTCM Paper
177-2006-SC104-STD. This obsolesces the earlier RTCM-104 2.x
-specifications. The specification document is proprietary; ordering
+specifications. The specification document is proprietary; ordering
instructions are accessible from <http://www.rtcm.org/>
-under "Publications".
+under "Publications".
Unike the RTCM 2.x protocol, RTCM3.x does not use the strange
sliding-bit-window IS-GPS-200 protocol as a transport layer, but is a
@@ -380,7 +380,7 @@ void rtcm3_unpack( /*@out@*/ struct rtcm3_t *rtcm, char *buf)
rtcm->rtcmtypes.rtcm3_1029.sod = (unsigned short)ugrab(17);
rtcm->rtcmtypes.rtcm3_1029.len = (unsigned long)ugrab(7);
rtcm->rtcmtypes.rtcm3_1029.unicode_units = (size_t)ugrab(8);
- (void)memcpy(rtcm->rtcmtypes.rtcm3_1029.text,
+ (void)memcpy(rtcm->rtcmtypes.rtcm3_1029.text,
buf + 12, rtcm->rtcmtypes.rtcm3_1029.unicode_units);
break;
@@ -406,7 +406,7 @@ void rtcm3_unpack( /*@out@*/ struct rtcm3_t *rtcm, char *buf)
break;
default:
- /*
+ /*
* Leader bytes, message length, and checksum won't be copied.
* The first 12 bits of the copied payload will be the type field.
*/
diff --git a/driver_sirf.c b/driver_sirf.c
index 7284a2b5..93f9443a 100644
--- a/driver_sirf.c
+++ b/driver_sirf.c
@@ -3,7 +3,7 @@
* It also handles uBlox, a SiRF derivative.
*
* The advantages: Reports climb/sink rate (raw-mode clients won't see this).
- * Also, we can flag DGPS satellites used in the skyview when SBAS is in use.
+ * Also, we can flag DGPS satellites used in the skyview when SBAS is in use.
* The disadvantages: Doesn't return PDOP or VDOP, just HDOP.
*
* Chris Kuethe, our SiRF expert, tells us:
@@ -461,7 +461,7 @@ static gps_mask_t sirf_msg_nlmd(struct gps_device_t *session UNUSED,
* different double orders, neither IEEE754 */
/* FIXME - decode the time, since this is the first MID with a
* good time stamp this will be good for ntpshm time */
- gpsd_report(LOG_PROG, "SiRF: MID 0x1c, NLMD, gps_tow: %f\n",
+ gpsd_report(LOG_PROG, "SiRF: MID 0x1c, NLMD, gps_tow: %f\n",
(double)gps_tow);
return 0;
@@ -525,7 +525,7 @@ static gps_mask_t sirf_msg_navdata(struct gps_device_t *session,
#ifdef RECONFIGURE_ENABLE
if (!session->context->readonly && session->gpsdata.dev.baudrate < 38400) {
/* some USB are also too slow, no way to tell which ones */
- gpsd_report(LOG_WARN,
+ gpsd_report(LOG_WARN,
"WARNING: SiRF: link too slow, disabling subframes.\n");
(void)sirf_write(session, disablesubframe);
}
@@ -675,11 +675,11 @@ static gps_mask_t sirf_msg_navsol(struct gps_device_t *session,
session->gpsdata.used[i] = (int)getub(buf, 29 + i);
/* position/velocity is bytes 1-18 */
ecef_to_wgs84fix(&session->newdata, &session->gpsdata.separation,
- (double)getbes32(buf, 1) * 1.0,
+ (double)getbes32(buf, 1) * 1.0,
(double)getbes32(buf, 5) * 1.0,
- (double)getbes32(buf, 9) * 1.0,
+ (double)getbes32(buf, 9) * 1.0,
(double)getbes16(buf, 13) / 8.0,
- (double)getbes16(buf, 15) / 8.0,
+ (double)getbes16(buf, 15) / 8.0,
(double)getbes16(buf, 17) / 8.0);
/* fix status is byte 19 */
navtype = (unsigned short)getub(buf, 19);
@@ -1215,7 +1215,7 @@ gps_mask_t sirf_parse(struct gps_device_t * session, unsigned char *buf,
return 0;
default:
- gpsd_report(LOG_WARN, "SiRF: Unknown packet id %d length %zd\n",
+ gpsd_report(LOG_WARN, "SiRF: Unknown packet id %d length %zd\n",
buf[0], len);
return 0;
}
diff --git a/driver_tsip.c b/driver_tsip.c
index 92aa26cd..3c99138a 100644
--- a/driver_tsip.c
+++ b/driver_tsip.c
@@ -4,7 +4,7 @@
*
* Week counters are not limited to 10 bits. It's unknown what
* the firmware is doing to disambiguate them, if anything; it might just
- * be adding a fixed offset based on a hidden epoch value, in which case
+ * be adding a fixed offset based on a hidden epoch value, in which case
* unhappy things will occur on the next rollover.
*
* This file is Copyright (c) 2010 by the GPSD project
@@ -189,7 +189,7 @@ static gps_mask_t tsip_analyze(struct gps_device_t *session)
if (f1 >= 0.0 && f2 > 10.0) {
session->context->leap_seconds = (int)round(f2);
session->context->valid |= LEAP_SECOND_VALID;
- session->newdata.time =
+ session->newdata.time =
gpsd_gpstime_resolve(session, (unsigned short)s1, (double)f1);
mask |= TIME_SET | PPSTIME_IS;
}
@@ -284,7 +284,7 @@ static gps_mask_t tsip_analyze(struct gps_device_t *session)
//f1 = getbef32((char *)buf, 12); clock bias */
f2 = getbef32((char *)buf, 16); /* time-of-fix */
if ((session->context->valid & GPS_TIME_VALID)!=0) {
- session->newdata.time =
+ session->newdata.time =
gpsd_gpstime_resolve(session,
(unsigned short)session->context->gps_week,
(double)f2);
@@ -548,7 +548,7 @@ static gps_mask_t tsip_analyze(struct gps_device_t *session)
if ((session->context->valid & GPS_TIME_VALID)!=0) {
session->newdata.time =
gpsd_gpstime_resolve(session,
- (unsigned short)session->context->gps_week,
+ (unsigned short)session->context->gps_week,
(double)f1);
mask |= TIME_SET | PPSTIME_IS;
}
@@ -643,17 +643,17 @@ static gps_mask_t tsip_analyze(struct gps_device_t *session)
session->context->leap_seconds = (int)u4;
session->context->valid |= LEAP_SECOND_VALID;
}
- session->newdata.time = gpsd_gpstime_resolve(session,
- (unsigned short)s4,
+ session->newdata.time = gpsd_gpstime_resolve(session,
+ (unsigned short)s4,
(double)ul1 *1e-3);
mask |=
- TIME_SET | PPSTIME_IS | LATLON_SET | ALTITUDE_SET | SPEED_SET |
+ TIME_SET | PPSTIME_IS | LATLON_SET | ALTITUDE_SET | SPEED_SET |
TRACK_SET | CLIMB_SET | STATUS_SET | MODE_SET | CLEAR_IS |
REPORT_IS;
gpsd_report(LOG_DATA,
"SP-LFEI 0x20: time=%.2f lat=%.2f lon=%.2f alt=%.2f "
"speed=%.2f track=%.2f climb=%.2f "
- "mode=%d status=%d\n",
+ "mode=%d status=%d\n",
session->newdata.time,
session->newdata.latitude, session->newdata.longitude,
session->newdata.altitude, session->newdata.speed,
@@ -723,7 +723,7 @@ static gps_mask_t tsip_analyze(struct gps_device_t *session)
REPORT_IS;
gpsd_report(LOG_DATA,
"SP-CSP 0x23: time=%.2f lat=%.2f lon=%.2f alt=%.2f "
- "speed=%.2f track=%.2f climb=%.2f mode=%d status=%d\n",
+ "speed=%.2f track=%.2f climb=%.2f mode=%d status=%d\n",
session->newdata.time,
session->newdata.latitude, session->newdata.longitude,
session->newdata.altitude, session->newdata.speed,
diff --git a/driver_ubx.c b/driver_ubx.c
index 0374197f..6e99f55f 100644
--- a/driver_ubx.c
+++ b/driver_ubx.c
@@ -1,11 +1,11 @@
/*
* UBX driver. All capabilities are common to Antaris4 and uBlox6.
- * Reference manuals are at
+ * Reference manuals are at
* http://www.u-blox.com/en/download/documents-a-resources/u-blox-6-gps-modules-resources.html
*
* Week counters are not limited to 10 bits. It's unknown what
* the firmware is doing to disambiguate them, if anything; it might just
- * be adding a fixed offset based on a hidden epoch value, in which case
+ * be adding a fixed offset based on a hidden epoch value, in which case
* unhappy things will occur on the next rollover.
*
* For the Antaris 4, the default leap-secoond offset (before getting one from
@@ -183,8 +183,8 @@ ubx_msg_nav_timegps(struct gps_device_t *session, unsigned char *buf,
flags = (unsigned int)getub(buf, 11);
if ((flags & 0x7) != 0)
session->context->leap_seconds = (int)getub(buf, 10);
- session->newdata.time = gpsd_gpstime_resolve(session,
- (unsigned short int)gw,
+ session->newdata.time = gpsd_gpstime_resolve(session,
+ (unsigned short int)gw,
(double)tow / 1000.0);
gpsd_report(LOG_DATA, "TIMEGPS: time=%.2f mask={TIME}\n",
@@ -474,14 +474,14 @@ gps_mask_t ubx_parse(struct gps_device_t * session, unsigned char *buf,
session->driver.ubx.port_settings[i] = buf[UBX_PREFIX_LEN+i];
/* turn off NMEA output on this port */
session->driver.ubx.port_settings[14] &= ~0x02;
- (void)ubx_write(session, 0x06, 0x00,
- session->driver.ubx.port_settings,
+ (void)ubx_write(session, 0x06, 0x00,
+ session->driver.ubx.port_settings,
sizeof(session->driver.ubx.port_settings));
session->driver.ubx.have_port_configuration = true;
break;
case UBX_ACK_NAK:
- gpsd_report(LOG_IO, "UBX_ACK_NAK, class: %02x, id: %02x\n",
+ gpsd_report(LOG_IO, "UBX_ACK_NAK, class: %02x, id: %02x\n",
buf[UBX_CLASS_OFFSET],
buf[UBX_TYPE_OFFSET]);
break;
@@ -721,7 +721,7 @@ static bool ubx_speed(struct gps_device_t *session,
usart_mode |= 0x2000; /* zero value means 1 stop bit */
putle32(session->driver.ubx.port_settings, 4, usart_mode);
putle32(session->driver.ubx.port_settings, 8, speed);
- (void)ubx_write(session, 0x06, 0x00,
+ (void)ubx_write(session, 0x06, 0x00,
session->driver.ubx.port_settings,
sizeof(session->driver.ubx.port_settings));
return true;
diff --git a/driver_zodiac.c b/driver_zodiac.c
index 48faa803..9a99c663 100644
--- a/driver_zodiac.c
+++ b/driver_zodiac.c
@@ -3,7 +3,7 @@
*
* Week counters are not limited to 10 bits. It's unknown what
* the firmware is doing to disambiguate them, if anything; it might just
- * be adding a fixed offset based on a hidden epoch value, in which case
+ * be adding a fixed offset based on a hidden epoch value, in which case
* unhappy things will occur on the next rollover.
*
* This file is Copyright (c) 2010 by the GPSD project
@@ -183,8 +183,8 @@ static gps_mask_t handle1000(struct gps_device_t *session)
session->newdata.longitude = ((long)getzlong(29)) * RAD_2_DEG * 1e-8;
/*
* The Rockwell Jupiter TU30-D140 reports altitude as uncorrected height
- * above WGS84 geoid. The Zodiac binary protocol manual does not
- * specify whether word 31 is geodetic or WGS 84.
+ * above WGS84 geoid. The Zodiac binary protocol manual does not
+ * specify whether word 31 is geodetic or WGS 84.
*/
session->newdata.altitude = ((long)getzlong(31)) * 1e-2;
/*@ +type @*/
@@ -195,7 +195,7 @@ static gps_mask_t handle1000(struct gps_device_t *session)
session->mag_var = ((short)getzword(37)) * RAD_2_DEG * 1e-4;
session->newdata.climb = ((short)getzword(38)) * 1e-2;
/* map_datum = getzword(39); */
- /*
+ /*
* The manual says these are 1-sigma. Device reports only eph, circular
* error; no harm in assigning it to both x and y components.
*/
@@ -367,7 +367,7 @@ static gps_mask_t zodiac_analyze(struct gps_device_t *session)
const struct gps_type_t **dp;
gpsd_report(LOG_PROG, "zodiac_analyze packet type %d\n",
session->packet.type);
- // Wrong packet type ?
+ // Wrong packet type ?
// Maybe find a trigger just in case it's an Earthmate
gpsd_report(LOG_RAW + 4, "Is this a trigger: %s ?\n",
(char *)session->packet.outbuffer);
@@ -401,7 +401,7 @@ static gps_mask_t zodiac_analyze(struct gps_device_t *session)
(void)snprintf(session->gpsdata.tag, sizeof(session->gpsdata.tag), "%u",
id);
- /*
+ /*
* Normal cycle for these devices is 1001 1002.
* We count 1001 as end of cycle because 1002 doesn't
* carry fix information.
diff --git a/drivers.c b/drivers.c
index 3904c8ed..5d70d830 100644
--- a/drivers.c
+++ b/drivers.c
@@ -246,7 +246,7 @@ static void nmea_mode_switch(struct gps_device_t *session, int mode)
/*@-shiftnegative@*/
for (dp = gpsd_drivers; *dp; dp++) {
if ((*dp)->packet_type > 0 && (*dp)->packet_type != session->packet.type &&
- (session->observed & PACKET_TYPEMASK((*dp)->packet_type))!=0) {
+ (session->observed & PACKET_TYPEMASK((*dp)->packet_type))!=0) {
(*dp)->mode_switcher(session, mode);
break;
}
@@ -872,7 +872,7 @@ static const struct gps_type_t oceanServer = {
*
* Will also support other Jackon Labs boards, including the Firefly.
*
- * Note: you must either build with fixed_port_speed=115200 or tweak the
+ * Note: you must either build with fixed_port_speed=115200 or tweak the
* speed on the port to 115200 before running. The device's default mode
* does not stream output, so our hunt loop will simply time out otherwise.
*
@@ -1079,10 +1079,10 @@ static gps_mask_t processMTK3301(struct gps_device_t *session)
{ "Invalid", "Unsupported", "Valid but Failed", "Valid success" };
gps_mask_t mask;
- /* try a straight NMEA parse, this will set up fields */
+ /* try a straight NMEA parse, this will set up fields */
mask = generic_parse_input(session);
- if (session->packet.type == NMEA_PACKET
+ if (session->packet.type == NMEA_PACKET
&& strncmp(session->driver.nmea.field[0], "PMTK", 4) == 0)
{
int msg, reason;
@@ -1340,7 +1340,7 @@ static bool aivdm_decode(const char *buf, size_t buflen,
/* time to pass buffered-up data to where it's actually processed? */
if (ifrag == nfrags) {
- if (debug >= LOG_INF) {
+ if (debug >= LOG_INF) {
size_t clen = (ais_context->bitlen + 7) / 8;
gpsd_report(LOG_INF, "AIVDM payload is %zd bits, %zd chars: %s\n",
ais_context->bitlen, clen,
@@ -1425,7 +1425,7 @@ static const struct gps_type_t aivdm = {
static void path_rewrite(struct gps_device_t *session, char *prefix)
/* prepend the session path to the value of a specified attribute */
{
- /*
+ /*
* Hack the packet to reflect its origin. This code is supposed
* to insert the path naming the remote gpsd instance into the
* baginning of the path attribute, followed by a # to separate it
@@ -1437,17 +1437,17 @@ static void path_rewrite(struct gps_device_t *session, char *prefix)
prefloc++)
if (strncmp(prefloc, prefix, strlen(prefix)) == 0) {
char copy[sizeof(session->packet.outbuffer)];
- (void)strlcpy(copy,
- (char *)session->packet.outbuffer,
+ (void)strlcpy(copy,
+ (char *)session->packet.outbuffer,
sizeof(copy));
prefloc += strlen(prefix);
(void)strlcpy(prefloc,
session->gpsdata.dev.path,
sizeof(session->gpsdata.dev.path));
- (void)strlcat((char *)session->packet.outbuffer, "#",
+ (void)strlcat((char *)session->packet.outbuffer, "#",
sizeof(session->packet.outbuffer));
- (void)strlcat((char *)session->packet.outbuffer,
- copy + (prefloc-(char *)session->packet.outbuffer),
+ (void)strlcat((char *)session->packet.outbuffer,
+ copy + (prefloc-(char *)session->packet.outbuffer),
sizeof(session->packet.outbuffer));
}
session->packet.outbuflen = strlen((char *)session->packet.outbuffer);
@@ -1461,24 +1461,24 @@ static gps_mask_t json_pass_packet(struct gps_device_t *session UNUSED)
/* devices and paths need to be edited to */
if (strstr((char *)session->packet.outbuffer, "DEVICE") != NULL)
path_rewrite(session, "\"path\":\"");
- path_rewrite(session, "\"device\":\"");
+ path_rewrite(session, "\"device\":\"");
/* mark certain responses without a path or device attribute */
if (strstr((char *)session->packet.outbuffer, "VERSION") != NULL
|| strstr((char *)session->packet.outbuffer, "WATCH") != NULL
|| strstr((char *)session->packet.outbuffer, "DEVICES") != NULL) {
- session->packet.outbuffer[session->packet.outbuflen-1] = '\0';
- (void)strlcat((char *)session->packet.outbuffer, ",\"remote\":\"",
+ session->packet.outbuffer[session->packet.outbuflen-1] = '\0';
+ (void)strlcat((char *)session->packet.outbuffer, ",\"remote\":\"",
sizeof(session->packet.outbuffer));
(void)strlcat((char *)session->packet.outbuffer,
session->gpsdata.dev.path,
sizeof(session->packet.outbuffer));
- (void)strlcat((char *)session->packet.outbuffer, "\"}",
+ (void)strlcat((char *)session->packet.outbuffer, "\"}",
sizeof(session->packet.outbuffer));
}
- gpsd_report (LOG_PROG,
- "JSON, passing through %s\n",
+ gpsd_report (LOG_PROG,
+ "JSON, passing through %s\n",
(char *)session->packet.outbuffer);
/*@-nullpass@*/
return PASSTHROUGH_IS;
diff --git a/geoid.c b/geoid.c
index f055b373..74cdb961 100644
--- a/geoid.c
+++ b/geoid.c
@@ -62,7 +62,7 @@ double wgs84_separation(double lat, double lon)
/* 70N */ 2, 2, 1, -1, -3, -7,-14,-24,-27,-25,-19, 3, 24, 37, 47, 60, 61, 58, 51, 43, 29, 20, 12, 5, -2,-10, -14,-12,-10,-14,-12, -6, -2, 3, 6, 4, 2,
/* 80N */ 3, 1, -2, -3, -3, -3, -1, 3, 1, 5, 9, 11, 19, 27, 31, 34, 33, 34, 33, 34, 28, 23, 17, 13, 9, 4, 4, 1, -2, -2, 0, 2, 3, 2, 1, 1, 3,
/* 90N */ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13
- };
+ };
/*@ -charint @*/
/* *INDENT-ON* */
int ilat, ilon;
diff --git a/gps.h b/gps.h
index 34b2dde6..f8552f1d 100644
--- a/gps.h
+++ b/gps.h
@@ -34,7 +34,7 @@ extern "C" {
* 4.1 - Base version for initial JSON protocol (Dec 2009, release 2.90)
* 4.2 - AIS application IDs split into DAC and FID (July 2010, release 2.95)
* 5.0 - MAXCHANNELS bumped from 20 to 32 for GLONASS (Mar 2011, release 2.96)
- * gps_open() becomes reentrant, what gps_open_r() used to be.
+ * gps_open() becomes reentrant, what gps_open_r() used to be.
* gps_poll() removed in favor of gps_read(). The raw hook is gone.
*/
#define GPSD_API_MAJOR_VERSION 5 /* bump on incompatible changes */
@@ -46,9 +46,9 @@ extern "C" {
#define GPS_PATH_MAX 128 /* dev files usually have short names */
#define MAXUSERDEVS 4 /* max devices per user */
-/*
+/*
* The structure describing an uncertainty volume in kinematic space.
- * This is what GPSes are meant to produce; all the other info is
+ * This is what GPSes are meant to produce; all the other info is
* technical impedimenta.
*
* All double values use NAN to indicate data not available.
@@ -59,14 +59,14 @@ extern "C" {
* This covers over 80% of GPS products in early 2005.
*
* If you are using a chipset that speaks NMEA, this structure is updated
- * in bits by GPRMC (lat/lon, track, speed), GPGGA (alt, climb), GPGLL
+ * in bits by GPRMC (lat/lon, track, speed), GPGGA (alt, climb), GPGLL
* (lat/lon), and GPGSA (eph, epv). Most NMEA GPSes take a single fix
* at the beginning of a 1-second cycle and report the same timestamp in
* GPRMC, GPGGA, and GPGLL; for these, all info is guaranteed correctly
- * synced to the time member, but you'll get different stages of the same
- * update depending on where in the cycle you poll. A very few GPSes,
- * like the Garmin 48, take a new fix before more than one of of
- * GPRMC/GPGGA/GPGLL during a single cycle; thus, they may have different
+ * synced to the time member, but you'll get different stages of the same
+ * update depending on where in the cycle you poll. A very few GPSes,
+ * like the Garmin 48, take a new fix before more than one of of
+ * GPRMC/GPGGA/GPGLL during a single cycle; thus, they may have different
* timestamps and some data in this structure can be up to 1 cycle (usually
* 1 second) older than the fix time.
*
@@ -99,7 +99,7 @@ struct gps_fix_t {
/*
* Satellite ID classes.
* U.S. GPS authorities reserve PRNs 1-64 for GPS satellites.
- * GLONASS birds reuse GPS PRNs; it is a GPSD convention to map them to
+ * GLONASS birds reuse GPS PRNs; it is a GPSD convention to map them to
* IDs 64 and above (some other programs push them to 33 and above).
* All SBAS/WAAS/EGNOS birds have PRNs above 100.
*/
@@ -107,7 +107,7 @@ struct gps_fix_t {
#define GLONASS_PRN(n) (((n) >= 64) && ((n) <= 96)) /* GLONASS satellite */
#define DGPS_PRN(n) ((n) >= 100)
-/*
+/*
* The structure describing the pseudorange errors (GPGST)
*/
struct gst_t {
@@ -121,7 +121,7 @@ struct gst_t {
double alt_err_deviation;
};
-/*
+/*
* From the RCTM104 2.x standard:
*
* "The 30 bit words (as opposed to 32 bit words) coupled with a 50 Hz
@@ -140,7 +140,7 @@ struct gst_t {
/* RTCM104 doesn't specify this, so give it the largest reasonable value */
#define MAXHEALTH (RTCM2_WORDS_MAX-2)
-#ifndef S_SPLINT_S
+#ifndef S_SPLINT_S
/*
* A nominally 30-bit word (24 bits of data, 6 bits of parity)
* used both in the GPS downlink protocol described in IS-GPS-200
@@ -149,8 +149,8 @@ struct gst_t {
typedef /*@unsignedintegraltype@*/ uint32_t isgps30bits_t;
#endif /* S_SPLINT_S */
-/*
- * Values for "system" fields. Note, the encoding logic is senstive to the
+/*
+ * Values for "system" fields. Note, the encoding logic is senstive to the
* actual values of these; it's not sufficient that they're distinct.
*/
#define NAVSYSTEM_GPS 0
@@ -260,7 +260,7 @@ struct rtcm2_t {
struct rtcm3_rtk_hdr { /* header data from 1001, 1002, 1003, 1004 */
/* Used for both GPS and GLONASS, but their timebases differ */
unsigned int station_id; /* Reference Station ID */
- time_t tow; /* GPS Epoch Time (TOW) in ms,
+ time_t tow; /* GPS Epoch Time (TOW) in ms,
or GLONASS Epoch Time in ms */
bool sync; /* Synchronous GNSS Message Flag */
unsigned short satcount; /* # Satellite Signals Processed */
@@ -270,7 +270,7 @@ struct rtcm3_rtk_hdr { /* header data from 1001, 1002, 1003, 1004 */
struct rtcm3_basic_rtk {
unsigned char indicator; /* Indicator */
- short channel; /* Satellite Frequency Channel Number
+ short channel; /* Satellite Frequency Channel Number
(GLONASS only) */
double pseudorange; /* Pseudorange */
double rangediff; /* PhaseRange – Pseudorange in meters */
@@ -279,12 +279,12 @@ struct rtcm3_basic_rtk {
struct rtcm3_extended_rtk {
unsigned char indicator; /* Indicator */
- short channel; /* Satellite Frequency Channel Number
+ short channel; /* Satellite Frequency Channel Number
(GLONASS only) */
double pseudorange; /* Pseudorange */
double rangediff; /* PhaseRange – L1 Pseudorange */
unsigned char locktime; /* Lock time Indicator */
- unsigned char ambiguity; /* Integer Pseudorange
+ unsigned char ambiguity; /* Integer Pseudorange
Modulus Ambiguity */
double CNR; /* Carrier-to-Noise Ratio */
};
@@ -303,10 +303,10 @@ struct rtcm3_correction_diff {
unsigned char ident; /* satellite ID */
enum {reserved, correct, widelane, uncertain} ambiguity;
unsigned char nonsync;
- double geometric_diff; /* Geometric Carrier Phase
+ double geometric_diff; /* Geometric Carrier Phase
Correction Difference (1016, 1017) */
unsigned char iode; /* GPS IODE (1016, 1017) */
- double ionospheric_diff; /* Ionospheric Carrier Phase
+ double ionospheric_diff; /* Ionospheric Carrier Phase
Correction Difference (1015, 1017) */
};
@@ -537,7 +537,7 @@ struct rtcm3_t {
* Raw IS_GPS subframe data
*/
-/* The almanac is a subset of the clock and ephemeris data, with reduced
+/* The almanac is a subset of the clock and ephemeris data, with reduced
* precision. See IS-GPS-200E, Table 20-VI */
struct almanac_t
{
@@ -587,7 +587,7 @@ struct subframe_t {
* IS-GPS-200E always == 0x1 */
uint8_t data_id;
/* SV/page id used for subframes 4 & 5, 6 bits */
- uint8_t pageid;
+ uint8_t pageid;
/* tSVID, SV ID of the sat that transmitted this frame, 6 bits unsigned */
uint8_t tSVID;
/* TOW, Time of Week of NEXT message, 17 bits unsigned, scale 6, seconds */
@@ -595,7 +595,7 @@ struct subframe_t {
long l_TOW17;
/* integrity, URA bounds flag, 1 bit */
bool integrity;
- /* alert, alert flag, SV URA and/or the SV User Differential Range
+ /* alert, alert flag, SV URA and/or the SV User Differential Range
* Accuracy (UDRA) may be worse than indicated, 1 bit */
bool alert;
/* antispoof, A-S mode is ON in that SV, 1 bit */
@@ -607,7 +607,7 @@ struct subframe_t {
struct {
/* WN, Week Number, 10 bits unsigned, scale 1, weeks */
uint16_t WN;
- /* IODC, Issue of Data, Clock, 10 bits, unsigned,
+ /* IODC, Issue of Data, Clock, 10 bits, unsigned,
* issued in 8 data ranges at the same time */
uint16_t IODC;
/* toc, clock data reference time, 16 bits, unsigned, seconds
@@ -642,7 +642,7 @@ struct subframe_t {
/* subframe 2, part of ephemeris, see IS-GPS-200E, Table 20-II
* and Table 20-III */
struct {
- /* Issue of Data (Ephemeris),
+ /* Issue of Data (Ephemeris),
* equal to the 8 LSBs of the 10 bit IODC of the same data set */
uint8_t IODE;
/* Age of Data Offset for the NMCT, 6 bits, scale 900,
@@ -656,15 +656,15 @@ struct subframe_t {
* seconds */
uint16_t toe;
long l_toe;
- /* Crs, Amplitude of the Sine Harmonic Correction Term to the
+ /* Crs, Amplitude of the Sine Harmonic Correction Term to the
* Orbit Radius, 16 bits, scale 2**-5, signed, meters */
int16_t Crs;
double d_Crs;
- /* Cus, Amplitude of the Sine Harmonic Correction Term to the
+ /* Cus, Amplitude of the Sine Harmonic Correction Term to the
* Argument of Latitude, 16 bits, signed, scale 2**-29, radians */
int16_t Cus;
double d_Cus;
- /* Cuc, Amplitude of the Cosine Harmonic Correction Term to the
+ /* Cuc, Amplitude of the Cosine Harmonic Correction Term to the
* Argument of Latitude, 16 bits, signed, scale 2**-29, radians */
int16_t Cuc;
double d_Cuc;
@@ -673,7 +673,7 @@ struct subframe_t {
* 16 bits, signed, scale 2**-43, semi-circles/sec */
int16_t deltan;
double d_deltan;
- /* M0, Mean Anomaly at Reference Time, 32 bits signed,
+ /* M0, Mean Anomaly at Reference Time, 32 bits signed,
* scale 2**-31, semi-circles */
int32_t M0;
double d_M0;
@@ -688,14 +688,14 @@ struct subframe_t {
/* subframe 3, part of ephemeris, see IS-GPS-200E, Table 20-II,
* Table 20-III */
struct {
- /* Issue of Data (Ephemeris), 8 bits, unsigned
+ /* Issue of Data (Ephemeris), 8 bits, unsigned
* equal to the 8 LSBs of the 10 bit IODC of the same data set */
uint8_t IODE;
/* Rate of Inclination Angle, 14 bits signed, scale2**-43,
* semi-circles/sec */
int16_t IDOT;
double d_IDOT;
- /* Cic, Amplitude of the Cosine Harmonic Correction Term to the
+ /* Cic, Amplitude of the Cosine Harmonic Correction Term to the
* Angle of Inclination, 16 bits signed, scale 2**-29, radians*/
int16_t Cic;
double d_Cic;
@@ -711,7 +711,7 @@ struct subframe_t {
* scale 2**-31, semi-circles */
int32_t i0;
double d_i0;
- /* Omega0, Longitude of Ascending Node of Orbit Plane at Weekly
+ /* Omega0, Longitude of Ascending Node of Orbit Plane at Weekly
* Epoch, 32 bits signed, semi-circles */
int32_t Omega0;
double d_Omega0;
@@ -719,7 +719,7 @@ struct subframe_t {
* semi-circles */
int32_t omega;
double d_omega;
- /* Omega dot, Rate of Right Ascension, 24 bits signed,
+ /* Omega dot, Rate of Right Ascension, 24 bits signed,
* scale 2**-43, semi-circles/sec */
int32_t Omegad;
double d_Omegad;
@@ -743,16 +743,16 @@ struct subframe_t {
/* subframe 4, page 18 */
struct {
/* ionospheric and UTC data */
- /* A0, Bias coefficient of GPS time scale relative to UTC time
+ /* A0, Bias coefficient of GPS time scale relative to UTC time
* scale, 32 bits signed, scale 2**-30, seconds */
int32_t A0;
double d_A0;
- /* A1, Drift coefficient of GPS time scale relative to UTC time
+ /* A1, Drift coefficient of GPS time scale relative to UTC time
* scale, 24 bits signed, scale 2**-50, seconds/second */
int32_t A1;
double d_A1;
- /* alphaX, the four coefficients of a cubic equation representing
+ /* alphaX, the four coefficients of a cubic equation representing
* the amplitude of the vertical delay */
/* alpha0, 8 bits signed, scale w**-30, seconds */
@@ -768,7 +768,7 @@ struct subframe_t {
int8_t alpha3;
double d_alpha3;
- /* betaX, the four coefficients of a cubic equation representing
+ /* betaX, the four coefficients of a cubic equation representing
* the period of the model */
/* beta0, 8 bits signed, scale w**11, seconds */
@@ -783,11 +783,11 @@ struct subframe_t {
/* beta3, 8 bits signed, scale w**16, seconds/semi-circle**3 */
int8_t beta3;
double d_beta3;
-
- /* leap (delta t ls), current leap second, 8 bits signed,
+
+ /* leap (delta t ls), current leap second, 8 bits signed,
* scale 1, seconds */
int8_t leap;
- /* lsf (delta t lsf), future leap second, 8 bits signed,
+ /* lsf (delta t lsf), future leap second, 8 bits signed,
* scale 1, seconds */
int8_t lsf;
@@ -796,7 +796,7 @@ struct subframe_t {
uint8_t tot;
double d_tot;
- /* WNt, UTC reference week number, 8 bits unsigned, scale 1,
+ /* WNt, UTC reference week number, 8 bits unsigned, scale 1,
* weeks */
uint8_t WNt;
/* WNlsf, Leap second reference Week Number,
@@ -823,7 +823,7 @@ struct subframe_t {
* seconds */
uint8_t toa;
long l_toa;
- /* WNa, Week Number almanac, 8 bits, scale 2, GPS Week
+ /* WNa, Week Number almanac, 8 bits, scale 2, GPS Week
* Number % 256 */
uint8_t WNa;
/* sv, SV health status, 6 bits, bitmap */
@@ -838,11 +838,11 @@ typedef uint64_t gps_mask_t;
typedef /*@unsignedintegraltype@*/ unsigned long long gps_mask_t;
#endif /* S_SPLINT_S */
-/*
+/*
* Is an MMSI number that of an auxiliary associated with a mother ship?
* We need to be able to test this for decoding AIS Type 24 messages.
* According to <http://www.navcen.uscg.gov/marcomms/gmdss/mmsi.htm#format>,
- * auxiliary-craft MMSIs have the form 98MIDXXXX, where MID is a country
+ * auxiliary-craft MMSIs have the form 98MIDXXXX, where MID is a country
* code and XXXX the vessel ID.
*/
#define AIS_AUXILIARY_MMSI(n) ((n) / 10000000 == 98)
@@ -935,7 +935,7 @@ struct ais_t
struct {
unsigned int ais_version; /* AIS version level */
unsigned int imo; /* IMO identification */
- char callsign[7+1]; /* callsign */
+ char callsign[7+1]; /* callsign */
#define AIS_SHIPNAME_MAXLEN 20
char shipname[AIS_SHIPNAME_MAXLEN+1]; /* vessel name */
unsigned int shiptype; /* ship type code */
@@ -1762,18 +1762,18 @@ struct policy_t {
bool json; /* requesting JSON? */
bool nmea; /* requesting dumping as NMEA? */
int raw; /* requesting raw data? */
- bool scaled; /* requesting report scaling? */
+ bool scaled; /* requesting report scaling? */
bool timing; /* requesting timing info */
int loglevel; /* requested log level of messages */
char devpath[GPS_PATH_MAX]; /* specific device to watch */
char remote[GPS_PATH_MAX]; /* ...if this was passthrough */
};
-/*
+/*
* Someday we may support Windows, under which socket_t is a separate type.
* In the meantime, having a typedef for this semantic kind is no bad thing,
* as it makes clearer what some declarations are doing without breaking
- * binary compatibility.
+ * binary compatibility.
*/
typedef int socket_t;
@@ -1784,13 +1784,13 @@ typedef int socket_t;
#define WATCH_NMEA 0x000020u /* output in NMEA */
#define WATCH_RARE 0x000040u /* output of packets in hex */
#define WATCH_RAW 0x000080u /* output of raw packets */
-#define WATCH_SCALED 0x000100u /* scale output to floats */
+#define WATCH_SCALED 0x000100u /* scale output to floats */
#define WATCH_TIMING 0x000200u /* timing information */
#define WATCH_DEVICE 0x000800u /* watch specific device */
#define WATCH_NEWSTYLE 0x010000u /* force JSON streaming */
#define WATCH_OLDSTYLE 0x020000u /* force old-style streaming */
-/*
+/*
* Main structure that includes all previous substructures
*/
@@ -1832,7 +1832,7 @@ struct gps_data_t {
*
* Note: gpsd clears this time when sentences
* fail to show up within the GPS's normal
- * send cycle time. If the host-to-GPS
+ * send cycle time. If the host-to-GPS
* link is lossy enough to drop entire
* sentences, this field will be
* prone to false zero values.
@@ -1877,10 +1877,10 @@ struct gps_data_t {
/* should be moved to privdata someday */
char tag[MAXTAGLEN+1]; /* tag of last sentence processed */
- /* pack things never reported together to reduce structure size */
+ /* pack things never reported together to reduce structure size */
#define UNION_SET (RTCM2_SET|RTCM3_SET|SUBFRAME_SET|AIS_SET|ATTITUDE_SET|GST_SET|VERSION_SET|DEVICELIST_SET|LOGMESSAGE_SET|ERROR_SET)
union {
- /* unusual forms of sensor data that might come up the pipe */
+ /* unusual forms of sensor data that might come up the pipe */
struct rtcm2_t rtcm2;
struct rtcm3_t rtcm3;
struct subframe_t subframe;
@@ -1902,7 +1902,7 @@ struct gps_data_t {
void *privdata;
};
-extern int gps_open(/*@null@*/const char *, /*@null@*/const char *,
+extern int gps_open(/*@null@*/const char *, /*@null@*/const char *,
/*@out@*/struct gps_data_t *);
extern int gps_close(struct gps_data_t *);
extern int gps_send(struct gps_data_t *, const char *, ... );
@@ -1933,8 +1933,8 @@ extern timestamp_t timestamp(void);
extern timestamp_t iso8601_to_unix(char *);
extern /*@observer@*/char *unix_to_iso8601(timestamp_t t, /*@ out @*/char[], size_t len);
extern double earth_distance(double, double, double, double);
-extern double earth_distance_and_bearings(double, double, double, double,
- /*@null@*//*@out@*/double *,
+extern double earth_distance_and_bearings(double, double, double, double,
+ /*@null@*//*@out@*/double *,
/*@null@*//*@out@*/double *);
extern double wgs84_separation(double, double);
@@ -1974,7 +1974,7 @@ extern double wgs84_separation(double, double);
#define DEFAULT_GPSD_PORT "2947" /* IANA assignment */
#define DEFAULT_RTCM_PORT "2101" /* IANA assignment */
-/* special host values for non-socket exports */
+/* special host values for non-socket exports */
#define GPSD_SHARED_MEMORY "shared memory"
#define GPSD_DBUS_EXPORT "DBUS export"
diff --git a/gps_json.h b/gps_json.h
index 1da124a3..3a071827 100644
--- a/gps_json.h
+++ b/gps_json.h
@@ -13,12 +13,12 @@
#ifdef __cplusplus
extern "C" {
#endif
-void json_data_report(const gps_mask_t,
- const struct gps_device_t *,
+void json_data_report(const gps_mask_t,
+ const struct gps_device_t *,
const struct policy_t *,
/*@out@*/char *, size_t);
char *json_stringify(/*@out@*/char *, size_t, /*@in@*/const char *);
-void json_tpv_dump(const struct gps_device_t *,
+void json_tpv_dump(const struct gps_device_t *,
const struct policy_t *, /*@out@*/char *, size_t);
void json_noise_dump(const struct gps_data_t *, /*@out@*/char *, size_t);
void json_sky_dump(const struct gps_data_t *, /*@out@*/char *, size_t);
@@ -26,18 +26,18 @@ void json_att_dump(const struct gps_data_t *, /*@out@*/char *, size_t);
void json_subframe_dump(const struct gps_data_t *, /*@out@*/ char buf[], size_t);
void json_device_dump(const struct gps_device_t *, /*@out@*/char *, size_t);
void json_watch_dump(const struct policy_t *, /*@out@*/char *, size_t);
-int json_watch_read(const char *, /*@out@*/struct policy_t *,
+int json_watch_read(const char *, /*@out@*/struct policy_t *,
/*@null@*/const char **);
-int json_device_read(const char *, /*@out@*/struct devconfig_t *,
+int json_device_read(const char *, /*@out@*/struct devconfig_t *,
/*@null@*/const char **);
void json_version_dump(/*@out@*/char *, size_t);
-void json_aivdm_dump(const struct ais_t *, /*@null@*/const char *, bool,
+void json_aivdm_dump(const struct ais_t *, /*@null@*/const char *, bool,
/*@out@*/char *, size_t);
-int json_rtcm2_read(const char *, char *, size_t, struct rtcm2_t *,
+int json_rtcm2_read(const char *, char *, size_t, struct rtcm2_t *,
/*@null@*/const char **);
-int json_ais_read(const char *, char *, size_t, struct ais_t *,
+int json_ais_read(const char *, char *, size_t, struct ais_t *,
/*@null@*/const char **);
-int libgps_json_unpack(const char *, struct gps_data_t *,
+int libgps_json_unpack(const char *, struct gps_data_t *,
/*@null@*/const char **);
#ifdef __cplusplus
}
diff --git a/gpsctl.c b/gpsctl.c
index c517a098..111670aa 100644
--- a/gpsctl.c
+++ b/gpsctl.c
@@ -25,7 +25,7 @@ static int debuglevel;
static unsigned int timeout = 8;
/*
- * Set this as high or higher than the maximum number of subtype
+ * Set this as high or higher than the maximum number of subtype
* probes in drivers.c.
*/
#define REDIRECT_SNIFF 15
@@ -147,7 +147,7 @@ static void settle(struct gps_device_t *session)
(void)tcdrain(session->gpsdata.gps_fd);
}
-static bool gps_query(/*@out@*/struct gps_data_t *gpsdata,
+static bool gps_query(/*@out@*/struct gps_data_t *gpsdata,
gps_mask_t expect,
const int timeout,
const char *fmt, ... )
@@ -219,7 +219,7 @@ static bool gps_query(/*@out@*/struct gps_data_t *gpsdata,
if ((expect & gpsdata->set) != 0)
return true;
else if (time(NULL) - starttime > timeout) {
- gpsd_report(LOG_ERROR,
+ gpsd_report(LOG_ERROR,
"timed out after %d seconds\n",
timeout);
return false;
@@ -259,9 +259,9 @@ static char /*@observer@*/ *gpsd_id( /*@in@ */ struct gps_device_t *session)
int main(int argc, char **argv)
{
int option, status;
- char *device = NULL, *devtype = NULL;
+ char *device = NULL, *devtype = NULL;
char *speed = NULL, *control = NULL, *rate = NULL;
- bool to_binary = false, to_nmea = false, reset = false;
+ bool to_binary = false, to_nmea = false, reset = false;
bool lowlevel=false, echo=false;
struct gps_data_t gpsdata;
const struct gps_type_t *forcetype = NULL;
@@ -289,12 +289,12 @@ int main(int argc, char **argv)
control = optarg;
lowlevel = true;
if ((cooklen = hex_escapes(cooked, control)) <= 0) {
- gpsd_report(LOG_ERROR,
+ gpsd_report(LOG_ERROR,
"invalid escape string (error %d)\n", (int)cooklen);
exit(EXIT_FAILURE);
}
#else
- gpsd_report(LOG_ERROR, "control_send capability has been conditioned out.\n");
+ gpsd_report(LOG_ERROR, "control_send capability has been conditioned out.\n");
#endif /* CONTROLSEND_ENABLE */
break;
case 'e': /* echo specified control string with wrapper */
@@ -395,7 +395,7 @@ int main(int argc, char **argv)
gpsd_report(LOG_ERROR, "%d driver type names match '%s'.\n",
matchcount, devtype);
}
- }
+ }
if (((int)to_nmea + (int)to_binary + (int)reset) > 1) {
gpsd_report(LOG_ERROR, "make up your mind, would you?\n");
@@ -410,7 +410,7 @@ int main(int argc, char **argv)
if (!lowlevel) {
/* Try to open the stream to gpsd. */
if (gps_open(NULL, NULL, &gpsdata) != 0) {
- gpsd_report(LOG_ERROR, "no gpsd running or network error: %s.\n",
+ gpsd_report(LOG_ERROR, "no gpsd running or network error: %s.\n",
netlib_errstr(errno));
lowlevel = true;
}
@@ -422,16 +422,16 @@ int main(int argc, char **argv)
/* what devices have we available? */
if (!gps_query(&gpsdata, DEVICELIST_SET, (int)timeout, "?DEVICES;\n")) {
- gpsd_report(LOG_ERROR, "no DEVICES response received.\n");
+ gpsd_report(LOG_ERROR, "no DEVICES response received.\n");
(void)gps_close(&gpsdata);
exit(EXIT_FAILURE);
}
if (gpsdata.devices.ndevices == 0) {
- gpsd_report(LOG_ERROR, "no devices connected.\n");
+ gpsd_report(LOG_ERROR, "no devices connected.\n");
(void)gps_close(&gpsdata);
exit(EXIT_FAILURE);
} else if (gpsdata.devices.ndevices > 1 && device == NULL) {
- gpsd_report(LOG_ERROR,
+ gpsd_report(LOG_ERROR,
"multiple devices and no device specified.\n");
(void)gps_close(&gpsdata);
exit(EXIT_FAILURE);
@@ -453,7 +453,7 @@ int main(int argc, char **argv)
exit(EXIT_FAILURE);
devicelist_entry_matches:;
}
- (void)memcpy(&gpsdata.dev,
+ (void)memcpy(&gpsdata.dev,
&gpsdata.devices.list[i],
sizeof(struct devconfig_t));
devcount = gpsdata.devices.ndevices;
@@ -534,7 +534,7 @@ int main(int argc, char **argv)
if (strchr(speed, ':') == NULL)
(void)gps_query(&gpsdata,
DEVICE_SET, (int)timeout,
- "?DEVICE={\"path\":\"%s\",\"bps\":%s}\r\n",
+ "?DEVICE={\"path\":\"%s\",\"bps\":%s}\r\n",
device, speed);
else {
char *modespec = strchr(speed, ':');
@@ -560,23 +560,23 @@ int main(int argc, char **argv)
if (status == 0)
(void)gps_query(&gpsdata,
DEVICE_SET, (int)timeout,
- "?DEVICE={\"path\":\"%s\",\"bps\":%s,\"parity\":\"%c\",\"stopbits\":%c}\r\n",
+ "?DEVICE={\"path\":\"%s\",\"bps\":%s,\"parity\":\"%c\",\"stopbits\":%c}\r\n",
device, speed, parity, stopbits);
}
if (atoi(speed) != (int)gpsdata.dev.baudrate) {
- gpsd_report(LOG_ERROR, "%s driver won't support %s%c%c\n",
+ gpsd_report(LOG_ERROR, "%s driver won't support %s%c%c\n",
gpsdata.dev.path,
speed, parity, stopbits);
status = 1;
} else
- gpsd_report(LOG_PROG, "%s change to %s%c%c succeeded\n",
+ gpsd_report(LOG_PROG, "%s change to %s%c%c succeeded\n",
gpsdata.dev.path,
speed, parity, stopbits);
}
if (rate != NULL) {
- (void)gps_query(&gpsdata,
+ (void)gps_query(&gpsdata,
DEVICE_SET, (int)timeout,
- "?DEVICE={\"path\":\"%s\",\"cycle\":%s}\n",
+ "?DEVICE={\"path\":\"%s\",\"cycle\":%s}\n",
device, rate);
}
#endif /* RECONFIGURE_ENABLE */
@@ -674,7 +674,7 @@ int main(int argc, char **argv)
gpsd_report(LOG_ERROR, "'%s' doesn't match non-generic type '%s' of selected device.\n", forcetype->type_name, session.device_type->type_name);
}
- /*
+ /*
* If we've identified this as an NMEA device, we have to eat
* packets for a while to see if one of our probes elicits an
* ID response telling us that it's really a SiRF or
@@ -712,14 +712,14 @@ int main(int argc, char **argv)
bool write_enable = context.readonly;
context.readonly = false;
if (session.device_type->mode_switcher == NULL) {
- gpsd_report(LOG_SHOUT,
+ gpsd_report(LOG_SHOUT,
"%s devices have no mode switch.\n",
session.device_type->type_name);
status = 1;
} else {
int target_mode = to_nmea ? MODE_NMEA : MODE_BINARY;
- gpsd_report(LOG_SHOUT,
+ gpsd_report(LOG_SHOUT,
"switching to mode %s.\n",
to_nmea ? "NMEA" : "BINARY");
session.device_type->mode_switcher(&session, target_mode);
@@ -755,17 +755,17 @@ int main(int argc, char **argv)
}
if (status == 0) {
if (session.device_type->speed_switcher == NULL) {
- gpsd_report(LOG_ERROR,
+ gpsd_report(LOG_ERROR,
"%s devices have no speed switch.\n",
session.device_type->type_name);
status = 1;
}
- else if (session.device_type->speed_switcher(&session,
+ else if (session.device_type->speed_switcher(&session,
(speed_t)atoi(speed),
- parity,
+ parity,
stopbits)) {
settle(&session);
- gpsd_report(LOG_PROG, "%s change to %s%c%d succeeded\n",
+ gpsd_report(LOG_PROG, "%s change to %s%c%d succeeded\n",
session.gpsdata.dev.path,
speed, parity, stopbits);
} else {
@@ -780,7 +780,7 @@ int main(int argc, char **argv)
bool write_enable = context.readonly;
context.readonly = false;
if (session.device_type->rate_switcher == NULL) {
- gpsd_report(LOG_ERROR,
+ gpsd_report(LOG_ERROR,
"%s devices have no rate switcher.\n",
session.device_type->type_name);
status = 1;
@@ -802,13 +802,13 @@ int main(int argc, char **argv)
bool write_enable = context.readonly;
context.readonly = false;
if (session.device_type->control_send == NULL) {
- gpsd_report(LOG_ERROR,
+ gpsd_report(LOG_ERROR,
"%s devices have no control sender.\n",
session.device_type->type_name);
status = 1;
} else {
- if (session.device_type->control_send(&session,
- cooked,
+ if (session.device_type->control_send(&session,
+ cooked,
(size_t)cooklen) == -1) {
gpsd_report(LOG_ERROR, "control transmission failed.\n");
status = 1;
diff --git a/gpsd.c b/gpsd.c
index be66e705..2ad6fb8d 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -117,7 +117,7 @@
* (1) If we're running with FIXED_PORT_SPEED we're some sort
* of embedded configuration where we don't want to wait for connect
*
- * (2) Socket export has been disabled. In this case we have no
+ * (2) Socket export has been disabled. In this case we have no
* way to know when client apps are watching the export channels,
* so we need to be running all the time.
*/
@@ -147,7 +147,7 @@ static bool listen_global = false;
#define NOWAIT nowait
static bool nowait = false;
#else /* FORCE_NOWAIT */
-#define NOWAIT true
+#define NOWAIT true
#endif /* FORCE_NOWAIT */
static jmp_buf restartbuf;
static struct gps_context_t context;
@@ -425,7 +425,7 @@ static socket_t passivesock_af(int af, char *service, char *tcp_or_udp, int qlen
sat.sa_in6.sin6_family = (sa_family_t) AF_INET6;
#ifndef FORCE_GLOBAL_ENABLE
if (!listen_global)
- sat.sa_in6.sin6_addr = in6addr_loopback;
+ sat.sa_in6.sin6_addr = in6addr_loopback;
else
#endif /* FORCE_GLOBAL_ENABLE */
sat.sa_in6.sin6_addr = in6addr_any;
@@ -1657,11 +1657,11 @@ static void consume_packets(struct gps_device_t *device)
#ifdef PASSTHROUGH_ENABLE
/* this is for passing through JSON packets */
if ((changed & PASSTHROUGH_IS) != 0) {
- (void)strlcat((char *)device->packet.outbuffer,
+ (void)strlcat((char *)device->packet.outbuffer,
"\r\n",
sizeof(device->packet.outbuffer));
- (void)throttled_write(sub,
- (char *)device->packet.outbuffer,
+ (void)throttled_write(sub,
+ (char *)device->packet.outbuffer,
device->packet.outbuflen+2);
continue;
}
@@ -1726,7 +1726,7 @@ static int handle_gpsd_request(struct subscriber_t *sub, const char *buf)
#endif /* SOCKET_EXPORT_ENABLE */
#ifdef PPS_ENABLE
-static void ship_pps_drift_message(struct gps_device_t *session,
+static void ship_pps_drift_message(struct gps_device_t *session,
struct timeval *tv)
/* on PPS interrupt, ship a drift message to all clients */
{
@@ -1944,10 +1944,10 @@ int main(int argc, char *argv[])
control_socket == NULL
#endif
#if defined(CONTROL_SOCKET_ENABLE) && defined(SYSTEMD_ENABLE)
- &&
+ &&
#endif
#ifdef SYSTEMD_ENABLE
- sd_socket_count <= 0
+ sd_socket_count <= 0
#endif
&& optind >= argc) {
gpsd_report(LOG_ERROR,
@@ -2156,7 +2156,7 @@ int main(int argc, char *argv[])
sa.sa_flags = 0;
#ifdef __COVERITY__
- /*
+ /*
* Obsolete and unused. We're only doing this to pacify Coverity
* which otherwise throws an UNINIT event here. Don't swap with the
* handler initialization, they're unioned on some architectures.
@@ -2199,7 +2199,7 @@ int main(int argc, char *argv[])
gpsd_time_init(&context, time(NULL));
/*
- * If we got here via SIGINT, reopen any command-line devices. PPS
+ * If we got here via SIGINT, reopen any command-line devices. PPS
* through these won't work, as we've dropped privileges and can
* no longer change line disciplines.
*/
diff --git a/gpsd_json.c b/gpsd_json.c
index 5a322024..6076d4b0 100644
--- a/gpsd_json.c
+++ b/gpsd_json.c
@@ -120,7 +120,7 @@ void json_version_dump( /*@out@*/ char *reply, size_t replylen)
#endif /* TIMING_ENABLE */
-void json_tpv_dump(const struct gps_device_t *session,
+void json_tpv_dump(const struct gps_device_t *session,
const struct policy_t *policy CONDITIONALLY_UNUSED,
/*@out@*/ char *reply, size_t replylen)
{
@@ -146,7 +146,7 @@ void json_tpv_dump(const struct gps_device_t *session,
if (isnan(gpsdata->fix.time) == 0)
(void)snprintf(reply + strlen(reply),
replylen - strlen(reply),
- "\"time\":\"%s\",",
+ "\"time\":\"%s\",",
unix_to_iso8601(gpsdata->fix.time, tbuf, sizeof(tbuf)));
if (isnan(gpsdata->fix.ept) == 0)
(void)snprintf(reply + strlen(reply),
@@ -216,7 +216,7 @@ void json_tpv_dump(const struct gps_device_t *session,
(void)snprintf(reply + strlen(reply),
replylen - strlen(reply),
"\"sor\":%f,\"chars\":%lu,\"sats\":%2d,\"rtime\":%f,\"week\":%u,\"tow\":%.3f,\"rollovers\":%d",
- session->sor,
+ session->sor,
session->chars,
gpsdata->satellites_used,
rtime,
@@ -290,7 +290,7 @@ void json_sky_dump(const struct gps_data_t *datap,
if (isnan(datap->skyview_time) == 0)
(void)snprintf(reply + strlen(reply),
replylen - strlen(reply),
- "\"time\":\"%s\",",
+ "\"time\":\"%s\",",
unix_to_iso8601(datap->skyview_time, tbuf, sizeof(tbuf)));
if (isnan(datap->dop.xdop) == 0)
(void)snprintf(reply + strlen(reply),
@@ -391,7 +391,7 @@ void json_device_dump(const struct gps_device_t *device,
}
/*@+mustfreefresh@*/
/*
- * There's an assumption here: Anything that we type service_sensor is
+ * There's an assumption here: Anything that we type service_sensor is
* a serial device with the usual control parameters.
*/
if (device->servicetype == service_sensor) {
@@ -688,20 +688,20 @@ void json_subframe_dump(const struct gps_data_t *datap,
{
int i;
(void)snprintf(buf + len, buflen - len,
- ",\"HEALTH\":{\"data_id\":%d,",
+ ",\"HEALTH\":{\"data_id\":%d,",
(int)subframe->data_id);
/* 1-index loop to construct json, rather than giant snprintf */
for(i = 1 ; i <= 32; i++){
len = strlen(buf);
(void)snprintf(buf + len, buflen - len,
- "\"SV%d\":%d,",
+ "\"SV%d\":%d,",
i, (int)subframe->sub4_25.svf[i]);
}
for(i = 0 ; i < 8; i++){ /* 0-index */
len = strlen(buf);
(void)snprintf(buf + len, buflen - len,
- "\"SVH%d\":%d,",
+ "\"SVH%d\":%d,",
i+25, (int)subframe->sub4_25.svhx[i]);
}
len = strlen(buf)-1;
@@ -743,8 +743,8 @@ void json_subframe_dump(const struct gps_data_t *datap,
}
#if defined(RTCM104V2_ENABLE)
-void json_rtcm2_dump(const struct rtcm2_t *rtcm,
- /*@null@*/const char *device,
+void json_rtcm2_dump(const struct rtcm2_t *rtcm,
+ /*@null@*/const char *device,
/*@out@*/char buf[], size_t buflen)
/* dump the contents of a parsed RTCM104 message as JSON */
{
@@ -777,7 +777,7 @@ void json_rtcm2_dump(const struct rtcm2_t *rtcm,
(void)snprintf(buf + strlen(buf), buflen - strlen(buf),
"{\"ident\":%u,\"udre\":%u,\"iod\":%u,\"prc\":%0.3f,\"rrc\":%0.3f},",
rsp->ident,
- rsp->udre, rsp->iod,
+ rsp->udre, rsp->iod,
rsp->prc, rsp->rrc);
}
if (buf[strlen(buf) - 1] == ',')
@@ -849,7 +849,7 @@ void json_rtcm2_dump(const struct rtcm2_t *rtcm,
(void)snprintf(buf + strlen(buf), buflen - strlen(buf),
"\"status\":%s,\"rangeflag\":%s,"
"\"lat\":%.2f,\"lon\":%.2f,\"range\":%u,",
- JSON_BOOL(rtcm->xmitter.status),
+ JSON_BOOL(rtcm->xmitter.status),
JSON_BOOL(rtcm->xmitter.rangeflag),
rtcm->xmitter.lat,
rtcm->xmitter.lon,
@@ -859,7 +859,7 @@ void json_rtcm2_dump(const struct rtcm2_t *rtcm,
case 14:
(void)snprintf(buf + strlen(buf), buflen - strlen(buf),
"\"week\":%u,\"hour\":%u,\"leapsecs\":%u,",
- rtcm->gpstime.week,
+ rtcm->gpstime.week,
rtcm->gpstime.hour,
rtcm->gpstime.leapsecs);
break;
@@ -880,7 +880,7 @@ void json_rtcm2_dump(const struct rtcm2_t *rtcm,
rsp->ident,
rsp->udre,
JSON_BOOL(rsp->change),
- rsp->tod,
+ rsp->tod,
rsp->prc, rsp->rrc);
}
if (buf[strlen(buf) - 1] == ',')
@@ -907,8 +907,8 @@ void json_rtcm2_dump(const struct rtcm2_t *rtcm,
#endif /* defined(RTCM104V2_ENABLE) */
#if defined(RTCM104V3_ENABLE)
-void json_rtcm3_dump(const struct rtcm3_t *rtcm,
- /*@null@*/const char *device,
+void json_rtcm3_dump(const struct rtcm3_t *rtcm,
+ /*@null@*/const char *device,
/*@out@*/char buf[], size_t buflen)
/* dump the contents of a parsed RTCM104v3 message as JSON */
{
@@ -1149,7 +1149,7 @@ void json_rtcm3_dump(const struct rtcm3_t *rtcm,
R1009.L1.pseudorange,
R1009.L1.rangediff,
INT(R1009.L1.locktime));
-#undef R1009
+#undef R1009
}
if (buf[strlen(buf) - 1] == ',')
buf[strlen(buf) - 1] = '\0';
@@ -1180,7 +1180,7 @@ void json_rtcm3_dump(const struct rtcm3_t *rtcm,
INT(R1010.L1.locktime),
INT(R1010.L1.ambiguity),
R1010.L1.CNR);
-#undef R1010
+#undef R1010
}
if (buf[strlen(buf) - 1] == ',')
buf[strlen(buf) - 1] = '\0';
@@ -1207,11 +1207,11 @@ void json_rtcm3_dump(const struct rtcm3_t *rtcm,
"\"delta\":%6.4f,\"lockt\":%u}"
"}",
R1011.ident,R1011.L1.channel,
- CODE(R1011.L1.indicator),
+ CODE(R1011.L1.indicator),
R1011.L1.pseudorange,
R1011.L1.rangediff,
INT(R1011.L1.locktime),
- CODE(R1011.L2.indicator),
+ CODE(R1011.L2.indicator),
R1011.L2.pseudorange,
R1011.L2.rangediff,
INT(R1011.L2.locktime));
@@ -1362,7 +1362,7 @@ void json_rtcm3_dump(const struct rtcm3_t *rtcm,
#endif /* defined(RTCM104V3_ENABLE) */
#if defined(AIVDM_ENABLE)
-void json_aivdm_dump(const struct ais_t *ais,
+void json_aivdm_dump(const struct ais_t *ais,
/*@null@*/const char *device, bool scaled,
/*@out@*/char *buf, size_t buflen)
{
@@ -1729,8 +1729,8 @@ void json_aivdm_dump(const struct ais_t *ais,
case 11: /* UTC/Date Response */
/* some fields have beem merged to an ISO8601 date */
if (scaled) {
- // The use of %u instead of %04u for the year is to allow
- // out-of-band year values.
+ // The use of %u instead of %04u for the year is to allow
+ // out-of-band year values.
(void)snprintf(buf + strlen(buf), buflen - strlen(buf),
"\"timestamp\":\"%04u-%02u-%02uT%02u:%02u:%02uZ\","
"\"accuracy\":%s,\"lon\":%.4f,\"lat\":%.4f,"
@@ -3193,7 +3193,7 @@ void json_data_report(const gps_mask_t changed,
{
const struct gps_data_t *datap = &session->gpsdata;
buf[0] = '\0';
-
+
if ((changed & REPORT_IS) != 0) {
json_tpv_dump(session, policy, buf+strlen(buf), buflen-strlen(buf));
}
diff --git a/gpsdclient.c b/gpsdclient.c
index 561e8bd6..3bca35d5 100644
--- a/gpsdclient.c
+++ b/gpsdclient.c
@@ -75,19 +75,19 @@ static struct exportmethod_t exportmethods[] = {
return str;
}
-/*
+/*
* check the environment to determine proper GPS units
*
- * clients should only call this if no user preference is specified on
+ * clients should only call this if no user preference is specified on
* the command line or via X resources.
*
* return imperial - Use miles/feet
* nautical - Use knots/feet
* metric - Use km/meters
* unspecified - use compiled default
- *
+ *
* In order check these environment vars:
- * GPSD_UNITS one of:
+ * GPSD_UNITS one of:
* imperial = miles/feet
* nautical = knots/feet
* metric = km/meters
@@ -194,14 +194,14 @@ char *maidenhead(double n, double e)
* http://en.wikipedia.org/wiki/Maidenhead_Locator_System
*
* There's a fair amount of slop in how Maidenhead converters operate
- * that can make it look like this one is wrong.
+ * that can make it look like this one is wrong.
*
* 1. Many return caps for paces 5 and 6 when according to the spwec
* they should return smalls.
*
* 2. Some converters, including QGrid from which this code was originally
* derived, add an 0.5 offset to the divided e and n just before it
- * is cast to integer and used for places 5 and 6. This appears to be
+ * is cast to integer and used for places 5 and 6. This appears to be
* intended as a round-to-nearest hack (as opposed to the implicit
* round down from the cast). If I'm reading the spec right it
* is not correct to do this.
@@ -227,7 +227,7 @@ char *maidenhead(double n, double e)
n*=24; // convert to 24 division
buf[5]=(char)(int)(n)+'a';
buf[6] = '\0';
-
+
return buf;
}
diff --git a/gpsdclient.h b/gpsdclient.h
index a3169586..2363f5a5 100644
--- a/gpsdclient.h
+++ b/gpsdclient.h
@@ -17,7 +17,7 @@ struct exportmethod_t
const char *description;
};
-struct fixsource_t
+struct fixsource_t
/* describe a data source */
{
char *spec; /* pointer to actual storage */
@@ -36,7 +36,7 @@ float true2magnetic(double, double, double);
extern /*@observer@*/ char *deg_to_str( enum deg_str_type type, double f);
-extern void gpsd_source_spec(/*@null@*/const char *fromstring,
+extern void gpsd_source_spec(/*@null@*/const char *fromstring,
/*@out@*/struct fixsource_t *source);
char *maidenhead(double n,double e);
diff --git a/gpsdctl.c b/gpsdctl.c
index 48c26097..7958c38c 100644
--- a/gpsdctl.c
+++ b/gpsdctl.c
@@ -21,7 +21,7 @@
#include "gpsd.h"
-static char *control_socket = DEFAULT_GPSD_SOCKET;
+static char *control_socket = DEFAULT_GPSD_SOCKET;
static char *gpsd_options = "";
static int gpsd_control(char *action, char *argument)
diff --git a/gpsdecode.c b/gpsdecode.c
index 26649f97..c3673114 100644
--- a/gpsdecode.c
+++ b/gpsdecode.c
@@ -532,8 +532,8 @@ static void decode(FILE *fpin, FILE*fpout)
gpsd_clear(&session);
session.gpsdata.gps_fd = fileno(fpin);
session.gpsdata.dev.baudrate = 38400; /* hack to enable subframes */
- (void)strlcpy(session.gpsdata.dev.path,
- "stdin",
+ (void)strlcpy(session.gpsdata.dev.path,
+ "stdin",
sizeof(session.gpsdata.dev.path));
for (;;)
@@ -554,11 +554,11 @@ static void decode(FILE *fpin, FILE*fpout)
if ((changed & PASSTHROUGH_IS) != 0) {
(void)fputs((char *)session.packet.outbuffer, fpout);
(void)fputs("\n", fpout);
- }
+ }
#ifdef SOCKET_EXPORT_ENABLE
else {
- json_data_report(changed,
- &session, &policy,
+ json_data_report(changed,
+ &session, &policy,
buf, sizeof(buf));
(void)fputs(buf, fpout);
}
@@ -585,8 +585,8 @@ static void encode(FILE *fpin, FILE *fpout)
memset(&policy, '\0', sizeof(policy));
memset(&session, '\0', sizeof(session));
- (void)strlcpy(session.gpsdata.dev.path,
- "stdin",
+ (void)strlcpy(session.gpsdata.dev.path,
+ "stdin",
sizeof(session.gpsdata.dev.path));
policy.json = true;
/* Parsing is always made in unscaled mode,
@@ -606,10 +606,10 @@ static void encode(FILE *fpin, FILE *fpout)
status, json_error_string(status), lineno);
exit(EXIT_FAILURE);
}
- json_data_report(session.gpsdata.set,
- &session, &policy,
+ json_data_report(session.gpsdata.set,
+ &session, &policy,
inbuf, sizeof(inbuf));
- (void)fputs(inbuf, fpout);
+ (void)fputs(inbuf, fpout);
}
}
/*@ +compdestroy +compdef +usedef @*/
@@ -658,7 +658,7 @@ int main(int argc, char **argv)
case 'v':
verbose = 1;
break;
-
+
case 'D':
verbose = atoi(optarg);
#if defined(CLIENTDEBUG_ENABLE) && defined(SOCKET_EXPORT_ENABLE)
diff --git a/gpsmon.c b/gpsmon.c
index 17af11eb..3886deb0 100644
--- a/gpsmon.c
+++ b/gpsmon.c
@@ -150,7 +150,7 @@ static void visibilize(/*@out@*/char *buf2, size_t len, const char *buf)
buf2[0] = '\0';
for (sp = buf; *sp != '\0' && strlen(buf2)+4 < len; sp++)
- if (isprint(*sp) || (sp[0] == '\n' && sp[1] == '\0')
+ if (isprint(*sp) || (sp[0] == '\n' && sp[1] == '\0')
|| (sp[0] == '\r' && sp[2] == '\0'))
(void)snprintf(buf2 + strlen(buf2), 2, "%c", *sp);
else
@@ -521,11 +521,11 @@ int main(int argc, char **argv)
matches++;
}
}
- if (matches > 1) {
+ if (matches > 1) {
(void)fprintf(stderr, "-T option matched more than one driver.\n");
exit(EXIT_FAILURE);
}
- else if (matches == 0) {
+ else if (matches == 0) {
(void)fprintf(stderr, "-T option didn't match any driver.\n");
exit(EXIT_FAILURE);
}
@@ -687,7 +687,7 @@ int main(int argc, char **argv)
(void)wprintw(cmdwin, type_name);
(void)wprintw(cmdwin, "> ");
(void)wclrtoeol(cmdwin);
- if (active != NULL
+ if (active != NULL
&& len > 0 && session.packet.outbuflen > 0
&& (*active)->update != NULL)
(*active)->update();
diff --git a/gpspacket.c b/gpspacket.c
index ab0038d8..172b41c3 100644
--- a/gpspacket.c
+++ b/gpspacket.c
@@ -21,8 +21,8 @@ void gpsd_report(int errlevel, const char *fmt, ... )
va_list ap;
if (!report_callback) /* no callback defined, exit early */
- return;
-
+ return;
+
if (!PyCallable_Check(report_callback)) {
PyErr_SetString(ErrorObject, "Cannot call Python callback function");
return;
@@ -83,8 +83,8 @@ Lexer_get(LexerObject *self, PyObject *args)
return Py_BuildValue("(i, i, s#, i)",
len,
- self->lexer.type,
- self->lexer.outbuffer,
+ self->lexer.type,
+ self->lexer.outbuffer,
self->lexer.outbuflen,
self->lexer.char_counter);
}
diff --git a/gpspipe.c b/gpspipe.c
index 4fdb0bf2..67103910 100644
--- a/gpspipe.c
+++ b/gpspipe.c
@@ -58,7 +58,7 @@ static int debug;
static void open_serial(char *device)
/* open the serial port and set it up */
{
- /*
+ /*
* Open modem device for reading and writing and not as controlling
* tty.
*/
@@ -93,9 +93,9 @@ static void usage(void)
{
(void)fprintf(stderr,
"Usage: gpspipe [OPTIONS] [server[:port[:device]]]\n\n"
- "-d Run as a daemon.\n"
+ "-d Run as a daemon.\n"
"-o [file] Write output to file.\n"
- "-h Show this help.\n"
+ "-h Show this help.\n"
"-r Dump raw NMEA.\n"
"-R Dump super-raw mode (GPS binary).\n"
"-w Dump gpsd native data.\n"
@@ -151,7 +151,7 @@ int main(int argc, char **argv)
break;
case 'r':
raw = true;
- /*
+ /*
* Yes, -r invokes NMEA mode rather than proper raw mode.
* This emulates the behavior under the old protocol.
*/
diff --git a/gpsutils.c b/gpsutils.c
index 3b4990a4..76017e82 100644
--- a/gpsutils.c
+++ b/gpsutils.c
@@ -124,7 +124,7 @@ double safe_atof(const char *string)
* If the mantissa has more than 18 digits, ignore the extras, since
* they can't affect the value anyway.
*/
-
+
pExp = p;
p -= mantSize;
if (decPt < 0) {
@@ -202,7 +202,7 @@ double safe_atof(const char *string)
* many powers of 2 of 10. Then combine the exponent with the
* fraction.
*/
-
+
if (exp < 0) {
expSign = true;
exp = -exp;
diff --git a/gpxlogger.c b/gpxlogger.c
index e9140ded..a14427a7 100644
--- a/gpxlogger.c
+++ b/gpxlogger.c
@@ -131,14 +131,14 @@ static void conditionally_log_fix(struct gps_data_t *gpsdata)
if ((int_time == old_int_time) || gpsdata->fix.mode < MODE_2D)
return;
- /* may not be worth logging if we've moved only a very short distance */
+ /* may not be worth logging if we've moved only a very short distance */
if (minmove>0 && !first && earth_distance(
gpsdata->fix.latitude,
gpsdata->fix.longitude,
old_lat, old_lon) < minmove)
return;
- /*
+ /*
* Make new track if the jump in time is above
* timeout. Handle jumps both forward and
* backwards in time. The clock sometimes jumps
diff --git a/isgps.c b/isgps.c
index 9d465479..67fb28f8 100644
--- a/isgps.c
+++ b/isgps.c
@@ -2,7 +2,7 @@
This is a decoder for the unnamed protocol described in IS-GPS-200,
the Navstar GPS Interface Specification, and used as a transport layer
-for both GPS satellite downlink transmissions and the RTCM104 version 2
+for both GPS satellite downlink transmissions and the RTCM104 version 2
format for broadcasting differential-GPS corrections.
The purpose of this protocol is to support analyzing a serial bit
@@ -22,12 +22,12 @@ Here are Wolfgang's original rather cryptic notes on this code:
1) trim and bitflip the input.
While syncing the msb of the input gets shifted into lsb of the
-assembled word.
- word <<= 1, or in input >> 5
+assembled word.
+ word <<= 1, or in input >> 5
word <<= 1, or in input >> 4
word <<= 1, or in input >> 3
- word <<= 1, or in input >> 2
- word <<= 1, or in input >> 1
+ word <<= 1, or in input >> 2
+ word <<= 1, or in input >> 1
word <<= 1, or in input
At one point it should sync-lock.
@@ -36,7 +36,7 @@ At one point it should sync-lock.
Shift 6 bytes of RTCM data in as such:
----> (trim-bits-to-5-bits) ---> (end-for-end-bit-flip) --->
+---> (trim-bits-to-5-bits) ---> (end-for-end-bit-flip) --->
---> shift-into-30-bit-shift-register
|||||||||||||||||||||||
@@ -48,8 +48,8 @@ Shift 6 bytes of RTCM data in as such:
The code was originally by Wolfgang Rupprecht. ESR severely hacked
it, with Wolfgang's help, in order to separate message analysis from
-message dumping and separate this lower layer from the upper layer
-handing GPS-subframe and RTCM decoding.
+message dumping and separate this lower layer from the upper layer
+handing GPS-subframe and RTCM decoding.
You are not expected to understand any of this.
@@ -144,13 +144,13 @@ unsigned int isgps_parity(isgps30bits_t th)
return (p);
}
-/*
+/*
* ESR found a doozy of a bug...
*
* Defining isgps_parityok as a function triggers an optimizer bug in gcc
* 3.4.2. The symptom is that parity computation is screwed up and the decoder
- * never achieves sync lock. Something steps on the argument to
- * isgpsparity(); the lossage appears to be related to the compiler's
+ * never achieves sync lock. Something steps on the argument to
+ * isgpsparity(); the lossage appears to be related to the compiler's
* attempt to fold the isgps_parity() call into isgps_parityok() in some
* tail-recursion-like manner. This happens under -O2, but not -O1, on
* both i386 and amd64. Disabling all of the individual -O2 suboptions
@@ -255,7 +255,7 @@ enum isgpsstat_t isgps_decode(struct gps_packet_t *session,
{
/*
* Guard against a buffer overflow attack. Just wait for
- * the next preamble match and go on from there.
+ * the next preamble match and go on from there.
*/
if (session->isgps.bufindex >= (unsigned)maxlen) {
session->isgps.bufindex = 0;
diff --git a/json.c b/json.c
index 46bf55fd..354e74ea 100644
--- a/json.c
+++ b/json.c
@@ -20,7 +20,7 @@ advance what the type of each attribute value will be and where the
parsed value will be stored. The template structures may supply
default values to be used when an expected attribute is omitted.
- The preceding paragraph told one fib. A single attribute may
+ The preceding paragraph told one fib. A single attribute may
actually have a span of multiple specifications with different
syntactically distinguishable types (e.g. string vs. real vs. integer
vs boolean, but not signed integer vs. unsigned integer or strong vs. map).
@@ -40,7 +40,7 @@ stored as doubles.
defending on whether the array subtype is declared as object or
structobject.
- Object arrays take one base address per object subfield, and are
+ Object arrays take one base address per object subfield, and are
mapped into parallel C arrays (one per subfield). Strings are not
supported in this kind of array, as they don't have a "natural" size
to use as an offset multiplier.
@@ -411,7 +411,7 @@ static int json_internal_read_object(const char *cp,
}
if (value_quoted
&& (cursor->type != t_string && cursor->type != t_character
- && cursor->type != t_check && cursor->type != t_time
+ && cursor->type != t_check && cursor->type != t_time
&& cursor->map == 0)) {
json_debug_trace((1,
"Saw quoted value when expecting non-string.\n"));
diff --git a/json.h b/json.h
index b691729c..ea272f75 100644
--- a/json.h
+++ b/json.h
@@ -18,7 +18,7 @@ struct json_enum_t {
int value;
};
-struct json_array_t {
+struct json_array_t {
json_type element_type;
union {
struct {
@@ -58,7 +58,7 @@ struct json_attr_t {
} dflt;
size_t len;
const struct json_enum_t *map;
- bool nodefault;
+ bool nodefault;
};
#define JSON_ATTR_MAX 31 /* max chars in JSON attribute name */
@@ -67,9 +67,9 @@ struct json_attr_t {
#ifdef __cplusplus
extern "C" {
#endif
-int json_read_object(const char *, const struct json_attr_t *,
+int json_read_object(const char *, const struct json_attr_t *,
/*@null@*/const char **);
-int json_read_array(const char *, const struct json_array_t *,
+int json_read_array(const char *, const struct json_array_t *,
/*@null@*/const char **);
const /*@observer@*/char *json_error_string(int);
@@ -103,14 +103,14 @@ void json_enable_debug(int, FILE *);
#define JSON_ERR_NULLPTR 22 /* unexpected null value or attribute pointer */
/*
- * Use the following macros to declare template initializers for structobject
+ * Use the following macros to declare template initializers for structobject
* arrays. Writing the equivalents out by hand is error-prone.
*
- * STRUCTOBJECT takes a structure name s, and a fieldname f in s.
+ * STRUCTOBJECT takes a structure name s, and a fieldname f in s.
*
- * STRUCTARRAY takes the name of a structure array, a pointer to a an
+ * STRUCTARRAY takes the name of a structure array, a pointer to a an
* initializer defining the subobject type, and the address of an integer to
- * store the length in.
+ * store the length in.
*/
#define STRUCTOBJECT(s, f) .addr.offset = offsetof(s, f)
#define STRUCTARRAY(a, e, n) \
diff --git a/lcdgps.c b/lcdgps.c
index fdbd0938..9ba21900 100644
--- a/lcdgps.c
+++ b/lcdgps.c
@@ -251,7 +251,7 @@ static void usage( char *prog)
exit(EXIT_FAILURE);
}
-int main(int argc, char *argv[])
+int main(int argc, char *argv[])
{
int option, rc;
struct sockaddr_in localAddr, servAddr;
diff --git a/libgps.h b/libgps.h
index 729c9d9a..c16b6aac 100644
--- a/libgps.h
+++ b/libgps.h
@@ -6,9 +6,9 @@
#ifndef _GPSD_LIBGPS_H_
#define _GPSD_LIBGPS_H_
-/*
- * first member of each kind of privdata structure must be named
- * 'export_type' and must be of this type. It's how we do runtime
+/*
+ * first member of each kind of privdata structure must be named
+ * 'export_type' and must be of this type. It's how we do runtime
* dispatch to the different transports.
*/
enum export_t {
@@ -16,18 +16,18 @@ enum export_t {
sockets,
#endif /* SOCKET_EXPORT_ENABLE */
#ifdef SHM_EXPORT_ENABLE
- shm,
+ shm,
#endif /* SHM_EXPORT_ENABLE */
#ifdef DBUS_EXPORT_ENABLE
dbus,
#endif /* DBUS_EXPORT_ENABLE */
};
-/* values to poke in the gps_fd member if we get it via something special */
+/* values to poke in the gps_fd member if we get it via something special */
#define SHM_PSEUDO_FD -1
#define DBUS_PSEUDO_FD -2
-extern int gps_sock_open(/*@null@*/const char *, /*@null@*/const char *,
+extern int gps_sock_open(/*@null@*/const char *, /*@null@*/const char *,
/*@out@*/struct gps_data_t *);
extern int gps_sock_close(struct gps_data_t *);
extern int gps_sock_send(struct gps_data_t *, const char *);
diff --git a/libgps_core.c b/libgps_core.c
index 9a4becc7..3f91ee68 100644
--- a/libgps_core.c
+++ b/libgps_core.c
@@ -57,7 +57,7 @@ void libgps_trace(int errlevel, const char *fmt, ...)
#define CONDITIONALLY_UNUSED UNUSED
#endif /* SOCKET_EXPORT_ENABLE */
-int gps_open(/*@null@*/const char *host,
+int gps_open(/*@null@*/const char *host,
/*@null@*/const char *port CONDITIONALLY_UNUSED,
/*@out@*/ struct gps_data_t *gpsdata)
{
@@ -146,7 +146,7 @@ int gps_read(struct gps_data_t *gpsdata)
#endif /* SOCKET_EXPORT_ENABLE */
/*@ +usedef +compdef +uniondef @*/
- libgps_debug_trace((DEBUG_CALLS, "gps_read() -> %d (%s)\n",
+ libgps_debug_trace((DEBUG_CALLS, "gps_read() -> %d (%s)\n",
status, gps_maskdump(gpsdata->set)));
return status;
@@ -172,7 +172,7 @@ int gps_send(struct gps_data_t *gpsdata CONDITIONALLY_UNUSED, const char *fmt CO
return status;
}
-int gps_stream(struct gps_data_t *gpsdata CONDITIONALLY_UNUSED,
+int gps_stream(struct gps_data_t *gpsdata CONDITIONALLY_UNUSED,
unsigned int flags CONDITIONALLY_UNUSED,
/*@null@*/ void *d CONDITIONALLY_UNUSED)
{
@@ -218,7 +218,7 @@ bool gps_waiting(const struct gps_data_t *gpsdata CONDITIONALLY_UNUSED, int time
return waiting;
}
-int gps_mainloop(struct gps_data_t *gpsdata, int timeout,
+int gps_mainloop(struct gps_data_t *gpsdata, int timeout,
void (*hook)(struct gps_data_t *gpsdata))
{
int status = -1;
@@ -240,7 +240,7 @@ int gps_mainloop(struct gps_data_t *gpsdata, int timeout,
#endif /* SOCKET_EXPORT_ENABLE */
/*@ +usedef +compdef +uniondef @*/
- libgps_debug_trace((DEBUG_CALLS, "gps_mainloop() -> %d (%s)\n",
+ libgps_debug_trace((DEBUG_CALLS, "gps_mainloop() -> %d (%s)\n",
status, gps_maskdump(gpsdata->set)));
return status;
@@ -248,7 +248,7 @@ int gps_mainloop(struct gps_data_t *gpsdata, int timeout,
extern const char /*@observer@*/ *gps_errstr(const int err)
{
- /*
+ /*
* We might add our own error codes in the future, e.g for
* protocol compatibility checks
*/
diff --git a/libgps_dbus.c b/libgps_dbus.c
index 02aa689f..b22cac84 100644
--- a/libgps_dbus.c
+++ b/libgps_dbus.c
@@ -27,7 +27,7 @@ struct privdata_t
/*
* Unpleasant that we have to declare a static context pointer here - means
- * you can't have multiple DBUS sessions open (not that this matters
+ * you can't have multiple DBUS sessions open (not that this matters
* much in practice). The problem is the DBUS API lacks some hook
* arguments that it ought to have.
*/
diff --git a/libgps_json.c b/libgps_json.c
index b53d6da4..09141f76 100644
--- a/libgps_json.c
+++ b/libgps_json.c
@@ -435,7 +435,7 @@ int libgps_json_unpack(const char *buf,
}
return status;
} else if (STARTSWITH(classtag, "\"class\":\"VERSION\"")) {
- status = json_version_read(buf, gpsdata, end);
+ status = json_version_read(buf, gpsdata, end);
if (status == 0) {
gpsdata->set &= ~UNION_SET;
gpsdata->set |= VERSION_SET;
diff --git a/libgps_shm.c b/libgps_shm.c
index 8b174904..6bedffe8 100644
--- a/libgps_shm.c
+++ b/libgps_shm.c
@@ -6,7 +6,7 @@ NAME
DESCRIPTION
This is a very lightweight alternative to JSON-over-sockets. Clients
won't be able to filter by device, and won't get device activation/deactivation
-notifications. But both client and daemon will avoid all the marshalling and
+notifications. But both client and daemon will avoid all the marshalling and
unmarshalling overhead.
PERMISSIONS
@@ -48,7 +48,7 @@ int gps_shm_open(/*@out@*/struct gps_data_t *gpsdata)
if (shmid == -1) {
/* daemon isn't running or failed to create shared segment */
return -1;
- }
+ }
gpsdata->privdata = (void *)malloc(sizeof(struct privdata_t));
if (gpsdata->privdata == NULL)
return -1;
@@ -101,7 +101,7 @@ int gps_shm_read(struct gps_data_t *gpsdata)
struct gps_data_t noclobber;
/*
- * Following block of instructions must not be reordered, otherwise
+ * Following block of instructions must not be reordered, otherwise
* havoc will ensue. The barrier() call should prevent reordering
* of the data accesses.
*
@@ -113,17 +113,17 @@ int gps_shm_read(struct gps_data_t *gpsdata)
*/
before = shared->bookend1;
barrier();
- (void)memcpy((void *)&noclobber,
- (void *)&shared->gpsdata,
+ (void)memcpy((void *)&noclobber,
+ (void *)&shared->gpsdata,
sizeof(struct gps_data_t));
barrier();
after = shared->bookend2;
- if (before != after)
+ if (before != after)
return 0;
else {
- (void)memcpy((void *)gpsdata,
- (void *)&noclobber,
+ (void)memcpy((void *)gpsdata,
+ (void *)&noclobber,
sizeof(struct gps_data_t));
/*@i1@*/gpsdata->privdata = private_save;
PRIVATE(gpsdata)->tick = after;
@@ -146,7 +146,7 @@ void gps_shm_close(struct gps_data_t *gpsdata)
(void)shmdt((const void *)PRIVATE(gpsdata)->shmseg);
}
-int gps_shm_mainloop(struct gps_data_t *gpsdata, int timeout UNUSED,
+int gps_shm_mainloop(struct gps_data_t *gpsdata, int timeout UNUSED,
void (*hook)(struct gps_data_t *gpsdata))
/* run a shm main loop with a specified handler */
{
diff --git a/libgps_sock.c b/libgps_sock.c
index ea3a4b39..b8d01034 100644
--- a/libgps_sock.c
+++ b/libgps_sock.c
@@ -178,7 +178,7 @@ int gps_sock_read(/*@out@*/struct gps_data_t *gpsdata)
PRIVATE(gpsdata)->waiting += status;
/* buffer is empty - implies no data was read */
if (PRIVATE(gpsdata)->waiting == 0) {
- /*
+ /*
* If we received 0 bytes, other side of socket is closing.
* Return -1 as end-of-data indication.
*/
@@ -557,7 +557,7 @@ int gps_sock_stream(struct gps_data_t *gpsdata, unsigned int flags,
}
}
-int gps_sock_mainloop(struct gps_data_t *gpsdata, int timeout,
+int gps_sock_mainloop(struct gps_data_t *gpsdata, int timeout,
void (*hook)(struct gps_data_t *gpsdata))
/* run a socket main loop with a specified handler */
{
diff --git a/libgpsd_core.c b/libgpsd_core.c
index 59a910f7..2298d35f 100644
--- a/libgpsd_core.c
+++ b/libgpsd_core.c
@@ -1,7 +1,7 @@
/* libgpsd_core.c -- manage access to sensors
*
* Access to the driver layer goes through the entry points in this file.
- * The idea is to present a session as an abstraction from which you get
+ * The idea is to present a session as an abstraction from which you get
* fixes (and possibly other data updates) by calling gpsd_poll(). The
* rest is setup and teardown.
*
@@ -34,12 +34,12 @@ static void gpsd_run_device_hook(char *device_name, char *hook)
struct stat statbuf;
if (stat(DEVICEHOOKPATH, &statbuf) == -1)
gpsd_report(LOG_PROG, "no %s present, skipped running %s hook\n",
- DEVICEHOOKPATH, hook);
+ DEVICEHOOKPATH, hook);
else {
/*
* We make an exception to the no-malloc rule here because
* the pointer will never persist outside this small scope
- * and can thus never cause a leak or stale-pointer problem.
+ * and can thus never cause a leak or stale-pointer problem.
*/
size_t bufsize = strlen(DEVICEHOOKPATH) + 1 + strlen(device_name) + 1 + strlen(hook) + 1;
char *buf = malloc(bufsize);
@@ -474,9 +474,9 @@ static bool invert(double mat[4][4], /*@out@*/ double inverse[4][4])
double Det2_13_01 = mat[1][0] * mat[3][1] - mat[1][1] * mat[3][0];
//double Det2_13_02 = mat[1][0]*mat[3][2] - mat[1][2]*mat[3][0];
double Det2_13_03 = mat[1][0] * mat[3][3] - mat[1][3] * mat[3][0];
- //double Det2_13_12 = mat[1][1]*mat[3][2] - mat[1][2]*mat[3][1];
+ //double Det2_13_12 = mat[1][1]*mat[3][2] - mat[1][2]*mat[3][1];
double Det2_13_13 = mat[1][1] * mat[3][3] - mat[1][3] * mat[3][1];
- //double Det2_13_23 = mat[1][2]*mat[3][3] - mat[1][3]*mat[3][2];
+ //double Det2_13_23 = mat[1][2]*mat[3][3] - mat[1][3]*mat[3][2];
double Det2_23_01 = mat[2][0] * mat[3][1] - mat[2][1] * mat[3][0];
double Det2_23_02 = mat[2][0] * mat[3][2] - mat[2][2] * mat[3][0];
double Det2_23_03 = mat[2][0] * mat[3][3] - mat[2][3] * mat[3][0];
@@ -858,29 +858,29 @@ gps_mask_t gpsd_poll(struct gps_device_t *session)
*
* Thus, we look for an inter-character delay much larger than an
* average 4800bps sentence time. How should this delay be set? Well,
- * counting framing bits and erring on the side of caution, it's
+ * counting framing bits and erring on the side of caution, it's
* about 480 characters per second or 2083 microeconds per character;
* that's almost exactly 0.125 seconds per average 60-char sentence.
* Doubling this to avoid false positives, we look for an inter-character
* delay of greater than 0.250s.
*
- * The above assumes a cycle time of 1 second. To get the minimum size of
+ * The above assumes a cycle time of 1 second. To get the minimum size of
* the quiet period, we multiply by the device cycle time.
*
- * We can sanity-check these calculation by watching logs. If we have set
+ * We can sanity-check these calculation by watching logs. If we have set
* MINIMUM_QUIET_TIME correctly, the "transmission pause" message below
* will consistently be emitted just before the sentence that shows up
* as start-of-cycle in gpsmon, and never emitted at any other point
* in the cycle.
*
* In practice, it seems that edge detection succeeds at 9600bps but
- * fails at 4800bps. This is not surprising, as previous profiling has
- * indicated that at 4800bps some devices overrun a 1-second cycle time
+ * fails at 4800bps. This is not surprising, as previous profiling has
+ * indicated that at 4800bps some devices overrun a 1-second cycle time
* with the data they transmit.
*/
#define MINIMUM_QUIET_TIME 0.25
if (session->packet.outbuflen == 0)
- {
+ {
/* beginning of a new packet */
timestamp_t now = timestamp();
if (session->device_type != NULL && session->packet.start_time > 0) {
diff --git a/libgpsmm.cpp b/libgpsmm.cpp
index 8df9af98..d335ad43 100644
--- a/libgpsmm.cpp
+++ b/libgpsmm.cpp
@@ -11,7 +11,7 @@
#include "libgpsmm.h"
#include "gpsd_config.h"
-struct gps_data_t* gpsmm::gps_inner_open(const char *host, const char *port)
+struct gps_data_t* gpsmm::gps_inner_open(const char *host, const char *port)
{
const bool err = (gps_open(host, port, gps_state()) != 0);
if ( err ) {
@@ -24,7 +24,7 @@ struct gps_data_t* gpsmm::gps_inner_open(const char *host, const char *port)
}
}
-struct gps_data_t* gpsmm::stream(int flags)
+struct gps_data_t* gpsmm::stream(int flags)
{
if (to_user == NULL)
return NULL;
@@ -36,7 +36,7 @@ struct gps_data_t* gpsmm::stream(int flags)
}
}
-struct gps_data_t* gpsmm::send(const char *request)
+struct gps_data_t* gpsmm::send(const char *request)
{
if (gps_send(gps_state(),request)==-1) {
return NULL;
diff --git a/libgpsmm.h b/libgpsmm.h
index 2e89f7bb..2b87b898 100644
--- a/libgpsmm.h
+++ b/libgpsmm.h
@@ -32,7 +32,7 @@ class LIBQGPSMMSHARED_EXPORT gpsmm {
}
#ifdef __UNUSED__
// cppcheck-suppress uninitVar
- gpsmm(void) : to_user(0)
+ gpsmm(void) : to_user(0)
{
gps_inner_open("localhost", DEFAULT_GPSD_PORT);
}
diff --git a/monitor_proto.c b/monitor_proto.c
index 7cd545bc..05a7cc9c 100644
--- a/monitor_proto.c
+++ b/monitor_proto.c
@@ -1,5 +1,5 @@
/*
- * Prototype file for a gpsmon monitor object.
+ * Prototype file for a gpsmon monitor object.
*
* This file is Copyright (c) 2010 by the GPSD project
* BSD terms apply: see the file COPYING in the distribution root for details.
@@ -61,7 +61,7 @@ static bool PROTO_initialize(void)
static void PROTO_update(void)
{
/*
- * Called on each packet received. The packet will be accessible in
+ * Called on each packet received. The packet will be accessible in
* session.packet.outbuffer and the length in session.packet.outbuflen.
* If the device is NMEA, session.driver.nmea.fields[] will contain the
* array of unconverted field strings, including the tag in slot zero
@@ -78,12 +78,12 @@ static int PROTO_command(char line[])
/*
* Interpret a command line. Whatever characters the user types will
* be echoed in the command buffer at the top right of the display. When
- * he/she presses enter the command line will be passed to this function
+ * he/she presses enter the command line will be passed to this function
* for interpretation. Note: packet receipt is suspended while this
* function is executing.
*
* This method is optional. If you set the command method pointer to
- * NULL, gpsmon will behave sanely, accepting no device-specific commands.
+ * NULL, gpsmon will behave sanely, accepting no device-specific commands.
*
* It is a useful convention to use uppercase letters for
* driver-specific commands and leave lowercase ones for the
@@ -91,7 +91,7 @@ static int PROTO_command(char line[])
*/
assert(strlen(line));
- /*
+ /*
* Return COMMAND_UNKNOWN to tell gpsmon you can't interpret the line, and
* it will be passed to the generic command interpreter to be handled there.
* You can alse return COMMAND_MATCH to tell it you handled the command,
@@ -103,7 +103,7 @@ static int PROTO_command(char line[])
static void PROTO_wrap(void)
{
- /*
+ /*
* Deinitialize any windows you created in PROTO_initialize.
* This will be called when gpsmon switches drivers due to seeing
* a new packet type.
@@ -148,7 +148,7 @@ const struct monitor_object_t PROTO_mmt = {
* You get to make sure the message will fit.
*
* void monitor_fixframe(WINDOW *win)
- * Fix the frame of win to the right of the current location by redrawing
+ * Fix the frame of win to the right of the current location by redrawing
* ACS_VLINE there. Useful after doing wclrtoeol() and writing on the
* line.
*
diff --git a/monitor_tnt.c b/monitor_tnt.c
index 01c21f3b..b351d2ca 100644
--- a/monitor_tnt.c
+++ b/monitor_tnt.c
@@ -40,7 +40,7 @@ static bool tnt_initialize(void)
static void tnt_update(void)
{
- /*
+ /*
* We have to do our own field parsing because the way this
* gets called, nmea_parse() is never called on the sentence.
*/
@@ -62,19 +62,19 @@ static int tnt_command(char line[] UNUSED)
/*
* Interpret a command line. Whatever characters the user types will
* be echoed in the command buffer at the top right of the display. When
- * he/she presses enter the command line will be passed to this function
+ * he/she presses enter the command line will be passed to this function
* for interpretation. Note: packet receipt is suspended while this
* function is executing.
*
* This method is optional. If you set the command method pointer to
- * NULL, gpsmon will behave sanely, accepting no device-specific commands.
+ * NULL, gpsmon will behave sanely, accepting no device-specific commands.
*
* It is a useful convention to use uppercase letters for
* driver-specific commands and leave lowercase ones for the
* generic gpsmon ones.
*/
- /*
+ /*
* Return COMMAND_UNKNOWN to tell gpsmon you can't interpret the line, and
* it will be passed to the generic command interpreter to be handled there.
* You can alse return COMMAND_MATCH to tell it you handled the command,
@@ -122,7 +122,7 @@ const struct monitor_object_t tnt_mmt = {
* You get to make sure the message will fit.
*
* void monitor_fixframe(WINDOW *win)
- * Fix the frame of win to the right of the current location by redrawing
+ * Fix the frame of win to the right of the current location by redrawing
* ACS_VLINE there. Useful after doing wclrtoeol() and writing on the
* line.
*
diff --git a/net_ntrip.c b/net_ntrip.c
index d766c6a1..5f1f7e53 100644
--- a/net_ntrip.c
+++ b/net_ntrip.c
@@ -490,24 +490,24 @@ int ntrip_open(struct gps_device_t *device, char *caster)
port = DEFAULT_RTCM_PORT;
}
- (void)strlcpy(device->ntrip.stream.mountpoint,
- stream,
+ (void)strlcpy(device->ntrip.stream.mountpoint,
+ stream,
sizeof(device->ntrip.stream.mountpoint));
if (auth != NULL)
- (void)strlcpy(device->ntrip.stream.credentials,
- auth,
+ (void)strlcpy(device->ntrip.stream.credentials,
+ auth,
sizeof(device->ntrip.stream.credentials));
- /*
+ /*
* Semantically url and port ought to be non-NULL by now,
* but just in case...this code appeases Coverity.
*/
if (url != NULL)
- (void)strlcpy(device->ntrip.stream.url,
- url,
+ (void)strlcpy(device->ntrip.stream.url,
+ url,
sizeof(device->ntrip.stream.url));
if (port != NULL)
- (void)strlcpy(device->ntrip.stream.port,
- port,
+ (void)strlcpy(device->ntrip.stream.port,
+ port,
sizeof(device->ntrip.stream.port));
ret = ntrip_stream_req_probe(&device->ntrip.stream);
@@ -558,7 +558,7 @@ int ntrip_open(struct gps_device_t *device, char *caster)
}
/*@ +branchstate +nullpass @*/
-void ntrip_report(struct gps_context_t *context,
+void ntrip_report(struct gps_context_t *context,
struct gps_device_t *gps,
struct gps_device_t *caster)
/* may be time to ship a usage report to the Ntrip caster */
diff --git a/netlib.c b/netlib.c
index 3c3aa66d..e09406e2 100644
--- a/netlib.c
+++ b/netlib.c
@@ -159,8 +159,8 @@ socket_t netlib_localsocket(const char *sockfile, int socktype)
memset(&saddr, 0, sizeof(struct sockaddr_un));
saddr.sun_family = AF_UNIX;
- (void)strlcpy(saddr.sun_path,
- sockfile,
+ (void)strlcpy(saddr.sun_path,
+ sockfile,
sizeof(saddr.sun_path));
/*@-unrecog@*/
@@ -175,7 +175,7 @@ socket_t netlib_localsocket(const char *sockfile, int socktype)
}
char *netlib_sock2ip(socket_t fd)
-/* retrieve the IP address corresponding to a socket */
+/* retrieve the IP address corresponding to a socket */
{
sockaddr_t fsin;
socklen_t alen = (socklen_t) sizeof(fsin);
diff --git a/ntpshm.c b/ntpshm.c
index a30c37a0..6077a477 100644
--- a/ntpshm.c
+++ b/ntpshm.c
@@ -1,4 +1,4 @@
-/*
+/*
* ntpshm.c - put time information in SHM segment for xntpd
* struct shmTime and getShmTime from file in the xntp distribution:
* sht.c - Testprogram for shared memory refclock
@@ -40,11 +40,11 @@
struct shmTime
{
int mode; /* 0 - if valid set
- * use values,
+ * use values,
* clear valid
- * 1 - if valid set
+ * 1 - if valid set
* if count before and after read of values is equal,
- * use values
+ * use values
* clear valid
*/
int count;
@@ -70,8 +70,8 @@ struct shmTime
*
* Segments 2 and 3: permissions 0666, i.e. other programs can read
* and write as any user. I.e.: if ntpd has been
- * configured to use these segments, any
- * unpriviliged user is allowed to provide data
+ * configured to use these segments, any
+ * unpriviliged user is allowed to provide data
* for synchronisation.
*
* As gpsd can be started as both root and non-root, this behaviour is
@@ -129,7 +129,7 @@ static /*@null@*/ volatile struct shmTime *getShmTime(int unit)
perms = 0666;
}
- /*
+ /*
* Note: this call requires root under BSD, and possibly on
* well-secured Linux systems. This is why ntpshm_init() has to be
* called before privilege-dropping.
@@ -141,7 +141,7 @@ static /*@null@*/ volatile struct shmTime *getShmTime(int unit)
(long int)(NTPD_BASE + unit), sizeof(struct shmTime),
(int)perms, strerror(errno));
return NULL;
- }
+ }
p = (struct shmTime *)shmat(shmid, 0, 0);
/*@ -mustfreefresh */
if ((int)(long)p == -1) {
@@ -212,7 +212,7 @@ int ntpshm_put(struct gps_device_t *session, double fixtime, double fudge)
/* put a received fix time into shared memory for NTP */
{
/* shmTime is volatile to try to prevent C compiler from reordering
- * writes, or optimizing some 'dead code'. but CPU cache may still
+ * writes, or optimizing some 'dead code'. but CPU cache may still
*write out of order since we do not use memory barriers, yet */
volatile struct shmTime *shmTime = NULL;
struct timeval tv;
@@ -237,7 +237,7 @@ int ntpshm_put(struct gps_device_t *session, double fixtime, double fudge)
*
* ntpd does this:
*
- * reads valid.
+ * reads valid.
* IFF valid is 1
* reads count
* reads values
@@ -245,7 +245,7 @@ int ntpshm_put(struct gps_device_t *session, double fixtime, double fudge)
* IFF count unchanged
* use values
* clear valid
- *
+ *
*/
shmTime->valid = 0;
shmTime->count++;
@@ -258,7 +258,7 @@ int ntpshm_put(struct gps_device_t *session, double fixtime, double fudge)
shmTime->leap = session->context->leap_notify;
/* setting the precision here does not seem to help anything, too
* hard to calculate properly anyway. Let ntpd figure it out.
- * Any NMEA will be about -1 or -2.
+ * Any NMEA will be about -1 or -2.
* Garmin GPS-18/USB is around -6 or -7.
*/
/* FIXME need a memory barrier here to prevent write reordering by
@@ -288,7 +288,7 @@ int ntpshm_put(struct gps_device_t *session, double fixtime, double fudge)
* 4 20 DTR --> Data Terminal Ready
* 1 8 DCD <-- Data Carrier Detect
* 9 22 RI <-- Ring Indicator
- * 5 7 SG Signal ground
+ * 5 7 SG Signal ground
*/
/*@unused@*//* splint is confused here */
@@ -343,7 +343,7 @@ static int ntpshm_pps(struct gps_device_t *session, struct timeval *tv)
*
* ntpd does this:
*
- * reads valid.
+ * reads valid.
* IFF valid is 1
* reads count
* reads values
@@ -351,7 +351,7 @@ static int ntpshm_pps(struct gps_device_t *session, struct timeval *tv)
* IFF count unchanged
* use values
* clear valid
- *
+ *
*/
shmTimeP->valid = 0;
shmTimeP->count++;
@@ -366,7 +366,7 @@ static int ntpshm_pps(struct gps_device_t *session, struct timeval *tv)
shmTimeP->count++;
shmTimeP->valid = 1;
- /* this is more an offset jitter/dispersion than precision,
+ /* this is more an offset jitter/dispersion than precision,
* but still useful for debug */
precision = offset != 0 ? (int)(ceil(log(offset) / M_LN2)) : -20;
gpsd_report(LOG_RAW, "PPS ntpshm_pps %lu.%03lu @ %lu.%06lu, preci %d\n",
@@ -377,8 +377,8 @@ static int ntpshm_pps(struct gps_device_t *session, struct timeval *tv)
}
/*
- * Warning: This is a potential portability problem.
- * It's needed so that TIOCMIWAIT will be defined and the serial-PPS
+ * Warning: This is a potential portability problem.
+ * It's needed so that TIOCMIWAIT will be defined and the serial-PPS
* code will work, but it's not a SuS/POSIX standard header. We're
* going to include it unconditionally here because we expect both
* Linux and BSD to have it and we want compilation to break with
@@ -464,7 +464,7 @@ static int init_kernel_pps(struct gps_device_t *session) {
* (/sys/class/pps/pps?/path is just a link to that)
* to find the /dev/pps? that matches our serial port.
* this code fails if there are more then 10 pps devices.
- *
+ *
* yes, this could be done with libsysfs, but trying to keep the
* number of required libs small */
memset( (void *)&globbuf, 0, sizeof(globbuf));
@@ -507,7 +507,7 @@ static int init_kernel_pps(struct gps_device_t *session) {
, path, strerror(errno));
return -1;
}
- /* root privs are not required past this point */
+ /* root privs are not required past this point */
if ( 0 > time_pps_create(ret, &session->kernelpps_handle )) {
gpsd_report(LOG_INF, "KPPS time_pps_create(%d) failed: %s\n"
@@ -528,7 +528,7 @@ static int init_kernel_pps(struct gps_device_t *session) {
pp.mode = PPS_CAPTUREBOTH;
if ( 0 > time_pps_setparams(session->kernelpps_handle, &pp)) {
- gpsd_report(LOG_ERROR,
+ gpsd_report(LOG_ERROR,
"KPPS time_pps_setparams() failed: %s\n", strerror(errno));
time_pps_destroy(session->kernelpps_handle);
return -1;
@@ -589,7 +589,7 @@ static /*@null@*/ void *gpsd_ppsmonitor(void *arg)
}
if ( 0 == getuid() ) {
- /* this case will fire on command-line devices;
+ /* this case will fire on command-line devices;
* they're opened before priv-dropping. Matters because
* only root can use /var/run.
*/
@@ -624,8 +624,8 @@ static /*@null@*/ void *gpsd_ppsmonitor(void *arg)
/* root privileges are not required after this point */
- /*
- * Wait for status change on any handshake line. The only assumption here
+ /*
+ * Wait for status change on any handshake line. The only assumption here
* is that no GPS lights up more than one of these pins. By waiting on
* all of them we remove a configuration switch.
*/
@@ -645,7 +645,7 @@ static /*@null@*/ void *gpsd_ppsmonitor(void *arg)
/*@-noeffect@*/
#ifdef HAVE_CLOCK_GETTIME
- /* using clock_gettime() here, that is nSec,
+ /* using clock_gettime() here, that is nSec,
* not uSec like gettimeofday */
if ( 0 > clock_gettime(CLOCK_REALTIME, &ts) ) {
/* uh, oh, can not get time! */
@@ -666,7 +666,7 @@ static /*@null@*/ void *gpsd_ppsmonitor(void *arg)
#if defined(HAVE_SYS_TIMEPPS_H)
if ( 0 <= session->kernelpps_handle ) {
struct timespec kernelpps_tv;
- /* on a quad core 2.4GHz Xeon this removes about 20uS of
+ /* on a quad core 2.4GHz Xeon this removes about 20uS of
* latency, and about +/-5uS of jitter over the other method */
memset( (void *)&kernelpps_tv, 0, sizeof(kernelpps_tv));
if ( 0 > time_pps_fetch(session->kernelpps_handle, PPS_TSFMT_TSPEC
@@ -693,7 +693,7 @@ static /*@null@*/ void *gpsd_ppsmonitor(void *arg)
pi.assert_timestamp.tv_nsec,
pi.assert_sequence,
pi.clear_timestamp.tv_sec,
- pi.clear_timestamp.tv_nsec,
+ pi.clear_timestamp.tv_nsec,
pi.clear_sequence);
gpsd_report(LOG_PROG, "KPPS data: using %s\n",
kpps_edge ? "assert" : "clear");
@@ -706,10 +706,10 @@ static /*@null@*/ void *gpsd_ppsmonitor(void *arg)
duration_kpps = 0;
}
#undef timediff_kpps
- gpsd_report(LOG_INF,
+ gpsd_report(LOG_INF,
"KPPS cycle: %7d, duration: %7d @ %lu.%09lu\n",
cycle_kpps, duration_kpps,
- (unsigned long)tv_kpps.tv_sec,
+ (unsigned long)tv_kpps.tv_sec,
(unsigned long)tv_kpps.tv_nsec);
pulse_kpps[kpps_edge] = tv_kpps;
ok = true;
@@ -875,7 +875,7 @@ static /*@null@*/ void *gpsd_ppsmonitor(void *arg)
#endif
{
sample.tv = tv; /* structure copy */
- }
+ }
/* FIXME!! this is wrong if signal is 5Hz or 10Hz instead of PPS */
/* careful, Unix time to nSec is more precision than a double */
sample.offset = 1 + session->last_fixtime - ts.tv_sec;
@@ -903,7 +903,7 @@ static /*@null@*/ void *gpsd_ppsmonitor(void *arg)
} else {
log1 = "skipped ship_to_ntp=0";
}
- gpsd_report(LOG_RAW,
+ gpsd_report(LOG_RAW,
"PPS edge %.20s %lu.%06lu offset %.9f\n",
log1,
(unsigned long)sample.tv.tv_sec,
diff --git a/packet.c b/packet.c
index a946af34..f0521d18 100644
--- a/packet.c
+++ b/packet.c
@@ -1267,7 +1267,7 @@ static void nextstate(struct gps_packet_t *lexer, unsigned char c)
lexer->state = JSON_STRINGLITERAL;
lexer->json_after = JSON_END_ATTRIBUTE;
} else {
- gpsd_report(LOG_RAW + 2,
+ gpsd_report(LOG_RAW + 2,
"%08ld: missing attribute start after header\n",
lexer->char_counter);
lexer->state = GROUND_STATE;
diff --git a/packet_states.h b/packet_states.h
index b2bfeac9..f7769f76 100644
--- a/packet_states.h
+++ b/packet_states.h
@@ -13,9 +13,9 @@
NMEA_PASHR_A, /* grind through recognizing $PASHR */
NMEA_PASHR_S, /* grind through recognizing $PASHR */
NMEA_PASHR_H, /* grind through recognizing $PASHR */
- NMEA_BINARY_BODY, /* Ashtech-style binary packet body, skip until \r\n */
- NMEA_BINARY_CR, /* \r on end of Ashtech-style binary packet */
- NMEA_BINARY_NL, /* \n on end of Ashtech-style binary packet */
+ NMEA_BINARY_BODY, /* Ashtech-style binary packet body, skip until \r\n */
+ NMEA_BINARY_CR, /* \r on end of Ashtech-style binary packet */
+ NMEA_BINARY_NL, /* \n on end of Ashtech-style binary packet */
NMEA_CR, /* seen terminating \r of NMEA packet */
NMEA_RECOGNIZED, /* saw trailing \n of NMEA packet */
@@ -58,7 +58,7 @@
SIRF_LENGTH_1, /* seen first byte of SiRF length */
SIRF_PAYLOAD, /* we're in a SiRF payload part */
SIRF_DELIVERED, /* saw last byte of SiRF payload/checksum */
- SIRF_TRAILER_1, /* saw first byte of SiRF trailer */
+ SIRF_TRAILER_1, /* saw first byte of SiRF trailer */
SIRF_RECOGNIZED, /* saw second byte of SiRF trailer */
#endif /* SIRF_ENABLE */
diff --git a/pseudonmea.c b/pseudonmea.c
index 0847df88..216ad645 100644
--- a/pseudonmea.c
+++ b/pseudonmea.c
@@ -12,8 +12,8 @@
/*
* Support for generic binary drivers. These functions dump NMEA for passing
- * to the client in raw mode. They assume that (a) the public gps.h structure
- * members are in a valid state, (b) that the private members hours, minutes,
+ * to the client in raw mode. They assume that (a) the public gps.h structure
+ * members are in a valid state, (b) that the private members hours, minutes,
* and seconds have also been filled in, (c) that if the private member
* mag_var is not NAN it is a magnetic variation in degrees that should be
* passed on, and (d) if the private member separation does not have the
@@ -237,7 +237,7 @@ static void gpsd_binary_time_dump(struct gps_device_t *session,
* incorrect; our sources on ZDA suggest that it should report local
* timezone. But no GPS we've ever seen actually does this, because it
* would require embedding a location-to-TZ database in the receiver.
- * And even if we could do that, it would make our regression tests
+ * And even if we could do that, it would make our regression tests
* break any time they were run in a timezone different from the one
* where they were generated.
*/
@@ -286,7 +286,7 @@ void nmea_tpv_dump(struct gps_device_t *session,
gpsd_binary_time_dump(session, bufp + strlen(bufp),
len - strlen(bufp));
if ((session->gpsdata.set & LATLON_SET) != 0) {
- gpsd_position_fix_dump(session, bufp + strlen(bufp),
+ gpsd_position_fix_dump(session, bufp + strlen(bufp),
len - strlen(bufp));
gpsd_transit_fix_dump(session, bufp + strlen(bufp),
len - strlen(bufp));
diff --git a/rtcm2_json.c b/rtcm2_json.c
index 59cefce4..c35e0949 100644
--- a/rtcm2_json.c
+++ b/rtcm2_json.c
@@ -61,7 +61,7 @@ int json_rtcm2_read(const char *buf,
/*@-type@*//* STRUCTARRAY confuses splint */
const struct json_attr_t json_rtcm1[] = {
RTCM2_HEADER
- {"satellites", t_array, STRUCTARRAY(rtcm2->gps_ranges.sat,
+ {"satellites", t_array, STRUCTARRAY(rtcm2->gps_ranges.sat,
rtcm1_satellite, &satcount)},
{NULL},
};
@@ -118,7 +118,7 @@ int json_rtcm2_read(const char *buf,
/*@-type@*//* STRUCTARRAY confuses splint */
const struct json_attr_t json_rtcm5[] = {
RTCM2_HEADER
- {"satellites", t_array, STRUCTARRAY(rtcm2->conhealth.sat,
+ {"satellites", t_array, STRUCTARRAY(rtcm2->conhealth.sat,
rtcm5_satellite, &satcount)},
{NULL},
};
@@ -143,7 +143,7 @@ int json_rtcm2_read(const char *buf,
/*@-type@*//* STRUCTARRAY confuses splint */
const struct json_attr_t json_rtcm7[] = {
RTCM2_HEADER
- {"satellites", t_array, STRUCTARRAY(rtcm2->almanac.station,
+ {"satellites", t_array, STRUCTARRAY(rtcm2->almanac.station,
rtcm7_satellite, &satcount)},
{NULL},
};
@@ -188,7 +188,7 @@ int json_rtcm2_read(const char *buf,
/*@-type@*//* STRUCTARRAY confuses splint */
const struct json_attr_t json_rtcm31[] = {
RTCM2_HEADER
- {"satellites", t_array, STRUCTARRAY(rtcm2->glonass_ranges.sat,
+ {"satellites", t_array, STRUCTARRAY(rtcm2->glonass_ranges.sat,
rtcm31_satellite, &satcount)},
{NULL},
};
diff --git a/serial.c b/serial.c
index 5565faf1..8834a87b 100644
--- a/serial.c
+++ b/serial.c
@@ -86,7 +86,7 @@ static int fusercount(const char *path)
while ((procentry = readdir(procd)) != NULL) {
if (isdigit(procentry->d_name[0])==0)
continue;
- (void)snprintf(procpath, sizeof(procpath),
+ (void)snprintf(procpath, sizeof(procpath),
"/proc/%s/fd/", procentry->d_name);
if ((fdd = opendir(procpath)) == NULL)
continue;
@@ -163,7 +163,7 @@ static speed_t gpsd_get_speed_termios(const struct termios *ttyctl)
return (115200);
case B230400:
return (230400);
- default: /* B0 */
+ default: /* B0 */
return 0;
}
}
@@ -227,11 +227,11 @@ void gpsd_set_speed(struct gps_device_t *session,
|| parity != session->gpsdata.dev.parity
|| stopbits != session->gpsdata.dev.stopbits) {
- /*
+ /*
* Don't mess with this conditional! Speed zero is supposed to mean
* to leave the port speed at whatever it currently is. This leads
* to excellent behavior on Linux, which preserves baudrate across
- * serial device closes - it means that if you've opended this
+ * serial device closes - it means that if you've opended this
* device before you typically don't have to hunt at all because
* it's still at the same speed you left it - you'll typically
* get packet lock within 1.5 seconds. Alas, the BSDs and OS X
@@ -331,8 +331,8 @@ void gpsd_set_speed(struct gps_device_t *session,
* Bluetooth devices may spam devices that aren't GPSes at all and
* could become confused.
*/
- if (!session->context->readonly
- && session->sourcetype != source_usb
+ if (!session->context->readonly
+ && session->sourcetype != source_usb
&& session->sourcetype != source_bluetooth) {
if (isatty(session->gpsdata.gps_fd) != 0
&& !session->context->readonly) {
@@ -391,7 +391,7 @@ int gpsd_serial_open(struct gps_device_t *session)
(void)fcntl(session->gpsdata.gps_fd, F_SETFL, (int)mode | O_NONBLOCK);
gpsd_report(LOG_PROG, "bluez device open success: %s %s\n",
session->gpsdata.dev.path, strerror(errno));
- } else
+ } else
#endif /* BLUEZ */
{
if ((session->gpsdata.gps_fd =
@@ -434,7 +434,7 @@ int gpsd_serial_open(struct gps_device_t *session)
* Don't touch devices already opened by another process.
*/
if (fusercount(session->gpsdata.dev.path) > 1) {
- gpsd_report(LOG_ERROR,
+ gpsd_report(LOG_ERROR,
"%s already opened by another process\n",
session->gpsdata.dev.path);
(void)close(session->gpsdata.gps_fd);
@@ -480,7 +480,7 @@ int gpsd_serial_open(struct gps_device_t *session)
* This is not ideal. Setting no parity here will mean extra
* initialization time for some devices, like certain Trimble
* boards, that want 7O2 or other non-8N1 settings. But starting
- * the hunt loop at 8N1 will minimize the average sync time
+ * the hunt loop at 8N1 will minimize the average sync time
* over all devices.
*/
session->ttyset.c_cflag &= ~(PARENB | PARODD | CRTSCTS | CSTOPB);
diff --git a/shared_json.c b/shared_json.c
index 766a7492..e3f116c3 100644
--- a/shared_json.c
+++ b/shared_json.c
@@ -3,7 +3,7 @@
NAME
shared_json.c - move data between in-core and JSON structures
-DESCRIPTION
+DESCRIPTION
This module uses the generic JSON parser to get data from JSON
representations to gps.h structures. These functions are used in both
the daemon and the client library.
@@ -31,7 +31,7 @@ int json_device_read(const char *buf,
/* *INDENT-OFF* */
const struct json_attr_t json_attrs_device[] = {
{"class", t_check, .dflt.check = "DEVICE"},
-
+
{"path", t_string, .addr.string = dev->path,
.len = sizeof(dev->path)},
{"activated", t_string, .addr.string = tbuf,
@@ -85,7 +85,7 @@ int json_watch_read(const char *buf,
/* *INDENT-OFF* */
struct json_attr_t chanconfig_attrs[] = {
{"class", t_check, .dflt.check = "WATCH"},
-
+
{"enable", t_boolean, .addr.boolean = &ccp->watcher,
.dflt.boolean = true},
{"json", t_boolean, .addr.boolean = &ccp->json,
diff --git a/shmexport.c b/shmexport.c
index 5959b581..9e213ff2 100644
--- a/shmexport.c
+++ b/shmexport.c
@@ -6,7 +6,7 @@ NAME
DESCRIPTION
This is a very lightweight alternative to JSON-over-sockets. Clients
won't be able to filter by device, and won't get device activation/deactivation
-notifications. But both client and daemon will avoid all the marshalling and
+notifications. But both client and daemon will avoid all the marshalling and
unmarshalling overhead.
PERMISSIONS
@@ -36,11 +36,11 @@ bool shm_acquire(struct gps_context_t *context)
shmid = shmget((key_t)GPSD_KEY, sizeof(struct gps_data_t), (int)(IPC_CREAT|0666));
if (shmid == -1) {
gpsd_report(LOG_ERROR, "shmget(%ld, %zd, 0666) failed: %s\n",
- (long int)GPSD_KEY,
+ (long int)GPSD_KEY,
sizeof(struct gps_data_t),
strerror(errno));
return false;
- }
+ }
context->shmexport = (char *)shmat(shmid, 0, 0);
if ((int)(long)context->shmexport == -1) {
gpsd_report(LOG_ERROR, "shmat failed: %s\n", strerror(errno));
@@ -68,7 +68,7 @@ void shm_update(struct gps_context_t *context, struct gps_data_t *gpsdata)
++tick;
/*
- * Following block of instructions must not be reordered, otherwise
+ * Following block of instructions must not be reordered, otherwise
* havoc will ensue. asm volatile("sfence") is a GCCism intended
* to prevent reordering.
*
@@ -82,7 +82,7 @@ void shm_update(struct gps_context_t *context, struct gps_data_t *gpsdata)
barrier();
memcpy((void *)(context->shmexport + offsetof(struct shmexport_t, gpsdata)),
(void *)gpsdata,
- sizeof(struct gps_data_t));
+ sizeof(struct gps_data_t));
barrier();
#ifndef USE_QT
shared->gpsdata.gps_fd = SHM_PSEUDO_FD;
diff --git a/srecord.c b/srecord.c
index 36d75b77..402a6e30 100644
--- a/srecord.c
+++ b/srecord.c
@@ -19,12 +19,12 @@
#include "gpsd.h"
/*
- * See srec(5) for a description of this format.
+ * See srec(5) for a description of this format.
* We read and write 4-byte addresses.
* S0: Comments
* S3: Memory Loadable Data, 4byte address
* S5: Count of S1, S2 and S3 Records
- * S7: starting execution address interpreted as a 4-byte address
+ * S7: starting execution address interpreted as a 4-byte address
*/
#define MAX_BYTES_PER_RECORD 16
diff --git a/strl.c b/strl.c
index 5fb17fba..6ebf126b 100644
--- a/strl.c
+++ b/strl.c
@@ -8,7 +8,7 @@
/*
* These versions use memcpy and strlen() because they are often
* heavily optimized down to assembler level. Thus, likely to be
- * faster even with the function call overhead.
+ * faster even with the function call overhead.
*/
#ifndef HAVE_STRLCAT
diff --git a/subframe.c b/subframe.c
index ae7059c8..4e99eb2e 100644
--- a/subframe.c
+++ b/subframe.c
@@ -18,7 +18,7 @@ gps_mask_t gpsd_interpret_subframe_raw(struct gps_device_t *session,
uint8_t preamble;
uint32_t parity;
- if (session->subframe_count++ == 0) {
+ if (session->subframe_count++ == 0) {
speed_t speed = gpsd_get_speed(session);
if (speed < 38400)
diff --git a/test_geoid.c b/test_geoid.c
index f319cc75..a6d5b779 100644
--- a/test_geoid.c
+++ b/test_geoid.c
@@ -1,7 +1,7 @@
/* test driver for the ECEF to WGS84 conversions in geoid.c
*
* This file is Copyright (c) 2010 by the GPSD project
- * BSD terms apply: see the file COPYING in the distribution root for details.
+ * BSD terms apply: see the file COPYING in the distribution root for details.
*/
#include <stdio.h>
diff --git a/test_gpsmm.cpp b/test_gpsmm.cpp
index 88ab2e02..63596a36 100644
--- a/test_gpsmm.cpp
+++ b/test_gpsmm.cpp
@@ -13,7 +13,7 @@
using namespace std;
-/*
+/*
* We should get libgps_dump_state() from the client library, but
* scons has a bug; we can't get it to add -lgps to the link line,
* apparently because it doesn't honor parse_flags on a Program()
@@ -100,7 +100,7 @@ static void libgps_dump_state(struct gps_data_t *collect)
}
-int main(void)
+int main(void)
{
gpsmm gps_rec("localhost", DEFAULT_GPSD_PORT);
diff --git a/test_packet.c b/test_packet.c
index 09ea5093..30da233f 100644
--- a/test_packet.c
+++ b/test_packet.c
@@ -86,9 +86,9 @@ static struct map singletests[] = {
{
.legend = "SiRF WAAS version ID",
.test = {
- 0xA0, 0xA2, 0x00, 0x15,
- 0x06, 0x06, 0x31, 0x2E, 0x32, 0x2E, 0x30, 0x44,
- 0x4B, 0x49, 0x54, 0x31, 0x31, 0x39, 0x20, 0x53,
+ 0xA0, 0xA2, 0x00, 0x15,
+ 0x06, 0x06, 0x31, 0x2E, 0x32, 0x2E, 0x30, 0x44,
+ 0x4B, 0x49, 0x54, 0x31, 0x31, 0x39, 0x20, 0x53,
0x4D, 0x00, 0x00, 0x00, 0x00,
0x03, 0x82, 0xB0, 0xB3},
.testlen = 29,
@@ -99,9 +99,9 @@ static struct map singletests[] = {
.legend = "SiRF WAAS version ID with 3 chars of leading garbage",
.test = {
0xff, 0x00, 0xff,
- 0xA0, 0xA2, 0x00, 0x15,
- 0x06, 0x06, 0x31, 0x2E, 0x32, 0x2E, 0x30, 0x44,
- 0x4B, 0x49, 0x54, 0x31, 0x31, 0x39, 0x20, 0x53,
+ 0xA0, 0xA2, 0x00, 0x15,
+ 0x06, 0x06, 0x31, 0x2E, 0x32, 0x2E, 0x30, 0x44,
+ 0x4B, 0x49, 0x54, 0x31, 0x31, 0x39, 0x20, 0x53,
0x4D, 0x00, 0x00, 0x00, 0x00,
0x03, 0x82, 0xB0, 0xB3},
.testlen = 32,
@@ -111,9 +111,9 @@ static struct map singletests[] = {
{
.legend = "SiRF WAAS version ID with wrong checksum",
.test = {
- 0xA0, 0xA2, 0x00, 0x15,
- 0x06, 0x06, 0x31, 0x2E, 0x32, 0x2E, 0x30, 0x44,
- 0x4B, 0x49, 0x54, 0x31, 0x31, 0x39, 0x20, 0x53,
+ 0xA0, 0xA2, 0x00, 0x15,
+ 0x06, 0x06, 0x31, 0x2E, 0x32, 0x2E, 0x30, 0x44,
+ 0x4B, 0x49, 0x54, 0x31, 0x31, 0x39, 0x20, 0x53,
0x4D, 0x00, 0x00, 0x00, 0x00,
0x03, 0x00, 0xB0, 0xB3},
.testlen = 29,
@@ -123,9 +123,9 @@ static struct map singletests[] = {
{
.legend = "SiRF WAAS version ID with bad length",
.test = {
- 0xA0, 0xA2, 0xff, 0x15,
- 0x06, 0x06, 0x31, 0x2E, 0x32, 0x2E, 0x30, 0x44,
- 0x4B, 0x49, 0x54, 0x31, 0x31, 0x39, 0x20, 0x53,
+ 0xA0, 0xA2, 0xff, 0x15,
+ 0x06, 0x06, 0x31, 0x2E, 0x32, 0x2E, 0x30, 0x44,
+ 0x4B, 0x49, 0x54, 0x31, 0x31, 0x39, 0x20, 0x53,
0x4D, 0x00, 0x00, 0x00, 0x00,
0x03, 0x82, 0xB0, 0xB3},
.testlen = 29,
@@ -136,32 +136,32 @@ static struct map singletests[] = {
{
.legend = "Zodiac binary 1000 Geodetic Status Output Message",
.test = {
- 0xff, 0x81, 0xe8, 0x03, 0x31, 0x00, 0x00, 0x00, 0xe8, 0x79,
- 0x74, 0x0e, 0x00, 0x00, 0x24, 0x00, 0x24, 0x00, 0x04, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x03, 0x23, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x06, 0x00,
- 0xcd, 0x07, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x7b, 0x0d,
- 0x00, 0x00, 0x12, 0x6b, 0xa7, 0x04, 0x41, 0x75, 0x32, 0xf8,
- 0x03, 0x1f, 0x00, 0x00, 0xe6, 0xf2, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x11, 0xf6, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x40,
- 0xd9, 0x12, 0x90, 0xd0, 0x03, 0x00, 0x00, 0xa3, 0xe1, 0x11,
- 0x10, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa3, 0xe1, 0x11,
+ 0xff, 0x81, 0xe8, 0x03, 0x31, 0x00, 0x00, 0x00, 0xe8, 0x79,
+ 0x74, 0x0e, 0x00, 0x00, 0x24, 0x00, 0x24, 0x00, 0x04, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x03, 0x23, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x06, 0x00,
+ 0xcd, 0x07, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x7b, 0x0d,
+ 0x00, 0x00, 0x12, 0x6b, 0xa7, 0x04, 0x41, 0x75, 0x32, 0xf8,
+ 0x03, 0x1f, 0x00, 0x00, 0xe6, 0xf2, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x11, 0xf6, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x40,
+ 0xd9, 0x12, 0x90, 0xd0, 0x03, 0x00, 0x00, 0xa3, 0xe1, 0x11,
+ 0x10, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa3, 0xe1, 0x11,
0x00, 0x00, 0x00, 0x00, 0xe0, 0x93, 0x04, 0x00, 0x04, 0xaa},
.testlen = 110,
.garbage_offset = 0,
.type = ZODIAC_PACKET,
},
- /* EverMore tests */
+ /* EverMore tests */
{
- .legend = "EverMore status packet 0x20",
- .test = {
+ .legend = "EverMore status packet 0x20",
+ .test = {
0x10, 0x02, 0x0D, 0x20, 0xE1, 0x00, 0x00, 0x00,
0x0A, 0x00, 0x1E, 0x00, 0x32, 0x00, 0x5b, 0x10,
- 0x03},
+ 0x03},
.testlen = 17,
.garbage_offset = 0,
- .type = EVERMORE_PACKET,
- },
+ .type = EVERMORE_PACKET,
+ },
{
.legend = "EverMore packet 0x04 with 0x10 0x10 sequence",
.test = {
@@ -170,7 +170,7 @@ static struct map singletests[] = {
0x00, 0x68, 0x10, 0x03},
.testlen = 20,
.garbage_offset = 0,
- .type = EVERMORE_PACKET,
+ .type = EVERMORE_PACKET,
},
{
.legend = "EverMore packet 0x04 with 0x10 0x10 sequence, some noise before packet data",
@@ -179,8 +179,8 @@ static struct map singletests[] = {
0x00, 0x10, 0x10, 0xa7, 0x13, 0x03, 0x2c, 0x26,
0x24, 0x0a, 0x17, 0x00, 0x68, 0x10, 0x03},
.testlen = 23,
- .garbage_offset = 3,
- .type = EVERMORE_PACKET,
+ .garbage_offset = 3,
+ .type = EVERMORE_PACKET,
},
{
.legend = "EverMore packet 0x04, 0x10 and some other data at the beginning",
@@ -190,8 +190,8 @@ static struct map singletests[] = {
0x2c, 0x26, 0x24, 0x0a, 0x17, 0x00, 0x68, 0x10,
0x03},
.testlen = 25,
- .garbage_offset = 5,
- .type = EVERMORE_PACKET,
+ .garbage_offset = 5,
+ .type = EVERMORE_PACKET,
},
{
.legend = "EverMore packet 0x04, 0x10 three times at the beginning",
@@ -202,7 +202,7 @@ static struct map singletests[] = {
0x00, 0x68, 0x10, 0x03},
.testlen = 23,
.garbage_offset = 3,
- .type = EVERMORE_PACKET,
+ .type = EVERMORE_PACKET,
},
{
/* from page 4-3 of RTCM 10403.1 */
@@ -215,32 +215,32 @@ static struct map singletests[] = {
* ARP ECEF-Z = 3975521.4643 meters
*/
.test = {
- 0xD3, 0x00, 0x13, 0x3E, 0xD7, 0xD3, 0x02, 0x02,
+ 0xD3, 0x00, 0x13, 0x3E, 0xD7, 0xD3, 0x02, 0x02,
0x98, 0x0E, 0xDE, 0xEF, 0x34, 0xB4, 0xBD, 0x62,
- 0xAC, 0x09, 0x41, 0x98, 0x6F, 0x33, 0x36, 0x0B,
+ 0xAC, 0x09, 0x41, 0x98, 0x6F, 0x33, 0x36, 0x0B,
0x98,
},
.testlen = 25,
.garbage_offset = 0,
- .type = RTCM3_PACKET,
+ .type = RTCM3_PACKET,
},
{
.legend = "RTCM104V3 type 1005 packet with 4th byte garbled",
.test = {
- 0xD3, 0x00, 0x13, 0x3F, 0xD7, 0xD3, 0x02, 0x02,
+ 0xD3, 0x00, 0x13, 0x3F, 0xD7, 0xD3, 0x02, 0x02,
0x98, 0x0E, 0xDE, 0xEF, 0x34, 0xB4, 0xBD, 0x62,
- 0xAC, 0x09, 0x41, 0x98, 0x6F, 0x33, 0x36, 0x0B,
+ 0xAC, 0x09, 0x41, 0x98, 0x6F, 0x33, 0x36, 0x0B,
0x98,
},
.testlen = 25,
.garbage_offset = 0,
- .type = BAD_PACKET,
+ .type = BAD_PACKET,
},
{
/* from page 3-71 of the RTCM 10403.1 */
.legend = "RTCM104V3 type 1029 packet",
.test = {
- 0xD3, 0x00, 0x27, 0x40, 0x50, 0x17, 0x00, 0x84,
+ 0xD3, 0x00, 0x27, 0x40, 0x50, 0x17, 0x00, 0x84,
0x73, 0x6E, 0x15, 0x1E, 0x55, 0x54, 0x46, 0x2D,
0x38, 0x20, 0xD0, 0xBF, 0xD1, 0x80, 0xD0, 0xBE,
0xD0, 0xB2, 0xD0, 0xB5, 0xD1, 0x80, 0xD0, 0xBA,
@@ -249,7 +249,7 @@ static struct map singletests[] = {
},
.testlen = 45,
.garbage_offset = 0,
- .type = RTCM3_PACKET,
+ .type = RTCM3_PACKET,
},
};
/*@ +initallelements -charint +usedef @*/
diff --git a/timebase.c b/timebase.c
index cf99b564..13c156b7 100644
--- a/timebase.c
+++ b/timebase.c
@@ -2,7 +2,7 @@
All of gpsd's assumptions about time and GPS time reporting live in this file.
-This is a work in progress. Currently GPSD requires that the host system
+This is a work in progress. Currently GPSD requires that the host system
clock be accurate to within one second. We are attempting to relax this
to "accurate within one GPS rollover period" for receivers reporting
GPS week+TOW.
@@ -60,15 +60,15 @@ source.
available.
5) Another source *may* be available - the GPS leap second count, if we can
-get the device to report it. The latter is not a given; SiRFs before
+get the device to report it. The latter is not a given; SiRFs before
firmware rev 2.3.2 don't report it unless special subframe data reporting
is enabled, which requires 38400bps. Evermore GPSes can't be made to
-report it at all.
+report it at all.
-Conclusion: if the system clock isn't accurate enough that we can deduce
+Conclusion: if the system clock isn't accurate enough that we can deduce
what rollover period we're in, we're utterly hosed. Furthermore, if it's
-not accurate to within a second and only NMEA devices are reporting,
-we don't know what century it is!
+not accurate to within a second and only NMEA devices are reporting,
+we don't know what century it is!
Therefore, we must assume the system clock is reliable.
@@ -112,7 +112,7 @@ void gpsd_time_init(struct gps_context_t *context, time_t starttime)
now->tm_year += 1900;
context->century = now->tm_year - (now->tm_year % 100);
(void)unix_to_iso8601((timestamp_t)context->start_time, scr, sizeof(scr));
- gpsd_report(LOG_INF, "startup at %s (%d)\n",
+ gpsd_report(LOG_INF, "startup at %s (%d)\n",
scr, (int)context->start_time);
}
}
@@ -143,7 +143,7 @@ timestamp_t gpsd_utc_resolve(/*@in@*/struct gps_device_t *session)
{
/*
* We'd like to *correct* for rollover the way we do for GPS week.
- * In theory, comparing extracted UTC against present time should
+ * In theory, comparing extracted UTC against present time should
* allow us to compute the device's epoch assumption. In practice,
* this will be hairy and risky.
*/
@@ -172,7 +172,7 @@ timestamp_t gpsd_utc_resolve(/*@in@*/struct gps_device_t *session)
if (session->newdata.time + (12*60*60) < (timestamp_t)session->context->start_time) {
char scr[128];
(void)unix_to_iso8601(session->newdata.time, scr, sizeof(scr));
- gpsd_report(LOG_WARN, "GPS week rollover makes time %s (%f) invalid\n",
+ gpsd_report(LOG_WARN, "GPS week rollover makes time %s (%f) invalid\n",
scr, session->newdata.time);
}
@@ -188,7 +188,7 @@ timestamp_t gpsd_gpstime_resolve(/*@in@*/struct gps_device_t *session,
#ifdef __UNUSED__
/*
* This code detects and compensates for week counter rollovers that
- * happen while gpsd is running. It will not save you if there was a
+ * happen while gpsd is running. It will not save you if there was a
* rollover that confused the receiver before gpsd booted up. It *will*
* work even when Block IIF satellites increase the week counter width
* to 13 bits,