… | |
… | |
25 | |
25 | |
26 | #include <cstdlib> |
26 | #include <cstdlib> |
27 | #include <cstring> |
27 | #include <cstring> |
28 | |
28 | |
29 | int |
29 | int |
30 | main (int argc, const char *const *argv) |
30 | main (int argc, char *argv[]) |
31 | try |
31 | try |
32 | { |
32 | { |
33 | ptytty::init (); |
33 | ptytty::init (); |
34 | rxvt_init (); |
34 | rxvt_init (); |
35 | |
35 | |
36 | rxvt_term *t = new rxvt_term; |
36 | rxvt_term *t = new rxvt_term; |
37 | |
|
|
38 | #if ENABLE_PERL |
|
|
39 | stringvec *args = new stringvec; |
|
|
40 | stringvec *envv = new stringvec; |
|
|
41 | |
|
|
42 | for (int i = 0; i < argc; i++) |
|
|
43 | args->push_back (strdup (argv [i])); |
|
|
44 | |
|
|
45 | for (char **var = environ; *var; var++) |
|
|
46 | envv->push_back (strdup (*var)); |
|
|
47 | |
|
|
48 | t->init (args, envv); |
|
|
49 | #else |
|
|
50 | t->init (argc, argv); |
37 | t->init (argc, argv, environ); |
51 | #endif |
|
|
52 | |
|
|
53 | ev_run (); |
38 | ev_run (); |
54 | |
39 | |
55 | return EXIT_SUCCESS; |
40 | return EXIT_SUCCESS; |
56 | } |
41 | } |
57 | catch (const class rxvt_failure_exception &e) |
42 | catch (const class rxvt_failure_exception &e) |