/* Functions for the X window system.
-Copyright (C) 1989, 1992-2014 Free Software Foundation, Inc.
+Copyright (C) 1989, 1992-2015 Free Software Foundation, Inc.
This file is part of GNU Emacs.
#define MAXREQUEST(dpy) (XMaxRequestSize (dpy))
-static Lisp_Object Qundefined_color;
-static Lisp_Object Qcompound_text, Qcancel_timer;
-Lisp_Object Qfont_param;
-
#ifdef GLYPH_DEBUG
static ptrdiff_t image_cache_refcount;
static int dpyinfo_refcount;
{
const char *sep = motif ? ";" : ",";
char *fontsetname;
+ char *z;
/* Make a fontset name from the base font name. */
if (xic_default_fontset == base_fontname)
{
/* There is no base font name, use the default. */
fontsetname = xmalloc (strlen (base_fontname) + 2);
- strcpy (fontsetname, base_fontname);
+ z = stpcpy (fontsetname, base_fontname);
}
else
{
Use the specified font plus the default. */
fontsetname = xmalloc (strlen (base_fontname)
+ strlen (xic_default_fontset) + 3);
- strcpy (fontsetname, base_fontname);
- strcat (fontsetname, sep);
- strcat (fontsetname, xic_default_fontset);
+ z = stpcpy (fontsetname, base_fontname);
+ z = stpcpy (z, sep);
+ z = stpcpy (z, xic_default_fontset);
}
else
{
/* Build the font spec that matches all. */
len = p - p2 + strlen (allcs) + strlen (all) + strlen (allfamilies) + 1;
font_all = alloca (len);
- strcpy (font_all, allfamilies);
- strcat (font_all, all);
- memcpy (font_all + strlen (all) + strlen (allfamilies), p2, p - p2);
- strcpy (font_all + strlen (all) + strlen (allfamilies) + (p - p2),
- allcs);
+ z = stpcpy (font_all, allfamilies);
+ z = stpcpy (z, all);
+ memcpy (z, p2, p - p2);
+ strcpy (z + (p - p2), allcs);
/* Build the actual font set name. */
len = strlen (base_fontname) + strlen (font_allcs)
+ strlen (font_allfamilies) + strlen (font_all) + 5;
fontsetname = xmalloc (len);
- strcpy (fontsetname, base_fontname);
- strcat (fontsetname, sep);
- strcat (fontsetname, font_allcs);
- strcat (fontsetname, sep);
- strcat (fontsetname, font_allfamilies);
- strcat (fontsetname, sep);
- strcat (fontsetname, font_all);
+ z = stpcpy (fontsetname, base_fontname);
+ z = stpcpy (z, sep);
+ z = stpcpy (z, font_allcs);
+ z = stpcpy (z, sep);
+ z = stpcpy (z, font_allfamilies);
+ z = stpcpy (z, sep);
+ z = stpcpy (z, font_all);
}
}
if (motif)
- return strcat (fontsetname, ":");
+ strcpy (z, ":");
return fontsetname;
}
#endif /* HAVE_X_WINDOWS && USE_X_TOOLKIT */
if (!row->reversed_p)
{
last = &row->glyphs[TEXT_AREA][row->used[TEXT_AREA] - 1];
- if (INTEGERP (last->object))
+ if (NILP (last->object))
row_width -= last->pixel_width;
}
else
Don't count that glyph. */
struct glyph *g = row->glyphs[TEXT_AREA];
- if (g->type == STRETCH_GLYPH && INTEGERP (g->object))
+ if (g->type == STRETCH_GLYPH && NILP (g->object))
{
row_width -= g->pixel_width;
seen_reversed_p = 1;
if (row->used[TEXT_AREA] && !row->reversed_p)
{
last = &row->glyphs[TEXT_AREA][row->used[TEXT_AREA] - 1];
- if (INTEGERP (last->object))
+ if (NILP (last->object))
row_width -= last->pixel_width;
}
unblock_input ();
/* Draw into the window. */
- w->must_be_updated_p = 1;
- update_single_window (w, 1);
+ w->must_be_updated_p = true;
+ update_single_window (w);
/* Restore original current buffer. */
set_buffer_internal_1 (old_buffer);