讓 FB 3.X 版本 mark 起來有顏色喔..

看板SetupBBS作者時間22年前 (2003/09/09 20:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
修改 ~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 就這樣囉!^^ -- Origin: 彰化師大生物系˙吟風‧眺月‧擎天崗 micro.bio.ncue.edu.tw Author: solaris yikun.nstdc.nthu.edu.tw 發表
文章代碼(AID): #_NSXo00 (SetupBBS)