summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 72ad995)
raw | patch | inline | side by side (parent: 72ad995)
author | Max Kellermann <max@duempel.org> | |
Tue, 23 Sep 2008 11:29:25 +0000 (13:29 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Tue, 23 Sep 2008 11:29:25 +0000 (13:29 +0200) |
There are lots of functions not being used outside of list_window.c.
Make them static to make it easier for gcc to optimize.
Make them static to make it easier for gcc to optimize.
src/list_window.c | patch | blob | history | |
src/list_window.h | patch | blob | history |
diff --git a/src/list_window.c b/src/list_window.c
index 215a531dd4907a8bcba373c084db1c7706182f55..cce992d86c31aaf02ab0328ac1316eeed81bb53a 100644 (file)
--- a/src/list_window.c
+++ b/src/list_window.c
lw->selected = n;
}
-void
+static void
list_window_next(struct list_window *lw, unsigned length)
{
if (lw->selected + 1 < length)
lw->selected = 0;
}
-void
+static void
list_window_previous(struct list_window *lw, unsigned length)
{
if (lw->selected > 0)
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;
lw->selected = 0;
}
-void
+static void
list_window_next_page(struct list_window *lw, unsigned length)
{
if (lw->rows < 2)
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 78593948add8eae7438f33ced05e8278d40c0fdf..25f5362f9b82f7ca771f4d592619b7a47fa234cd 100644 (file)
--- a/src/list_window.h
+++ b/src/list_window.h
/* 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 */