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>
+
+ * 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
}
#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;
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);
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 */
}
}
-
-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. */
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)
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)));
}
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__
*/
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);
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)
{
#include "keyboard.h"
#endif
-char *x_get_string_resource (XrmDatabase rdb, const char *name,
- const char *class);
-
-\f
/* X file search path processing. */
/* 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