xref: /csrg-svn/usr.bin/telnet/defines.h (revision 38689)
133685Sbostic /*
233685Sbostic  * Copyright (c) 1988 Regents of the University of California.
333685Sbostic  * All rights reserved.
433685Sbostic  *
533685Sbostic  * Redistribution and use in source and binary forms are permitted
634898Sbostic  * provided that the above copyright notice and this paragraph are
734898Sbostic  * duplicated in all such forms and that any documentation,
834898Sbostic  * advertising materials, and other materials related to such
934898Sbostic  * distribution and use acknowledge that the software was developed
1034898Sbostic  * by the University of California, Berkeley.  The name of the
1134898Sbostic  * University may not be used to endorse or promote products derived
1234898Sbostic  * from this software without specific prior written permission.
1334898Sbostic  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
1434898Sbostic  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
1534898Sbostic  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
1633685Sbostic  *
17*38689Sborman  *	@(#)defines.h	1.8 (Berkeley) 08/21/89
1833685Sbostic  */
1933685Sbostic 
2032140Sminshall #define	settimer(x)	clocks.x = clocks.system++
2132140Sminshall 
2232140Sminshall #if	!defined(TN3270)
2332140Sminshall 
2432140Sminshall #define	SetIn3270()
2532140Sminshall 
2632140Sminshall #endif	/* !defined(TN3270) */
2732140Sminshall 
2832528Sminshall #define	NETADD(c)	{ *netoring.supply = c; ring_supplied(&netoring, 1); }
2932140Sminshall #define	NET2ADD(c1,c2)	{ NETADD(c1); NETADD(c2); }
3032528Sminshall #define	NETBYTES()	(ring_full_count(&netoring))
3132381Sminshall #define	NETROOM()	(ring_empty_count(&netoring))
3232140Sminshall 
3332381Sminshall #define	TTYADD(c)	if (!(SYNCHing||flushout)) { \
3432528Sminshall 				*ttyoring.supply = c; \
3532528Sminshall 				ring_supplied(&ttyoring, 1); \
3632381Sminshall 			}
3732528Sminshall #define	TTYBYTES()	(ring_full_count(&ttyoring))
3832381Sminshall #define	TTYROOM()	(ring_empty_count(&ttyoring))
3932140Sminshall 
4032140Sminshall /*	Various modes */
41*38689Sborman #define	MODE_LOCAL_CHARS(m)	((m)&(MODE_EDIT|MODE_TRAPSIG))
42*38689Sborman #define	MODE_LOCAL_ECHO(m)	((m)&MODE_ECHO)
43*38689Sborman #define	MODE_COMMAND_LINE(m)	((m)==-1)
44