summaryrefslogtreecommitdiff
path: root/gpsmon.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2015-03-08 12:48:17 -0400
committerEric S. Raymond <esr@thyrsus.com>2015-03-08 12:48:17 -0400
commit5fdd69a308ec9b799424d90de5a4888a25d51558 (patch)
tree451f5be87b1f9afa58789f74462180e829e3157d /gpsmon.c
parentfc0e032da5ca1c4b1e04a146220909eddebb6b86 (diff)
downloadgpsd-5fdd69a308ec9b799424d90de5a4888a25d51558.tar.gz
Fix a display glitch when there is a field after TOFF or PPS...
...but on the same line.
Diffstat (limited to 'gpsmon.c')
-rw-r--r--gpsmon.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gpsmon.c b/gpsmon.c
index 0e0b428c..88de9b63 100644
--- a/gpsmon.c
+++ b/gpsmon.c
@@ -224,8 +224,10 @@ void toff_update(WINDOW *win, int y, int x)
{
/* NOTE: can not use double here due to precision requirements */
struct timespec timedelta;
+ int i;
(void)wmove(win, y, x);
- (void)wclrtoeol(win);
+ for (i = 0; i < TIMESPEC_LEN; i++)
+ (void)waddch(win, ' ');
TS_SUB(&timedelta, &time_offset.clock, &time_offset.real);
if ( 86400 < (long)labs(timedelta.tv_sec) ) {
/* more than one day off, overflow */
@@ -253,8 +255,10 @@ void pps_update(WINDOW *win, int y, int x)
if (pps_thread_lastpps(&session.pps_thread, &ppstimes) > 0) {
/* NOTE: can not use double here due to precision requirements */
struct timespec timedelta;
+ int i;
(void)wmove(win, y, x);
- (void)wclrtoeol(win);
+ for (i = 0; i < TIMESPEC_LEN; i++)
+ (void)waddch(win, ' ');
TS_SUB( &timedelta, &ppstimes.clock, &ppstimes.real);
if ( 86400 < (long)labs(timedelta.tv_sec) ) {
/* more than one day off, overflow */