From e2f614ab1a57c8ba057db3a074c2a38c314890fd Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Fri, 5 Oct 2012 13:22:43 +0200 Subject: [PATCH] tsm: screen: remove unused get_from_scrollback() This function is not used and I do not intend to use it anywhere soon. Therefore, remove it so it doesn't generate sparse warnings. The only reason why I kept is was that we might want to retrieve these when increasing window size. However, this will not be implemented in the near future as we need to keep a buffer-fill state for it. Signed-off-by: David Herrmann --- src/tsm_screen.c | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/src/tsm_screen.c b/src/tsm_screen.c index 260cd89..cce6e57 100644 --- a/src/tsm_screen.c +++ b/src/tsm_screen.c @@ -207,38 +207,6 @@ static void link_to_scrollback(struct tsm_screen *con, struct line *line) ++con->sb_count; } -/* Unlinks last line from the scrollback buffer, Returns NULL if it is empty */ -static struct line *get_from_scrollback(struct tsm_screen *con) -{ - struct line *line; - - if (!con->sb_last) - return NULL; - - line = con->sb_last; - con->sb_last = line->prev; - if (line->prev) - line->prev->next = NULL; - else - con->sb_first = NULL; - con->sb_count--; - - /* correctly move the current position if it is set in the sb */ - if (con->sb_pos) { - if (con->flags & TSM_SCREEN_FIXED_POS || - !con->sb_pos->prev) { - if (con->sb_pos == line) - con->sb_pos = NULL; - } else { - con->sb_pos = con->sb_pos->prev; - } - } - - line->next = NULL; - line->prev = NULL; - return line; -} - static void screen_scroll_up(struct tsm_screen *con, unsigned int num) { unsigned int i, j, max; -- 2.7.4