看板SetupBBS
标 题让 FB 3.X 版本 mark 起来有颜色喔..
发信站擎天岗 (Tue Sep 9 20:24:34 2003)
转信站ptt!ctu-reader!ctu-peer!news.nctu!news.nchu!NCUEBioBBS
修改 ~bbs/bbssrc/src/bbs.c
char *
readdoent(num, ent)
int num;
struct fileheader *ent;
{
static char buf[128];
time_t filetime;
char *date;
char *TITLE, color[10];
char type[15];
#ifdef COLOR_POST_DATE
struct tm *mytm;
#endif
sprintf(type,"%c",brc_unread (ent->filename) ? 'N' : ' ');
if (ent->accessed[0] & FILE_MARKED) {
if (ent->accessed[0] & FILE_DIGEST)
sprintf(type ,"^[[1;33m%c^[[m",(type[0] == ' ') ? 'b' :
'B' );
else
sprintf(type ,"^[[1;36m%c^[[m",(type[0] == ' ') ? 'm' :
'M' );
}
else if (ent->accessed[0] & FILE_DIGEST)
sprintf(type ,"^[[1;32m%c^[[m",(type[0] == ' ') ? 'g' : 'G');
filetime = atoi(ent->filename + 2);
if (filetime > 740000000) {
date = Ctime(&filetime) + 5;
} else {
date = "";
}
下面六行 snprintf 印 type 的 %c 都改成 %s
就这样罗!^^
--
┌┼ Or
igin:
彰化师大生物系˙吟风‧眺月‧擎天岗 micro.bio.ncue.edu.tw
└┘ A
uthor:
solaris 从 yikun.nstdc.nthu.edu.tw 发表