--- rxvt-unicode/src/init.C 2004/02/13 12:16:21 1.26 +++ rxvt-unicode/src/init.C 2004/02/22 08:28:36 1.32 @@ -11,6 +11,7 @@ * - extensive modifications * Copyright (c) 1999 D J Hawkey Jr * - QNX support + * Copyright (c) 2003-2004 Marc Lehmann * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -400,10 +401,6 @@ ks_smallfont = XK_less; #endif -#ifdef GREEK_SUPPORT - ks_greekmodeswith = GREEK_KEYBOARD_MODESWITCH; -#endif - refresh_limit = 1; refresh_type = SLOW_REFRESH; prev_nrow = prev_ncol = 0; @@ -669,12 +666,6 @@ rs[Rs_scrollBar_thickness]); #endif - TermWin.fontset = new rxvt_fontset (this); - TermWin.fontset->populate (rs[Rs_font]); - TermWin.fwidth = TermWin.fontset->base_font ()->width; - TermWin.fheight = TermWin.fontset->base_font ()->height; - TermWin.fbase = TermWin.fontset->base_font ()->ascent; - #ifdef XTERM_REVERSE_VIDEO /* this is how xterm implements reverseVideo */ if (Options & Opt_reverseVideo) @@ -764,9 +755,12 @@ * @ COLORTERM: terminal sub-name and also indicates its color * @ TERM: terminal name * @ TERMINFO: path to terminfo directory + * @ COLORFGBG: fg;bg color codes */ putenv (env_display); putenv (env_windowid); + if (env_colorfgbg) + putenv (env_colorfgbg); #ifdef RXVT_TERMINFO putenv ("TERMINFO=" RXVT_TERMINFO); @@ -805,6 +799,8 @@ #if HAVE_XSETLOCALE || HAVE_SETLOCALE free (this->locale); this->locale = rxvt_strdup (setlocale (LC_CTYPE, "")); + SET_LOCALE (this->locale); + mbstate.reset (); #endif #if HAVE_NL_LANGINFO free (codeset); @@ -897,10 +893,6 @@ SavedModes |= PrivMode_menuBar; } -#ifdef GREEK_SUPPORT - greek_init (); -#endif - #ifdef CURSOR_BLINK if (Options & Opt_cursorBlink) (void)gettimeofday (&lastcursorchange, NULL); @@ -1141,7 +1133,13 @@ /* grab colors before netscape does */ Get_Colours (); - change_font (1, NULL); + if (!change_font (rs[Rs_font])) + { + fprintf (stderr, "unable to load a base font, please provide one using -fn fontname\n"); + destroy (); + return; + } + window_calc (0, 0); old_width = szHint.width; old_height = szHint.height; @@ -1363,6 +1361,8 @@ case 0: close (cfd); /* only keep tty_fd and STDERR open */ + init_env (); + if (rxvt_control_tty (tty_fd, ttydev) < 0) rxvt_print_error ("could not obtain control of tty"); else