1 /* 2 * Copyright (c) 1988 Regents of the University of California. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms are permitted 6 * provided that this notice is preserved and that due credit is given 7 * to the University of California at Berkeley. The name of the University 8 * may not be used to endorse or promote products derived from this 9 * software without specific prior written permission. This software 10 * is provided ``as is'' without express or implied warranty. 11 * 12 * @(#)fdset.h 1.3 (Berkeley) 03/08/88 13 */ 14 15 /* 16 * The following is defined just in case someone should want to run 17 * this telnet on a 4.2 system. 18 * 19 */ 20 21 #ifndef FD_SETSIZE 22 23 #define FD_SET(n, p) ((p)->fds_bits[0] |= (1<<(n))) 24 #define FD_CLR(n, p) ((p)->fds_bits[0] &= ~(1<<(n))) 25 #define FD_ISSET(n, p) ((p)->fds_bits[0] & (1<<(n))) 26 #define FD_ZERO(p) ((p)->fds_bits[0] = 0) 27 28 #endif 29