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