]> git.saurik.com Git - apple/system_cmds.git/blob - getty.tproj/gettytab.h
system_cmds-230.0.2.tar.gz
[apple/system_cmds.git] / getty.tproj / gettytab.h
1 /*
2 * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
7 *
8 * This file contains Original Code and/or Modifications of Original Code
9 * as defined in and that are subject to the Apple Public Source License
10 * Version 2.0 (the 'License'). You may not use this file except in
11 * compliance with the License. Please obtain a copy of the License at
12 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * file.
14 *
15 * The Original Code and all software distributed under the License are
16 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
20 * Please see the License for the specific language governing rights and
21 * limitations under the License.
22 *
23 * @APPLE_LICENSE_HEADER_END@
24 */
25 /*
26 * Copyright (c) 1983, 1993, 1994
27 * The Regents of the University of California. All rights reserved.
28 *
29 * Redistribution and use in source and binary forms, with or without
30 * modification, are permitted provided that the following conditions
31 * are met:
32 * 1. Redistributions of source code must retain the above copyright
33 * notice, this list of conditions and the following disclaimer.
34 * 2. Redistributions in binary form must reproduce the above copyright
35 * notice, this list of conditions and the following disclaimer in the
36 * documentation and/or other materials provided with the distribution.
37 * 3. All advertising materials mentioning features or use of this software
38 * must display the following acknowledgement:
39 * This product includes software developed by the University of
40 * California, Berkeley and its contributors.
41 * 4. Neither the name of the University nor the names of its contributors
42 * may be used to endorse or promote products derived from this software
43 * without specific prior written permission.
44 *
45 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
46 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
47 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
48 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
49 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
50 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
51 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
52 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
53 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
54 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
55 * SUCH DAMAGE.
56 *
57 * from: @(#)gettytab.h 8.2 (Berkeley) 3/30/94
58 * $Id: gettytab.h,v 1.1.1.2 2000/01/11 02:10:14 wsanchez Exp $
59 */
60
61 /*
62 * Getty description definitions.
63 */
64 struct gettystrs {
65 char *field; /* name to lookup in gettytab */
66 char *defalt; /* value we find by looking in defaults */
67 char *value; /* value that we find there */
68 };
69
70 struct gettynums {
71 char *field; /* name to lookup */
72 long defalt; /* number we find in defaults */
73 long value; /* number we find there */
74 int set; /* we actually got this one */
75 };
76
77 struct gettyflags {
78 char *field; /* name to lookup */
79 char invrt; /* name existing in gettytab --> false */
80 char defalt; /* true/false in defaults */
81 char value; /* true/false flag */
82 char set; /* we found it */
83 };
84
85 /*
86 * String values.
87 */
88 #define NX gettystrs[0].value
89 #define CL gettystrs[1].value
90 #define IM gettystrs[2].value
91 #define LM gettystrs[3].value
92 #define ER gettystrs[4].value
93 #define KL gettystrs[5].value
94 #define ET gettystrs[6].value
95 #define PC gettystrs[7].value
96 #define TT gettystrs[8].value
97 #define EV gettystrs[9].value
98 #define LO gettystrs[10].value
99 #define HN gettystrs[11].value
100 #define HE gettystrs[12].value
101 #define IN gettystrs[13].value
102 #define QU gettystrs[14].value
103 #define XN gettystrs[15].value
104 #define XF gettystrs[16].value
105 #define BK gettystrs[17].value
106 #define SU gettystrs[18].value
107 #define DS gettystrs[19].value
108 #define RP gettystrs[20].value
109 #define FL gettystrs[21].value
110 #define WE gettystrs[22].value
111 #define LN gettystrs[23].value
112
113 /*
114 * Numeric definitions.
115 */
116 #define IS gettynums[0].value
117 #define OS gettynums[1].value
118 #define SP gettynums[2].value
119 #define ND gettynums[3].value
120 #define CD gettynums[4].value
121 #define TD gettynums[5].value
122 #define FD gettynums[6].value
123 #define BD gettynums[7].value
124 #define TO gettynums[8].value
125 #define F0 gettynums[9].value
126 #define F0set gettynums[9].set
127 #define F1 gettynums[10].value
128 #define F1set gettynums[10].set
129 #define F2 gettynums[11].value
130 #define F2set gettynums[11].set
131 #define PF gettynums[12].value
132 #define C0 gettynums[13].value
133 #define C0set gettynums[13].set
134 #define C1 gettynums[14].value
135 #define C1set gettynums[14].set
136 #define C2 gettynums[15].value
137 #define C2set gettynums[15].set
138 #define I0 gettynums[16].value
139 #define I0set gettynums[16].set
140 #define I1 gettynums[17].value
141 #define I1set gettynums[17].set
142 #define I2 gettynums[18].value
143 #define I2set gettynums[18].set
144 #define L0 gettynums[19].value
145 #define L0set gettynums[19].set
146 #define L1 gettynums[20].value
147 #define L1set gettynums[20].set
148 #define L2 gettynums[21].value
149 #define L2set gettynums[21].set
150 #define O0 gettynums[22].value
151 #define O0set gettynums[22].set
152 #define O1 gettynums[23].value
153 #define O1set gettynums[23].set
154 #define O2 gettynums[24].value
155 #define O2set gettynums[24].set
156
157 /*
158 * Boolean values.
159 */
160 #define HT gettyflags[0].value
161 #define NL gettyflags[1].value
162 #define EP gettyflags[2].value
163 #define EPset gettyflags[2].set
164 #define OP gettyflags[3].value
165 #define OPset gettyflags[3].set
166 #define AP gettyflags[4].value
167 #define APset gettyflags[4].set
168 #define EC gettyflags[5].value
169 #define CO gettyflags[6].value
170 #define CB gettyflags[7].value
171 #define CK gettyflags[8].value
172 #define CE gettyflags[9].value
173 #define PE gettyflags[10].value
174 #define RW gettyflags[11].value
175 #define XC gettyflags[12].value
176 #define LC gettyflags[13].value
177 #define UC gettyflags[14].value
178 #define IG gettyflags[15].value
179 #define PS gettyflags[16].value
180 #define HC gettyflags[17].value
181 #define UB gettyflags[18].value
182 #define AB gettyflags[19].value
183 #define DX gettyflags[20].value
184 #define NP gettyflags[21].value
185 #define MB gettyflags[22].value
186
187 int getent __P((char *, char *));
188 long getnum __P((char *));
189 int getflag __P((char *));
190 char *getstr __P((char *, char **));
191
192 extern struct gettyflags gettyflags[];
193 extern struct gettynums gettynums[];
194 extern struct gettystrs gettystrs[];
195 extern int hopcount;