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 the above copyright notice and this paragraph are 7 * duplicated in all such forms and that any documentation, 8 * advertising materials, and other materials related to such 9 * distribution and use acknowledge that the software was developed 10 * by the University of California, Berkeley. The name of the 11 * University may not be used to endorse or promote products derived 12 * from this software without specific prior written permission. 13 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 14 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 15 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 16 * 17 * @(#)defines.h 1.7 (Berkeley) 11/30/88 18 */ 19 20 #define settimer(x) clocks.x = clocks.system++ 21 22 #if !defined(TN3270) 23 24 #define SetIn3270() 25 26 #endif /* !defined(TN3270) */ 27 28 #define NETADD(c) { *netoring.supply = c; ring_supplied(&netoring, 1); } 29 #define NET2ADD(c1,c2) { NETADD(c1); NETADD(c2); } 30 #define NETBYTES() (ring_full_count(&netoring)) 31 #define NETROOM() (ring_empty_count(&netoring)) 32 33 #define TTYADD(c) if (!(SYNCHing||flushout)) { \ 34 *ttyoring.supply = c; \ 35 ring_supplied(&ttyoring, 1); \ 36 } 37 #define TTYBYTES() (ring_full_count(&ttyoring)) 38 #define TTYROOM() (ring_empty_count(&ttyoring)) 39 40 /* Various modes */ 41 #define MODE_LINE(m) (modelist[m].modetype & LINE) 42 #define MODE_LOCAL_CHARS(m) (modelist[m].modetype & LOCAL_CHARS) 43 #define MODE_LOCAL_ECHO(m) (modelist[m].modetype & LOCAL_ECHO) 44 #define MODE_COMMAND_LINE(m) (modelist[m].modetype & COMMAND_LINE) 45 46 #define LOCAL_CHARS 0x01 /* Characters processed locally */ 47 #define LINE 0x02 /* Line-by-line mode of operation */ 48 #define LOCAL_ECHO 0x04 /* Echoing locally */ 49 #define COMMAND_LINE 0x08 /* Command line mode */ 50