/* xfaces.c -- "Face" primitives.
Copyright (C) 1993, 1994, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+ 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
This file is part of GNU Emacs.
struct table_entry;
struct named_merge_point;
-static void map_tty_color P_ ((struct frame *, struct face *,
- enum lface_attribute_index, int *));
-static Lisp_Object resolve_face_name P_ ((Lisp_Object, int));
-static int may_use_scalable_font_p P_ ((const char *));
-static void set_font_frame_param P_ ((Lisp_Object, Lisp_Object));
-static int get_lface_attributes P_ ((struct frame *, Lisp_Object, Lisp_Object *,
- int, struct named_merge_point *));
-static int load_pixmap P_ ((struct frame *, Lisp_Object, unsigned *, unsigned *));
-static struct frame *frame_or_selected_frame P_ ((Lisp_Object, int));
-static void load_face_colors P_ ((struct frame *, struct face *, Lisp_Object *));
-static void free_face_colors P_ ((struct frame *, struct face *));
-static int face_color_gray_p P_ ((struct frame *, char *));
-static struct face *realize_face P_ ((struct face_cache *, Lisp_Object *,
- int));
-static struct face *realize_non_ascii_face P_ ((struct frame *, Lisp_Object,
- struct face *));
-static struct face *realize_x_face P_ ((struct face_cache *, Lisp_Object *));
-static struct face *realize_tty_face P_ ((struct face_cache *, Lisp_Object *));
-static int realize_basic_faces P_ ((struct frame *));
-static int realize_default_face P_ ((struct frame *));
-static void realize_named_face P_ ((struct frame *, Lisp_Object, int));
-static int lface_fully_specified_p P_ ((Lisp_Object *));
-static int lface_equal_p P_ ((Lisp_Object *, Lisp_Object *));
-static unsigned hash_string_case_insensitive P_ ((Lisp_Object));
-static unsigned lface_hash P_ ((Lisp_Object *));
-static int lface_same_font_attributes_p P_ ((Lisp_Object *, Lisp_Object *));
-static struct face_cache *make_face_cache P_ ((struct frame *));
-static void clear_face_gcs P_ ((struct face_cache *));
-static void free_face_cache P_ ((struct face_cache *));
-static int face_fontset P_ ((Lisp_Object *));
-static void merge_face_vectors P_ ((struct frame *, Lisp_Object *, Lisp_Object*,
- struct named_merge_point *));
-static int merge_face_ref P_ ((struct frame *, Lisp_Object, Lisp_Object *,
- int, struct named_merge_point *));
-static int set_lface_from_font P_ ((struct frame *, Lisp_Object, Lisp_Object,
- int));
-static Lisp_Object lface_from_face_name P_ ((struct frame *, Lisp_Object, int));
-static struct face *make_realized_face P_ ((Lisp_Object *));
-static void cache_face P_ ((struct face_cache *, struct face *, unsigned));
-static void uncache_face P_ ((struct face_cache *, struct face *));
+static void map_tty_color (struct frame *, struct face *,
+ enum lface_attribute_index, int *);
+static Lisp_Object resolve_face_name (Lisp_Object, int);
+static int may_use_scalable_font_p (const char *);
+static void set_font_frame_param (Lisp_Object, Lisp_Object);
+static int get_lface_attributes (struct frame *, Lisp_Object, Lisp_Object *,
+ int, struct named_merge_point *);
+static int load_pixmap (struct frame *, Lisp_Object, unsigned *, unsigned *);
+static struct frame *frame_or_selected_frame (Lisp_Object, int);
+static void load_face_colors (struct frame *, struct face *, Lisp_Object *);
+static void free_face_colors (struct frame *, struct face *);
+static int face_color_gray_p (struct frame *, char *);
+static struct face *realize_face (struct face_cache *, Lisp_Object *,
+ int);
+static struct face *realize_non_ascii_face (struct frame *, Lisp_Object,
+ struct face *);
+static struct face *realize_x_face (struct face_cache *, Lisp_Object *);
+static struct face *realize_tty_face (struct face_cache *, Lisp_Object *);
+static int realize_basic_faces (struct frame *);
+static int realize_default_face (struct frame *);
+static void realize_named_face (struct frame *, Lisp_Object, int);
+static int lface_fully_specified_p (Lisp_Object *);
+static int lface_equal_p (Lisp_Object *, Lisp_Object *);
+static unsigned hash_string_case_insensitive (Lisp_Object);
+static unsigned lface_hash (Lisp_Object *);
+static int lface_same_font_attributes_p (Lisp_Object *, Lisp_Object *);
+static struct face_cache *make_face_cache (struct frame *);
+static void clear_face_gcs (struct face_cache *);
+static void free_face_cache (struct face_cache *);
+static int face_fontset (Lisp_Object *);
+static void merge_face_vectors (struct frame *, Lisp_Object *, Lisp_Object*,
+ struct named_merge_point *);
+static int merge_face_ref (struct frame *, Lisp_Object, Lisp_Object *,
+ int, struct named_merge_point *);
+static int set_lface_from_font (struct frame *, Lisp_Object, Lisp_Object,
+ int);
+static Lisp_Object lface_from_face_name (struct frame *, Lisp_Object, int);
+static struct face *make_realized_face (Lisp_Object *);
+static void cache_face (struct face_cache *, struct face *, unsigned);
+static void uncache_face (struct face_cache *, struct face *);
#ifdef HAVE_WINDOW_SYSTEM
-static GC x_create_gc P_ ((struct frame *, unsigned long, XGCValues *));
-static void x_free_gc P_ ((struct frame *, GC));
+static GC x_create_gc (struct frame *, unsigned long, XGCValues *);
+static void x_free_gc (struct frame *, GC);
#ifdef USE_X_TOOLKIT
-static void x_update_menu_appearance P_ ((struct frame *));
+static void x_update_menu_appearance (struct frame *);
-extern void free_frame_menubar P_ ((struct frame *));
+extern void free_frame_menubar (struct frame *);
#endif /* USE_X_TOOLKIT */
#endif /* HAVE_WINDOW_SYSTEM */
is called. */
void
-x_free_colors (f, pixels, npixels)
- struct frame *f;
- unsigned long *pixels;
- int npixels;
+x_free_colors (struct frame *f, long unsigned int *pixels, int npixels)
{
int class = FRAME_X_DISPLAY_INFO (f)->visual->class;
is called. */
void
-x_free_dpy_colors (dpy, screen, cmap, pixels, npixels)
- Display *dpy;
- Screen *screen;
- Colormap cmap;
- unsigned long *pixels;
- int npixels;
+x_free_dpy_colors (Display *dpy, Screen *screen, Colormap cmap, long unsigned int *pixels, int npixels)
{
struct x_display_info *dpyinfo = x_display_info_for_display (dpy);
int class = dpyinfo->visual->class;
are given by XGCV and MASK. */
static INLINE GC
-x_create_gc (f, mask, xgcv)
- struct frame *f;
- unsigned long mask;
- XGCValues *xgcv;
+x_create_gc (struct frame *f, long unsigned int mask, XGCValues *xgcv)
{
GC gc;
BLOCK_INPUT;
/* Free GC which was used on frame F. */
static INLINE void
-x_free_gc (f, gc)
- struct frame *f;
- GC gc;
+x_free_gc (struct frame *f, GC gc)
{
eassert (interrupt_input_blocked);
IF_DEBUG (xassert (--ngcs >= 0));
{
GC gc = xmalloc (sizeof (*gc));
if (gc)
- bcopy(xgcv, gc, sizeof(XGCValues));
+ memcpy (gc, xgcv, sizeof (XGCValues));
return gc;
}
are in ISO8859-1. */
int
-xstrcasecmp (s1, s2)
- const unsigned char *s1, *s2;
+xstrcasecmp (const unsigned char *s1, const unsigned char *s2)
{
while (*s1 && *s2)
{
Lisp function definitions. */
static INLINE struct frame *
-frame_or_selected_frame (frame, nparam)
- Lisp_Object frame;
- int nparam;
+frame_or_selected_frame (Lisp_Object frame, int nparam)
{
if (NILP (frame))
frame = selected_frame;
/* Initialize face cache and basic faces for frame F. */
void
-init_frame_faces (f)
- struct frame *f;
+init_frame_faces (struct frame *f)
{
/* Make a face cache, if F doesn't have one. */
if (FRAME_FACE_CACHE (f) == NULL)
/* Free face cache of frame F. Called from delete_frame. */
void
-free_frame_faces (f)
- struct frame *f;
+free_frame_faces (struct frame *f)
{
struct face_cache *face_cache = FRAME_FACE_CACHE (f);
of named faces. */
void
-recompute_basic_faces (f)
- struct frame *f;
+recompute_basic_faces (struct frame *f)
{
if (FRAME_FACE_CACHE (f))
{
try to free unused fonts, too. */
void
-clear_face_cache (clear_fonts_p)
- int clear_fonts_p;
+clear_face_cache (int clear_fonts_p)
{
#ifdef HAVE_WINDOW_SYSTEM
Lisp_Object tail, frame;
if these pointers are not null. */
static int
-load_pixmap (f, name, w_ptr, h_ptr)
- FRAME_PTR f;
- Lisp_Object name;
- unsigned int *w_ptr, *h_ptr;
+load_pixmap (FRAME_PTR f, Lisp_Object name, unsigned int *w_ptr, unsigned int *h_ptr)
{
int bitmap_id;
Return 0 if there's a problem with RGB_LIST, otherwise return 1. */
static int
-parse_rgb_list (rgb_list, color)
- Lisp_Object rgb_list;
- XColor *color;
+parse_rgb_list (Lisp_Object rgb_list, XColor *color)
{
#define PARSE_RGB_LIST_FIELD(field) \
if (CONSP (rgb_list) && INTEGERP (XCAR (rgb_list))) \
returned in it. */
static int
-tty_lookup_color (f, color, tty_color, std_color)
- struct frame *f;
- Lisp_Object color;
- XColor *tty_color, *std_color;
+tty_lookup_color (struct frame *f, Lisp_Object color, XColor *tty_color, XColor *std_color)
{
Lisp_Object frame, color_desc;
/* A version of defined_color for non-X frames. */
int
-tty_defined_color (f, color_name, color_def, alloc)
- struct frame *f;
- char *color_name;
- XColor *color_def;
- int alloc;
+tty_defined_color (struct frame *f, char *color_name, XColor *color_def, int alloc)
{
int status = 1;
This does the right thing for any type of frame. */
int
-defined_color (f, color_name, color_def, alloc)
- struct frame *f;
- char *color_name;
- XColor *color_def;
- int alloc;
+defined_color (struct frame *f, char *color_name, XColor *color_def, int alloc)
{
if (!FRAME_WINDOW_P (f))
return tty_defined_color (f, color_name, color_def, alloc);
Lisp string. */
Lisp_Object
-tty_color_name (f, idx)
- struct frame *f;
- int idx;
+tty_color_name (struct frame *f, int idx)
{
if (idx >= 0 && !NILP (Ffboundp (Qtty_color_by_index)))
{
The criterion implemented here is not a terribly sophisticated one. */
static int
-face_color_gray_p (f, color_name)
- struct frame *f;
- char *color_name;
+face_color_gray_p (struct frame *f, char *color_name)
{
XColor color;
int gray_p;
color. */
static int
-face_color_supported_p (f, color_name, background_p)
- struct frame *f;
- char *color_name;
- int background_p;
+face_color_supported_p (struct frame *f, char *color_name, int background_p)
{
Lisp_Object frame;
XColor not_used;
these colors. */
unsigned long
-load_color (f, face, name, target_index)
- struct frame *f;
- struct face *face;
- Lisp_Object name;
- enum lface_attribute_index target_index;
+load_color (struct frame *f, struct face *face, Lisp_Object name, enum lface_attribute_index target_index)
{
XColor color;
try to emulate gray colors with a stipple from Vface_default_stipple. */
static void
-load_face_colors (f, face, attrs)
- struct frame *f;
- struct face *face;
- Lisp_Object *attrs;
+load_face_colors (struct frame *f, struct face *face, Lisp_Object *attrs)
{
Lisp_Object fg, bg;
/* Free color PIXEL on frame F. */
void
-unload_color (f, pixel)
- struct frame *f;
- unsigned long pixel;
+unload_color (struct frame *f, long unsigned int pixel)
{
#ifdef HAVE_X_WINDOWS
if (pixel != -1)
/* Free colors allocated for FACE. */
static void
-free_face_colors (f, face)
- struct frame *f;
- struct face *face;
+free_face_colors (struct frame *f, struct face *face)
{
/* PENDING(NS): need to do something here? */
#ifdef HAVE_X_WINDOWS
static enum font_property_index font_props_for_sorting[FONT_SIZE_INDEX];
static int
-compare_fonts_by_sort_order (v1, v2)
- const void *v1, *v2;
+compare_fonts_by_sort_order (const void *v1, const void *v2)
{
Lisp_Object font1 = *(Lisp_Object *) v1;
Lisp_Object font2 = *(Lisp_Object *) v2;
(family, frame)
Lisp_Object family, frame;
{
- Lisp_Object font_spec, vec;
- int i, nfonts;
+ Lisp_Object font_spec, list, *drivers, vec;
+ int i, nfonts, ndrivers;
Lisp_Object result;
if (NILP (frame))
CHECK_STRING (family);
font_parse_family_registry (family, Qnil, font_spec);
}
- vec = font_list_entities (frame, font_spec);
- nfonts = ASIZE (vec);
- if (nfonts == 0)
+
+ list = font_list_entities (frame, font_spec);
+ if (NILP (list))
return Qnil;
- if (nfonts > 1)
- {
- for (i = 0; i < 4; i++)
- switch (font_sort_order[i])
- {
- case XLFD_SWIDTH:
- font_props_for_sorting[i] = FONT_WIDTH_INDEX; break;
- case XLFD_POINT_SIZE:
- font_props_for_sorting[i] = FONT_SIZE_INDEX; break;
- case XLFD_WEIGHT:
- font_props_for_sorting[i] = FONT_WEIGHT_INDEX; break;
- default:
- font_props_for_sorting[i] = FONT_SLANT_INDEX; break;
- }
- font_props_for_sorting[i++] = FONT_FAMILY_INDEX;
- font_props_for_sorting[i++] = FONT_FOUNDRY_INDEX;
- font_props_for_sorting[i++] = FONT_ADSTYLE_INDEX;
- font_props_for_sorting[i++] = FONT_REGISTRY_INDEX;
- qsort (XVECTOR (vec)->contents, nfonts, sizeof (Lisp_Object),
- compare_fonts_by_sort_order);
- }
+ /* Sort the font entities. */
+ for (i = 0; i < 4; i++)
+ switch (font_sort_order[i])
+ {
+ case XLFD_SWIDTH:
+ font_props_for_sorting[i] = FONT_WIDTH_INDEX; break;
+ case XLFD_POINT_SIZE:
+ font_props_for_sorting[i] = FONT_SIZE_INDEX; break;
+ case XLFD_WEIGHT:
+ font_props_for_sorting[i] = FONT_WEIGHT_INDEX; break;
+ default:
+ font_props_for_sorting[i] = FONT_SLANT_INDEX; break;
+ }
+ font_props_for_sorting[i++] = FONT_FAMILY_INDEX;
+ font_props_for_sorting[i++] = FONT_FOUNDRY_INDEX;
+ font_props_for_sorting[i++] = FONT_ADSTYLE_INDEX;
+ font_props_for_sorting[i++] = FONT_REGISTRY_INDEX;
+
+ ndrivers = XINT (Flength (list));
+ drivers = alloca (sizeof (Lisp_Object) * ndrivers);
+ for (i = 0; i < ndrivers; i++, list = XCDR (list))
+ drivers[i] = XCAR (list);
+ vec = Fvconcat (ndrivers, drivers);
+ nfonts = ASIZE (vec);
+
+ qsort (XVECTOR (vec)->contents, nfonts, sizeof (Lisp_Object),
+ compare_fonts_by_sort_order);
result = Qnil;
for (i = nfonts - 1; i >= 0; --i)
Return default face in case of errors. */
static Lisp_Object
-resolve_face_name (face_name, signal_p)
- Lisp_Object face_name;
- int signal_p;
+resolve_face_name (Lisp_Object face_name, int signal_p)
{
Lisp_Object orig_face;
Lisp_Object tortoise, hare;
signal an error if FACE_NAME is not a valid face name. If SIGNAL_P
is zero, value is nil if FACE_NAME is not a valid face name. */
static INLINE Lisp_Object
-lface_from_face_name_no_resolve (f, face_name, signal_p)
- struct frame *f;
- Lisp_Object face_name;
- int signal_p;
+lface_from_face_name_no_resolve (struct frame *f, Lisp_Object face_name, int signal_p)
{
Lisp_Object lface;
If SIGNAL_P is zero, value is nil if FACE_NAME is not a valid face
name. */
static INLINE Lisp_Object
-lface_from_face_name (f, face_name, signal_p)
- struct frame *f;
- Lisp_Object face_name;
- int signal_p;
+lface_from_face_name (struct frame *f, Lisp_Object face_name, int signal_p)
{
face_name = resolve_face_name (face_name, signal_p);
return lface_from_face_name_no_resolve (f, face_name, signal_p);
Otherwise, value is zero if FACE_NAME is not a face. */
static INLINE int
-get_lface_attributes_no_remap (f, face_name, attrs, signal_p)
- struct frame *f;
- Lisp_Object face_name;
- Lisp_Object *attrs;
- int signal_p;
+get_lface_attributes_no_remap (struct frame *f, Lisp_Object face_name, Lisp_Object *attrs, int signal_p)
{
Lisp_Object lface;
lface = lface_from_face_name_no_resolve (f, face_name, signal_p);
if (! NILP (lface))
- bcopy (XVECTOR (lface)->contents, attrs,
- LFACE_VECTOR_SIZE * sizeof *attrs);
+ memcpy (attrs, XVECTOR (lface)->contents,
+ LFACE_VECTOR_SIZE * sizeof *attrs);
return !NILP (lface);
}
Otherwise, value is zero if FACE_NAME is not a face. */
static INLINE int
-get_lface_attributes (f, face_name, attrs, signal_p, named_merge_points)
- struct frame *f;
- Lisp_Object face_name;
- Lisp_Object *attrs;
- int signal_p;
- struct named_merge_point *named_merge_points;
+get_lface_attributes (struct frame *f, Lisp_Object face_name, Lisp_Object *attrs, int signal_p, struct named_merge_point *named_merge_points)
{
Lisp_Object face_remapping;
specified, i.e. are non-nil. */
static int
-lface_fully_specified_p (attrs)
- Lisp_Object *attrs;
+lface_fully_specified_p (Lisp_Object *attrs)
{
int i;
of FORCE_P. */
static int
-set_lface_from_font (f, lface, font_object, force_p)
- struct frame *f;
- Lisp_Object lface, font_object;
- int force_p;
+set_lface_from_font (struct frame *f, Lisp_Object lface, Lisp_Object font_object, int force_p)
{
Lisp_Object val;
struct font *font = XFONT_OBJECT (font_object);
unless both FROM and TO are relative. */
Lisp_Object
-merge_face_heights (from, to, invalid)
- Lisp_Object from, to, invalid;
+merge_face_heights (Lisp_Object from, Lisp_Object to, Lisp_Object invalid)
{
Lisp_Object result = invalid;
other places. */
static INLINE void
-merge_face_vectors (f, from, to, named_merge_points)
- struct frame *f;
- Lisp_Object *from, *to;
- struct named_merge_point *named_merge_points;
+merge_face_vectors (struct frame *f, Lisp_Object *from, Lisp_Object *to, struct named_merge_point *named_merge_points)
{
int i;
merging succeeded. */
static int
-merge_named_face (f, face_name, to, named_merge_points)
- struct frame *f;
- Lisp_Object face_name;
- Lisp_Object *to;
- struct named_merge_point *named_merge_points;
+merge_named_face (struct frame *f, Lisp_Object face_name, Lisp_Object *to, struct named_merge_point *named_merge_points)
{
struct named_merge_point named_merge_point;
specifications. */
static int
-merge_face_ref (f, face_ref, to, err_msgs, named_merge_points)
- struct frame *f;
- Lisp_Object face_ref;
- Lisp_Object *to;
- int err_msgs;
- struct named_merge_point *named_merge_points;
+merge_face_ref (struct frame *f, Lisp_Object face_ref, Lisp_Object *to, int err_msgs, struct named_merge_point *named_merge_points)
{
int ok = 1; /* Succeed without an error? */
DEFUN ("internal-lisp-face-p", Finternal_lisp_face_p,
Sinternal_lisp_face_p, 1, 2, 0,
doc: /* Return non-nil if FACE names a face.
+FACE should be a symbol or string.
If optional second argument FRAME is non-nil, check for the
existence of a frame-local face with name FACE on that frame.
Otherwise check for the existence of a global face. */)
copy = Finternal_make_lisp_face (to, new_frame);
}
- bcopy (XVECTOR (lface)->contents, XVECTOR (copy)->contents,
- LFACE_VECTOR_SIZE * sizeof (Lisp_Object));
+ memcpy (XVECTOR (copy)->contents, XVECTOR (lface)->contents,
+ LFACE_VECTOR_SIZE * sizeof (Lisp_Object));
/* Changing a named face means that all realized faces depending on
that face are invalid. Since we cannot tell which realized faces
}
-#ifdef HAVE_WINDOW_SYSTEM
-
-/* Set the `font' frame parameter of FRAME determined from the
- font-object set in `default' face attributes LFACE. */
-
-static void
-set_font_frame_param (frame, lface)
- Lisp_Object frame, lface;
-{
- struct frame *f = XFRAME (frame);
- Lisp_Object font;
-
- if (FRAME_WINDOW_P (f)
- /* Don't do anything if the font is `unspecified'. This can
- happen during frame creation. */
- && (font = LFACE_FONT (lface),
- ! UNSPECIFIEDP (font)))
- {
- if (FONT_SPEC_P (font))
- {
- font = font_load_for_lface (f, XVECTOR (lface)->contents, font);
- if (NILP (font))
- return;
- LFACE_FONT (lface) = font;
- }
- f->default_face_done_p = 0;
- Fmodify_frame_parameters (frame, Fcons (Fcons (Qfont, font), Qnil));
- }
-}
-
-
/* Update the corresponding face when frame parameter PARAM on frame F
has been assigned the value NEW_VALUE. */
void
-update_face_from_frame_parameter (f, param, new_value)
- struct frame *f;
- Lisp_Object param, new_value;
+update_face_from_frame_parameter (struct frame *f, Lisp_Object param, Lisp_Object new_value)
{
Lisp_Object face = Qnil;
Lisp_Object lface;
? new_value : Qunspecified);
realize_basic_faces (f);
}
+#ifdef HAVE_WINDOW_SYSTEM
else if (EQ (param, Qborder_color))
{
face = Qborder;
LFACE_BACKGROUND (lface) = (STRINGP (new_value)
? new_value : Qunspecified);
}
+#endif
/* Changing a named face means that all realized faces depending on
that face are invalid. Since we cannot tell which realized faces
}
+#ifdef HAVE_WINDOW_SYSTEM
+
+/* Set the `font' frame parameter of FRAME determined from the
+ font-object set in `default' face attributes LFACE. */
+
+static void
+set_font_frame_param (Lisp_Object frame, Lisp_Object lface)
+{
+ struct frame *f = XFRAME (frame);
+ Lisp_Object font;
+
+ if (FRAME_WINDOW_P (f)
+ /* Don't do anything if the font is `unspecified'. This can
+ happen during frame creation. */
+ && (font = LFACE_FONT (lface),
+ ! UNSPECIFIEDP (font)))
+ {
+ if (FONT_SPEC_P (font))
+ {
+ font = font_load_for_lface (f, XVECTOR (lface)->contents, font);
+ if (NILP (font))
+ return;
+ LFACE_FONT (lface) = font;
+ }
+ f->default_face_done_p = 0;
+ Fmodify_frame_parameters (frame, Fcons (Fcons (Qfont, font), Qnil));
+ }
+}
+
+
/* Get the value of X resource RESOURCE, class CLASS for the display
of frame FRAME. This is here because ordinary `x-get-resource'
doesn't take a frame argument. */
error; if SIGNAL_P is zero, return 0. */
static Lisp_Object
-face_boolean_x_resource_value (value, signal_p)
- Lisp_Object value;
- int signal_p;
+face_boolean_x_resource_value (Lisp_Object value, int signal_p)
{
Lisp_Object result = make_number (0);
{
#if defined HAVE_X_I18N
extern char *xic_create_fontsetname
- P_ ((char *base_fontname, Bool motif));
+ (char *base_fontname, Bool motif);
char *fontsetname = xic_create_fontsetname (SDATA (xlfd), motif);
#else
char *fontsetname = (char *) SDATA (xlfd);
{
/* Ensure that the face vector is fully specified by merging
the previously-cached vector. */
- bcopy (oldface->lface, attrs, sizeof attrs);
+ memcpy (attrs, oldface->lface, sizeof attrs);
merge_face_vectors (f, lvec, attrs, 0);
- bcopy (attrs, lvec, sizeof attrs);
+ memcpy (lvec, attrs, sizeof attrs);
newface = realize_face (c, lvec, DEFAULT_FACE_ID);
if ((! UNSPECIFIEDP (gvec[LFACE_FAMILY_INDEX])
is called quite often. */
static INLINE int
-face_attr_equal_p (v1, v2)
- Lisp_Object v1, v2;
+face_attr_equal_p (Lisp_Object v1, Lisp_Object v2)
{
/* Type can differ, e.g. when one attribute is unspecified, i.e. nil,
and the other is specified. */
if (SBYTES (v1) != SBYTES (v2))
return 0;
- return bcmp (SDATA (v1), SDATA (v2), SBYTES (v1)) == 0;
+ return memcmp (SDATA (v1), SDATA (v2), SBYTES (v1)) == 0;
- case Lisp_Int:
+ case_Lisp_Int:
case Lisp_Symbol:
return 0;
is called quite often. */
static INLINE int
-lface_equal_p (v1, v2)
- Lisp_Object *v1, *v2;
+lface_equal_p (Lisp_Object *v1, Lisp_Object *v2)
{
int i, equal_p = 1;
below in computing a hash value for a Lisp face. */
static INLINE unsigned
-hash_string_case_insensitive (string)
- Lisp_Object string;
+hash_string_case_insensitive (Lisp_Object string)
{
const unsigned char *s;
unsigned hash = 0;
/* Return a hash code for face attribute vector V. */
static INLINE unsigned
-lface_hash (v)
- Lisp_Object *v;
+lface_hash (Lisp_Object *v)
{
return (hash_string_case_insensitive (v[LFACE_FAMILY_INDEX])
^ hash_string_case_insensitive (v[LFACE_FOUNDRY_INDEX])
LFACE1 and LFACE2 must be fully-specified. */
static INLINE int
-lface_same_font_attributes_p (lface1, lface2)
- Lisp_Object *lface1, *lface2;
+lface_same_font_attributes_p (Lisp_Object *lface1, Lisp_Object *lface2)
{
xassert (lface_fully_specified_p (lface1)
&& lface_fully_specified_p (lface2));
vector ATTR. */
static struct face *
-make_realized_face (attr)
- Lisp_Object *attr;
+make_realized_face (Lisp_Object *attr)
{
struct face *face = (struct face *) xmalloc (sizeof *face);
- bzero (face, sizeof *face);
+ memset (face, 0, sizeof *face);
face->ascii_face = face;
- bcopy (attr, face->lface, sizeof face->lface);
+ memcpy (face->lface, attr, sizeof face->lface);
return face;
}
be null. */
void
-free_realized_face (f, face)
- struct frame *f;
- struct face *face;
+free_realized_face (struct frame *f, struct face *face)
{
if (face)
{
by clearing the face cache. */
void
-prepare_face_for_display (f, face)
- struct frame *f;
- struct face *face;
+prepare_face_for_display (struct frame *f, struct face *face)
{
#ifdef HAVE_WINDOW_SYSTEM
xassert (FRAME_WINDOW_P (f));
/* Returns the `distance' between the colors X and Y. */
static int
-color_distance (x, y)
- XColor *x, *y;
+color_distance (XColor *x, XColor *y)
{
/* This formula is from a paper title `Colour metric' by Thiadmer Riemersma.
Quoting from that paper:
/* Return a new face cache for frame F. */
static struct face_cache *
-make_face_cache (f)
- struct frame *f;
+make_face_cache (struct frame *f)
{
struct face_cache *c;
int size;
c = (struct face_cache *) xmalloc (sizeof *c);
- bzero (c, sizeof *c);
+ memset (c, 0, sizeof *c);
size = FACE_CACHE_BUCKETS_SIZE * sizeof *c->buckets;
c->buckets = (struct face **) xmalloc (size);
- bzero (c->buckets, size);
+ memset (c->buckets, 0, size);
c->size = 50;
c->faces_by_id = (struct face **) xmalloc (c->size * sizeof *c->faces_by_id);
c->f = f;
keeping too many graphics contexts that are no longer needed. */
static void
-clear_face_gcs (c)
- struct face_cache *c;
+clear_face_gcs (struct face_cache *c)
{
if (c && FRAME_WINDOW_P (c->f))
{
event doesn't try to use faces we destroyed. */
static void
-free_realized_faces (c)
- struct face_cache *c;
+free_realized_faces (struct face_cache *c)
{
if (c && c->used)
{
c->used = 0;
size = FACE_CACHE_BUCKETS_SIZE * sizeof *c->buckets;
- bzero (c->buckets, size);
+ memset (c->buckets, 0, size);
/* Must do a thorough redisplay the next time. Mark current
matrices as invalid because they will reference faces freed
/* Free all realized faces that are using FONTSET on frame F. */
void
-free_realized_faces_for_fontset (f, fontset)
- struct frame *f;
- int fontset;
+free_realized_faces_for_fontset (struct frame *f, int fontset)
{
struct face_cache *cache = FRAME_FACE_CACHE (f);
struct face *face;
because we can't tell which realized faces depend on that face. */
void
-free_all_realized_faces (frame)
- Lisp_Object frame;
+free_all_realized_faces (Lisp_Object frame)
{
if (NILP (frame))
{
/* Free face cache C and faces in it, including their X resources. */
static void
-free_face_cache (c)
- struct face_cache *c;
+free_face_cache (struct face_cache *c)
{
if (c)
{
that a requested face is not cached. */
static void
-cache_face (c, face, hash)
- struct face_cache *c;
- struct face *face;
- unsigned hash;
+cache_face (struct face_cache *c, struct face *face, unsigned int hash)
{
int i = hash % FACE_CACHE_BUCKETS_SIZE;
/* Remove face FACE from cache C. */
static void
-uncache_face (c, face)
- struct face_cache *c;
- struct face *face;
+uncache_face (struct face_cache *c, struct face *face)
{
int i = face->hash % FACE_CACHE_BUCKETS_SIZE;
realize a new one. */
INLINE int
-lookup_face (f, attr)
- struct frame *f;
- Lisp_Object *attr;
+lookup_face (struct frame *f, Lisp_Object *attr)
{
struct face_cache *cache = FRAME_FACE_CACHE (f);
unsigned hash;
suitable face is found, realize a new one. */
int
-face_for_font (f, font_object, base_face)
- struct frame *f;
- Lisp_Object font_object;
- struct face *base_face;
+face_for_font (struct frame *f, Lisp_Object font_object, struct face *base_face)
{
struct face_cache *cache = FRAME_FACE_CACHE (f);
unsigned hash;
face isn't realized and cannot be realized. */
int
-lookup_named_face (f, symbol, signal_p)
- struct frame *f;
- Lisp_Object symbol;
- int signal_p;
+lookup_named_face (struct frame *f, Lisp_Object symbol, int signal_p)
{
Lisp_Object attrs[LFACE_VECTOR_SIZE];
Lisp_Object symbol_attrs[LFACE_VECTOR_SIZE];
if (! get_lface_attributes (f, symbol, symbol_attrs, signal_p, 0))
return -1;
- bcopy (default_face->lface, attrs, sizeof attrs);
+ memcpy (attrs, default_face->lface, sizeof attrs);
merge_face_vectors (f, symbol_attrs, attrs, 0);
return lookup_face (f, attrs);
rather than signal an error. */
int
-lookup_basic_face (f, face_id)
- struct frame *f;
- int face_id;
+lookup_basic_face (struct frame *f, int face_id)
{
Lisp_Object name, mapping;
int remapped_face_id;
LFACE_ID on frame F. Value is -1 if LFACE_ID isn't valid. */
int
-ascii_face_of_lisp_face (f, lface_id)
- struct frame *f;
- int lface_id;
+ascii_face_of_lisp_face (struct frame *f, int lface_id)
{
int face_id;
STEPS < 0 means larger. Value is the id of the face. */
int
-smaller_face (f, face_id, steps)
- struct frame *f;
- int face_id, steps;
+smaller_face (struct frame *f, int face_id, int steps)
{
#ifdef HAVE_WINDOW_SYSTEM
struct face *face;
steps = eabs (steps);
face = FACE_FROM_ID (f, face_id);
- bcopy (face->lface, attrs, sizeof attrs);
+ memcpy (attrs, face->lface, sizeof attrs);
pt = last_pt = XFASTINT (attrs[LFACE_HEIGHT_INDEX]);
new_face_id = face_id;
last_height = FONT_HEIGHT (face->font);
FACE_ID on frame F, but has height HEIGHT. */
int
-face_with_height (f, face_id, height)
- struct frame *f;
- int face_id;
- int height;
+face_with_height (struct frame *f, int face_id, int height)
{
#ifdef HAVE_WINDOW_SYSTEM
struct face *face;
return face_id;
face = FACE_FROM_ID (f, face_id);
- bcopy (face->lface, attrs, sizeof attrs);
+ memcpy (attrs, face->lface, sizeof attrs);
attrs[LFACE_HEIGHT_INDEX] = make_number (height);
font_clear_prop (attrs, FONT_SIZE_INDEX);
face_id = lookup_face (f, attrs);
default face. FACE_ID is assumed to be already realized. */
int
-lookup_derived_face (f, symbol, face_id, signal_p)
- struct frame *f;
- Lisp_Object symbol;
- int face_id;
- int signal_p;
+lookup_derived_face (struct frame *f, Lisp_Object symbol, int face_id, int signal_p)
{
Lisp_Object attrs[LFACE_VECTOR_SIZE];
Lisp_Object symbol_attrs[LFACE_VECTOR_SIZE];
if (!get_lface_attributes (f, symbol, symbol_attrs, signal_p, 0))
return -1;
- bcopy (default_face->lface, attrs, sizeof attrs);
+ memcpy (attrs, default_face->lface, sizeof attrs);
merge_face_vectors (f, symbol_attrs, attrs, 0);
return lookup_face (f, attrs);
}
\(2) `close in spirit' to what the attributes specify, if not exact. */
static int
-x_supports_face_attributes_p (f, attrs, def_face)
- struct frame *f;
- Lisp_Object *attrs;
- struct face *def_face;
+x_supports_face_attributes_p (struct frame *f, Lisp_Object *attrs, struct face *def_face)
{
Lisp_Object *def_attrs = def_face->lface;
Lisp_Object merged_attrs[LFACE_VECTOR_SIZE];
int i;
- bcopy (def_attrs, merged_attrs, sizeof merged_attrs);
+ memcpy (merged_attrs, def_attrs, sizeof merged_attrs);
merge_face_vectors (f, attrs, merged_attrs, 0);
substitution of a `dim' face for italic. */
static int
-tty_supports_face_attributes_p (f, attrs, def_face)
- struct frame *f;
- Lisp_Object *attrs;
- struct face *def_face;
+tty_supports_face_attributes_p (struct frame *f, Lisp_Object *attrs, struct face *def_face)
{
int weight;
Lisp_Object val, fg, bg;
int indices[DIM (font_sort_order)];
CHECK_LIST (order);
- bzero (indices, sizeof indices);
+ memset (indices, 0, sizeof indices);
i = 0;
for (list = order;
if (indices[i] == 0)
signal_error ("Invalid font sort order", order);
- if (bcmp (indices, font_sort_order, sizeof indices) != 0)
+ if (memcmp (indices, font_sort_order, sizeof indices) != 0)
{
- bcopy (indices, font_sort_order, sizeof font_sort_order);
+ memcpy (font_sort_order, indices, sizeof font_sort_order);
free_all_realized_faces (Qnil);
}
attribute of ATTRS doesn't name a fontset. */
static int
-face_fontset (attrs)
- Lisp_Object *attrs;
+face_fontset (Lisp_Object *attrs)
{
Lisp_Object name;
face. */
static int
-realize_basic_faces (f)
- struct frame *f;
+realize_basic_faces (struct frame *f)
{
int success_p = 0;
int count = SPECPDL_INDEX ();
that are not explicitly specified are taken from frame parameters. */
static int
-realize_default_face (f)
- struct frame *f;
+realize_default_face (struct frame *f)
{
struct face_cache *c = FRAME_FACE_CACHE (f);
Lisp_Object lface;
/* Realize the face; it must be fully-specified now. */
xassert (lface_fully_specified_p (XVECTOR (lface)->contents));
check_lface (lface);
- bcopy (XVECTOR (lface)->contents, attrs, sizeof attrs);
+ memcpy (attrs, XVECTOR (lface)->contents, sizeof attrs);
face = realize_face (c, attrs, DEFAULT_FACE_ID);
#ifdef HAVE_WINDOW_SYSTEM
have. The default face must have been realized already. */
static void
-realize_named_face (f, symbol, id)
- struct frame *f;
- Lisp_Object symbol;
- int id;
+realize_named_face (struct frame *f, Lisp_Object symbol, int id)
{
struct face_cache *c = FRAME_FACE_CACHE (f);
Lisp_Object lface = lface_from_face_name (f, symbol, 0);
face. Value is a pointer to the newly created realized face. */
static struct face *
-realize_face (cache, attrs, former_face_id)
- struct face_cache *cache;
- Lisp_Object *attrs;
- int former_face_id;
+realize_face (struct face_cache *cache, Lisp_Object *attrs, int former_face_id)
{
struct face *face;
no-font. */
static struct face *
-realize_non_ascii_face (f, font_object, base_face)
- struct frame *f;
- Lisp_Object font_object;
- struct face *base_face;
+realize_non_ascii_face (struct frame *f, Lisp_Object font_object, struct face *base_face)
{
struct face_cache *cache = FRAME_FACE_CACHE (f);
struct face *face;
created realized face. */
static struct face *
-realize_x_face (cache, attrs)
- struct face_cache *cache;
- Lisp_Object *attrs;
+realize_x_face (struct face_cache *cache, Lisp_Object *attrs)
{
struct face *face = NULL;
#ifdef HAVE_WINDOW_SYSTEM
default foreground/background colors. */
static void
-map_tty_color (f, face, idx, defaulted)
- struct frame *f;
- struct face *face;
- enum lface_attribute_index idx;
- int *defaulted;
+map_tty_color (struct frame *f, struct face *face, enum lface_attribute_index idx, int *defaulted)
{
Lisp_Object frame, color, def;
int foreground_p = idx == LFACE_FOREGROUND_INDEX;
Value is a pointer to the newly created realized face. */
static struct face *
-realize_tty_face (cache, attrs)
- struct face_cache *cache;
- Lisp_Object *attrs;
+realize_tty_face (struct face_cache *cache, Lisp_Object *attrs)
{
struct face *face;
int weight, slant;
property PROP on frame F in current_buffer. */
int
-compute_char_face (f, ch, prop)
- struct frame *f;
- int ch;
- Lisp_Object prop;
+compute_char_face (struct frame *f, int ch, Lisp_Object prop)
{
int face_id;
{
Lisp_Object attrs[LFACE_VECTOR_SIZE];
struct face *default_face = FACE_FROM_ID (f, DEFAULT_FACE_ID);
- bcopy (default_face->lface, attrs, sizeof attrs);
+ memcpy (attrs, default_face->lface, sizeof attrs);
merge_face_ref (f, prop, attrs, 1, 0);
face_id = lookup_face (f, attrs);
}
return default_face->id;
/* Begin with attributes from the default face. */
- bcopy (default_face->lface, attrs, sizeof attrs);
+ memcpy (attrs, default_face->lface, sizeof attrs);
/* Merge in attributes specified via text properties. */
if (!NILP (prop))
return DEFAULT_FACE_ID;
/* Begin with attributes from the default face. */
- bcopy (default_face->lface, attrs, sizeof attrs);
+ memcpy (attrs, default_face->lface, sizeof attrs);
/* Merge in attributes specified via text properties. */
if (!NILP (prop))
return base_face->id;
/* Begin with attributes from the base face. */
- bcopy (base_face->lface, attrs, sizeof attrs);
+ memcpy (attrs, base_face->lface, sizeof attrs);
/* Merge in attributes specified via text properties. */
if (!NILP (prop))
*/
int
-merge_faces (f, face_name, face_id, base_face_id)
- struct frame *f;
- Lisp_Object face_name;
- int face_id, base_face_id;
+merge_faces (struct frame *f, Lisp_Object face_name, int face_id, int base_face_id)
{
Lisp_Object attrs[LFACE_VECTOR_SIZE];
struct face *base_face;
}
/* Begin with attributes from the base face. */
- bcopy (base_face->lface, attrs, sizeof attrs);
+ memcpy (attrs, base_face->lface, sizeof attrs);
if (!NILP (face_name))
{
***********************************************************************/
void
-syms_of_xfaces ()
+syms_of_xfaces (void)
{
- Qface = intern ("face");
+ Qface = intern_c_string ("face");
staticpro (&Qface);
- Qface_no_inherit = intern ("face-no-inherit");
+ Qface_no_inherit = intern_c_string ("face-no-inherit");
staticpro (&Qface_no_inherit);
- Qbitmap_spec_p = intern ("bitmap-spec-p");
+ Qbitmap_spec_p = intern_c_string ("bitmap-spec-p");
staticpro (&Qbitmap_spec_p);
- Qframe_set_background_mode = intern ("frame-set-background-mode");
+ Qframe_set_background_mode = intern_c_string ("frame-set-background-mode");
staticpro (&Qframe_set_background_mode);
/* Lisp face attribute keywords. */
- QCfamily = intern (":family");
+ QCfamily = intern_c_string (":family");
staticpro (&QCfamily);
- QCheight = intern (":height");
+ QCheight = intern_c_string (":height");
staticpro (&QCheight);
- QCweight = intern (":weight");
+ QCweight = intern_c_string (":weight");
staticpro (&QCweight);
- QCslant = intern (":slant");
+ QCslant = intern_c_string (":slant");
staticpro (&QCslant);
- QCunderline = intern (":underline");
+ QCunderline = intern_c_string (":underline");
staticpro (&QCunderline);
- QCinverse_video = intern (":inverse-video");
+ QCinverse_video = intern_c_string (":inverse-video");
staticpro (&QCinverse_video);
- QCreverse_video = intern (":reverse-video");
+ QCreverse_video = intern_c_string (":reverse-video");
staticpro (&QCreverse_video);
- QCforeground = intern (":foreground");
+ QCforeground = intern_c_string (":foreground");
staticpro (&QCforeground);
- QCbackground = intern (":background");
+ QCbackground = intern_c_string (":background");
staticpro (&QCbackground);
- QCstipple = intern (":stipple");
+ QCstipple = intern_c_string (":stipple");
staticpro (&QCstipple);
- QCwidth = intern (":width");
+ QCwidth = intern_c_string (":width");
staticpro (&QCwidth);
- QCfont = intern (":font");
+ QCfont = intern_c_string (":font");
staticpro (&QCfont);
- QCfontset = intern (":fontset");
+ QCfontset = intern_c_string (":fontset");
staticpro (&QCfontset);
- QCbold = intern (":bold");
+ QCbold = intern_c_string (":bold");
staticpro (&QCbold);
- QCitalic = intern (":italic");
+ QCitalic = intern_c_string (":italic");
staticpro (&QCitalic);
- QCoverline = intern (":overline");
+ QCoverline = intern_c_string (":overline");
staticpro (&QCoverline);
- QCstrike_through = intern (":strike-through");
+ QCstrike_through = intern_c_string (":strike-through");
staticpro (&QCstrike_through);
- QCbox = intern (":box");
+ QCbox = intern_c_string (":box");
staticpro (&QCbox);
- QCinherit = intern (":inherit");
+ QCinherit = intern_c_string (":inherit");
staticpro (&QCinherit);
/* Symbols used for Lisp face attribute values. */
- QCcolor = intern (":color");
+ QCcolor = intern_c_string (":color");
staticpro (&QCcolor);
- QCline_width = intern (":line-width");
+ QCline_width = intern_c_string (":line-width");
staticpro (&QCline_width);
- QCstyle = intern (":style");
+ QCstyle = intern_c_string (":style");
staticpro (&QCstyle);
- Qreleased_button = intern ("released-button");
+ Qreleased_button = intern_c_string ("released-button");
staticpro (&Qreleased_button);
- Qpressed_button = intern ("pressed-button");
+ Qpressed_button = intern_c_string ("pressed-button");
staticpro (&Qpressed_button);
- Qnormal = intern ("normal");
+ Qnormal = intern_c_string ("normal");
staticpro (&Qnormal);
- Qultra_light = intern ("ultra-light");
+ Qultra_light = intern_c_string ("ultra-light");
staticpro (&Qultra_light);
- Qextra_light = intern ("extra-light");
+ Qextra_light = intern_c_string ("extra-light");
staticpro (&Qextra_light);
- Qlight = intern ("light");
+ Qlight = intern_c_string ("light");
staticpro (&Qlight);
- Qsemi_light = intern ("semi-light");
+ Qsemi_light = intern_c_string ("semi-light");
staticpro (&Qsemi_light);
- Qsemi_bold = intern ("semi-bold");
+ Qsemi_bold = intern_c_string ("semi-bold");
staticpro (&Qsemi_bold);
- Qbold = intern ("bold");
+ Qbold = intern_c_string ("bold");
staticpro (&Qbold);
- Qextra_bold = intern ("extra-bold");
+ Qextra_bold = intern_c_string ("extra-bold");
staticpro (&Qextra_bold);
- Qultra_bold = intern ("ultra-bold");
+ Qultra_bold = intern_c_string ("ultra-bold");
staticpro (&Qultra_bold);
- Qoblique = intern ("oblique");
+ Qoblique = intern_c_string ("oblique");
staticpro (&Qoblique);
- Qitalic = intern ("italic");
+ Qitalic = intern_c_string ("italic");
staticpro (&Qitalic);
- Qreverse_oblique = intern ("reverse-oblique");
+ Qreverse_oblique = intern_c_string ("reverse-oblique");
staticpro (&Qreverse_oblique);
- Qreverse_italic = intern ("reverse-italic");
+ Qreverse_italic = intern_c_string ("reverse-italic");
staticpro (&Qreverse_italic);
- Qultra_condensed = intern ("ultra-condensed");
+ Qultra_condensed = intern_c_string ("ultra-condensed");
staticpro (&Qultra_condensed);
- Qextra_condensed = intern ("extra-condensed");
+ Qextra_condensed = intern_c_string ("extra-condensed");
staticpro (&Qextra_condensed);
- Qcondensed = intern ("condensed");
+ Qcondensed = intern_c_string ("condensed");
staticpro (&Qcondensed);
- Qsemi_condensed = intern ("semi-condensed");
+ Qsemi_condensed = intern_c_string ("semi-condensed");
staticpro (&Qsemi_condensed);
- Qsemi_expanded = intern ("semi-expanded");
+ Qsemi_expanded = intern_c_string ("semi-expanded");
staticpro (&Qsemi_expanded);
- Qexpanded = intern ("expanded");
+ Qexpanded = intern_c_string ("expanded");
staticpro (&Qexpanded);
- Qextra_expanded = intern ("extra-expanded");
+ Qextra_expanded = intern_c_string ("extra-expanded");
staticpro (&Qextra_expanded);
- Qultra_expanded = intern ("ultra-expanded");
+ Qultra_expanded = intern_c_string ("ultra-expanded");
staticpro (&Qultra_expanded);
- Qbackground_color = intern ("background-color");
+ Qbackground_color = intern_c_string ("background-color");
staticpro (&Qbackground_color);
- Qforeground_color = intern ("foreground-color");
+ Qforeground_color = intern_c_string ("foreground-color");
staticpro (&Qforeground_color);
- Qunspecified = intern ("unspecified");
+ Qunspecified = intern_c_string ("unspecified");
staticpro (&Qunspecified);
- Qignore_defface = intern (":ignore-defface");
+ Qignore_defface = intern_c_string (":ignore-defface");
staticpro (&Qignore_defface);
- Qface_alias = intern ("face-alias");
+ Qface_alias = intern_c_string ("face-alias");
staticpro (&Qface_alias);
- Qdefault = intern ("default");
+ Qdefault = intern_c_string ("default");
staticpro (&Qdefault);
- Qtool_bar = intern ("tool-bar");
+ Qtool_bar = intern_c_string ("tool-bar");
staticpro (&Qtool_bar);
- Qregion = intern ("region");
+ Qregion = intern_c_string ("region");
staticpro (&Qregion);
- Qfringe = intern ("fringe");
+ Qfringe = intern_c_string ("fringe");
staticpro (&Qfringe);
- Qheader_line = intern ("header-line");
+ Qheader_line = intern_c_string ("header-line");
staticpro (&Qheader_line);
- Qscroll_bar = intern ("scroll-bar");
+ Qscroll_bar = intern_c_string ("scroll-bar");
staticpro (&Qscroll_bar);
- Qmenu = intern ("menu");
+ Qmenu = intern_c_string ("menu");
staticpro (&Qmenu);
- Qcursor = intern ("cursor");
+ Qcursor = intern_c_string ("cursor");
staticpro (&Qcursor);
- Qborder = intern ("border");
+ Qborder = intern_c_string ("border");
staticpro (&Qborder);
- Qmouse = intern ("mouse");
+ Qmouse = intern_c_string ("mouse");
staticpro (&Qmouse);
- Qmode_line_inactive = intern ("mode-line-inactive");
+ Qmode_line_inactive = intern_c_string ("mode-line-inactive");
staticpro (&Qmode_line_inactive);
- Qvertical_border = intern ("vertical-border");
+ Qvertical_border = intern_c_string ("vertical-border");
staticpro (&Qvertical_border);
- Qtty_color_desc = intern ("tty-color-desc");
+ Qtty_color_desc = intern_c_string ("tty-color-desc");
staticpro (&Qtty_color_desc);
- Qtty_color_standard_values = intern ("tty-color-standard-values");
+ Qtty_color_standard_values = intern_c_string ("tty-color-standard-values");
staticpro (&Qtty_color_standard_values);
- Qtty_color_by_index = intern ("tty-color-by-index");
+ Qtty_color_by_index = intern_c_string ("tty-color-by-index");
staticpro (&Qtty_color_by_index);
- Qtty_color_alist = intern ("tty-color-alist");
+ Qtty_color_alist = intern_c_string ("tty-color-alist");
staticpro (&Qtty_color_alist);
- Qscalable_fonts_allowed = intern ("scalable-fonts-allowed");
+ Qscalable_fonts_allowed = intern_c_string ("scalable-fonts-allowed");
staticpro (&Qscalable_fonts_allowed);
Vparam_value_alist = Fcons (Fcons (Qnil, Qnil), Qnil);
This stipple pattern is used on monochrome displays
instead of shades of gray for a face background color.
See `set-face-stipple' for possible values for this variable. */);
- Vface_default_stipple = build_string ("gray3");
+ Vface_default_stipple = make_pure_c_string ("gray3");
DEFVAR_LISP ("tty-defined-color-alist", &Vtty_defined_color_alist,
doc: /* An alist of defined terminal colors and their RGB values. */);