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.26 by pcg, Fri Feb 13 12:16:21 2004 UTC vs.
Revision 1.29 by pcg, Sat Feb 21 21:43:37 2004 UTC

762 * @ DISPLAY: in case we started with -display 762 * @ DISPLAY: in case we started with -display
763 * @ WINDOWID: X window id number of the window 763 * @ WINDOWID: X window id number of the window
764 * @ COLORTERM: terminal sub-name and also indicates its color 764 * @ COLORTERM: terminal sub-name and also indicates its color
765 * @ TERM: terminal name 765 * @ TERM: terminal name
766 * @ TERMINFO: path to terminfo directory 766 * @ TERMINFO: path to terminfo directory
767 * @ COLORFGBG: fg;bg color codes
767 */ 768 */
768 putenv (env_display); 769 putenv (env_display);
769 putenv (env_windowid); 770 putenv (env_windowid);
771 if (env_colorfgbg)
772 putenv (env_colorfgbg);
770 773
771#ifdef RXVT_TERMINFO 774#ifdef RXVT_TERMINFO
772 putenv ("TERMINFO=" RXVT_TERMINFO); 775 putenv ("TERMINFO=" RXVT_TERMINFO);
773#endif 776#endif
774 777
803rxvt_term::set_locale (const char *locale) 806rxvt_term::set_locale (const char *locale)
804{ 807{
805#if HAVE_XSETLOCALE || HAVE_SETLOCALE 808#if HAVE_XSETLOCALE || HAVE_SETLOCALE
806 free (this->locale); 809 free (this->locale);
807 this->locale = rxvt_strdup (setlocale (LC_CTYPE, "")); 810 this->locale = rxvt_strdup (setlocale (LC_CTYPE, ""));
811 SET_LOCALE (this->locale);
812 mbstate.reset ();
808#endif 813#endif
809#if HAVE_NL_LANGINFO 814#if HAVE_NL_LANGINFO
810 free (codeset); 815 free (codeset);
811 codeset = strdup (nl_langinfo (CODESET)); 816 codeset = strdup (nl_langinfo (CODESET));
812 enc_utf8 = !STRCASECMP (codeset, "UTF-8") 817 enc_utf8 = !STRCASECMP (codeset, "UTF-8")
1361 rxvt_print_error ("can't fork"); 1366 rxvt_print_error ("can't fork");
1362 return -1; 1367 return -1;
1363 case 0: 1368 case 0:
1364 close (cfd); /* only keep tty_fd and STDERR open */ 1369 close (cfd); /* only keep tty_fd and STDERR open */
1365 1370
1371 init_env ();
1372
1366 if (rxvt_control_tty (tty_fd, ttydev) < 0) 1373 if (rxvt_control_tty (tty_fd, ttydev) < 0)
1367 rxvt_print_error ("could not obtain control of tty"); 1374 rxvt_print_error ("could not obtain control of tty");
1368 else 1375 else
1369 { 1376 {
1370 /* Reopen stdin, stdout and stderr over the tty file descriptor */ 1377 /* Reopen stdin, stdout and stderr over the tty file descriptor */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines