summaryrefslogtreecommitdiffstats
path: root/mbbsd/stuff.c
diff options
context:
space:
mode:
authorscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-05-24 08:31:48 +0800
committerscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-05-24 08:31:48 +0800
commit0d1688520003011abbcb9c37074f2c2dce88f72a (patch)
tree2c02e8a6fdcef4191ef2ae45c10fb6ce63bf2172 /mbbsd/stuff.c
parent919bd1cabc73f19279bd94f8bbae1b26bee84e87 (diff)
downloadpttbbs-0d1688520003011abbcb9c37074f2c2dce88f72a.tar
pttbbs-0d1688520003011abbcb9c37074f2c2dce88f72a.tar.gz
pttbbs-0d1688520003011abbcb9c37074f2c2dce88f72a.tar.bz2
pttbbs-0d1688520003011abbcb9c37074f2c2dce88f72a.tar.lz
pttbbs-0d1688520003011abbcb9c37074f2c2dce88f72a.tar.xz
pttbbs-0d1688520003011abbcb9c37074f2c2dce88f72a.tar.zst
pttbbs-0d1688520003011abbcb9c37074f2c2dce88f72a.zip
Merge from scw.angel.
*NOTE* Before running this revision, please read PttCurrent board at telnet://ptt.cc or http://scwg.wiki.ptt.cc/-Angel git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2014 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/stuff.c')
-rw-r--r--mbbsd/stuff.c40
1 files changed, 36 insertions, 4 deletions
diff --git a/mbbsd/stuff.c b/mbbsd/stuff.c
index f59d8119..9e7e1c5a 100644
--- a/mbbsd/stuff.c
+++ b/mbbsd/stuff.c
@@ -424,7 +424,33 @@ vmsg_lines(const int lines, const char msg[])
return ch;
}
-char getans(const char *fmt,...)
+#ifdef PLAY_ANGEL
+void
+pressanykey_or_callangel(){
+ int ch;
+
+ outmsg("\033[37;45;1m \033[33m(h)\033[37m 呼叫小天使 "
+ "● 請按 \033[33m(Space/Return)\033[37m 繼續 ●"
+ " \033[33m(^T)\033[37m 存暫存檔 \033[m");
+ do {
+ ch = igetch();
+
+ if (ch == Ctrl('T')) {
+ capture_screen();
+ break;
+ }else if (ch == 'h' || ch == 'H'){
+ CallAngel();
+ break;
+ }
+ } while ((ch != ' ') && (ch != KEY_LEFT) && (ch != '\r') && (ch != '\n'));
+ move(b_lines, 0);
+ clrtoeol();
+ refresh();
+}
+#endif
+
+char
+getans(const char *fmt,...)
{
char msg[256];
char ans[5];
@@ -597,10 +623,12 @@ log_user(const char *fmt, ...)
"%s: %s %s", cuser.userid, msg, Cdate(&now));
}
-int log_file(char *fn, int flag, const char *fmt,...)
+int
+log_file(char *fn, int flag, const char *fmt,...)
{
- int fd;
- char msg[256], *realmsg;
+ int fd;
+ char msg[256];
+ const char *realmsg;
if( !(flag & LOG_VF) ){
realmsg = fmt;
}
@@ -638,7 +666,11 @@ show_help(char *helptext[])
else
prints(" %s\n", str);
}
+#ifdef PLAY_ANGEL
+ pressanykey_or_callangel();
+#else
pressanykey();
+#endif
}
#endif // _BBS_UTIL_C_