rltty.h revision 58310
121308Sache/* rltty.h - tty driver-related definitions used by some library files. */
221308Sache
321308Sache/* Copyright (C) 1995 Free Software Foundation, Inc.
421308Sache
521308Sache   This file contains the Readline Library (the Library), a set of
621308Sache   routines for providing Emacs style line input to programs that ask
721308Sache   for it.
821308Sache
921308Sache   The Library is free software; you can redistribute it and/or modify
1021308Sache   it under the terms of the GNU General Public License as published by
1158310Sache   the Free Software Foundation; either version 2, or (at your option)
1221308Sache   any later version.
1321308Sache
1421308Sache   The Library is distributed in the hope that it will be useful, but
1521308Sache   WITHOUT ANY WARRANTY; without even the implied warranty of
1621308Sache   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
1721308Sache   General Public License for more details.
1821308Sache
1921308Sache   The GNU General Public License is often shipped with GNU software, and
2021308Sache   is generally kept in a file called COPYING or LICENSE.  If you do not
2121308Sache   have a copy of the license, write to the Free Software Foundation,
2258310Sache   59 Temple Place, Suite 330, Boston, MA 02111 USA. */
2321308Sache
2421308Sache#if !defined (_RLTTY_H_)
2558310Sache#define _RLTTY_H_
2621308Sache
2721308Sache/* Posix systems use termios and the Posix signal functions. */
2821308Sache#if defined (TERMIOS_TTY_DRIVER)
2921308Sache#  include <termios.h>
3021308Sache#endif /* TERMIOS_TTY_DRIVER */
3121308Sache
3221308Sache/* System V machines use termio. */
3321308Sache#if defined (TERMIO_TTY_DRIVER)
3421308Sache#  include <termio.h>
3521308Sache#  if !defined (TCOON)
3621308Sache#    define TCOON 1
3721308Sache#  endif
3821308Sache#endif /* TERMIO_TTY_DRIVER */
3921308Sache
4021308Sache/* Other (BSD) machines use sgtty. */
4121308Sache#if defined (NEW_TTY_DRIVER)
4221308Sache#  include <sgtty.h>
4321308Sache#endif
4421308Sache
4535486Sache#include "rlwinsize.h"
4626497Sache
4721308Sache/* Define _POSIX_VDISABLE if we are not using the `new' tty driver and
4821308Sache   it is not already defined.  It is used both to determine if a
4921308Sache   special character is disabled and to disable certain special
5021308Sache   characters.  Posix systems should set to 0, USG systems to -1. */
5121308Sache#if !defined (NEW_TTY_DRIVER) && !defined (_POSIX_VDISABLE)
5221308Sache#  if defined (_SVR4_VDISABLE)
5321308Sache#    define _POSIX_VDISABLE _SVR4_VDISABLE
5421308Sache#  else
5521308Sache#    if defined (_POSIX_VERSION)
5621308Sache#      define _POSIX_VDISABLE 0
5721308Sache#    else /* !_POSIX_VERSION */
5821308Sache#      define _POSIX_VDISABLE -1
5921308Sache#    endif /* !_POSIX_VERSION */
6021308Sache#  endif /* !_SVR4_DISABLE */
6121308Sache#endif /* !NEW_TTY_DRIVER && !_POSIX_VDISABLE */
6221308Sache
6358310Sachetypedef struct _rl_tty_chars {
6458310Sache  char t_eof;
6558310Sache  char t_eol;
6658310Sache  char t_eol2;
6758310Sache  char t_erase;
6858310Sache  char t_werase;
6958310Sache  char t_kill;
7058310Sache  char t_reprint;
7158310Sache  char t_intr;
7258310Sache  char t_quit;
7358310Sache  char t_susp;
7458310Sache  char t_dsusp;
7558310Sache  char t_start;
7658310Sache  char t_stop;
7758310Sache  char t_lnext;
7858310Sache  char t_flush;
7958310Sache  char t_status;
8058310Sache} _RL_TTY_CHARS;
8158310Sache
8221308Sache#endif /* _RLTTY_H_ */
83