summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-12-24 18:38:13 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-12-24 18:38:13 +0800
commit60e6c6cd3f3a648a1f76f7c18d922dacabbb3b4c (patch)
tree86cf8fa7e68b934360a259a7363a22266e15e41d /mbbsd
parent3a03c33c7ce6c3f7bea8e9597711108a2ee5d817 (diff)
downloadpttbbs-60e6c6cd3f3a648a1f76f7c18d922dacabbb3b4c.tar
pttbbs-60e6c6cd3f3a648a1f76f7c18d922dacabbb3b4c.tar.gz
pttbbs-60e6c6cd3f3a648a1f76f7c18d922dacabbb3b4c.tar.bz2
pttbbs-60e6c6cd3f3a648a1f76f7c18d922dacabbb3b4c.tar.lz
pttbbs-60e6c6cd3f3a648a1f76f7c18d922dacabbb3b4c.tar.xz
pttbbs-60e6c6cd3f3a648a1f76f7c18d922dacabbb3b4c.tar.zst
pttbbs-60e6c6cd3f3a648a1f76f7c18d922dacabbb3b4c.zip
- 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
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/io.c3
-rw-r--r--mbbsd/read.c1
-rw-r--r--mbbsd/talk.c5
-rw-r--r--mbbsd/term.c7
4 files changed, 13 insertions, 3 deletions
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