00001 /* rltty.h - tty driver-related definitions used by some library files. */ 00002 00003 /* Copyright (C) 1995 Free Software Foundation, Inc. 00004 00005 This file contains the Readline Library (the Library), a set of 00006 routines for providing Emacs style line input to programs that ask 00007 for it. 00008 00009 The Library is free software; you can redistribute it and/or modify 00010 it under the terms of the GNU General Public License as published by 00011 the Free Software Foundation; either version 2, or (at your option) 00012 any later version. 00013 00014 The Library is distributed in the hope that it will be useful, but 00015 WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00017 General Public License for more details. 00018 00019 The GNU General Public License is often shipped with GNU software, and 00020 is generally kept in a file called COPYING or LICENSE. If you do not 00021 have a copy of the license, write to the Free Software Foundation, 00022 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ 00023 00024 #if !defined (_RLTTY_H_) 00025 #define _RLTTY_H_ 00026 00027 /* Posix systems use termios and the Posix signal functions. */ 00028 #if defined (TERMIOS_TTY_DRIVER) 00029 # include <termios.h> 00030 #endif /* TERMIOS_TTY_DRIVER */ 00031 00032 /* System V machines use termio. */ 00033 #if defined (TERMIO_TTY_DRIVER) 00034 # include <termio.h> 00035 # if !defined (TCOON) 00036 # define TCOON 1 00037 # endif 00038 #endif /* TERMIO_TTY_DRIVER */ 00039 00040 /* Other (BSD) machines use sgtty. */ 00041 #if defined (NEW_TTY_DRIVER) 00042 # include <sgtty.h> 00043 #endif 00044 00045 #include "rlwinsize.h" 00046 00047 /* Define _POSIX_VDISABLE if we are not using the `new' tty driver and 00048 it is not already defined. It is used both to determine if a 00049 special character is disabled and to disable certain special 00050 characters. Posix systems should set to 0, USG systems to -1. */ 00051 #if !defined (NEW_TTY_DRIVER) && !defined (_POSIX_VDISABLE) 00052 # if defined (_SVR4_VDISABLE) 00053 # define _POSIX_VDISABLE _SVR4_VDISABLE 00054 # else 00055 # if defined (_POSIX_VERSION) 00056 # define _POSIX_VDISABLE 0 00057 # else /* !_POSIX_VERSION */ 00058 # define _POSIX_VDISABLE -1 00059 # endif /* !_POSIX_VERSION */ 00060 # endif /* !_SVR4_DISABLE */ 00061 #endif /* !NEW_TTY_DRIVER && !_POSIX_VDISABLE */ 00062 00063 typedef struct _rl_tty_chars { 00064 unsigned char t_eof; 00065 unsigned char t_eol; 00066 unsigned char t_eol2; 00067 unsigned char t_erase; 00068 unsigned char t_werase; 00069 unsigned char t_kill; 00070 unsigned char t_reprint; 00071 unsigned char t_intr; 00072 unsigned char t_quit; 00073 unsigned char t_susp; 00074 unsigned char t_dsusp; 00075 unsigned char t_start; 00076 unsigned char t_stop; 00077 unsigned char t_lnext; 00078 unsigned char t_flush; 00079 unsigned char t_status; 00080 } _RL_TTY_CHARS; 00081 00082 #endif /* _RLTTY_H_ */