diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2009-02-17 11:43:05 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2009-02-17 11:43:05 +0000 |
commit | fa279d2d57f4778395814ee1a03886906335abff (patch) | |
tree | ac49a2469083fbb425798ae1b3b0d5fe33a37536 /gpsmon.c | |
parent | c01093e259c681bb42f2f22bd5e33d9904bc8d14 (diff) | |
download | gpsd-fa279d2d57f4778395814ee1a03886906335abff.tar.gz |
Use subwindows to simplify layout.
Diffstat (limited to 'gpsmon.c')
-rw-r--r-- | gpsmon.c | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -68,14 +68,14 @@ extern int netlib_connectsock(const char *, const char *, const char *); /* These are public */ struct gps_context_t context; struct gps_device_t session; -WINDOW *debugwin; +WINDOW *devicewin, *debugwin; int gmt_offset; /* These are private */ static int controlfd = -1; static bool serial, curses_active; static int debuglevel = 0; -static WINDOW *statwin, *cmdwin, *devicewin; +static WINDOW *statwin, *cmdwin; static FILE *logfile; #define display (void)mvwprintw @@ -185,7 +185,7 @@ const struct mdevice_t *drivers[] = { &nmea_mdt, &sirf_mdt, }; -const struct mdevice_t **active = &drivers[0]; +const struct mdevice_t **active = &drivers[1]; /****************************************************************************** * @@ -593,10 +593,11 @@ int main (int argc, char **argv) packet_dump((char *)session.packet.outbuffer,session.packet.outbuflen); } (*active)->update(len); - (void)wrefresh(statwin); - (void)wrefresh(cmdwin); - (void)wrefresh(devicewin); - (void)wrefresh(debugwin); + (void)wnoutrefresh(statwin); + (void)wnoutrefresh(cmdwin); + (void)wnoutrefresh(devicewin); + (void)wnoutrefresh(debugwin); + (void)doupdate(); /* rest of this invoked only if user has pressed a key */ FD_SET(0,&select_set); |