1 | #include <stdio.h> |
2 | #include <stdlib.h> |
3 | #include <unistd.h> |
4 | |
5 | static int next; |
6 | |
7 | void |
8 | f00 (void) |
9 | { |
10 | puts (s: "f00" ); |
11 | if (next-- != 0) |
12 | _exit (1); |
13 | } |
14 | |
15 | void |
16 | f01 (void) |
17 | { |
18 | puts (s: "f01" ); |
19 | if (next-- != 1) |
20 | _exit (1); |
21 | } |
22 | |
23 | void |
24 | f02 (void) |
25 | { |
26 | puts (s: "f02" ); |
27 | if (next-- != 2) |
28 | _exit (1); |
29 | } |
30 | |
31 | void |
32 | f03 (void) |
33 | { |
34 | puts (s: "f03" ); |
35 | if (next-- != 3) |
36 | _exit (1); |
37 | } |
38 | |
39 | void |
40 | f04 (void) |
41 | { |
42 | puts (s: "f04" ); |
43 | if (next-- != 4) |
44 | _exit (1); |
45 | } |
46 | |
47 | void |
48 | f05 (void) |
49 | { |
50 | puts (s: "f05" ); |
51 | if (next-- != 5) |
52 | _exit (1); |
53 | } |
54 | |
55 | void |
56 | f06 (void) |
57 | { |
58 | puts (s: "f06" ); |
59 | if (next-- != 6) |
60 | _exit (1); |
61 | } |
62 | |
63 | void |
64 | f07 (void) |
65 | { |
66 | puts (s: "f07" ); |
67 | if (next-- != 7) |
68 | _exit (1); |
69 | } |
70 | |
71 | void |
72 | f08 (void) |
73 | { |
74 | puts (s: "f08" ); |
75 | if (next-- != 8) |
76 | _exit (1); |
77 | } |
78 | |
79 | void |
80 | f09 (void) |
81 | { |
82 | puts (s: "f09" ); |
83 | if (next-- != 9) |
84 | _exit (1); |
85 | } |
86 | |
87 | void |
88 | f10 (void) |
89 | { |
90 | puts (s: "f10" ); |
91 | if (next-- != 10) |
92 | _exit (1); |
93 | } |
94 | |
95 | void |
96 | f11 (void) |
97 | { |
98 | puts (s: "f11" ); |
99 | if (next-- != 11) |
100 | _exit (1); |
101 | } |
102 | |
103 | void |
104 | f12 (void) |
105 | { |
106 | puts (s: "f12" ); |
107 | if (next-- != 12) |
108 | _exit (1); |
109 | } |
110 | |
111 | void |
112 | f13 (void) |
113 | { |
114 | puts (s: "f13" ); |
115 | if (next-- != 13) |
116 | _exit (1); |
117 | } |
118 | |
119 | void |
120 | f14 (void) |
121 | { |
122 | puts (s: "f14" ); |
123 | if (next-- != 14) |
124 | _exit (1); |
125 | } |
126 | |
127 | void |
128 | f15 (void) |
129 | { |
130 | puts (s: "f15" ); |
131 | if (next-- != 15) |
132 | _exit (1); |
133 | } |
134 | |
135 | void |
136 | f16 (void) |
137 | { |
138 | puts (s: "f16" ); |
139 | if (next-- != 16) |
140 | _exit (1); |
141 | } |
142 | |
143 | void |
144 | f17 (void) |
145 | { |
146 | puts (s: "f17" ); |
147 | if (next-- != 17) |
148 | _exit (1); |
149 | } |
150 | |
151 | void |
152 | f18 (void) |
153 | { |
154 | puts (s: "f18" ); |
155 | if (next-- != 18) |
156 | _exit (1); |
157 | } |
158 | |
159 | void |
160 | f19 (void) |
161 | { |
162 | puts (s: "f19" ); |
163 | if (next-- != 19) |
164 | _exit (1); |
165 | } |
166 | |
167 | void |
168 | f20 (void) |
169 | { |
170 | puts (s: "f20" ); |
171 | if (next-- != 20) |
172 | _exit (1); |
173 | } |
174 | |
175 | void |
176 | f21 (void) |
177 | { |
178 | puts (s: "f21" ); |
179 | if (next-- != 21) |
180 | _exit (1); |
181 | } |
182 | |
183 | void |
184 | f22 (void) |
185 | { |
186 | puts (s: "f22" ); |
187 | if (next-- != 22) |
188 | _exit (1); |
189 | } |
190 | |
191 | void |
192 | f23 (void) |
193 | { |
194 | puts (s: "f23" ); |
195 | if (next-- != 23) |
196 | _exit (1); |
197 | } |
198 | |
199 | void |
200 | f24 (void) |
201 | { |
202 | puts (s: "f24" ); |
203 | if (next-- != 24) |
204 | _exit (1); |
205 | } |
206 | |
207 | void |
208 | f25 (void) |
209 | { |
210 | puts (s: "f25" ); |
211 | if (next-- != 25) |
212 | _exit (1); |
213 | } |
214 | |
215 | void |
216 | f26 (void) |
217 | { |
218 | puts (s: "f26" ); |
219 | if (next-- != 26) |
220 | _exit (1); |
221 | } |
222 | |
223 | void |
224 | f27 (void) |
225 | { |
226 | puts (s: "f27" ); |
227 | if (next-- != 27) |
228 | _exit (1); |
229 | } |
230 | |
231 | void |
232 | f28 (void) |
233 | { |
234 | puts (s: "f28" ); |
235 | if (next-- != 28) |
236 | _exit (1); |
237 | } |
238 | |
239 | void |
240 | f29 (void) |
241 | { |
242 | puts (s: "f29" ); |
243 | if (next-- != 29) |
244 | _exit (1); |
245 | } |
246 | |
247 | void |
248 | f30 (void) |
249 | { |
250 | puts (s: "f30" ); |
251 | if (next-- != 30) |
252 | _exit (1); |
253 | } |
254 | |
255 | void |
256 | f31 (void) |
257 | { |
258 | puts (s: "f31" ); |
259 | if (next-- != 31) |
260 | _exit (1); |
261 | } |
262 | |
263 | void |
264 | f32 (void) |
265 | { |
266 | puts (s: "f32" ); |
267 | if (next-- != 32) |
268 | _exit (1); |
269 | } |
270 | |
271 | void |
272 | f33 (void) |
273 | { |
274 | puts (s: "f33" ); |
275 | if (next-- != 33) |
276 | _exit (1); |
277 | } |
278 | |
279 | void |
280 | f34 (void) |
281 | { |
282 | puts (s: "f34" ); |
283 | if (next-- != 34) |
284 | _exit (1); |
285 | } |
286 | |
287 | void |
288 | f35 (void) |
289 | { |
290 | puts (s: "f35" ); |
291 | if (next-- != 35) |
292 | _exit (1); |
293 | } |
294 | |
295 | void |
296 | f36 (void) |
297 | { |
298 | puts (s: "f36" ); |
299 | if (next-- != 36) |
300 | _exit (1); |
301 | } |
302 | |
303 | void |
304 | f37 (void) |
305 | { |
306 | puts (s: "f37" ); |
307 | if (next-- != 37) |
308 | _exit (1); |
309 | } |
310 | |
311 | void |
312 | f38 (void) |
313 | { |
314 | puts (s: "f38" ); |
315 | if (next-- != 38) |
316 | _exit (1); |
317 | } |
318 | |
319 | void |
320 | f39 (void) |
321 | { |
322 | puts (s: "f39" ); |
323 | if (next-- != 39) |
324 | _exit (1); |
325 | } |
326 | |
327 | void |
328 | foo (void) |
329 | { |
330 | atexit (func: f00); |
331 | atexit (func: f01); |
332 | atexit (func: f02); |
333 | atexit (func: f03); |
334 | atexit (func: f04); |
335 | atexit (func: f05); |
336 | atexit (func: f06); |
337 | atexit (func: f07); |
338 | atexit (func: f08); |
339 | atexit (func: f09); |
340 | |
341 | atexit (func: f10); |
342 | atexit (func: f11); |
343 | atexit (func: f12); |
344 | atexit (func: f13); |
345 | atexit (func: f14); |
346 | atexit (func: f15); |
347 | atexit (func: f16); |
348 | atexit (func: f17); |
349 | atexit (func: f18); |
350 | atexit (func: f19); |
351 | |
352 | atexit (func: f20); |
353 | atexit (func: f21); |
354 | atexit (func: f22); |
355 | atexit (func: f23); |
356 | atexit (func: f24); |
357 | atexit (func: f25); |
358 | atexit (func: f26); |
359 | atexit (func: f27); |
360 | atexit (func: f28); |
361 | atexit (func: f29); |
362 | |
363 | atexit (func: f30); |
364 | atexit (func: f31); |
365 | atexit (func: f32); |
366 | atexit (func: f33); |
367 | atexit (func: f34); |
368 | atexit (func: f35); |
369 | atexit (func: f36); |
370 | atexit (func: f37); |
371 | atexit (func: f38); |
372 | atexit (func: f39); |
373 | |
374 | next = 39; |
375 | } |
376 | |