/* Deal with the X Resource Manager.
Copyright (C) 1990, 1993, 1994, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+ 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
Author: Joseph Arceneaux
Created: 4/90
#include <config.h>
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
-
#include <errno.h>
#include <epaths.h>
#include "lisp.h"
+#ifdef USE_MOTIF
+/* For Vdouble_click_time. */
+#include "keyboard.h"
+#endif
+
extern char *getenv (const char *);
extern struct passwd *getpwuid (uid_t);
extern struct passwd *getpwnam (const char *);
-extern char *get_system_name (void);
+extern const char *get_system_name (void);
char *x_get_string_resource (XrmDatabase rdb, const char *name,
const char *class);
/* Return the value of the emacs.customization (Emacs.Customization)
resource, for later use in search path decoding. If we find no
such resource, return zero. */
-char *
-x_get_customization_string (XrmDatabase db, const char *name, const char *class)
+static char *
+x_get_customization_string (XrmDatabase db, const char *name,
+ const char *class)
{
char *full_name
= (char *) alloca (strlen (name) + sizeof ("customization") + 3);
Return NULL otherwise. */
static char *
-magic_file_p (const char *string, int string_len, const char *class, const char *escaped_suffix, const char *suffix)
+magic_file_p (const char *string, EMACS_INT string_len, const char *class, const char *escaped_suffix, const char *suffix)
{
char *lang = getenv ("LANG");
get_system_app (const char *class)
{
XrmDatabase db = NULL;
- char *path;
+ const char *path;
+ char *p;
path = getenv ("XFILESEARCHPATH");
if (! path) path = PATH_X_DEFAULTS;
- path = search_magic_path (path, class, 0, 0);
- if (path)
+ p = search_magic_path (path, class, 0, 0);
+ if (p)
{
- db = XrmGetFileDatabase (path);
- xfree (path);
+ db = XrmGetFileDatabase (p);
+ xfree (p);
}
return db;
static XrmDatabase
get_user_app (const char *class)
{
- char *path;
+ const char *path;
char *file = 0;
char *free_it = 0;
{
XrmDatabase db;
char *p;
- char *path = 0, *home = 0, *host;
+ char *path = 0, *home = 0;
+ const char *host;
if ((p = getenv ("XENVIRONMENT")) == NULL)
{
/* Retrieve the value of the resource specified by NAME with class CLASS
and of type TYPE from database RDB. The value is returned in RET_VALUE. */
-int
-x_get_resource (XrmDatabase rdb, const char *name, const char *class, XrmRepresentation expected_type, XrmValue *ret_value)
+static int
+x_get_resource (XrmDatabase rdb, const char *name, const char *class,
+ XrmRepresentation expected_type, XrmValue *ret_value)
{
XrmValue value;
XrmName namelist[100];
}
#endif /* TESTRM */
-/* arch-tag: 37e6fbab-ed05-4363-9e76-6c4109ed511f
- (do not change this comment) */