From 761f24e6af4c4691bcc0bcabba0197c0426d233d Mon Sep 17 00:00:00 2001 From: kcwu Date: Fri, 5 Nov 2004 22:09:09 +0000 Subject: 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 --- mbbsd/mbbsd.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'mbbsd/mbbsd.c') diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c index 80b541b0..090c887a 100644 --- a/mbbsd/mbbsd.c +++ b/mbbsd/mbbsd.c @@ -224,15 +224,16 @@ talk_request(int sig) } else { unsigned char mode0 = currutmp->mode; char c0 = currutmp->chatid[0]; - screenline_t *screen0 = calloc(t_lines, sizeof(screenline_t)); + void *screen0; currutmp->mode = 0; currutmp->chatid[0] = 1; - memcpy(screen0, big_picture, t_lines * sizeof(screenline_t)); + screen0=malloc(screen_backupsize(t_lines, big_picture)); + screen_backup(t_lines, big_picture, screen0); talkreply(); currutmp->mode = mode0; currutmp->chatid[0] = c0; - memcpy(big_picture, screen0, t_lines * sizeof(screenline_t)); + screen_restore(t_lines, big_picture, screen0); free(screen0); redoscr(); } -- cgit v1.2.3