Lines 372-386
Link Here
|
372 |
* Open display, get options/resources and create the window |
372 |
* Open display, get options/resources and create the window |
373 |
*/ |
373 |
*/ |
374 |
|
374 |
|
375 |
if ((rs[Rs_display_name] = getenv ("DISPLAY")) == NULL) |
375 |
rs[Rs_display_name] = getenv ("DISPLAY"); |
376 |
rs[Rs_display_name] = ":0"; |
|
|
377 |
|
376 |
|
378 |
get_options (r_argc, r_argv); |
377 |
get_options (r_argc, r_argv); |
379 |
|
378 |
|
380 |
if (!(display = displays.get (rs[Rs_display_name]))) |
379 |
if (!rs[Rs_display_name] || !(display = displays.get (rs[Rs_display_name]))) |
381 |
{ |
380 |
{ |
382 |
free (r_argv); |
381 |
free (r_argv); |
383 |
rxvt_fatal ("can't open display %s, aborting.\n", rs[Rs_display_name]); |
382 |
rxvt_fatal ("can't open display %s, aborting.\n", |
|
|
383 |
(rs[Rs_display_name] ? rs[Rs_display_name] : |
384 |
"as no -display option given and DISPLAY not set")); |
384 |
} |
385 |
} |
385 |
|
386 |
|
386 |
// using a local pointer decreases code size a lot |
387 |
// using a local pointer decreases code size a lot |