※ 引述《powerrager.bbs@cis.nctu.edu.tw (硝子之少年)》之銘言:
: 請問一下...在SOB 2.36裡面
: 不同類別的文字想要顯示不同的ASCII顏色碼
: 要如何設定呢?
: 就像陽光沙灘那個樣子的分類......
看看 Source 的 board.c 檔案
在 show_brdlist(head, clsflag, newflag) 中
加入 char *color[7]={"1","2","3","4","5","6","7"};
同函式, 有一段... 加入紅色部份, 重新 make update,應該就可以了.....
if (newflag)
prints("%6d%s", ptr->total, ptr->unread ? "‧" : "。");
}
prints("%-13s^[[%d;3%dm%-5.5s^[[m%-37.37s%c %-13.13s",
ptr->name,
color[(unsigned int)(ptr->title[1]+ptr->title[2]+ptr->title[3]+ptr->title[0])%7],
ptr->title,ptr->title+5, " VR"[ptr->bvote],
((ptr->BM[0]<=' ')?"[強力徵才中] ":ptr->BM));
}
--
有空歡迎來台大心情小築BBS 140.112.253.222 看看唷!!
--
※ 發信站: 批踢踢實業坊(ptt.twbbs.org)
◆ From: Libra.m8.ntu.edu.tw