diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-06-08 10:46:24 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-06-08 10:46:24 +0800 |
commit | a0f8ef1e2e04905908478088fc376435b770417c (patch) | |
tree | a96bd4096703e5d0bb0b9fe7c9499d0db7768070 /mbbsd/topsong.c | |
parent | f55eaef82ab265772418a545f32fa2780468603b (diff) | |
download | pttbbs-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/topsong.c')
-rw-r--r-- | mbbsd/topsong.c | 8 |
1 files changed, 4 insertions, 4 deletions
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); } |