作者morrris (morrris)
看板PttCurrent
标题[问题] edit.c
时间Tue Dec 4 10:52:09 2007
请问各位大大
在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