summaryrefslogtreecommitdiffstats
path: root/mbbsd/talk.c
diff options
context:
space:
mode:
authorkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-11-06 06:09:09 +0800
committerkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-11-06 06:09:09 +0800
commit761f24e6af4c4691bcc0bcabba0197c0426d233d (patch)
treef0951ec853524f391fdc7785f11744ea42c13212 /mbbsd/talk.c
parent0e4f3ac7f8a565f8aebf8a337f648a36d3ab86fe (diff)
downloadpttbbs-761f24e6af4c4691bcc0bcabba0197c0426d233d.tar
pttbbs-761f24e6af4c4691bcc0bcabba0197c0426d233d.tar.gz
pttbbs-761f24e6af4c4691bcc0bcabba0197c0426d233d.tar.bz2
pttbbs-761f24e6af4c4691bcc0bcabba0197c0426d233d.tar.lz
pttbbs-761f24e6af4c4691bcc0bcabba0197c0426d233d.tar.xz
pttbbs-761f24e6af4c4691bcc0bcabba0197c0426d233d.tar.zst
pttbbs-761f24e6af4c4691bcc0bcabba0197c0426d233d.zip
Backup screen without hole. Save 8~11kb for normal user.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2314 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/talk.c')
-rw-r--r--mbbsd/talk.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/mbbsd/talk.c b/mbbsd/talk.c
index 33daeda5..9f2791b9 100644
--- a/mbbsd/talk.c
+++ b/mbbsd/talk.c
@@ -3137,22 +3137,22 @@ TalkToAngel(){
void
CallAngel(){
static int entered = 0;
- screenline_t *screen0;
+ void *screen0;
int x, y;
if (!HAS_PERM(PERM_LOGINOK) || entered)
return;
entered = 1;
- screen0 = calloc(t_lines, sizeof(screenline_t));
getyx(&y, &x);
- memcpy(screen0, big_picture, t_lines * sizeof(screenline_t));
+ screen0=malloc(screen_backupsize(t_lines, big_picture));
+ screen_backup(t_lines, big_picture, screen0);
TalkToAngel();
- memcpy(big_picture, screen0, t_lines * sizeof(screenline_t));
- move(y, x);
+ screen_restore(t_lines, big_picture, screen0);
free(screen0);
+ move(y, x);
redoscr();
entered = 0;