Commit | Line | Data |
---|---|---|
cd01c588 GM |
1 | /* |
2 | * This file describes the Operator Information Area in the 3270. | |
92f7501a GM |
3 | * |
4 | * Our OIA looks like that used by the 3270 PC and PC 3270 products. | |
992de934 | 5 | * |
c578271f | 6 | * @(#)oia.h 3.1 (Berkeley) %G% |
cd01c588 GM |
7 | */ |
8 | ||
d6ebedbd GM |
9 | #define INCLUDED_OIA |
10 | ||
cd01c588 | 11 | typedef struct { |
92f7501a GM |
12 | char |
13 | online_ownership, | |
14 | character_selection, | |
15 | shift_state, | |
16 | pss_group_1, | |
17 | highlight_group_1, | |
18 | color_group_1, | |
19 | insert, | |
20 | input_inhibited[5], | |
21 | pss_group_2, | |
22 | highlight_group_2, | |
23 | color_group_2, | |
24 | comm_error_reminder, | |
25 | printer_status, | |
26 | reserved_group_14, | |
27 | reserved_group_15, | |
28 | autokey_play_record_status, | |
29 | autokey_abort_pause_status, | |
30 | enlarge_state; | |
cd01c588 | 31 | } OIA; |
92f7501a GM |
32 | |
33 | /* Bits in online_ownership */ | |
34 | #define OIA_SETUP 0x80 | |
35 | #define OIA_TEST 0x40 | |
36 | #define OIA_SSCP_LU 0x20 | |
37 | #define OIA_LU_LU 0x10 | |
38 | #define OIA_UNOWNED 0x08 | |
39 | #define OIA_SUBSYSTEM_READY 0x04 | |
40 | ||
41 | /* Bit in character_selection */ | |
42 | #define OIA_EXTENDED_SELECT 0x80 | |
43 | #define OIA_APL 0x40 | |
44 | #define OIA_KANA 0x20 | |
45 | #define OIA_ALPHA 0x10 | |
46 | #define OIA_TEXT 0x08 | |
47 | ||
48 | /* Bits in shift_state */ | |
49 | #define OIA_NUMERIC 0x80 | |
50 | #define OIA_UPPER_SHIFT 0x40 | |
51 | ||
52 | /* Bits in pss_group_1, highlight_group_1, and color_group_1 */ | |
53 | #define OIA_SELECTABLE 0x80 | |
54 | #define OIA_FIELD_INHERIT 0x40 | |
55 | ||
56 | /* Bits in insert */ | |
57 | #define OIA_INSERT_MODE 0x80 | |
58 | ||
59 | /* We define this to be a 'long' followed by a 'char' (5 bytes) */ | |
60 | ||
61 | #define OIA_NON_RESETTABLE 0x80 | |
62 | #define OIA_SECURITY_KEY 0x40 | |
63 | #define OIA_MACHINE_CHECK 0x20 | |
64 | #define OIA_COMM_CHECK 0x10 | |
65 | #define OIA_PROGRAM_CHECK 0x08 | |
66 | #define OIA_RETRY 0x04 | |
67 | #define OIA_DEVICE_NOT_WORKING 0x02 | |
68 | #define OIA_DEVICE_VERY_BUSY 0x01 | |
69 | ||
70 | #define OIA_DEVICE_BUSY 0x80 | |
71 | #define OIA_TERMINAL_WAIT 0x40 | |
72 | #define OIA_MINUS_SYMBOL 0x20 | |
73 | #define OIA_MINUS_FUNCTION 0x10 | |
74 | #define OIA_TOO_MUCH_ENTERED 0x08 | |
75 | #define OIA_NOT_ENOUGH_ENTERED 0x04 | |
76 | #define OIA_WRONG_NUMBER 0x02 | |
77 | #define OIA_NUMERIC_FIELD 0x01 | |
78 | ||
79 | #define OIA_OP_UNAUTHORIZED 0x80 | |
80 | #define OIA_OP_UNAUTHORIZED_MIN 0x40 | |
81 | #define OIA_INVALID_DEAD_KEY_COMBO 0x20 | |
82 | #define OIA_WRONG_PLACE 0x10 | |
83 | ||
84 | #define OIA_MESSAGE_PENDING 0x80 | |
85 | #define OIA_PARTITION_WAIT 0x40 | |
86 | #define OIA_SYSTEM_WAIT 0x20 | |
87 | #define OIA_HARDWARE_MISMATCH 0x10 | |
88 | #define OIA_LOGICAL_TERM_NOT_CONF 0x08 | |
89 | ||
90 | ||
91 | #define OIA_AUTOKEY_INHIBIT 0x80 | |
92 | #define OIA_API_INHIBIT 0x40 | |
93 | ||
94 | /* Bits in pss_group_2 */ | |
95 | #define OIA_PS_SELECTED 0x80 | |
96 | #define OIA_PC_DISPLAY_DISABLE 0x40 | |
97 | ||
98 | /* Bits in highlight_group_2 and color_group_2 */ | |
99 | #define OIA_SELECTED 0x80 | |
100 | ||
101 | /* Bits in comm_error_reminder */ | |
102 | #define OIA_COMM_ERROR 0x80 | |
103 | #define OIA_RTM 0x40 | |
104 | ||
105 | /* Bits in printer_status */ | |
106 | #define OIA_PRINT_NOT_CUSTOM 0x80 | |
107 | #define OIA_PRINTER_MALFUNCTION 0x40 | |
108 | #define OIA_PRINTER_PRINTING 0x20 | |
109 | #define OIA_ASSIGN_PRINTER 0x10 | |
110 | #define OIA_WHAT_PRINTER 0x08 | |
111 | #define OIA_PRINTER_ASSIGNMENT 0x04 | |
112 | ||
113 | /* Bits in autokey_play_record_status */ | |
114 | #define OIA_PLAY 0x80 | |
115 | #define OIA_RECORD 0x40 | |
116 | ||
117 | /* Bits in autokey_abort_pause_status */ | |
118 | #define OIA_RECORDING_OVERFLOW 0x80 | |
119 | #define OIA_PAUSE 0x40 | |
120 | ||
121 | /* Bits in enlarge_state */ | |
122 | #define OIA_WINDOW_IS_ENLARGED 0x80 | |
123 | ||
124 | /* Define functions to set and read the oia */ | |
125 | ||
66986609 | 126 | #define SetOiaOnlineA(oia) SetOiaMyJob((oia)) /* Side-effect */ |
92f7501a GM |
127 | #define ResetOiaOnlineA(oia) \ |
128 | /* Nothing defined for this */ | |
129 | ||
130 | #define IsOiaReady3274(oia) ((oia)->online_ownership&OIA_SUBSYSTEM_READY) | |
131 | #define ResetOiaReady3274(oia) (oia)->online_ownership &= ~OIA_SUBSYSTEM_READY | |
132 | #define SetOiaReady3274(oia) (oia)->online_ownership |= OIA_SUBSYSTEM_READY | |
133 | ||
134 | #define IsOiaMyJob(oia) ((oia)->online_ownership&OIA_LU_LU) | |
135 | #define ResetOiaMyJob(oia) (oia)->online_ownership &= ~OIA_LU_LU | |
136 | #define SetOiaMyJob(oia) (oia)->online_ownership |= OIA_LU_LU | |
137 | ||
138 | #define IsOiaInsert(oia) ((oia)->online_ownership&OIA_INSERT_MODE) | |
139 | #define ResetOiaInsert(oia) (oia)->online_ownership &= ~OIA_INSERT_MODE | |
140 | #define SetOiaInsert(oia) (oia)->online_ownership |= OIA_INSERT_MODE | |
141 | ||
142 | #define IsOiaSystemLocked(oia) ((oia)->input_inhibited[3]&OIA_SYSTEM_WAIT) | |
143 | #define ResetOiaSystemLocked(oia) \ | |
144 | (oia)->input_inhibited[3] &= ~OIA_SYSTEM_WAIT | |
145 | #define SetOiaSystemLocked(oia) (oia)->input_inhibited[3] |= OIA_SYSTEM_WAIT | |
146 | ||
66986609 | 147 | #define IsOiaTWait(oia) ((oia)->input_inhibited[1]&OIA_TERMINAL_WAIT) |
92f7501a GM |
148 | #define ResetOiaTWait(oia) (oia)->input_inhibited[1] &= ~OIA_TERMINAL_WAIT |
149 | #define SetOiaTWait(oia) (oia)->input_inhibited[1] |= OIA_TERMINAL_WAIT | |
150 | ||
66986609 GM |
151 | #define IsOiaApiInhibit(oia) ((oia)->input_inhibited[4] & OIA_API_INHIBIT) |
152 | #define ResetOiaApiInhibit(oia) ((oia)->input_inhibited[4] &= ~OIA_API_INHIBIT) | |
153 | #define SetOiaApiInhibit(oia) ((oia)->input_inhibited[4] |= OIA_API_INHIBIT) | |
154 | ||
92f7501a GM |
155 | /* A macro to let the world know that someone has modified the OIA. */ |
156 | #define SetOiaModified() oia_modified = 1 | |
47e90de8 | 157 | #define SetPsModified() ps_modified = 1 |