467
|
1 int printf(const char *format, ...);
|
|
2
|
36
|
3
|
|
4 int heap[100];
|
|
5
|
|
6 #define car(e) (heap[(int)(e)])
|
|
7 #define cadr(e) (heap[((int)(e))+1])
|
|
8
|
|
9 #define TEST
|
|
10 int i;
|
|
11 TEST
|
|
12
|
304
|
13 char *a = "test" "test";
|
|
14
|
115
|
15 #define TEST0 33
|
|
16 #define TEST111 TEST0
|
|
17
|
36
|
18 #define c(a,b) g(a+1,b+1)
|
491
|
19 #define g(a,b) printf("#0018:%d %d\n",a+1,b+1);
|
180
|
20 #define d(a,b) cadr(b)+3
|
183
|
21 /*
|
|
22
|
|
23 #define stdio stdio
|
|
24 #define f(a,b) aho+a+b
|
|
25 f (a,b)
|
|
26 */
|
36
|
27
|
311
|
28 // name concateneation
|
|
29
|
|
30 #define name(a,b) name_##b(a)
|
|
31
|
540
|
32 #define names(a,b) name_ ## b(a)
|
|
33
|
311
|
34 #define name_hoge(c) (c+a)
|
|
35
|
614
|
36 #define hoge000(a) (a+a) /* hoge
|
|
37 comment
|
|
38 */
|
|
39
|
311
|
40
|
542
|
41 int
|
36
|
42 main() {
|
|
43 int a,b,e;
|
|
44
|
115
|
45 b = heap[TEST111];
|
180
|
46 d(a,b);
|
36
|
47 a =1; b = 3;
|
|
48 #ifndef a
|
|
49 c(a,
|
|
50 b);
|
|
51 /* 3,5 expected */
|
|
52 #endif
|
111
|
53 e=50; heap[51]=3; heap[3]=4;
|
|
54 /* 5,4 expected */
|
|
55 #if 0
|
|
56 g(car(cadr(e)),cadr(e));
|
|
57 #endif
|
177
|
58 #if 0
|
542
|
59 printf("#0054:1\n");
|
177
|
60 #elif (1)
|
542
|
61 printf("#0056:2\n");
|
177
|
62 #elif (2)
|
542
|
63 printf("#0058:3\n");
|
177
|
64 #else
|
542
|
65 printf("#0060:4\n");
|
177
|
66 #endif
|
|
67 #if 0
|
542
|
68 printf("#0063:1\n");
|
177
|
69 #elif (0)
|
542
|
70 printf("#0065:2\n");
|
177
|
71 #elif (0)
|
542
|
72 printf("#0067:3\n");
|
177
|
73 #else
|
542
|
74 printf("#0069:4\n");
|
177
|
75 #endif
|
542
|
76 printf("#0071:%d\n",name(3,hoge));
|
|
77 printf("#0072:%d\n",names(3,hoge));
|
614
|
78 printf("#0073:%d\n",hoge000(3));
|
172
|
79 return 0;
|
36
|
80 }
|
|
81
|
623
|
82 /* For GCC 2.7 and later, we can use specific type-size attributes. */
|
|
83 # define __intN_t(N, MODE) \
|
|
84 typedef int int##N##_t __attribute__ ((__mode__ (MODE)))
|
|
85 # define __u_intN_t(N, MODE) \
|
|
86 typedef unsigned int u_int##N##_t __attribute__ ((__mode__ (MODE)))
|
|
87
|
|
88 # ifndef __int8_t_defined
|
|
89 # define __int8_t_defined
|
|
90 __intN_t (8, __QI__);
|
|
91 __intN_t (16, __HI__);
|
|
92 __intN_t (32, __SI__);
|
|
93 __intN_t (64, __DI__);
|
|
94 # endif
|
|
95
|
|
96 __u_intN_t (8, __QI__);
|
|
97 __u_intN_t (16, __HI__);
|
|
98 __u_intN_t (32, __SI__);
|
|
99 __u_intN_t (64, __DI__);
|
|
100
|
|
101
|
591
|
102 int tmp()
|
|
103 #if 0
|
|
104 {
|
|
105 return 1;
|
|
106 }
|
|
107 #else
|
|
108 {
|
|
109 return 0;
|
|
110 }
|
|
111 #endif
|
|
112
|
312
|
113 #if 0
|
|
114 #endif /* whoeh
|
|
115 wohefwiehfoi */
|
542
|
116 void longlong(int i,int j)
|
312
|
117 {
|
|
118 // long long i,j;
|
|
119 if (i>j) main();
|
|
120 }
|