3 * - By John Hodge (thePowersGang)
8 //#include <sys/select.h>
11 void FD_ZERO(fd_set *fdsetp)
13 int i = FD_SETSIZE/16;
18 void FD_CLR(int fd, fd_set *fdsetp)
20 if(fd < 0 || fd > FD_SETSIZE) return;
21 fdsetp->flags[fd/16] &= (fd_set_ent_t) ((~1 << (fd%16))) & 0xFFFF;
24 void FD_SET(int fd, fd_set *fdsetp)
26 if(fd < 0 || fd > FD_SETSIZE) return;
27 fdsetp->flags[fd/16] |= (fd_set_ent_t) (1 << (fd%16));
30 int FD_ISSET(int fd, fd_set *fdsetp)
32 if(fd < 0 || fd > FD_SETSIZE) return 0;
33 return !!( fdsetp->flags[fd/16] & (1<<(fd%16)) );