… | |
… | |
222 | int opt_fork, opt_opendisplay, opt_quiet; |
222 | int opt_fork, opt_opendisplay, opt_quiet; |
223 | |
223 | |
224 | int |
224 | int |
225 | main (int argc, const char *const *argv) |
225 | main (int argc, const char *const *argv) |
226 | { |
226 | { |
|
|
227 | rxvt_init (); |
|
|
228 | |
227 | for (int i = 1; i < argc; i++) |
229 | for (int i = 1; i < argc; i++) |
228 | { |
230 | { |
229 | if (!strcmp (argv [i], "-f") || !strcmp (argv [i], "--fork")) |
231 | if (!strcmp (argv [i], "-f") || !strcmp (argv [i], "--fork")) |
230 | opt_fork = 1; |
232 | opt_fork = 1; |
231 | else if (!strcmp (argv [i], "-o") || !strcmp (argv [i], "--opendisplay")) |
233 | else if (!strcmp (argv [i], "-o") || !strcmp (argv [i], "--opendisplay")) |
… | |
… | |
237 | rxvt_log ("%s: unknown option '%s', aborting.\n", argv [0], argv [i]); |
239 | rxvt_log ("%s: unknown option '%s', aborting.\n", argv [0], argv [i]); |
238 | return EXIT_FAILURE; |
240 | return EXIT_FAILURE; |
239 | } |
241 | } |
240 | } |
242 | } |
241 | |
243 | |
242 | rxvt_init (); |
|
|
243 | |
|
|
244 | chdir ("/"); |
244 | chdir ("/"); |
245 | |
245 | |
246 | if (opt_opendisplay) |
246 | if (opt_opendisplay) |
247 | displays.get (getenv ("DISPLAY")); // open display and never release it |
247 | displays.get (getenv ("DISPLAY")); // open display and never release it |
248 | |
248 | |