X-Git-Url: https://git.hcoop.net/bpt/emacs.git/blobdiff_plain/7d652d97681c4f1b67018f44f64c619ef5edd990..3f13130005dfc51fa4982659aa289cb8753cfd26:/src/xrdb.c diff --git a/src/xrdb.c b/src/xrdb.c index 60dcdae080..589856d6ee 100644 --- a/src/xrdb.c +++ b/src/xrdb.c @@ -1,5 +1,5 @@ /* Deal with the X Resource Manager. - Copyright (C) 1990, 1993-1994, 2000-2013 Free Software Foundation, + Copyright (C) 1990, 1993-1994, 2000-2014 Free Software Foundation, Inc. Author: Joseph Arceneaux @@ -48,10 +48,6 @@ along with GNU Emacs. If not, see . */ #include "keyboard.h" #endif -char *x_get_string_resource (XrmDatabase rdb, const char *name, - const char *class); - - /* X file search path processing. */ @@ -115,7 +111,7 @@ magic_db (const char *string, ptrdiff_t string_len, const char *class, char *lang = getenv ("LANG"); ptrdiff_t path_size = 100; - char *path = xmalloc (path_size); + char *path = xmalloc_atomic (path_size); ptrdiff_t path_len = 0; const char *p = string; @@ -183,7 +179,7 @@ magic_db (const char *string, ptrdiff_t string_len, const char *class, else next = p, next_len = 1; - /* Do we have room for this component followed by a '\0' ? */ + /* Do we have room for this component followed by a '\0'? */ if (path_size - path_len <= next_len) { if (min (PTRDIFF_MAX, SIZE_MAX) / 2 - 1 - path_len < next_len) @@ -236,11 +232,9 @@ gethomedir (void) if (ptr == NULL) return xstrdup ("/"); - copy = xmalloc (strlen (ptr) + 2); + copy = xmalloc_atomic (strlen (ptr) + 2); strcpy (copy, ptr); - strcat (copy, "/"); - - return copy; + return strcat (copy, "/"); } @@ -361,7 +355,7 @@ get_user_db (Display *display) char *xdefault; home = gethomedir (); - xdefault = xmalloc (strlen (home) + sizeof ".Xdefaults"); + xdefault = xmalloc_atomic (strlen (home) + sizeof (".Xdefaults")); strcpy (xdefault, home); strcat (xdefault, ".Xdefaults"); db = XrmGetFileDatabase (xdefault);