Commit | Line | Data |
---|---|---|
897ce52e KB |
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 | |
b36fc510 KB |
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. | |
897ce52e | 16 | * |
b36fc510 | 17 | * @(#)defines.h 1.6 (Berkeley) %G% |
897ce52e KB |
18 | */ |
19 | ||
46e39dfe GM |
20 | #define settimer(x) clocks.x = clocks.system++ |
21 | ||
22 | #if !defined(TN3270) | |
23 | ||
115a5494 | 24 | #define ExitString(s,r) { fprintf(stderr, s); exit(r); } |
46e39dfe GM |
25 | #define Exit(x) exit(x) |
26 | #define SetIn3270() | |
27 | ||
28 | #endif /* !defined(TN3270) */ | |
29 | ||
8b6750f5 | 30 | #define NETADD(c) { *netoring.supply = c; ring_supplied(&netoring, 1); } |
46e39dfe | 31 | #define NET2ADD(c1,c2) { NETADD(c1); NETADD(c2); } |
8b6750f5 | 32 | #define NETBYTES() (ring_full_count(&netoring)) |
115a5494 | 33 | #define NETROOM() (ring_empty_count(&netoring)) |
46e39dfe | 34 | |
115a5494 | 35 | #define TTYADD(c) if (!(SYNCHing||flushout)) { \ |
8b6750f5 GM |
36 | *ttyoring.supply = c; \ |
37 | ring_supplied(&ttyoring, 1); \ | |
115a5494 | 38 | } |
8b6750f5 | 39 | #define TTYBYTES() (ring_full_count(&ttyoring)) |
115a5494 | 40 | #define TTYROOM() (ring_empty_count(&ttyoring)) |
46e39dfe GM |
41 | |
42 | /* Various modes */ | |
43 | #define MODE_LINE(m) (modelist[m].modetype & LINE) | |
44 | #define MODE_LOCAL_CHARS(m) (modelist[m].modetype & LOCAL_CHARS) | |
45 | #define MODE_LOCAL_ECHO(m) (modelist[m].modetype & LOCAL_ECHO) | |
46 | #define MODE_COMMAND_LINE(m) (modelist[m].modetype & COMMAND_LINE) | |
47 | ||
48 | #define LOCAL_CHARS 0x01 /* Characters processed locally */ | |
49 | #define LINE 0x02 /* Line-by-line mode of operation */ | |
50 | #define LOCAL_ECHO 0x04 /* Echoing locally */ | |
51 | #define COMMAND_LINE 0x08 /* Command line mode */ |