rltty.h revision 21308
193939Smike/* rltty.h - tty driver-related definitions used by some library files. */
293939Smike
393939Smike/* Copyright (C) 1995 Free Software Foundation, Inc.
493939Smike
593939Smike   This file contains the Readline Library (the Library), a set of
693939Smike   routines for providing Emacs style line input to programs that ask
793939Smike   for it.
893939Smike
993939Smike   The Library is free software; you can redistribute it and/or modify
1093939Smike   it under the terms of the GNU General Public License as published by
1193939Smike   the Free Software Foundation; either version 1, or (at your option)
1293939Smike   any later version.
1393939Smike
1493939Smike   The Library is distributed in the hope that it will be useful, but
1593939Smike   WITHOUT ANY WARRANTY; without even the implied warranty of
1693939Smike   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
1793939Smike   General Public License for more details.
1893939Smike
1993939Smike   The GNU General Public License is often shipped with GNU software, and
2093939Smike   is generally kept in a file called COPYING or LICENSE.  If you do not
2193939Smike   have a copy of the license, write to the Free Software Foundation,
2293939Smike   675 Mass Ave, Cambridge, MA 02139, USA. */
2393939Smike
2493939Smike#if !defined (_RLTTY_H_)
2593939Smike#define _RLTTY_H
2693939Smike
27103355Smike/* Posix systems use termios and the Posix signal functions. */
2893939Smike#if defined (TERMIOS_TTY_DRIVER)
2993939Smike#  include <termios.h>
3093939Smike#endif /* TERMIOS_TTY_DRIVER */
3193939Smike
32103355Smike/* System V machines use termio. */
3393939Smike#if defined (TERMIO_TTY_DRIVER)
3493939Smike#  include <termio.h>
3593939Smike#  if !defined (TCOON)
3693939Smike#    define TCOON 1
37119893Sru#  endif
3893939Smike#endif /* TERMIO_TTY_DRIVER */
3993939Smike
40103355Smike/* Other (BSD) machines use sgtty. */
41103355Smike#if defined (NEW_TTY_DRIVER)
4293939Smike#  include <sgtty.h>
4393939Smike#endif
4493939Smike
4593939Smike/* Define _POSIX_VDISABLE if we are not using the `new' tty driver and
4693939Smike   it is not already defined.  It is used both to determine if a
4793939Smike   special character is disabled and to disable certain special
4893939Smike   characters.  Posix systems should set to 0, USG systems to -1. */
4993939Smike#if !defined (NEW_TTY_DRIVER) && !defined (_POSIX_VDISABLE)
5093939Smike#  if defined (_SVR4_VDISABLE)
5193939Smike#    define _POSIX_VDISABLE _SVR4_VDISABLE
5293939Smike#  else
5393939Smike#    if defined (_POSIX_VERSION)
5493939Smike#      define _POSIX_VDISABLE 0
5593939Smike#    else /* !_POSIX_VERSION */
5693939Smike#      define _POSIX_VDISABLE -1
5793939Smike#    endif /* !_POSIX_VERSION */
5893939Smike#  endif /* !_SVR4_DISABLE */
5993939Smike#endif /* !NEW_TTY_DRIVER && !_POSIX_VDISABLE */
6093939Smike
6193939Smike#endif /* _RLTTY_H_ */
6293939Smike