diff options
author | Gary E. Miller <gem@rellim.com> | 2015-06-23 14:36:26 -0700 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2015-06-23 14:36:26 -0700 |
commit | 95c99f69e026e8c57aecba545e51c97f3b284e75 (patch) | |
tree | 5c212b2f5200091f734c72c9c0f1755c3cd99bf7 /gpsmon.c | |
parent | bb2d8a9ec983f43761aedd56fe65820066eaa5c9 (diff) | |
download | gpsd-95c99f69e026e8c57aecba545e51c97f3b284e75.tar.gz |
Remove a BSD-ism.
CTRL('L') is a BSD-ism. CTRL() is defined in sys/ttydefaults.h
which does not always exist. Instead of adding scons tests for
needing CTRL() and its include files just replace with a simple
constant.
Needed for musl and found by Baruch Siach <baruch@tkos.co.il>
Diffstat (limited to 'gpsmon.c')
-rw-r--r-- | gpsmon.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -583,6 +583,9 @@ static void select_packet_monitor(struct gps_device_t *device) (void)wnoutrefresh(devicewin); } +/* Control-L character */ +#define CTRL_L 0x0C + static char *curses_get_command(void) /* char-by-char nonblocking input, return accumulated command line on \n */ { @@ -591,7 +594,8 @@ static char *curses_get_command(void) int c; c = wgetch(cmdwin); - if (c == CTRL('L')) { + if (CTRL_L == c) { + /* ^L is to repaint the screen */ (void)clearok(stdscr, true); if (active != NULL && (*active)->initialize != NULL) (void)(*active)->initialize(); |