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.30 by pcg, Sat Feb 21 22:14:00 2004 UTC

9 * - extensive modifications 9 * - extensive modifications
10 * Copyright (c) 1998-2001 Geoff Wing <gcw@pobox.com> 10 * Copyright (c) 1998-2001 Geoff Wing <gcw@pobox.com>
11 * - extensive modifications 11 * - extensive modifications
12 * Copyright (c) 1999 D J Hawkey Jr <hawkeyd@visi.com> 12 * Copyright (c) 1999 D J Hawkey Jr <hawkeyd@visi.com>
13 * - QNX support 13 * - QNX support
14 * Copyright (c) 2003-2004 Marc Lehmann <pcg@goof.com>
14 * 15 *
15 * This program is free software; you can redistribute it and/or modify 16 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by 17 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2 of the License, or 18 * the Free Software Foundation; either version 2 of the License, or
18 * (at your option) any later version. 19 * (at your option) any later version.
762 * @ DISPLAY: in case we started with -display 763 * @ DISPLAY: in case we started with -display
763 * @ WINDOWID: X window id number of the window 764 * @ WINDOWID: X window id number of the window
764 * @ COLORTERM: terminal sub-name and also indicates its color 765 * @ COLORTERM: terminal sub-name and also indicates its color
765 * @ TERM: terminal name 766 * @ TERM: terminal name
766 * @ TERMINFO: path to terminfo directory 767 * @ TERMINFO: path to terminfo directory
768 * @ COLORFGBG: fg;bg color codes
767 */ 769 */
768 putenv (env_display); 770 putenv (env_display);
769 putenv (env_windowid); 771 putenv (env_windowid);
772 if (env_colorfgbg)
773 putenv (env_colorfgbg);
770 774
771#ifdef RXVT_TERMINFO 775#ifdef RXVT_TERMINFO
772 putenv ("TERMINFO=" RXVT_TERMINFO); 776 putenv ("TERMINFO=" RXVT_TERMINFO);
773#endif 777#endif
774 778
803rxvt_term::set_locale (const char *locale) 807rxvt_term::set_locale (const char *locale)
804{ 808{
805#if HAVE_XSETLOCALE || HAVE_SETLOCALE 809#if HAVE_XSETLOCALE || HAVE_SETLOCALE
806 free (this->locale); 810 free (this->locale);
807 this->locale = rxvt_strdup (setlocale (LC_CTYPE, "")); 811 this->locale = rxvt_strdup (setlocale (LC_CTYPE, ""));
812 SET_LOCALE (this->locale);
813 mbstate.reset ();
808#endif 814#endif
809#if HAVE_NL_LANGINFO 815#if HAVE_NL_LANGINFO
810 free (codeset); 816 free (codeset);
811 codeset = strdup (nl_langinfo (CODESET)); 817 codeset = strdup (nl_langinfo (CODESET));
812 enc_utf8 = !STRCASECMP (codeset, "UTF-8") 818 enc_utf8 = !STRCASECMP (codeset, "UTF-8")
1361 rxvt_print_error ("can't fork"); 1367 rxvt_print_error ("can't fork");
1362 return -1; 1368 return -1;
1363 case 0: 1369 case 0:
1364 close (cfd); /* only keep tty_fd and STDERR open */ 1370 close (cfd); /* only keep tty_fd and STDERR open */
1365 1371
1372 init_env ();
1373
1366 if (rxvt_control_tty (tty_fd, ttydev) < 0) 1374 if (rxvt_control_tty (tty_fd, ttydev) < 0)
1367 rxvt_print_error ("could not obtain control of tty"); 1375 rxvt_print_error ("could not obtain control of tty");
1368 else 1376 else
1369 { 1377 {
1370 /* Reopen stdin, stdout and stderr over the tty file descriptor */ 1378 /* Reopen stdin, stdout and stderr over the tty file descriptor */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines