summaryrefslogtreecommitdiffstats
path: root/mbbsd/chat.c
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-06-08 10:46:24 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-06-08 10:46:24 +0800
commita0f8ef1e2e04905908478088fc376435b770417c (patch)
treea96bd4096703e5d0bb0b9fe7c9499d0db7768070 /mbbsd/chat.c
parentf55eaef82ab265772418a545f32fa2780468603b (diff)
downloadpttbbs-a0f8ef1e2e04905908478088fc376435b770417c.tar
pttbbs-a0f8ef1e2e04905908478088fc376435b770417c.tar.gz
pttbbs-a0f8ef1e2e04905908478088fc376435b770417c.tar.bz2
pttbbs-a0f8ef1e2e04905908478088fc376435b770417c.tar.lz
pttbbs-a0f8ef1e2e04905908478088fc376435b770417c.tar.xz
pttbbs-a0f8ef1e2e04905908478088fc376435b770417c.tar.zst
pttbbs-a0f8ef1e2e04905908478088fc376435b770417c.zip
New style to specify ANSI escape commands.
First introduced by pmore, but this hard work (to transform all files to new style) is made by Rong-en Fan (rafan). Thanks! git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2796 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/chat.c')
-rw-r--r--mbbsd/chat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mbbsd/chat.c b/mbbsd/chat.c
index f548775f..a837eab3 100644
--- a/mbbsd/chat.c
+++ b/mbbsd/chat.c
@@ -94,7 +94,7 @@ chat_recv(struct ChatBuf *cb, int fd, char *chatroom, char *chatid)
case 't':
move(0, 0);
clrtoeol();
- prints("\033[1;37;46m 談天室 [%-12s] \033[45m 話題:%-48s\033[m",
+ prints(ANSI_COLOR(1;37;46) " 談天室 [%-12s] " ANSI_COLOR(45) " 話題:%-48s" ANSI_RESET,
chatroom, bptr + 2);
}
} else
@@ -531,7 +531,7 @@ t_chat(void)
stampfile(genbuf, &mymail);
mymail.filemode = FILE_READ ;
strlcpy(mymail.owner, "[備.忘.錄]", sizeof(mymail.owner));
- strlcpy(mymail.title, "會議\033[1;33m記錄\033[m", sizeof(mymail.title));
+ strlcpy(mymail.title, "會議" ANSI_COLOR(1;33) "記錄" ANSI_RESET, sizeof(mymail.title));
sethomedir(title, cuser.userid);
append_record(title, &mymail, sizeof(mymail));
Rename(fpath, genbuf);