gettytab.h revision 1.3 1 1.1 cgd /*
2 1.1 cgd * Copyright (c) 1983 The Regents of the University of California.
3 1.1 cgd * All rights reserved.
4 1.1 cgd *
5 1.1 cgd * Redistribution and use in source and binary forms, with or without
6 1.1 cgd * modification, are permitted provided that the following conditions
7 1.1 cgd * are met:
8 1.1 cgd * 1. Redistributions of source code must retain the above copyright
9 1.1 cgd * notice, this list of conditions and the following disclaimer.
10 1.1 cgd * 2. Redistributions in binary form must reproduce the above copyright
11 1.1 cgd * notice, this list of conditions and the following disclaimer in the
12 1.1 cgd * documentation and/or other materials provided with the distribution.
13 1.1 cgd * 3. All advertising materials mentioning features or use of this software
14 1.1 cgd * must display the following acknowledgement:
15 1.1 cgd * This product includes software developed by the University of
16 1.1 cgd * California, Berkeley and its contributors.
17 1.1 cgd * 4. Neither the name of the University nor the names of its contributors
18 1.1 cgd * may be used to endorse or promote products derived from this software
19 1.1 cgd * without specific prior written permission.
20 1.1 cgd *
21 1.1 cgd * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22 1.1 cgd * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 1.1 cgd * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 1.1 cgd * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 1.1 cgd * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 1.1 cgd * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 1.1 cgd * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 1.1 cgd * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 1.1 cgd * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 1.1 cgd * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 1.1 cgd * SUCH DAMAGE.
32 1.1 cgd *
33 1.2 mycroft * from: @(#)gettytab.h 5.5 (Berkeley) 3/27/91
34 1.3 cgd * $Id: gettytab.h,v 1.3 1994/03/23 03:36:03 cgd Exp $
35 1.1 cgd */
36 1.1 cgd
37 1.1 cgd /*
38 1.1 cgd * Getty description definitions.
39 1.1 cgd */
40 1.1 cgd struct gettystrs {
41 1.1 cgd char *field; /* name to lookup in gettytab */
42 1.1 cgd char *defalt; /* value we find by looking in defaults */
43 1.1 cgd char *value; /* value that we find there */
44 1.1 cgd };
45 1.1 cgd
46 1.1 cgd struct gettynums {
47 1.1 cgd char *field; /* name to lookup */
48 1.1 cgd long defalt; /* number we find in defaults */
49 1.1 cgd long value; /* number we find there */
50 1.1 cgd int set; /* we actually got this one */
51 1.1 cgd };
52 1.1 cgd
53 1.1 cgd struct gettyflags {
54 1.1 cgd char *field; /* name to lookup */
55 1.1 cgd char invrt; /* name existing in gettytab --> false */
56 1.1 cgd char defalt; /* true/false in defaults */
57 1.1 cgd char value; /* true/false flag */
58 1.1 cgd char set; /* we found it */
59 1.1 cgd };
60 1.1 cgd
61 1.1 cgd /*
62 1.1 cgd * String values.
63 1.1 cgd */
64 1.1 cgd #define NX gettystrs[0].value
65 1.1 cgd #define CL gettystrs[1].value
66 1.1 cgd #define IM gettystrs[2].value
67 1.1 cgd #define LM gettystrs[3].value
68 1.1 cgd #define ER gettystrs[4].value
69 1.1 cgd #define KL gettystrs[5].value
70 1.1 cgd #define ET gettystrs[6].value
71 1.1 cgd #define PC gettystrs[7].value
72 1.1 cgd #define TT gettystrs[8].value
73 1.1 cgd #define EV gettystrs[9].value
74 1.1 cgd #define LO gettystrs[10].value
75 1.1 cgd #define HN gettystrs[11].value
76 1.1 cgd #define HE gettystrs[12].value
77 1.1 cgd #define IN gettystrs[13].value
78 1.1 cgd #define QU gettystrs[14].value
79 1.1 cgd #define XN gettystrs[15].value
80 1.1 cgd #define XF gettystrs[16].value
81 1.1 cgd #define BK gettystrs[17].value
82 1.1 cgd #define SU gettystrs[18].value
83 1.1 cgd #define DS gettystrs[19].value
84 1.1 cgd #define RP gettystrs[20].value
85 1.1 cgd #define FL gettystrs[21].value
86 1.1 cgd #define WE gettystrs[22].value
87 1.1 cgd #define LN gettystrs[23].value
88 1.1 cgd
89 1.1 cgd /*
90 1.1 cgd * Numeric definitions.
91 1.1 cgd */
92 1.1 cgd #define IS gettynums[0].value
93 1.1 cgd #define OS gettynums[1].value
94 1.1 cgd #define SP gettynums[2].value
95 1.1 cgd #define ND gettynums[3].value
96 1.1 cgd #define CD gettynums[4].value
97 1.1 cgd #define TD gettynums[5].value
98 1.1 cgd #define FD gettynums[6].value
99 1.1 cgd #define BD gettynums[7].value
100 1.1 cgd #define TO gettynums[8].value
101 1.1 cgd #define F0 gettynums[9].value
102 1.1 cgd #define F0set gettynums[9].set
103 1.1 cgd #define F1 gettynums[10].value
104 1.1 cgd #define F1set gettynums[10].set
105 1.1 cgd #define F2 gettynums[11].value
106 1.1 cgd #define F2set gettynums[11].set
107 1.1 cgd #define PF gettynums[12].value
108 1.1 cgd
109 1.1 cgd /*
110 1.1 cgd * Boolean values.
111 1.1 cgd */
112 1.1 cgd #define HT gettyflags[0].value
113 1.1 cgd #define NL gettyflags[1].value
114 1.1 cgd #define EP gettyflags[2].value
115 1.1 cgd #define EPset gettyflags[2].set
116 1.1 cgd #define OP gettyflags[3].value
117 1.3 cgd #define OPset gettyflags[3].set
118 1.1 cgd #define AP gettyflags[4].value
119 1.3 cgd #define APset gettyflags[4].set
120 1.1 cgd #define EC gettyflags[5].value
121 1.1 cgd #define CO gettyflags[6].value
122 1.1 cgd #define CB gettyflags[7].value
123 1.1 cgd #define CK gettyflags[8].value
124 1.1 cgd #define CE gettyflags[9].value
125 1.1 cgd #define PE gettyflags[10].value
126 1.1 cgd #define RW gettyflags[11].value
127 1.1 cgd #define XC gettyflags[12].value
128 1.1 cgd #define LC gettyflags[13].value
129 1.1 cgd #define UC gettyflags[14].value
130 1.1 cgd #define IG gettyflags[15].value
131 1.1 cgd #define PS gettyflags[16].value
132 1.1 cgd #define HC gettyflags[17].value
133 1.1 cgd #define UB gettyflags[18].value
134 1.1 cgd #define AB gettyflags[19].value
135 1.1 cgd #define DX gettyflags[20].value
136 1.1 cgd #define NP gettyflags[21].value
137 1.1 cgd
138 1.1 cgd int getent();
139 1.1 cgd long getnum();
140 1.1 cgd int getflag();
141 1.1 cgd char *getstr();
142 1.1 cgd
143 1.1 cgd extern struct gettyflags gettyflags[];
144 1.1 cgd extern struct gettynums gettynums[];
145 1.1 cgd extern struct gettystrs gettystrs[];
146 1.1 cgd extern int hopcount;
147