From 6b1f9ba4770e8f488c378cfa87dc868cad62c436 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 25 Mar 2011 19:06:33 +0100 Subject: [PATCH] src/*.c: Remove unused function parameters. * buffer.c (defvar_per_buffer): Remove unused parameter `doc'. (DEFVAR_PER_BUFFER): Don't pass it. * dispnew.c (row_equal_p, add_row_entry): Remove unused parameter `w'. (scrolling_window): Don't pass it. --- src/ChangeLog | 8 ++++++++ src/buffer.c | 4 ++-- src/dispnew.c | 24 ++++++++++-------------- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 3dfc86a4778..bd06cd1869e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2011-03-25 Juanma Barranquero + + * buffer.c (defvar_per_buffer): Remove unused parameter `doc'. + (DEFVAR_PER_BUFFER): Don't pass it. + + * dispnew.c (row_equal_p, add_row_entry): Remove unused parameter `w'. + (scrolling_window): Don't pass it. + 2011-03-25 Juanma Barranquero * dispextern.h (glyph_matric): Use #if GLYPH_DEBUG, not #ifdef. diff --git a/src/buffer.c b/src/buffer.c index da2cc1573c8..8b56b285e48 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -5224,12 +5224,12 @@ init_buffer (void) #define DEFVAR_PER_BUFFER(lname, vname, type, doc) \ do { \ static struct Lisp_Buffer_Objfwd bo_fwd; \ - defvar_per_buffer (&bo_fwd, lname, vname, type, 0); \ + defvar_per_buffer (&bo_fwd, lname, vname, type); \ } while (0) static void defvar_per_buffer (struct Lisp_Buffer_Objfwd *bo_fwd, const char *namestring, - Lisp_Object *address, Lisp_Object type, char *doc) + Lisp_Object *address, Lisp_Object type) { struct Lisp_Symbol *sym; int offset; diff --git a/src/dispnew.c b/src/dispnew.c index 1408bea2fc6..093ed9524e4 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -1297,13 +1297,11 @@ line_draw_cost (struct glyph_matrix *matrix, int vpos) /* Test two glyph rows A and B for equality. Value is non-zero if A - and B have equal contents. W is the window to which the glyphs - rows A and B belong. It is needed here to test for partial row - visibility. MOUSE_FACE_P non-zero means compare the mouse_face_p - flags of A and B, too. */ + and B have equal contents. MOUSE_FACE_P non-zero means compare the + mouse_face_p flags of A and B, too. */ static INLINE int -row_equal_p (struct window *w, struct glyph_row *a, struct glyph_row *b, int mouse_face_p) +row_equal_p (struct glyph_row *a, struct glyph_row *b, int mouse_face_p) { if (a == b) return 1; @@ -4251,17 +4249,16 @@ static int runs_size; static struct run **runs; -/* Add glyph row ROW to the scrolling hash table during the scrolling - of window W. */ +/* Add glyph row ROW to the scrolling hash table. */ static INLINE struct row_entry * -add_row_entry (struct window *w, struct glyph_row *row) +add_row_entry (struct glyph_row *row) { struct row_entry *entry; int i = row->hash % row_table_size; entry = row_table[i]; - while (entry && !row_equal_p (w, entry->row, row, 1)) + while (entry && !row_equal_p (entry->row, row, 1)) entry = entry->next; if (entry == NULL) @@ -4328,7 +4325,7 @@ scrolling_window (struct window *w, int header_line_p) && c->y == d->y && MATRIX_ROW_BOTTOM_Y (c) <= yb && MATRIX_ROW_BOTTOM_Y (d) <= yb - && row_equal_p (w, c, d, 1)) + && row_equal_p (c, d, 1)) { assign_row (c, d); d->enabled_p = 0; @@ -4381,8 +4378,7 @@ scrolling_window (struct window *w, int header_line_p) && (MATRIX_ROW (current_matrix, i - 1)->y == MATRIX_ROW (desired_matrix, j - 1)->y) && !MATRIX_ROW (desired_matrix, j - 1)->redraw_fringe_bitmaps_p - && row_equal_p (w, - MATRIX_ROW (desired_matrix, i - 1), + && row_equal_p (MATRIX_ROW (desired_matrix, i - 1), MATRIX_ROW (current_matrix, j - 1), 1)) --i, --j; last_new = i; @@ -4443,7 +4439,7 @@ scrolling_window (struct window *w, int header_line_p) { if (MATRIX_ROW (current_matrix, i)->enabled_p) { - entry = add_row_entry (w, MATRIX_ROW (current_matrix, i)); + entry = add_row_entry (MATRIX_ROW (current_matrix, i)); old_lines[i] = entry; ++entry->old_uses; } @@ -4454,7 +4450,7 @@ scrolling_window (struct window *w, int header_line_p) for (i = first_new; i < last_new; ++i) { xassert (MATRIX_ROW_ENABLED_P (desired_matrix, i)); - entry = add_row_entry (w, MATRIX_ROW (desired_matrix, i)); + entry = add_row_entry (MATRIX_ROW (desired_matrix, i)); ++entry->new_uses; entry->new_line_number = i; new_lines[i] = entry; -- 2.39.2