From 435f4c28d3921770b107973ecb45e36b719eb4c3 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 11 Apr 2011 23:27:22 -0700 Subject: [PATCH] * xfaces.c: Make symbols static if they're not exported. * dispextern.h (ascii_face_of_lisp_face, free_realized_face): Remove decls. * xterm.h (defined_color): Remove decls. (x_free_dpy_colors): Declare only if USE_X_TOOLKIT. * xfaces.c (tty_suppress_bold_inverse_default_colors_p): (menu_face_changed_default, defined_color, free_realized_face): (x_free_dpy_colors): Define only if USE_X_TOOLKIT. (ascii_face_of_lisp_face): Remove; unused. --- src/ChangeLog | 10 ++++++++++ src/dispextern.h | 2 -- src/xfaces.c | 32 +++++++------------------------- src/xterm.h | 3 ++- 4 files changed, 19 insertions(+), 28 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index dad33d964d..0e2bcacf3c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,15 @@ 2011-04-12 Paul Eggert + * xfaces.c: Make symbols static if they're not exported. + * dispextern.h (ascii_face_of_lisp_face, free_realized_face): + Remove decls. + * xterm.h (defined_color): Remove decls. + (x_free_dpy_colors): Declare only if USE_X_TOOLKIT. + * xfaces.c (tty_suppress_bold_inverse_default_colors_p): + (menu_face_changed_default, defined_color, free_realized_face): + (x_free_dpy_colors): Define only if USE_X_TOOLKIT. + (ascii_face_of_lisp_face): Remove; unused. + * xdisp.c: Make symbols static if they're not exported. * dispextern.h (scratch_glyph_row, window_box_edges): (glyph_to_pixel_coords, set_cursor_from_row): diff --git a/src/dispextern.h b/src/dispextern.h index a7ed24dd32..6d89fe6933 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -3131,7 +3131,6 @@ unsigned long load_color (struct frame *, struct face *, Lisp_Object, void unload_color (struct frame *, unsigned long); char *choose_face_font (struct frame *, Lisp_Object *, Lisp_Object, int *); -int ascii_face_of_lisp_face (struct frame *, int); void prepare_face_for_display (struct frame *, struct face *); int xstrcasecmp (const char *, const char *); int lookup_named_face (struct frame *, Lisp_Object, int); @@ -3157,7 +3156,6 @@ int face_at_string_position (struct window *w, Lisp_Object string, int merge_faces (struct frame *, Lisp_Object, int, int); int compute_char_face (struct frame *, int, Lisp_Object); void free_all_realized_faces (Lisp_Object); -void free_realized_face (struct frame *, struct face *); extern Lisp_Object Qforeground_color, Qbackground_color; extern Lisp_Object Qframe_set_background_mode; extern char unspecified_fg[], unspecified_bg[]; diff --git a/src/xfaces.c b/src/xfaces.c index 83f4268ad1..b09d20c107 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -425,7 +425,7 @@ int face_change_count; 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. */ @@ -443,7 +443,7 @@ static int ngcs; /* 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; /* Function prototypes. */ @@ -613,6 +613,8 @@ x_free_colors (struct frame *f, long unsigned int *pixels, int npixels) } +#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. */ @@ -633,7 +635,7 @@ x_free_dpy_colors (Display *dpy, Screen *screen, Colormap cmap, long unsigned in 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. */ @@ -1145,7 +1147,7 @@ tty_defined_color (struct frame *f, const char *color_name, 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)) @@ -4091,7 +4093,7 @@ make_realized_face (Lisp_Object *attr) /* 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) @@ -4609,26 +4611,6 @@ lookup_basic_face (struct frame *f, int face_id) } -/* 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. */ diff --git a/src/xterm.h b/src/xterm.h index e0e8240e9e..f44c71fab5 100644 --- a/src/xterm.h +++ b/src/xterm.h @@ -1041,7 +1041,6 @@ extern int xg_set_icon_from_xpm_data (struct frame *, const char**); #endif /* USE_GTK */ extern void x_real_positions (struct frame *, int *, int *); -extern int defined_color (struct frame *, const char *, XColor *, int); extern void x_set_border_pixel (struct frame *, int); extern void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object); extern void x_implicitly_set_name (struct frame *, Lisp_Object, Lisp_Object); @@ -1066,8 +1065,10 @@ extern void x_set_tool_bar_lines (struct frame *, Lisp_Object, Lisp_Object); /* Defined in xfaces.c */ +#ifdef USE_X_TOOLKIT extern void x_free_dpy_colors (Display *, Screen *, Colormap, unsigned long *, int); +#endif /* USE_X_TOOLKIT */ /* Defined in xmenu.c */ -- 2.20.1