ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/init.C
(Generate patch)

Comparing rxvt-unicode/src/init.C (file contents):
Revision 1.175 by root, Sat Jan 20 00:37:13 2007 UTC vs.
Revision 1.179 by root, Sat Jan 20 12:29:35 2007 UTC

1079 * GET TTY CURRENT STATE * 1079 * GET TTY CURRENT STATE *
1080 * ------------------------------------------------------------------------- */ 1080 * ------------------------------------------------------------------------- */
1081void 1081void
1082rxvt_get_ttymode (ttymode_t *tio, int erase) 1082rxvt_get_ttymode (ttymode_t *tio, int erase)
1083{ 1083{
1084#ifdef HAVE_TERMIOS_H
1085 /* 1084 /*
1086 * standard System V termios interface 1085 * standard System V termios interface
1087 */ 1086 */
1088 if (GET_TERMIOS (STDIN_FILENO, tio) < 0) 1087 if (GET_TERMIOS (STDIN_FILENO, tio) < 0)
1089 { 1088 {
1156 tio->c_lflag = (ISIG | ICANON | IEXTEN | ECHO 1155 tio->c_lflag = (ISIG | ICANON | IEXTEN | ECHO
1157# if defined (ECHOCTL) && defined (ECHOKE) 1156# if defined (ECHOCTL) && defined (ECHOKE)
1158 | ECHOCTL | ECHOKE 1157 | ECHOCTL | ECHOKE
1159# endif 1158# endif
1160 | ECHOE | ECHOK); 1159 | ECHOE | ECHOK);
1161# else /* HAVE_TERMIOS_H */
1162
1163 /*
1164 * sgtty interface
1165 */
1166
1167 /* get parameters -- gtty */
1168 if (ioctl (STDIN_FILENO, TIOCGETP, & (tio->sg)) < 0)
1169 {
1170 tio->sg.sg_erase = CERASE; /* ^H */
1171 tio->sg.sg_kill = CKILL; /* ^U */
1172 }
1173
1174 if (erase != -1)
1175 tio->sg.sg_erase = (char)erase;
1176
1177 tio->sg.sg_flags = (CRMOD | ECHO | EVENP | ODDP);
1178
1179 /* get special characters */
1180 if (ioctl (STDIN_FILENO, TIOCGETC, & (tio->tc)) < 0)
1181 {
1182 tio->tc.t_intrc = CINTR; /* ^C */
1183 tio->tc.t_quitc = CQUIT; /* ^\ */
1184 tio->tc.t_startc = CSTART; /* ^Q */
1185 tio->tc.t_stopc = CSTOP; /* ^S */
1186 tio->tc.t_eofc = CEOF; /* ^D */
1187 tio->tc.t_brkc = -1;
1188 }
1189
1190 /* get local special chars */
1191 if (ioctl (STDIN_FILENO, TIOCGLTC, & (tio->lc)) < 0)
1192 {
1193 tio->lc.t_suspc = CSUSP; /* ^Z */
1194 tio->lc.t_dsuspc = CDSUSP; /* ^Y */
1195 tio->lc.t_rprntc = CRPRNT; /* ^R */
1196 tio->lc.t_flushc = CFLUSH; /* ^O */
1197 tio->lc.t_werasc = CWERASE; /* ^W */
1198 tio->lc.t_lnextc = CLNEXT; /* ^V */
1199 }
1200 /* get line discipline */
1201 ioctl (STDIN_FILENO, TIOCGETD, & (tio->line));
1202# ifdef NTTYDISC
1203 tio->line = NTTYDISC;
1204# endif /* NTTYDISC */
1205
1206 tio->local = (LCRTBS | LCRTERA | LCTLECH | LPASS8 | LCRTKIL);
1207#endif /* HAVE_TERMIOS_H */
1208 1160
1209 /* 1161 /*
1210 * Debugging 1162 * Debugging
1211 */ 1163 */
1212#ifdef DEBUG_TTYMODE 1164#ifdef DEBUG_TTYMODE
1325 else 1277 else
1326#endif 1278#endif
1327 er = -1; 1279 er = -1;
1328 1280
1329 rxvt_get_ttymode (&tio, er); 1281 rxvt_get_ttymode (&tio, er);
1282 SET_TERMIOS (pty->tty, &tio); /* init terminal attributes */
1330 pty->set_utf8_mode (enc_utf8); 1283 pty->set_utf8_mode (enc_utf8);
1331 SET_TTYMODE (STDIN_FILENO, &tio); /* init terminal attributes */
1332 1284
1333 /* set initial window size */ 1285 /* set initial window size */
1334 tt_winch (); 1286 tt_winch ();
1335 1287
1336#if ENABLE_FRILLS 1288#if ENABLE_FRILLS

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines