Sync usage with man page.
[netbsd-mini2440.git] / gnu / dist / gdb6 / gdb / testsuite / gdb.base / macscp1.c
blob89a1b07d1e6656f08326343e726a34007281771c
1 #include <stdio.h>
3 #define SPLICE(a, b) INNER_SPLICE(a, b)
4 #define INNER_SPLICE(a, b) a ## b
5 #define STRINGIFY(a) INNER_STRINGIFY(a)
6 #define INNER_STRINGIFY(a) #a
8 /* A macro named UNTIL_<func> is #defined until just before the
9 definition of the function <func>.
11 A macro named BEFORE_<func> is not #defined until just before the
12 definition of <func>.
14 The macro WHERE is redefined before each function <func> to the
15 token list ``before <func>''.
17 The macscp IN_MACSCP2_H and IN_MACSCP3_H are defined while
18 processing those header files; macscp4.h uses them to choose
19 appropriate function names, output strings, and macro definitions. */
21 #define UNTIL_MACSCP1_1
22 #define UNTIL_MACSCP2_1
23 #define UNTIL_MACSCP4_1_FROM_MACSCP2
24 #define UNTIL_MACSCP4_2_FROM_MACSCP2
25 #define UNTIL_MACSCP2_2
26 #define UNTIL_MACSCP1_2
27 #define UNTIL_MACSCP3_1
28 #define UNTIL_MACSCP4_1_FROM_MACSCP3
29 #define UNTIL_MACSCP4_2_FROM_MACSCP3
30 #define UNTIL_MACSCP3_2
31 #define UNTIL_MACSCP1_3
33 #define WHERE before macscp1_1
34 #define BEFORE_MACSCP1_1
35 #undef UNTIL_MACSCP1_1
36 void
37 macscp1_1 ()
39 puts ("macscp1_1");
42 #include "macscp2.h"
44 #undef WHERE
45 #define WHERE before macscp1_2
46 #define BEFORE_MACSCP1_2
47 #undef UNTIL_MACSCP1_2
48 void
49 macscp1_2 ()
51 puts ("macscp1_2");
54 #include "macscp3.h"
56 #undef WHERE
57 #define WHERE before macscp1_3
58 #define BEFORE_MACSCP1_3
59 #undef UNTIL_MACSCP1_3
60 void
61 macscp1_3 ()
63 puts ("macscp1_3");
66 int
67 main (int argc, char **argv)
69 macscp1_1 ();
70 macscp2_1 ();
71 macscp4_1_from_macscp2 ();
72 macscp4_2_from_macscp2 ();
73 macscp2_2 ();
74 macscp1_2 ();
75 macscp3_1 ();
76 macscp4_1_from_macscp3 ();
77 macscp4_2_from_macscp3 ();
78 macscp3_2 ();
79 macscp1_3 ();