| 146 | } |
| 147 | |
| 148 | int kbhit() |
| 149 | { |
| 150 | fd_set fds; |
| 151 | terminal_lnbuf(0); |
| 152 | terminal_echo(0); |
| 153 | struct timeval tv; |
| 154 | tv.tv_sec = 0; |
| 155 | tv.tv_usec = 0; |
| 156 | FD_ZERO(&fds); |
| 157 | FD_SET(0, &fds); |
| 158 | select(1, &fds, 0, 0, &tv); |
| 159 | int ret = FD_ISSET(0, &fds); |
| 160 | terminal_lnbuf(1); |
| 161 | terminal_echo(1); |
| 162 | return ret; |
| 163 | } |
| 164 | } // namespace conio |
| 165 | |
| 166 | namespace file_system { |
nothing calls this directly
no test coverage detected