看板 SetupBBS 關於我們 聯絡資訊
bbs.c (參考 StarBBS 的 menu.h 個人色彩之改法) void note() { static char *fn_note_tmp = "note.tmp"; static char *fn_note_dat = "note.dat"; int total, i, j, collect, len; struct stat st; char buf[512], buf2[512], genbuf[2]; int fd, fx, color; FILE *fp, *foo; struct notedata { usint color; time_t date; char userid[IDLEN + 1]; char username[19]; char buf[3][80]; }; myitem.buf[0][0] = myitem.buf[1][0] = myitem.buf[2][0] = '\0'; do { move(b_lines-1,0); clrtobot(); prints("(1)\033[1;41m \033[m(2)\033[1;42m \033[m(3)\033[1;43m \033[m (4)\033[1;44m \033[m(5)\033[1;45m \033[m(6)\033[1;46m \033[m (7)\033[1;47m \033[m(8)隨機(9)預設"); getdata(b_lines ,0,"請選擇留言板顯示的文字色彩:", genbuf, 2,LCECHO,"7"); if((color=atol(genbuf)) >= 0) { if(color == 8) color = j = rand () % 8; if(color == 9) color = 7; myitem.color = color; } move(12, 0); clrtobot(); outs("\n請留言 (至多三行),按[Enter]結束") 下面自行做變化.....以 WD 預設的留言板為例... sprintf(buf, "\033[1;44m\033[36m└┐\033[3%dm%-70s\033[36m┌┘\033[m\n", myitem.color, myitem.buf[0]); if(*myitem.buf[1]) { sprintf(buf2, " \033[1;44m\033[36m│\033[3%dm%-70s\033[36m│^[[m\n", myitem.color, myitem.buf[1]); strcat(buf, buf2); } if(*myitem.buf[2]) { sprintf(buf2, " \033[1;44m\033[36m│\033[3%dm%-70s\033[36m│\033[m\n", myitem.color, myitem.buf[2]); strcat(buf, buf2); } -- 記憶裡滿是妳的笑容 掀起一陣一陣 落寞的傷心 ... 失憶日記 讓苦澀的咖啡... 心情記事 ... 一口口不停地吞蝕溶解 受創的心 -- ※ Origin: 雞房心語˙bbs.pcroom.fcu.edu.tw ※ From: sw59-30-160.adsl.seed.ne ╭┬─╮╭┬─╮╭┬─╮ :' ── ●/ │┤ ││┤ │┤ │╭┬─╮╭┬─╮┌┬┬╮ █◣ ●/ │┼─╯│┤ ├┴┬╯│┤ ││┤ ││┤││ ██◣ ||╰╯ ╰┴─╯╰╯╰╯╰┴─╯╰┴─╯╰╯╯╯═╧══╝ 逢甲大學 ˙電子佈告欄系統˙bbs.pcroom.fcu.edu.tw˙140.134.208.77