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.173 by root, Wed Jul 5 20:31:48 2006 UTC vs.
Revision 1.181 by ayin, Tue May 1 21:10:04 2007 UTC

189 pixmap = None; 189 pixmap = None;
190#endif 190#endif
191 191
192 MEvent.time = CurrentTime; 192 MEvent.time = CurrentTime;
193 MEvent.button = AnyButton; 193 MEvent.button = AnyButton;
194 options = DEFAULT_OPTIONS;
195 want_refresh = 1; 194 want_refresh = 1;
196 priv_modes = SavedModes = PrivMode_Default; 195 priv_modes = SavedModes = PrivMode_Default;
197 ncol = 80; 196 ncol = 80;
198 nrow = 24; 197 nrow = 24;
199 int_bwidth = INTERNALBORDERWIDTH; 198 int_bwidth = INTERNALBORDERWIDTH;
206 refresh_type = SLOW_REFRESH; 205 refresh_type = SLOW_REFRESH;
207 206
208 oldcursor.row = oldcursor.col = -1; 207 oldcursor.row = oldcursor.col = -1;
209#ifdef XPM_BACKGROUND 208#ifdef XPM_BACKGROUND
210 /* bgPixmap.w = bgPixmap.h = 0; */ 209 /* bgPixmap.w = bgPixmap.h = 0; */
211 bgPixmap.x = bgPixmap.y = 50; 210 bgPixmap.x = bgPixmap.y = 0;
212 bgPixmap.pixmap = None; 211 bgPixmap.pixmap = None;
213#endif 212#endif
214 213
215 last_bot = last_state = -1; 214 last_bot = last_state = -1;
215
216 set_option (Opt_scrollBar, 1);
217 set_option (Opt_scrollTtyOutput, 1);
218 set_option (Opt_jumpScroll, 1);
219 set_option (Opt_secondaryScreen, 1);
220 set_option (Opt_secondaryScroll, 1);
221 set_option (Opt_pastableTabs, 1);
222 set_option (Opt_intensityStyles, 1);
216 223
217 return true; 224 return true;
218} 225}
219 226
220void 227void
748 alias_color (Color_topShadow, Color_White); 755 alias_color (Color_topShadow, Color_White);
749 } 756 }
750#endif /* KEEP_SCROLLCOLOR */ 757#endif /* KEEP_SCROLLCOLOR */
751 758
752#ifdef OFF_FOCUS_FADING 759#ifdef OFF_FOCUS_FADING
753 if (rs[Rs_fade])
754 for (i = 0; i < (depth <= 2 ? 2 : NRS_COLORS); i++) 760 for (i = 0; i < (depth <= 2 ? 2 : NRS_COLORS); i++)
755 { 761 update_fade_color (i);
756 rgba c;
757 pix_colors [Color_fade].get (c);
758 pix_colors_focused [i].fade (this, atoi (rs[Rs_fade]), pix_colors_unfocused[i],c);
759 }
760#endif 762#endif
761} 763}
762 764
763/*----------------------------------------------------------------------*/ 765/*----------------------------------------------------------------------*/
764/* color aliases, fg/bg bright-bold */ 766/* color aliases, fg/bg bright-bold */
1084 * GET TTY CURRENT STATE * 1086 * GET TTY CURRENT STATE *
1085 * ------------------------------------------------------------------------- */ 1087 * ------------------------------------------------------------------------- */
1086void 1088void
1087rxvt_get_ttymode (ttymode_t *tio, int erase) 1089rxvt_get_ttymode (ttymode_t *tio, int erase)
1088{ 1090{
1089#ifdef HAVE_TERMIOS_H
1090 /* 1091 /*
1091 * standard System V termios interface 1092 * standard System V termios interface
1092 */ 1093 */
1093 if (GET_TERMIOS (STDIN_FILENO, tio) < 0) 1094 if (GET_TERMIOS (STDIN_FILENO, tio) < 0)
1094 { 1095 {
1161 tio->c_lflag = (ISIG | ICANON | IEXTEN | ECHO 1162 tio->c_lflag = (ISIG | ICANON | IEXTEN | ECHO
1162# if defined (ECHOCTL) && defined (ECHOKE) 1163# if defined (ECHOCTL) && defined (ECHOKE)
1163 | ECHOCTL | ECHOKE 1164 | ECHOCTL | ECHOKE
1164# endif 1165# endif
1165 | ECHOE | ECHOK); 1166 | ECHOE | ECHOK);
1166# else /* HAVE_TERMIOS_H */
1167
1168 /*
1169 * sgtty interface
1170 */
1171
1172 /* get parameters -- gtty */
1173 if (ioctl (STDIN_FILENO, TIOCGETP, & (tio->sg)) < 0)
1174 {
1175 tio->sg.sg_erase = CERASE; /* ^H */
1176 tio->sg.sg_kill = CKILL; /* ^U */
1177 }
1178
1179 if (erase != -1)
1180 tio->sg.sg_erase = (char)erase;
1181
1182 tio->sg.sg_flags = (CRMOD | ECHO | EVENP | ODDP);
1183
1184 /* get special characters */
1185 if (ioctl (STDIN_FILENO, TIOCGETC, & (tio->tc)) < 0)
1186 {
1187 tio->tc.t_intrc = CINTR; /* ^C */
1188 tio->tc.t_quitc = CQUIT; /* ^\ */
1189 tio->tc.t_startc = CSTART; /* ^Q */
1190 tio->tc.t_stopc = CSTOP; /* ^S */
1191 tio->tc.t_eofc = CEOF; /* ^D */
1192 tio->tc.t_brkc = -1;
1193 }
1194
1195 /* get local special chars */
1196 if (ioctl (STDIN_FILENO, TIOCGLTC, & (tio->lc)) < 0)
1197 {
1198 tio->lc.t_suspc = CSUSP; /* ^Z */
1199 tio->lc.t_dsuspc = CDSUSP; /* ^Y */
1200 tio->lc.t_rprntc = CRPRNT; /* ^R */
1201 tio->lc.t_flushc = CFLUSH; /* ^O */
1202 tio->lc.t_werasc = CWERASE; /* ^W */
1203 tio->lc.t_lnextc = CLNEXT; /* ^V */
1204 }
1205 /* get line discipline */
1206 ioctl (STDIN_FILENO, TIOCGETD, & (tio->line));
1207# ifdef NTTYDISC
1208 tio->line = NTTYDISC;
1209# endif /* NTTYDISC */
1210
1211 tio->local = (LCRTBS | LCRTERA | LCTLECH | LPASS8 | LCRTKIL);
1212#endif /* HAVE_TERMIOS_H */
1213 1167
1214 /* 1168 /*
1215 * Debugging 1169 * Debugging
1216 */ 1170 */
1217#ifdef DEBUG_TTYMODE 1171#ifdef DEBUG_TTYMODE
1318 else 1272 else
1319#endif 1273#endif
1320 if (!pty->get ()) 1274 if (!pty->get ())
1321 rxvt_fatal ("can't initialize pseudo-tty, aborting.\n"); 1275 rxvt_fatal ("can't initialize pseudo-tty, aborting.\n");
1322 1276
1323 pty->set_utf8_mode (enc_utf8);
1324
1325 /* set initial window size */
1326 tt_winch ();
1327
1328 int er; 1277 int er;
1329 1278
1330#ifndef NO_BACKSPACE_KEY 1279#ifndef NO_BACKSPACE_KEY
1331 if (key_backspace[0] && !key_backspace[1]) 1280 if (key_backspace[0] && !key_backspace[1])
1332 er = key_backspace[0]; 1281 er = key_backspace[0];
1335 else 1284 else
1336#endif 1285#endif
1337 er = -1; 1286 er = -1;
1338 1287
1339 rxvt_get_ttymode (&tio, er); 1288 rxvt_get_ttymode (&tio, er);
1289 SET_TERMIOS (pty->tty, &tio); /* init terminal attributes */
1290 pty->set_utf8_mode (enc_utf8);
1291
1292 /* set initial window size */
1293 tt_winch ();
1340 1294
1341#if ENABLE_FRILLS 1295#if ENABLE_FRILLS
1342 if (rs[Rs_pty_fd]) 1296 if (rs[Rs_pty_fd])
1343 return; 1297 return;
1344#endif 1298#endif
1398 */ 1352 */
1399int 1353int
1400rxvt_term::run_child (const char *const *argv) 1354rxvt_term::run_child (const char *const *argv)
1401{ 1355{
1402 char *login; 1356 char *login;
1403
1404 SET_TTYMODE (STDIN_FILENO, &tio); /* init terminal attributes */
1405 1357
1406 if (OPTION (Opt_console)) 1358 if (OPTION (Opt_console))
1407 { /* be virtual console, fail silently */ 1359 { /* be virtual console, fail silently */
1408#ifdef TIOCCONS 1360#ifdef TIOCCONS
1409 unsigned int on = 1; 1361 unsigned int on = 1;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines