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