comparison src/systty.h @ 398:74fd4e045ea6 r21-2-29

Import from CVS: tag r21-2-29
author cvs
date Mon, 13 Aug 2007 11:13:30 +0200
parents 8626e4521993
children de805c49cfc1
comparison
equal deleted inserted replaced
397:f4aeb21a5bad 398:74fd4e045ea6
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */ 19 Boston, MA 02111-1307, USA. */
20 20
21 /* Synched up with: FSF 19.30. */ 21 /* Synched up with: FSF 19.30. */
22 22
23 #ifndef _XEMACS_SYSTTY_H_ 23 #ifndef INCLUDED_systty_h_
24 #define _XEMACS_SYSTTY_H_ 24 #define INCLUDED_systty_h_
25 25
26 #ifdef HAVE_TERMIOS 26 #ifdef HAVE_TERMIOS
27 # define HAVE_TCATTR 27 # define HAVE_TCATTR
28 #endif 28 #endif
29 29
179 /* ----------------------------------------------------- */ 179 /* ----------------------------------------------------- */
180 /* inhibiting particular features */ 180 /* inhibiting particular features */
181 /* ----------------------------------------------------- */ 181 /* ----------------------------------------------------- */
182 182
183 183
184 #ifdef APOLLO
185 #undef TIOCSTART
186 #endif
187
188 #if defined (XENIX) || defined (BROKEN_TIOCGETC) 184 #if defined (XENIX) || defined (BROKEN_TIOCGETC)
189 #undef TIOCGETC /* Avoid confusing some conditionals that test this. */ 185 #undef TIOCGETC /* Avoid confusing some conditionals that test this. */
190 #endif 186 #endif
191 187
192 /* XEmacs: SIGIO is cleaned up so we remove the crap here that messes 188 /* XEmacs: SIGIO is cleaned up so we remove the crap here that messes
335 # define EMACS_SEPARATE_PROCESS_GROUP() setpgrp () 331 # define EMACS_SEPARATE_PROCESS_GROUP() setpgrp ()
336 /* old (pre-SVR4) USG's don't provide any way to do this. 332 /* old (pre-SVR4) USG's don't provide any way to do this.
337 No big loss -- it just means that ^Z won't work right 333 No big loss -- it just means that ^Z won't work right
338 if we're run from sh. */ 334 if we're run from sh. */
339 # define EMACS_SET_PROCESS_GROUP(pg) 335 # define EMACS_SET_PROCESS_GROUP(pg)
336 #elif defined(__MINGW32__)
337 # define EMACS_SEPARATE_PROCESS_GROUP()
340 #else 338 #else
341 /* Under NeXTstep, a process group of 0 is not the same as specifying 339 /* Under NeXTstep, a process group of 0 is not the same as specifying
342 your own process ID, so we go ahead and specify it explicitly. */ 340 your own process ID, so we go ahead and specify it explicitly. */
343 # define EMACS_SEPARATE_PROCESS_GROUP() setpgrp (0, getpid ()) 341 # define EMACS_SEPARATE_PROCESS_GROUP() setpgrp (0, getpid ())
344 # define EMACS_SET_PROCESS_GROUP(pg) setpgrp (0, pg) 342 # define EMACS_SET_PROCESS_GROUP(pg) setpgrp (0, pg)
354 state, for example a struct tchars, a struct sgttyb, a struct 352 state, for example a struct tchars, a struct sgttyb, a struct
355 tchars, a struct ltchars, and a struct pagechars, struct 353 tchars, a struct ltchars, and a struct pagechars, struct
356 emacs_tty should contain an element for each parameter struct 354 emacs_tty should contain an element for each parameter struct
357 that Emacs may change. 355 that Emacs may change.
358 356
359 EMACS_GET_TTY (int FD, struct emacs_tty *P) stores the parameters 357 emacs_get_tty (int FD, struct emacs_tty *P) stores the parameters
360 of the tty on FD in *P. Return zero if all's well, or -1 if we ran 358 of the tty on FD in *P. Return zero if all's well, or -1 if we ran
361 into an error we couldn't deal with. 359 into an error we couldn't deal with.
362 360
363 EMACS_SET_TTY (int FD, struct emacs_tty *P, int flushp) 361 emacs_set_tty (int FD, struct emacs_tty *P, int flushp)
364 sets the parameters of the tty on FD according to the contents of 362 sets the parameters of the tty on FD according to the contents of
365 *P. If flushp is non-zero, we discard queued input to be 363 *P. If flushp is non-zero, we discard queued input to be
366 written before making the change. 364 written before making the change.
367 Return 0 if all went well, and -1 if anything failed. 365 Return 0 if all went well, and -1 if anything failed.
368 366
405 struct tchars tchars; 403 struct tchars tchars;
406 int lmode; 404 int lmode;
407 #endif /* HAVE_TCHARS */ 405 #endif /* HAVE_TCHARS */
408 #endif /* HAVE_TERMIOS */ 406 #endif /* HAVE_TERMIOS */
409 }; 407 };
410 408
411 /* Define EMACS_GET_TTY and EMACS_SET_TTY, 409 int emacs_get_tty (int fd, struct emacs_tty *settings);
412 the macros for reading and setting parts of `struct emacs_tty'. 410 int emacs_set_tty (int fd, struct emacs_tty *settings, int flushp);
413
414 These got pretty unmanageable (huge macros are hard to debug), and
415 finally needed some code which couldn't be done as part of an
416 expression, so we moved them out to their own functions in sysdep.c. */
417 #define EMACS_GET_TTY(fd, p) emacs_get_tty (fd, p)
418 #define EMACS_SET_TTY(fd, p, waitp) emacs_set_tty (fd, p, waitp)
419 411
420 412
421 /* --------------------------------------------------------- */ 413 /* --------------------------------------------------------- */
422 /* Define EMACS_TTY_TABS_OK */ 414 /* Define EMACS_TTY_TABS_OK */
423 /* --------------------------------------------------------- */ 415 /* --------------------------------------------------------- */
443 #endif /* not DOS_NT */ 435 #endif /* not DOS_NT */
444 436
445 #endif /* not def HAVE_TERMIO */ 437 #endif /* not def HAVE_TERMIO */
446 #endif /* not def HAVE_TERMIOS */ 438 #endif /* not def HAVE_TERMIOS */
447 439
448 #endif /* _XEMACS_SYSTTY_H_ */ 440 #endif /* INCLUDED_systty_h_ */