1*6b445a62SJohn Marino /* rltty.h - tty driver-related definitions used by some library files. */ 2*6b445a62SJohn Marino 3*6b445a62SJohn Marino /* Copyright (C) 1995-2009 Free Software Foundation, Inc. 4*6b445a62SJohn Marino 5*6b445a62SJohn Marino This file is part of the GNU Readline Library (Readline), a library 6*6b445a62SJohn Marino for reading lines of text with interactive input and history editing. 7*6b445a62SJohn Marino 8*6b445a62SJohn Marino Readline is free software: you can redistribute it and/or modify 9*6b445a62SJohn Marino it under the terms of the GNU General Public License as published by 10*6b445a62SJohn Marino the Free Software Foundation, either version 3 of the License, or 11*6b445a62SJohn Marino (at your option) any later version. 12*6b445a62SJohn Marino 13*6b445a62SJohn Marino Readline is distributed in the hope that it will be useful, 14*6b445a62SJohn Marino but WITHOUT ANY WARRANTY; without even the implied warranty of 15*6b445a62SJohn Marino MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16*6b445a62SJohn Marino GNU General Public License for more details. 17*6b445a62SJohn Marino 18*6b445a62SJohn Marino You should have received a copy of the GNU General Public License 19*6b445a62SJohn Marino along with Readline. If not, see <http://www.gnu.org/licenses/>. 20*6b445a62SJohn Marino */ 21*6b445a62SJohn Marino 22*6b445a62SJohn Marino #if !defined (_RLTTY_H_) 23*6b445a62SJohn Marino #define _RLTTY_H_ 24*6b445a62SJohn Marino 25*6b445a62SJohn Marino /* Posix systems use termios and the Posix signal functions. */ 26*6b445a62SJohn Marino #if defined (TERMIOS_TTY_DRIVER) 27*6b445a62SJohn Marino # include <termios.h> 28*6b445a62SJohn Marino #endif /* TERMIOS_TTY_DRIVER */ 29*6b445a62SJohn Marino 30*6b445a62SJohn Marino /* System V machines use termio. */ 31*6b445a62SJohn Marino #if defined (TERMIO_TTY_DRIVER) 32*6b445a62SJohn Marino # include <termio.h> 33*6b445a62SJohn Marino # if !defined (TCOON) 34*6b445a62SJohn Marino # define TCOON 1 35*6b445a62SJohn Marino # endif 36*6b445a62SJohn Marino #endif /* TERMIO_TTY_DRIVER */ 37*6b445a62SJohn Marino 38*6b445a62SJohn Marino /* Other (BSD) machines use sgtty. */ 39*6b445a62SJohn Marino #if defined (NEW_TTY_DRIVER) 40*6b445a62SJohn Marino # include <sgtty.h> 41*6b445a62SJohn Marino #endif 42*6b445a62SJohn Marino 43*6b445a62SJohn Marino #include "rlwinsize.h" 44*6b445a62SJohn Marino 45*6b445a62SJohn Marino /* Define _POSIX_VDISABLE if we are not using the `new' tty driver and 46*6b445a62SJohn Marino it is not already defined. It is used both to determine if a 47*6b445a62SJohn Marino special character is disabled and to disable certain special 48*6b445a62SJohn Marino characters. Posix systems should set to 0, USG systems to -1. */ 49*6b445a62SJohn Marino #if !defined (NEW_TTY_DRIVER) && !defined (_POSIX_VDISABLE) 50*6b445a62SJohn Marino # if defined (_SVR4_VDISABLE) 51*6b445a62SJohn Marino # define _POSIX_VDISABLE _SVR4_VDISABLE 52*6b445a62SJohn Marino # else 53*6b445a62SJohn Marino # if defined (_POSIX_VERSION) 54*6b445a62SJohn Marino # define _POSIX_VDISABLE 0 55*6b445a62SJohn Marino # else /* !_POSIX_VERSION */ 56*6b445a62SJohn Marino # define _POSIX_VDISABLE -1 57*6b445a62SJohn Marino # endif /* !_POSIX_VERSION */ 58*6b445a62SJohn Marino # endif /* !_SVR4_DISABLE */ 59*6b445a62SJohn Marino #endif /* !NEW_TTY_DRIVER && !_POSIX_VDISABLE */ 60*6b445a62SJohn Marino 61*6b445a62SJohn Marino typedef struct _rl_tty_chars { 62*6b445a62SJohn Marino unsigned char t_eof; 63*6b445a62SJohn Marino unsigned char t_eol; 64*6b445a62SJohn Marino unsigned char t_eol2; 65*6b445a62SJohn Marino unsigned char t_erase; 66*6b445a62SJohn Marino unsigned char t_werase; 67*6b445a62SJohn Marino unsigned char t_kill; 68*6b445a62SJohn Marino unsigned char t_reprint; 69*6b445a62SJohn Marino unsigned char t_intr; 70*6b445a62SJohn Marino unsigned char t_quit; 71*6b445a62SJohn Marino unsigned char t_susp; 72*6b445a62SJohn Marino unsigned char t_dsusp; 73*6b445a62SJohn Marino unsigned char t_start; 74*6b445a62SJohn Marino unsigned char t_stop; 75*6b445a62SJohn Marino unsigned char t_lnext; 76*6b445a62SJohn Marino unsigned char t_flush; 77*6b445a62SJohn Marino unsigned char t_status; 78*6b445a62SJohn Marino } _RL_TTY_CHARS; 79*6b445a62SJohn Marino 80*6b445a62SJohn Marino #endif /* _RLTTY_H_ */ 81