看板 PttCurrent 關於我們 聯絡資訊
※ 引述《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