看板 PttCurrent 關於我們 聯絡資訊
請問各位大大 在edit.c的addsignature函式中 如果想把這一段 strlcpy(temp, fromhost, sizeof(temp)); fprintf(fp, "\n--\n※ 發信站: " BBSNAME "(" MYHOSTNAME ") \n◆ From: %s\n", temp); 變成這樣 strlcpy(temp, fromhost, sizeof(temp)); fprintf(fp, "\n--"); fprintf("\n※ 發信站: " BBSNAME "(" MYHOSTNAME ") \n◆ From: %s\n", temp); 想在兩個fprintf中間加一段程式,用來讀進某個檔案(ASCII圖), 用more("etc/xxx", NA);可以嗎??...^^"" 另外,想請問menu.c的show_status函式 i = ptime->tm_wday << 1; snprintf(mystatus, sizeof(mystatus), ANSI_COLOR(1;33;44) "[%d/%d 星期%c%c %d:%02d]" ANSI_COLOR(1;33;45) "%-14s" ANSI_COLOR(1;30;47) " 目前船上有" ANSI_COLOR(31) " %d " ANSI_COLOR(30) "人 , 我是" ANSI_COLOR(31) "%s" ANSI_COLOR(30) , ptime->tm_mon + 1, ptime->tm_mday, myweek[i], myweek[i + 1], ptime->tm_hour, ptime->tm_min, currutmp->birth ? "生日要請客唷" : SHM->today_is, SHM->UTMPnumber, cuser.userid); outmsg(mystatus); i = strlen(mystatus) - (3*7+25); sprintf(mystatus, "[扣機]" ANSI_COLOR(31) "%s ", msgs[currutmp->pager]); outslr("", i, mystatus, strlen(msgs[currutmp->pager]) + 7); outs(ANSI_RESET); 那個3*7+25是代表什麼意思..@@" 因為在修改snprintf之後,sprintf那段的扣機就不見了, 狀態列硬生生短了一截... 還請各位大大教導~~ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.135.9.195