]> code.delx.au - gnu-emacs/blobdiff - src/systty.h
(Fwhile): If mocklisp, test for nonzeroness.
[gnu-emacs] / src / systty.h
index 897a3c28e93f6927e8c0892622fa76ac9305ad64..b07bfa2786055a53108931122c950c3ddf5a19aa 100644 (file)
@@ -1,5 +1,5 @@
 /* systty.h - System-dependent definitions for terminals.
-   Copyright (C) 1992 Free Software Foundation, Inc.
+   Copyright (C) 1993 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -26,12 +26,19 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #ifdef __DGUX
 #include <sys/ioctl.h>
 #endif
+#ifndef NO_TERMIO
 #include <termio.h>
+#endif /* not NO_TERMIO */
 #include <fcntl.h>
 #else
 #ifdef HAVE_TERMIOS
+#if defined(_AIX) && defined(_I386)
+#include <termios.h>           /* termios.h needs to be before termio.h */
+#include <termio.h>
+#else
 #include <termio.h>
 #include <termios.h>
+#endif /* _AIX && _I386 */
 #include <fcntl.h>
 #else /* neither HAVE_TERMIO nor HAVE_TERMIOS */
 #ifndef VMS
@@ -107,7 +114,13 @@ static struct sensemode {
 #include <unistd.h>
 #endif /* AIX */
 
+#ifdef IRIX4
+/* Get _getpty prototype */
+#include <unistd.h>
+#endif
+
 #ifdef SYSV_PTYS
+#include <sys/types.h>
 #include <sys/tty.h>
 #ifdef titan
 #include <sys/ttyhw.h>
@@ -151,11 +164,22 @@ static struct sensemode {
 #undef ASYNC
 #endif
 
-/* Interupt input is not used if there is no FIONREAD.  */
+/* Interrupt input is not used if there is no FIONREAD.  */
 #ifndef FIONREAD
 #undef SIGIO
 #endif
 
+/* On TERMIOS systems, the tcmumbleattr calls take care of these
+   parameters, and it's a bad idea to use them (on AIX, it makes the
+   tty hang for a long time).  */
+#if defined (TIOCGLTC) && !defined (HAVE_TERMIOS)
+#define HAVE_LTCHARS
+#endif
+
+#if defined (TIOCGETC) && !defined (HAVE_TERMIOS)
+#define HAVE_TCHARS
+#endif
+
 \f
 /* Try to establish the correct character to disable terminal functions
    in a system-independent manner.  Note that USG (at least) define
@@ -165,6 +189,7 @@ static struct sensemode {
 #define CDISABLE _POSIX_VDISABLE
 #else /* not _POSIX_VDISABLE */
 #ifdef CDEL
+#undef CDISABLE
 #define CDISABLE CDEL
 #else /* not CDEL */
 #define CDISABLE 255
@@ -285,13 +310,19 @@ struct emacs_tty {
 #endif
 #endif
 #endif
-#ifdef TIOCGLTC
+
+/* If we have TERMIOS, we don't need to do this - they're taken care of
+   by the tc*attr calls.  */
+#ifndef HAVE_TERMIOS
+#ifdef HAVE_LTCHARS
   struct ltchars ltchars;
 #endif
-#ifdef TIOCGETC
+
+#ifdef HAVE_TCHARS
   struct tchars tchars;
   int lmode;
 #endif
+#endif
 };
 \f
 /* Define EMACS_GET_TTY and EMACS_SET_TTY,