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.249 by ayin, Tue Feb 19 10:47:03 2008 UTC vs.
Revision 1.252 by root, Sun Jun 15 13:54:15 2008 UTC

539{ 539{
540 this->envv = envv; 540 this->envv = envv;
541 541
542 SET_R (this); 542 SET_R (this);
543 set_locale (""); 543 set_locale ("");
544 set_environ (envv); // few things in X do not call setlocale :( 544 set_environ (envv); // a few things in X do not call setlocale :(
545 545
546 init_vars (); 546 init_vars ();
547 547
548 init_secondary (); 548 init_secondary ();
549 549
550 const char **cmd_argv = init_resources (argc, argv); 550 const char **cmd_argv = init_resources (argc, argv);
551 551
552#ifdef KEYSYM_RESOURCE 552#ifdef KEYSYM_RESOURCE
553 keyboard->register_done (); 553 keyboard->register_done ();
554#endif 554#endif
555
556 if (const char *path = rs[Rs_chdir])
557 if (*path) // ignored if empty
558 {
559 if (*path != '/')
560 rxvt_fatal ("specified shell working directory must start with a slash, aborting.\n");
561
562 if (chdir (path))
563 rxvt_fatal ("unable to change into specified shell working directory, aborting.\n");
564 }
555 565
556 if (option (Opt_scrollBar)) 566 if (option (Opt_scrollBar))
557 scrollBar.state = STATE_IDLE; /* set existence for size calculations */ 567 scrollBar.state = STATE_IDLE; /* set existence for size calculations */
558 568
559 pty = ptytty::create (); 569 pty = ptytty::create ();
832 run_command (argv); 842 run_command (argv);
833} 843}
834 844
835/*----------------------------------------------------------------------*/ 845/*----------------------------------------------------------------------*/
836void 846void
837rxvt_term::Get_Colours () 847rxvt_term::get_colours ()
838{ 848{
839 int i; 849 int i;
840 850
841#ifdef OFF_FOCUS_FADING 851#ifdef OFF_FOCUS_FADING
842 pix_colors = pix_colors_focused; 852 pix_colors = pix_colors_focused;
1059 Window top, parent; 1069 Window top, parent;
1060 1070
1061 dLocal (Display *, dpy); 1071 dLocal (Display *, dpy);
1062 1072
1063 /* grab colors before netscape does */ 1073 /* grab colors before netscape does */
1064 Get_Colours (); 1074 get_colours ();
1065 1075
1066 if (!set_fonts ()) 1076 if (!set_fonts ())
1067 rxvt_fatal ("unable to load base fontset, please specify a valid one using -fn, aborting.\n"); 1077 rxvt_fatal ("unable to load base fontset, please specify a valid one using -fn, aborting.\n");
1068 1078
1069 parent = display->root; 1079 parent = display->root;
1524 signal (SIGTSTP, SIG_IGN); 1534 signal (SIGTSTP, SIG_IGN);
1525 signal (SIGTTIN, SIG_IGN); 1535 signal (SIGTTIN, SIG_IGN);
1526 signal (SIGTTOU, SIG_IGN); 1536 signal (SIGTTOU, SIG_IGN);
1527#endif /* SIGTSTP */ 1537#endif /* SIGTSTP */
1528 1538
1529 // unblock signals (signals are blocked by iom.C
1530 sigset_t ss;
1531 sigemptyset (&ss);
1532 sigprocmask (SIG_SETMASK, &ss, 0);
1533
1534 /* command interpreter path */ 1539 /* command interpreter path */
1535 if (argv) 1540 if (argv)
1536 { 1541 {
1537# ifdef DEBUG_CMD 1542# ifdef DEBUG_CMD
1538 int i; 1543 int i;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines