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

Comparing rxvt-unicode/src/main.C (file contents):
Revision 1.173 by root, Wed Jan 11 19:55:34 2006 UTC vs.
Revision 1.176 by root, Thu Jan 12 01:30:53 2006 UTC

478/*----------------------------------------------------------------------*/ 478/*----------------------------------------------------------------------*/
479bool 479bool
480rxvt_term::init (int argc, const char *const *argv) 480rxvt_term::init (int argc, const char *const *argv)
481{ 481{
482 SET_R (this); 482 SET_R (this);
483 TEMP_ENV; // few things in X do not call setlocale :( 483 set_environ (envv); // few things in X do not call setlocale :(
484 484
485 set_locale (""); 485 set_locale ("");
486 486
487 if (!init_vars ()) 487 if (!init_vars ())
488 return false; 488 return false;
523 rs[Rs_perl_eval] = 0; 523 rs[Rs_perl_eval] = 0;
524 } 524 }
525 } 525 }
526#endif 526#endif
527 rxvt_perl.init (); 527 rxvt_perl.init ();
528 setlocale (LC_CTYPE, curlocale); // perl init destroys current locale
528 HOOK_INVOKE ((this, HOOK_INIT, DT_END)); 529 HOOK_INVOKE ((this, HOOK_INIT, DT_END));
529 } 530 }
530#endif 531#endif
531 532
532 create_windows (argc, argv); 533 create_windows (argc, argv);
615 sw_int (this, &sig_handlers::sig_term) 616 sw_int (this, &sig_handlers::sig_term)
616 { 617 {
617 } 618 }
618} sig_handlers; 619} sig_handlers;
619 620
621char **rxvt_environ; // startup environment
622
620void 623void
621rxvt_init () 624rxvt_init ()
622{ 625{
626 rxvt_environ = environ;
627
623 /* 628 /*
624 * Save and then give up any super-user privileges 629 * Save and then give up any super-user privileges
625 * If we need privileges in any area then we must specifically request it. 630 * If we need privileges in any area then we must specifically request it.
626 * We should only need to be root in these cases: 631 * We should only need to be root in these cases:
627 * 1. write utmp entries on some systems 632 * 1. write utmp entries on some systems
1446 unsigned long fg, bg; 1451 unsigned long fg, bg;
1447 const char *p; 1452 const char *p;
1448 char **s; 1453 char **s;
1449 XIMStyles *xim_styles; 1454 XIMStyles *xim_styles;
1450 1455
1451 TEMP_ENV; 1456 set_environ (envv);
1452 1457
1453 if (! ((p = XSetLocaleModifiers (modifiers)) && *p)) 1458 if (! ((p = XSetLocaleModifiers (modifiers)) && *p))
1454 return false; 1459 return false;
1455 1460
1456 D_MAIN ((stderr, "rxvt_IM_get_IC ()")); 1461 D_MAIN ((stderr, "rxvt_IM_get_IC ()"));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines