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