summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/admin.c10
-rw-r--r--mbbsd/assess.c2
-rw-r--r--mbbsd/bbs.c8
-rw-r--r--mbbsd/bbslua.c2
-rw-r--r--mbbsd/board.c8
-rw-r--r--mbbsd/cal.c2
-rw-r--r--mbbsd/card.c2
-rw-r--r--mbbsd/chess.c12
-rw-r--r--mbbsd/dark.c34
-rw-r--r--mbbsd/edit.c6
-rw-r--r--mbbsd/friend.c4
-rw-r--r--mbbsd/kaede.c29
-rw-r--r--mbbsd/mail.c18
-rw-r--r--mbbsd/pmore.c2
-rw-r--r--mbbsd/read.c2
-rw-r--r--mbbsd/register.c12
-rw-r--r--mbbsd/talk.c12
-rw-r--r--mbbsd/user.c2
-rw-r--r--mbbsd/visio.c34
-rw-r--r--mbbsd/vote.c4
20 files changed, 103 insertions, 102 deletions
diff --git a/mbbsd/admin.c b/mbbsd/admin.c
index a67d165e..7d1118f3 100644
--- a/mbbsd/admin.c
+++ b/mbbsd/admin.c
@@ -36,7 +36,7 @@ m_user(void)
int id;
char genbuf[200];
- stand_title("使用者設定");
+ vs_hdr("使用者設定");
usercomplete(msg_uid, genbuf);
if (*genbuf) {
move(2, 0);
@@ -706,7 +706,7 @@ m_board(void)
{
char bname[32];
- stand_title("看板設定");
+ vs_hdr("看板設定");
CompleteBoardAndGroup(msg_bid, bname);
if (!*bname)
return 0;
@@ -884,7 +884,7 @@ m_newbrd(int whatclass, int recover)
char ans[4];
char genbuf[200];
- stand_title("建立新板");
+ vs_hdr("建立新板");
memset(&newboard, 0, sizeof(newboard));
newboard.gid = whatclass;
@@ -1035,7 +1035,7 @@ int make_symbolic_link_interactively(int gid)
if (!buf[0])
return -1;
- stand_title("建立看板連結");
+ vs_hdr("建立看板連結");
if (make_symbolic_link(buf, gid) < 0) {
vmsg("看板連結建立失敗");
@@ -1113,7 +1113,7 @@ give_money(void)
return 1;
}
- stand_title("發錢中...");
+ vs_hdr("發錢中...");
if (to_all) {
int i, unum;
for (unum = SHM->number, i = 0; i < unum; i++) {
diff --git a/mbbsd/assess.c b/mbbsd/assess.c
index 25847c13..f7b05bb0 100644
--- a/mbbsd/assess.c
+++ b/mbbsd/assess.c
@@ -77,7 +77,7 @@ u_fixgoodpost(void)
int cgps = 0;
clear();
- stand_title("自動優文修正程式");
+ vs_hdr("自動優文修正程式");
outs("開始修正優文之前,有些功\課要麻煩您先查好:\n\n"
"請先找到你所有的優文文章的看板與" AID_DISPLAYNAME "\n"
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index 9c165bc0..ec4a3aa1 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -176,7 +176,7 @@ save_violatelaw(void)
setutmpmode(VIOLATELAW);
clear();
- stand_title("繳罰單中心");
+ vs_hdr("繳罰單中心");
if (!(cuser.userlevel & PERM_VIOLATELAW)) {
vmsg("你沒有被開罰單~~");
@@ -194,7 +194,7 @@ save_violatelaw(void)
ANSI_COLOR(1;31) "這是你第 %d 次違反本站法規"
"必須繳出 %d $Ptt ,你只有 %d 元, 錢不夠啦!!" ANSI_RESET,
(int)cuser.vl_count, (int)cuser.vl_count * 1000, cuser.money);
- mouts(22, 0, buf);
+ mvouts(22, 0, buf);
pressanykey();
return 0;
}
@@ -3142,7 +3142,7 @@ del_range(int ent, const fileheader_t *fhdr, const char *direct)
if (ret < 0)
{
clear();
- stand_title("刪除失敗");
+ vs_hdr("刪除失敗");
outs("\n\n無法刪除檔案。可能是同時有其它人也在進行刪除。\n\n"
"若此錯誤持續發生,請等約一小時後再重試。\n\n"
"若到時仍無法刪除,請到 " BN_SYSOP " 看板報告。\n");
@@ -3597,7 +3597,7 @@ b_note_edit_bname(int bid)
// alert user our new b_note policy.
char msg[STRLEN];
clear();
- stand_title("進板畫面顯示設定");
+ vs_hdr("進板畫面顯示設定");
outs("\n"
"\t請決定是否要在使用者首次進入看板時顯示剛儲存的進板畫面。\n\n"
"\t請注意若使用者連續重複進出同一個看板時,進板畫面只會顯示一次。\n"
diff --git a/mbbsd/bbslua.c b/mbbsd/bbslua.c
index d1dd5360..2900e17c 100644
--- a/mbbsd/bbslua.c
+++ b/mbbsd/bbslua.c
@@ -597,7 +597,7 @@ bl_title(lua_State* L)
if (s == NULL)
return 0;
- stand_title(s);
+ vs_hdr(s);
return 0;
}
diff --git a/mbbsd/board.c b/mbbsd/board.c
index 936bd642..8b39918c 100644
--- a/mbbsd/board.c
+++ b/mbbsd/board.c
@@ -192,7 +192,7 @@ b_post_note(void)
char buf[PATHLEN], yn[3];
// if(!(currmode & MODE_BOARD)) return DONOTHING;
- stand_title("自訂注意事項");
+ vs_hdr("自訂注意事項");
setbfile(buf, currboard, FN_POST_NOTE);
move(b_lines-2, 0); clrtobot();
@@ -230,7 +230,7 @@ b_posttype()
assert(0<=currbid-1 && currbid-1<MAX_BOARD);
bp = getbcache(currbid);
- stand_title("設定文章類別");
+ vs_hdr("設定文章類別");
move(2,0);
clrtobot();
@@ -1146,11 +1146,11 @@ show_brdlist(int head, int clsflag, int newflag)
if (!HasFavEditPerm())
{
// TODO actually we cannot use 's' (for PTT)...
- mouts(3, 10,
+ mvouts(3, 10,
"--- 註冊的使用者才能新增看板喔 (可按 s 手動選取) ---");
} else {
// normal user. tell him what to do.
- mouts(3, 10,
+ mvouts(3, 10,
"--- 空目錄,請按 a 新增或用 y 列出全部看板後按 z 增刪 ---");
}
return;
diff --git a/mbbsd/cal.c b/mbbsd/cal.c
index d37f1100..c593d82d 100644
--- a/mbbsd/cal.c
+++ b/mbbsd/cal.c
@@ -429,7 +429,7 @@ give_money_ui(const char *userid)
// TODO prevent macros, we should check something here,
// like user pw/id/...
clear();
- stand_title("給予金錢");
+ vs_hdr("給予金錢");
if (!userid || !*userid)
usercomplete("這位幸運兒的id: ", id);
else {
diff --git a/mbbsd/card.c b/mbbsd/card.c
index 5f5a1530..0c9a3a9a 100644
--- a/mbbsd/card.c
+++ b/mbbsd/card.c
@@ -190,7 +190,7 @@ static void
card_start(char name[])
{
clear();
- stand_title(name);
+ vs_hdr(name);
move(1, 0);
outs(" " ANSI_COLOR(1;33;41) " 電 腦 " ANSI_RESET);
move(10, 0);
diff --git a/mbbsd/chess.c b/mbbsd/chess.c
index 081b812f..adf8d08c 100644
--- a/mbbsd/chess.c
+++ b/mbbsd/chess.c
@@ -170,7 +170,7 @@ ChessDrawHelpLine(const ChessInfo* info)
ANSI_RESET,
};
- mouts(b_lines, 0, HelpStr[info->mode]);
+ mvouts(b_lines, 0, HelpStr[info->mode]);
info->actions->drawline(info, b_lines);
}
@@ -1149,7 +1149,7 @@ ChessSearchUser(int sig, const char* title)
char uident[16];
userinfo_t *uin;
- stand_title(title);
+ vs_hdr(title);
CompleteOnlineUser(msg_uid, uident);
if (uident[0] == '\0')
return NULL;
@@ -1175,7 +1175,7 @@ ChessStartGame(char func_char, int sig, const char* title)
strlcpy(uin->mateid, currutmp->userid, sizeof(uin->mateid));
strlcpy(currutmp->mateid, uin->userid, sizeof(currutmp->mateid));
- stand_title(title);
+ vs_hdr(title);
buf[0] = 0;
getdata(2, 0, "使用傳統模式 (T), 限時限步模式 (L) 或是 讀秒模式 (C)? (T/l/c)",
buf, 3, DOECHO);
@@ -1621,9 +1621,9 @@ ChessShowRequest(void)
{
/* XXX */
if (!_current_time_limit)
- mouts(10, 5, "使用傳統計時方式, 單步限時五分鐘");
+ mvouts(10, 5, "使用傳統計時方式, 單步限時五分鐘");
else if (_current_time_limit->time_mode == CHESS_TIMEMODE_MULTIHAND) {
- mouts(10, 5, "使用限時限步規則:");
+ mvouts(10, 5, "使用限時限步規則:");
move(12, 8);
prints("局時 (自由時間): %2d 分 %02d 秒",
_current_time_limit->free_time / 60,
@@ -1634,7 +1634,7 @@ ChessShowRequest(void)
_current_time_limit->limit_time % 60,
_current_time_limit->limit_hand);
} else if (_current_time_limit->time_mode == CHESS_TIMEMODE_COUNTING) {
- mouts(10, 5, "使用讀秒規則:");
+ mvouts(10, 5, "使用讀秒規則:");
move(12, 8);
prints("局時 (自由時間): %2d 分 %02d 秒",
_current_time_limit->free_time / 60,
diff --git a/mbbsd/dark.c b/mbbsd/dark.c
index f19184dc..5ca86ae5 100644
--- a/mbbsd/dark.c
+++ b/mbbsd/dark.c
@@ -379,11 +379,11 @@ main_dark(int fd, userinfo_t * uin)
if (currutmp->turn) {
brd_rand(&dd);
send(fd, &dd.brd, sizeof(dd.brd), 0);
- mouts(21, 0, " " ANSI_COLOR(1;37) ANSI_COLOR(1;33) "◆" ANSI_COLOR(1;37) "你是先手" ANSI_RESET);
- mouts(22, 0, " " ANSI_COLOR(1;33) "◆" ANSI_COLOR(5;35) "輪到你下了" ANSI_RESET);
+ mvouts(21, 0, " " ANSI_COLOR(1;37) ANSI_COLOR(1;33) "◆" ANSI_COLOR(1;37) "你是先手" ANSI_RESET);
+ mvouts(22, 0, " " ANSI_COLOR(1;33) "◆" ANSI_COLOR(5;35) "輪到你下了" ANSI_RESET);
} else {
recv(fd, &dd.brd, sizeof(dd.brd), 0);
- mouts(21, 0, " " ANSI_COLOR(1;33) "◆" ANSI_COLOR(1;37) "你是後手" ANSI_RESET);
+ mvouts(21, 0, " " ANSI_COLOR(1;33) "◆" ANSI_COLOR(1;37) "你是後手" ANSI_RESET);
}
move(12, 3);
prints("%s[0勝0敗]" ANSI_COLOR(5;31) "vs" ANSI_COLOR(1;37) "." ANSI_RESET "%s[0勝0敗]", currutmp->userid, currutmp->mateid);
@@ -421,20 +421,20 @@ main_dark(int fd, userinfo_t * uin)
break;
}
if (dd.curr.end == -3)
- mouts(23, 30, ANSI_COLOR(33) "要求合棋" ANSI_RESET);
+ mvouts(23, 30, ANSI_COLOR(33) "要求合棋" ANSI_RESET);
else if (dd.curr.end == -4)
- mouts(23, 30, ANSI_COLOR(33) "要求換邊" ANSI_RESET);
+ mvouts(23, 30, ANSI_COLOR(33) "要求換邊" ANSI_RESET);
else if (dd.curr.end == -5)
- mouts(23, 30, ANSI_COLOR(33) "要求連吃" ANSI_RESET);
+ mvouts(23, 30, ANSI_COLOR(33) "要求連吃" ANSI_RESET);
else
- mouts(23, 30, "");
+ mvouts(23, 30, "");
recv(fd, &dd.brd, sizeof(dd.brd), 0);
dd.my = dd.curr.y;
dd.mx = dd.curr.x;
redraw(&dd);
if (dd.curr.end)
- mouts(22, 0, " " ANSI_COLOR(1;33) "◆" ANSI_COLOR(5;35) "輪到你下了" ANSI_RESET);
+ mvouts(22, 0, " " ANSI_COLOR(1;33) "◆" ANSI_COLOR(5;35) "輪到你下了" ANSI_RESET);
move(cury[dd.my], curx[dd.mx]);
} else {
if (currutmp->turn == 'p') {
@@ -443,7 +443,7 @@ main_dark(int fd, userinfo_t * uin)
currutmp->turn = 'e';
break;
} else {
- mouts(23, 30, "");
+ mvouts(23, 30, "");
*buf = 0;
currutmp->turn = (uin->turn) ? 0 : 1;
}
@@ -451,17 +451,17 @@ main_dark(int fd, userinfo_t * uin)
if (ch == 'y') {
currutmp->color = (currutmp->color == '1') ? '0' : '1';
uin->color = (uin->color == '1') ? '0' : '1';
- mouts(21, 0, (currutmp->color == '1') ? " " ANSI_COLOR(1;33) "◆" ANSI_COLOR(1;31) "你持紅色棋" ANSI_RESET : " " ANSI_COLOR(1;33) "◆" ANSI_COLOR(1;36) "你持黑色棋" ANSI_RESET);
+ mvouts(21, 0, (currutmp->color == '1') ? " " ANSI_COLOR(1;33) "◆" ANSI_COLOR(1;31) "你持紅色棋" ANSI_RESET : " " ANSI_COLOR(1;33) "◆" ANSI_COLOR(1;36) "你持黑色棋" ANSI_RESET);
} else {
- mouts(23, 30, "");
+ mvouts(23, 30, "");
currutmp->turn = (uin->turn) ? 0 : 1;
}
} else if (currutmp->turn == 'g') {
if (ch == 'y') {
dd.cont = 1;
- mouts(21, 0, " " ANSI_COLOR(1;33) "◆" ANSI_COLOR(1;31) "你持紅色棋" ANSI_RESET " 可連吃");
+ mvouts(21, 0, " " ANSI_COLOR(1;33) "◆" ANSI_COLOR(1;31) "你持紅色棋" ANSI_RESET " 可連吃");
} else {
- mouts(23, 30, "");
+ mvouts(23, 30, "");
currutmp->turn = (uin->turn) ? 0 : 1;
}
}
@@ -470,7 +470,7 @@ main_dark(int fd, userinfo_t * uin)
if (uin->turn == 'g') {
dd.cont = 1;
uin->turn = (currutmp->turn) ? 0 : 1;
- mouts(21, 10, "可連吃");
+ mvouts(21, 10, "可連吃");
}
end = playing(&dd, fd, currutmp->color - '0', ch, &go_on, uin);
@@ -503,12 +503,12 @@ main_dark(int fd, userinfo_t * uin)
continue;
}
if (!i && currutmp->color == '1') {
- mouts(21, 0, " " ANSI_COLOR(1;33) "◆" ANSI_COLOR(1;31) "你持紅色棋" ANSI_RESET);
+ mvouts(21, 0, " " ANSI_COLOR(1;33) "◆" ANSI_COLOR(1;31) "你持紅色棋" ANSI_RESET);
i++;
move(cury[dd.my], curx[dd.mx]);
}
if (!i && currutmp->color == '0') {
- mouts(21, 0, " " ANSI_COLOR(1;33) "◆" ANSI_COLOR(1;36) "你持黑色棋" ANSI_RESET);
+ mvouts(21, 0, " " ANSI_COLOR(1;33) "◆" ANSI_COLOR(1;36) "你持黑色棋" ANSI_RESET);
i++;
move(cury[dd.my], curx[dd.mx]);
}
@@ -550,7 +550,7 @@ main_dark(int fd, userinfo_t * uin)
}
break;
case -3:
- mouts(22, 0, ANSI_COLOR(1;31) "合棋唷!! 下次在分高下吧 ^_^" ANSI_RESET);
+ mvouts(22, 0, ANSI_COLOR(1;31) "合棋唷!! 下次在分高下吧 ^_^" ANSI_RESET);
break;
default:
add_io(0, 0);
diff --git a/mbbsd/edit.c b/mbbsd/edit.c
index f49af1e2..78bad60c 100644
--- a/mbbsd/edit.c
+++ b/mbbsd/edit.c
@@ -1226,7 +1226,7 @@ restore_backup(void)
setuserfile(bakfile, fp_bak);
if (dashf(bakfile)) {
- stand_title("編輯器自動復原");
+ vs_hdr("編輯器自動復原");
getdata(1, 0, "您有一篇文章尚未完成,(S)寫入暫存檔 (Q)算了?[S] ",
buf, 4, LCECHO);
if (buf[0] != 'q') {
@@ -1678,7 +1678,7 @@ write_file(const char *fpath, int saveheader, int *islocal, char *mytitle, int u
char ans[TTLEN], *msg;
int aborted = 0, line = 0, checksum[3], sum = 0, po = 1;
- stand_title("檔案處理");
+ vs_hdr("檔案處理");
move(1,0);
#ifdef EDIT_UPLOAD_ALLOWALL
@@ -3170,7 +3170,7 @@ upload_file(void)
clear();
block_cancel();
- stand_title("上傳文字檔案");
+ vs_hdr("上傳文字檔案");
move(3,0);
outs("利用本服務您可以上傳較大的文字檔 (但不計入稿費)。\n"
"\n"
diff --git a/mbbsd/friend.c b/mbbsd/friend.c
index 4f7a2987..f5393989 100644
--- a/mbbsd/friend.c
+++ b/mbbsd/friend.c
@@ -386,7 +386,7 @@ friend_edit(int type)
}
dirty = 0;
while (1) {
- stand_title(friend_list[type]);
+ vs_hdr(friend_list[type]);
/* TODO move (0, 40) just won't really work as it hints.
* The ANSI secapes will change x coordinate. */
move(0, 40);
@@ -533,7 +533,7 @@ t_fix_aloha()
char fn[PATHLEN] = "";
clear();
- stand_title("修正上站通知");
+ vs_hdr("修正上站通知");
outs("這是用來修正某些使用者遇到錯誤的上站通知的問題。\n"
ANSI_COLOR(1) "如果你沒遇到此類問題可直接離開。" ANSI_RESET "\n\n"
diff --git a/mbbsd/kaede.c b/mbbsd/kaede.c
index c3a8f797..47e6439a 100644
--- a/mbbsd/kaede.c
+++ b/mbbsd/kaede.c
@@ -72,15 +72,6 @@ Ptt_prints(char *str, size_t size, int mode)
return str;
}
-// utility from screen.c
-void
-outs_n(const char *str, int n)
-{
- while (*str && n--) {
- outc(*str++);
- }
-}
-
// XXX left-right (for large term)
// TODO someday please add ANSI detection version
void
@@ -138,24 +129,4 @@ outmsg(const char *msg)
outs(msg);
}
-void
-prints(const char *fmt,...)
-{
- va_list args;
- char buff[1024];
-
- va_start(args, fmt);
- vsnprintf(buff, sizeof(buff), fmt, args);
- va_end(args);
- outs(buff);
-}
-
-void
-mouts(int y, int x, const char *str)
-{
- move(y, x);
- clrtoeol();
- outs(str);
-}
-
// vim:ts=4:expandtab
diff --git a/mbbsd/mail.c b/mbbsd/mail.c
index b82c5070..6cde69f7 100644
--- a/mbbsd/mail.c
+++ b/mbbsd/mail.c
@@ -90,7 +90,7 @@ built_mail_index(void)
snprintf(genbuf, sizeof(genbuf),
BBSHOME "/bin/buildir " BBSHOME "/home/%c/%s > /dev/null",
cuser.userid[0], cuser.userid);
- mouts(b_lines - 1, 0, ANSI_COLOR(1;31) "已經處理完畢!! 諸多不便 敬請原諒~" ANSI_RESET);
+ mvouts(b_lines - 1, 0, ANSI_COLOR(1;31) "已經處理完畢!! 諸多不便 敬請原諒~" ANSI_RESET);
system(genbuf);
pressanykey();
return 0;
@@ -482,7 +482,7 @@ m_send(void)
{
char uident[40];
- stand_title("且聽風的話");
+ vs_hdr("且聽風的話");
usercomplete(msg_uid, uident);
showplans(uident);
if (uident[0])
@@ -498,7 +498,7 @@ multi_list(int *reciper)
char genbuf[200];
while (1) {
- stand_title("群組寄信名單");
+ vs_hdr("群組寄信名單");
ShowNameList(3, 0, msg_cc);
move(1, 0);
outs("(I)引入好友 (O)引入上線通知 (0-9)引入其他特別名單");
@@ -698,7 +698,7 @@ multi_reply(int ent, fileheader_t * fhdr, const char *direct)
if (!(fhdr->filemode & FILE_MULTI))
return mail_reply(ent, fhdr, direct);
- stand_title("群組回信");
+ vs_hdr("群組回信");
strlcpy(quote_user, fhdr->owner, sizeof(quote_user));
setuserfile(quote_file, fhdr->filename);
if (!dashf(quote_file))
@@ -715,7 +715,7 @@ multi_reply(int ent, fileheader_t * fhdr, const char *direct)
int
mail_list(void)
{
- stand_title("群組作業");
+ vs_hdr("群組作業");
multi_send(NULL);
return 0;
}
@@ -730,7 +730,7 @@ mail_all(void)
int i, unum;
char *userid;
- stand_title("給所有使用者的系統通告");
+ vs_hdr("給所有使用者的系統通告");
setutmpmode(SMAIL);
getdata(2, 0, "主題:", fpath, sizeof(fpath), DOECHO);
snprintf(save_title, sizeof(save_title),
@@ -757,7 +757,7 @@ mail_all(void)
curredit = 0;
setutmpmode(MAILALL);
- stand_title("寄信中...");
+ vs_hdr("寄信中...");
sethomepath(genbuf, cuser.userid);
stampfile(genbuf, &mymail);
@@ -814,7 +814,7 @@ m_forward(int ent, fileheader_t * fhdr, const char *direct)
{
char uid[STRLEN];
- stand_title("轉達信件");
+ vs_hdr("轉達信件");
usercomplete(msg_uid, uid);
if (uid[0] == '\0')
return FULLUPDATE;
@@ -1236,7 +1236,7 @@ mail_reply(int ent, fileheader_t * fhdr, const char *direct)
}
- stand_title("回 信");
+ vs_hdr("回 信");
/* 判斷是 boards 或 mail */
if (curredit & EDIT_MAIL)
diff --git a/mbbsd/pmore.c b/mbbsd/pmore.c
index f4e3b074..7c51315f 100644
--- a/mbbsd/pmore.c
+++ b/mbbsd/pmore.c
@@ -2943,7 +2943,7 @@ MFPROTO void
pmore_Help()
{
clear();
- stand_title("pmore 使用說明");
+ vs_hdr("pmore 使用說明");
vmsg("");
}
*/
diff --git a/mbbsd/read.c b/mbbsd/read.c
index 0e52f8b5..e744322c 100644
--- a/mbbsd/read.c
+++ b/mbbsd/read.c
@@ -1031,7 +1031,7 @@ i_read_key(const onekey_t * rcmdlist, keeploc_t * locmem,
strlcpy(currauthor,
headers[locmem->crs_ln - locmem->top_ln].owner,
sizeof(currauthor));
- stand_title("使用者設定");
+ vs_hdr("使用者設定");
move(1, 0);
if ((id = getuser(headers[locmem->crs_ln - locmem->top_ln].owner, &muser))) {
user_display(&muser, 1);
diff --git a/mbbsd/register.c b/mbbsd/register.c
index d5a6ac88..b5cbe12b 100644
--- a/mbbsd/register.c
+++ b/mbbsd/register.c
@@ -715,7 +715,7 @@ check_birthday(void)
int y, m, d;
clear();
- stand_title("輸入生日");
+ vs_hdr("輸入生日");
move(2,0);
outs("本站為配合實行內容分級制度,請您輸入正確的生日資訊。");
@@ -828,7 +828,7 @@ toregister(char *email, char *phone, char *career, char *mobile)
justify_wait(cuser.userid, phone, career, cuser.realname, cuser.address, mobile);
clear();
- stand_title("認證設定");
+ vs_hdr("認證設定");
if (cuser.userlevel & PERM_NOREGCODE){
strcpy(email, "x");
goto REGFORM2;
@@ -1041,7 +1041,7 @@ u_register(void)
strcmp(cuser.email, "X") != 0)
{
clear();
- stand_title("EMail認證");
+ vs_hdr("EMail認證");
move(2, 0);
prints("請輸入您的認證碼。(由 %s 開頭無空白的十三碼)\n"
@@ -2303,7 +2303,7 @@ regform2_validate_page(int dryrun)
{
// prmopt for debug
clear();
- stand_title("測試模式");
+ vs_hdr("測試模式");
outs("您正在執行測試模式,所以剛審的註冊單並不會生效。\n"
"下面列出的是剛才您審完的結果:\n\n");
@@ -2478,7 +2478,7 @@ m_register(void)
fn = fopen(FN_REQLIST, "r");
assert(fn);
- stand_title("審核使用者註冊資料");
+ vs_hdr("審核使用者註冊資料");
y = 2;
x = wid = 0;
@@ -2505,7 +2505,7 @@ m_register(void)
else if (ans[0] == 'e')
regform2_validate_page(0);
else if (ans[0] == 'u') {
- stand_title("指定審核");
+ vs_hdr("指定審核");
usercomplete(msg_uid, genbuf);
if (genbuf[0])
regform2_validate_single(genbuf);
diff --git a/mbbsd/talk.c b/mbbsd/talk.c
index ac3fc9b0..824b4651 100644
--- a/mbbsd/talk.c
+++ b/mbbsd/talk.c
@@ -1147,7 +1147,7 @@ talk_refreshline(talkwin_t *twin)
move(twin->curln, 0);
clrtoeol();
if (!iscomplete) len--;
- outs_n((char*)line->data, len);
+ outns((char*)line->data, len);
if (!iscomplete) outc('?');
move(twin->curln, twin->curcol);
}
@@ -2815,7 +2815,7 @@ userlist(void)
int id;
userec_t muser;
strlcpy(currauthor, uentp->userid, sizeof(currauthor));
- stand_title("使用者設定");
+ vs_hdr("使用者設定");
move(1, 0);
if ((id = getuser(uentp->userid, &muser)) > 0) {
user_display(&muser, 1);
@@ -2916,7 +2916,7 @@ userlist(void)
if (HasUserPerm(PERM_LOGINOK)) {
char userid[IDLEN + 1];
strlcpy(userid, uentp->userid, sizeof(userid));
- stand_title("寄 信");
+ vs_hdr("寄 信");
prints("[寄信] 收信人:%s", userid);
my_send(userid);
setutmpmode(LUSERS);
@@ -3118,7 +3118,7 @@ t_qchicken(void)
{
char uident[STRLEN];
- stand_title("查詢寵物");
+ vs_hdr("查詢寵物");
usercomplete(msg_uid, uident);
if (uident[0])
chicken_query(uident);
@@ -3130,7 +3130,7 @@ t_query(void)
{
char uident[STRLEN];
- stand_title("查詢網友");
+ vs_hdr("查詢網友");
usercomplete(msg_uid, uident);
if (uident[0])
my_query(uident);
@@ -3148,7 +3148,7 @@ t_talk(void)
* if (count_ulist() <= 1){ outs("目前線上只有您一人,快邀請朋友來光臨【"
* BBSNAME "】吧!"); return XEASY; }
*/
- stand_title("打開話匣子");
+ vs_hdr("打開話匣子");
CompleteOnlineUser(msg_uid, uident);
if (uident[0] == '\0')
return 0;
diff --git a/mbbsd/user.c b/mbbsd/user.c
index f2b4eda8..300fc356 100644
--- a/mbbsd/user.c
+++ b/mbbsd/user.c
@@ -1466,7 +1466,7 @@ int u_detectDBCSAwareEvilClient()
int ret = 0;
clear();
- stand_title("設定自動偵測雙位元字集 (全型中文)");
+ vs_hdr("設定自動偵測雙位元字集 (全型中文)");
move(2, 0);
outs(ANSI_RESET
"* 本站支援自動偵測中文字的移動與編輯,但有些連線程式 (如xxMan)\n"
diff --git a/mbbsd/visio.c b/mbbsd/visio.c
index b4845f59..5f71645f 100644
--- a/mbbsd/visio.c
+++ b/mbbsd/visio.c
@@ -8,8 +8,11 @@
* Author: piaip, 2008
*
* This is not the original visio.c from maple3.
- * We just borrowed its file name and then
- * re-implemented everything :)
+ * We just borrowed its file name and some API prototypes
+ * then re-implemented everything :)
+ * We will try to keep the API behavior similiar (to help porting)
+ * but won't stick to it.
+ * Maybe at the end only 'vmsg' and 'vmsgf' can still be compatible....
*
* m3 visio = (ptt) visio+screen/term.
*
@@ -106,6 +109,33 @@ vcur_restore(VREFCUR o)
// ---- LOW LEVEL API -----------------------------------------------
/**
+ * prints(fmt, ...): 使用 outs/outc 輸出並格式化字串。
+ */
+void
+prints(const char *fmt,...)
+{
+ va_list args;
+ char buff[VBUFLEN];
+
+ va_start(args, fmt);
+ vsnprintf(buff, sizeof(buff), fmt, args);
+ va_end(args);
+
+ outs(buff);
+}
+
+/**
+ * mvouts(y, x, str): = mvaddstr
+ */
+void
+mvouts(int y, int x, const char *str)
+{
+ move(y, x);
+ clrtoeol();
+ outs(str);
+}
+
+/**
* vpad(n, pattern): 填滿 n 個字元 (使用的格式為 pattern)
*
* @param n 要填滿的字元數 (無法填滿時會使用空白填補)
diff --git a/mbbsd/vote.c b/mbbsd/vote.c
index 206924c2..325aa953 100644
--- a/mbbsd/vote.c
+++ b/mbbsd/vote.c
@@ -592,7 +592,7 @@ vote_maintain(const char *bname)
if (inbuf[0] != 'y')
return FULLUPDATE;
- stand_title("舉辦投票");
+ vs_hdr("舉辦投票");
snprintf(vbuf.ballots, sizeof(vbuf.ballots), "%s%d", STR_bv_ballots, x);
snprintf(vbuf.control, sizeof(vbuf.control), "%s%d", STR_bv_control, x);
snprintf(vbuf.desc, sizeof(vbuf.desc), "%s%d", STR_bv_desc, x);
@@ -820,7 +820,7 @@ user_vote_one(vote_buffer_t *vbuf, const char *bname, int ind)
setbfile(buf, bname, vbuf->desc);
more(buf, YEA);
- stand_title("投票箱");
+ vs_hdr("投票箱");
if ((pos = getbnum(bname)) <= 0)
return 0;