作者smartboy (烂掉了烂掉了)
看板PttCurrent
标题Re: 刚刚把 source 全部 indent 过了.
时间Sat Jul 27 20:31:35 2002
※ 引述《smartboy (烂掉了烂掉了)》之铭言:
: ※ 引述《in2 (使用者名单是可以)》之铭言:
: : 我用的是 indent -i4
: : 也许这并不合您的意思,
: : 我建议是您可以在改的时候 indent 成您要的格式,
: : 然後 commit 回来前 indent -i4 一次.
: : 让整个 source 的风格统一 :)
: 有些 // 中文注解烂掉了
/* 开头的的多行注解被 reformat 了
像这样
/*
* 被呼叫的时机: 1. 丢群组水球 flag = 1 (pre-edit) 2. 回水球 flag = 0 3.
* 上站aloha flag = 2 (pre-edit) 4. 广播 flag = 3 if SYSOP, otherwise
* flag = 1 (pre-edit) 5. 丢水球 flag = 0 6. my_write2 flag = 4
* (pre-edit) but confirm
*/
/*
* not used static int shortulist(userinfo_t * uentp) { static int lineno,
* fullactive, linecnt; static int moreactive, page, num; char uentry[50];
* int state;
*
* if (!lineno){ lineno = 3; page = moreactive ? (page + p_lines * 3) : 0;
* linecnt = num = moreactive = 0; move(1, 70); prints("Page: %d", page /
* (p_lines) / 3 + 1); move(lineno, 0); }
*
* if (uentp == NULL){ int finaltally;
*
* clrtoeol(); move(++lineno, 0); clrtobot(); finaltally = fullactive; lineno =
* fullactive = 0; return finaltally; }
*
* if ((!HAS_PERM(PERM_SYSOP) && !HAS_PERM(PERM_SEECLOAK) && uentp->invisible)
* || ((friend_stat(currutmp, uentp) & HRM) && !HAS_PERM(PERM_SYSOP))){ if
* (lineno >= b_lines) return 0; if (num++ < page) return 0; memset(uentry, '
* ', 25); uentry[25] = '\0'; } else{ fullactive++; if (lineno >= b_lines){
* moreactive = 1; return 0; } if (num++ < page) return 0;
*
* state = (currutmp == uentp) ? 10 :
* (friend_stat(currutmp,uentp)&ST_FRIEND)>>2;
*
* if (PERM_HIDE(uentp)) state = 9;
*
* sprintf(uentry, "%s%-13s%c%-10s%s ", fcolor[state], uentp->userid,
* uentp->invisible ? '#' : ' ', modestring(uentp, 1), state ? "\033[0m" :
* ""); } if (++linecnt < 3){ strcat(uentry, "│"); outs(uentry); } else{
* outs(uentry); linecnt = 0; clrtoeol(); move(++lineno, 0); } return 0; }
*/
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 61.70.142.187