comparison src/systty.h @ 209:41ff10fd062f r20-4b3

Import from CVS: tag r20-4b3
author cvs
date Mon, 13 Aug 2007 10:04:58 +0200
parents 850242ba4a81
children c5d627a313b1
comparison
equal deleted inserted replaced
208:f427b8ec4379 209:41ff10fd062f
94 94
95 /***** (3) The MSDOS/NT way *****/ 95 /***** (3) The MSDOS/NT way *****/
96 96
97 /* Nothing doing */ 97 /* Nothing doing */
98 98
99 #elif !defined (VMS) 99 #else
100 100
101 /***** (4) The BSD way *****/ 101 /***** (4) The BSD way *****/
102 102
103 # ifdef linux /* XEmacs addition -- necessary? */ 103 # ifdef linux /* XEmacs addition -- necessary? */
104 # include <bsd/sgtty.h> 104 # include <bsd/sgtty.h>
105 # else 105 # else
106 # include <sgtty.h> 106 # include <sgtty.h>
107 # endif 107 # endif
108 108
109 #else /* VMS */ 109
110 110 #endif /* HAVE_TERMIOS */
111 /***** (5) The VMS way *****/
112
113 # include <descrip.h>
114 static struct iosb
115 {
116 short status;
117 short offset;
118 short termlen;
119 short term;
120 } input_iosb;
121
122 extern int vms_waiting_for_ast;
123 extern int vms_stop_input;
124 extern int vms_input_ef;
125 extern int vms_timer_ef;
126 extern int vms_process_ef;
127 extern int vms_input_eflist;
128 extern int vms_timer_eflist;
129
130 static $DESCRIPTOR (vms_input_dsc, "TT");
131 static int vms_terminator_mask[2] = { 0, 0 };
132
133 static struct sensemode {
134 short status;
135 unsigned char xmit_baud;
136 unsigned char rcv_baud;
137 unsigned char crfill;
138 unsigned char lffill;
139 unsigned char parity;
140 unsigned char unused;
141 char class;
142 char type;
143 short scr_wid;
144 unsigned long tt_char : 24, scr_len : 8;
145 unsigned long tt2_char;
146 } sensemode_iosb;
147
148 #endif /* VMS */
149 111
150 /* XEmacs: I don't think we need the following crap. */ 112 /* XEmacs: I don't think we need the following crap. */
151 #ifdef __GNU_LIBRARY__ 113 #ifdef __GNU_LIBRARY__
152 #include <termios.h> 114 #include <termios.h>
153 #endif 115 #endif
156 USG5_4 was defined, but this is already included in s/usg5-4.h */ 118 USG5_4 was defined, but this is already included in s/usg5-4.h */
157 119
158 /* Generally useful to include this file: */ 120 /* Generally useful to include this file: */
159 121
160 /* But Sun OS has broken include files and doesn't want it included */ 122 /* But Sun OS has broken include files and doesn't want it included */
161 #if !defined (VMS) && !defined (DOS_NT) && !defined (WIN32) && !defined (SUNOS4) 123 #if !defined (DOS_NT) && !defined (WIN32) && !defined (SUNOS4)
162 # include <sys/ioctl.h> 124 # include <sys/ioctl.h>
163 #endif 125 #endif
164 /* UNIPLUS systems may have FIONREAD. */ 126 /* UNIPLUS systems may have FIONREAD. */
165 #ifdef UNIPLUS 127 #ifdef UNIPLUS
166 #include <sys.ioctl.h> 128 #include <sys.ioctl.h>
427 struct termios main; 389 struct termios main;
428 #else /* !HAVE_TCATTR */ 390 #else /* !HAVE_TCATTR */
429 #ifdef HAVE_TERMIO 391 #ifdef HAVE_TERMIO
430 struct termio main; 392 struct termio main;
431 #else /* !HAVE_TERMIO */ 393 #else /* !HAVE_TERMIO */
432 #ifdef VMS
433 struct sensemode main;
434 #else /* !VMS */
435 #ifdef DOS_NT 394 #ifdef DOS_NT
436 int main; 395 int main;
437 #else /* not DOS_NT */ 396 #else /* not DOS_NT */
438 struct sgttyb main; 397 struct sgttyb main;
439 #endif /* not DOS_NT */ 398 #endif /* not DOS_NT */
440 #endif /* !VMS */
441 #endif /* !HAVE_TERMIO */ 399 #endif /* !HAVE_TERMIO */
442 #endif /* !HAVE_TCATTR */ 400 #endif /* !HAVE_TCATTR */
443 401
444 /* If we have TERMIOS, we don't need to do this - they're taken care of 402 /* If we have TERMIOS, we don't need to do this - they're taken care of
445 by the tc*attr calls. */ 403 by the tc*attr calls. */
481 #ifdef HAVE_TERMIO 439 #ifdef HAVE_TERMIO
482 440
483 #define EMACS_TTY_TABS_OK(p) (((p)->main.c_oflag & TABDLY) != TAB3) 441 #define EMACS_TTY_TABS_OK(p) (((p)->main.c_oflag & TABDLY) != TAB3)
484 442
485 #else /* neither HAVE_TERMIO nor HAVE_TERMIOS */ 443 #else /* neither HAVE_TERMIO nor HAVE_TERMIOS */
486 #ifdef VMS
487
488 #define EMACS_TTY_TABS_OK(p) (((p)->main.tt_char & TT$M_MECHTAB) != 0)
489
490 #else
491
492 #ifdef DOS_NT 444 #ifdef DOS_NT
493 #define EMACS_TTY_TABS_OK(p) 0 445 #define EMACS_TTY_TABS_OK(p) 0
494 #else /* not DOS_NT */ 446 #else /* not DOS_NT */
495 #define EMACS_TTY_TABS_OK(p) (((p)->main.sg_flags & XTABS) != XTABS) 447 #define EMACS_TTY_TABS_OK(p) (((p)->main.sg_flags & XTABS) != XTABS)
496 #endif /* not DOS_NT */ 448 #endif /* not DOS_NT */
497 449
498 #endif /* not def VMS */
499 #endif /* not def HAVE_TERMIO */ 450 #endif /* not def HAVE_TERMIO */
500 #endif /* not def HAVE_TERMIOS */ 451 #endif /* not def HAVE_TERMIOS */
501 452
502 #endif /* _XEMACS_SYSTTY_H_ */ 453 #endif /* _XEMACS_SYSTTY_H_ */