… | |
… | |
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. |
… | |
… | |
398 | #if defined (HOTKEY_CTRL) || defined (HOTKEY_META) |
399 | #if defined (HOTKEY_CTRL) || defined (HOTKEY_META) |
399 | ks_bigfont = XK_greater; |
400 | ks_bigfont = XK_greater; |
400 | ks_smallfont = XK_less; |
401 | ks_smallfont = XK_less; |
401 | #endif |
402 | #endif |
402 | |
403 | |
403 | #ifdef GREEK_SUPPORT |
|
|
404 | ks_greekmodeswith = GREEK_KEYBOARD_MODESWITCH; |
|
|
405 | #endif |
|
|
406 | |
|
|
407 | refresh_limit = 1; |
404 | refresh_limit = 1; |
408 | refresh_type = SLOW_REFRESH; |
405 | refresh_type = SLOW_REFRESH; |
409 | prev_nrow = prev_ncol = 0; |
406 | prev_nrow = prev_ncol = 0; |
410 | #ifdef MULTICHAR_SET |
407 | #ifdef MULTICHAR_SET |
411 | # ifdef MULTICHAR_ENCODING |
408 | # ifdef MULTICHAR_ENCODING |
… | |
… | |
762 | * @ DISPLAY: in case we started with -display |
759 | * @ DISPLAY: in case we started with -display |
763 | * @ WINDOWID: X window id number of the window |
760 | * @ WINDOWID: X window id number of the window |
764 | * @ COLORTERM: terminal sub-name and also indicates its color |
761 | * @ COLORTERM: terminal sub-name and also indicates its color |
765 | * @ TERM: terminal name |
762 | * @ TERM: terminal name |
766 | * @ TERMINFO: path to terminfo directory |
763 | * @ TERMINFO: path to terminfo directory |
|
|
764 | * @ COLORFGBG: fg;bg color codes |
767 | */ |
765 | */ |
768 | putenv (env_display); |
766 | putenv (env_display); |
769 | putenv (env_windowid); |
767 | putenv (env_windowid); |
|
|
768 | if (env_colorfgbg) |
|
|
769 | putenv (env_colorfgbg); |
770 | |
770 | |
771 | #ifdef RXVT_TERMINFO |
771 | #ifdef RXVT_TERMINFO |
772 | putenv ("TERMINFO=" RXVT_TERMINFO); |
772 | putenv ("TERMINFO=" RXVT_TERMINFO); |
773 | #endif |
773 | #endif |
774 | |
774 | |
… | |
… | |
803 | rxvt_term::set_locale (const char *locale) |
803 | rxvt_term::set_locale (const char *locale) |
804 | { |
804 | { |
805 | #if HAVE_XSETLOCALE || HAVE_SETLOCALE |
805 | #if HAVE_XSETLOCALE || HAVE_SETLOCALE |
806 | free (this->locale); |
806 | free (this->locale); |
807 | this->locale = rxvt_strdup (setlocale (LC_CTYPE, "")); |
807 | this->locale = rxvt_strdup (setlocale (LC_CTYPE, "")); |
|
|
808 | SET_LOCALE (this->locale); |
|
|
809 | mbstate.reset (); |
808 | #endif |
810 | #endif |
809 | #if HAVE_NL_LANGINFO |
811 | #if HAVE_NL_LANGINFO |
810 | free (codeset); |
812 | free (codeset); |
811 | codeset = strdup (nl_langinfo (CODESET)); |
813 | codeset = strdup (nl_langinfo (CODESET)); |
812 | enc_utf8 = !STRCASECMP (codeset, "UTF-8") |
814 | enc_utf8 = !STRCASECMP (codeset, "UTF-8") |
… | |
… | |
894 | if (menubar_visible ()) |
896 | if (menubar_visible ()) |
895 | { |
897 | { |
896 | PrivateModes |= PrivMode_menuBar; |
898 | PrivateModes |= PrivMode_menuBar; |
897 | SavedModes |= PrivMode_menuBar; |
899 | SavedModes |= PrivMode_menuBar; |
898 | } |
900 | } |
899 | |
|
|
900 | #ifdef GREEK_SUPPORT |
|
|
901 | greek_init (); |
|
|
902 | #endif |
|
|
903 | |
901 | |
904 | #ifdef CURSOR_BLINK |
902 | #ifdef CURSOR_BLINK |
905 | if (Options & Opt_cursorBlink) |
903 | if (Options & Opt_cursorBlink) |
906 | (void)gettimeofday (&lastcursorchange, NULL); |
904 | (void)gettimeofday (&lastcursorchange, NULL); |
907 | #endif |
905 | #endif |
… | |
… | |
1361 | rxvt_print_error ("can't fork"); |
1359 | rxvt_print_error ("can't fork"); |
1362 | return -1; |
1360 | return -1; |
1363 | case 0: |
1361 | case 0: |
1364 | close (cfd); /* only keep tty_fd and STDERR open */ |
1362 | close (cfd); /* only keep tty_fd and STDERR open */ |
1365 | |
1363 | |
|
|
1364 | init_env (); |
|
|
1365 | |
1366 | if (rxvt_control_tty (tty_fd, ttydev) < 0) |
1366 | if (rxvt_control_tty (tty_fd, ttydev) < 0) |
1367 | rxvt_print_error ("could not obtain control of tty"); |
1367 | rxvt_print_error ("could not obtain control of tty"); |
1368 | else |
1368 | else |
1369 | { |
1369 | { |
1370 | /* Reopen stdin, stdout and stderr over the tty file descriptor */ |
1370 | /* Reopen stdin, stdout and stderr over the tty file descriptor */ |