From 4c2b88e9c74d936675a4a7a11cb068cab7cbe4f3 Mon Sep 17 00:00:00 2001 From: piaip Date: Thu, 11 Aug 2005 15:33:20 +0000 Subject: remove real escapes (\033) from source better AYT and report struct size in debug mode git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3025 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/go.c | 51 +++++++++++++++++++++++++++++++-------------------- mbbsd/mbbsd.c | 8 +++++++- mbbsd/menu.c | 16 ++++++++++++++++ 3 files changed, 54 insertions(+), 21 deletions(-) (limited to 'mbbsd') diff --git a/mbbsd/go.c b/mbbsd/go.c index f6d87de7..3e69efe4 100644 --- a/mbbsd/go.c +++ b/mbbsd/go.c @@ -628,27 +628,29 @@ void GO_cleantable(void) { move(1, 0); +#define AC ANSI_COLOR(30;43) +#define AR ANSI_RESET outs( " A B C D E F G H J K L M N O P Q R S T\n" - " 19 ¢z¢s¢s¢s¢s¢s¢s¢s¢s¢s¢s¢s¢s¢s¢s¢s¢s¢s¢{ \n" - " 18 ¢u¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢t \n" - " 17 ¢u¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢t \n" - " 16 ¢u¢q¢q¡Ï¢q¢q¢q¢q¢q¡Ï¢q¢q¢q¢q¢q¡Ï¢q¢q¢t \n" - " 15 ¢u¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢t \n" - " 14 ¢u¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢t \n" - " 13 ¢u¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢t \n" - " 12 ¢u¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢t \n" - " 11 ¢u¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢t \n" - " 10 ¢u¢q¢q¡Ï¢q¢q¢q¢q¢q¡Ï¢q¢q¢q¢q¢q¡Ï¢q¢q¢t \n" - " 9 ¢u¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢t \n" - " 8 ¢u¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢t \n" - " 7 ¢u¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢t \n" - " 6 ¢u¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢t \n" - " 5 ¢u¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢t \n" - " 4 ¢u¢q¢q¡Ï¢q¢q¢q¢q¢q¡Ï¢q¢q¢q¢q¢q¡Ï¢q¢q¢t \n" - " 3 ¢u¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢t \n" - " 2 ¢u¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢t \n" - " 1 ¢|¢r¢r¢r¢r¢r¢r¢r¢r¢r¢r¢r¢r¢r¢r¢r¢r¢r¢} \n" + " 19" AC " ¢z¢s¢s¢s¢s¢s¢s¢s¢s¢s¢s¢s¢s¢s¢s¢s¢s¢s¢{ " AR "\n" + " 18" AC " ¢u¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢t " AR "\n" + " 17" AC " ¢u¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢t " AR "\n" + " 16" AC " ¢u¢q¢q¡Ï¢q¢q¢q¢q¢q¡Ï¢q¢q¢q¢q¢q¡Ï¢q¢q¢t " AR "\n" + " 15" AC " ¢u¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢t " AR "\n" + " 14" AC " ¢u¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢t " AR "\n" + " 13" AC " ¢u¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢t " AR "\n" + " 12" AC " ¢u¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢t " AR "\n" + " 11" AC " ¢u¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢t " AR "\n" + " 10" AC " ¢u¢q¢q¡Ï¢q¢q¢q¢q¢q¡Ï¢q¢q¢q¢q¢q¡Ï¢q¢q¢t " AR "\n" + " 9" AC " ¢u¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢t " AR "\n" + " 8" AC " ¢u¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢t " AR "\n" + " 7" AC " ¢u¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢t " AR "\n" + " 6" AC " ¢u¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢t " AR "\n" + " 5" AC " ¢u¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢t " AR "\n" + " 4" AC " ¢u¢q¢q¡Ï¢q¢q¢q¢q¢q¡Ï¢q¢q¢q¢q¢q¡Ï¢q¢q¢t " AR "\n" + " 3" AC " ¢u¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢t " AR "\n" + " 2" AC " ¢u¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢q¢t " AR "\n" + " 1" AC " ¢|¢r¢r¢r¢r¢r¢r¢r¢r¢r¢r¢r¢r¢r¢r¢r¢r¢r¢} " AR "\n" ); } @@ -1373,7 +1375,16 @@ GoBot(void) prints("%s #%-3d %.1s%-2d ", bw_chess[(i - 1) & 1], i, locE + pool[i - 1].x, pool[i - 1].y + 1); } - outmsg(" ¥´ÃÐ  (¡ö¡ô¡õ¡÷)²¾°Ê (ªÅ¥ÕÁä/ENTER)¤U¤l (u)¦^¤W¤@¨B " ANSI_COLOR(31) "(z)" ANSI_COLOR(30) "Â÷¶} "); + outmsg(ANSI_COLOR(1;33;42)" ¥´ÃÐ " + ANSI_COLOR(;31;47)" (¡ö¡ô¡õ¡÷)" + ANSI_COLOR(30)"²¾°Ê " + ANSI_COLOR(31)"(ªÅ¥ÕÁä/ENTER)" + ANSI_COLOR(30)"¤U¤l " + ANSI_COLOR(31)"(u)" + ANSI_COLOR(30)"¦^¤W¤@¨B " + ANSI_COLOR(31) "(z)" + ANSI_COLOR(30) "Â÷¶} " + ANSI_RESET); redoscr(); scr_need_redraw = 0; } diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c index 8369f50d..d1422dbc 100644 --- a/mbbsd/mbbsd.c +++ b/mbbsd/mbbsd.c @@ -1741,8 +1741,14 @@ telnet_handler(unsigned char c) /* good */ case AYT: /* are you there */ { - const char *alive = " I'm still alive.\r\n"; + const char *alive = "I'm still alive, loading: "; + char buf[STRLEN]; + + /* respond as fast as we can */ write(0, alive, strlen(alive)); + cpuload(buf); + write(0, buf, strlen(buf)); + write(0, "\r\n", 2); } return NOP; diff --git a/mbbsd/menu.c b/mbbsd/menu.c index 3e26c79e..2a8b176d 100644 --- a/mbbsd/menu.c +++ b/mbbsd/menu.c @@ -473,6 +473,20 @@ static const commands_t userlist[] = { #ifdef DEBUG int _debug_check_keyinput(); int _debug_testregcode(); +int _debug_reportstruct() +{ + clear(); + prints("boardheader_t:\t%d\n", sizeof(boardheader_t)); + prints("fileheader_t:\t%d\n", sizeof(fileheader_t)); + prints("userinfo_t:\t%d\n", sizeof(userinfo_t)); + prints("screenline_t:\t%d\n", sizeof(screenline_t)); + prints("SHM_t:\t%d\n", sizeof(SHM_t)); + prints("bid_t:\t%d\n", sizeof(bid_t)); + prints("userec_t:\t%d\n", sizeof(userec_t)); + pressanykey(); + return 0; +} + #endif /* XYZ tool menu */ @@ -500,6 +514,8 @@ static const commands_t xyzlist[] = { "MMKeycode Àˬd«öÁä±±¨î½X¤u¨ã"}, {_debug_testregcode, 0, "RRegcode Àˬdµù¥U½X¤½¦¡"}, + {_debug_reportstruct, 0, + "RReportStruct ³ø§i¦UºØµ²ºcªº¤j¤p"}, #endif {p_sysinfo, 0, "XXinfo ¡m¬d¬Ý¨t²Î¸ê°T¡n"}, -- cgit v1.2.3