Last active
August 29, 2015 14:24
-
-
Save hktechn0/c8897c71da12d07df2c8 to your computer and use it in GitHub Desktop.
システムプログラム (syspro) のインデンテーションスタイル
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://www.coins.tsukuba.ac.jp/~syspro/2015/shui/1stHalf.html#sec:indentation | |
# 以下のコマンドで、大体上記のスタイルに適合するように、自動でスタイルを修正してくれる | |
# 綺麗で美しいコードを書こう。 | |
$ indent -nbad -bap -nbc -br -brs -c33 -cd33 -ncdb -ce -ci4 -cli0 -d0 -di1 -nfc1 -i8 -ip0 -l80 -lp -npcs -npsl -sob -nut test.c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat test.c | |
#include <stdio.h> | |
int main(int argc, char ** argv){ | |
int a[100] [100]; | |
int i,j; | |
for(i=0; i < 100;i++){ | |
for(j=0;j<100;j++) {a[i][j]=j;} | |
} | |
return 0; | |
} | |
$ indent -nbad -bap -nbc -br -brs -c33 -cd33 -ncdb -ce -ci4 -cli0 -d0 -di1 -nfc1 -i8 -ip0 -l80 -lp -npcs -npsl -sob -nut test.c | |
$ cat test.c | |
#include <stdio.h> | |
int main(int argc, char **argv) | |
{ | |
int a[100][100]; | |
int i, j; | |
for (i = 0; i < 100; i++) { | |
for (j = 0; j < 100; j++) { | |
a[i][j] = j; | |
} | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment