Use 4-space indentation in the C code
This commit is contained in:
parent
a1a7cd0d47
commit
917141b6a2
1 changed files with 21 additions and 21 deletions
|
|
@ -39,42 +39,42 @@ char* upcall_test_int_fn_string_ret(int (*f)(void)) {
|
||||||
}
|
}
|
||||||
|
|
||||||
CString get_string1(void) {
|
CString get_string1(void) {
|
||||||
return responses[counter++ % 3];
|
return responses[counter++ % 3];
|
||||||
}
|
}
|
||||||
|
|
||||||
CString get_string2(void) {
|
CString get_string2(void) {
|
||||||
return "Alternate string";
|
return "Alternate string";
|
||||||
}
|
}
|
||||||
|
|
||||||
StringFactory get_downcall(int whichString) {
|
StringFactory get_downcall(int whichString) {
|
||||||
switch (whichString % 2) {
|
switch (whichString % 2) {
|
||||||
case 0:
|
case 0:
|
||||||
return get_string1;
|
return get_string1;
|
||||||
case 1:
|
case 1:
|
||||||
return get_string2;
|
return get_string2;
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef struct alignment_test {
|
typedef struct alignment_test {
|
||||||
char a;
|
char a;
|
||||||
double x;
|
double x;
|
||||||
float y;
|
float y;
|
||||||
} AlignmentTest;
|
} AlignmentTest;
|
||||||
|
|
||||||
AlignmentTest get_struct() {
|
AlignmentTest get_struct() {
|
||||||
AlignmentTest ret = {};
|
AlignmentTest ret = {};
|
||||||
ret.a = 'x';
|
ret.a = 'x';
|
||||||
ret.x = 3.14;
|
ret.x = 3.14;
|
||||||
ret.y = 42.0;
|
ret.y = 42.0;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_call_with_trailing_string_arg(int a, int b, char* text) {
|
void test_call_with_trailing_string_arg(int a, int b, char* text) {
|
||||||
printf("call of `test_call_with_trailing_string_arg` with a=%i b=%i text='%s'",1,2,text);
|
printf("call of `test_call_with_trailing_string_arg` with a=%i b=%i text='%s'",1,2,text);
|
||||||
printf("\r ");
|
printf("\r ");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue