summaryrefslogtreecommitdiff
path: root/src/dispnew.c
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1996-01-09 23:38:07 +0000
committerKarl Heuer <kwzh@gnu.org>1996-01-09 23:38:07 +0000
commitb924907400a2813d3803d36e4cfd0baf64f6f371 (patch)
tree1e4e742205a7655382f1810083eb487157e07133 /src/dispnew.c
parentbe61fc41b063aac74706b4e5e8ab6853dede62b2 (diff)
downloademacs-b924907400a2813d3803d36e4cfd0baf64f6f371.tar.gz
(init_display): Treat null string DISPLAY var like not set.
Diffstat (limited to 'src/dispnew.c')
-rw-r--r--src/dispnew.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/dispnew.c b/src/dispnew.c
index 19f6c33c1cf..1b958bcd29f 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -2472,17 +2472,20 @@ init_display ()
terminal is so dumb that emacs gives up before and doesn't bother
using the window system.
- If the DISPLAY environment variable is set, try to use X, and die
- with an error message if that doesn't work. */
+ If the DISPLAY environment variable is set and nonempty,
+ try to use X, and die with an error message if that doesn't work. */
#ifdef HAVE_X_WINDOWS
if (! display_arg)
{
+ char *display;
#ifdef VMS
- display_arg = (getenv ("DECW$DISPLAY") != 0);
+ display = getenv ("DECW$DISPLAY");
#else
- display_arg = (getenv ("DISPLAY") != 0);
+ display = getenv ("DISPLAY");
#endif
+
+ display_arg = (display != 0 && *display != 0);
}
if (!inhibit_window_system && display_arg)