diff options
author | scw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-08-17 13:28:53 +0800 |
---|---|---|
committer | scw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-08-17 13:28:53 +0800 |
commit | 7c7adbd6aefd1498cd84ee947c52269ce099d347 (patch) | |
tree | 0cf6027e7edf5f7137d519a34769411115e46251 /mbbsd/mbbsd.c | |
parent | 1598828725cc3a14f4e9a1a18b4212ad808a3516 (diff) | |
download | pttbbs-7c7adbd6aefd1498cd84ee947c52269ce099d347.tar pttbbs-7c7adbd6aefd1498cd84ee947c52269ce099d347.tar.gz pttbbs-7c7adbd6aefd1498cd84ee947c52269ce099d347.tar.bz2 pttbbs-7c7adbd6aefd1498cd84ee947c52269ce099d347.tar.lz pttbbs-7c7adbd6aefd1498cd84ee947c52269ce099d347.tar.xz pttbbs-7c7adbd6aefd1498cd84ee947c52269ce099d347.tar.zst pttbbs-7c7adbd6aefd1498cd84ee947c52269ce099d347.zip |
screen_backup() & screen_restore() update:
* automatic allocate memory, save cursor location and backup
* automatic restore screen, cursor location and free memory
* works on screen lessening
* no more crash on screen enlarged
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3051 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/mbbsd.c')
-rw-r--r-- | mbbsd/mbbsd.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c index adc2dedf..6d928719 100644 --- a/mbbsd/mbbsd.c +++ b/mbbsd/mbbsd.c @@ -272,14 +272,11 @@ talk_request(int sig) currutmp->mode = 0; currutmp->chatid[0] = 1; - old_screen.raw_memory = malloc(screen_backupsize(t_lines, big_picture)); - screen_backup(t_lines, big_picture, &old_screen); + screen_backup(&old_screen); talkreply(); currutmp->mode = mode0; currutmp->chatid[0] = c0; - screen_restore(t_lines, big_picture, &old_screen); - free(old_screen.raw_memory); - redoscr(); + screen_restore(&old_screen); } } |