aboutsummaryrefslogtreecommitdiffstats
path: root/src/macfns.c
diff options
context:
space:
mode:
authorYAMAMOTO Mitsuharu2005-03-16 08:06:33 +0000
committerYAMAMOTO Mitsuharu2005-03-16 08:06:33 +0000
commit214080a533f63bb40b172a5c8fbd1d725a5cfdad (patch)
treeeacb94b2b97d778bd7248ff4305921d6c1dc94fb /src/macfns.c
parente4959763052434298fd39305d17fc63a2f76edea (diff)
downloademacs-214080a533f63bb40b172a5c8fbd1d725a5cfdad.tar.gz
emacs-214080a533f63bb40b172a5c8fbd1d725a5cfdad.zip
(mac_get_rdb_resource): Remove function.
(x_get_string_resource): Use xrm_get_resource.
Diffstat (limited to 'src/macfns.c')
-rw-r--r--src/macfns.c45
1 files changed, 10 insertions, 35 deletions
diff --git a/src/macfns.c b/src/macfns.c
index dc4aa584f87..75994cab150 100644
--- a/src/macfns.c
+++ b/src/macfns.c
@@ -2030,49 +2030,24 @@ x_set_scroll_bar_default_width (f)
2030 2030
2031/* Subroutines of creating a frame. */ 2031/* Subroutines of creating a frame. */
2032 2032
2033static char *
2034mac_get_rdb_resource (rdb, resource)
2035 char *rdb;
2036 char *resource;
2037{
2038 char *value = rdb;
2039 int len = strlen (resource);
2040
2041 while (*value)
2042 {
2043 if ((strncmp (value, resource, len) == 0) && (value[len] == ':'))
2044 return xstrdup (&value[len + 1]);
2045
2046 value = strchr (value, '\0') + 1;
2047 }
2048
2049 return NULL;
2050}
2051
2052/* Retrieve the string resource specified by NAME with CLASS from 2033/* Retrieve the string resource specified by NAME with CLASS from
2053 database RDB. */ 2034 database RDB.
2035
2036 The return value points to the contents of a Lisp string. So it
2037 will not be valid after the next GC where string compaction will
2038 occur. */
2054 2039
2055char * 2040char *
2056x_get_string_resource (rdb, name, class) 2041x_get_string_resource (rdb, name, class)
2057 XrmDatabase rdb; 2042 XrmDatabase rdb;
2058 char *name, *class; 2043 char *name, *class;
2059{ 2044{
2060 if (rdb) 2045 Lisp_Object value = xrm_get_resource (rdb, name, class);
2061 {
2062 char *resource;
2063
2064 if (resource = mac_get_rdb_resource (rdb, name))
2065 return resource;
2066 if (resource = mac_get_rdb_resource (rdb, class))
2067 return resource;
2068 }
2069 2046
2070 /* MAC_TODO: implement resource strings. (Maybe Property Lists?) */ 2047 if (STRINGP (value))
2071#if 0 2048 return SDATA (value);
2072 return mac_get_string_resource (name, class); 2049 else
2073#else 2050 return NULL;
2074 return (char *)0;
2075#endif
2076} 2051}
2077 2052
2078/* Return the value of parameter PARAM. 2053/* Return the value of parameter PARAM.