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