Blame sysdeps/generic/sys/ttydefaults.h

Packit 6c4009
/*-
Packit 6c4009
 * Copyright (c) 1982, 1986, 1993
Packit 6c4009
 *	The Regents of the University of California.  All rights reserved.
Packit 6c4009
 * (c) UNIX System Laboratories, Inc.
Packit 6c4009
 * All or some portions of this file are derived from material licensed
Packit 6c4009
 * to the University of California by American Telephone and Telegraph
Packit 6c4009
 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
Packit 6c4009
 * the permission of UNIX System Laboratories, Inc.
Packit 6c4009
 *
Packit 6c4009
 * Redistribution and use in source and binary forms, with or without
Packit 6c4009
 * modification, are permitted provided that the following conditions
Packit 6c4009
 * are met:
Packit 6c4009
 * 1. Redistributions of source code must retain the above copyright
Packit 6c4009
 *    notice, this list of conditions and the following disclaimer.
Packit 6c4009
 * 2. Redistributions in binary form must reproduce the above copyright
Packit 6c4009
 *    notice, this list of conditions and the following disclaimer in the
Packit 6c4009
 *    documentation and/or other materials provided with the distribution.
Packit 6c4009
 * 4. Neither the name of the University nor the names of its contributors
Packit 6c4009
 *    may be used to endorse or promote products derived from this software
Packit 6c4009
 *    without specific prior written permission.
Packit 6c4009
 *
Packit 6c4009
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
Packit 6c4009
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Packit 6c4009
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
Packit 6c4009
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
Packit 6c4009
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Packit 6c4009
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
Packit 6c4009
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
Packit 6c4009
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
Packit 6c4009
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
Packit 6c4009
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
Packit 6c4009
 * SUCH DAMAGE.
Packit 6c4009
 *
Packit 6c4009
 *	@(#)ttydefaults.h	8.4 (Berkeley) 1/21/94
Packit 6c4009
 */
Packit 6c4009
Packit 6c4009
/*
Packit 6c4009
 * System wide defaults for terminal state.  4.4 BSD/generic GNU version.
Packit 6c4009
 */
Packit 6c4009
#ifndef _SYS_TTYDEFAULTS_H_
Packit 6c4009
#define	_SYS_TTYDEFAULTS_H_
Packit 6c4009
Packit 6c4009
/*
Packit 6c4009
 * Defaults on "first" open.
Packit 6c4009
 */
Packit 6c4009
#define	TTYDEF_IFLAG	(BRKINT | ISTRIP | ICRNL | IMAXBEL | IXON | IXANY)
Packit 6c4009
#define TTYDEF_OFLAG	(OPOST | ONLCR | OXTABS)
Packit 6c4009
#define TTYDEF_LFLAG	(ECHO | ICANON | ISIG | IEXTEN | ECHOE|ECHOKE|ECHOCTL)
Packit 6c4009
#define TTYDEF_CFLAG	(CREAD | CS7 | PARENB | HUPCL)
Packit 6c4009
#define TTYDEF_SPEED	(B9600)
Packit 6c4009
Packit 6c4009
/*
Packit 6c4009
 * Control Character Defaults
Packit 6c4009
 */
Packit 6c4009
#define CTRL(x)	(x&037)
Packit 6c4009
#define	CEOF		CTRL('d')
Packit 6c4009
#ifdef _POSIX_VDISABLE
Packit 6c4009
# define CEOL		_POSIX_VDISABLE
Packit 6c4009
#else
Packit 6c4009
# define CEOL		((unsigned char)'\377')	/* XXX avoid _POSIX_VDISABLE */
Packit 6c4009
#endif
Packit 6c4009
#define	CERASE		0177
Packit 6c4009
#define	CINTR		CTRL('c')
Packit 6c4009
#ifdef _POSIX_VDISABLE
Packit 6c4009
# define CSTATUS	_POSIX_VDISABLE
Packit 6c4009
#else
Packit 6c4009
# define CSTATUS	((unsigned char)'\377')	/* XXX avoid _POSIX_VDISABLE */
Packit 6c4009
#endif
Packit 6c4009
#define	CKILL		CTRL('u')
Packit 6c4009
#define	CMIN		1
Packit 6c4009
#define	CQUIT		034		/* FS, ^\ */
Packit 6c4009
#define	CSUSP		CTRL('z')
Packit 6c4009
#define	CTIME		0
Packit 6c4009
#define	CDSUSP		CTRL('y')
Packit 6c4009
#define	CSTART		CTRL('q')
Packit 6c4009
#define	CSTOP		CTRL('s')
Packit 6c4009
#define	CLNEXT		CTRL('v')
Packit 6c4009
#define	CDISCARD 	CTRL('o')
Packit 6c4009
#define	CWERASE 	CTRL('w')
Packit 6c4009
#define	CREPRINT 	CTRL('r')
Packit 6c4009
#define	CEOT		CEOF
Packit 6c4009
/* compat */
Packit 6c4009
#define	CBRK		CEOL
Packit 6c4009
#define CRPRNT		CREPRINT
Packit 6c4009
#define	CFLUSH		CDISCARD
Packit 6c4009
Packit 6c4009
/* PROTECTED INCLUSION ENDS HERE */
Packit 6c4009
#endif /* !_SYS_TTYDEFAULTS_H_ */
Packit 6c4009
Packit 6c4009
/*
Packit 6c4009
 * #define TTYDEFCHARS to include an array of default control characters.
Packit 6c4009
 */
Packit 6c4009
#ifdef TTYDEFCHARS
Packit 6c4009
cc_t	ttydefchars[NCCS] = {
Packit 6c4009
	CEOF,	CEOL,	CEOL,	CERASE, CWERASE, CKILL, CREPRINT,
Packit 6c4009
	_POSIX_VDISABLE, CINTR,	CQUIT,	CSUSP,	CDSUSP,	CSTART,	CSTOP,	CLNEXT,
Packit 6c4009
	CDISCARD, CMIN,	CTIME,  CSTATUS, _POSIX_VDISABLE
Packit 6c4009
};
Packit 6c4009
#undef TTYDEFCHARS
Packit 6c4009
#endif