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