Back to index

glibc  2.9
ttydefaults.h
Go to the documentation of this file.
00001 /*-
00002  * Copyright (c) 1982, 1986, 1993
00003  *     The Regents of the University of California.  All rights reserved.
00004  * (c) UNIX System Laboratories, Inc.
00005  * All or some portions of this file are derived from material licensed
00006  * to the University of California by American Telephone and Telegraph
00007  * Co. or Unix System Laboratories, Inc. and are reproduced herein with
00008  * the permission of UNIX System Laboratories, Inc.
00009  *
00010  * Redistribution and use in source and binary forms, with or without
00011  * modification, are permitted provided that the following conditions
00012  * are met:
00013  * 1. Redistributions of source code must retain the above copyright
00014  *    notice, this list of conditions and the following disclaimer.
00015  * 2. Redistributions in binary form must reproduce the above copyright
00016  *    notice, this list of conditions and the following disclaimer in the
00017  *    documentation and/or other materials provided with the distribution.
00018  * 4. Neither the name of the University nor the names of its contributors
00019  *    may be used to endorse or promote products derived from this software
00020  *    without specific prior written permission.
00021  *
00022  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
00023  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00024  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00025  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
00026  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00027  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00028  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00029  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00030  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00031  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00032  * SUCH DAMAGE.
00033  *
00034  *     @(#)ttydefaults.h    8.4 (Berkeley) 1/21/94
00035  */
00036 
00037 /*
00038  * System wide defaults for terminal state.  SunOS 4 version.
00039  */
00040 #ifndef _SYS_TTYDEFAULTS_H_
00041 #define       _SYS_TTYDEFAULTS_H_
00042 
00043 /*
00044  * Defaults on "first" open.
00045  */
00046 #define       TTYDEF_IFLAG  (BRKINT | ISTRIP | ICRNL | IMAXBEL | IXON | IXANY)
00047 #define TTYDEF_OFLAG (OPOST | ONLCR | XTABS)
00048 #define TTYDEF_LFLAG (ECHO | ICANON | ISIG | IEXTEN | ECHOE|ECHOKE|ECHOCTL)
00049 #define TTYDEF_CFLAG (CREAD | CS7 | PARENB | HUPCL)
00050 #define TTYDEF_SPEED (B9600)
00051 
00052 /*
00053  * Control Character Defaults
00054  */
00055 #define CTRL(x)      (x&037)
00056 #define       CEOF          CTRL('d')
00057 #ifdef _POSIX_VDISABLE
00058 # define CEOL        _POSIX_VDISABLE
00059 #else
00060 # define CEOL        ((unsigned char)'\377')     /* XXX avoid _POSIX_VDISABLE */
00061 #endif
00062 #define       CERASE        0177
00063 #define       CINTR         CTRL('c')
00064 #ifdef _POSIX_VDISABLE
00065 # define CSTATUS     _POSIX_VDISABLE
00066 #else
00067 # define CSTATUS     ((unsigned char)'\377')     /* XXX avoid _POSIX_VDISABLE */
00068 #endif
00069 #define       CKILL         CTRL('u')
00070 #define       CMIN          1
00071 #define       CQUIT         034           /* FS, ^\ */
00072 #define       CSUSP         CTRL('z')
00073 #define       CTIME         0
00074 #define       CDSUSP        CTRL('y')
00075 #define       CSTART        CTRL('q')
00076 #define       CSTOP         CTRL('s')
00077 #define       CLNEXT        CTRL('v')
00078 #define       CDISCARD      CTRL('o')
00079 #define       CWERASE       CTRL('w')
00080 #define       CREPRINT      CTRL('r')
00081 #define       CEOT          CEOF
00082 /* compat */
00083 #define       CBRK          CEOL
00084 #define CRPRNT              CREPRINT
00085 #define       CFLUSH        CDISCARD
00086 
00087 /* PROTECTED INCLUSION ENDS HERE */
00088 #endif /* !_SYS_TTYDEFAULTS_H_ */
00089 
00090 /*
00091  * #define TTYDEFCHARS to include an array of default control characters.
00092  */
00093 #ifdef TTYDEFCHARS
00094 cc_t   ttydefchars[NCCS] = {
00095        CEOF,  CEOL,  CEOL,  CERASE, CWERASE, CKILL, CREPRINT,
00096        _POSIX_VDISABLE, CINTR,     CQUIT, CSUSP, CDSUSP,       CSTART,       CSTOP, CLNEXT,
00097        CDISCARD, CMIN,      CTIME,  CSTATUS, _POSIX_VDISABLE
00098 };
00099 #undef TTYDEFCHARS
00100 #endif