Commit | Line | Data |
---|---|---|
9b158ba0 | 1 | #ifdef DEF_MACROS |
2 | ||
3 | #ifdef ONE | |
4 | #ifdef FOO | |
5 | #undef FOO | |
6 | #endif | |
7 | ||
8 | #define FOO "hello" | |
9 | #else | |
10 | #undef FOO | |
11 | #endif | |
12 | ||
13 | ||
14 | #ifdef TWO | |
15 | #ifdef FOO | |
16 | #undef FOO | |
17 | #endif | |
18 | #define FOO " " | |
19 | #endif | |
20 | ||
21 | #ifdef THREE | |
22 | #ifdef FOO | |
23 | #undef FOO | |
24 | #endif | |
25 | ||
26 | #define FOO "world" | |
27 | #endif | |
28 | ||
29 | #ifdef FOUR | |
30 | #ifdef FOO | |
31 | #undef FOO | |
32 | #endif | |
33 | #define FOO(a) foo = a | |
34 | #endif | |
35 | #else | |
36 | ||
37 | int main (int argc, const char **argv) | |
38 | { | |
39 | char *foo; | |
40 | ||
41 | #define DEF_MACROS | |
42 | #define ONE | |
43 | #include "info-macros.c" | |
44 | foo = FOO; | |
45 | ||
46 | #define TWO | |
47 | #include "info-macros.c" | |
48 | foo = FOO; | |
49 | ||
50 | #define THREE | |
51 | #include "info-macros.c" | |
52 | foo = FOO; | |
53 | ||
54 | #undef THREE | |
55 | #include "info-macros.c" | |
56 | foo = FOO; | |
57 | ||
58 | #undef TWO | |
59 | #include "info-macros.c" | |
60 | foo = FOO; | |
61 | ||
62 | #undef ONE | |
63 | #include "info-macros.c" | |
64 | foo = (char *)0; | |
65 | ||
66 | #define FOUR | |
67 | #include "info-macros.c" | |
68 | FOO ("the end."); | |
69 | ||
70 | return 0; | |
71 | } | |
72 | #endif | |
73 |