aboutsummaryrefslogtreecommitdiff
path: root/tests/include/tast2.h
blob: 4854eb7eefdb80ae7164f317c18e152c0b40e3a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
#ifdef __cplusplus
extern "C" {
#endif

#define A 1
#define B 1.0
#define C 0x10
#define D "hello"
#define E 'c'

struct A0;
struct A1 {};
typedef struct A2;
typedef struct A3 {};
typedef struct A4 A4, *A4p;
typedef const int A5;
typedef int *A6;
typedef struct A0 **A7;
typedef void *A8;

// Forward declaration
struct A0 {
  int f1;
};

struct A4 {
  float f1;
};

typedef char *A9p[3], A9[4];
typedef char *A10[3][6];
typedef char *(*A11)[3];
typedef struct A0 *A111[12];

typedef int
  **(*A12)(int, int b, int *c, int *, int *count[4], int (*func)(int, int)),
  **(*A121)(float, float b, float *c, float *, float *count[4], float (*func)(float, float)),
  **(*A122)(char, char b, char *c, char *, char *count[4], char (*func)(char, char));
typedef int A13(int, int, void (*func)(void));

struct A14 { volatile char a1; };
struct A15 { char *a1; const int *a2[1]; };

typedef struct A16 { char f1; };
typedef struct A17 { char *a1; int *a2[1]; } A18, *A18p;
typedef struct { char *a1; int *a2[1]; } A19, *A19p;

typedef struct A20 { char a1; } A20, A21, *A21p;

//Expression
typedef struct A22 { const int **f1; int *f2[123+132]; } A22;

//Unions
union U1 {int f1; float f2; };
typedef union U2 { const int **f1; int abc[123+132]; } U2;

// Enums

// Issue #159
#define NK_FLAG(x) (1 << (x))
enum nk_panel_type {
    NK_PANEL_NONE       = 0,
    NK_PANEL_WINDOW     = NK_FLAG(0),
    NK_PANEL_GROUP      = NK_FLAG(1),
    NK_PANEL_POPUP      = NK_FLAG(2),
    NK_PANEL_CONTEXTUAL = NK_FLAG(4),
    NK_PANEL_COMBO      = NK_FLAG(5),
    NK_PANEL_MENU       = NK_FLAG(6),
    NK_PANEL_TOOLTIP    = NK_FLAG(7)
};
enum nk_panel_set {
    NK_PANEL_SET_NONBLOCK = NK_PANEL_CONTEXTUAL|NK_PANEL_COMBO|NK_PANEL_MENU|NK_PANEL_TOOLTIP,
    NK_PANEL_SET_POPUP = NK_PANEL_SET_NONBLOCK|NK_PANEL_POPUP,
    NK_PANEL_SET_SUB = NK_PANEL_SET_POPUP|NK_PANEL_GROUP
};

// Issue #171
typedef enum VSColorFamily {
    /* all planar formats */
    cmGray   = 1000000,
    cmRGB    = 2000000,
    cmYUV    = 3000000,
    cmYCoCg  = 4000000,
    /* special for compatibility */
    cmCompat = 9000000
} VSColorFamily;

typedef enum VSPresetFormat {
    pfNone = 0,

    pfGray8 = cmGray + 10,
    pfGray16,

    pfYUV420P8 = cmYUV + 10,
    pfYUV422P8,

    pfRGB24 = cmRGB + 10,
    pfRGB27,
    /* test */

    pfCompatBGR32 = cmCompat + 10,
    pfCompatYUY2
} VSPresetFormat;

// Anonymous
//typedef struct { char a1; };

//struct A2 test_proc1(struct A0 a);

// Proc vars
void
  *(*pcre_malloc)(size_t),
  (*pcre_free)(void *),
  *(*pcre_stack_malloc)(size_t);

typedef int ImageView, MagickBooleanType;
typedef MagickBooleanType
  (*DuplexTransferImageViewMethod)(const ImageView *,const ImageView *,
    ImageView *,const size_t,const int,void *),
  (*GetImageViewMethod)(const ImageView *,const size_t,const int,void *),
  (*SetImageViewMethod)(ImageView *,const size_t,const int,void *),
  (*TransferImageViewMethod)(const ImageView *,ImageView *,const size_t,
    const int,void *),
(*UpdateImageViewMethod)(ImageView *,const size_t,const int,void *);

// Issue #156, math.h
void
  *absfunptr1 (int (*)(struct A0 *)),
  **absfunptr2 (int (**)(struct A1 *)),
  absfunptr3 (int *(*)(struct A2 *)),
  *absfunptr4 (int *(**)(struct A3 *)),
  absfunptr5 (int (*a)(A4 *));

int sqlite3_bind_blob(struct A1*, int, const void*, int n, void(*)(void*));

// Issue #174 - type name[] => UncheckedArray[type]
int ucArrFunc1(int text[]);
int ucArrFunc2(int text[][5], int (*func)(int text[]));

typedef int ucArrType1[][5];
struct ucArrType2 {
    float f1[5][5];
    int *f2[][5];
};

typedef struct fieldfuncfunc {
    int *(*func1)(int f1, int *(*sfunc1)(int f1, int *(*ssfunc1)(int f1)));
};

int *func2(int f1, int *(*sfunc2)(int f1, int *(*ssfunc2)(int f1)));

typedef struct {
 const char *name; // description
 const char *driver; // driver
 int flags;
} BASS_DEVICEINFO;

// Issue #183
struct GPU_Target
{
    int w, *h;
    char *x, y, **z;
};



// DUPLICATES

#ifndef HEADER

#define A 1
#define B 1.0
#define C 0x10
#define D "hello"
#define E 'c'

struct A0;
struct A1 {};
typedef struct A2;
typedef struct A3 {};
typedef struct A4 A4, *A4p;
typedef const int A5;
typedef int *A6;
typedef struct A0 **A7;
typedef void *A8;

// Forward declaration
struct A0 {
  int f1;
};

struct A4 {
  float f1;
};

typedef char *A9p[3], A9[4];
typedef char *A10[3][6];
typedef char *(*A11)[3];
typedef struct A0 *A111[12];

typedef int
  **(*A12)(int, int b, int *c, int *, int *count[4], int (*func)(int, int)),
  **(*A121)(float, float b, float *c, float *, float *count[4], float (*func)(float, float)),
  **(*A122)(char, char b, char *c, char *, char *count[4], char (*func)(char, char));
typedef int A13(int, int, void (*func)(void));

struct A14 { volatile char a1; };
struct A15 { char *a1; const int *a2[1]; };

typedef struct A16 { char f1; };
typedef struct A17 { char *a1; int *a2[1]; } A18, *A18p;
typedef struct { char *a1; int *a2[1]; } A19, *A19p;

typedef struct A20 { char a1; } A20, A21, *A21p;

//Expression
typedef struct A22 { const int **f1; int *f2[123+132]; } A22;

//Unions
union U1 {int f1; float f2; };
typedef union U2 { const int **f1; int abc[123+132]; } U2;

// Enums

// Issue #159
#define NK_FLAG(x) (1 << (x))
enum nk_panel_type {
    NK_PANEL_NONE       = 0,
    NK_PANEL_WINDOW     = NK_FLAG(0),
    NK_PANEL_GROUP      = NK_FLAG(1),
    NK_PANEL_POPUP      = NK_FLAG(2),
    NK_PANEL_CONTEXTUAL = NK_FLAG(4),
    NK_PANEL_COMBO      = NK_FLAG(5),
    NK_PANEL_MENU       = NK_FLAG(6),
    NK_PANEL_TOOLTIP    = NK_FLAG(7)
};
enum nk_panel_set {
    NK_PANEL_SET_NONBLOCK = NK_PANEL_CONTEXTUAL|NK_PANEL_COMBO|NK_PANEL_MENU|NK_PANEL_TOOLTIP,
    NK_PANEL_SET_POPUP = NK_PANEL_SET_NONBLOCK|NK_PANEL_POPUP,
    NK_PANEL_SET_SUB = NK_PANEL_SET_POPUP|NK_PANEL_GROUP
};

// Issue #171
typedef enum VSColorFamily {
    /* all planar formats */
    cmGray   = 1000000,
    cmRGB    = 2000000,
    cmYUV    = 3000000,
    cmYCoCg  = 4000000,
    /* special for compatibility */
    cmCompat = 9000000
} VSColorFamily;

typedef enum VSPresetFormat {
    pfNone = 0,

    pfGray8 = cmGray + 10,
    pfGray16,

    pfYUV420P8 = cmYUV + 10,
    pfYUV422P8,

    pfRGB24 = cmRGB + 10,
    pfRGB27,
    /* test */

    pfCompatBGR32 = cmCompat + 10,
    pfCompatYUY2
} VSPresetFormat;

// Anonymous
//typedef struct { char a1; };

//struct A2 test_proc1(struct A0 a);

// Proc vars
void
  *(*pcre_malloc)(size_t),
  (*pcre_free)(void *),
  *(*pcre_stack_malloc)(size_t);

typedef int ImageView, MagickBooleanType;
typedef MagickBooleanType
  (*DuplexTransferImageViewMethod)(const ImageView *,const ImageView *,
    ImageView *,const size_t,const int,void *),
  (*GetImageViewMethod)(const ImageView *,const size_t,const int,void *),
  (*SetImageViewMethod)(ImageView *,const size_t,const int,void *),
  (*TransferImageViewMethod)(const ImageView *,ImageView *,const size_t,
    const int,void *),
(*UpdateImageViewMethod)(ImageView *,const size_t,const int,void *);

// Issue #156, math.h
void
  *absfunptr1 (int (*)(struct A0 *)),
  **absfunptr2 (int (**)(struct A1 *)),
  absfunptr3 (int *(*)(struct A2 *)),
  *absfunptr4 (int *(**)(struct A3 *)),
  absfunptr5 (int (*a)(A4 *));

int sqlite3_bind_blob(struct A1*, int, const void*, int n, void(*)(void*));

typedef struct fieldfuncfunc {
    int *(*func1)(int f1, int *(*sfunc1)(int f1, int *(*ssfunc1)(int f1)));
};

int *func2(int f1, int *(*sfunc2)(int f1, int *(*ssfunc2)(int f1)));

typedef struct {
 const char *name; // description
 const char *driver; // driver
 int flags;
} BASS_DEVICEINFO;

// Issue #183
struct GPU_Target
{
    int w, *h;
    char *x, y, **z;
};



#endif

#ifdef __cplusplus
}
#endif