- delay setting the IUTF8 flag to after the tty settings have been
set so its value does not get lost (reported and analysed by Andrei
Paskevich).
+ - rip out support for obsolete sgtty.h interface.
8.1 Thu Dec 7 22:27:25 CET 2006
- ケリスマスプレゼント - zomg!!1, it's too early!!!
void
rxvt_get_ttymode (ttymode_t *tio, int erase)
{
-#ifdef HAVE_TERMIOS_H
/*
* standard System V termios interface
*/
| ECHOCTL | ECHOKE
# endif
| ECHOE | ECHOK);
-# else /* HAVE_TERMIOS_H */
-
- /*
- * sgtty interface
- */
-
- /* get parameters -- gtty */
- if (ioctl (STDIN_FILENO, TIOCGETP, & (tio->sg)) < 0)
- {
- tio->sg.sg_erase = CERASE; /* ^H */
- tio->sg.sg_kill = CKILL; /* ^U */
- }
-
- if (erase != -1)
- tio->sg.sg_erase = (char)erase;
-
- tio->sg.sg_flags = (CRMOD | ECHO | EVENP | ODDP);
-
- /* get special characters */
- if (ioctl (STDIN_FILENO, TIOCGETC, & (tio->tc)) < 0)
- {
- tio->tc.t_intrc = CINTR; /* ^C */
- tio->tc.t_quitc = CQUIT; /* ^\ */
- tio->tc.t_startc = CSTART; /* ^Q */
- tio->tc.t_stopc = CSTOP; /* ^S */
- tio->tc.t_eofc = CEOF; /* ^D */
- tio->tc.t_brkc = -1;
- }
-
- /* get local special chars */
- if (ioctl (STDIN_FILENO, TIOCGLTC, & (tio->lc)) < 0)
- {
- tio->lc.t_suspc = CSUSP; /* ^Z */
- tio->lc.t_dsuspc = CDSUSP; /* ^Y */
- tio->lc.t_rprntc = CRPRNT; /* ^R */
- tio->lc.t_flushc = CFLUSH; /* ^O */
- tio->lc.t_werasc = CWERASE; /* ^W */
- tio->lc.t_lnextc = CLNEXT; /* ^V */
- }
- /* get line discipline */
- ioctl (STDIN_FILENO, TIOCGETD, & (tio->line));
-# ifdef NTTYDISC
- tio->line = NTTYDISC;
-# endif /* NTTYDISC */
-
- tio->local = (LCRTBS | LCRTERA | LCTLECH | LPASS8 | LCRTKIL);
-#endif /* HAVE_TERMIOS_H */
/*
* Debugging
/* ways to deal with getting/setting termios structure */
-#ifdef HAVE_TERMIOS_H
/* termios interface */
# ifdef TCSANOW /* POSIX */
# define GET_TERMIOS(fd,tios) tcgetattr (fd, tios)
# endif
# endif
# define SET_TTYMODE(fd,tios) SET_TERMIOS (fd, tios)
-#else
-/* sgtty interface */
-
-# define SET_TTYMODE(fd,tt) \
- tt->sg.sg_ispeed = tt->sg.sg_ospeed = BAUDRATE, \
- ioctl (fd, TIOCSETP, & (tt->sg)), \
- ioctl (fd, TIOCSETC, & (tt->tc)), \
- ioctl (fd, TIOCSLTC, & (tt->lc)), \
- ioctl (fd, TIOCSETD, & (tt->line)), \
- ioctl (fd, TIOCLSET, & (tt->local))
-#endif /* HAVE_TERMIOS_H */
/* use the fastest baud-rate */
#ifdef B38400