summaryrefslogtreecommitdiffstats
path: root/mbbsd/stuff.c
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-04-23 23:03:54 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-04-23 23:03:54 +0800
commitb640fe2c00e591888ecc1ca594e5e51336c3bf44 (patch)
tree58fbced83d4f120681a1a1e64f5c5b1050a30038 /mbbsd/stuff.c
parent432105a135d72c756520d12ece397d52091585ba (diff)
downloadpttbbs-b640fe2c00e591888ecc1ca594e5e51336c3bf44.tar
pttbbs-b640fe2c00e591888ecc1ca594e5e51336c3bf44.tar.gz
pttbbs-b640fe2c00e591888ecc1ca594e5e51336c3bf44.tar.bz2
pttbbs-b640fe2c00e591888ecc1ca594e5e51336c3bf44.tar.lz
pttbbs-b640fe2c00e591888ecc1ca594e5e51336c3bf44.tar.xz
pttbbs-b640fe2c00e591888ecc1ca594e5e51336c3bf44.tar.zst
pttbbs-b640fe2c00e591888ecc1ca594e5e51336c3bf44.zip
remove useless functions
integrate similiar functions git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1827 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/stuff.c')
-rw-r--r--mbbsd/stuff.c71
1 files changed, 34 insertions, 37 deletions
diff --git a/mbbsd/stuff.c b/mbbsd/stuff.c
index e088b116..ba29c84e 100644
--- a/mbbsd/stuff.c
+++ b/mbbsd/stuff.c
@@ -401,47 +401,19 @@ capture_screen()
}
}
-void
-pressanykey()
-{
- int ch;
-
- outmsg("\033[37;45;1m "
- "● 請按 \033[33m(Space/Return)\033[37m 繼續 ●"
- " \033[33m(^T)\033[37m 存暫存檔 \033[m");
- do {
- ch = igetkey();
-
- if (ch == Ctrl('T')) {
- capture_screen();
- break;
- }
- } while ((ch != ' ') && (ch != KEY_LEFT) && (ch != '\r') && (ch != '\n'));
- move(b_lines, 0);
- clrtoeol();
- refresh();
-}
-
int
-vmsg(const char *fmt,...)
+vmsg_lines(const int lines, const char msg[])
{
- va_list ap;
- char msg[80] = {0};
int ch;
- va_start(ap, fmt);
- vsnprintf(msg, sizeof(msg), fmt, ap);
- va_end(ap);
-
- move(b_lines, 0);
+ move(lines, 0);
clrtoeol();
- if (*msg)
- prints("\033[1;36;44m ◆ %-55.54s \033[33;46m \033[200m\033[1431m\033[506m[請按任意鍵繼續]\033[201m \033[m", msg);
+ if (msg)
+ outs(msg);
else
- outs("\033[46;1m \033[37m"
- "\033[200m\033[1431m\033[506m□ 請按 \033[33m(Space/Return)\033[37m 繼續 □\033[201m"
- " \033[m");
+ outs("\033[46;1m \033[37m"
+ "\033[200m\033[1431m\033[506m□ 請按 \033[33m(Space/Return)\033[37m 繼續 □\033[201m (^T) 收到暫存檔 \033[m");
do {
ch = igetkey();
@@ -453,12 +425,37 @@ vmsg(const char *fmt,...)
} while ((ch != ' ') && (ch != KEY_LEFT) && (ch != '\r') && (ch != '\n'));
- move(b_lines, 0);
+ move(lines, 0);
clrtoeol();
- refresh();
return ch;
}
+int
+getans(const char *fmt,...)
+{
+ char msg[80] = {0};
+ va_list ap;
+ va_start(ap, fmt);
+ vsnprintf(msg, sizeof(msg), fmt, ap);
+ va_end(ap);
+ return vmsg_lines(b_lines, msg);
+}
+
+int
+vmsg(const char *fmt,...)
+{
+ char msg[80] = "\033[1;36;44m ◆ ", i;
+ va_list ap;
+ va_start(ap, fmt);
+ vsnprintf(msg+14, 55, fmt, ap);
+ va_end(ap);
+ for(i=69; i>0 && *(msg+i); i--)
+ *(msg+i) = ' ';
+ strcat(msg+69,"\033[33;46m \033[200m\033[1431m\033[506m[請按任意鍵繼續]\033[201m \033[m");
+ return vmsg_lines(b_lines, msg);
+}
+
+
void
bell()
{
@@ -548,7 +545,7 @@ cursor_key(int row, int column)
int ch;
cursor_show(row, column);
- ch = egetch();
+ ch = igetch();
move(row, column);
outs(STR_UNCUR);
return ch;