From a0f8ef1e2e04905908478088fc376435b770417c Mon Sep 17 00:00:00 2001 From: piaip Date: Wed, 8 Jun 2005 02:46:24 +0000 Subject: 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 --- mbbsd/topsong.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mbbsd/topsong.c') diff --git a/mbbsd/topsong.c b/mbbsd/topsong.c index 41adc53f..72e3d3d5 100644 --- a/mbbsd/topsong.c +++ b/mbbsd/topsong.c @@ -68,11 +68,11 @@ sortsong(void) } qsort(songs, MAX_SONGS, sizeof(songcmp_t), (QCAST) count_cmp); fprintf(fo, - " \033[36m──\033[37m名次\033[36m──────\033[37m歌" - " 名\033[36m───────────\033[37m次數\033[36m" - "──\033[32m共%d次\033[36m──\033[m\n", totalcount); + " " ANSI_COLOR(36) "──" ANSI_COLOR(37) "名次" ANSI_COLOR(36) "──────" ANSI_COLOR(37) "歌" + " 名" ANSI_COLOR(36) "───────────" ANSI_COLOR(37) "次數" ANSI_COLOR(36) "" + "──" ANSI_COLOR(32) "共%d次" ANSI_COLOR(36) "──" ANSI_RESET "\n", totalcount); for (n = 0; n < 100 && songs[n].name[0]; n++) { - fprintf(fo, " %5d. %-38.38s %4d \033[32m[%.2f]\033[m\n", n + 1, + fprintf(fo, " %5d. %-38.38s %4d " ANSI_COLOR(32) "[%.2f]" ANSI_RESET "\n", n + 1, songs[n].name, songs[n].count, (float)songs[n].count / totalcount); } -- cgit v1.2.3