… | |
… | |
746 | envv->push_back (0); |
746 | envv->push_back (0); |
747 | |
747 | |
748 | this->argv = argv; |
748 | this->argv = argv; |
749 | this->envv = envv; |
749 | this->envv = envv; |
750 | |
750 | |
|
|
751 | env = new char *[this->envv->size ()]; |
|
|
752 | for (int i = 0; i < this->envv->size (); i++) |
|
|
753 | env[i] = this->envv->at (i); |
|
|
754 | |
751 | init2 (argv->size () - 1, argv->begin ()); |
755 | init2 (argv->size () - 1, argv->begin ()); |
752 | } |
756 | } |
753 | |
757 | |
754 | void |
758 | void |
755 | rxvt_term::init (int argc, const char *const *argv, const char *const *envv) |
759 | rxvt_term::init (int argc, const char *const *argv, const char *const *envv) |
… | |
… | |
773 | void |
777 | void |
774 | rxvt_term::init2 (int argc, const char *const *argv) |
778 | rxvt_term::init2 (int argc, const char *const *argv) |
775 | { |
779 | { |
776 | SET_R (this); |
780 | SET_R (this); |
777 | set_locale (""); |
781 | set_locale (""); |
778 | set_environ (envv); // a few things in X do not call setlocale :( |
782 | set_environ (env); // a few things in X do not call setlocale :( |
779 | |
783 | |
780 | init_vars (); |
784 | init_vars (); |
781 | |
785 | |
782 | const char **cmd_argv = init_resources (argc, argv); |
786 | const char **cmd_argv = init_resources (argc, argv); |
783 | |
787 | |
… | |
… | |
950 | |
954 | |
951 | /*----------------------------------------------------------------------*/ |
955 | /*----------------------------------------------------------------------*/ |
952 | void |
956 | void |
953 | rxvt_term::set_locale (const char *locale) |
957 | rxvt_term::set_locale (const char *locale) |
954 | { |
958 | { |
955 | set_environ (envv); |
959 | set_environ (env); |
956 | |
960 | |
957 | free (this->locale); |
961 | free (this->locale); |
958 | this->locale = setlocale (LC_CTYPE, locale); |
962 | this->locale = setlocale (LC_CTYPE, locale); |
959 | |
963 | |
960 | if (!this->locale) |
964 | if (!this->locale) |
… | |
… | |
988 | } |
992 | } |
989 | |
993 | |
990 | void |
994 | void |
991 | rxvt_term::init_xlocale () |
995 | rxvt_term::init_xlocale () |
992 | { |
996 | { |
993 | set_environ (envv); |
997 | set_environ (env); |
994 | |
998 | |
995 | #if USE_XIM |
999 | #if USE_XIM |
996 | if (!locale) |
1000 | if (!locale) |
997 | rxvt_warn ("setting locale failed, continuing without locale support.\n"); |
1001 | rxvt_warn ("setting locale failed, continuing without locale support.\n"); |
998 | else |
1002 | else |