#ifdef LOCAL_X_IS_UNIX
if (id[0] == ':')
{
- val = rxvt_malloc (5 + strlen (id) + 1);
+ if (!(val = rxvt_temp_buf<char> (5 + strlen (id) + 1)))
+ return false;
strcpy (val, "unix/");
strcat (val, id);
dpy = XOpenDisplay (val);
- free (val);
}
else
#endif
l = strlen (locale);
m = strlen (modifiers);
- if (!(id = (char *)malloc (l + m + 2)))
+ if (!(id = rxvt_temp_buf<char> (l + m + 2)))
return 0;
memcpy (id, locale, l); id[l] = '\n';
rxvt_xim *xim = xims.get (id);
- free (id);
-
return xim;
}
{
if (i+1 < argc)
{
- char *res = (char *)malloc (strlen (opt) + strlen (argv[++i]) + 6);
+ char *res = rxvt_temp_buf<char> (strlen (opt) + strlen (argv[++i]) + 6);
sprintf (res, "*.%s: %s\n", opt, argv[i]);
XrmPutLineResource (&option_db, res);
- free (res);
}
}
#endif