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