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/go.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mbbsd/go.c') diff --git a/mbbsd/go.c b/mbbsd/go.c index 4c20df0b..0cff7430 100644 --- a/mbbsd/go.c +++ b/mbbsd/go.c @@ -865,11 +865,11 @@ gochess(int fd) if (ch == 'v') { - //extern screenline *big_picture; - screenline_t* screen0 = calloc(t_lines, sizeof(screenline_t)); + void *screen0; int 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); add_io(0, 0); getyx(&y, &x); if (ch == 'v') @@ -888,7 +888,7 @@ gochess(int fd) } */ move(y, x); - memcpy(big_picture, screen0, t_lines * sizeof(screenline_t)); + screen_restore(t_lines, big_picture, screen0); free(screen0); add_io(fd, 0); scr_need_redraw = 1; -- cgit v1.2.3