From 1c14176cfd92376a14e4dbce27eb0c6457d12061 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 14 Sep 2011 14:45:51 -0700 Subject: [PATCH] Remove unused external symbols. * dispextern.h (calc_pixel_width_or_height): Remove decl. * xdisp.c (calc_pixel_width_or_height): Now static. * doprnt.c (exprintf) [! (HAVE_X_WINDOWS && USE_X_TOOLKIT)]: Remove. * indent.c (check_display_width): * w32term.c: Fix comment to match code. * xterm.c, xterm.h (x_catching_errors): Remove. --- src/ChangeLog | 10 ++++++++++ src/dispextern.h | 2 -- src/doprnt.c | 4 ++++ src/indent.c | 2 +- src/w32term.c | 1 - src/xdisp.c | 2 +- src/xterm.c | 8 -------- src/xterm.h | 1 - 8 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index fd3de54c3e9..3dbddc9b215 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,13 @@ +2011-09-14 Paul Eggert + + Remove unused external symbols. + * dispextern.h (calc_pixel_width_or_height): Remove decl. + * xdisp.c (calc_pixel_width_or_height): Now static. + * doprnt.c (exprintf) [! (HAVE_X_WINDOWS && USE_X_TOOLKIT)]: Remove. + * indent.c (check_display_width): + * w32term.c: Fix comment to match code. + * xterm.c, xterm.h (x_catching_errors): Remove. + 2011-09-14 Paul Eggert * xselect.c: Use signed conversions more consistently (Bug#9498). diff --git a/src/dispextern.h b/src/dispextern.h index f6c3fe1e3ca..65284121588 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -3036,8 +3036,6 @@ extern struct frame *last_mouse_frame; extern int last_tool_bar_item; extern void reseat_at_previous_visible_line_start (struct it *); extern Lisp_Object lookup_glyphless_char_display (int, struct it *); -extern int calc_pixel_width_or_height (double *, struct it *, Lisp_Object, - struct font *, int, int *); extern EMACS_INT compute_display_string_pos (struct text_pos *, struct bidi_string_data *, int, int *); diff --git a/src/doprnt.c b/src/doprnt.c index 8db7c0f2ada..b4d13c59137 100644 --- a/src/doprnt.c +++ b/src/doprnt.c @@ -486,6 +486,8 @@ esprintf (char *buf, char const *format, ...) return nbytes; } +#if defined HAVE_X_WINDOWS && defined USE_X_TOOLKIT + /* Format to buffer *BUF of positive size *BUFSIZE, reallocating *BUF and updating *BUFSIZE if the buffer is too small, and otherwise behaving line esprintf. When reallocating, free *BUF unless it is @@ -505,6 +507,8 @@ exprintf (char **buf, ptrdiff_t *bufsize, return nbytes; } +#endif + /* Act like exprintf, except take a va_list. */ ptrdiff_t evxprintf (char **buf, ptrdiff_t *bufsize, diff --git a/src/indent.c b/src/indent.c index bae9ab1b46d..e00d2152577 100644 --- a/src/indent.c +++ b/src/indent.c @@ -471,7 +471,7 @@ check_display_width (EMACS_INT pos, EMACS_INT col, EMACS_INT *endpos) if (CONSP (val = get_char_property_and_overlay (make_number (pos), Qdisplay, Qnil, &overlay)) && EQ (Qspace, XCAR (val))) - { /* FIXME: Use calc_pixel_width_or_height, as in term.c. */ + { /* FIXME: Use calc_pixel_width_or_height. */ Lisp_Object plist = XCDR (val), prop; int width = -1; diff --git a/src/w32term.c b/src/w32term.c index 98c4a391953..8d9d8f72029 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -5197,7 +5197,6 @@ x_catch_errors (dpy) x_catch_errors_unwind (old_val) x_check_errors (dpy, format) x_fully_uncatch_errors () -x_catching_errors () x_had_errors_p (dpy) x_clear_errors (dpy) x_uncatch_errors (dpy, count) diff --git a/src/xdisp.c b/src/xdisp.c index 3ebf7d19b1f..8adc83b5068 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -21293,7 +21293,7 @@ else if the text is replaced by an ellipsis. */) ? XFLOATINT (X) \ : - 1) -int +static int calc_pixel_width_or_height (double *res, struct it *it, Lisp_Object prop, struct font *font, int width_p, int *align_to) { diff --git a/src/xterm.c b/src/xterm.c index 34576da986d..7c4ee96deab 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -7686,14 +7686,6 @@ x_fully_uncatch_errors (void) } #endif -/* Nonzero if x_catch_errors has been done and not yet canceled. */ - -int -x_catching_errors (void) -{ - return x_error_message != 0; -} - #if 0 static unsigned int x_wire_count; x_trace_wire (void) diff --git a/src/xterm.h b/src/xterm.h index 5c9365c1269..11d5d50d952 100644 --- a/src/xterm.h +++ b/src/xterm.h @@ -958,7 +958,6 @@ extern void x_catch_errors (Display *); extern void x_check_errors (Display *, const char *) ATTRIBUTE_FORMAT_PRINTF (2, 0); extern int x_had_errors_p (Display *); -extern int x_catching_errors (void); extern void x_uncatch_errors (void); extern void x_clear_errors (Display *); extern void x_set_window_size (struct frame *, int, int, int); -- 2.39.2