Commit a6c2ee1b authored by Dmitry Antipov's avatar Dmitry Antipov

* dispextern.h (check_x_display_info, x_get_string_resource):

Declare here just once and unify the latter.
* frame.c (check_x_display_info, x_get_string_resource):
* nsterm.h (check_x_display_info):
* xrdb.c (x_get_string_resource):
* xterm.h (check_x_display_info): Remove prototypes.
* nsfns.m (x_get_string_resource): Likewise.  Adjust definition.
* w32reg.c (x_get_string_resource): Likewise.
(w32_get_rdb_resource): Adjust user.
parent 07dd2ea4
2013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
* dispextern.h (check_x_display_info, x_get_string_resource):
Declare here just once and unify the latter.
* frame.c (check_x_display_info, x_get_string_resource):
* nsterm.h (check_x_display_info):
* xrdb.c (x_get_string_resource):
* xterm.h (check_x_display_info): Remove prototypes.
* nsfns.m (x_get_string_resource): Likewise. Adjust definition.
* w32reg.c (x_get_string_resource): Likewise.
(w32_get_rdb_resource): Adjust user.
2013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
* xterm.h (struct x_display_info): New member
......
......@@ -61,6 +61,7 @@ xstrcasecmp (char const *a, char const *b)
}
#ifdef HAVE_X_WINDOWS
#include <X11/Xresource.h> /* for XrmDatabase */
typedef struct x_display_info Display_Info;
typedef XImage * XImagePtr;
typedef XImagePtr XImagePtr_or_DC;
......@@ -3530,6 +3531,7 @@ enum resource_types
RES_TYPE_BOOLEAN_NUMBER
};
extern Display_Info *check_x_display_info (Lisp_Object);
extern Lisp_Object x_get_arg (Display_Info *, Lisp_Object,
Lisp_Object, const char *, const char *class,
enum resource_types);
......@@ -3541,6 +3543,8 @@ extern Lisp_Object x_default_parameter (struct frame *, Lisp_Object,
Lisp_Object, Lisp_Object,
const char *, const char *,
enum resource_types);
extern char *x_get_string_resource (XrmDatabase, const char *,
const char *);
#endif /* HAVE_WINDOW_SYSTEM */
......
......@@ -3520,11 +3520,6 @@ validate_x_resource_name (void)
}
}
extern char *x_get_string_resource (XrmDatabase, const char *, const char *);
extern Display_Info *check_x_display_info (Lisp_Object);
/* Get specified attribute from resource database RDB.
See Fx_get_resource below for other parameters. */
......
......@@ -2211,17 +2211,13 @@ and GNUstep implementations ("distributor-specific release
wid - 1) / wid;
}
extern const char *x_get_string_resource (XrmDatabase, char *, char *);
/* terms impl this instead of x-get-resource directly */
const char *
x_get_string_resource (XrmDatabase rdb, char *name, char *class)
char *
x_get_string_resource (XrmDatabase rdb, const char *name, const char *class)
{
/* remove appname prefix; TODO: allow for !="Emacs" */
char *toCheck = class + (!strncmp (class, "Emacs.", 6) ? 6 : 0);
const char *res;
const char *res, *toCheck = class + (!strncmp (class, "Emacs.", 6) ? 6 : 0);
check_window_system (NULL);
if (inhibit_x_resources)
......@@ -2229,9 +2225,9 @@ and GNUstep implementations ("distributor-specific release
return NULL;
res = ns_get_defaults_value (toCheck);
return !res ? NULL :
(!c_strncasecmp (res, "YES", 3) ? "true" :
(!c_strncasecmp (res, "NO", 2) ? "false" : res));
return (!res ? NULL :
(!c_strncasecmp (res, "YES", 3) ? "true" :
(!c_strncasecmp (res, "NO", 2) ? "false" : (char *) res)));
}
......
......@@ -605,8 +605,6 @@ extern struct ns_display_info *x_display_list;
extern Lisp_Object ns_display_name_list;
extern struct ns_display_info *ns_display_info_for_name (Lisp_Object name);
struct ns_display_info *check_x_display_info (Lisp_Object frame);
struct ns_output
{
#ifdef __OBJC__
......
......@@ -56,7 +56,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
*/
static char *
w32_get_rdb_resource (char *rdb, char *resource)
w32_get_rdb_resource (char *rdb, const char *resource)
{
char *value = rdb;
int len = strlen (resource);
......@@ -141,7 +141,7 @@ w32_get_string_resource (char *name, char *class, DWORD dwexptype)
database RDB. */
char *
x_get_string_resource (XrmDatabase rdb, char *name, char *class)
x_get_string_resource (XrmDatabase rdb, const char *name, const char *class)
{
if (rdb)
{
......
......@@ -48,10 +48,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include "keyboard.h"
#endif
char *x_get_string_resource (XrmDatabase rdb, const char *name,
const char *class);
/* X file search path processing. */
......
......@@ -975,7 +975,6 @@ extern void x_clipboard_manager_save_all (void);
/* Defined in xfns.c */
extern struct x_display_info * check_x_display_info (Lisp_Object);
extern Lisp_Object x_get_focus_frame (struct frame *);
#ifdef USE_GTK
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment