| 147 | |
| 148 | #if defined(UNIX) |
| 149 | static bool InputWaiting() |
| 150 | { |
| 151 | struct timeval tv; |
| 152 | fd_set readfds; |
| 153 | |
| 154 | tv.tv_sec = 0; |
| 155 | tv.tv_usec = 1; |
| 156 | |
| 157 | FD_ZERO(&readfds); |
| 158 | FD_SET(STDIN, &readfds); |
| 159 | |
| 160 | /* don't care about writefds and exceptfds: */ |
| 161 | return select(STDIN + 1, &readfds, nullptr, nullptr, &tv) > 0; |
| 162 | } |
| 163 | |
| 164 | #else |
| 165 |
no outgoing calls
no test coverage detected