Home | History | Annotate | Line # | Download | only in getty
gettytab.h revision 1.7
      1  1.1  cgd /*
      2  1.7   pk  * Copyright (c) 1983, 1993, 1994
      3  1.7   pk  *	The Regents of the University of California.  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.7   pk  *	from: @(#)gettytab.h	8.2 (Berkeley) 3/30/94
     34  1.7   pk  *	$Id: gettytab.h,v 1.7 1994/08/17 20:10:34 pk 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.6   pk #define	C0	gettynums[13].value
    109  1.6   pk #define	C0set	gettynums[13].set
    110  1.6   pk #define	C1	gettynums[14].value
    111  1.6   pk #define	C1set	gettynums[14].set
    112  1.6   pk #define	C2	gettynums[15].value
    113  1.6   pk #define	C2set	gettynums[15].set
    114  1.6   pk #define	I0	gettynums[16].value
    115  1.6   pk #define	I0set	gettynums[16].set
    116  1.6   pk #define	I1	gettynums[17].value
    117  1.6   pk #define	I1set	gettynums[17].set
    118  1.6   pk #define	I2	gettynums[18].value
    119  1.6   pk #define	I2set	gettynums[18].set
    120  1.6   pk #define	L0	gettynums[19].value
    121  1.6   pk #define	L0set	gettynums[19].set
    122  1.6   pk #define	L1	gettynums[20].value
    123  1.6   pk #define	L1set	gettynums[20].set
    124  1.6   pk #define	L2	gettynums[21].value
    125  1.6   pk #define	L2set	gettynums[21].set
    126  1.6   pk #define	O0	gettynums[22].value
    127  1.6   pk #define	O0set	gettynums[22].set
    128  1.6   pk #define	O1	gettynums[23].value
    129  1.6   pk #define	O1set	gettynums[23].set
    130  1.6   pk #define	O2	gettynums[24].value
    131  1.6   pk #define	O2set	gettynums[24].set
    132  1.1  cgd 
    133  1.1  cgd /*
    134  1.1  cgd  * Boolean values.
    135  1.1  cgd  */
    136  1.1  cgd #define	HT	gettyflags[0].value
    137  1.1  cgd #define	NL	gettyflags[1].value
    138  1.1  cgd #define	EP	gettyflags[2].value
    139  1.1  cgd #define	EPset	gettyflags[2].set
    140  1.1  cgd #define	OP	gettyflags[3].value
    141  1.3  cgd #define	OPset	gettyflags[3].set
    142  1.1  cgd #define	AP	gettyflags[4].value
    143  1.3  cgd #define	APset	gettyflags[4].set
    144  1.1  cgd #define	EC	gettyflags[5].value
    145  1.1  cgd #define	CO	gettyflags[6].value
    146  1.1  cgd #define	CB	gettyflags[7].value
    147  1.1  cgd #define	CK	gettyflags[8].value
    148  1.1  cgd #define	CE	gettyflags[9].value
    149  1.1  cgd #define	PE	gettyflags[10].value
    150  1.1  cgd #define	RW	gettyflags[11].value
    151  1.1  cgd #define	XC	gettyflags[12].value
    152  1.1  cgd #define	LC	gettyflags[13].value
    153  1.1  cgd #define	UC	gettyflags[14].value
    154  1.1  cgd #define	IG	gettyflags[15].value
    155  1.1  cgd #define	PS	gettyflags[16].value
    156  1.1  cgd #define	HC	gettyflags[17].value
    157  1.1  cgd #define UB	gettyflags[18].value
    158  1.1  cgd #define AB	gettyflags[19].value
    159  1.1  cgd #define DX	gettyflags[20].value
    160  1.1  cgd #define	NP	gettyflags[21].value
    161  1.5  cgd #define	MB	gettyflags[22].value
    162  1.1  cgd 
    163  1.7   pk int	getent __P((char *, char *));
    164  1.7   pk long	getnum __P((char *));
    165  1.7   pk int	getflag __P((char *));
    166  1.7   pk char	*getstr __P((char *, char **));
    167  1.1  cgd 
    168  1.1  cgd extern	struct gettyflags gettyflags[];
    169  1.1  cgd extern	struct gettynums gettynums[];
    170  1.1  cgd extern	struct gettystrs gettystrs[];
    171  1.1  cgd extern	int hopcount;
    172