Mercurial > emacs
comparison src/dispnew.c @ 14125:2f222e8b06f5
(init_display): Treat null string DISPLAY var like not set.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Tue, 09 Jan 1996 23:38:07 +0000 |
parents | a3c83dde295e |
children | ee40177f6c68 |
comparison
equal
deleted
inserted
replaced
14124:d47a86dabe95 | 14125:2f222e8b06f5 |
---|---|
2470 /* If the user wants to use a window system, we shouldn't bother | 2470 /* If the user wants to use a window system, we shouldn't bother |
2471 initializing the terminal. This is especially important when the | 2471 initializing the terminal. This is especially important when the |
2472 terminal is so dumb that emacs gives up before and doesn't bother | 2472 terminal is so dumb that emacs gives up before and doesn't bother |
2473 using the window system. | 2473 using the window system. |
2474 | 2474 |
2475 If the DISPLAY environment variable is set, try to use X, and die | 2475 If the DISPLAY environment variable is set and nonempty, |
2476 with an error message if that doesn't work. */ | 2476 try to use X, and die with an error message if that doesn't work. */ |
2477 | 2477 |
2478 #ifdef HAVE_X_WINDOWS | 2478 #ifdef HAVE_X_WINDOWS |
2479 if (! display_arg) | 2479 if (! display_arg) |
2480 { | 2480 { |
2481 char *display; | |
2481 #ifdef VMS | 2482 #ifdef VMS |
2482 display_arg = (getenv ("DECW$DISPLAY") != 0); | 2483 display = getenv ("DECW$DISPLAY"); |
2483 #else | 2484 #else |
2484 display_arg = (getenv ("DISPLAY") != 0); | 2485 display = getenv ("DISPLAY"); |
2485 #endif | 2486 #endif |
2487 | |
2488 display_arg = (display != 0 && *display != 0); | |
2486 } | 2489 } |
2487 | 2490 |
2488 if (!inhibit_window_system && display_arg) | 2491 if (!inhibit_window_system && display_arg) |
2489 { | 2492 { |
2490 Vwindow_system = intern ("x"); | 2493 Vwindow_system = intern ("x"); |