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