aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStefan Monnier2009-09-17 16:41:55 +0000
committerStefan Monnier2009-09-17 16:41:55 +0000
commit742d40e805b987ff1a4d8cb9f8f8d626b263cc46 (patch)
tree7c66ee3bc53dec7f9acb4433257e5ea02fa17070 /src
parent0ee986067afdb49968f1b7fa386ed4f544e03aa3 (diff)
downloademacs-742d40e805b987ff1a4d8cb9f8f8d626b263cc46.tar.gz
emacs-742d40e805b987ff1a4d8cb9f8f8d626b263cc46.zip
(x_get_resource_string): Re-add for non-toolkit builds (bug#4461).
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/frame.c26
2 files changed, 31 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 47dda2e0f80..14415997a33 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12009-09-17 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * frame.c (x_get_resource_string): Re-add for non-toolkit builds
4 (bug#4461).
5
12009-09-17 Dan Nicolaescu <dann@ics.uci.edu> 62009-09-17 Dan Nicolaescu <dann@ics.uci.edu>
2 7
3 * puresize.h (BASE_PURESIZE): Increase to 1290000. 8 * puresize.h (BASE_PURESIZE): Increase to 1290000.
diff --git a/src/frame.c b/src/frame.c
index 6726a7b918a..b18446d38b6 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -3893,6 +3893,32 @@ display_x_get_resource (dpyinfo, attribute, class, component, subclass)
3893 attribute, class, component, subclass); 3893 attribute, class, component, subclass);
3894} 3894}
3895 3895
3896#if defined HAVE_X_WINDOWS && !defined USE_X_TOOLKIT
3897/* Used when C code wants a resource value. */
3898/* Called from oldXMenu/Create.c. */
3899char *
3900x_get_resource_string (attribute, class)
3901 char *attribute, *class;
3902{
3903 char *name_key;
3904 char *class_key;
3905 struct frame *sf = SELECTED_FRAME ();
3906
3907 /* Allocate space for the components, the dots which separate them,
3908 and the final '\0'. */
3909 name_key = (char *) alloca (SBYTES (Vinvocation_name)
3910 + strlen (attribute) + 2);
3911 class_key = (char *) alloca ((sizeof (EMACS_CLASS) - 1)
3912 + strlen (class) + 2);
3913
3914 sprintf (name_key, "%s.%s", SDATA (Vinvocation_name), attribute);
3915 sprintf (class_key, "%s.%s", EMACS_CLASS, class);
3916
3917 return x_get_string_resource (FRAME_X_DISPLAY_INFO (sf)->xrdb,
3918 name_key, class_key);
3919}
3920#endif
3921
3896/* Return the value of parameter PARAM. 3922/* Return the value of parameter PARAM.
3897 3923
3898 First search ALIST, then Vdefault_frame_alist, then the X defaults 3924 First search ALIST, then Vdefault_frame_alist, then the X defaults