+2015-01-20 Dmitry Antipov <dmantipov@yandex.ru>
+
+ Prefer xlispstrdup to avoid dumb calls to strlen.
+ * nsfont.m (ns_get_family):
+ * nsterm.m (ns_term_init):
+ * w32fns.c (w32_window):
+ * xfns.c (x_window, Fx_select_font): Use xlispstrdup.
+
2015-01-20 Paul Eggert <eggert@cs.ucla.edu>
Correct an old fix for GTK font selection
return nil;
else
{
- char *tmp = xstrdup (SSDATA (SYMBOL_NAME (tem)));
+ char *tmp = xlispstrdup (SYMBOL_NAME (tem));
NSString *family;
ns_unescape_name (tmp);
family = [NSString stringWithUTF8String: tmp];
dpyinfo->name_list_element = Fcons (display_name, Qnil);
- terminal->name = xstrdup (SSDATA (display_name));
+ terminal->name = xlispstrdup (display_name);
unblock_input ();
for the window manager, so GC relocation won't bother it.
Elsewhere we specify the window name for the window manager. */
- f->namebuf = xstrdup (SSDATA (Vx_resource_name));
+ f->namebuf = xlispstrdup (Vx_resource_name);
my_create_window (f);
for the window manager, so GC relocation won't bother it.
Elsewhere we specify the window name for the window manager. */
- f->namebuf = xstrdup (SSDATA (Vx_resource_name));
+ f->namebuf = xlispstrdup (Vx_resource_name);
ac = 0;
XtSetArg (al[ac], XtNallowShellResize, 1); ac++;
XSETFONT (font, FRAME_FONT (f));
font_param = Ffont_get (font, intern (":name"));
if (STRINGP (font_param))
- default_name = xstrdup (SSDATA (font_param));
+ default_name = xlispstrdup (font_param);
else
{
font_param = Fframe_parameter (frame, Qfont_param);
if (STRINGP (font_param))
- default_name = xstrdup (SSDATA (font_param));
+ default_name = xlispstrdup (font_param);
}
font = xg_get_font (f, default_name);