Sync usage with man page.
[netbsd-mini2440.git] / usr.bin / tn3270 / ctlr / oia.h
blobc61e97274cca07fd58a6927733c5f1301e8b12d5
1 /* $NetBSD: oia.h,v 1.5 2002/06/13 23:41:19 wiz Exp $ */
3 /*-
4 * Copyright (c) 1988 The Regents of the University of California.
5 * All rights reserved.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. Neither the name of the University nor the names of its contributors
16 * may be used to endorse or promote products derived from this software
17 * without specific prior written permission.
19 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE.
31 * from: @(#)oia.h 4.2 (Berkeley) 4/26/91
35 * This file describes the Operator Information Area in the 3270.
37 * Our OIA looks like that used by the 3270 PC and PC 3270 products.
40 #define INCLUDED_OIA
42 typedef struct {
43 char
44 online_ownership,
45 character_selection,
46 shift_state,
47 pss_group_1,
48 highlight_group_1,
49 color_group_1,
50 insert,
51 input_inhibited[5],
52 pss_group_2,
53 highlight_group_2,
54 color_group_2,
55 comm_error_reminder,
56 printer_status,
57 reserved_group_14,
58 reserved_group_15,
59 autokey_play_record_status,
60 autokey_abort_pause_status,
61 enlarge_state;
62 } OIA;
64 /* Bits in online_ownership */
65 #define OIA_SETUP 0x80
66 #define OIA_TEST 0x40
67 #define OIA_SSCP_LU 0x20
68 #define OIA_LU_LU 0x10
69 #define OIA_UNOWNED 0x08
70 #define OIA_SUBSYSTEM_READY 0x04
72 /* Bit in character_selection */
73 #define OIA_EXTENDED_SELECT 0x80
74 #define OIA_APL 0x40
75 #define OIA_KANA 0x20
76 #define OIA_ALPHA 0x10
77 #define OIA_TEXT 0x08
79 /* Bits in shift_state */
80 #define OIA_NUMERIC 0x80
81 #define OIA_UPPER_SHIFT 0x40
83 /* Bits in pss_group_1, highlight_group_1, and color_group_1 */
84 #define OIA_SELECTABLE 0x80
85 #define OIA_FIELD_INHERIT 0x40
87 /* Bits in insert */
88 #define OIA_INSERT_MODE 0x80
90 /* We define this to be a 'long' followed by a 'char' (5 bytes) */
92 #define OIA_NON_RESETTABLE 0x80
93 #define OIA_SECURITY_KEY 0x40
94 #define OIA_MACHINE_CHECK 0x20
95 #define OIA_COMM_CHECK 0x10
96 #define OIA_PROGRAM_CHECK 0x08
97 #define OIA_RETRY 0x04
98 #define OIA_DEVICE_NOT_WORKING 0x02
99 #define OIA_DEVICE_VERY_BUSY 0x01
101 #define OIA_DEVICE_BUSY 0x80
102 #define OIA_TERMINAL_WAIT 0x40
103 #define OIA_MINUS_SYMBOL 0x20
104 #define OIA_MINUS_FUNCTION 0x10
105 #define OIA_TOO_MUCH_ENTERED 0x08
106 #define OIA_NOT_ENOUGH_ENTERED 0x04
107 #define OIA_WRONG_NUMBER 0x02
108 #define OIA_NUMERIC_FIELD 0x01
110 #define OIA_OP_UNAUTHORIZED 0x80
111 #define OIA_OP_UNAUTHORIZED_MIN 0x40
112 #define OIA_INVALID_DEAD_KEY_COMBO 0x20
113 #define OIA_WRONG_PLACE 0x10
115 #define OIA_MESSAGE_PENDING 0x80
116 #define OIA_PARTITION_WAIT 0x40
117 #define OIA_SYSTEM_WAIT 0x20
118 #define OIA_HARDWARE_MISMATCH 0x10
119 #define OIA_LOGICAL_TERM_NOT_CONF 0x08
122 #define OIA_AUTOKEY_INHIBIT 0x80
123 #define OIA_API_INHIBIT 0x40
125 /* Bits in pss_group_2 */
126 #define OIA_PS_SELECTED 0x80
127 #define OIA_PC_DISPLAY_DISABLE 0x40
129 /* Bits in highlight_group_2 and color_group_2 */
130 #define OIA_SELECTED 0x80
132 /* Bits in comm_error_reminder */
133 #define OIA_COMM_ERROR 0x80
134 #define OIA_RTM 0x40
136 /* Bits in printer_status */
137 #define OIA_PRINT_NOT_CUSTOM 0x80
138 #define OIA_PRINTER_MALFUNCTION 0x40
139 #define OIA_PRINTER_PRINTING 0x20
140 #define OIA_ASSIGN_PRINTER 0x10
141 #define OIA_WHAT_PRINTER 0x08
142 #define OIA_PRINTER_ASSIGNMENT 0x04
144 /* Bits in autokey_play_record_status */
145 #define OIA_PLAY 0x80
146 #define OIA_RECORD 0x40
148 /* Bits in autokey_abort_pause_status */
149 #define OIA_RECORDING_OVERFLOW 0x80
150 #define OIA_PAUSE 0x40
152 /* Bits in enlarge_state */
153 #define OIA_WINDOW_IS_ENLARGED 0x80
155 /* Define functions to set and read the oia */
157 #define SetOiaOnlineA(oia) SetOiaMyJob((oia)) /* Side-effect */
158 #define ResetOiaOnlineA(oia) \
159 /* Nothing defined for this */
161 #define IsOiaReady3274(oia) ((oia)->online_ownership&OIA_SUBSYSTEM_READY)
162 #define ResetOiaReady3274(oia) (oia)->online_ownership &= ~OIA_SUBSYSTEM_READY
163 #define SetOiaReady3274(oia) (oia)->online_ownership |= OIA_SUBSYSTEM_READY
165 #define IsOiaMyJob(oia) ((oia)->online_ownership&OIA_LU_LU)
166 #define ResetOiaMyJob(oia) (oia)->online_ownership &= ~OIA_LU_LU
167 #define SetOiaMyJob(oia) (oia)->online_ownership |= OIA_LU_LU
169 #define IsOiaInsert(oia) ((oia)->online_ownership&OIA_INSERT_MODE)
170 #define ResetOiaInsert(oia) (oia)->online_ownership &= ~OIA_INSERT_MODE
171 #define SetOiaInsert(oia) (oia)->online_ownership |= OIA_INSERT_MODE
173 #define IsOiaSystemLocked(oia) ((oia)->input_inhibited[3]&OIA_SYSTEM_WAIT)
174 #define ResetOiaSystemLocked(oia) \
175 (oia)->input_inhibited[3] &= ~OIA_SYSTEM_WAIT
176 #define SetOiaSystemLocked(oia) (oia)->input_inhibited[3] |= OIA_SYSTEM_WAIT
178 #define IsOiaTWait(oia) ((oia)->input_inhibited[1]&OIA_TERMINAL_WAIT)
179 #define ResetOiaTWait(oia) (oia)->input_inhibited[1] &= ~OIA_TERMINAL_WAIT
180 #define SetOiaTWait(oia) (oia)->input_inhibited[1] |= OIA_TERMINAL_WAIT
182 #define IsOiaApiInhibit(oia) ((oia)->input_inhibited[4] & OIA_API_INHIBIT)
183 #define ResetOiaApiInhibit(oia) ((oia)->input_inhibited[4] &= ~OIA_API_INHIBIT)
184 #define SetOiaApiInhibit(oia) ((oia)->input_inhibited[4] |= OIA_API_INHIBIT)
186 /* A macro to let the world know that someone has modified the OIA. */
187 #define SetOiaModified() oia_modified = 1
188 #define SetPsModified() ps_modified = 1
190 /* oia.c */
191 void init_oia(void);