--- rxvt-unicode/src/init.C 2008/01/27 22:48:33 1.246 +++ rxvt-unicode/src/init.C 2008/07/15 16:41:22 1.253 @@ -461,11 +461,6 @@ if (!saveLines) set_option (Opt_scrollBar, 0); -#ifdef PRINTPIPE - if (!rs[Rs_print_pipe]) - rs[Rs_print_pipe] = PRINTPIPE; -#endif - if (!rs[Rs_cutchars]) rs[Rs_cutchars] = CUTCHARS; @@ -487,7 +482,7 @@ # endif #endif - setup_scrollbar (rs[Rs_scrollBar_align], rs[Rs_scrollstyle], rs[Rs_scrollBar_thickness]); + scrollBar.setup (this); #ifdef XTERM_REVERSE_VIDEO /* this is how xterm implements reverseVideo */ @@ -541,7 +536,7 @@ SET_R (this); set_locale (""); - set_environ (envv); // few things in X do not call setlocale :( + set_environ (envv); // a few things in X do not call setlocale :( init_vars (); @@ -553,8 +548,18 @@ keyboard->register_done (); #endif + if (const char *path = rs[Rs_chdir]) + if (*path) // ignored if empty + { + if (*path != '/') + rxvt_fatal ("specified shell working directory must start with a slash, aborting.\n"); + + if (chdir (path)) + rxvt_fatal ("unable to change into specified shell working directory, aborting.\n"); + } + if (option (Opt_scrollBar)) - scrollBar.setIdle (); /* set existence for size calculations */ + scrollBar.state = STATE_IDLE; /* set existence for size calculations */ pty = ptytty::create (); @@ -569,7 +574,7 @@ #endif if (option (Opt_scrollBar)) - resize_scrollbar (); /* create and map scrollbar */ + scrollBar.resize (); /* create and map scrollbar */ #ifdef HAVE_BG_PIXMAP { bgPixmap.set_target (this); @@ -834,7 +839,7 @@ /*----------------------------------------------------------------------*/ void -rxvt_term::Get_Colours () +rxvt_term::get_colours () { int i; @@ -1061,7 +1066,7 @@ dLocal (Display *, dpy); /* grab colors before netscape does */ - Get_Colours (); + get_colours (); if (!set_fonts ()) rxvt_fatal ("unable to load base fontset, please specify a valid one using -fn, aborting.\n"); @@ -1526,11 +1531,6 @@ signal (SIGTTOU, SIG_IGN); #endif /* SIGTSTP */ - // unblock signals (signals are blocked by iom.C - sigset_t ss; - sigemptyset (&ss); - sigprocmask (SIG_SETMASK, &ss, 0); - /* command interpreter path */ if (argv) {