+2007-09-10 Richard Stallman <rms@gnu.org>
+
+ * xterm.c (x_term_init): Give error if can't open DISPLAY_NAME.
+
2007-09-10 Micha\e,Ak\e(Bl Cadilhac <michael@cadilhac.name>
* lisp.h (struct Lisp_Subr): Rename `prompt' field to `intspec'.
*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;
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;
++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