diff options
-rw-r--r-- | mbbsd/bbs.c | 31 | ||||
-rw-r--r-- | mbbsd/mail.c | 24 | ||||
-rw-r--r-- | mbbsd/read.c | 13 | ||||
-rw-r--r-- | mbbsd/screen.c | 2 | ||||
-rw-r--r-- | mbbsd/voteboard.c | 4 |
5 files changed, 35 insertions, 39 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index 2eb97924..b783eb6b 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -304,10 +304,10 @@ do_select(int ent, fileheader_t * fhdr, char *direct) completeboard_permission, completeboard_getname); if (bname[0] == '\0' || !(i = getbnum(bname))) - return FULLUPDATE; + return TITLE_REDRAW; bh = getbcache(i); if (!HasPerm(bh)) - return FULLUPDATE; + return TITLE_REDRAW; strlcpy(bname, bh->brdname, sizeof(bname)); currbid = i; @@ -316,7 +316,7 @@ do_select(int ent, fileheader_t * fhdr, char *direct) move(2, 0); clrtoeol(); outs(err_bid); - return FULLUPDATE; + return TITLE_REDRAW; } setutmpbid(currbid); @@ -530,20 +530,18 @@ do_general(int isbid) && !((cuser->uflag2 & FOREIGN) && strcmp(bp->brdname, "PttForeign") == 0) #endif ) { - move(5, 10); - outs("對不起,您目前無法在此發表文章!"); + outmsg("對不起,您目前無法在此發表文章!"); pressanykey(); - return FULLUPDATE; + return READ_REDRAW; } #ifdef NO_WATER_POST #ifndef DEBUG /* why we need this in DEBUG mode? */ /* 三分鐘內最多發表五篇文章 */ if (currutmp->lastact - last_post_time < 60 * 3) { if (water_counts >= 5) { - move(5, 10); - outs("對不起,您的文章太水囉,待會再post吧!小秘訣:可用'X'推薦文章"); + outmsg("對不起,您的文章太水囉,待會再post吧!小秘訣:可用'X'推薦文章"); pressanykey(); - return FULLUPDATE; + return READ_REDRAW; } } else { last_post_time = currutmp->lastact; @@ -1024,8 +1022,6 @@ cross_post(int ent, fileheader_t * fhdr, char *direct) } move(2, 0); clrtoeol(); - move(3, 0); - clrtoeol(); move(1, 0); bp = getbcache(currbid); if (bp && (bp->brdattr & BRD_VOTEBOARD) ) @@ -1945,6 +1941,17 @@ del_post(int ent, fileheader_t * fhdr, char *direct) return FULLUPDATE; } +static int // Ptt: 修石頭文 +show_filename(int ent, fileheader_t * fhdr, char *direct) +{ + if(!HAS_PERM(PERM_SYSOP)) return DONOTHING; + + move(b_lines - 1, 0); + prints("檔案名稱: %s ", fhdr->filename); + pressanykey(); + return PART_REDRAW; +} + static int view_postmoney(int ent, fileheader_t * fhdr, char *direct) { @@ -2502,7 +2509,7 @@ change_counting(int ent, fileheader_t * fhdr, char *direct) /* ----------------------------------------------------- */ /* onekey_size was defined in ../include/pttstruct.h, as ((int)'z') */ onekey_t read_comms[] = { - NULL, // Ctrl('A') 1 + show_filename, // Ctrl('A') NULL, // Ctrl('B') NULL, // Ctrl('C') NULL, // Ctrl('D') diff --git a/mbbsd/mail.c b/mbbsd/mail.c index a57e8db1..60f52e2b 100644 --- a/mbbsd/mail.c +++ b/mbbsd/mail.c @@ -851,12 +851,6 @@ maildoent(int num, fileheader_t * ent) ent->date, ent->owner, color, mark, title); } -static int -m_idle(int ent, fileheader_t * fhdr, char *direct) -{ - t_idle(); - return FULLUPDATE; -} static int mail_del(int ent, fileheader_t * fhdr, char *direct) @@ -881,7 +875,7 @@ mail_del(int ent, fileheader_t * fhdr, char *direct) return DIRCHANGED; } } - return FULLUPDATE; + return TITLE_REDRAW; } static int @@ -1046,7 +1040,7 @@ mail_nooutmail(int ent, fileheader_t * fhdr, char *direct) { cuser->userlevel ^= PERM_NOOUTMAIL; passwd_update(usernum, cuser); - return FULLUPDATE; + return TITLE_REDRAW; } @@ -1111,8 +1105,6 @@ mail_cross_post(int ent, fileheader_t * fhdr, char *direct) move(2, 0); clrtoeol(); - move(3, 0); - clrtoeol(); move(1, 0); generalnamecomplete("轉錄本文章於看板:", xboard, sizeof(xboard), SHM->Bnumber, @@ -1120,7 +1112,7 @@ mail_cross_post(int ent, fileheader_t * fhdr, char *direct) completeboard_permission, completeboard_getname); if (*xboard == '\0' || !haspostperm(xboard)) - return FULLUPDATE; + return TITLE_REDRAW; ent = 1; if (HAS_PERM(PERM_SYSOP) || !strcmp(fhdr->owner, cuser->userid)) { @@ -1186,7 +1178,7 @@ mail_cross_post(int ent, fileheader_t * fhdr, char *direct) if (!xfile.filemode) outgo_post(&xfile, xboard); cuser->numposts++; - outs("文章轉錄完成"); + outmsg("文章轉錄完成"); pressanykey(); currmode = currmode0; } @@ -1360,7 +1352,7 @@ static onekey_t mail_comms[] = { NULL, // Ctrl('F') built_mail_index, // Ctrl('G') NULL, // Ctrl('H') - m_idle, // Ctrl('I') KEY_TAB 9 + NULL, // Ctrl('I') NULL, // Ctrl('J') NULL, // Ctrl('K') NULL, // Ctrl('L') @@ -1613,14 +1605,14 @@ doforward(char *direct, fileheader_t * fh, int mode) strlcpy(address, cuser->email, sizeof(address)); if( mode == 'U' ){ - move(b_lines - 2, 0); + move(b_lines, 0); prints("將進行 uuencode 。若您不清楚什麼是 uuencode 請改用 F轉寄。"); } if (address[0]) { snprintf(genbuf, sizeof(genbuf), "確定轉寄給 [%s] 嗎(Y/N/Q)?[Y] ", address); - getdata(b_lines - 1, 0, genbuf, fname, 3, LCECHO); + getdata(b_lines, 0, genbuf, fname, 3, LCECHO); if (fname[0] == 'q') { outmsg("取消轉寄"); @@ -1649,7 +1641,7 @@ doforward(char *direct, fileheader_t * fh, int mode) snprintf(fname, sizeof(fname), "正轉寄給 %s, 請稍候...", address); outmsg(fname); - move(b_lines - 1, 0); + move(b_lines, 0); refresh(); /* 追蹤使用者 */ diff --git a/mbbsd/read.c b/mbbsd/read.c index 6330e68b..f6b64313 100644 --- a/mbbsd/read.c +++ b/mbbsd/read.c @@ -170,7 +170,7 @@ TagPruner(int bid) } if (TagNum && ((currstat != READING) || (currmode & MODE_BOARD))) { if (tolower(getans("刪除所有標記[N]?")) != 'y') - return FULLUPDATE; + return READ_REDRAW; delete_range(currdirect, 0, 0); TagNum = 0; if (bid) @@ -613,12 +613,6 @@ i_read_key(onekey_t * rcmdlist, keeploc_t * locmem, int ch, int bid) case Ctrl('L'): redoscr(); break; - case KEY_ESC: - if (KEY_ESC_arg == 'i') { - t_idle(); - return FULLUPDATE; - } - break; case Ctrl('H'): if (select_read(locmem, RS_NEWPOST)) return NEWDIRECT; @@ -723,7 +717,7 @@ i_read_key(onekey_t * rcmdlist, keeploc_t * locmem, int ch, int bid) mail_forward(&headers[locmem->crs_ln - locmem->top_ln], currdirect, ch /* == 'U' */ ); /* by CharlieL */ - return FULLUPDATE; + return READ_REDRAW; } break; case Ctrl('Q'): @@ -923,6 +917,9 @@ i_read(int cmdmode, char *direct, void (*dotitle) (), void (*doentry) (), onekey "\033[44m 私人收藏 \033[30;47m 繼續? \033[m" : curredit & EDIT_MAIL ? msg_mailer : MSG_POSTER); break; + case TITLE_REDRAW: + (*dotitle) (); + break; case READ_PREV: case READ_NEXT: case RELATE_PREV: diff --git a/mbbsd/screen.c b/mbbsd/screen.c index 825fb3b7..43df3757 100644 --- a/mbbsd/screen.c +++ b/mbbsd/screen.c @@ -429,7 +429,7 @@ outmsg(char *msg) { move(b_lines, 0); clrtoeol(); - outs(msg); + prints(msg); } void diff --git a/mbbsd/voteboard.c b/mbbsd/voteboard.c index 9423218a..5f42571a 100644 --- a/mbbsd/voteboard.c +++ b/mbbsd/voteboard.c @@ -22,7 +22,7 @@ do_voteboardreply(fileheader_t * fhdr) clear(); if (!(currmode & MODE_POST)) { move(5, 10); - outs("對不起,您目前無法在此發表文章!"); + prints("對不起,您目前無法在此發表文章!"); pressanykey(); return; } @@ -159,7 +159,7 @@ do_voteboard(int type) clear(); if (!(currmode & MODE_POST)) { move(5, 10); - outs("對不起,您目前無法在此發表文章!"); + prints("對不起,您目前無法在此發表文章!"); pressanykey(); return FULLUPDATE; } |