emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/xterm.c,v


From: Richard M. Stallman
Subject: [Emacs-diffs] Changes to emacs/src/xterm.c,v
Date: Mon, 10 Sep 2007 17:34:02 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Richard M. Stallman <rms>       07/09/10 17:34:01

Index: xterm.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/xterm.c,v
retrieving revision 1.954
retrieving revision 1.955
diff -u -b -r1.954 -r1.955
--- xterm.c     29 Aug 2007 05:27:52 -0000      1.954
+++ xterm.c     10 Sep 2007 17:34:01 -0000      1.955
@@ -10586,9 +10586,12 @@
   *bits = nr;
 }
 
+/* Return 1 if display DISPLAY is available for use, 0 otherwise.
+   But don't permanently open it, just test its availability.  */
+
 int
 x_display_ok (display)
-    const char * display;
+    const char *display;
 {
     int dpy_ok = 1;
     Display *dpy;
@@ -10601,6 +10604,10 @@
     return dpy_ok;
 }
 
+/* Open a connection to X display DISPLAY_NAME, and return
+   the structure that describes the open display.
+   If we cannot contact the display, return null.  */
+
 struct x_display_info *
 x_term_init (display_name, xrm_option, resource_name)
      Lisp_Object display_name;
@@ -10621,6 +10628,9 @@
       ++x_initialized;
     }
 
+  if (! x_display_ok (SDATA (display_name)))
+    error ("Display %s can't be opened", SDATA (display_name));
+
 #ifdef USE_GTK
   {
 #define NUM_ARGV 10




reply via email to

[Prev in Thread] Current Thread [Next in Thread]