4 void func_ignore(int a, int b, int c)
6 printf("%d\n", a + b + c);
9 void func_intptr(int *i)
14 void func_intptr_ret(int *i)
19 int func_strlen(char* p)
21 strcpy(p, "Hello world");
25 int func_arg0(char *p)
27 strcpy(p, "Hello another world!");
31 void func_strfixed(char* p)
33 strcpy(p, "Hello world");
36 void func_string(char* p)
41 void func_ppp(int*** ppp)
43 printf("%d\n", ***ppp);
46 void func_stringp(char** sP)
53 printf("enum: %d\n", x);
56 void func_short(short x1, short x2)
58 printf("short: %hd %hd\n", x1, x2);
61 void func_ushort(unsigned short x1, unsigned short x2)
63 printf("ushort: %hu %hu\n", x1, x2);
66 float func_float(float f1, float f2)
68 printf("%f %f\n", f1, f2);
72 double func_double(double f1, double f2)
74 printf("%f %f\n", f1, f2);
78 void func_typedef(int x)
80 printf("typedef'd enum: %d\n", x);
83 void func_arrayi(int* a, int N)
86 printf("array[int]: ");
87 for (i = 0; i < N; i++)
92 void func_arrayf(float* a, int N)
95 printf("array[float]: ");
96 for (i = 0; i < N; i++)
105 struct { int a; int b; }* array;
106 struct { int a; int b; } seq[3];
111 void func_struct(struct test_struct* x)
118 printf("%d, [", x->simple);
119 for (i = 0; i < x->alen; i++) {
120 printf("%d/%d", x->array[i].a, x->array[i].b);
125 for (i = 0; i < 3; i++) {
126 printf("%d/%d", x->seq[i].a, x->seq[i].b);
132 strncpy(buf, x->str, x->slen);
137 void func_work (char *x)
142 void func_call (char *x, char* y, void (*cb) (char *))
160 func_struct_2(int i, struct S3 s3, double d)
162 return (struct S2){ s3.f, s3.a[1], s3.a[2] };
173 func_struct_large(struct S4 a, struct S4 b)
175 return (struct S4){ a.a + b.a, a.b + b.b, a.c + b.c, a.d + b.d };
186 func_struct_large2(struct S5 a, struct S5 b)
188 return (struct S5){ a.a + b.a, a.b + b.b, a.c + b.c, a.d + b.d };
199 func_struct_large3(struct S6 a, struct S6 b)
201 return (struct S6){ a.a + b.a, a.b + b.b, a.c + b.c, a.d + b.d };
205 func_many_args(int a, int b, long c, double d, char e, int f, float g, char h,
206 int i, double j, int k, double l, char m, int n, short o, int p,
207 char q, float r, float s, double t, long u, float v, float w,
213 func_lens(int a, long b, short c, long d)
218 func_bool(int a, int b)
224 func_hide(int a, int b, int c, int d, int e, int f)
228 struct func_hide_struct {
229 int a; int b; int c; int d; int e; int f; int g; int h;
233 func_hide_struct(struct func_hide_struct s)
238 func_short_enums(short values[])
240 static long retvals[4];
241 retvals[0] = values[0];
242 retvals[1] = values[1];
243 retvals[2] = values[2];
244 retvals[3] = values[3];
249 func_negative_enum(short a, unsigned short b, int c, unsigned d,
250 long e, unsigned long f)
256 func_charp_string(char *p)
260 struct struct_empty {};
261 struct struct_size1 { char a; };
262 struct struct_size2 { short a; };
263 struct struct_size4 { int a; };
264 struct struct_size8 { int a; int b; };
267 func_struct_empty(struct struct_empty e)
273 func_struct_size1(struct struct_size1 e)
279 func_struct_size2(struct struct_size2 e)
285 func_struct_size4(struct struct_size4 e)
291 func_struct_size8(struct struct_size8 e)
297 func_printf(char *format, ...)
302 func_sprintf(char *str, char *format, ...)