From 60e6c6cd3f3a648a1f76f7c18d922dacabbb3b4c Mon Sep 17 00:00:00 2001 From: piaip Date: Mon, 24 Dec 2007 10:38:13 +0000 Subject: - redrawin() changed to 'invalid only' and will take change at next refresh git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3734 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/io.c | 3 +++ mbbsd/read.c | 1 + mbbsd/talk.c | 5 ++--- mbbsd/term.c | 7 +++++++ 4 files changed, 13 insertions(+), 3 deletions(-) (limited to 'mbbsd') diff --git a/mbbsd/io.c b/mbbsd/io.c index 745860eb..c35af7c7 100644 --- a/mbbsd/io.c +++ b/mbbsd/io.c @@ -79,6 +79,7 @@ oflush(void) } #ifdef DBG_OUTRPT + // if (0) { static char xbuf[128]; sprintf(xbuf, ESC_STR "[s" ESC_STR "[H" " [%lu/%lu] " ESC_STR "[u", @@ -450,7 +451,9 @@ igetch(void) #endif case Ctrl('L'): redrawwin(); + refresh(); continue; + case Ctrl('U'): if (currutmp != NULL && currutmp->mode != EDITING && currutmp->mode != LUSERS && currutmp->mode) { diff --git a/mbbsd/read.c b/mbbsd/read.c index 29401afb..1335e812 100644 --- a/mbbsd/read.c +++ b/mbbsd/read.c @@ -851,6 +851,7 @@ i_read_key(const onekey_t * rcmdlist, keeploc_t * locmem, break; case Ctrl('L'): redrawwin(); + refresh(); break; case Ctrl('H'): diff --git a/mbbsd/talk.c b/mbbsd/talk.c index 72a4cff9..47c0aa60 100644 --- a/mbbsd/talk.c +++ b/mbbsd/talk.c @@ -1161,7 +1161,7 @@ talk_refreshline(talkwin_t *twin) // dirty screen twpic_t *line = twin->big_picture + (twin->curln - twin->sline); int iscomplete = iscompletedbcs(line->data); - int len = strlen(line->data); + int len = strlen((char*)line->data); move(twin->curln, 0); clrtoeol(); @@ -1505,9 +1505,8 @@ do_talk(int fd) if (itswin.big_picture[i].len) fprintf(flog, "%.*s\n", itswin.big_picture[i].len, itswin.big_picture[i].data); - redrawwin(); - fclose(flog); + redrawwin(); more(fpath, NA); getdata(b_lines - 1, 0, "清除(C) 移至備忘錄(M). (C/M)?[C]", ans, sizeof(ans), LCECHO); diff --git a/mbbsd/term.c b/mbbsd/term.c index 064d5db3..4868415a 100644 --- a/mbbsd/term.c +++ b/mbbsd/term.c @@ -40,6 +40,7 @@ sig_term_resize(int sig) void term_resize(int w, int h) { + int dorefresh = 0; Signal(SIGWINCH, SIG_IGN); /* Don't bother me! */ @@ -54,12 +55,18 @@ void term_resize(int w, int h) t_lines = h; t_columns = w; + dorefresh = 1; } scr_lns = t_lines; /* XXX: scr_lns 跟 t_lines 有什麼不同, 為何分成兩個 */ b_lines = t_lines - 1; p_lines = t_lines - 4; Signal(SIGWINCH, sig_term_resize); + if (dorefresh) + { + redrawwin(); + refresh(); + } } int -- cgit v1.2.3