Mercurial > emacs
comparison src/xterm.c @ 69550:cd511b21f729
(x_display_ok): New function.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Sat, 18 Mar 2006 13:48:57 +0000 |
parents | 3bec252ca789 |
children | 1ea752831737 |
comparison
equal
deleted
inserted
replaced
69549:8214188f641e | 69550:cd511b21f729 |
---|---|
10112 mask >>= 1; | 10112 mask >>= 1; |
10113 } | 10113 } |
10114 | 10114 |
10115 *offset = off; | 10115 *offset = off; |
10116 *bits = nr; | 10116 *bits = nr; |
10117 } | |
10118 | |
10119 int | |
10120 x_display_ok (display) | |
10121 const char * display; | |
10122 { | |
10123 int dpy_ok = 1; | |
10124 Display *dpy; | |
10125 char *display_name = display || getenv("DISPLAY"); | |
10126 | |
10127 if (!display_name) | |
10128 return 0; | |
10129 | |
10130 if ((dpy = XOpenDisplay (display))) | |
10131 XCloseDisplay (dpy); | |
10132 else | |
10133 dpy_ok = 0; | |
10134 return dpy_ok; | |
10117 } | 10135 } |
10118 | 10136 |
10119 struct x_display_info * | 10137 struct x_display_info * |
10120 x_term_init (display_name, xrm_option, resource_name) | 10138 x_term_init (display_name, xrm_option, resource_name) |
10121 Lisp_Object display_name; | 10139 Lisp_Object display_name; |