Files
six/sys_select.h
2025-06-10 12:11:08 +02:00

21 lines
457 B
C

#ifndef SYS_SELECT_H_
#define SYS_SELECT_H_
#include <sys/time.h>
int sys_select_or_key(fd_set *mask, int msecTmo, int *key);
/*
wait for read event on sockets included in mask or from keyboard or a timeout
result is negative for timeout,
STDIN_FILENO for a key pressed,
else socket number
switches the terminal to no-echo no-canonical
*/
void sys_keys_off(void);
/*
switch back terminal to normal state
*/
#endif /* SYS_SELECT_H_ */