#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 */
/* Symbols used for attribute values. */
Lisp_Object Qnormal;
-static Lisp_Object Qbold, Qultra_light, Qextra_light, Qlight;
+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, Qitalic, Qreverse_oblique, Qreverse_italic;
-static Lisp_Object Qultra_condensed, Qextra_condensed, Qcondensed;
-static Lisp_Object Qsemi_condensed, Qsemi_expanded, Qexpanded, Qextra_expanded;
+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;
-static Lisp_Object Qunspecified;
+Lisp_Object Qunspecified; /* used in dosfns.c */
static Lisp_Object Qignore_defface;
char unspecified_fg[] = "unspecified-fg", unspecified_bg[] = "unspecified-bg";
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 ptrdiff_t 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 *);
/* 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))
zero. Store the bitmap width in *W_PTR and its height in *H_PTR,
if these pointers are not null. */
-static int
+static ptrdiff_t
load_pixmap (FRAME_PTR f, Lisp_Object name, unsigned int *w_ptr, unsigned int *h_ptr)
{
- int bitmap_id;
+ ptrdiff_t bitmap_id;
if (NILP (name))
return 0;
#define LFACEP(LFACE) \
(VECTORP (LFACE) \
- && XVECTOR (LFACE)->size == LFACE_VECTOR_SIZE \
+ && ASIZE (LFACE) == LFACE_VECTOR_SIZE \
&& EQ (AREF (LFACE, 0), Qface))
#endif
/* Check consistency of Lisp face attribute vector ATTRS. */
static void
-check_lface_attrs (attrs)
- Lisp_Object *attrs;
+check_lface_attrs (Lisp_Object *attrs)
{
xassert (UNSPECIFIEDP (attrs[LFACE_FAMILY_INDEX])
|| IGNORE_DEFFACE_P (attrs[LFACE_FAMILY_INDEX])
/* Check consistency of attributes of Lisp face LFACE (a Lisp vector). */
static void
-check_lface (lface)
- Lisp_Object lface;
+check_lface (Lisp_Object lface)
{
if (!NILP (lface))
{
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,
}
\f
-
-#if 0 /* Seems to be unused. */
-static Lisp_Object
-internal_resolve_face_name (nargs, args)
- int nargs;
- Lisp_Object *args;
-{
- return Fget (args[0], args[1]);
-}
-
-static Lisp_Object
-resolve_face_name_error (ignore)
- Lisp_Object ignore;
-{
- return Qnil;
-}
-#endif
-
/* Resolve face name FACE_NAME. If FACE_NAME is a string, intern it
to make it a symbol. If FACE_NAME is an alias for another face,
return that face's name.
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;
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)
break;
face->id = i;
+#if GLYPH_DEBUG
+ /* Check that FACE got a unique id. */
+ {
+ int j, n;
+ struct face *face1;
+
+ for (j = n = 0; j < FACE_CACHE_BUCKETS_SIZE; ++j)
+ for (face1 = c->buckets[j]; face1; face1 = face1->next)
+ if (face1->id == i)
+ ++n;
+
+ xassert (n == 1);
+ }
+#endif /* GLYPH_DEBUG */
+
/* Maybe enlarge C->faces_by_id. */
if (i == c->used)
{
c->used++;
}
-#if GLYPH_DEBUG
- /* Check that FACE got a unique id. */
- {
- int j, n;
- struct face *face;
-
- for (j = n = 0; j < FACE_CACHE_BUCKETS_SIZE; ++j)
- for (face = c->buckets[j]; face; face = face->next)
- if (face->id == i)
- ++n;
-
- xassert (n == 1);
- }
-#endif /* GLYPH_DEBUG */
-
c->faces_by_id[i] = 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);
struct frame *f = XFRAME (w->frame);
Lisp_Object attrs[LFACE_VECTOR_SIZE];
Lisp_Object prop, position;
- int i, noverlays;
+ ptrdiff_t i, noverlays;
Lisp_Object *overlay_vec;
Lisp_Object frame;
EMACS_INT endpos;
*/
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;
/* Print the contents of the realized face FACE to stderr. */
static void
-dump_realized_face (face)
- struct face *face;
+dump_realized_face (struct face *face)
{
fprintf (stderr, "ID: %d\n", face->id);
#ifdef HAVE_X_WINDOWS