[問題] edit.c

看板PttCurrent作者 (morrris)時間18年前 (2007/12/04 10:52), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/2 (看更多)
請問各位大大 在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
文章代碼(AID): #17LC3QlA (PttCurrent)
討論串 (同標題文章)
以下文章回應了本文
問題
1
1
完整討論串 (本文為第 1 之 2 篇):
問題
1
1
問題
文章代碼(AID): #17LC3QlA (PttCurrent)