# indent 可以改變你的程式風格
GNU STYLE: -gnu or
-nbad -bap -nbc -bbo -bl -bli2 -bls -ncdb -nce -cp1 -cs -di2 -ndj -nfc1 -nfca -hnl -i2 -ip5 -lp -pcs -nprs -psl -saf -sai -saw -nsc -nsob
-nbad: Do not force a blank line after every block of declarations.
-bap: forces a blank line after every procedure body.
-nbc: Do not Force newline after commas in declaration.
-bbo: Prefer to break long lines before boolean operators.
-bl: Put braces on line after if.
-blin: Indent braces n spaces.
-bls: Put braces on the line after struct declaration lines.
-ncdb: Do not put comment delimiters on blank lines.
-nce: Do not cuddle } and else.
-cp1: Put comments to the right of #else and #endif statements in column n.
-cs: Put a space after a cast operator.
-di2: Put variables in column n.
-ndj:
-nfc1: Do not format comments in the first column as normal.
-nfca: Do not format any comments.
-hnl: Prefer to break long lines at the position of newlines in the input.
-i2: Set indentation level to n spaces.
-ip5: Indent parameter types in old-style function definitions by n space.
-lp: Line up continued lines at parentheses.
-pcs: put space after the function in function calls.
-nprs: Do not put a space after every '(' and before every ')'.
-psl: Put the type of a procedure on the line before its name.
-saf: put a space after every for.
-sai: put a space after every if.
-saw: put a space after every while.
-nsc: Do not put the `*´ character at the left of comments.
-nsob: Do not swallow optional blank lines.
沒有留言:
張貼留言