diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2019-06-18 17:02:17 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2019-06-18 17:02:17 -0700 |
| commit | 634a8517b14d313291605e8761a2e0a740d990a0 (patch) | |
| tree | 89d9051380b518f0e509f687b07bf84ef4e8306b /bterm.h | |
| parent | e09bb2d3edcb5fbb6e41bac24282d573e8e5c6a5 (diff) | |
| parent | b86066b46aa19612aa0ca991aa2321d86d11b718 (diff) | |
Merge branch 'master' of bitbucket.org:spilt/bb
Diffstat (limited to 'bterm.h')
| -rw-r--r-- | bterm.h | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -10,7 +10,6 @@ #ifndef FILE__BTERM_H #define FILE__BTERM_H -#include <poll.h> #include <stdio.h> #define KEY_F1 (0xFFFF-0) @@ -112,11 +111,9 @@ const char *bkeyname(int key); static inline int nextchar(int fd, int timeout) { + (void)timeout; char c; - struct pollfd pfd = {fd, POLLIN, 0}; - if (poll(&pfd, 1, timeout) > 0) - return read(fd, &c, 1) == 1 ? c : -1; - return -1; + return read(fd, &c, 1) == 1 ? c : -1; } /* |
