133685Sbostic /* 2*62309Sbostic * Copyright (c) 1988, 1993 3*62309Sbostic * The Regents of the University of California. All rights reserved. 433685Sbostic * 542770Sbostic * %sccs.include.redist.c% 633685Sbostic * 7*62309Sbostic * @(#)defines.h 8.1 (Berkeley) 06/06/93 833685Sbostic */ 933685Sbostic 1032140Sminshall #define settimer(x) clocks.x = clocks.system++ 1132140Sminshall 1232140Sminshall #if !defined(TN3270) 1332140Sminshall 1432140Sminshall #define SetIn3270() 1532140Sminshall 1632140Sminshall #endif /* !defined(TN3270) */ 1732140Sminshall 1832528Sminshall #define NETADD(c) { *netoring.supply = c; ring_supplied(&netoring, 1); } 1932140Sminshall #define NET2ADD(c1,c2) { NETADD(c1); NETADD(c2); } 2032528Sminshall #define NETBYTES() (ring_full_count(&netoring)) 2132381Sminshall #define NETROOM() (ring_empty_count(&netoring)) 2232140Sminshall 2332381Sminshall #define TTYADD(c) if (!(SYNCHing||flushout)) { \ 2432528Sminshall *ttyoring.supply = c; \ 2532528Sminshall ring_supplied(&ttyoring, 1); \ 2632381Sminshall } 2732528Sminshall #define TTYBYTES() (ring_full_count(&ttyoring)) 2832381Sminshall #define TTYROOM() (ring_empty_count(&ttyoring)) 2932140Sminshall 3032140Sminshall /* Various modes */ 3138689Sborman #define MODE_LOCAL_CHARS(m) ((m)&(MODE_EDIT|MODE_TRAPSIG)) 3238689Sborman #define MODE_LOCAL_ECHO(m) ((m)&MODE_ECHO) 3338689Sborman #define MODE_COMMAND_LINE(m) ((m)==-1) 3444361Sborman 3544361Sborman #define CONTROL(x) ((x)&0x1f) /* CTRL(x) is not portable */ 36