| 1 |
/* rlwinsize.h -- an attempt to isolate some of the system-specific defines |
| 2 |
for `struct winsize' and TIOCGWINSZ. */ |
| 3 |
|
| 4 |
/* Copyright (C) 1997 Free Software Foundation, Inc. |
| 5 |
|
| 6 |
This file contains the Readline Library (the Library), a set of |
| 7 |
routines for providing Emacs style line input to programs that ask |
| 8 |
for it. |
| 9 |
|
| 10 |
The Library is free software; you can redistribute it and/or modify |
| 11 |
it under the terms of the GNU General Public License as published by |
| 12 |
the Free Software Foundation; either version 2, or (at your option) |
| 13 |
any later version. |
| 14 |
|
| 15 |
The Library is distributed in the hope that it will be useful, but |
| 16 |
WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 18 |
General Public License for more details. |
| 19 |
|
| 20 |
The GNU General Public License is often shipped with GNU software, and |
| 21 |
is generally kept in a file called COPYING or LICENSE. If you do not |
| 22 |
have a copy of the license, write to the Free Software Foundation, |
| 23 |
51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA. */ |
| 24 |
|
| 25 |
#if !defined (_RLWINSIZE_H_) |
| 26 |
#define _RLWINSIZE_H_ |
| 27 |
|
| 28 |
#if defined (HAVE_CONFIG_H) |
| 29 |
# include "config_readline.h" |
| 30 |
#endif |
| 31 |
|
| 32 |
/* Try to find the definitions of `struct winsize' and TIOGCWINSZ */ |
| 33 |
|
| 34 |
#if defined (GWINSZ_IN_SYS_IOCTL) && !defined (TIOCGWINSZ) |
| 35 |
# include <sys/ioctl.h> |
| 36 |
#endif /* GWINSZ_IN_SYS_IOCTL && !TIOCGWINSZ */ |
| 37 |
|
| 38 |
#if defined (STRUCT_WINSIZE_IN_TERMIOS) && !defined (STRUCT_WINSIZE_IN_SYS_IOCTL) |
| 39 |
# include <termios.h> |
| 40 |
#endif /* STRUCT_WINSIZE_IN_TERMIOS && !STRUCT_WINSIZE_IN_SYS_IOCTL */ |
| 41 |
|
| 42 |
/* Not in either of the standard places, look around. */ |
| 43 |
#if !defined (STRUCT_WINSIZE_IN_TERMIOS) && !defined (STRUCT_WINSIZE_IN_SYS_IOCTL) |
| 44 |
# if defined (HAVE_SYS_STREAM_H) |
| 45 |
# include <sys/stream.h> |
| 46 |
# endif /* HAVE_SYS_STREAM_H */ |
| 47 |
# if defined (HAVE_SYS_PTEM_H) /* SVR4.2, at least, has it here */ |
| 48 |
# include <sys/ptem.h> |
| 49 |
# define _IO_PTEM_H /* work around SVR4.2 1.1.4 bug */ |
| 50 |
# endif /* HAVE_SYS_PTEM_H */ |
| 51 |
# if defined (HAVE_SYS_PTE_H) /* ??? */ |
| 52 |
# include <sys/pte.h> |
| 53 |
# endif /* HAVE_SYS_PTE_H */ |
| 54 |
#endif /* !STRUCT_WINSIZE_IN_TERMIOS && !STRUCT_WINSIZE_IN_SYS_IOCTL */ |
| 55 |
|
| 56 |
#endif /* _RL_WINSIZE_H */ |
| 57 |
|