Home | History | Annotate | Line # | Download | only in getty
gettytab.h revision 1.1
      1 /*
      2  * Copyright (c) 1983 The Regents of the University of California.
      3  * 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  *	@(#)gettytab.h	5.5 (Berkeley) 3/27/91
     34  */
     35 
     36 /*
     37  * Getty description definitions.
     38  */
     39 struct	gettystrs {
     40 	char	*field;		/* name to lookup in gettytab */
     41 	char	*defalt;	/* value we find by looking in defaults */
     42 	char	*value;		/* value that we find there */
     43 };
     44 
     45 struct	gettynums {
     46 	char	*field;		/* name to lookup */
     47 	long	defalt;		/* number we find in defaults */
     48 	long	value;		/* number we find there */
     49 	int	set;		/* we actually got this one */
     50 };
     51 
     52 struct gettyflags {
     53 	char	*field;		/* name to lookup */
     54 	char	invrt;		/* name existing in gettytab --> false */
     55 	char	defalt;		/* true/false in defaults */
     56 	char	value;		/* true/false flag */
     57 	char	set;		/* we found it */
     58 };
     59 
     60 /*
     61  * String values.
     62  */
     63 #define	NX	gettystrs[0].value
     64 #define	CL	gettystrs[1].value
     65 #define IM	gettystrs[2].value
     66 #define	LM	gettystrs[3].value
     67 #define	ER	gettystrs[4].value
     68 #define	KL	gettystrs[5].value
     69 #define	ET	gettystrs[6].value
     70 #define	PC	gettystrs[7].value
     71 #define	TT	gettystrs[8].value
     72 #define	EV	gettystrs[9].value
     73 #define	LO	gettystrs[10].value
     74 #define HN	gettystrs[11].value
     75 #define HE	gettystrs[12].value
     76 #define IN	gettystrs[13].value
     77 #define QU	gettystrs[14].value
     78 #define XN	gettystrs[15].value
     79 #define XF	gettystrs[16].value
     80 #define BK	gettystrs[17].value
     81 #define SU	gettystrs[18].value
     82 #define DS	gettystrs[19].value
     83 #define RP	gettystrs[20].value
     84 #define FL	gettystrs[21].value
     85 #define WE	gettystrs[22].value
     86 #define LN	gettystrs[23].value
     87 
     88 /*
     89  * Numeric definitions.
     90  */
     91 #define	IS	gettynums[0].value
     92 #define	OS	gettynums[1].value
     93 #define	SP	gettynums[2].value
     94 #define	ND	gettynums[3].value
     95 #define	CD	gettynums[4].value
     96 #define	TD	gettynums[5].value
     97 #define	FD	gettynums[6].value
     98 #define	BD	gettynums[7].value
     99 #define	TO	gettynums[8].value
    100 #define	F0	gettynums[9].value
    101 #define	F0set	gettynums[9].set
    102 #define	F1	gettynums[10].value
    103 #define	F1set	gettynums[10].set
    104 #define	F2	gettynums[11].value
    105 #define	F2set	gettynums[11].set
    106 #define	PF	gettynums[12].value
    107 
    108 /*
    109  * Boolean values.
    110  */
    111 #define	HT	gettyflags[0].value
    112 #define	NL	gettyflags[1].value
    113 #define	EP	gettyflags[2].value
    114 #define	EPset	gettyflags[2].set
    115 #define	OP	gettyflags[3].value
    116 #define	OPset	gettyflags[2].set
    117 #define	AP	gettyflags[4].value
    118 #define	APset	gettyflags[2].set
    119 #define	EC	gettyflags[5].value
    120 #define	CO	gettyflags[6].value
    121 #define	CB	gettyflags[7].value
    122 #define	CK	gettyflags[8].value
    123 #define	CE	gettyflags[9].value
    124 #define	PE	gettyflags[10].value
    125 #define	RW	gettyflags[11].value
    126 #define	XC	gettyflags[12].value
    127 #define	LC	gettyflags[13].value
    128 #define	UC	gettyflags[14].value
    129 #define	IG	gettyflags[15].value
    130 #define	PS	gettyflags[16].value
    131 #define	HC	gettyflags[17].value
    132 #define UB	gettyflags[18].value
    133 #define AB	gettyflags[19].value
    134 #define DX	gettyflags[20].value
    135 #define	NP	gettyflags[21].value
    136 
    137 int	getent();
    138 long	getnum();
    139 int	getflag();
    140 char	*getstr();
    141 
    142 extern	struct gettyflags gettyflags[];
    143 extern	struct gettynums gettynums[];
    144 extern	struct gettystrs gettystrs[];
    145 extern	int hopcount;
    146