xref: /csrg-svn/libexec/getty/gettytab.h (revision 36929)
119059Sdist /*
2*36929Sbostic  * Copyright (c) 1983 The Regents of the University of California.
3*36929Sbostic  * All rights reserved.
419059Sdist  *
5*36929Sbostic  * Redistribution and use in source and binary forms are permitted
6*36929Sbostic  * provided that the above copyright notice and this paragraph are
7*36929Sbostic  * duplicated in all such forms and that any documentation,
8*36929Sbostic  * advertising materials, and other materials related to such
9*36929Sbostic  * distribution and use acknowledge that the software was developed
10*36929Sbostic  * by the University of California, Berkeley.  The name of the
11*36929Sbostic  * University may not be used to endorse or promote products derived
12*36929Sbostic  * from this software without specific prior written permission.
13*36929Sbostic  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14*36929Sbostic  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15*36929Sbostic  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
16*36929Sbostic  *
17*36929Sbostic  *	@(#)gettytab.h	5.3 (Berkeley) 02/27/89
1819059Sdist  */
1913793Ssam 
2013793Ssam /*
2113793Ssam  * Getty description definitions.
2213793Ssam  */
2313793Ssam struct	gettystrs {
2413793Ssam 	char	*field;		/* name to lookup in gettytab */
2513793Ssam 	char	*defalt;	/* value we find by looking in defaults */
2613793Ssam 	char	*value;		/* value that we find there */
2713793Ssam };
2813793Ssam 
2913793Ssam struct	gettynums {
3013793Ssam 	char	*field;		/* name to lookup */
3113793Ssam 	long	defalt;		/* number we find in defaults */
3213793Ssam 	long	value;		/* number we find there */
3313793Ssam 	int	set;		/* we actually got this one */
3413793Ssam };
3513793Ssam 
3613793Ssam struct gettyflags {
3713793Ssam 	char	*field;		/* name to lookup */
3813793Ssam 	char	invrt;		/* name existing in gettytab --> false */
3913793Ssam 	char	defalt;		/* true/false in defaults */
4013793Ssam 	char	value;		/* true/false flag */
4113793Ssam 	char	set;		/* we found it */
4213793Ssam };
4313793Ssam 
4413793Ssam /*
4513793Ssam  * String values.
4613793Ssam  */
4713793Ssam #define	NX	gettystrs[0].value
4813793Ssam #define	CL	gettystrs[1].value
4913793Ssam #define IM	gettystrs[2].value
5013793Ssam #define	LM	gettystrs[3].value
5113793Ssam #define	ER	gettystrs[4].value
5213793Ssam #define	KL	gettystrs[5].value
5313793Ssam #define	ET	gettystrs[6].value
5413793Ssam #define	PC	gettystrs[7].value
5513793Ssam #define	TT	gettystrs[8].value
5613793Ssam #define	EV	gettystrs[9].value
5713793Ssam #define	LO	gettystrs[10].value
5813793Ssam #define HN	gettystrs[11].value
5913793Ssam #define HE	gettystrs[12].value
6013793Ssam #define IN	gettystrs[13].value
6113793Ssam #define QU	gettystrs[14].value
6213793Ssam #define XN	gettystrs[15].value
6313793Ssam #define XF	gettystrs[16].value
6413793Ssam #define BK	gettystrs[17].value
6513793Ssam #define SU	gettystrs[18].value
6613793Ssam #define DS	gettystrs[19].value
6713793Ssam #define RP	gettystrs[20].value
6813793Ssam #define FL	gettystrs[21].value
6913793Ssam #define WE	gettystrs[22].value
7013793Ssam #define LN	gettystrs[23].value
7113793Ssam 
7213793Ssam /*
7313793Ssam  * Numeric definitions.
7413793Ssam  */
7513793Ssam #define	IS	gettynums[0].value
7613793Ssam #define	OS	gettynums[1].value
7713793Ssam #define	SP	gettynums[2].value
7813793Ssam #define	ND	gettynums[3].value
7913793Ssam #define	CD	gettynums[4].value
8013793Ssam #define	TD	gettynums[5].value
8113793Ssam #define	FD	gettynums[6].value
8213793Ssam #define	BD	gettynums[7].value
8313793Ssam #define	TO	gettynums[8].value
8413793Ssam #define	F0	gettynums[9].value
8513793Ssam #define	F0set	gettynums[9].set
8613793Ssam #define	F1	gettynums[10].value
8713793Ssam #define	F1set	gettynums[10].set
8813793Ssam #define	F2	gettynums[11].value
8913793Ssam #define	F2set	gettynums[11].set
9013885Ssam #define	PF	gettynums[12].value
9113793Ssam 
9213793Ssam /*
9313793Ssam  * Boolean values.
9413793Ssam  */
9513793Ssam #define	HT	gettyflags[0].value
9613793Ssam #define	NL	gettyflags[1].value
9713793Ssam #define	EP	gettyflags[2].value
9813829Skre #define	EPset	gettyflags[2].set
9913793Ssam #define	OP	gettyflags[3].value
10013829Skre #define	OPset	gettyflags[2].set
10113793Ssam #define	AP	gettyflags[4].value
10213829Skre #define	APset	gettyflags[2].set
10313793Ssam #define	EC	gettyflags[5].value
10413793Ssam #define	CO	gettyflags[6].value
10513793Ssam #define	CB	gettyflags[7].value
10613793Ssam #define	CK	gettyflags[8].value
10713793Ssam #define	CE	gettyflags[9].value
10813793Ssam #define	PE	gettyflags[10].value
10913793Ssam #define	RW	gettyflags[11].value
11013793Ssam #define	XC	gettyflags[12].value
11113793Ssam #define	LC	gettyflags[13].value
11213793Ssam #define	UC	gettyflags[14].value
11313793Ssam #define	IG	gettyflags[15].value
11413793Ssam #define	PS	gettyflags[16].value
11513793Ssam #define	HC	gettyflags[17].value
11613829Skre #define UB	gettyflags[18].value
11717925Sralph #define AB	gettyflags[19].value
11825730Smckusick #define DX	gettyflags[20].value
11913793Ssam 
12013793Ssam int	getent();
12113793Ssam long	getnum();
12213793Ssam int	getflag();
12313793Ssam char	*getstr();
12413793Ssam 
12513793Ssam extern	struct gettyflags gettyflags[];
12613793Ssam extern	struct gettynums gettynums[];
12713793Ssam extern	struct gettystrs gettystrs[];
12813793Ssam extern	int hopcount;
129