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