swe_primus/experiment/indent/FourTab.c @ d68a613b
| 22d1fc30 | torutk | /*
|
||
* インデントを4TABにしたファイル
|
||||
*
|
||||
* Emacsで一時的にインデントを4にする方法
|
||||
* M-: でミニバッファに以下のS式を記述し実行
|
||||
* (c-set-style "bsd")
|
||||
* (setq c-basic-offset 4)
|
||||
* (setq tab-width 4)
|
||||
* (setq indent-tabs-mode t)
|
||||
*/
|
||||
| d68a613b | torutk | static const int MAX_JUDGE = 16;
|
||
static double foo = 3.14159;
|
||||
static const char[] message = "Hello, TAB=4";
|
||||
| 22d1fc30 | torutk | |||
void foo(int argnum)
|
||||
{
|
||||
int result;
|
||||
if (argnum == 1) {
|
||||
for (int i = 0; i < MAX_JUDGE; i++) {
|
||||
switch (arg) {
|
||||
case 0:
|
||||
result = 1;
|
||||
break;
|
||||
case 1:
|
||||
if (i % 2 == 0 && i < MAX_JUDGE / 2) {
|
||||
result = 2;
|
||||
} else {
|
||||
result = 3;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
result = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||