From: Max Kellermann Date: Tue, 23 Sep 2008 11:29:25 +0000 (+0200) Subject: list_window: converted several public functions to static X-Git-Tag: v0.12_alpha1~173 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5f6cee4616c52bc2cf95afcdb1e3e7a8bed6e393;p=ncmpc.git list_window: converted several public functions to static There are lots of functions not being used outside of list_window.c. Make them static to make it easier for gcc to optimize. --- diff --git a/src/list_window.c b/src/list_window.c index 215a531..cce992d 100644 --- a/src/list_window.c +++ b/src/list_window.c @@ -104,7 +104,7 @@ list_window_set_selected(struct list_window *lw, unsigned n) lw->selected = n; } -void +static void list_window_next(struct list_window *lw, unsigned length) { if (lw->selected + 1 < length) @@ -113,7 +113,7 @@ list_window_next(struct list_window *lw, unsigned length) lw->selected = 0; } -void +static void list_window_previous(struct list_window *lw, unsigned length) { if (lw->selected > 0) @@ -122,14 +122,14 @@ list_window_previous(struct list_window *lw, unsigned length) lw->selected = length - 1; } -void +static void list_window_first(struct list_window *lw) { lw->xoffset = 0; lw->selected = 0; } -void +static void list_window_last(struct list_window *lw, unsigned length) { lw->xoffset = 0; @@ -139,7 +139,7 @@ list_window_last(struct list_window *lw, unsigned length) lw->selected = 0; } -void +static void list_window_next_page(struct list_window *lw, unsigned length) { if (lw->rows < 2) @@ -150,7 +150,7 @@ list_window_next_page(struct list_window *lw, unsigned length) list_window_last(lw, length); } -void +static void list_window_previous_page(struct list_window *lw) { if (lw->rows < 2) diff --git a/src/list_window.h b/src/list_window.h index 7859394..25f5362 100644 --- a/src/list_window.h +++ b/src/list_window.h @@ -72,12 +72,6 @@ list_window_center(struct list_window *lw, unsigned rows, unsigned n); /* select functions */ void list_window_set_selected(struct list_window *lw, unsigned n); -void list_window_previous(struct list_window *lw, unsigned length); -void list_window_next(struct list_window *lw, unsigned length); -void list_window_first(struct list_window *lw); -void list_window_last(struct list_window *lw, unsigned length); -void list_window_previous_page(struct list_window *lw); -void list_window_next_page(struct list_window *lw, unsigned length); void list_window_check_selected(struct list_window *lw, unsigned length); /* find a string in a list window */