tmerged tscroll() with tscrollup(). - st - [fork] customized build of st, the simple terminal
(HTM) git clone git://src.adamsgaard.dk/st
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit c186c8ef9a995616384c425c5568b6913676b252
(DIR) parent 6db6980e27bdde6f2d444dd3cdd7a46985fa84fc
(HTM) Author: Aurélien Aptel <aurelien.aptel@gmail.com>
Date: Sun, 29 Aug 2010 12:27:59 +0200
merged tscroll() with tscrollup().
Diffstat:
M st.c | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
---
(DIR) diff --git a/st.c b/st.c
t@@ -149,7 +149,6 @@ static void tputc(char);
static void tputs(char*, int);
static void treset(void);
static void tresize(int, int);
-static void tscroll(void);
static void tscrollup(int);
static void tscrolldown(int);
static void tsetattr(int*, int);
t@@ -355,18 +354,6 @@ tnew(int col, int row) {
term.line[row] = calloc(term.col, sizeof(Glyph));
}
-/* TODO: Replace with scrollup/scolldown */
-void
-tscroll(void) {
- Line temp = term.line[term.top];
- int i;
-
- for(i = term.top; i < term.bot; i++)
- term.line[i] = term.line[i+1];
- memset(temp, 0, sizeof(Glyph) * term.col);
- term.line[term.bot] = temp;
-}
-
void
tscrolldown (int n) {
int i;
t@@ -404,7 +391,7 @@ void
tnewline(void) {
int y = term.c.y + 1;
if(y > term.bot)
- tscroll(), y = term.bot;
+ tscrollup(1), y = term.bot;
tmoveto(0, y);
}