Commit 3402e1a4 authored by Richard M. Stallman's avatar Richard M. Stallman

(x_get_resource_string): New function.

parent 5d20eba6
......@@ -1151,6 +1151,31 @@ and the class is `Emacs.CLASS.SUBCLASS'.")
return Qnil;
}
/* Used when C code wants a resource value. */
char *
x_get_resource_string (attribute, class)
char *attribute, *class;
{
register char *value;
char *name_key;
char *class_key;
/* Allocate space for the components, the dots which separate them,
and the final '\0'. */
name_key = (char *) alloca (XSTRING (Vinvocation_name)->size
+ strlen (attribute) + 2);
class_key = (char *) alloca ((sizeof (EMACS_CLASS) - 1)
+ strlen (class) + 2);
sprintf (name_key, "%s.%s",
XSTRING (Vinvocation_name)->data,
attribute);
sprintf (class_key, "%s.%s", EMACS_CLASS, class);
return x_get_string_resource (xrdb, name_key, class_key);
}
#else /* X10 */
DEFUN ("x-get-default", Fx_get_default, Sx_get_default, 1, 1, 0,
......
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