summaryrefslogtreecommitdiffstats
path: root/mbbsd/io.c
diff options
context:
space:
mode:
authorvictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-08-26 16:27:59 +0800
committervictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-08-26 16:27:59 +0800
commite7130cce084e10e93494b6695245b71acb1c1160 (patch)
tree57affbae6ee72dc26e6eb5056cdeb1c3576d983c /mbbsd/io.c
parentbd3ae512413d166c2c2fcb88821fe8e75ccf6807 (diff)
downloadpttbbs-e7130cce084e10e93494b6695245b71acb1c1160.tar
pttbbs-e7130cce084e10e93494b6695245b71acb1c1160.tar.gz
pttbbs-e7130cce084e10e93494b6695245b71acb1c1160.tar.bz2
pttbbs-e7130cce084e10e93494b6695245b71acb1c1160.tar.lz
pttbbs-e7130cce084e10e93494b6695245b71acb1c1160.tar.xz
pttbbs-e7130cce084e10e93494b6695245b71acb1c1160.tar.zst
pttbbs-e7130cce084e10e93494b6695245b71acb1c1160.zip
less screen copying in ofo water ball mode
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2167 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/io.c')
-rw-r--r--mbbsd/io.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/mbbsd/io.c b/mbbsd/io.c
index 129aba90..1840162d 100644
--- a/mbbsd/io.c
+++ b/mbbsd/io.c
@@ -285,16 +285,20 @@ igetch()
if (currutmp == NULL)
return (ch);
+#define WB_OFO_WINDOW_HEIGHT ((WB_OFO_MSG_BOTTOM) - (WB_OFO_USER_TOP) + 1)
+
if (currutmp->msgs[0].pid &&
WATERMODE(WATER_OFO) && wmofo == NOTREPLYING) {
int y, x, my_newfd;
- screenline_t *screen0 = calloc(t_lines, sizeof(screenline_t));
- memcpy(screen0, big_picture, t_lines * sizeof(screenline_t));
+ screenline_t *screen0 = calloc(WB_OFO_WINDOW_HEIGHT, sizeof(screenline_t));
+ memcpy(screen0, &big_picture[WB_OFO_USER_TOP - 1],
+ WB_OFO_WINDOW_HEIGHT * sizeof(screenline_t));
getyx(&y, &x);
my_newfd = i_newfd;
i_newfd = 0;
my_write2();
- memcpy(big_picture, screen0, t_lines * sizeof(screenline_t));
+ memcpy(&big_picture[WB_OFO_USER_TOP - 1], screen0,
+ WB_OFO_WINDOW_HEIGHT * sizeof(screenline_t));
i_newfd = my_newfd;
move(y, x);
free(screen0);