xref: /csrg-svn/usr.bin/telnet/fdset.h (revision 33685)
132656Sminshall /*
2*33685Sbostic  * Copyright (c) 1988 Regents of the University of California.
3*33685Sbostic  * All rights reserved.
4*33685Sbostic  *
5*33685Sbostic  * Redistribution and use in source and binary forms are permitted
6*33685Sbostic  * provided that this notice is preserved and that due credit is given
7*33685Sbostic  * to the University of California at Berkeley. The name of the University
8*33685Sbostic  * may not be used to endorse or promote products derived from this
9*33685Sbostic  * software without specific prior written permission. This software
10*33685Sbostic  * is provided ``as is'' without express or implied warranty.
11*33685Sbostic  *
12*33685Sbostic  *	@(#)fdset.h	1.3 (Berkeley) 03/08/88
13*33685Sbostic  */
14*33685Sbostic 
15*33685Sbostic /*
1632656Sminshall  * The following is defined just in case someone should want to run
1732656Sminshall  * this telnet on a 4.2 system.
1832656Sminshall  *
1932656Sminshall  */
2032656Sminshall 
2132656Sminshall #ifndef	FD_SETSIZE
2232656Sminshall 
2332656Sminshall #define	FD_SET(n, p)	((p)->fds_bits[0] |= (1<<(n)))
2432656Sminshall #define	FD_CLR(n, p)	((p)->fds_bits[0] &= ~(1<<(n)))
2532656Sminshall #define	FD_ISSET(n, p)	((p)->fds_bits[0] & (1<<(n)))
2632656Sminshall #define FD_ZERO(p)	((p)->fds_bits[0] = 0)
2732656Sminshall 
2832656Sminshall #endif
29