xref: /csrg-svn/libexec/getty/gettytab.h (revision 66519)
119059Sdist /*
2*66519Sbostic  * Copyright (c) 1983, 1993, 1994
361429Sbostic  *	The Regents of the University of California.  All rights reserved.
419059Sdist  *
542670Sbostic  * %sccs.include.redist.c%
636929Sbostic  *
7*66519Sbostic  *	@(#)gettytab.h	8.2 (Berkeley) 03/30/94
819059Sdist  */
913793Ssam 
1013793Ssam /*
1113793Ssam  * Getty description definitions.
1213793Ssam  */
1313793Ssam struct	gettystrs {
1413793Ssam 	char	*field;		/* name to lookup in gettytab */
1513793Ssam 	char	*defalt;	/* value we find by looking in defaults */
1613793Ssam 	char	*value;		/* value that we find there */
1713793Ssam };
1813793Ssam 
1913793Ssam struct	gettynums {
2013793Ssam 	char	*field;		/* name to lookup */
2113793Ssam 	long	defalt;		/* number we find in defaults */
2213793Ssam 	long	value;		/* number we find there */
2313793Ssam 	int	set;		/* we actually got this one */
2413793Ssam };
2513793Ssam 
2613793Ssam struct gettyflags {
2713793Ssam 	char	*field;		/* name to lookup */
2813793Ssam 	char	invrt;		/* name existing in gettytab --> false */
2913793Ssam 	char	defalt;		/* true/false in defaults */
3013793Ssam 	char	value;		/* true/false flag */
3113793Ssam 	char	set;		/* we found it */
3213793Ssam };
3313793Ssam 
3413793Ssam /*
3513793Ssam  * String values.
3613793Ssam  */
3713793Ssam #define	NX	gettystrs[0].value
3813793Ssam #define	CL	gettystrs[1].value
3913793Ssam #define IM	gettystrs[2].value
4013793Ssam #define	LM	gettystrs[3].value
4113793Ssam #define	ER	gettystrs[4].value
4213793Ssam #define	KL	gettystrs[5].value
4313793Ssam #define	ET	gettystrs[6].value
4413793Ssam #define	PC	gettystrs[7].value
4513793Ssam #define	TT	gettystrs[8].value
4613793Ssam #define	EV	gettystrs[9].value
4713793Ssam #define	LO	gettystrs[10].value
4813793Ssam #define HN	gettystrs[11].value
4913793Ssam #define HE	gettystrs[12].value
5013793Ssam #define IN	gettystrs[13].value
5113793Ssam #define QU	gettystrs[14].value
5213793Ssam #define XN	gettystrs[15].value
5313793Ssam #define XF	gettystrs[16].value
5413793Ssam #define BK	gettystrs[17].value
5513793Ssam #define SU	gettystrs[18].value
5613793Ssam #define DS	gettystrs[19].value
5713793Ssam #define RP	gettystrs[20].value
5813793Ssam #define FL	gettystrs[21].value
5913793Ssam #define WE	gettystrs[22].value
6013793Ssam #define LN	gettystrs[23].value
6113793Ssam 
6213793Ssam /*
6313793Ssam  * Numeric definitions.
6413793Ssam  */
6513793Ssam #define	IS	gettynums[0].value
6613793Ssam #define	OS	gettynums[1].value
6713793Ssam #define	SP	gettynums[2].value
6813793Ssam #define	ND	gettynums[3].value
6913793Ssam #define	CD	gettynums[4].value
7013793Ssam #define	TD	gettynums[5].value
7113793Ssam #define	FD	gettynums[6].value
7213793Ssam #define	BD	gettynums[7].value
7313793Ssam #define	TO	gettynums[8].value
7413793Ssam #define	F0	gettynums[9].value
7513793Ssam #define	F0set	gettynums[9].set
7613793Ssam #define	F1	gettynums[10].value
7713793Ssam #define	F1set	gettynums[10].set
7813793Ssam #define	F2	gettynums[11].value
7913793Ssam #define	F2set	gettynums[11].set
8013885Ssam #define	PF	gettynums[12].value
8113793Ssam 
8213793Ssam /*
8313793Ssam  * Boolean values.
8413793Ssam  */
8513793Ssam #define	HT	gettyflags[0].value
8613793Ssam #define	NL	gettyflags[1].value
8713793Ssam #define	EP	gettyflags[2].value
8813829Skre #define	EPset	gettyflags[2].set
8913793Ssam #define	OP	gettyflags[3].value
90*66519Sbostic #define	OPset	gettyflags[3].set
9113793Ssam #define	AP	gettyflags[4].value
92*66519Sbostic #define	APset	gettyflags[4].set
9313793Ssam #define	EC	gettyflags[5].value
9413793Ssam #define	CO	gettyflags[6].value
9513793Ssam #define	CB	gettyflags[7].value
9613793Ssam #define	CK	gettyflags[8].value
9713793Ssam #define	CE	gettyflags[9].value
9813793Ssam #define	PE	gettyflags[10].value
9913793Ssam #define	RW	gettyflags[11].value
10013793Ssam #define	XC	gettyflags[12].value
10113793Ssam #define	LC	gettyflags[13].value
10213793Ssam #define	UC	gettyflags[14].value
10313793Ssam #define	IG	gettyflags[15].value
10413793Ssam #define	PS	gettyflags[16].value
10513793Ssam #define	HC	gettyflags[17].value
10613829Skre #define UB	gettyflags[18].value
10717925Sralph #define AB	gettyflags[19].value
10825730Smckusick #define DX	gettyflags[20].value
10947664Swilliam #define	NP	gettyflags[21].value
11013793Ssam 
11160091Sbostic int	getent __P((char *, char *));
11260091Sbostic long	getnum __P((char *));
11360091Sbostic int	getflag __P((char *));
11460091Sbostic char	*getstr __P((char *, char **));
11513793Ssam 
11613793Ssam extern	struct gettyflags gettyflags[];
11713793Ssam extern	struct gettynums gettynums[];
11813793Ssam extern	struct gettystrs gettystrs[];
11913793Ssam extern	int hopcount;
120