tty.h revision 1573
11573Srgrimes/*-
21573Srgrimes * Copyright (c) 1992, 1993
31573Srgrimes *	The Regents of the University of California.  All rights reserved.
41573Srgrimes *
51573Srgrimes * This code is derived from software contributed to Berkeley by
61573Srgrimes * Christos Zoulas of Cornell University.
71573Srgrimes *
81573Srgrimes * Redistribution and use in source and binary forms, with or without
91573Srgrimes * modification, are permitted provided that the following conditions
101573Srgrimes * are met:
111573Srgrimes * 1. Redistributions of source code must retain the above copyright
121573Srgrimes *    notice, this list of conditions and the following disclaimer.
131573Srgrimes * 2. Redistributions in binary form must reproduce the above copyright
141573Srgrimes *    notice, this list of conditions and the following disclaimer in the
151573Srgrimes *    documentation and/or other materials provided with the distribution.
161573Srgrimes * 3. All advertising materials mentioning features or use of this software
171573Srgrimes *    must display the following acknowledgement:
181573Srgrimes *	This product includes software developed by the University of
191573Srgrimes *	California, Berkeley and its contributors.
201573Srgrimes * 4. Neither the name of the University nor the names of its contributors
211573Srgrimes *    may be used to endorse or promote products derived from this software
221573Srgrimes *    without specific prior written permission.
231573Srgrimes *
241573Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
251573Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
261573Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
271573Srgrimes * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
281573Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
291573Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
301573Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
311573Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
321573Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
331573Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
341573Srgrimes * SUCH DAMAGE.
351573Srgrimes *
361573Srgrimes *	@(#)tty.h	8.1 (Berkeley) 6/4/93
371573Srgrimes */
381573Srgrimes
391573Srgrimes/*
401573Srgrimes * el.tty.h: Local terminal header
411573Srgrimes */
421573Srgrimes#ifndef _h_el_tty
431573Srgrimes#define _h_el_tty
441573Srgrimes
451573Srgrimes#include "histedit.h"
461573Srgrimes#include <termios.h>
471573Srgrimes
481573Srgrimes/* Define our own since everyone gets it wrong! */
491573Srgrimes#define CONTROL(A)	((A) & 037)
501573Srgrimes
511573Srgrimes/*
521573Srgrimes * Aix compatible names
531573Srgrimes */
541573Srgrimes# if defined(VWERSE) && !defined(VWERASE)
551573Srgrimes#  define VWERASE VWERSE
561573Srgrimes# endif /* VWERSE && !VWERASE */
571573Srgrimes
581573Srgrimes# if defined(VDISCRD) && !defined(VDISCARD)
591573Srgrimes#  define VDISCARD VDISCRD
601573Srgrimes# endif /* VDISCRD && !VDISCARD */
611573Srgrimes
621573Srgrimes# if defined(VFLUSHO) && !defined(VDISCARD)
631573Srgrimes#  define VDISCARD VFLUSHO
641573Srgrimes# endif  /* VFLUSHO && VDISCARD */
651573Srgrimes
661573Srgrimes# if defined(VSTRT) && !defined(VSTART)
671573Srgrimes#  define VSTART VSTRT
681573Srgrimes# endif /* VSTRT && ! VSTART */
691573Srgrimes
701573Srgrimes# if defined(VSTAT) && !defined(VSTATUS)
711573Srgrimes#  define VSTATUS VSTAT
721573Srgrimes# endif /* VSTAT && ! VSTATUS */
731573Srgrimes
741573Srgrimes# ifndef ONLRET
751573Srgrimes#  define ONLRET 0
761573Srgrimes# endif /* ONLRET */
771573Srgrimes
781573Srgrimes# ifndef TAB3
791573Srgrimes#  ifdef OXTABS
801573Srgrimes#   define TAB3 OXTABS
811573Srgrimes#  else
821573Srgrimes#   define TAB3 0
831573Srgrimes#  endif /* OXTABS */
841573Srgrimes# endif /* !TAB3 */
851573Srgrimes
861573Srgrimes# if defined(OXTABS) && !defined(XTABS)
871573Srgrimes#  define XTABS OXTABS
881573Srgrimes# endif /* OXTABS && !XTABS */
891573Srgrimes
901573Srgrimes# ifndef ONLCR
911573Srgrimes#  define ONLCR 0
921573Srgrimes# endif /* ONLCR */
931573Srgrimes
941573Srgrimes# ifndef IEXTEN
951573Srgrimes#  define IEXTEN 0
961573Srgrimes# endif /* IEXTEN */
971573Srgrimes
981573Srgrimes# ifndef ECHOCTL
991573Srgrimes#  define ECHOCTL 0
1001573Srgrimes# endif /* ECHOCTL */
1011573Srgrimes
1021573Srgrimes# ifndef PARENB
1031573Srgrimes#  define PARENB 0
1041573Srgrimes# endif /* PARENB */
1051573Srgrimes
1061573Srgrimes# ifndef EXTPROC
1071573Srgrimes#  define EXTPROC 0
1081573Srgrimes# endif /* EXTPROC */
1091573Srgrimes
1101573Srgrimes# ifndef FLUSHO
1111573Srgrimes#  define FLUSHO  0
1121573Srgrimes# endif /* FLUSHO */
1131573Srgrimes
1141573Srgrimes
1151573Srgrimes# if defined(VDISABLE) && !defined(_POSIX_VDISABLE)
1161573Srgrimes#  define _POSIX_VDISABLE VDISABLE
1171573Srgrimes# endif /* VDISABLE && ! _POSIX_VDISABLE */
1181573Srgrimes
1191573Srgrimes/*
1201573Srgrimes * Work around ISC's definition of IEXTEN which is
1211573Srgrimes * XCASE!
1221573Srgrimes */
1231573Srgrimes# ifdef ISC
1241573Srgrimes#  if defined(IEXTEN) && defined(XCASE)
1251573Srgrimes#   if IEXTEN == XCASE
1261573Srgrimes#    undef IEXTEN
1271573Srgrimes#    define IEXTEN 0
1281573Srgrimes#   endif /* IEXTEN == XCASE */
1291573Srgrimes#  endif /* IEXTEN && XCASE */
1301573Srgrimes#  if defined(IEXTEN) && !defined(XCASE)
1311573Srgrimes#   define XCASE IEXTEN
1321573Srgrimes#   undef IEXTEN
1331573Srgrimes#   define IEXTEN 0
1341573Srgrimes#  endif /* IEXTEN && !XCASE */
1351573Srgrimes# endif /* ISC */
1361573Srgrimes
1371573Srgrimes/*
1381573Srgrimes * Work around convex weirdness where turning off IEXTEN makes us
1391573Srgrimes * lose all postprocessing!
1401573Srgrimes */
1411573Srgrimes#if defined(convex) || defined(__convex__)
1421573Srgrimes# if defined(IEXTEN) && IEXTEN != 0
1431573Srgrimes#  undef IEXTEN
1441573Srgrimes#  define IEXTEN 0
1451573Srgrimes# endif /* IEXTEN != 0 */
1461573Srgrimes#endif /* convex || __convex__ */
1471573Srgrimes
1481573Srgrimes
1491573Srgrimes
1501573Srgrimes#ifndef _POSIX_VDISABLE
1511573Srgrimes# define _POSIX_VDISABLE ((unsigned char) -1)
1521573Srgrimes#endif /* _POSIX_VDISABLE */
1531573Srgrimes
1541573Srgrimes#if !defined(CREPRINT) && defined(CRPRNT)
1551573Srgrimes# define CREPRINT CRPRNT
1561573Srgrimes#endif /* !CREPRINT && CRPRNT */
1571573Srgrimes#if !defined(CDISCARD) && defined(CFLUSH)
1581573Srgrimes# define CDISCARD CFLUSH
1591573Srgrimes#endif /* !CDISCARD && CFLUSH */
1601573Srgrimes
1611573Srgrimes#ifndef CINTR
1621573Srgrimes# define CINTR		CONTROL('c')
1631573Srgrimes#endif /* CINTR */
1641573Srgrimes#ifndef CQUIT
1651573Srgrimes# define CQUIT		034	/* ^\ */
1661573Srgrimes#endif /* CQUIT */
1671573Srgrimes#ifndef CERASE
1681573Srgrimes# define CERASE		0177	/* ^? */
1691573Srgrimes#endif /* CERASE */
1701573Srgrimes#ifndef CKILL
1711573Srgrimes# define CKILL		CONTROL('u')
1721573Srgrimes#endif /* CKILL */
1731573Srgrimes#ifndef CEOF
1741573Srgrimes# define CEOF		CONTROL('d')
1751573Srgrimes#endif /* CEOF */
1761573Srgrimes#ifndef CEOL
1771573Srgrimes# define CEOL		_POSIX_VDISABLE
1781573Srgrimes#endif /* CEOL */
1791573Srgrimes#ifndef CEOL2
1801573Srgrimes# define CEOL2		_POSIX_VDISABLE
1811573Srgrimes#endif /* CEOL2 */
1821573Srgrimes#ifndef CSWTCH
1831573Srgrimes# define CSWTCH		_POSIX_VDISABLE
1841573Srgrimes#endif /* CSWTCH */
1851573Srgrimes#ifndef CDSWTCH
1861573Srgrimes# define CDSWTCH	_POSIX_VDISABLE
1871573Srgrimes#endif /* CDSWTCH */
1881573Srgrimes#ifndef CERASE2
1891573Srgrimes# define CERASE2	_POSIX_VDISABLE
1901573Srgrimes#endif /* CERASE2 */
1911573Srgrimes#ifndef CSTART
1921573Srgrimes# define CSTART		CONTROL('q')
1931573Srgrimes#endif /* CSTART */
1941573Srgrimes#ifndef CSTOP
1951573Srgrimes# define CSTOP		CONTROL('s')
1961573Srgrimes#endif /* CSTOP */
1971573Srgrimes#ifndef CSUSP
1981573Srgrimes# define CSUSP		CONTROL('z')
1991573Srgrimes#endif /* CSUSP */
2001573Srgrimes#ifndef CDSUSP
2011573Srgrimes# define CDSUSP		CONTROL('y')
2021573Srgrimes#endif /* CDSUSP */
2031573Srgrimes
2041573Srgrimes#ifdef hpux
2051573Srgrimes
2061573Srgrimes# ifndef CREPRINT
2071573Srgrimes#  define CREPRINT	_POSIX_VDISABLE
2081573Srgrimes# endif /* CREPRINT */
2091573Srgrimes# ifndef CDISCARD
2101573Srgrimes#  define CDISCARD	_POSIX_VDISABLE
2111573Srgrimes# endif /* CDISCARD */
2121573Srgrimes# ifndef CLNEXT
2131573Srgrimes#  define CLNEXT	_POSIX_VDISABLE
2141573Srgrimes# endif /* CLNEXT */
2151573Srgrimes# ifndef CWERASE
2161573Srgrimes#  define CWERASE	_POSIX_VDISABLE
2171573Srgrimes# endif /* CWERASE */
2181573Srgrimes
2191573Srgrimes#else /* !hpux */
2201573Srgrimes
2211573Srgrimes# ifndef CREPRINT
2221573Srgrimes#  define CREPRINT	CONTROL('r')
2231573Srgrimes# endif /* CREPRINT */
2241573Srgrimes# ifndef CDISCARD
2251573Srgrimes#  define CDISCARD	CONTROL('o')
2261573Srgrimes# endif /* CDISCARD */
2271573Srgrimes# ifndef CLNEXT
2281573Srgrimes#  define CLNEXT	CONTROL('v')
2291573Srgrimes# endif /* CLNEXT */
2301573Srgrimes# ifndef CWERASE
2311573Srgrimes#  define CWERASE	CONTROL('w')
2321573Srgrimes# endif /* CWERASE */
2331573Srgrimes
2341573Srgrimes#endif /* hpux */
2351573Srgrimes
2361573Srgrimes#ifndef CSTATUS
2371573Srgrimes# define CSTATUS	CONTROL('t')
2381573Srgrimes#endif /* CSTATUS */
2391573Srgrimes#ifndef CPAGE
2401573Srgrimes# define CPAGE		' '
2411573Srgrimes#endif /* CPAGE */
2421573Srgrimes#ifndef CPGOFF
2431573Srgrimes# define CPGOFF		CONTROL('m')
2441573Srgrimes#endif /* CPGOFF */
2451573Srgrimes#ifndef CKILL2
2461573Srgrimes# define CKILL2		_POSIX_VDISABLE
2471573Srgrimes#endif /* CKILL2 */
2481573Srgrimes#ifndef CBRK
2491573Srgrimes# ifndef masscomp
2501573Srgrimes#  define CBRK		0377
2511573Srgrimes# else
2521573Srgrimes#  define CBRK		'\0'
2531573Srgrimes# endif /* masscomp */
2541573Srgrimes#endif /* CBRK */
2551573Srgrimes#ifndef CMIN
2561573Srgrimes# define CMIN		CEOF
2571573Srgrimes#endif /* CMIN */
2581573Srgrimes#ifndef CTIME
2591573Srgrimes# define CTIME		CEOL
2601573Srgrimes#endif /* CTIME */
2611573Srgrimes
2621573Srgrimes/*
2631573Srgrimes * Fix for sun inconsistency. On termio VSUSP and the rest of the
2641573Srgrimes * ttychars > NCC are defined. So we undefine them.
2651573Srgrimes */
2661573Srgrimes#if defined(TERMIO) || defined(POSIX)
2671573Srgrimes# if defined(POSIX) && defined(NCCS)
2681573Srgrimes#  define NUMCC		NCCS
2691573Srgrimes# else
2701573Srgrimes#  ifdef NCC
2711573Srgrimes#   define NUMCC	NCC
2721573Srgrimes#  endif /* NCC */
2731573Srgrimes# endif /* POSIX && NCCS */
2741573Srgrimes# ifdef NUMCC
2751573Srgrimes#  ifdef VINTR
2761573Srgrimes#   if NUMCC <= VINTR
2771573Srgrimes#    undef VINTR
2781573Srgrimes#   endif /* NUMCC <= VINTR */
2791573Srgrimes#  endif /* VINTR */
2801573Srgrimes#  ifdef VQUIT
2811573Srgrimes#   if NUMCC <= VQUIT
2821573Srgrimes#    undef VQUIT
2831573Srgrimes#   endif /* NUMCC <= VQUIT */
2841573Srgrimes#  endif /* VQUIT */
2851573Srgrimes#  ifdef VERASE
2861573Srgrimes#   if NUMCC <= VERASE
2871573Srgrimes#    undef VERASE
2881573Srgrimes#   endif /* NUMCC <= VERASE */
2891573Srgrimes#  endif /* VERASE */
2901573Srgrimes#  ifdef VKILL
2911573Srgrimes#   if NUMCC <= VKILL
2921573Srgrimes#    undef VKILL
2931573Srgrimes#   endif /* NUMCC <= VKILL */
2941573Srgrimes#  endif /* VKILL */
2951573Srgrimes#  ifdef VEOF
2961573Srgrimes#   if NUMCC <= VEOF
2971573Srgrimes#    undef VEOF
2981573Srgrimes#   endif /* NUMCC <= VEOF */
2991573Srgrimes#  endif /* VEOF */
3001573Srgrimes#  ifdef VEOL
3011573Srgrimes#   if NUMCC <= VEOL
3021573Srgrimes#    undef VEOL
3031573Srgrimes#   endif /* NUMCC <= VEOL */
3041573Srgrimes#  endif /* VEOL */
3051573Srgrimes#  ifdef VEOL2
3061573Srgrimes#   if NUMCC <= VEOL2
3071573Srgrimes#    undef VEOL2
3081573Srgrimes#   endif /* NUMCC <= VEOL2 */
3091573Srgrimes#  endif /* VEOL2 */
3101573Srgrimes#  ifdef VSWTCH
3111573Srgrimes#   if NUMCC <= VSWTCH
3121573Srgrimes#    undef VSWTCH
3131573Srgrimes#   endif /* NUMCC <= VSWTCH */
3141573Srgrimes#  endif /* VSWTCH */
3151573Srgrimes#  ifdef VDSWTCH
3161573Srgrimes#   if NUMCC <= VDSWTCH
3171573Srgrimes#    undef VDSWTCH
3181573Srgrimes#   endif /* NUMCC <= VDSWTCH */
3191573Srgrimes#  endif /* VDSWTCH */
3201573Srgrimes#  ifdef VERASE2
3211573Srgrimes#   if NUMCC <= VERASE2
3221573Srgrimes#    undef VERASE2
3231573Srgrimes#   endif /* NUMCC <= VERASE2 */
3241573Srgrimes#  endif /* VERASE2 */
3251573Srgrimes#  ifdef VSTART
3261573Srgrimes#   if NUMCC <= VSTART
3271573Srgrimes#    undef VSTART
3281573Srgrimes#   endif /* NUMCC <= VSTART */
3291573Srgrimes#  endif /* VSTART */
3301573Srgrimes#  ifdef VSTOP
3311573Srgrimes#   if NUMCC <= VSTOP
3321573Srgrimes#    undef VSTOP
3331573Srgrimes#   endif /* NUMCC <= VSTOP */
3341573Srgrimes#  endif /* VSTOP */
3351573Srgrimes#  ifdef VWERASE
3361573Srgrimes#   if NUMCC <= VWERASE
3371573Srgrimes#    undef VWERASE
3381573Srgrimes#   endif /* NUMCC <= VWERASE */
3391573Srgrimes#  endif /* VWERASE */
3401573Srgrimes#  ifdef VSUSP
3411573Srgrimes#   if NUMCC <= VSUSP
3421573Srgrimes#    undef VSUSP
3431573Srgrimes#   endif /* NUMCC <= VSUSP */
3441573Srgrimes#  endif /* VSUSP */
3451573Srgrimes#  ifdef VDSUSP
3461573Srgrimes#   if NUMCC <= VDSUSP
3471573Srgrimes#    undef VDSUSP
3481573Srgrimes#   endif /* NUMCC <= VDSUSP */
3491573Srgrimes#  endif /* VDSUSP */
3501573Srgrimes#  ifdef VREPRINT
3511573Srgrimes#   if NUMCC <= VREPRINT
3521573Srgrimes#    undef VREPRINT
3531573Srgrimes#   endif /* NUMCC <= VREPRINT */
3541573Srgrimes#  endif /* VREPRINT */
3551573Srgrimes#  ifdef VDISCARD
3561573Srgrimes#   if NUMCC <= VDISCARD
3571573Srgrimes#    undef VDISCARD
3581573Srgrimes#   endif /* NUMCC <= VDISCARD */
3591573Srgrimes#  endif /* VDISCARD */
3601573Srgrimes#  ifdef VLNEXT
3611573Srgrimes#   if NUMCC <= VLNEXT
3621573Srgrimes#    undef VLNEXT
3631573Srgrimes#   endif /* NUMCC <= VLNEXT */
3641573Srgrimes#  endif /* VLNEXT */
3651573Srgrimes#  ifdef VSTATUS
3661573Srgrimes#   if NUMCC <= VSTATUS
3671573Srgrimes#    undef VSTATUS
3681573Srgrimes#   endif /* NUMCC <= VSTATUS */
3691573Srgrimes#  endif /* VSTATUS */
3701573Srgrimes#  ifdef VPAGE
3711573Srgrimes#   if NUMCC <= VPAGE
3721573Srgrimes#    undef VPAGE
3731573Srgrimes#   endif /* NUMCC <= VPAGE */
3741573Srgrimes#  endif /* VPAGE */
3751573Srgrimes#  ifdef VPGOFF
3761573Srgrimes#   if NUMCC <= VPGOFF
3771573Srgrimes#    undef VPGOFF
3781573Srgrimes#   endif /* NUMCC <= VPGOFF */
3791573Srgrimes#  endif /* VPGOFF */
3801573Srgrimes#  ifdef VKILL2
3811573Srgrimes#   if NUMCC <= VKILL2
3821573Srgrimes#    undef VKILL2
3831573Srgrimes#   endif /* NUMCC <= VKILL2 */
3841573Srgrimes#  endif /* VKILL2 */
3851573Srgrimes#  ifdef VBRK
3861573Srgrimes#   if NUMCC <= VBRK
3871573Srgrimes#    undef VBRK
3881573Srgrimes#   endif /* NUMCC <= VBRK */
3891573Srgrimes#  endif /* VBRK */
3901573Srgrimes#  ifdef VMIN
3911573Srgrimes#   if NUMCC <= VMIN
3921573Srgrimes#    undef VMIN
3931573Srgrimes#   endif /* NUMCC <= VMIN */
3941573Srgrimes#  endif /* VMIN */
3951573Srgrimes#  ifdef VTIME
3961573Srgrimes#   if NUMCC <= VTIME
3971573Srgrimes#    undef VTIME
3981573Srgrimes#   endif /* NUMCC <= VTIME */
3991573Srgrimes#  endif /* VTIME */
4001573Srgrimes# endif /* NUMCC */
4011573Srgrimes#endif /* !POSIX */
4021573Srgrimes
4031573Srgrimes#define C_INTR		 0
4041573Srgrimes#define C_QUIT		 1
4051573Srgrimes#define C_ERASE		 2
4061573Srgrimes#define C_KILL		 3
4071573Srgrimes#define C_EOF		 4
4081573Srgrimes#define C_EOL		 5
4091573Srgrimes#define C_EOL2		 6
4101573Srgrimes#define C_SWTCH		 7
4111573Srgrimes#define C_DSWTCH	 8
4121573Srgrimes#define C_ERASE2	 9
4131573Srgrimes#define C_START		10
4141573Srgrimes#define C_STOP		11
4151573Srgrimes#define C_WERASE	12
4161573Srgrimes#define C_SUSP		13
4171573Srgrimes#define C_DSUSP		14
4181573Srgrimes#define C_REPRINT	15
4191573Srgrimes#define C_DISCARD	16
4201573Srgrimes#define C_LNEXT		17
4211573Srgrimes#define C_STATUS	18
4221573Srgrimes#define C_PAGE		19
4231573Srgrimes#define C_PGOFF		20
4241573Srgrimes#define C_KILL2		21
4251573Srgrimes#define C_BRK		22
4261573Srgrimes#define C_MIN		23
4271573Srgrimes#define C_TIME		24
4281573Srgrimes#define C_NCC		25
4291573Srgrimes#define C_SH(A)		(1 << (A))
4301573Srgrimes
4311573Srgrimes/*
4321573Srgrimes * Terminal dependend data structures
4331573Srgrimes */
4341573Srgrimes#define EX_IO	0	/* while we are executing	*/
4351573Srgrimes#define ED_IO	1	/* while we are editing		*/
4361573Srgrimes#define TS_IO	2	/* new mode from terminal	*/
4371573Srgrimes#define QU_IO	2	/* used only for quoted chars	*/
4381573Srgrimes#define NN_IO	3	/* The number of entries	*/
4391573Srgrimes
4401573Srgrimes#define M_INP	0
4411573Srgrimes#define M_OUT	1
4421573Srgrimes#define M_CTL	2
4431573Srgrimes#define M_LIN	3
4441573Srgrimes#define M_CHAR	4
4451573Srgrimes#define M_NN	5
4461573Srgrimes
4471573Srgrimestypedef struct {
4481573Srgrimes    char *t_name;
4491573Srgrimes    int  t_setmask;
4501573Srgrimes    int  t_clrmask;
4511573Srgrimes} ttyperm_t[NN_IO][M_NN];
4521573Srgrimes
4531573Srgrimestypedef unsigned char ttychar_t[NN_IO][C_NCC];
4541573Srgrimes
4551573Srgrimesprotected int	tty_init	__P((EditLine *));
4561573Srgrimesprotected void	tty_end		__P((EditLine *));
4571573Srgrimesprotected int	tty_stty	__P((EditLine *, int, char**));
4581573Srgrimesprotected int	tty_rawmode	__P((EditLine *));
4591573Srgrimesprotected int	tty_cookedmode	__P((EditLine *));
4601573Srgrimesprotected int	tty_quotemode	__P((EditLine *));
4611573Srgrimesprotected int	tty_noquotemode	__P((EditLine *));
4621573Srgrimesprotected void	tty_bind_char	__P((EditLine *, int));
4631573Srgrimes
4641573Srgrimestypedef struct {
4651573Srgrimes    ttyperm_t t_t;
4661573Srgrimes    ttychar_t t_c;
4671573Srgrimes    struct termios t_ex, t_ed, t_ts;
4681573Srgrimes    int t_tabs;
4691573Srgrimes    int t_eight;
4701573Srgrimes    speed_t t_speed;
4711573Srgrimes    int t_mode;
4721573Srgrimes    unsigned char t_vdisable;
4731573Srgrimes} el_tty_t;
4741573Srgrimes
4751573Srgrimes
4761573Srgrimes#endif /* _h_el_tty */
477