From f79d7ef296f497b75d91a7770c7c1abce36961a4 Mon Sep 17 00:00:00 2001 From: ptt Date: Sat, 16 Mar 2002 15:11:10 +0000 Subject: *** empty log message *** git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@31 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/io.c | 46 ++++++++++++++++++++++------------------------ 1 file changed, 22 insertions(+), 24 deletions(-) (limited to 'mbbsd/io.c') diff --git a/mbbsd/io.c b/mbbsd/io.c index 82c5d93c..b0331074 100644 --- a/mbbsd/io.c +++ b/mbbsd/io.c @@ -1,4 +1,4 @@ -/* $Id: io.c,v 1.6 2002/03/16 13:18:59 ptt Exp $ */ +/* $Id: io.c,v 1.7 2002/03/16 15:11:09 ptt Exp $ */ #include #include #include @@ -240,7 +240,25 @@ int igetch() { case Ctrl('R'): if(currutmp == NULL) return (ch); - if( WATERMODE(WATER_ORIG) || WATERMODE(WATER_NEW) ){ + + if( currutmp->msgs[0].pid && + WATERMODE(WATER_OFO) && wmofo == -1 ){ + int y, x, my_newfd; + screenline_t *screen0 = calloc(t_lines, sizeof(screenline_t)); + memcpy(screen0, big_picture, t_lines * sizeof(screenline_t)); + getyx(&y, &x); + my_newfd = i_newfd; + i_newfd = 0; + my_write2(); + memcpy(big_picture, screen0, t_lines * sizeof(screenline_t)); + i_newfd = my_newfd; + move(y, x); + free(screen0); + redoscr(); + continue; + } + else if(!WATERMODE(WATER_OFO)) + { if( watermode > 0 ){ watermode = (watermode + water_which->count) % water_which->count + 1; @@ -255,7 +273,7 @@ int igetch() { t_display_new(); continue; } - else if(currutmp->msgs[0].pid) { + else if(watermode==-1 && currutmp->msgs[0].pid) { /* 第一次按 Ctrl-R (必須先被丟過水球) */ screenline_t *screen0; int y, x, my_newfd; @@ -279,27 +297,7 @@ int igetch() { redoscr(); continue; } - else - return ch; - } - - if( currutmp->msgs[0].pid && - WATERMODE(WATER_OFO) && wmofo == -1 ){ - int y, x, my_newfd; - screenline_t *screen0 = calloc(t_lines, sizeof(screenline_t)); - memcpy(screen0, big_picture, t_lines * sizeof(screenline_t)); - getyx(&y, &x); - my_newfd = i_newfd; - i_newfd = 0; - my_write2(); - memcpy(big_picture, screen0, t_lines * sizeof(screenline_t)); - i_newfd = my_newfd; - move(y, x); - free(screen0); - redoscr(); - continue; - } - + } return ch; case '\n': /* Ptt把 \n拿掉 */ continue; -- cgit v1.2.3