xref: /original-bsd/sys/sys/ttydefaults.h (revision 95ecee29)
1 /*-
2  * Copyright (c) 1982, 1986, 1993
3  *	The Regents of the University of California.  All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  *
7  *	@(#)ttydefaults.h	8.2 (Berkeley) 11/30/93
8  */
9 
10 /*
11  * System wide defaults for terminal state.
12  */
13 #ifndef _TTYDEFAULTS_H_
14 #define	_TTYDEFAULTS_H_
15 
16 /*
17  * Defaults on "first" open.
18  */
19 #define	TTYDEF_IFLAG	(BRKINT | ISTRIP | ICRNL | IMAXBEL | IXON | IXANY)
20 #define TTYDEF_OFLAG	(OPOST | ONLCR | OXTABS)
21 #define TTYDEF_LFLAG	(ECHO | ICANON | ISIG | IEXTEN | ECHOE|ECHOKE|ECHOCTL)
22 #define TTYDEF_CFLAG	(CREAD | CS7 | PARENB | HUPCL)
23 #define TTYDEF_SPEED	(B9600)
24 
25 /*
26  * Control Character Defaults
27  */
28 #define CTRL(x)	(x&037)
29 #define	CEOF		CTRL('d')
30 #define	CEOL		((unsigned char)'\377')	/* XXX avoid _POSIX_VDISABLE */
31 #define	CERASE		0177
32 #define	CINTR		CTRL('c')
33 #define	CSTATUS		((unsigned char)'\377')	/* XXX avoid _POSIX_VDISABLE */
34 #define	CKILL		CTRL('u')
35 #define	CMIN		1
36 #define	CQUIT		034		/* FS, ^\ */
37 #define	CSUSP		CTRL('z')
38 #define	CTIME		0
39 #define	CDSUSP		CTRL('y')
40 #define	CSTART		CTRL('q')
41 #define	CSTOP		CTRL('s')
42 #define	CLNEXT		CTRL('v')
43 #define	CDISCARD 	CTRL('o')
44 #define	CWERASE 	CTRL('w')
45 #define	CREPRINT 	CTRL('r')
46 #define	CEOT		CEOF
47 /* compat */
48 #define	CBRK		CEOL
49 #define CRPRNT		CREPRINT
50 #define	CFLUSH		CDISCARD
51 
52 /* PROTECTED INCLUSION ENDS HERE */
53 #endif /* !_TTYDEFAULTS_H_ */
54 
55 /*
56  * #define TTYDEFCHARS to include an array of default control characters.
57  */
58 #ifdef TTYDEFCHARS
59 cc_t	ttydefchars[NCCS] = {
60 	CEOF,	CEOL,	CEOL,	CERASE, CWERASE, CKILL, CREPRINT,
61 	_POSIX_VDISABLE, CINTR,	CQUIT,	CSUSP,	CDSUSP,	CSTART,	CSTOP,	CLNEXT,
62 	CDISCARD, CMIN,	CTIME,  CSTATUS, _POSIX_VDISABLE
63 };
64 #undef TTYDEFCHARS
65 #endif /* TTYDEFCHARS */
66