#include <X11/Xos.h>
#define USG
#define __TIMEVAL__
+#if defined USG || defined __TIMEVAL__ /* Don't warn about unused macros. */
+#endif
#else /* not XOS_NEEDS_TIME_H */
#include <X11/Xos.h>
#endif /* not XOS_NEEDS_TIME_H */
/* Keyword symbols used for face attribute names. */
-Lisp_Object QCfamily, QCheight, QCweight, QCslant, QCunderline;
-Lisp_Object QCinverse_video, QCforeground, QCbackground, QCstipple;
-Lisp_Object QCwidth, QCfont, QCbold, QCitalic;
-Lisp_Object QCreverse_video;
-Lisp_Object QCoverline, QCstrike_through, QCbox, QCinherit;
-Lisp_Object QCfontset;
+Lisp_Object QCfamily, QCheight, QCweight, QCslant;
+static Lisp_Object QCunderline;
+static Lisp_Object QCinverse_video, QCstipple;
+Lisp_Object QCforeground, QCbackground;
+Lisp_Object QCwidth;
+static Lisp_Object QCfont, QCbold, QCitalic;
+static Lisp_Object QCreverse_video;
+static Lisp_Object QCoverline, QCstrike_through, QCbox, QCinherit;
+static Lisp_Object QCfontset;
/* Symbols used for attribute values. */
-Lisp_Object Qnormal, Qbold, Qultra_light, Qextra_light, Qlight;
-Lisp_Object Qsemi_light, Qsemi_bold, Qextra_bold, Qultra_bold;
-Lisp_Object Qoblique, Qitalic, Qreverse_oblique, Qreverse_italic;
-Lisp_Object Qultra_condensed, Qextra_condensed, Qcondensed;
-Lisp_Object Qsemi_condensed, Qsemi_expanded, Qexpanded, Qextra_expanded;
-Lisp_Object Qultra_expanded;
-Lisp_Object Qreleased_button, Qpressed_button;
-Lisp_Object QCstyle, QCcolor, QCline_width;
-Lisp_Object Qunspecified;
-Lisp_Object Qignore_defface;
+Lisp_Object Qnormal;
+Lisp_Object Qbold;
+static Lisp_Object Qultra_light, Qextra_light, Qlight;
+static Lisp_Object Qsemi_light, Qsemi_bold, Qextra_bold, Qultra_bold;
+static Lisp_Object Qoblique, Qreverse_oblique, Qreverse_italic;
+Lisp_Object Qitalic;
+static Lisp_Object Qultra_condensed, Qextra_condensed;
+Lisp_Object Qcondensed;
+static Lisp_Object Qsemi_condensed, Qsemi_expanded, Qextra_expanded;
+Lisp_Object Qexpanded;
+static Lisp_Object Qultra_expanded;
+static Lisp_Object Qreleased_button, Qpressed_button;
+static Lisp_Object QCstyle, QCcolor, QCline_width;
+Lisp_Object Qunspecified; /* used in dosfns.c */
+static Lisp_Object Qignore_defface;
char unspecified_fg[] = "unspecified-fg", unspecified_bg[] = "unspecified-bg";
/* Names of basic faces. */
-Lisp_Object Qdefault, Qtool_bar, Qregion, Qfringe;
-Lisp_Object Qheader_line, Qscroll_bar, Qcursor, Qborder, Qmouse, Qmenu;
-Lisp_Object Qmode_line_inactive, Qvertical_border;
+Lisp_Object Qdefault, Qtool_bar, Qfringe;
+static Lisp_Object Qregion;
+Lisp_Object Qheader_line, Qscroll_bar, Qcursor;
+static Lisp_Object Qborder, Qmouse, Qmenu;
+Lisp_Object Qmode_line_inactive;
+static Lisp_Object Qvertical_border;
/* The symbol `face-alias'. A symbols having that property is an
alias for another face. Value of the property is the name of
the aliased face. */
-Lisp_Object Qface_alias;
+static Lisp_Object Qface_alias;
/* Alist of alternative font families. Each element is of the form
(FAMILY FAMILY1 FAMILY2 ...). If fonts of FAMILY can't be loaded,
font may be scaled if its name matches a regular expression in the
list. */
-Lisp_Object Qscalable_fonts_allowed;
+static Lisp_Object Qscalable_fonts_allowed;
#define DEFAULT_FONT_LIST_LIMIT 100
/* Property for basic faces which other faces cannot inherit. */
-Lisp_Object Qface_no_inherit;
+static Lisp_Object Qface_no_inherit;
/* Error symbol for wrong_type_argument in load_pixmap. */
-Lisp_Object Qbitmap_spec_p;
+static Lisp_Object Qbitmap_spec_p;
/* The next ID to assign to Lisp faces. */
/* TTY color-related functions (defined in tty-colors.el). */
-Lisp_Object Qtty_color_desc, Qtty_color_by_index, Qtty_color_standard_values;
+static Lisp_Object Qtty_color_desc, Qtty_color_by_index, Qtty_color_standard_values;
/* The name of the function used to compute colors on TTYs. */
-Lisp_Object Qtty_color_alist;
+static Lisp_Object Qtty_color_alist;
/* Counter for calls to clear_face_cache. If this counter reaches
CLEAR_FONT_TABLE_COUNT, and a frame has more than
display. This is a kluge to suppress `bold black' foreground text
which is hard to read on an LCD monitor. */
-int tty_suppress_bold_inverse_default_colors_p;
+static int tty_suppress_bold_inverse_default_colors_p;
/* A list of the form `((x . y))' used to avoid consing in
Finternal_set_lisp_face_attribute. */
/* Non-zero means the definition of the `menu' face for new frames has
been changed. */
-int menu_face_changed_default;
+static int menu_face_changed_default;
\f
/* Function prototypes. */
}
+#ifdef USE_X_TOOLKIT
+
/* Free colors used on frame F. PIXELS is an array of NPIXELS pixel
color values. Interrupt input must be blocked when this function
is called. */
XFreeColors (dpy, cmap, pixels, npixels, 0);
}
}
-
+#endif /* USE_X_TOOLKIT */
/* Create and return a GC for use on frame F. GC values and mask
are given by XGCV and MASK. */
-static INLINE GC
+static inline GC
x_create_gc (struct frame *f, long unsigned int mask, XGCValues *xgcv)
{
GC gc;
/* Free GC which was used on frame F. */
-static INLINE void
+static inline void
x_free_gc (struct frame *f, GC gc)
{
eassert (interrupt_input_blocked);
#ifdef WINDOWSNT
/* W32 emulation of GCs */
-static INLINE GC
+static inline GC
x_create_gc (struct frame *f, unsigned long mask, XGCValues *xgcv)
{
GC gc;
/* Free GC which was used on frame F. */
-static INLINE void
+static inline void
x_free_gc (struct frame *f, GC gc)
{
IF_DEBUG (xassert (--ngcs >= 0));
#ifdef HAVE_NS
/* NS emulation of GCs */
-static INLINE GC
+static inline GC
x_create_gc (struct frame *f,
unsigned long mask,
XGCValues *xgcv)
return gc;
}
-static INLINE void
+static inline void
x_free_gc (struct frame *f, GC gc)
{
xfree (gc);
CHECK_LIVE_FRAME. This is here because it's a frequent pattern in
Lisp function definitions. */
-static INLINE struct frame *
+static inline struct frame *
frame_or_selected_frame (Lisp_Object frame, int nparam)
{
if (NILP (frame))
This does the right thing for any type of frame. */
-int
+static int
defined_color (struct frame *f, const char *color_name, XColor *color_def, int alloc)
{
if (!FRAME_WINDOW_P (f))
{
/* This is a scalable font. For backward compatibility,
we set the specified size. */
- font_entity = Fcopy_font_spec (font_entity);
+ font_entity = copy_font_spec (font_entity);
ASET (font_entity, FONT_SIZE_INDEX,
AREF (font_spec, FONT_SIZE_INDEX));
}
#define LFACEP(LFACE) \
(VECTORP (LFACE) \
- && XVECTOR (LFACE)->size == LFACE_VECTOR_SIZE \
+ && ASIZE (LFACE) == LFACE_VECTOR_SIZE \
&& EQ (AREF (LFACE, 0), Qface))
#endif
FACE_NAME and NAMED_MERGE_POINT_KIND, as the head of the linked list
pointed to by NAMED_MERGE_POINTS, and return 1. */
-static INLINE int
+static inline int
push_named_merge_point (struct named_merge_point *new_named_merge_point,
Lisp_Object face_name,
enum named_merge_point_kind named_merge_point_kind,
face text properties; Ediff uses that). If SIGNAL_P is non-zero,
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
+static inline Lisp_Object
lface_from_face_name_no_resolve (struct frame *f, Lisp_Object face_name, int signal_p)
{
Lisp_Object lface;
non-zero, 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
+static inline Lisp_Object
lface_from_face_name (struct frame *f, Lisp_Object face_name, int signal_p)
{
face_name = resolve_face_name (face_name, signal_p);
is non-zero, signal an error if FACE_NAME does not name a face.
Otherwise, value is zero if FACE_NAME is not a face. */
-static INLINE int
+static inline int
get_lface_attributes_no_remap (struct frame *f, Lisp_Object face_name, Lisp_Object *attrs, int signal_p)
{
Lisp_Object lface;
non-zero, signal an error if FACE_NAME does not name a face.
Otherwise, value is zero if FACE_NAME is not a face. */
-static INLINE int
+static inline int
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;
loops in face inheritance/remapping; it should be 0 when called from
other places. */
-static INLINE void
+static inline void
merge_face_vectors (struct frame *f, Lisp_Object *from, Lisp_Object *to, struct named_merge_point *named_merge_points)
{
int i;
if (!UNSPECIFIEDP (from[i]))
{
if (!UNSPECIFIEDP (to[i]))
- to[i] = Fmerge_font_spec (from[i], to[i]);
+ to[i] = merge_font_spec (from[i], to[i]);
else
- to[i] = Fcopy_font_spec (from[i]);
+ to[i] = copy_font_spec (from[i]);
if (! NILP (AREF (to[i], FONT_FOUNDRY_INDEX)))
to[LFACE_FOUNDRY_INDEX] = SYMBOL_NAME (AREF (to[i], FONT_FOUNDRY_INDEX));
if (! NILP (AREF (to[i], FONT_FAMILY_INDEX)))
all attributes are `equal'. Tries to be fast because this function
is called quite often. */
-static INLINE int
+static inline int
face_attr_equal_p (Lisp_Object v1, Lisp_Object v2)
{
/* Type can differ, e.g. when one attribute is unspecified, i.e. nil,
all attributes are `equal'. Tries to be fast because this function
is called quite often. */
-static INLINE int
+static inline int
lface_equal_p (Lisp_Object *v1, Lisp_Object *v2)
{
int i, equal_p = 1;
/* Return a hash code for Lisp string STRING with case ignored. Used
below in computing a hash value for a Lisp face. */
-static INLINE unsigned
+static inline unsigned
hash_string_case_insensitive (Lisp_Object string)
{
const unsigned char *s;
/* Return a hash code for face attribute vector V. */
-static INLINE unsigned
+static inline unsigned
lface_hash (Lisp_Object *v)
{
return (hash_string_case_insensitive (v[LFACE_FAMILY_INDEX])
family, point size, weight, width, slant, and font. Both
LFACE1 and LFACE2 must be fully-specified. */
-static INLINE int
+static inline int
lface_same_font_attributes_p (Lisp_Object *lface1, Lisp_Object *lface2)
{
xassert (lface_fully_specified_p (lface1)
/* Free realized face FACE, including its X resources. FACE may
be null. */
-void
+static void
free_realized_face (struct frame *f, struct face *face)
{
if (face)
Value is the ID of the face found. If no suitable face is found,
realize a new one. */
-static INLINE int
+static inline int
lookup_face (struct frame *f, Lisp_Object *attr)
{
struct face_cache *cache = FRAME_FACE_CACHE (f);
}
-/* Return the ID of the realized ASCII face of Lisp face with ID
- LFACE_ID on frame F. Value is -1 if LFACE_ID isn't valid. */
-
-int
-ascii_face_of_lisp_face (struct frame *f, int lface_id)
-{
- int face_id;
-
- if (lface_id >= 0 && lface_id < lface_id_to_name_size)
- {
- Lisp_Object face_name = lface_id_to_name[lface_id];
- face_id = lookup_named_face (f, face_name, 1);
- }
- else
- face_id = -1;
-
- return face_id;
-}
-
-
/* Return a face for charset ASCII that is like the face with id
FACE_ID on frame F, but has a font that is STEPS steps smaller.
STEPS < 0 means larger. Value is the id of the face. */
if we don't have fonts, so we can stop here if not working
on a window-system frame. */
|| !FRAME_WINDOW_P (f)
- || FACE_SUITABLE_FOR_CHAR_P (base_face, 0)))
+ || FACE_SUITABLE_FOR_ASCII_CHAR_P (base_face, 0)))
return base_face->id;
/* Begin with attributes from the base face. */
*/
int
-merge_faces (struct frame *f, Lisp_Object face_name, int face_id, int base_face_id)
+merge_faces (struct frame *f, Lisp_Object face_name, EMACS_INT face_id,
+ int base_face_id)
{
Lisp_Object attrs[LFACE_VECTOR_SIZE];
struct face *base_face;