changeset 2095:139f87bcbaf1

Define HAVE_TCATTR based on HAVE_TERMIOS earlier. (struct emacs_tty): Separate the struct decl from the EMACS_..._TTY... macro definitions. Use HAVE_TCATTR to decide whether to use `struct termios'.
author Richard M. Stallman <rms@gnu.org>
date Wed, 10 Mar 1993 05:34:06 +0000
parents c77607f8e32d
children d8ba7550a0cc
files src/systty.h
diffstat 1 files changed, 16 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/src/systty.h	Wed Mar 10 05:33:40 1993 +0000
+++ b/src/systty.h	Wed Mar 10 05:34:06 1993 +0000
@@ -17,6 +17,9 @@
 along with GNU Emacs; see the file COPYING.  If not, write to
 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
+#ifdef HAVE_TERMIOS
+#define HAVE_TCATTR
+#endif
 
 /* Include the proper files.  */
 #ifdef HAVE_TERMIO
@@ -247,7 +250,6 @@
    advantage to using tabs over spaces.  */
 
 
-
 /* For each tty parameter structure that Emacs might want to save and restore,
    - include an element for it in this structure,
    - define a pair of numbered macros to get and set it and return 
@@ -261,7 +263,7 @@
 
 /* There is always one of the following elements, so there is no need
    for dummy get and set definitions.  */
-#ifdef HAVE_TERMIOS
+#ifdef HAVE_TCATTR
   struct termios main;
 #else
 #ifdef HAVE_TERMIO
@@ -274,10 +276,17 @@
 #endif
 #endif
 #endif
-
-#ifdef HAVE_TERMIOS
-#define HAVE_TCATTR
+#ifdef TIOCGLTC
+  struct ltchars ltchars;
 #endif
+#ifdef TIOCGETC
+  struct tchars tchars;
+  int lmode;
+#endif
+};
+
+/* Define EMACS_GET_TTY and EMACS_SET_TTY,
+   the macros for reading and setting parts of `struct emacs_tty'.  */
 
 #ifdef HAVE_TCATTR
 
@@ -315,7 +324,6 @@
 #endif
 
 #ifdef TIOCGLTC
-  struct ltchars ltchars;
 #define EMACS_GET_TTY_2(fd, p)				\
   (ioctl ((fd), TIOCGLTC, &(p)->ltchars) != -1)
 #define EMACS_SET_TTY_2(fd, p, waitp)			\
@@ -326,8 +334,6 @@
 #endif /* TIOCGLTC */
 
 #ifdef TIOCGETC
-  struct tchars tchars;
-  int lmode;
 #define EMACS_GET_TTY_3(fd, p)				\
   (ioctl ((fd), TIOCGETC, &(p)->tchars) != -1		\
    && ioctl ((fd), TIOCLGET, &(p)->lmode) != -1)
@@ -339,8 +345,6 @@
 #define EMACS_SET_TTY_3(fd, p, waitp) 1
 #endif /* TIOCGLTC */
 
-};
-
 /* Define these to be a concatenation of all the EMACS_{GET,SET}_TTY_n
    macros.  */
 #define EMACS_GET_TTY(fd, tc)	\
@@ -352,7 +356,8 @@
   (EMACS_SET_TTY_1 (fd, tc, waitp)	\
    && EMACS_SET_TTY_2 (fd, tc, waitp)	\
    && EMACS_SET_TTY_3 (fd, tc, waitp))
-
+
+/* Define EMACS_TTY_TABS_OK.  */
 
 #ifdef HAVE_TERMIOS