gettytab.h revision 1592
11592Srgrimes/*
21592Srgrimes * Copyright (c) 1983, 1993, 1994
31592Srgrimes *	The Regents of the University of California.  All rights reserved.
41592Srgrimes *
51592Srgrimes * Redistribution and use in source and binary forms, with or without
61592Srgrimes * modification, are permitted provided that the following conditions
71592Srgrimes * are met:
81592Srgrimes * 1. Redistributions of source code must retain the above copyright
91592Srgrimes *    notice, this list of conditions and the following disclaimer.
101592Srgrimes * 2. Redistributions in binary form must reproduce the above copyright
111592Srgrimes *    notice, this list of conditions and the following disclaimer in the
121592Srgrimes *    documentation and/or other materials provided with the distribution.
131592Srgrimes * 3. All advertising materials mentioning features or use of this software
141592Srgrimes *    must display the following acknowledgement:
151592Srgrimes *	This product includes software developed by the University of
161592Srgrimes *	California, Berkeley and its contributors.
171592Srgrimes * 4. Neither the name of the University nor the names of its contributors
181592Srgrimes *    may be used to endorse or promote products derived from this software
191592Srgrimes *    without specific prior written permission.
201592Srgrimes *
211592Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
221592Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
231592Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
241592Srgrimes * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
251592Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
261592Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
271592Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
281592Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
291592Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
301592Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
311592Srgrimes * SUCH DAMAGE.
321592Srgrimes *
331592Srgrimes *	@(#)gettytab.h	8.2 (Berkeley) 3/30/94
341592Srgrimes */
351592Srgrimes
361592Srgrimes/*
371592Srgrimes * Getty description definitions.
381592Srgrimes */
391592Srgrimesstruct	gettystrs {
401592Srgrimes	char	*field;		/* name to lookup in gettytab */
411592Srgrimes	char	*defalt;	/* value we find by looking in defaults */
421592Srgrimes	char	*value;		/* value that we find there */
431592Srgrimes};
441592Srgrimes
451592Srgrimesstruct	gettynums {
461592Srgrimes	char	*field;		/* name to lookup */
471592Srgrimes	long	defalt;		/* number we find in defaults */
481592Srgrimes	long	value;		/* number we find there */
491592Srgrimes	int	set;		/* we actually got this one */
501592Srgrimes};
511592Srgrimes
521592Srgrimesstruct gettyflags {
531592Srgrimes	char	*field;		/* name to lookup */
541592Srgrimes	char	invrt;		/* name existing in gettytab --> false */
551592Srgrimes	char	defalt;		/* true/false in defaults */
561592Srgrimes	char	value;		/* true/false flag */
571592Srgrimes	char	set;		/* we found it */
581592Srgrimes};
591592Srgrimes
601592Srgrimes/*
611592Srgrimes * String values.
621592Srgrimes */
631592Srgrimes#define	NX	gettystrs[0].value
641592Srgrimes#define	CL	gettystrs[1].value
651592Srgrimes#define IM	gettystrs[2].value
661592Srgrimes#define	LM	gettystrs[3].value
671592Srgrimes#define	ER	gettystrs[4].value
681592Srgrimes#define	KL	gettystrs[5].value
691592Srgrimes#define	ET	gettystrs[6].value
701592Srgrimes#define	PC	gettystrs[7].value
711592Srgrimes#define	TT	gettystrs[8].value
721592Srgrimes#define	EV	gettystrs[9].value
731592Srgrimes#define	LO	gettystrs[10].value
741592Srgrimes#define HN	gettystrs[11].value
751592Srgrimes#define HE	gettystrs[12].value
761592Srgrimes#define IN	gettystrs[13].value
771592Srgrimes#define QU	gettystrs[14].value
781592Srgrimes#define XN	gettystrs[15].value
791592Srgrimes#define XF	gettystrs[16].value
801592Srgrimes#define BK	gettystrs[17].value
811592Srgrimes#define SU	gettystrs[18].value
821592Srgrimes#define DS	gettystrs[19].value
831592Srgrimes#define RP	gettystrs[20].value
841592Srgrimes#define FL	gettystrs[21].value
851592Srgrimes#define WE	gettystrs[22].value
861592Srgrimes#define LN	gettystrs[23].value
871592Srgrimes
881592Srgrimes/*
891592Srgrimes * Numeric definitions.
901592Srgrimes */
911592Srgrimes#define	IS	gettynums[0].value
921592Srgrimes#define	OS	gettynums[1].value
931592Srgrimes#define	SP	gettynums[2].value
941592Srgrimes#define	ND	gettynums[3].value
951592Srgrimes#define	CD	gettynums[4].value
961592Srgrimes#define	TD	gettynums[5].value
971592Srgrimes#define	FD	gettynums[6].value
981592Srgrimes#define	BD	gettynums[7].value
991592Srgrimes#define	TO	gettynums[8].value
1001592Srgrimes#define	F0	gettynums[9].value
1011592Srgrimes#define	F0set	gettynums[9].set
1021592Srgrimes#define	F1	gettynums[10].value
1031592Srgrimes#define	F1set	gettynums[10].set
1041592Srgrimes#define	F2	gettynums[11].value
1051592Srgrimes#define	F2set	gettynums[11].set
1061592Srgrimes#define	PF	gettynums[12].value
1071592Srgrimes
1081592Srgrimes/*
1091592Srgrimes * Boolean values.
1101592Srgrimes */
1111592Srgrimes#define	HT	gettyflags[0].value
1121592Srgrimes#define	NL	gettyflags[1].value
1131592Srgrimes#define	EP	gettyflags[2].value
1141592Srgrimes#define	EPset	gettyflags[2].set
1151592Srgrimes#define	OP	gettyflags[3].value
1161592Srgrimes#define	OPset	gettyflags[3].set
1171592Srgrimes#define	AP	gettyflags[4].value
1181592Srgrimes#define	APset	gettyflags[4].set
1191592Srgrimes#define	EC	gettyflags[5].value
1201592Srgrimes#define	CO	gettyflags[6].value
1211592Srgrimes#define	CB	gettyflags[7].value
1221592Srgrimes#define	CK	gettyflags[8].value
1231592Srgrimes#define	CE	gettyflags[9].value
1241592Srgrimes#define	PE	gettyflags[10].value
1251592Srgrimes#define	RW	gettyflags[11].value
1261592Srgrimes#define	XC	gettyflags[12].value
1271592Srgrimes#define	LC	gettyflags[13].value
1281592Srgrimes#define	UC	gettyflags[14].value
1291592Srgrimes#define	IG	gettyflags[15].value
1301592Srgrimes#define	PS	gettyflags[16].value
1311592Srgrimes#define	HC	gettyflags[17].value
1321592Srgrimes#define UB	gettyflags[18].value
1331592Srgrimes#define AB	gettyflags[19].value
1341592Srgrimes#define DX	gettyflags[20].value
1351592Srgrimes#define	NP	gettyflags[21].value
1361592Srgrimes
1371592Srgrimesint	getent __P((char *, char *));
1381592Srgrimeslong	getnum __P((char *));
1391592Srgrimesint	getflag __P((char *));
1401592Srgrimeschar	*getstr __P((char *, char **));
1411592Srgrimes
1421592Srgrimesextern	struct gettyflags gettyflags[];
1431592Srgrimesextern	struct gettynums gettynums[];
1441592Srgrimesextern	struct gettystrs gettystrs[];
1451592Srgrimesextern	int hopcount;
146