]>
Commit | Line | Data |
---|---|---|
1 | # 1 "frontends/yasm/yasm.c" | |
2 | # 1 "/root/ICEs/PRxxx/yasm-0.6.0//" | |
3 | # 1 "<built-in>" | |
4 | # 1 "<command-line>" | |
5 | # 1 "frontends/yasm/yasm.c" | |
6 | # 27 "frontends/yasm/yasm.c" | |
7 | # 1 "./util.h" 1 | |
8 | # 34 "./util.h" | |
9 | # 1 "./config.h" 1 | |
10 | # 35 "./util.h" 2 | |
11 | # 55 "./util.h" | |
12 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.0-alpha20070615/include-fixed/stdio.h" 1 3 4 | |
13 | # 14 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.0-alpha20070615/include-fixed/stdio.h" 3 4 | |
14 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.0-alpha20070615/include/stdarg.h" 1 3 4 | |
15 | # 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.0-alpha20070615/include/stdarg.h" 3 4 | |
16 | typedef __builtin_va_list __gnuc_va_list; | |
17 | # 15 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.0-alpha20070615/include-fixed/stdio.h" 2 3 4 | |
18 | ||
19 | ||
20 | ||
21 | # 1 "/usr/include/gentoo-multilib/x86/stdio.h" 1 3 4 | |
22 | # 28 "/usr/include/gentoo-multilib/x86/stdio.h" 3 4 | |
23 | # 1 "/usr/include/features.h" 1 3 4 | |
24 | ||
25 | ||
26 | ||
27 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.0-alpha20070615/include-fixed/gentoo-multilib/x86/features.h" 1 3 4 | |
28 | # 331 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.0-alpha20070615/include-fixed/gentoo-multilib/x86/features.h" 3 4 | |
29 | # 1 "/usr/include/sys/cdefs.h" 1 3 4 | |
30 | ||
31 | ||
32 | ||
33 | # 1 "/usr/include/gentoo-multilib/x86/sys/cdefs.h" 1 3 4 | |
34 | # 324 "/usr/include/gentoo-multilib/x86/sys/cdefs.h" 3 4 | |
35 | # 1 "/usr/include/bits/wordsize.h" 1 3 4 | |
36 | ||
37 | ||
38 | ||
39 | # 1 "/usr/include/gentoo-multilib/x86/bits/wordsize.h" 1 3 4 | |
40 | # 5 "/usr/include/bits/wordsize.h" 2 3 4 | |
41 | # 325 "/usr/include/gentoo-multilib/x86/sys/cdefs.h" 2 3 4 | |
42 | # 5 "/usr/include/sys/cdefs.h" 2 3 4 | |
43 | # 332 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.0-alpha20070615/include-fixed/gentoo-multilib/x86/features.h" 2 3 4 | |
44 | # 354 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.0-alpha20070615/include-fixed/gentoo-multilib/x86/features.h" 3 4 | |
45 | # 1 "/usr/include/gnu/stubs.h" 1 3 4 | |
46 | ||
47 | ||
48 | ||
49 | # 1 "/usr/include/gentoo-multilib/x86/gnu/stubs.h" 1 3 4 | |
50 | ||
51 | ||
52 | ||
53 | # 1 "/usr/include/bits/wordsize.h" 1 3 4 | |
54 | ||
55 | ||
56 | ||
57 | # 1 "/usr/include/gentoo-multilib/x86/bits/wordsize.h" 1 3 4 | |
58 | # 5 "/usr/include/bits/wordsize.h" 2 3 4 | |
59 | # 5 "/usr/include/gentoo-multilib/x86/gnu/stubs.h" 2 3 4 | |
60 | ||
61 | ||
62 | # 1 "/usr/include/gnu/stubs-32.h" 1 3 4 | |
63 | ||
64 | ||
65 | ||
66 | # 1 "/usr/include/gentoo-multilib/x86/gnu/stubs-32.h" 1 3 4 | |
67 | # 5 "/usr/include/gnu/stubs-32.h" 2 3 4 | |
68 | # 8 "/usr/include/gentoo-multilib/x86/gnu/stubs.h" 2 3 4 | |
69 | # 5 "/usr/include/gnu/stubs.h" 2 3 4 | |
70 | # 355 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.0-alpha20070615/include-fixed/gentoo-multilib/x86/features.h" 2 3 4 | |
71 | # 5 "/usr/include/features.h" 2 3 4 | |
72 | # 29 "/usr/include/gentoo-multilib/x86/stdio.h" 2 3 4 | |
73 | ||
74 | ||
75 | ||
76 | ||
77 | ||
78 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.0-alpha20070615/include/stddef.h" 1 3 4 | |
79 | # 214 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.0-alpha20070615/include/stddef.h" 3 4 | |
80 | typedef unsigned int size_t; | |
81 | # 35 "/usr/include/gentoo-multilib/x86/stdio.h" 2 3 4 | |
82 | ||
83 | # 1 "/usr/include/bits/types.h" 1 3 4 | |
84 | ||
85 | ||
86 | ||
87 | # 1 "/usr/include/gentoo-multilib/x86/bits/types.h" 1 3 4 | |
88 | # 27 "/usr/include/gentoo-multilib/x86/bits/types.h" 3 4 | |
89 | # 1 "/usr/include/features.h" 1 3 4 | |
90 | # 28 "/usr/include/gentoo-multilib/x86/bits/types.h" 2 3 4 | |
91 | # 1 "/usr/include/bits/wordsize.h" 1 3 4 | |
92 | ||
93 | ||
94 | ||
95 | # 1 "/usr/include/gentoo-multilib/x86/bits/wordsize.h" 1 3 4 | |
96 | # 5 "/usr/include/bits/wordsize.h" 2 3 4 | |
97 | # 29 "/usr/include/gentoo-multilib/x86/bits/types.h" 2 3 4 | |
98 | ||
99 | ||
100 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.0-alpha20070615/include/stddef.h" 1 3 4 | |
101 | # 32 "/usr/include/gentoo-multilib/x86/bits/types.h" 2 3 4 | |
102 | ||
103 | ||
104 | typedef unsigned char __u_char; | |
105 | typedef unsigned short int __u_short; | |
106 | typedef unsigned int __u_int; | |
107 | typedef unsigned long int __u_long; | |
108 | ||
109 | ||
110 | typedef signed char __int8_t; | |
111 | typedef unsigned char __uint8_t; | |
112 | typedef signed short int __int16_t; | |
113 | typedef unsigned short int __uint16_t; | |
114 | typedef signed int __int32_t; | |
115 | typedef unsigned int __uint32_t; | |
116 | ||
117 | ||
118 | ||
119 | ||
120 | __extension__ typedef signed long long int __int64_t; | |
121 | __extension__ typedef unsigned long long int __uint64_t; | |
122 | ||
123 | ||
124 | ||
125 | ||
126 | ||
127 | ||
128 | ||
129 | __extension__ typedef long long int __quad_t; | |
130 | __extension__ typedef unsigned long long int __u_quad_t; | |
131 | # 134 "/usr/include/gentoo-multilib/x86/bits/types.h" 3 4 | |
132 | # 1 "/usr/include/bits/typesizes.h" 1 3 4 | |
133 | ||
134 | ||
135 | ||
136 | # 1 "/usr/include/gentoo-multilib/x86/bits/typesizes.h" 1 3 4 | |
137 | # 5 "/usr/include/bits/typesizes.h" 2 3 4 | |
138 | # 135 "/usr/include/gentoo-multilib/x86/bits/types.h" 2 3 4 | |
139 | ||
140 | ||
141 | __extension__ typedef __u_quad_t __dev_t; | |
142 | __extension__ typedef unsigned int __uid_t; | |
143 | __extension__ typedef unsigned int __gid_t; | |
144 | __extension__ typedef unsigned long int __ino_t; | |
145 | __extension__ typedef __u_quad_t __ino64_t; | |
146 | __extension__ typedef unsigned int __mode_t; | |
147 | __extension__ typedef unsigned int __nlink_t; | |
148 | __extension__ typedef long int __off_t; | |
149 | __extension__ typedef __quad_t __off64_t; | |
150 | __extension__ typedef int __pid_t; | |
151 | __extension__ typedef struct { int __val[2]; } __fsid_t; | |
152 | __extension__ typedef long int __clock_t; | |
153 | __extension__ typedef unsigned long int __rlim_t; | |
154 | __extension__ typedef __u_quad_t __rlim64_t; | |
155 | __extension__ typedef unsigned int __id_t; | |
156 | __extension__ typedef long int __time_t; | |
157 | __extension__ typedef unsigned int __useconds_t; | |
158 | __extension__ typedef long int __suseconds_t; | |
159 | ||
160 | __extension__ typedef int __daddr_t; | |
161 | __extension__ typedef long int __swblk_t; | |
162 | __extension__ typedef int __key_t; | |
163 | ||
164 | ||
165 | __extension__ typedef int __clockid_t; | |
166 | ||
167 | ||
168 | __extension__ typedef void * __timer_t; | |
169 | ||
170 | ||
171 | __extension__ typedef long int __blksize_t; | |
172 | ||
173 | ||
174 | ||
175 | ||
176 | __extension__ typedef long int __blkcnt_t; | |
177 | __extension__ typedef __quad_t __blkcnt64_t; | |
178 | ||
179 | ||
180 | __extension__ typedef unsigned long int __fsblkcnt_t; | |
181 | __extension__ typedef __u_quad_t __fsblkcnt64_t; | |
182 | ||
183 | ||
184 | __extension__ typedef unsigned long int __fsfilcnt_t; | |
185 | __extension__ typedef __u_quad_t __fsfilcnt64_t; | |
186 | ||
187 | __extension__ typedef int __ssize_t; | |
188 | ||
189 | ||
190 | ||
191 | typedef __off64_t __loff_t; | |
192 | typedef __quad_t *__qaddr_t; | |
193 | typedef char *__caddr_t; | |
194 | ||
195 | ||
196 | __extension__ typedef int __intptr_t; | |
197 | ||
198 | ||
199 | __extension__ typedef unsigned int __socklen_t; | |
200 | # 5 "/usr/include/bits/types.h" 2 3 4 | |
201 | # 37 "/usr/include/gentoo-multilib/x86/stdio.h" 2 3 4 | |
202 | # 45 "/usr/include/gentoo-multilib/x86/stdio.h" 3 4 | |
203 | struct _IO_FILE; | |
204 | ||
205 | ||
206 | ||
207 | typedef struct _IO_FILE FILE; | |
208 | ||
209 | ||
210 | ||
211 | ||
212 | ||
213 | # 65 "/usr/include/gentoo-multilib/x86/stdio.h" 3 4 | |
214 | typedef struct _IO_FILE __FILE; | |
215 | # 75 "/usr/include/gentoo-multilib/x86/stdio.h" 3 4 | |
216 | # 1 "/usr/include/libio.h" 1 3 4 | |
217 | ||
218 | ||
219 | ||
220 | # 1 "/usr/include/gentoo-multilib/x86/libio.h" 1 3 4 | |
221 | # 32 "/usr/include/gentoo-multilib/x86/libio.h" 3 4 | |
222 | # 1 "/usr/include/_G_config.h" 1 3 4 | |
223 | ||
224 | ||
225 | ||
226 | # 1 "/usr/include/gentoo-multilib/x86/_G_config.h" 1 3 4 | |
227 | # 9 "/usr/include/gentoo-multilib/x86/_G_config.h" 3 4 | |
228 | # 1 "/usr/include/bits/types.h" 1 3 4 | |
229 | # 10 "/usr/include/gentoo-multilib/x86/_G_config.h" 2 3 4 | |
230 | ||
231 | ||
232 | ||
233 | ||
234 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.0-alpha20070615/include/stddef.h" 1 3 4 | |
235 | # 326 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.0-alpha20070615/include/stddef.h" 3 4 | |
236 | typedef int wchar_t; | |
237 | # 355 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.0-alpha20070615/include/stddef.h" 3 4 | |
238 | typedef unsigned int wint_t; | |
239 | # 15 "/usr/include/gentoo-multilib/x86/_G_config.h" 2 3 4 | |
240 | # 24 "/usr/include/gentoo-multilib/x86/_G_config.h" 3 4 | |
241 | # 1 "/usr/include/wchar.h" 1 3 4 | |
242 | ||
243 | ||
244 | ||
245 | # 1 "/usr/include/gentoo-multilib/x86/wchar.h" 1 3 4 | |
246 | # 48 "/usr/include/gentoo-multilib/x86/wchar.h" 3 4 | |
247 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.0-alpha20070615/include/stddef.h" 1 3 4 | |
248 | # 49 "/usr/include/gentoo-multilib/x86/wchar.h" 2 3 4 | |
249 | ||
250 | # 1 "/usr/include/bits/wchar.h" 1 3 4 | |
251 | ||
252 | ||
253 | ||
254 | # 1 "/usr/include/gentoo-multilib/x86/bits/wchar.h" 1 3 4 | |
255 | # 5 "/usr/include/bits/wchar.h" 2 3 4 | |
256 | # 51 "/usr/include/gentoo-multilib/x86/wchar.h" 2 3 4 | |
257 | # 76 "/usr/include/gentoo-multilib/x86/wchar.h" 3 4 | |
258 | typedef struct | |
259 | { | |
260 | int __count; | |
261 | union | |
262 | { | |
263 | wint_t __wch; | |
264 | char __wchb[4]; | |
265 | } __value; | |
266 | } __mbstate_t; | |
267 | # 5 "/usr/include/wchar.h" 2 3 4 | |
268 | # 25 "/usr/include/gentoo-multilib/x86/_G_config.h" 2 3 4 | |
269 | ||
270 | typedef struct | |
271 | { | |
272 | __off_t __pos; | |
273 | __mbstate_t __state; | |
274 | } _G_fpos_t; | |
275 | typedef struct | |
276 | { | |
277 | __off64_t __pos; | |
278 | __mbstate_t __state; | |
279 | } _G_fpos64_t; | |
280 | # 44 "/usr/include/gentoo-multilib/x86/_G_config.h" 3 4 | |
281 | # 1 "/usr/include/gconv.h" 1 3 4 | |
282 | ||
283 | ||
284 | ||
285 | # 1 "/usr/include/gentoo-multilib/x86/gconv.h" 1 3 4 | |
286 | # 26 "/usr/include/gentoo-multilib/x86/gconv.h" 3 4 | |
287 | # 1 "/usr/include/features.h" 1 3 4 | |
288 | # 27 "/usr/include/gentoo-multilib/x86/gconv.h" 2 3 4 | |
289 | ||
290 | # 1 "/usr/include/wchar.h" 1 3 4 | |
291 | ||
292 | ||
293 | ||
294 | # 1 "/usr/include/gentoo-multilib/x86/wchar.h" 1 3 4 | |
295 | # 48 "/usr/include/gentoo-multilib/x86/wchar.h" 3 4 | |
296 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.0-alpha20070615/include/stddef.h" 1 3 4 | |
297 | # 49 "/usr/include/gentoo-multilib/x86/wchar.h" 2 3 4 | |
298 | ||
299 | # 1 "/usr/include/bits/wchar.h" 1 3 4 | |
300 | # 51 "/usr/include/gentoo-multilib/x86/wchar.h" 2 3 4 | |
301 | # 5 "/usr/include/wchar.h" 2 3 4 | |
302 | # 29 "/usr/include/gentoo-multilib/x86/gconv.h" 2 3 4 | |
303 | ||
304 | ||
305 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.0-alpha20070615/include/stddef.h" 1 3 4 | |
306 | # 32 "/usr/include/gentoo-multilib/x86/gconv.h" 2 3 4 | |
307 | ||
308 | ||
309 | ||
310 | ||
311 | ||
312 | enum | |
313 | { | |
314 | __GCONV_OK = 0, | |
315 | __GCONV_NOCONV, | |
316 | __GCONV_NODB, | |
317 | __GCONV_NOMEM, | |
318 | ||
319 | __GCONV_EMPTY_INPUT, | |
320 | __GCONV_FULL_OUTPUT, | |
321 | __GCONV_ILLEGAL_INPUT, | |
322 | __GCONV_INCOMPLETE_INPUT, | |
323 | ||
324 | __GCONV_ILLEGAL_DESCRIPTOR, | |
325 | __GCONV_INTERNAL_ERROR | |
326 | }; | |
327 | ||
328 | ||
329 | ||
330 | enum | |
331 | { | |
332 | __GCONV_IS_LAST = 0x0001, | |
333 | __GCONV_IGNORE_ERRORS = 0x0002 | |
334 | }; | |
335 | ||
336 | ||
337 | ||
338 | struct __gconv_step; | |
339 | struct __gconv_step_data; | |
340 | struct __gconv_loaded_object; | |
341 | struct __gconv_trans_data; | |
342 | ||
343 | ||
344 | ||
345 | typedef int (*__gconv_fct) (struct __gconv_step *, struct __gconv_step_data *, | |
346 | __const unsigned char **, __const unsigned char *, | |
347 | unsigned char **, size_t *, int, int); | |
348 | ||
349 | ||
350 | typedef wint_t (*__gconv_btowc_fct) (struct __gconv_step *, unsigned char); | |
351 | ||
352 | ||
353 | typedef int (*__gconv_init_fct) (struct __gconv_step *); | |
354 | typedef void (*__gconv_end_fct) (struct __gconv_step *); | |
355 | ||
356 | ||
357 | ||
358 | typedef int (*__gconv_trans_fct) (struct __gconv_step *, | |
359 | struct __gconv_step_data *, void *, | |
360 | __const unsigned char *, | |
361 | __const unsigned char **, | |
362 | __const unsigned char *, unsigned char **, | |
363 | size_t *); | |
364 | ||
365 | ||
366 | typedef int (*__gconv_trans_context_fct) (void *, __const unsigned char *, | |
367 | __const unsigned char *, | |
368 | unsigned char *, unsigned char *); | |
369 | ||
370 | ||
371 | typedef int (*__gconv_trans_query_fct) (__const char *, __const char ***, | |
372 | size_t *); | |
373 | ||
374 | ||
375 | typedef int (*__gconv_trans_init_fct) (void **, const char *); | |
376 | typedef void (*__gconv_trans_end_fct) (void *); | |
377 | ||
378 | struct __gconv_trans_data | |
379 | { | |
380 | ||
381 | __gconv_trans_fct __trans_fct; | |
382 | __gconv_trans_context_fct __trans_context_fct; | |
383 | __gconv_trans_end_fct __trans_end_fct; | |
384 | void *__data; | |
385 | struct __gconv_trans_data *__next; | |
386 | }; | |
387 | ||
388 | ||
389 | ||
390 | struct __gconv_step | |
391 | { | |
392 | struct __gconv_loaded_object *__shlib_handle; | |
393 | __const char *__modname; | |
394 | ||
395 | int __counter; | |
396 | ||
397 | char *__from_name; | |
398 | char *__to_name; | |
399 | ||
400 | __gconv_fct __fct; | |
401 | __gconv_btowc_fct __btowc_fct; | |
402 | __gconv_init_fct __init_fct; | |
403 | __gconv_end_fct __end_fct; | |
404 | ||
405 | ||
406 | ||
407 | int __min_needed_from; | |
408 | int __max_needed_from; | |
409 | int __min_needed_to; | |
410 | int __max_needed_to; | |
411 | ||
412 | ||
413 | int __stateful; | |
414 | ||
415 | void *__data; | |
416 | }; | |
417 | ||
418 | ||
419 | ||
420 | struct __gconv_step_data | |
421 | { | |
422 | unsigned char *__outbuf; | |
423 | unsigned char *__outbufend; | |
424 | ||
425 | ||
426 | ||
427 | int __flags; | |
428 | ||
429 | ||
430 | ||
431 | int __invocation_counter; | |
432 | ||
433 | ||
434 | ||
435 | int __internal_use; | |
436 | ||
437 | __mbstate_t *__statep; | |
438 | __mbstate_t __state; | |
439 | ||
440 | ||
441 | ||
442 | struct __gconv_trans_data *__trans; | |
443 | }; | |
444 | ||
445 | ||
446 | ||
447 | typedef struct __gconv_info | |
448 | { | |
449 | size_t __nsteps; | |
450 | struct __gconv_step *__steps; | |
451 | __extension__ struct __gconv_step_data __data []; | |
452 | } *__gconv_t; | |
453 | # 5 "/usr/include/gconv.h" 2 3 4 | |
454 | # 45 "/usr/include/gentoo-multilib/x86/_G_config.h" 2 3 4 | |
455 | typedef union | |
456 | { | |
457 | struct __gconv_info __cd; | |
458 | struct | |
459 | { | |
460 | struct __gconv_info __cd; | |
461 | struct __gconv_step_data __data; | |
462 | } __combined; | |
463 | } _G_iconv_t; | |
464 | ||
465 | typedef int _G_int16_t __attribute__ ((__mode__ (__HI__))); | |
466 | typedef int _G_int32_t __attribute__ ((__mode__ (__SI__))); | |
467 | typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__))); | |
468 | typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__))); | |
469 | # 5 "/usr/include/_G_config.h" 2 3 4 | |
470 | # 33 "/usr/include/gentoo-multilib/x86/libio.h" 2 3 4 | |
471 | # 53 "/usr/include/gentoo-multilib/x86/libio.h" 3 4 | |
472 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.0-alpha20070615/include/stdarg.h" 1 3 4 | |
473 | # 54 "/usr/include/gentoo-multilib/x86/libio.h" 2 3 4 | |
474 | # 167 "/usr/include/gentoo-multilib/x86/libio.h" 3 4 | |
475 | struct _IO_jump_t; struct _IO_FILE; | |
476 | # 177 "/usr/include/gentoo-multilib/x86/libio.h" 3 4 | |
477 | typedef void _IO_lock_t; | |
478 | ||
479 | ||
480 | ||
481 | ||
482 | ||
483 | struct _IO_marker { | |
484 | struct _IO_marker *_next; | |
485 | struct _IO_FILE *_sbuf; | |
486 | ||
487 | ||
488 | ||
489 | int _pos; | |
490 | # 200 "/usr/include/gentoo-multilib/x86/libio.h" 3 4 | |
491 | }; | |
492 | ||
493 | ||
494 | enum __codecvt_result | |
495 | { | |
496 | __codecvt_ok, | |
497 | __codecvt_partial, | |
498 | __codecvt_error, | |
499 | __codecvt_noconv | |
500 | }; | |
501 | # 268 "/usr/include/gentoo-multilib/x86/libio.h" 3 4 | |
502 | struct _IO_FILE { | |
503 | int _flags; | |
504 | ||
505 | ||
506 | ||
507 | ||
508 | char* _IO_read_ptr; | |
509 | char* _IO_read_end; | |
510 | char* _IO_read_base; | |
511 | char* _IO_write_base; | |
512 | char* _IO_write_ptr; | |
513 | char* _IO_write_end; | |
514 | char* _IO_buf_base; | |
515 | char* _IO_buf_end; | |
516 | ||
517 | char *_IO_save_base; | |
518 | char *_IO_backup_base; | |
519 | char *_IO_save_end; | |
520 | ||
521 | struct _IO_marker *_markers; | |
522 | ||
523 | struct _IO_FILE *_chain; | |
524 | ||
525 | int _fileno; | |
526 | ||
527 | ||
528 | ||
529 | int _flags2; | |
530 | ||
531 | __off_t _old_offset; | |
532 | ||
533 | ||
534 | ||
535 | unsigned short _cur_column; | |
536 | signed char _vtable_offset; | |
537 | char _shortbuf[1]; | |
538 | ||
539 | ||
540 | ||
541 | _IO_lock_t *_lock; | |
542 | # 316 "/usr/include/gentoo-multilib/x86/libio.h" 3 4 | |
543 | __off64_t _offset; | |
544 | # 325 "/usr/include/gentoo-multilib/x86/libio.h" 3 4 | |
545 | void *__pad1; | |
546 | void *__pad2; | |
547 | void *__pad3; | |
548 | void *__pad4; | |
549 | size_t __pad5; | |
550 | ||
551 | int _mode; | |
552 | ||
553 | char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; | |
554 | ||
555 | }; | |
556 | ||
557 | ||
558 | typedef struct _IO_FILE _IO_FILE; | |
559 | ||
560 | ||
561 | struct _IO_FILE_plus; | |
562 | ||
563 | extern struct _IO_FILE_plus _IO_2_1_stdin_; | |
564 | extern struct _IO_FILE_plus _IO_2_1_stdout_; | |
565 | extern struct _IO_FILE_plus _IO_2_1_stderr_; | |
566 | # 361 "/usr/include/gentoo-multilib/x86/libio.h" 3 4 | |
567 | typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes); | |
568 | ||
569 | ||
570 | ||
571 | ||
572 | ||
573 | ||
574 | ||
575 | typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf, | |
576 | size_t __n); | |
577 | ||
578 | ||
579 | ||
580 | ||
581 | ||
582 | ||
583 | ||
584 | typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w); | |
585 | ||
586 | ||
587 | typedef int __io_close_fn (void *__cookie); | |
588 | # 413 "/usr/include/gentoo-multilib/x86/libio.h" 3 4 | |
589 | extern int __underflow (_IO_FILE *); | |
590 | extern int __uflow (_IO_FILE *); | |
591 | extern int __overflow (_IO_FILE *, int); | |
592 | extern wint_t __wunderflow (_IO_FILE *); | |
593 | extern wint_t __wuflow (_IO_FILE *); | |
594 | extern wint_t __woverflow (_IO_FILE *, wint_t); | |
595 | # 451 "/usr/include/gentoo-multilib/x86/libio.h" 3 4 | |
596 | extern int _IO_getc (_IO_FILE *__fp); | |
597 | extern int _IO_putc (int __c, _IO_FILE *__fp); | |
598 | extern int _IO_feof (_IO_FILE *__fp) __attribute__ ((__nothrow__)); | |
599 | extern int _IO_ferror (_IO_FILE *__fp) __attribute__ ((__nothrow__)); | |
600 | ||
601 | extern int _IO_peekc_locked (_IO_FILE *__fp); | |
602 | ||
603 | ||
604 | ||
605 | ||
606 | ||
607 | extern void _IO_flockfile (_IO_FILE *) __attribute__ ((__nothrow__)); | |
608 | extern void _IO_funlockfile (_IO_FILE *) __attribute__ ((__nothrow__)); | |
609 | extern int _IO_ftrylockfile (_IO_FILE *) __attribute__ ((__nothrow__)); | |
610 | # 481 "/usr/include/gentoo-multilib/x86/libio.h" 3 4 | |
611 | extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, | |
612 | __gnuc_va_list, int *__restrict); | |
613 | extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, | |
614 | __gnuc_va_list); | |
615 | extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t); | |
616 | extern size_t _IO_sgetn (_IO_FILE *, void *, size_t); | |
617 | ||
618 | extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int); | |
619 | extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int); | |
620 | ||
621 | extern void _IO_free_backup_area (_IO_FILE *) __attribute__ ((__nothrow__)); | |
622 | # 5 "/usr/include/libio.h" 2 3 4 | |
623 | # 76 "/usr/include/gentoo-multilib/x86/stdio.h" 2 3 4 | |
624 | # 89 "/usr/include/gentoo-multilib/x86/stdio.h" 3 4 | |
625 | ||
626 | ||
627 | typedef _G_fpos_t fpos_t; | |
628 | ||
629 | ||
630 | ||
631 | ||
632 | # 141 "/usr/include/gentoo-multilib/x86/stdio.h" 3 4 | |
633 | # 1 "/usr/include/bits/stdio_lim.h" 1 3 4 | |
634 | ||
635 | ||
636 | ||
637 | # 1 "/usr/include/gentoo-multilib/x86/bits/stdio_lim.h" 1 3 4 | |
638 | # 5 "/usr/include/bits/stdio_lim.h" 2 3 4 | |
639 | # 142 "/usr/include/gentoo-multilib/x86/stdio.h" 2 3 4 | |
640 | ||
641 | ||
642 | ||
643 | extern struct _IO_FILE *stdin; | |
644 | extern struct _IO_FILE *stdout; | |
645 | extern struct _IO_FILE *stderr; | |
646 | ||
647 | ||
648 | ||
649 | ||
650 | ||
651 | ||
652 | ||
653 | extern int remove (__const char *__filename) __attribute__ ((__nothrow__)); | |
654 | ||
655 | extern int rename (__const char *__old, __const char *__new) __attribute__ ((__nothrow__)); | |
656 | ||
657 | ||
658 | ||
659 | ||
660 | ||
661 | ||
662 | ||
663 | ||
664 | ||
665 | ||
666 | ||
667 | ||
668 | ||
669 | ||
670 | extern FILE *tmpfile (void) ; | |
671 | # 186 "/usr/include/gentoo-multilib/x86/stdio.h" 3 4 | |
672 | extern char *tmpnam (char *__s) __attribute__ ((__nothrow__)) ; | |
673 | ||
674 | ||
675 | ||
676 | ||
677 | ||
678 | extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__)) ; | |
679 | # 204 "/usr/include/gentoo-multilib/x86/stdio.h" 3 4 | |
680 | extern char *tempnam (__const char *__dir, __const char *__pfx) | |
681 | __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ; | |
682 | ||
683 | ||
684 | ||
685 | ||
686 | ||
687 | ||
688 | ||
689 | ||
690 | extern int fclose (FILE *__stream); | |
691 | ||
692 | ||
693 | ||
694 | ||
695 | extern int fflush (FILE *__stream); | |
696 | ||
697 | # 229 "/usr/include/gentoo-multilib/x86/stdio.h" 3 4 | |
698 | extern int fflush_unlocked (FILE *__stream); | |
699 | # 243 "/usr/include/gentoo-multilib/x86/stdio.h" 3 4 | |
700 | ||
701 | ||
702 | ||
703 | ||
704 | ||
705 | ||
706 | extern FILE *fopen (__const char *__restrict __filename, | |
707 | __const char *__restrict __modes) ; | |
708 | ||
709 | ||
710 | ||
711 | ||
712 | extern FILE *freopen (__const char *__restrict __filename, | |
713 | __const char *__restrict __modes, | |
714 | FILE *__restrict __stream) ; | |
715 | # 272 "/usr/include/gentoo-multilib/x86/stdio.h" 3 4 | |
716 | ||
717 | # 283 "/usr/include/gentoo-multilib/x86/stdio.h" 3 4 | |
718 | extern FILE *fdopen (int __fd, __const char *__modes) __attribute__ ((__nothrow__)) ; | |
719 | # 304 "/usr/include/gentoo-multilib/x86/stdio.h" 3 4 | |
720 | ||
721 | ||
722 | ||
723 | extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__)); | |
724 | ||
725 | ||
726 | ||
727 | extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, | |
728 | int __modes, size_t __n) __attribute__ ((__nothrow__)); | |
729 | ||
730 | ||
731 | ||
732 | ||
733 | ||
734 | extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, | |
735 | size_t __size) __attribute__ ((__nothrow__)); | |
736 | ||
737 | ||
738 | extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__)); | |
739 | ||
740 | ||
741 | ||
742 | ||
743 | ||
744 | ||
745 | ||
746 | ||
747 | extern int fprintf (FILE *__restrict __stream, | |
748 | __const char *__restrict __format, ...); | |
749 | ||
750 | ||
751 | ||
752 | ||
753 | extern int printf (__const char *__restrict __format, ...); | |
754 | ||
755 | extern int sprintf (char *__restrict __s, | |
756 | __const char *__restrict __format, ...) __attribute__ ((__nothrow__)); | |
757 | ||
758 | ||
759 | ||
760 | ||
761 | ||
762 | extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format, | |
763 | __gnuc_va_list __arg); | |
764 | ||
765 | ||
766 | ||
767 | ||
768 | extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg); | |
769 | ||
770 | extern int vsprintf (char *__restrict __s, __const char *__restrict __format, | |
771 | __gnuc_va_list __arg) __attribute__ ((__nothrow__)); | |
772 | ||
773 | ||
774 | ||
775 | ||
776 | ||
777 | extern int snprintf (char *__restrict __s, size_t __maxlen, | |
778 | __const char *__restrict __format, ...) | |
779 | __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4))); | |
780 | ||
781 | extern int vsnprintf (char *__restrict __s, size_t __maxlen, | |
782 | __const char *__restrict __format, __gnuc_va_list __arg) | |
783 | __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0))); | |
784 | ||
785 | # 398 "/usr/include/gentoo-multilib/x86/stdio.h" 3 4 | |
786 | ||
787 | ||
788 | ||
789 | ||
790 | ||
791 | extern int fscanf (FILE *__restrict __stream, | |
792 | __const char *__restrict __format, ...) ; | |
793 | ||
794 | ||
795 | ||
796 | ||
797 | extern int scanf (__const char *__restrict __format, ...) ; | |
798 | ||
799 | extern int sscanf (__const char *__restrict __s, | |
800 | __const char *__restrict __format, ...) __attribute__ ((__nothrow__)); | |
801 | ||
802 | # 440 "/usr/include/gentoo-multilib/x86/stdio.h" 3 4 | |
803 | ||
804 | ||
805 | ||
806 | ||
807 | ||
808 | extern int fgetc (FILE *__stream); | |
809 | extern int getc (FILE *__stream); | |
810 | ||
811 | ||
812 | ||
813 | ||
814 | ||
815 | extern int getchar (void); | |
816 | ||
817 | # 464 "/usr/include/gentoo-multilib/x86/stdio.h" 3 4 | |
818 | extern int getc_unlocked (FILE *__stream); | |
819 | extern int getchar_unlocked (void); | |
820 | # 475 "/usr/include/gentoo-multilib/x86/stdio.h" 3 4 | |
821 | extern int fgetc_unlocked (FILE *__stream); | |
822 | ||
823 | ||
824 | ||
825 | ||
826 | ||
827 | ||
828 | ||
829 | ||
830 | ||
831 | ||
832 | ||
833 | extern int fputc (int __c, FILE *__stream); | |
834 | extern int putc (int __c, FILE *__stream); | |
835 | ||
836 | ||
837 | ||
838 | ||
839 | ||
840 | extern int putchar (int __c); | |
841 | ||
842 | # 508 "/usr/include/gentoo-multilib/x86/stdio.h" 3 4 | |
843 | extern int fputc_unlocked (int __c, FILE *__stream); | |
844 | ||
845 | ||
846 | ||
847 | ||
848 | ||
849 | ||
850 | ||
851 | extern int putc_unlocked (int __c, FILE *__stream); | |
852 | extern int putchar_unlocked (int __c); | |
853 | ||
854 | ||
855 | ||
856 | ||
857 | ||
858 | ||
859 | extern int getw (FILE *__stream); | |
860 | ||
861 | ||
862 | extern int putw (int __w, FILE *__stream); | |
863 | ||
864 | ||
865 | ||
866 | ||
867 | ||
868 | ||
869 | ||
870 | ||
871 | extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) | |
872 | ; | |
873 | ||
874 | ||
875 | ||
876 | ||
877 | ||
878 | ||
879 | extern char *gets (char *__s) ; | |
880 | ||
881 | # 589 "/usr/include/gentoo-multilib/x86/stdio.h" 3 4 | |
882 | ||
883 | ||
884 | ||
885 | ||
886 | ||
887 | extern int fputs (__const char *__restrict __s, FILE *__restrict __stream); | |
888 | ||
889 | ||
890 | ||
891 | ||
892 | ||
893 | extern int puts (__const char *__s); | |
894 | ||
895 | ||
896 | ||
897 | ||
898 | ||
899 | ||
900 | extern int ungetc (int __c, FILE *__stream); | |
901 | ||
902 | ||
903 | ||
904 | ||
905 | ||
906 | ||
907 | extern size_t fread (void *__restrict __ptr, size_t __size, | |
908 | size_t __n, FILE *__restrict __stream) ; | |
909 | ||
910 | ||
911 | ||
912 | ||
913 | extern size_t fwrite (__const void *__restrict __ptr, size_t __size, | |
914 | size_t __n, FILE *__restrict __s) ; | |
915 | ||
916 | # 642 "/usr/include/gentoo-multilib/x86/stdio.h" 3 4 | |
917 | extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, | |
918 | size_t __n, FILE *__restrict __stream) ; | |
919 | extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size, | |
920 | size_t __n, FILE *__restrict __stream) ; | |
921 | ||
922 | ||
923 | ||
924 | ||
925 | ||
926 | ||
927 | ||
928 | ||
929 | extern int fseek (FILE *__stream, long int __off, int __whence); | |
930 | ||
931 | ||
932 | ||
933 | ||
934 | extern long int ftell (FILE *__stream) ; | |
935 | ||
936 | ||
937 | ||
938 | ||
939 | extern void rewind (FILE *__stream); | |
940 | ||
941 | # 678 "/usr/include/gentoo-multilib/x86/stdio.h" 3 4 | |
942 | extern int fseeko (FILE *__stream, __off_t __off, int __whence); | |
943 | ||
944 | ||
945 | ||
946 | ||
947 | extern __off_t ftello (FILE *__stream) ; | |
948 | # 697 "/usr/include/gentoo-multilib/x86/stdio.h" 3 4 | |
949 | ||
950 | ||
951 | ||
952 | ||
953 | ||
954 | ||
955 | extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos); | |
956 | ||
957 | ||
958 | ||
959 | ||
960 | extern int fsetpos (FILE *__stream, __const fpos_t *__pos); | |
961 | # 720 "/usr/include/gentoo-multilib/x86/stdio.h" 3 4 | |
962 | ||
963 | # 729 "/usr/include/gentoo-multilib/x86/stdio.h" 3 4 | |
964 | ||
965 | ||
966 | extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__)); | |
967 | ||
968 | extern int feof (FILE *__stream) __attribute__ ((__nothrow__)) ; | |
969 | ||
970 | extern int ferror (FILE *__stream) __attribute__ ((__nothrow__)) ; | |
971 | ||
972 | ||
973 | ||
974 | ||
975 | extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__)); | |
976 | extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ; | |
977 | extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ; | |
978 | ||
979 | ||
980 | ||
981 | ||
982 | ||
983 | ||
984 | ||
985 | ||
986 | extern void perror (__const char *__s); | |
987 | ||
988 | ||
989 | ||
990 | ||
991 | ||
992 | ||
993 | # 1 "/usr/include/bits/sys_errlist.h" 1 3 4 | |
994 | ||
995 | ||
996 | ||
997 | # 1 "/usr/include/gentoo-multilib/x86/bits/sys_errlist.h" 1 3 4 | |
998 | # 27 "/usr/include/gentoo-multilib/x86/bits/sys_errlist.h" 3 4 | |
999 | extern int sys_nerr; | |
1000 | extern __const char *__const sys_errlist[]; | |
1001 | # 5 "/usr/include/bits/sys_errlist.h" 2 3 4 | |
1002 | # 759 "/usr/include/gentoo-multilib/x86/stdio.h" 2 3 4 | |
1003 | ||
1004 | ||
1005 | ||
1006 | ||
1007 | extern int fileno (FILE *__stream) __attribute__ ((__nothrow__)) ; | |
1008 | ||
1009 | ||
1010 | ||
1011 | ||
1012 | extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ; | |
1013 | # 778 "/usr/include/gentoo-multilib/x86/stdio.h" 3 4 | |
1014 | extern FILE *popen (__const char *__command, __const char *__modes) ; | |
1015 | ||
1016 | ||
1017 | ||
1018 | ||
1019 | ||
1020 | extern int pclose (FILE *__stream); | |
1021 | ||
1022 | ||
1023 | ||
1024 | ||
1025 | ||
1026 | extern char *ctermid (char *__s) __attribute__ ((__nothrow__)); | |
1027 | # 818 "/usr/include/gentoo-multilib/x86/stdio.h" 3 4 | |
1028 | extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__)); | |
1029 | ||
1030 | ||
1031 | ||
1032 | extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__)) ; | |
1033 | ||
1034 | ||
1035 | extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__)); | |
1036 | # 839 "/usr/include/gentoo-multilib/x86/stdio.h" 3 4 | |
1037 | # 1 "/usr/include/bits/stdio.h" 1 3 4 | |
1038 | ||
1039 | ||
1040 | ||
1041 | # 1 "/usr/include/gentoo-multilib/x86/bits/stdio.h" 1 3 4 | |
1042 | # 33 "/usr/include/gentoo-multilib/x86/bits/stdio.h" 3 4 | |
1043 | extern __inline int | |
1044 | vprintf (__const char *__restrict __fmt, __gnuc_va_list __arg) | |
1045 | { | |
1046 | return vfprintf (stdout, __fmt, __arg); | |
1047 | } | |
1048 | ||
1049 | ||
1050 | extern __inline int | |
1051 | getchar (void) | |
1052 | { | |
1053 | return _IO_getc (stdin); | |
1054 | } | |
1055 | ||
1056 | ||
1057 | ||
1058 | ||
1059 | extern __inline int | |
1060 | fgetc_unlocked (FILE *__fp) | |
1061 | { | |
1062 | return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); | |
1063 | } | |
1064 | ||
1065 | ||
1066 | ||
1067 | ||
1068 | ||
1069 | extern __inline int | |
1070 | getc_unlocked (FILE *__fp) | |
1071 | { | |
1072 | return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); | |
1073 | } | |
1074 | ||
1075 | ||
1076 | extern __inline int | |
1077 | getchar_unlocked (void) | |
1078 | { | |
1079 | return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++); | |
1080 | } | |
1081 | ||
1082 | ||
1083 | ||
1084 | ||
1085 | extern __inline int | |
1086 | putchar (int __c) | |
1087 | { | |
1088 | return _IO_putc (__c, stdout); | |
1089 | } | |
1090 | ||
1091 | ||
1092 | ||
1093 | ||
1094 | extern __inline int | |
1095 | fputc_unlocked (int __c, FILE *__stream) | |
1096 | { | |
1097 | return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); | |
1098 | } | |
1099 | ||
1100 | ||
1101 | ||
1102 | ||
1103 | ||
1104 | extern __inline int | |
1105 | putc_unlocked (int __c, FILE *__stream) | |
1106 | { | |
1107 | return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); | |
1108 | } | |
1109 | ||
1110 | ||
1111 | extern __inline int | |
1112 | putchar_unlocked (int __c) | |
1113 | { | |
1114 | return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c))); | |
1115 | } | |
1116 | # 121 "/usr/include/gentoo-multilib/x86/bits/stdio.h" 3 4 | |
1117 | extern __inline int | |
1118 | __attribute__ ((__nothrow__)) feof_unlocked (FILE *__stream) | |
1119 | { | |
1120 | return (((__stream)->_flags & 0x10) != 0); | |
1121 | } | |
1122 | ||
1123 | ||
1124 | extern __inline int | |
1125 | __attribute__ ((__nothrow__)) ferror_unlocked (FILE *__stream) | |
1126 | { | |
1127 | return (((__stream)->_flags & 0x20) != 0); | |
1128 | } | |
1129 | # 5 "/usr/include/bits/stdio.h" 2 3 4 | |
1130 | # 840 "/usr/include/gentoo-multilib/x86/stdio.h" 2 3 4 | |
1131 | # 848 "/usr/include/gentoo-multilib/x86/stdio.h" 3 4 | |
1132 | ||
1133 | # 19 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.0-alpha20070615/include-fixed/stdio.h" 2 3 4 | |
1134 | # 56 "./util.h" 2 | |
1135 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.0-alpha20070615/include/stdarg.h" 1 3 4 | |
1136 | # 105 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.0-alpha20070615/include/stdarg.h" 3 4 | |
1137 | typedef __gnuc_va_list va_list; | |
1138 | # 57 "./util.h" 2 | |
1139 | ||
1140 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.0-alpha20070615/include/stddef.h" 1 3 4 | |
1141 | # 152 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.0-alpha20070615/include/stddef.h" 3 4 | |
1142 | typedef int ptrdiff_t; | |
1143 | # 59 "./util.h" 2 | |
1144 | # 1 "/usr/include/stdlib.h" 1 3 4 | |
1145 | ||
1146 | ||
1147 | ||
1148 | # 1 "/usr/include/gentoo-multilib/x86/stdlib.h" 1 3 4 | |
1149 | # 25 "/usr/include/gentoo-multilib/x86/stdlib.h" 3 4 | |
1150 | # 1 "/usr/include/features.h" 1 3 4 | |
1151 | # 26 "/usr/include/gentoo-multilib/x86/stdlib.h" 2 3 4 | |
1152 | ||
1153 | ||
1154 | ||
1155 | ||
1156 | ||
1157 | ||
1158 | ||
1159 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.0-alpha20070615/include/stddef.h" 1 3 4 | |
1160 | # 34 "/usr/include/gentoo-multilib/x86/stdlib.h" 2 3 4 | |
1161 | ||
1162 | ||
1163 | # 96 "/usr/include/gentoo-multilib/x86/stdlib.h" 3 4 | |
1164 | ||
1165 | ||
1166 | typedef struct | |
1167 | { | |
1168 | int quot; | |
1169 | int rem; | |
1170 | } div_t; | |
1171 | ||
1172 | ||
1173 | ||
1174 | typedef struct | |
1175 | { | |
1176 | long int quot; | |
1177 | long int rem; | |
1178 | } ldiv_t; | |
1179 | ||
1180 | ||
1181 | ||
1182 | # 140 "/usr/include/gentoo-multilib/x86/stdlib.h" 3 4 | |
1183 | extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__)) ; | |
1184 | ||
1185 | ||
1186 | ||
1187 | ||
1188 | extern double atof (__const char *__nptr) | |
1189 | __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; | |
1190 | ||
1191 | extern int atoi (__const char *__nptr) | |
1192 | __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; | |
1193 | ||
1194 | extern long int atol (__const char *__nptr) | |
1195 | __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; | |
1196 | ||
1197 | ||
1198 | ||
1199 | ||
1200 | ||
1201 | __extension__ extern long long int atoll (__const char *__nptr) | |
1202 | __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; | |
1203 | ||
1204 | ||
1205 | ||
1206 | ||
1207 | ||
1208 | extern double strtod (__const char *__restrict __nptr, | |
1209 | char **__restrict __endptr) | |
1210 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; | |
1211 | ||
1212 | # 182 "/usr/include/gentoo-multilib/x86/stdlib.h" 3 4 | |
1213 | ||
1214 | ||
1215 | extern long int strtol (__const char *__restrict __nptr, | |
1216 | char **__restrict __endptr, int __base) | |
1217 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; | |
1218 | ||
1219 | extern unsigned long int strtoul (__const char *__restrict __nptr, | |
1220 | char **__restrict __endptr, int __base) | |
1221 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; | |
1222 | ||
1223 | ||
1224 | ||
1225 | ||
1226 | __extension__ | |
1227 | extern long long int strtoq (__const char *__restrict __nptr, | |
1228 | char **__restrict __endptr, int __base) | |
1229 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; | |
1230 | ||
1231 | __extension__ | |
1232 | extern unsigned long long int strtouq (__const char *__restrict __nptr, | |
1233 | char **__restrict __endptr, int __base) | |
1234 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; | |
1235 | ||
1236 | ||
1237 | ||
1238 | ||
1239 | ||
1240 | __extension__ | |
1241 | extern long long int strtoll (__const char *__restrict __nptr, | |
1242 | char **__restrict __endptr, int __base) | |
1243 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; | |
1244 | ||
1245 | __extension__ | |
1246 | extern unsigned long long int strtoull (__const char *__restrict __nptr, | |
1247 | char **__restrict __endptr, int __base) | |
1248 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; | |
1249 | ||
1250 | # 279 "/usr/include/gentoo-multilib/x86/stdlib.h" 3 4 | |
1251 | extern double __strtod_internal (__const char *__restrict __nptr, | |
1252 | char **__restrict __endptr, int __group) | |
1253 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; | |
1254 | extern float __strtof_internal (__const char *__restrict __nptr, | |
1255 | char **__restrict __endptr, int __group) | |
1256 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; | |
1257 | extern long double __strtold_internal (__const char *__restrict __nptr, | |
1258 | char **__restrict __endptr, | |
1259 | int __group) | |
1260 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; | |
1261 | ||
1262 | extern long int __strtol_internal (__const char *__restrict __nptr, | |
1263 | char **__restrict __endptr, | |
1264 | int __base, int __group) | |
1265 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; | |
1266 | ||
1267 | ||
1268 | ||
1269 | extern unsigned long int __strtoul_internal (__const char *__restrict __nptr, | |
1270 | char **__restrict __endptr, | |
1271 | int __base, int __group) | |
1272 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; | |
1273 | ||
1274 | ||
1275 | ||
1276 | ||
1277 | __extension__ | |
1278 | extern long long int __strtoll_internal (__const char *__restrict __nptr, | |
1279 | char **__restrict __endptr, | |
1280 | int __base, int __group) | |
1281 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; | |
1282 | ||
1283 | ||
1284 | ||
1285 | __extension__ | |
1286 | extern unsigned long long int __strtoull_internal (__const char * | |
1287 | __restrict __nptr, | |
1288 | char **__restrict __endptr, | |
1289 | int __base, int __group) | |
1290 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; | |
1291 | ||
1292 | ||
1293 | ||
1294 | ||
1295 | ||
1296 | ||
1297 | ||
1298 | ||
1299 | extern __inline double | |
1300 | __attribute__ ((__nothrow__)) strtod (__const char *__restrict __nptr, char **__restrict __endptr) | |
1301 | { | |
1302 | return __strtod_internal (__nptr, __endptr, 0); | |
1303 | } | |
1304 | extern __inline long int | |
1305 | __attribute__ ((__nothrow__)) strtol (__const char *__restrict __nptr, char **__restrict __endptr, int __base) | |
1306 | ||
1307 | { | |
1308 | return __strtol_internal (__nptr, __endptr, __base, 0); | |
1309 | } | |
1310 | extern __inline unsigned long int | |
1311 | __attribute__ ((__nothrow__)) strtoul (__const char *__restrict __nptr, char **__restrict __endptr, int __base) | |
1312 | ||
1313 | { | |
1314 | return __strtoul_internal (__nptr, __endptr, __base, 0); | |
1315 | } | |
1316 | ||
1317 | # 364 "/usr/include/gentoo-multilib/x86/stdlib.h" 3 4 | |
1318 | __extension__ extern __inline long long int | |
1319 | __attribute__ ((__nothrow__)) strtoq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) | |
1320 | ||
1321 | { | |
1322 | return __strtoll_internal (__nptr, __endptr, __base, 0); | |
1323 | } | |
1324 | __extension__ extern __inline unsigned long long int | |
1325 | __attribute__ ((__nothrow__)) strtouq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) | |
1326 | ||
1327 | { | |
1328 | return __strtoull_internal (__nptr, __endptr, __base, 0); | |
1329 | } | |
1330 | ||
1331 | ||
1332 | ||
1333 | ||
1334 | __extension__ extern __inline long long int | |
1335 | __attribute__ ((__nothrow__)) strtoll (__const char *__restrict __nptr, char **__restrict __endptr, int __base) | |
1336 | ||
1337 | { | |
1338 | return __strtoll_internal (__nptr, __endptr, __base, 0); | |
1339 | } | |
1340 | __extension__ extern __inline unsigned long long int | |
1341 | __attribute__ ((__nothrow__)) strtoull (__const char * __restrict __nptr, char **__restrict __endptr, int __base) | |
1342 | ||
1343 | { | |
1344 | return __strtoull_internal (__nptr, __endptr, __base, 0); | |
1345 | } | |
1346 | ||
1347 | ||
1348 | ||
1349 | ||
1350 | extern __inline double | |
1351 | __attribute__ ((__nothrow__)) atof (__const char *__nptr) | |
1352 | { | |
1353 | return strtod (__nptr, (char **) ((void *)0)); | |
1354 | } | |
1355 | extern __inline int | |
1356 | __attribute__ ((__nothrow__)) atoi (__const char *__nptr) | |
1357 | { | |
1358 | return (int) strtol (__nptr, (char **) ((void *)0), 10); | |
1359 | } | |
1360 | extern __inline long int | |
1361 | __attribute__ ((__nothrow__)) atol (__const char *__nptr) | |
1362 | { | |
1363 | return strtol (__nptr, (char **) ((void *)0), 10); | |
1364 | } | |
1365 | ||
1366 | ||
1367 | ||
1368 | ||
1369 | __extension__ extern __inline long long int | |
1370 | __attribute__ ((__nothrow__)) atoll (__const char *__nptr) | |
1371 | { | |
1372 | return strtoll (__nptr, (char **) ((void *)0), 10); | |
1373 | } | |
1374 | ||
1375 | # 429 "/usr/include/gentoo-multilib/x86/stdlib.h" 3 4 | |
1376 | extern char *l64a (long int __n) __attribute__ ((__nothrow__)) ; | |
1377 | ||
1378 | ||
1379 | extern long int a64l (__const char *__s) | |
1380 | __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; | |
1381 | ||
1382 | ||
1383 | ||
1384 | ||
1385 | # 1 "/usr/include/sys/types.h" 1 3 4 | |
1386 | ||
1387 | ||
1388 | ||
1389 | # 1 "/usr/include/gentoo-multilib/x86/sys/types.h" 1 3 4 | |
1390 | # 27 "/usr/include/gentoo-multilib/x86/sys/types.h" 3 4 | |
1391 | # 1 "/usr/include/features.h" 1 3 4 | |
1392 | # 28 "/usr/include/gentoo-multilib/x86/sys/types.h" 2 3 4 | |
1393 | ||
1394 | ||
1395 | ||
1396 | # 1 "/usr/include/bits/types.h" 1 3 4 | |
1397 | # 32 "/usr/include/gentoo-multilib/x86/sys/types.h" 2 3 4 | |
1398 | ||
1399 | ||
1400 | ||
1401 | typedef __u_char u_char; | |
1402 | typedef __u_short u_short; | |
1403 | typedef __u_int u_int; | |
1404 | typedef __u_long u_long; | |
1405 | typedef __quad_t quad_t; | |
1406 | typedef __u_quad_t u_quad_t; | |
1407 | typedef __fsid_t fsid_t; | |
1408 | ||
1409 | ||
1410 | ||
1411 | ||
1412 | typedef __loff_t loff_t; | |
1413 | ||
1414 | ||
1415 | ||
1416 | typedef __ino_t ino_t; | |
1417 | # 62 "/usr/include/gentoo-multilib/x86/sys/types.h" 3 4 | |
1418 | typedef __dev_t dev_t; | |
1419 | ||
1420 | ||
1421 | ||
1422 | ||
1423 | typedef __gid_t gid_t; | |
1424 | ||
1425 | ||
1426 | ||
1427 | ||
1428 | typedef __mode_t mode_t; | |
1429 | ||
1430 | ||
1431 | ||
1432 | ||
1433 | typedef __nlink_t nlink_t; | |
1434 | ||
1435 | ||
1436 | ||
1437 | ||
1438 | typedef __uid_t uid_t; | |
1439 | ||
1440 | ||
1441 | ||
1442 | ||
1443 | ||
1444 | typedef __off_t off_t; | |
1445 | # 100 "/usr/include/gentoo-multilib/x86/sys/types.h" 3 4 | |
1446 | typedef __pid_t pid_t; | |
1447 | ||
1448 | ||
1449 | ||
1450 | ||
1451 | typedef __id_t id_t; | |
1452 | ||
1453 | ||
1454 | ||
1455 | ||
1456 | typedef __ssize_t ssize_t; | |
1457 | ||
1458 | ||
1459 | ||
1460 | ||
1461 | ||
1462 | typedef __daddr_t daddr_t; | |
1463 | typedef __caddr_t caddr_t; | |
1464 | ||
1465 | ||
1466 | ||
1467 | ||
1468 | ||
1469 | typedef __key_t key_t; | |
1470 | # 133 "/usr/include/gentoo-multilib/x86/sys/types.h" 3 4 | |
1471 | # 1 "/usr/include/time.h" 1 3 4 | |
1472 | ||
1473 | ||
1474 | ||
1475 | # 1 "/usr/include/gentoo-multilib/x86/time.h" 1 3 4 | |
1476 | # 73 "/usr/include/gentoo-multilib/x86/time.h" 3 4 | |
1477 | # 1 "/usr/include/bits/types.h" 1 3 4 | |
1478 | # 74 "/usr/include/gentoo-multilib/x86/time.h" 2 3 4 | |
1479 | ||
1480 | ||
1481 | ||
1482 | typedef __time_t time_t; | |
1483 | ||
1484 | ||
1485 | ||
1486 | # 90 "/usr/include/gentoo-multilib/x86/time.h" 3 4 | |
1487 | # 1 "/usr/include/bits/types.h" 1 3 4 | |
1488 | # 91 "/usr/include/gentoo-multilib/x86/time.h" 2 3 4 | |
1489 | ||
1490 | ||
1491 | typedef __clockid_t clockid_t; | |
1492 | # 102 "/usr/include/gentoo-multilib/x86/time.h" 3 4 | |
1493 | # 1 "/usr/include/bits/types.h" 1 3 4 | |
1494 | # 103 "/usr/include/gentoo-multilib/x86/time.h" 2 3 4 | |
1495 | ||
1496 | ||
1497 | typedef __timer_t timer_t; | |
1498 | # 5 "/usr/include/time.h" 2 3 4 | |
1499 | # 134 "/usr/include/gentoo-multilib/x86/sys/types.h" 2 3 4 | |
1500 | # 147 "/usr/include/gentoo-multilib/x86/sys/types.h" 3 4 | |
1501 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.0-alpha20070615/include/stddef.h" 1 3 4 | |
1502 | # 148 "/usr/include/gentoo-multilib/x86/sys/types.h" 2 3 4 | |
1503 | ||
1504 | ||
1505 | ||
1506 | typedef unsigned long int ulong; | |
1507 | typedef unsigned short int ushort; | |
1508 | typedef unsigned int uint; | |
1509 | # 195 "/usr/include/gentoo-multilib/x86/sys/types.h" 3 4 | |
1510 | typedef int int8_t __attribute__ ((__mode__ (__QI__))); | |
1511 | typedef int int16_t __attribute__ ((__mode__ (__HI__))); | |
1512 | typedef int int32_t __attribute__ ((__mode__ (__SI__))); | |
1513 | typedef int int64_t __attribute__ ((__mode__ (__DI__))); | |
1514 | ||
1515 | ||
1516 | typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))); | |
1517 | typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__))); | |
1518 | typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__))); | |
1519 | typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__))); | |
1520 | ||
1521 | typedef int register_t __attribute__ ((__mode__ (__word__))); | |
1522 | # 217 "/usr/include/gentoo-multilib/x86/sys/types.h" 3 4 | |
1523 | # 1 "/usr/include/endian.h" 1 3 4 | |
1524 | ||
1525 | ||
1526 | ||
1527 | # 1 "/usr/include/gentoo-multilib/x86/endian.h" 1 3 4 | |
1528 | # 22 "/usr/include/gentoo-multilib/x86/endian.h" 3 4 | |
1529 | # 1 "/usr/include/features.h" 1 3 4 | |
1530 | # 23 "/usr/include/gentoo-multilib/x86/endian.h" 2 3 4 | |
1531 | # 37 "/usr/include/gentoo-multilib/x86/endian.h" 3 4 | |
1532 | # 1 "/usr/include/bits/endian.h" 1 3 4 | |
1533 | ||
1534 | ||
1535 | ||
1536 | # 1 "/usr/include/gentoo-multilib/x86/bits/endian.h" 1 3 4 | |
1537 | # 5 "/usr/include/bits/endian.h" 2 3 4 | |
1538 | # 38 "/usr/include/gentoo-multilib/x86/endian.h" 2 3 4 | |
1539 | # 5 "/usr/include/endian.h" 2 3 4 | |
1540 | # 218 "/usr/include/gentoo-multilib/x86/sys/types.h" 2 3 4 | |
1541 | ||
1542 | ||
1543 | # 1 "/usr/include/sys/select.h" 1 3 4 | |
1544 | ||
1545 | ||
1546 | ||
1547 | # 1 "/usr/include/gentoo-multilib/x86/sys/select.h" 1 3 4 | |
1548 | # 25 "/usr/include/gentoo-multilib/x86/sys/select.h" 3 4 | |
1549 | # 1 "/usr/include/features.h" 1 3 4 | |
1550 | # 26 "/usr/include/gentoo-multilib/x86/sys/select.h" 2 3 4 | |
1551 | ||
1552 | ||
1553 | # 1 "/usr/include/bits/types.h" 1 3 4 | |
1554 | # 29 "/usr/include/gentoo-multilib/x86/sys/select.h" 2 3 4 | |
1555 | ||
1556 | ||
1557 | # 1 "/usr/include/bits/select.h" 1 3 4 | |
1558 | ||
1559 | ||
1560 | ||
1561 | # 1 "/usr/include/gentoo-multilib/x86/bits/select.h" 1 3 4 | |
1562 | # 5 "/usr/include/bits/select.h" 2 3 4 | |
1563 | # 32 "/usr/include/gentoo-multilib/x86/sys/select.h" 2 3 4 | |
1564 | ||
1565 | ||
1566 | # 1 "/usr/include/bits/sigset.h" 1 3 4 | |
1567 | ||
1568 | ||
1569 | ||
1570 | # 1 "/usr/include/gentoo-multilib/x86/bits/sigset.h" 1 3 4 | |
1571 | # 24 "/usr/include/gentoo-multilib/x86/bits/sigset.h" 3 4 | |
1572 | typedef int __sig_atomic_t; | |
1573 | ||
1574 | ||
1575 | ||
1576 | ||
1577 | typedef struct | |
1578 | { | |
1579 | unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; | |
1580 | } __sigset_t; | |
1581 | # 5 "/usr/include/bits/sigset.h" 2 3 4 | |
1582 | # 35 "/usr/include/gentoo-multilib/x86/sys/select.h" 2 3 4 | |
1583 | ||
1584 | ||
1585 | ||
1586 | typedef __sigset_t sigset_t; | |
1587 | ||
1588 | ||
1589 | ||
1590 | ||
1591 | ||
1592 | # 1 "/usr/include/time.h" 1 3 4 | |
1593 | ||
1594 | ||
1595 | ||
1596 | # 1 "/usr/include/gentoo-multilib/x86/time.h" 1 3 4 | |
1597 | # 117 "/usr/include/gentoo-multilib/x86/time.h" 3 4 | |
1598 | # 1 "/usr/include/bits/types.h" 1 3 4 | |
1599 | # 118 "/usr/include/gentoo-multilib/x86/time.h" 2 3 4 | |
1600 | ||
1601 | ||
1602 | ||
1603 | struct timespec | |
1604 | { | |
1605 | __time_t tv_sec; | |
1606 | long int tv_nsec; | |
1607 | }; | |
1608 | # 5 "/usr/include/time.h" 2 3 4 | |
1609 | # 45 "/usr/include/gentoo-multilib/x86/sys/select.h" 2 3 4 | |
1610 | ||
1611 | # 1 "/usr/include/bits/time.h" 1 3 4 | |
1612 | ||
1613 | ||
1614 | ||
1615 | # 1 "/usr/include/gentoo-multilib/x86/bits/time.h" 1 3 4 | |
1616 | # 65 "/usr/include/gentoo-multilib/x86/bits/time.h" 3 4 | |
1617 | # 1 "/usr/include/bits/types.h" 1 3 4 | |
1618 | # 66 "/usr/include/gentoo-multilib/x86/bits/time.h" 2 3 4 | |
1619 | ||
1620 | ||
1621 | ||
1622 | struct timeval | |
1623 | { | |
1624 | __time_t tv_sec; | |
1625 | __suseconds_t tv_usec; | |
1626 | }; | |
1627 | # 5 "/usr/include/bits/time.h" 2 3 4 | |
1628 | # 47 "/usr/include/gentoo-multilib/x86/sys/select.h" 2 3 4 | |
1629 | ||
1630 | ||
1631 | typedef __suseconds_t suseconds_t; | |
1632 | ||
1633 | ||
1634 | ||
1635 | ||
1636 | ||
1637 | typedef long int __fd_mask; | |
1638 | # 67 "/usr/include/gentoo-multilib/x86/sys/select.h" 3 4 | |
1639 | typedef struct | |
1640 | { | |
1641 | ||
1642 | ||
1643 | ||
1644 | ||
1645 | ||
1646 | ||
1647 | __fd_mask __fds_bits[1024 / (8 * sizeof (__fd_mask))]; | |
1648 | ||
1649 | ||
1650 | } fd_set; | |
1651 | ||
1652 | ||
1653 | ||
1654 | ||
1655 | ||
1656 | ||
1657 | typedef __fd_mask fd_mask; | |
1658 | # 99 "/usr/include/gentoo-multilib/x86/sys/select.h" 3 4 | |
1659 | ||
1660 | # 109 "/usr/include/gentoo-multilib/x86/sys/select.h" 3 4 | |
1661 | extern int select (int __nfds, fd_set *__restrict __readfds, | |
1662 | fd_set *__restrict __writefds, | |
1663 | fd_set *__restrict __exceptfds, | |
1664 | struct timeval *__restrict __timeout); | |
1665 | # 121 "/usr/include/gentoo-multilib/x86/sys/select.h" 3 4 | |
1666 | extern int pselect (int __nfds, fd_set *__restrict __readfds, | |
1667 | fd_set *__restrict __writefds, | |
1668 | fd_set *__restrict __exceptfds, | |
1669 | const struct timespec *__restrict __timeout, | |
1670 | const __sigset_t *__restrict __sigmask); | |
1671 | ||
1672 | ||
1673 | ||
1674 | # 5 "/usr/include/sys/select.h" 2 3 4 | |
1675 | # 221 "/usr/include/gentoo-multilib/x86/sys/types.h" 2 3 4 | |
1676 | ||
1677 | ||
1678 | # 1 "/usr/include/sys/sysmacros.h" 1 3 4 | |
1679 | ||
1680 | ||
1681 | ||
1682 | # 1 "/usr/include/gentoo-multilib/x86/sys/sysmacros.h" 1 3 4 | |
1683 | # 24 "/usr/include/gentoo-multilib/x86/sys/sysmacros.h" 3 4 | |
1684 | # 1 "/usr/include/features.h" 1 3 4 | |
1685 | # 25 "/usr/include/gentoo-multilib/x86/sys/sysmacros.h" 2 3 4 | |
1686 | ||
1687 | ||
1688 | ||
1689 | ||
1690 | ||
1691 | __extension__ | |
1692 | extern __inline unsigned int gnu_dev_major (unsigned long long int __dev) | |
1693 | __attribute__ ((__nothrow__)); | |
1694 | __extension__ | |
1695 | extern __inline unsigned int gnu_dev_minor (unsigned long long int __dev) | |
1696 | __attribute__ ((__nothrow__)); | |
1697 | __extension__ | |
1698 | extern __inline unsigned long long int gnu_dev_makedev (unsigned int __major, | |
1699 | unsigned int __minor) | |
1700 | __attribute__ ((__nothrow__)); | |
1701 | ||
1702 | ||
1703 | __extension__ extern __inline unsigned int | |
1704 | __attribute__ ((__nothrow__)) gnu_dev_major (unsigned long long int __dev) | |
1705 | { | |
1706 | return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); | |
1707 | } | |
1708 | ||
1709 | __extension__ extern __inline unsigned int | |
1710 | __attribute__ ((__nothrow__)) gnu_dev_minor (unsigned long long int __dev) | |
1711 | { | |
1712 | return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); | |
1713 | } | |
1714 | ||
1715 | __extension__ extern __inline unsigned long long int | |
1716 | __attribute__ ((__nothrow__)) gnu_dev_makedev (unsigned int __major, unsigned int __minor) | |
1717 | { | |
1718 | return ((__minor & 0xff) | ((__major & 0xfff) << 8) | |
1719 | | (((unsigned long long int) (__minor & ~0xff)) << 12) | |
1720 | | (((unsigned long long int) (__major & ~0xfff)) << 32)); | |
1721 | } | |
1722 | # 5 "/usr/include/sys/sysmacros.h" 2 3 4 | |
1723 | # 224 "/usr/include/gentoo-multilib/x86/sys/types.h" 2 3 4 | |
1724 | # 235 "/usr/include/gentoo-multilib/x86/sys/types.h" 3 4 | |
1725 | typedef __blkcnt_t blkcnt_t; | |
1726 | ||
1727 | ||
1728 | ||
1729 | typedef __fsblkcnt_t fsblkcnt_t; | |
1730 | ||
1731 | ||
1732 | ||
1733 | typedef __fsfilcnt_t fsfilcnt_t; | |
1734 | # 270 "/usr/include/gentoo-multilib/x86/sys/types.h" 3 4 | |
1735 | # 1 "/usr/include/bits/pthreadtypes.h" 1 3 4 | |
1736 | ||
1737 | ||
1738 | ||
1739 | # 1 "/usr/include/gentoo-multilib/x86/bits/pthreadtypes.h" 1 3 4 | |
1740 | # 36 "/usr/include/gentoo-multilib/x86/bits/pthreadtypes.h" 3 4 | |
1741 | typedef unsigned long int pthread_t; | |
1742 | ||
1743 | ||
1744 | typedef union | |
1745 | { | |
1746 | char __size[36]; | |
1747 | long int __align; | |
1748 | } pthread_attr_t; | |
1749 | ||
1750 | ||
1751 | typedef struct __pthread_internal_slist | |
1752 | { | |
1753 | struct __pthread_internal_slist *__next; | |
1754 | } __pthread_slist_t; | |
1755 | ||
1756 | ||
1757 | ||
1758 | ||
1759 | typedef union | |
1760 | { | |
1761 | struct __pthread_mutex_s | |
1762 | { | |
1763 | int __lock; | |
1764 | unsigned int __count; | |
1765 | int __owner; | |
1766 | ||
1767 | ||
1768 | int __kind; | |
1769 | unsigned int __nusers; | |
1770 | __extension__ union | |
1771 | { | |
1772 | int __spins; | |
1773 | __pthread_slist_t __list; | |
1774 | }; | |
1775 | } __data; | |
1776 | char __size[24]; | |
1777 | long int __align; | |
1778 | } pthread_mutex_t; | |
1779 | ||
1780 | typedef union | |
1781 | { | |
1782 | char __size[4]; | |
1783 | long int __align; | |
1784 | } pthread_mutexattr_t; | |
1785 | ||
1786 | ||
1787 | ||
1788 | ||
1789 | typedef union | |
1790 | { | |
1791 | struct | |
1792 | { | |
1793 | int __lock; | |
1794 | unsigned int __futex; | |
1795 | __extension__ unsigned long long int __total_seq; | |
1796 | __extension__ unsigned long long int __wakeup_seq; | |
1797 | __extension__ unsigned long long int __woken_seq; | |
1798 | void *__mutex; | |
1799 | unsigned int __nwaiters; | |
1800 | unsigned int __broadcast_seq; | |
1801 | } __data; | |
1802 | char __size[48]; | |
1803 | __extension__ long long int __align; | |
1804 | } pthread_cond_t; | |
1805 | ||
1806 | typedef union | |
1807 | { | |
1808 | char __size[4]; | |
1809 | long int __align; | |
1810 | } pthread_condattr_t; | |
1811 | ||
1812 | ||
1813 | ||
1814 | typedef unsigned int pthread_key_t; | |
1815 | ||
1816 | ||
1817 | ||
1818 | typedef int pthread_once_t; | |
1819 | ||
1820 | ||
1821 | ||
1822 | ||
1823 | ||
1824 | typedef union | |
1825 | { | |
1826 | struct | |
1827 | { | |
1828 | int __lock; | |
1829 | unsigned int __nr_readers; | |
1830 | unsigned int __readers_wakeup; | |
1831 | unsigned int __writer_wakeup; | |
1832 | unsigned int __nr_readers_queued; | |
1833 | unsigned int __nr_writers_queued; | |
1834 | ||
1835 | ||
1836 | unsigned int __flags; | |
1837 | int __writer; | |
1838 | } __data; | |
1839 | char __size[32]; | |
1840 | long int __align; | |
1841 | } pthread_rwlock_t; | |
1842 | ||
1843 | typedef union | |
1844 | { | |
1845 | char __size[8]; | |
1846 | long int __align; | |
1847 | } pthread_rwlockattr_t; | |
1848 | ||
1849 | ||
1850 | ||
1851 | ||
1852 | ||
1853 | typedef volatile int pthread_spinlock_t; | |
1854 | ||
1855 | ||
1856 | ||
1857 | ||
1858 | typedef union | |
1859 | { | |
1860 | char __size[20]; | |
1861 | long int __align; | |
1862 | } pthread_barrier_t; | |
1863 | ||
1864 | typedef union | |
1865 | { | |
1866 | char __size[4]; | |
1867 | int __align; | |
1868 | } pthread_barrierattr_t; | |
1869 | # 5 "/usr/include/bits/pthreadtypes.h" 2 3 4 | |
1870 | # 271 "/usr/include/gentoo-multilib/x86/sys/types.h" 2 3 4 | |
1871 | ||
1872 | ||
1873 | ||
1874 | # 5 "/usr/include/sys/types.h" 2 3 4 | |
1875 | # 439 "/usr/include/gentoo-multilib/x86/stdlib.h" 2 3 4 | |
1876 | ||
1877 | ||
1878 | ||
1879 | ||
1880 | ||
1881 | ||
1882 | extern long int random (void) __attribute__ ((__nothrow__)); | |
1883 | ||
1884 | ||
1885 | extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__)); | |
1886 | ||
1887 | ||
1888 | ||
1889 | ||
1890 | ||
1891 | extern char *initstate (unsigned int __seed, char *__statebuf, | |
1892 | size_t __statelen) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); | |
1893 | ||
1894 | ||
1895 | ||
1896 | extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); | |
1897 | ||
1898 | ||
1899 | ||
1900 | ||
1901 | ||
1902 | ||
1903 | ||
1904 | struct random_data | |
1905 | { | |
1906 | int32_t *fptr; | |
1907 | int32_t *rptr; | |
1908 | int32_t *state; | |
1909 | int rand_type; | |
1910 | int rand_deg; | |
1911 | int rand_sep; | |
1912 | int32_t *end_ptr; | |
1913 | }; | |
1914 | ||
1915 | extern int random_r (struct random_data *__restrict __buf, | |
1916 | int32_t *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); | |
1917 | ||
1918 | extern int srandom_r (unsigned int __seed, struct random_data *__buf) | |
1919 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); | |
1920 | ||
1921 | extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, | |
1922 | size_t __statelen, | |
1923 | struct random_data *__restrict __buf) | |
1924 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4))); | |
1925 | ||
1926 | extern int setstate_r (char *__restrict __statebuf, | |
1927 | struct random_data *__restrict __buf) | |
1928 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); | |
1929 | ||
1930 | ||
1931 | ||
1932 | ||
1933 | ||
1934 | ||
1935 | extern int rand (void) __attribute__ ((__nothrow__)); | |
1936 | ||
1937 | extern void srand (unsigned int __seed) __attribute__ ((__nothrow__)); | |
1938 | ||
1939 | ||
1940 | ||
1941 | ||
1942 | extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__)); | |
1943 | ||
1944 | ||
1945 | ||
1946 | ||
1947 | ||
1948 | ||
1949 | ||
1950 | extern double drand48 (void) __attribute__ ((__nothrow__)); | |
1951 | extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); | |
1952 | ||
1953 | ||
1954 | extern long int lrand48 (void) __attribute__ ((__nothrow__)); | |
1955 | extern long int nrand48 (unsigned short int __xsubi[3]) | |
1956 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); | |
1957 | ||
1958 | ||
1959 | extern long int mrand48 (void) __attribute__ ((__nothrow__)); | |
1960 | extern long int jrand48 (unsigned short int __xsubi[3]) | |
1961 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); | |
1962 | ||
1963 | ||
1964 | extern void srand48 (long int __seedval) __attribute__ ((__nothrow__)); | |
1965 | extern unsigned short int *seed48 (unsigned short int __seed16v[3]) | |
1966 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); | |
1967 | extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); | |
1968 | ||
1969 | ||
1970 | ||
1971 | ||
1972 | ||
1973 | struct drand48_data | |
1974 | { | |
1975 | unsigned short int __x[3]; | |
1976 | unsigned short int __old_x[3]; | |
1977 | unsigned short int __c; | |
1978 | unsigned short int __init; | |
1979 | unsigned long long int __a; | |
1980 | }; | |
1981 | ||
1982 | ||
1983 | extern int drand48_r (struct drand48_data *__restrict __buffer, | |
1984 | double *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); | |
1985 | extern int erand48_r (unsigned short int __xsubi[3], | |
1986 | struct drand48_data *__restrict __buffer, | |
1987 | double *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); | |
1988 | ||
1989 | ||
1990 | extern int lrand48_r (struct drand48_data *__restrict __buffer, | |
1991 | long int *__restrict __result) | |
1992 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); | |
1993 | extern int nrand48_r (unsigned short int __xsubi[3], | |
1994 | struct drand48_data *__restrict __buffer, | |
1995 | long int *__restrict __result) | |
1996 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); | |
1997 | ||
1998 | ||
1999 | extern int mrand48_r (struct drand48_data *__restrict __buffer, | |
2000 | long int *__restrict __result) | |
2001 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); | |
2002 | extern int jrand48_r (unsigned short int __xsubi[3], | |
2003 | struct drand48_data *__restrict __buffer, | |
2004 | long int *__restrict __result) | |
2005 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); | |
2006 | ||
2007 | ||
2008 | extern int srand48_r (long int __seedval, struct drand48_data *__buffer) | |
2009 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); | |
2010 | ||
2011 | extern int seed48_r (unsigned short int __seed16v[3], | |
2012 | struct drand48_data *__buffer) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); | |
2013 | ||
2014 | extern int lcong48_r (unsigned short int __param[7], | |
2015 | struct drand48_data *__buffer) | |
2016 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); | |
2017 | ||
2018 | ||
2019 | ||
2020 | ||
2021 | ||
2022 | ||
2023 | ||
2024 | ||
2025 | ||
2026 | extern void *malloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ; | |
2027 | ||
2028 | extern void *calloc (size_t __nmemb, size_t __size) | |
2029 | __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ; | |
2030 | ||
2031 | ||
2032 | ||
2033 | ||
2034 | ||
2035 | ||
2036 | ||
2037 | extern void *realloc (void *__ptr, size_t __size) | |
2038 | __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); | |
2039 | ||
2040 | extern void free (void *__ptr) __attribute__ ((__nothrow__)); | |
2041 | ||
2042 | ||
2043 | ||
2044 | ||
2045 | extern void cfree (void *__ptr) __attribute__ ((__nothrow__)); | |
2046 | ||
2047 | ||
2048 | ||
2049 | # 1 "/usr/include/alloca.h" 1 3 4 | |
2050 | ||
2051 | ||
2052 | ||
2053 | # 1 "/usr/include/gentoo-multilib/x86/alloca.h" 1 3 4 | |
2054 | # 22 "/usr/include/gentoo-multilib/x86/alloca.h" 3 4 | |
2055 | # 1 "/usr/include/features.h" 1 3 4 | |
2056 | # 23 "/usr/include/gentoo-multilib/x86/alloca.h" 2 3 4 | |
2057 | ||
2058 | ||
2059 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.0-alpha20070615/include/stddef.h" 1 3 4 | |
2060 | # 26 "/usr/include/gentoo-multilib/x86/alloca.h" 2 3 4 | |
2061 | ||
2062 | ||
2063 | ||
2064 | ||
2065 | ||
2066 | ||
2067 | ||
2068 | extern void *alloca (size_t __size) __attribute__ ((__nothrow__)); | |
2069 | ||
2070 | ||
2071 | ||
2072 | ||
2073 | ||
2074 | ||
2075 | # 5 "/usr/include/alloca.h" 2 3 4 | |
2076 | # 613 "/usr/include/gentoo-multilib/x86/stdlib.h" 2 3 4 | |
2077 | ||
2078 | ||
2079 | ||
2080 | ||
2081 | extern void *valloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ; | |
2082 | ||
2083 | ||
2084 | ||
2085 | ||
2086 | extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) | |
2087 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; | |
2088 | ||
2089 | ||
2090 | ||
2091 | ||
2092 | extern void abort (void) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); | |
2093 | ||
2094 | ||
2095 | ||
2096 | extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); | |
2097 | ||
2098 | ||
2099 | ||
2100 | ||
2101 | ||
2102 | extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) | |
2103 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); | |
2104 | ||
2105 | ||
2106 | ||
2107 | ||
2108 | ||
2109 | ||
2110 | extern void exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); | |
2111 | ||
2112 | # 658 "/usr/include/gentoo-multilib/x86/stdlib.h" 3 4 | |
2113 | ||
2114 | ||
2115 | extern char *getenv (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; | |
2116 | ||
2117 | ||
2118 | ||
2119 | ||
2120 | extern char *__secure_getenv (__const char *__name) | |
2121 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; | |
2122 | ||
2123 | ||
2124 | ||
2125 | ||
2126 | ||
2127 | extern int putenv (char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); | |
2128 | ||
2129 | ||
2130 | ||
2131 | ||
2132 | ||
2133 | extern int setenv (__const char *__name, __const char *__value, int __replace) | |
2134 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); | |
2135 | ||
2136 | ||
2137 | extern int unsetenv (__const char *__name) __attribute__ ((__nothrow__)); | |
2138 | ||
2139 | ||
2140 | ||
2141 | ||
2142 | ||
2143 | ||
2144 | extern int clearenv (void) __attribute__ ((__nothrow__)); | |
2145 | # 698 "/usr/include/gentoo-multilib/x86/stdlib.h" 3 4 | |
2146 | extern char *mktemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; | |
2147 | # 709 "/usr/include/gentoo-multilib/x86/stdlib.h" 3 4 | |
2148 | extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) ; | |
2149 | # 729 "/usr/include/gentoo-multilib/x86/stdlib.h" 3 4 | |
2150 | extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; | |
2151 | ||
2152 | ||
2153 | ||
2154 | ||
2155 | ||
2156 | ||
2157 | ||
2158 | ||
2159 | extern int system (__const char *__command) ; | |
2160 | ||
2161 | # 755 "/usr/include/gentoo-multilib/x86/stdlib.h" 3 4 | |
2162 | extern char *realpath (__const char *__restrict __name, | |
2163 | char *__restrict __resolved) __attribute__ ((__nothrow__)) ; | |
2164 | ||
2165 | ||
2166 | ||
2167 | ||
2168 | ||
2169 | ||
2170 | typedef int (*__compar_fn_t) (__const void *, __const void *); | |
2171 | ||
2172 | ||
2173 | ||
2174 | ||
2175 | ||
2176 | ||
2177 | ||
2178 | ||
2179 | ||
2180 | extern void *bsearch (__const void *__key, __const void *__base, | |
2181 | size_t __nmemb, size_t __size, __compar_fn_t __compar) | |
2182 | __attribute__ ((__nonnull__ (1, 2, 5))) ; | |
2183 | ||
2184 | ||
2185 | ||
2186 | extern void qsort (void *__base, size_t __nmemb, size_t __size, | |
2187 | __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4))); | |
2188 | ||
2189 | ||
2190 | ||
2191 | extern int abs (int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ; | |
2192 | extern long int labs (long int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ; | |
2193 | ||
2194 | ||
2195 | ||
2196 | ||
2197 | ||
2198 | ||
2199 | ||
2200 | ||
2201 | ||
2202 | ||
2203 | ||
2204 | ||
2205 | extern div_t div (int __numer, int __denom) | |
2206 | __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ; | |
2207 | extern ldiv_t ldiv (long int __numer, long int __denom) | |
2208 | __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ; | |
2209 | ||
2210 | # 820 "/usr/include/gentoo-multilib/x86/stdlib.h" 3 4 | |
2211 | extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, | |
2212 | int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ; | |
2213 | ||
2214 | ||
2215 | ||
2216 | ||
2217 | extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, | |
2218 | int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ; | |
2219 | ||
2220 | ||
2221 | ||
2222 | ||
2223 | extern char *gcvt (double __value, int __ndigit, char *__buf) | |
2224 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))) ; | |
2225 | ||
2226 | ||
2227 | ||
2228 | ||
2229 | extern char *qecvt (long double __value, int __ndigit, | |
2230 | int *__restrict __decpt, int *__restrict __sign) | |
2231 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ; | |
2232 | extern char *qfcvt (long double __value, int __ndigit, | |
2233 | int *__restrict __decpt, int *__restrict __sign) | |
2234 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ; | |
2235 | extern char *qgcvt (long double __value, int __ndigit, char *__buf) | |
2236 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))) ; | |
2237 | ||
2238 | ||
2239 | ||
2240 | ||
2241 | extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, | |
2242 | int *__restrict __sign, char *__restrict __buf, | |
2243 | size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5))); | |
2244 | extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, | |
2245 | int *__restrict __sign, char *__restrict __buf, | |
2246 | size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5))); | |
2247 | ||
2248 | extern int qecvt_r (long double __value, int __ndigit, | |
2249 | int *__restrict __decpt, int *__restrict __sign, | |
2250 | char *__restrict __buf, size_t __len) | |
2251 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5))); | |
2252 | extern int qfcvt_r (long double __value, int __ndigit, | |
2253 | int *__restrict __decpt, int *__restrict __sign, | |
2254 | char *__restrict __buf, size_t __len) | |
2255 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5))); | |
2256 | ||
2257 | ||
2258 | ||
2259 | ||
2260 | ||
2261 | ||
2262 | ||
2263 | extern int mblen (__const char *__s, size_t __n) __attribute__ ((__nothrow__)) ; | |
2264 | ||
2265 | ||
2266 | extern int mbtowc (wchar_t *__restrict __pwc, | |
2267 | __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__)) ; | |
2268 | ||
2269 | ||
2270 | extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__)) ; | |
2271 | ||
2272 | ||
2273 | ||
2274 | extern size_t mbstowcs (wchar_t *__restrict __pwcs, | |
2275 | __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__)); | |
2276 | ||
2277 | extern size_t wcstombs (char *__restrict __s, | |
2278 | __const wchar_t *__restrict __pwcs, size_t __n) | |
2279 | __attribute__ ((__nothrow__)); | |
2280 | ||
2281 | ||
2282 | ||
2283 | ||
2284 | ||
2285 | ||
2286 | ||
2287 | ||
2288 | extern int rpmatch (__const char *__response) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; | |
2289 | # 925 "/usr/include/gentoo-multilib/x86/stdlib.h" 3 4 | |
2290 | extern int posix_openpt (int __oflag) ; | |
2291 | # 960 "/usr/include/gentoo-multilib/x86/stdlib.h" 3 4 | |
2292 | extern int getloadavg (double __loadavg[], int __nelem) | |
2293 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); | |
2294 | # 976 "/usr/include/gentoo-multilib/x86/stdlib.h" 3 4 | |
2295 | ||
2296 | # 5 "/usr/include/stdlib.h" 2 3 4 | |
2297 | # 60 "./util.h" 2 | |
2298 | # 1 "/usr/include/string.h" 1 3 4 | |
2299 | ||
2300 | ||
2301 | ||
2302 | # 1 "/usr/include/gentoo-multilib/x86/string.h" 1 3 4 | |
2303 | # 26 "/usr/include/gentoo-multilib/x86/string.h" 3 4 | |
2304 | # 1 "/usr/include/features.h" 1 3 4 | |
2305 | # 27 "/usr/include/gentoo-multilib/x86/string.h" 2 3 4 | |
2306 | ||
2307 | ||
2308 | ||
2309 | ||
2310 | ||
2311 | ||
2312 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.0-alpha20070615/include/stddef.h" 1 3 4 | |
2313 | # 34 "/usr/include/gentoo-multilib/x86/string.h" 2 3 4 | |
2314 | ||
2315 | ||
2316 | ||
2317 | ||
2318 | extern void *memcpy (void *__restrict __dest, | |
2319 | __const void *__restrict __src, size_t __n) | |
2320 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); | |
2321 | ||
2322 | ||
2323 | extern void *memmove (void *__dest, __const void *__src, size_t __n) | |
2324 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); | |
2325 | ||
2326 | ||
2327 | ||
2328 | ||
2329 | ||
2330 | ||
2331 | extern void *memccpy (void *__restrict __dest, __const void *__restrict __src, | |
2332 | int __c, size_t __n) | |
2333 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); | |
2334 | ||
2335 | ||
2336 | ||
2337 | ||
2338 | ||
2339 | extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); | |
2340 | ||
2341 | ||
2342 | extern int memcmp (__const void *__s1, __const void *__s2, size_t __n) | |
2343 | __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
2344 | ||
2345 | ||
2346 | extern void *memchr (__const void *__s, int __c, size_t __n) | |
2347 | __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
2348 | ||
2349 | # 82 "/usr/include/gentoo-multilib/x86/string.h" 3 4 | |
2350 | ||
2351 | ||
2352 | extern char *strcpy (char *__restrict __dest, __const char *__restrict __src) | |
2353 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); | |
2354 | ||
2355 | extern char *strncpy (char *__restrict __dest, | |
2356 | __const char *__restrict __src, size_t __n) | |
2357 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); | |
2358 | ||
2359 | ||
2360 | extern char *strcat (char *__restrict __dest, __const char *__restrict __src) | |
2361 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); | |
2362 | ||
2363 | extern char *strncat (char *__restrict __dest, __const char *__restrict __src, | |
2364 | size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); | |
2365 | ||
2366 | ||
2367 | extern int strcmp (__const char *__s1, __const char *__s2) | |
2368 | __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
2369 | ||
2370 | extern int strncmp (__const char *__s1, __const char *__s2, size_t __n) | |
2371 | __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
2372 | ||
2373 | ||
2374 | extern int strcoll (__const char *__s1, __const char *__s2) | |
2375 | __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
2376 | ||
2377 | extern size_t strxfrm (char *__restrict __dest, | |
2378 | __const char *__restrict __src, size_t __n) | |
2379 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); | |
2380 | ||
2381 | # 130 "/usr/include/gentoo-multilib/x86/string.h" 3 4 | |
2382 | extern char *strdup (__const char *__s) | |
2383 | __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); | |
2384 | # 165 "/usr/include/gentoo-multilib/x86/string.h" 3 4 | |
2385 | ||
2386 | ||
2387 | extern char *strchr (__const char *__s, int __c) | |
2388 | __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
2389 | ||
2390 | extern char *strrchr (__const char *__s, int __c) | |
2391 | __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
2392 | ||
2393 | # 181 "/usr/include/gentoo-multilib/x86/string.h" 3 4 | |
2394 | ||
2395 | ||
2396 | ||
2397 | extern size_t strcspn (__const char *__s, __const char *__reject) | |
2398 | __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
2399 | ||
2400 | ||
2401 | extern size_t strspn (__const char *__s, __const char *__accept) | |
2402 | __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
2403 | ||
2404 | extern char *strpbrk (__const char *__s, __const char *__accept) | |
2405 | __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
2406 | ||
2407 | extern char *strstr (__const char *__haystack, __const char *__needle) | |
2408 | __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
2409 | ||
2410 | ||
2411 | ||
2412 | extern char *strtok (char *__restrict __s, __const char *__restrict __delim) | |
2413 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); | |
2414 | ||
2415 | ||
2416 | ||
2417 | ||
2418 | extern char *__strtok_r (char *__restrict __s, | |
2419 | __const char *__restrict __delim, | |
2420 | char **__restrict __save_ptr) | |
2421 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); | |
2422 | ||
2423 | extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim, | |
2424 | char **__restrict __save_ptr) | |
2425 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); | |
2426 | # 240 "/usr/include/gentoo-multilib/x86/string.h" 3 4 | |
2427 | ||
2428 | ||
2429 | extern size_t strlen (__const char *__s) | |
2430 | __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
2431 | ||
2432 | # 254 "/usr/include/gentoo-multilib/x86/string.h" 3 4 | |
2433 | ||
2434 | ||
2435 | extern char *strerror (int __errnum) __attribute__ ((__nothrow__)); | |
2436 | ||
2437 | # 270 "/usr/include/gentoo-multilib/x86/string.h" 3 4 | |
2438 | extern int strerror_r (int __errnum, char *__buf, size_t __buflen) __asm__ ("" "__xpg_strerror_r") __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); | |
2439 | # 294 "/usr/include/gentoo-multilib/x86/string.h" 3 4 | |
2440 | extern void __bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); | |
2441 | ||
2442 | ||
2443 | ||
2444 | extern void bcopy (__const void *__src, void *__dest, size_t __n) | |
2445 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); | |
2446 | ||
2447 | ||
2448 | extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); | |
2449 | ||
2450 | ||
2451 | extern int bcmp (__const void *__s1, __const void *__s2, size_t __n) | |
2452 | __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
2453 | ||
2454 | ||
2455 | extern char *index (__const char *__s, int __c) | |
2456 | __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
2457 | ||
2458 | ||
2459 | extern char *rindex (__const char *__s, int __c) | |
2460 | __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
2461 | ||
2462 | ||
2463 | ||
2464 | extern int ffs (int __i) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); | |
2465 | # 331 "/usr/include/gentoo-multilib/x86/string.h" 3 4 | |
2466 | extern int strcasecmp (__const char *__s1, __const char *__s2) | |
2467 | __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
2468 | ||
2469 | ||
2470 | extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n) | |
2471 | __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
2472 | # 354 "/usr/include/gentoo-multilib/x86/string.h" 3 4 | |
2473 | extern char *strsep (char **__restrict __stringp, | |
2474 | __const char *__restrict __delim) | |
2475 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); | |
2476 | # 420 "/usr/include/gentoo-multilib/x86/string.h" 3 4 | |
2477 | # 1 "/usr/include/bits/string.h" 1 3 4 | |
2478 | ||
2479 | ||
2480 | ||
2481 | # 1 "/usr/include/gentoo-multilib/x86/bits/string.h" 1 3 4 | |
2482 | # 5 "/usr/include/bits/string.h" 2 3 4 | |
2483 | # 421 "/usr/include/gentoo-multilib/x86/string.h" 2 3 4 | |
2484 | ||
2485 | ||
2486 | # 1 "/usr/include/bits/string2.h" 1 3 4 | |
2487 | ||
2488 | ||
2489 | ||
2490 | # 1 "/usr/include/gentoo-multilib/x86/bits/string2.h" 1 3 4 | |
2491 | # 52 "/usr/include/gentoo-multilib/x86/bits/string2.h" 3 4 | |
2492 | # 1 "/usr/include/endian.h" 1 3 4 | |
2493 | # 53 "/usr/include/gentoo-multilib/x86/bits/string2.h" 2 3 4 | |
2494 | # 1 "/usr/include/bits/types.h" 1 3 4 | |
2495 | # 54 "/usr/include/gentoo-multilib/x86/bits/string2.h" 2 3 4 | |
2496 | # 394 "/usr/include/gentoo-multilib/x86/bits/string2.h" 3 4 | |
2497 | extern void *__rawmemchr (const void *__s, int __c); | |
2498 | # 969 "/usr/include/gentoo-multilib/x86/bits/string2.h" 3 4 | |
2499 | extern __inline size_t __strcspn_c1 (__const char *__s, int __reject); | |
2500 | extern __inline size_t | |
2501 | __strcspn_c1 (__const char *__s, int __reject) | |
2502 | { | |
2503 | register size_t __result = 0; | |
2504 | while (__s[__result] != '\0' && __s[__result] != __reject) | |
2505 | ++__result; | |
2506 | return __result; | |
2507 | } | |
2508 | ||
2509 | extern __inline size_t __strcspn_c2 (__const char *__s, int __reject1, | |
2510 | int __reject2); | |
2511 | extern __inline size_t | |
2512 | __strcspn_c2 (__const char *__s, int __reject1, int __reject2) | |
2513 | { | |
2514 | register size_t __result = 0; | |
2515 | while (__s[__result] != '\0' && __s[__result] != __reject1 | |
2516 | && __s[__result] != __reject2) | |
2517 | ++__result; | |
2518 | return __result; | |
2519 | } | |
2520 | ||
2521 | extern __inline size_t __strcspn_c3 (__const char *__s, int __reject1, | |
2522 | int __reject2, int __reject3); | |
2523 | extern __inline size_t | |
2524 | __strcspn_c3 (__const char *__s, int __reject1, int __reject2, | |
2525 | int __reject3) | |
2526 | { | |
2527 | register size_t __result = 0; | |
2528 | while (__s[__result] != '\0' && __s[__result] != __reject1 | |
2529 | && __s[__result] != __reject2 && __s[__result] != __reject3) | |
2530 | ++__result; | |
2531 | return __result; | |
2532 | } | |
2533 | # 1045 "/usr/include/gentoo-multilib/x86/bits/string2.h" 3 4 | |
2534 | extern __inline size_t __strspn_c1 (__const char *__s, int __accept); | |
2535 | extern __inline size_t | |
2536 | __strspn_c1 (__const char *__s, int __accept) | |
2537 | { | |
2538 | register size_t __result = 0; | |
2539 | ||
2540 | while (__s[__result] == __accept) | |
2541 | ++__result; | |
2542 | return __result; | |
2543 | } | |
2544 | ||
2545 | extern __inline size_t __strspn_c2 (__const char *__s, int __accept1, | |
2546 | int __accept2); | |
2547 | extern __inline size_t | |
2548 | __strspn_c2 (__const char *__s, int __accept1, int __accept2) | |
2549 | { | |
2550 | register size_t __result = 0; | |
2551 | ||
2552 | while (__s[__result] == __accept1 || __s[__result] == __accept2) | |
2553 | ++__result; | |
2554 | return __result; | |
2555 | } | |
2556 | ||
2557 | extern __inline size_t __strspn_c3 (__const char *__s, int __accept1, | |
2558 | int __accept2, int __accept3); | |
2559 | extern __inline size_t | |
2560 | __strspn_c3 (__const char *__s, int __accept1, int __accept2, int __accept3) | |
2561 | { | |
2562 | register size_t __result = 0; | |
2563 | ||
2564 | while (__s[__result] == __accept1 || __s[__result] == __accept2 | |
2565 | || __s[__result] == __accept3) | |
2566 | ++__result; | |
2567 | return __result; | |
2568 | } | |
2569 | # 1121 "/usr/include/gentoo-multilib/x86/bits/string2.h" 3 4 | |
2570 | extern __inline char *__strpbrk_c2 (__const char *__s, int __accept1, | |
2571 | int __accept2); | |
2572 | extern __inline char * | |
2573 | __strpbrk_c2 (__const char *__s, int __accept1, int __accept2) | |
2574 | { | |
2575 | ||
2576 | while (*__s != '\0' && *__s != __accept1 && *__s != __accept2) | |
2577 | ++__s; | |
2578 | return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s; | |
2579 | } | |
2580 | ||
2581 | extern __inline char *__strpbrk_c3 (__const char *__s, int __accept1, | |
2582 | int __accept2, int __accept3); | |
2583 | extern __inline char * | |
2584 | __strpbrk_c3 (__const char *__s, int __accept1, int __accept2, | |
2585 | int __accept3) | |
2586 | { | |
2587 | ||
2588 | while (*__s != '\0' && *__s != __accept1 && *__s != __accept2 | |
2589 | && *__s != __accept3) | |
2590 | ++__s; | |
2591 | return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s; | |
2592 | } | |
2593 | # 1173 "/usr/include/gentoo-multilib/x86/bits/string2.h" 3 4 | |
2594 | extern __inline char *__strtok_r_1c (char *__s, char __sep, char **__nextp); | |
2595 | extern __inline char * | |
2596 | __strtok_r_1c (char *__s, char __sep, char **__nextp) | |
2597 | { | |
2598 | char *__result; | |
2599 | if (__s == ((void *)0)) | |
2600 | __s = *__nextp; | |
2601 | while (*__s == __sep) | |
2602 | ++__s; | |
2603 | __result = ((void *)0); | |
2604 | if (*__s != '\0') | |
2605 | { | |
2606 | __result = __s++; | |
2607 | while (*__s != '\0') | |
2608 | if (*__s++ == __sep) | |
2609 | { | |
2610 | __s[-1] = '\0'; | |
2611 | break; | |
2612 | } | |
2613 | *__nextp = __s; | |
2614 | } | |
2615 | return __result; | |
2616 | } | |
2617 | # 1205 "/usr/include/gentoo-multilib/x86/bits/string2.h" 3 4 | |
2618 | extern char *__strsep_g (char **__stringp, __const char *__delim); | |
2619 | # 1223 "/usr/include/gentoo-multilib/x86/bits/string2.h" 3 4 | |
2620 | extern __inline char *__strsep_1c (char **__s, char __reject); | |
2621 | extern __inline char * | |
2622 | __strsep_1c (char **__s, char __reject) | |
2623 | { | |
2624 | register char *__retval = *__s; | |
2625 | if (__retval != ((void *)0) && (*__s = (__extension__ (__builtin_constant_p (__reject) && !__builtin_constant_p (__retval) && (__reject) == '\0' ? (char *) __rawmemchr (__retval, __reject) : __builtin_strchr (__retval, __reject)))) != ((void *)0)) | |
2626 | *(*__s)++ = '\0'; | |
2627 | return __retval; | |
2628 | } | |
2629 | ||
2630 | extern __inline char *__strsep_2c (char **__s, char __reject1, char __reject2); | |
2631 | extern __inline char * | |
2632 | __strsep_2c (char **__s, char __reject1, char __reject2) | |
2633 | { | |
2634 | register char *__retval = *__s; | |
2635 | if (__retval != ((void *)0)) | |
2636 | { | |
2637 | register char *__cp = __retval; | |
2638 | while (1) | |
2639 | { | |
2640 | if (*__cp == '\0') | |
2641 | { | |
2642 | __cp = ((void *)0); | |
2643 | break; | |
2644 | } | |
2645 | if (*__cp == __reject1 || *__cp == __reject2) | |
2646 | { | |
2647 | *__cp++ = '\0'; | |
2648 | break; | |
2649 | } | |
2650 | ++__cp; | |
2651 | } | |
2652 | *__s = __cp; | |
2653 | } | |
2654 | return __retval; | |
2655 | } | |
2656 | ||
2657 | extern __inline char *__strsep_3c (char **__s, char __reject1, char __reject2, | |
2658 | char __reject3); | |
2659 | extern __inline char * | |
2660 | __strsep_3c (char **__s, char __reject1, char __reject2, char __reject3) | |
2661 | { | |
2662 | register char *__retval = *__s; | |
2663 | if (__retval != ((void *)0)) | |
2664 | { | |
2665 | register char *__cp = __retval; | |
2666 | while (1) | |
2667 | { | |
2668 | if (*__cp == '\0') | |
2669 | { | |
2670 | __cp = ((void *)0); | |
2671 | break; | |
2672 | } | |
2673 | if (*__cp == __reject1 || *__cp == __reject2 || *__cp == __reject3) | |
2674 | { | |
2675 | *__cp++ = '\0'; | |
2676 | break; | |
2677 | } | |
2678 | ++__cp; | |
2679 | } | |
2680 | *__s = __cp; | |
2681 | } | |
2682 | return __retval; | |
2683 | } | |
2684 | # 1299 "/usr/include/gentoo-multilib/x86/bits/string2.h" 3 4 | |
2685 | # 1 "/usr/include/stdlib.h" 1 3 4 | |
2686 | # 1300 "/usr/include/gentoo-multilib/x86/bits/string2.h" 2 3 4 | |
2687 | ||
2688 | ||
2689 | ||
2690 | ||
2691 | extern char *__strdup (__const char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)); | |
2692 | # 1323 "/usr/include/gentoo-multilib/x86/bits/string2.h" 3 4 | |
2693 | extern char *__strndup (__const char *__string, size_t __n) | |
2694 | __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)); | |
2695 | # 5 "/usr/include/bits/string2.h" 2 3 4 | |
2696 | # 424 "/usr/include/gentoo-multilib/x86/string.h" 2 3 4 | |
2697 | # 432 "/usr/include/gentoo-multilib/x86/string.h" 3 4 | |
2698 | ||
2699 | # 5 "/usr/include/string.h" 2 3 4 | |
2700 | # 61 "./util.h" 2 | |
2701 | # 1 "/usr/include/assert.h" 1 3 4 | |
2702 | ||
2703 | ||
2704 | ||
2705 | # 1 "/usr/include/gentoo-multilib/x86/assert.h" 1 3 4 | |
2706 | # 37 "/usr/include/gentoo-multilib/x86/assert.h" 3 4 | |
2707 | # 1 "/usr/include/features.h" 1 3 4 | |
2708 | # 38 "/usr/include/gentoo-multilib/x86/assert.h" 2 3 4 | |
2709 | # 5 "/usr/include/assert.h" 2 3 4 | |
2710 | # 62 "./util.h" 2 | |
2711 | ||
2712 | # 1 "./libyasm/coretype.h" 1 | |
2713 | # 38 "./libyasm/coretype.h" | |
2714 | typedef struct yasm_arch yasm_arch; | |
2715 | ||
2716 | typedef struct yasm_preproc yasm_preproc; | |
2717 | ||
2718 | typedef struct yasm_parser yasm_parser; | |
2719 | ||
2720 | typedef struct yasm_objfmt yasm_objfmt; | |
2721 | ||
2722 | typedef struct yasm_dbgfmt yasm_dbgfmt; | |
2723 | ||
2724 | typedef struct yasm_listfmt yasm_listfmt; | |
2725 | ||
2726 | ||
2727 | ||
2728 | ||
2729 | typedef struct yasm_assoc_data_callback { | |
2730 | ||
2731 | ||
2732 | ||
2733 | void (*destroy) ( void *data); | |
2734 | ||
2735 | ||
2736 | ||
2737 | ||
2738 | ||
2739 | ||
2740 | void (*print) (void *data, FILE *f, int indent_level); | |
2741 | } yasm_assoc_data_callback; | |
2742 | ||
2743 | ||
2744 | ||
2745 | ||
2746 | typedef struct yasm_errwarns yasm_errwarns; | |
2747 | ||
2748 | ||
2749 | ||
2750 | ||
2751 | ||
2752 | typedef struct yasm_bytecode yasm_bytecode; | |
2753 | ||
2754 | ||
2755 | typedef struct yasm_object yasm_object; | |
2756 | ||
2757 | ||
2758 | typedef struct yasm_section yasm_section; | |
2759 | ||
2760 | ||
2761 | typedef struct yasm_symtab yasm_symtab; | |
2762 | ||
2763 | ||
2764 | typedef struct yasm_symrec yasm_symrec; | |
2765 | ||
2766 | ||
2767 | ||
2768 | ||
2769 | ||
2770 | typedef struct yasm_expr yasm_expr; | |
2771 | ||
2772 | typedef struct yasm_intnum yasm_intnum; | |
2773 | ||
2774 | ||
2775 | ||
2776 | typedef struct yasm_floatnum yasm_floatnum; | |
2777 | ||
2778 | ||
2779 | ||
2780 | ||
2781 | ||
2782 | ||
2783 | typedef struct yasm_value { | |
2784 | ||
2785 | ||
2786 | ||
2787 | ||
2788 | yasm_expr *abs; | |
2789 | ||
2790 | ||
2791 | ||
2792 | ||
2793 | yasm_symrec *rel; | |
2794 | ||
2795 | ||
2796 | yasm_symrec *wrt; | |
2797 | ||
2798 | ||
2799 | ||
2800 | ||
2801 | unsigned int seg_of : 1; | |
2802 | ||
2803 | ||
2804 | ||
2805 | ||
2806 | ||
2807 | unsigned int rshift : 7; | |
2808 | ||
2809 | ||
2810 | ||
2811 | ||
2812 | ||
2813 | ||
2814 | unsigned int curpos_rel : 1; | |
2815 | ||
2816 | ||
2817 | ||
2818 | ||
2819 | ||
2820 | unsigned int ip_rel : 1; | |
2821 | ||
2822 | ||
2823 | ||
2824 | ||
2825 | ||
2826 | unsigned int jump_target : 1; | |
2827 | ||
2828 | ||
2829 | ||
2830 | ||
2831 | ||
2832 | ||
2833 | ||
2834 | unsigned int section_rel : 1; | |
2835 | ||
2836 | ||
2837 | ||
2838 | ||
2839 | unsigned int sign : 1; | |
2840 | ||
2841 | ||
2842 | unsigned int size : 8; | |
2843 | } yasm_value; | |
2844 | ||
2845 | ||
2846 | ||
2847 | ||
2848 | ||
2849 | ||
2850 | ||
2851 | typedef struct yasm_linemap yasm_linemap; | |
2852 | ||
2853 | ||
2854 | ||
2855 | ||
2856 | typedef struct yasm_valparam yasm_valparam; | |
2857 | ||
2858 | ||
2859 | ||
2860 | typedef struct yasm_valparamhead yasm_valparamhead; | |
2861 | ||
2862 | ||
2863 | ||
2864 | ||
2865 | ||
2866 | typedef struct yasm_insn_operands yasm_insn_operands; | |
2867 | ||
2868 | ||
2869 | typedef enum yasm_expr_op { | |
2870 | YASM_EXPR_IDENT, | |
2871 | YASM_EXPR_ADD, | |
2872 | YASM_EXPR_SUB, | |
2873 | YASM_EXPR_MUL, | |
2874 | YASM_EXPR_DIV, | |
2875 | YASM_EXPR_SIGNDIV, | |
2876 | YASM_EXPR_MOD, | |
2877 | YASM_EXPR_SIGNMOD, | |
2878 | YASM_EXPR_NEG, | |
2879 | YASM_EXPR_NOT, | |
2880 | YASM_EXPR_OR, | |
2881 | YASM_EXPR_AND, | |
2882 | YASM_EXPR_XOR, | |
2883 | YASM_EXPR_XNOR, | |
2884 | YASM_EXPR_NOR, | |
2885 | YASM_EXPR_SHL, | |
2886 | YASM_EXPR_SHR, | |
2887 | YASM_EXPR_LOR, | |
2888 | YASM_EXPR_LAND, | |
2889 | YASM_EXPR_LNOT, | |
2890 | YASM_EXPR_LXOR, | |
2891 | YASM_EXPR_LXNOR, | |
2892 | YASM_EXPR_LNOR, | |
2893 | YASM_EXPR_LT, | |
2894 | YASM_EXPR_GT, | |
2895 | YASM_EXPR_EQ, | |
2896 | YASM_EXPR_LE, | |
2897 | YASM_EXPR_GE, | |
2898 | YASM_EXPR_NE, | |
2899 | YASM_EXPR_NONNUM, | |
2900 | YASM_EXPR_SEG, | |
2901 | YASM_EXPR_WRT, | |
2902 | ||
2903 | YASM_EXPR_SEGOFF | |
2904 | } yasm_expr_op; | |
2905 | ||
2906 | ||
2907 | ||
2908 | ||
2909 | ||
2910 | typedef enum yasm_sym_vis { | |
2911 | YASM_SYM_LOCAL = 0, | |
2912 | YASM_SYM_GLOBAL = 1 << 0, | |
2913 | YASM_SYM_COMMON = 1 << 1, | |
2914 | YASM_SYM_EXTERN = 1 << 2, | |
2915 | YASM_SYM_DLOCAL = 1 << 3 | |
2916 | } yasm_sym_vis; | |
2917 | # 262 "./libyasm/coretype.h" | |
2918 | typedef int (*yasm_output_value_func) | |
2919 | (yasm_value *value, unsigned char *buf, unsigned int destsize, | |
2920 | unsigned long offset, yasm_bytecode *bc, int warn, void *d); | |
2921 | # 283 "./libyasm/coretype.h" | |
2922 | typedef int (*yasm_output_reloc_func) | |
2923 | (yasm_symrec *sym, yasm_bytecode *bc, unsigned char *buf, | |
2924 | unsigned int destsize, unsigned int valsize, int warn, void *d); | |
2925 | # 294 "./libyasm/coretype.h" | |
2926 | int yasm__mergesort(void *base, size_t nmemb, size_t size, | |
2927 | int (*compar)(const void *, const void *)); | |
2928 | ||
2929 | ||
2930 | ||
2931 | ||
2932 | ||
2933 | ||
2934 | ||
2935 | char *yasm__strsep(char **stringp, const char *delim); | |
2936 | ||
2937 | ||
2938 | ||
2939 | ||
2940 | ||
2941 | ||
2942 | ||
2943 | int yasm__strcasecmp(const char *s1, const char *s2); | |
2944 | # 320 "./libyasm/coretype.h" | |
2945 | int yasm__strncasecmp(const char *s1, const char *s2, size_t n); | |
2946 | ||
2947 | ||
2948 | ||
2949 | ||
2950 | ||
2951 | ||
2952 | char *yasm__xstrdup(const char *str); | |
2953 | ||
2954 | ||
2955 | ||
2956 | ||
2957 | ||
2958 | ||
2959 | ||
2960 | char *yasm__xstrndup(const char *str, size_t len); | |
2961 | ||
2962 | ||
2963 | ||
2964 | ||
2965 | ||
2966 | ||
2967 | ||
2968 | extern void * (*yasm_xmalloc) (size_t size); | |
2969 | # 352 "./libyasm/coretype.h" | |
2970 | extern void * (*yasm_xcalloc) (size_t nelem, size_t elsize); | |
2971 | # 361 "./libyasm/coretype.h" | |
2972 | extern void * (*yasm_xrealloc) | |
2973 | ( void *oldmem, size_t size) | |
2974 | ; | |
2975 | ||
2976 | ||
2977 | ||
2978 | ||
2979 | ||
2980 | extern void (*yasm_xfree) ( void *p) | |
2981 | ; | |
2982 | # 64 "./util.h" 2 | |
2983 | # 73 "./util.h" | |
2984 | # 1 "/usr/include/libintl.h" 1 3 4 | |
2985 | ||
2986 | ||
2987 | ||
2988 | # 1 "/usr/include/gentoo-multilib/x86/libintl.h" 1 3 4 | |
2989 | # 24 "/usr/include/gentoo-multilib/x86/libintl.h" 3 4 | |
2990 | # 1 "/usr/include/features.h" 1 3 4 | |
2991 | # 25 "/usr/include/gentoo-multilib/x86/libintl.h" 2 3 4 | |
2992 | # 35 "/usr/include/gentoo-multilib/x86/libintl.h" 3 4 | |
2993 | ||
2994 | ||
2995 | ||
2996 | ||
2997 | ||
2998 | extern char *gettext (__const char *__msgid) | |
2999 | __attribute__ ((__nothrow__)) __attribute__ ((__format_arg__ (1))); | |
3000 | ||
3001 | ||
3002 | ||
3003 | extern char *dgettext (__const char *__domainname, __const char *__msgid) | |
3004 | __attribute__ ((__nothrow__)) __attribute__ ((__format_arg__ (2))); | |
3005 | extern char *__dgettext (__const char *__domainname, __const char *__msgid) | |
3006 | __attribute__ ((__nothrow__)) __attribute__ ((__format_arg__ (2))); | |
3007 | ||
3008 | ||
3009 | ||
3010 | extern char *dcgettext (__const char *__domainname, | |
3011 | __const char *__msgid, int __category) | |
3012 | __attribute__ ((__nothrow__)) __attribute__ ((__format_arg__ (2))); | |
3013 | extern char *__dcgettext (__const char *__domainname, | |
3014 | __const char *__msgid, int __category) | |
3015 | __attribute__ ((__nothrow__)) __attribute__ ((__format_arg__ (2))); | |
3016 | ||
3017 | ||
3018 | ||
3019 | ||
3020 | extern char *ngettext (__const char *__msgid1, __const char *__msgid2, | |
3021 | unsigned long int __n) | |
3022 | __attribute__ ((__nothrow__)) __attribute__ ((__format_arg__ (1))) __attribute__ ((__format_arg__ (2))); | |
3023 | ||
3024 | ||
3025 | ||
3026 | extern char *dngettext (__const char *__domainname, __const char *__msgid1, | |
3027 | __const char *__msgid2, unsigned long int __n) | |
3028 | __attribute__ ((__nothrow__)) __attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3))); | |
3029 | ||
3030 | ||
3031 | ||
3032 | extern char *dcngettext (__const char *__domainname, __const char *__msgid1, | |
3033 | __const char *__msgid2, unsigned long int __n, | |
3034 | int __category) | |
3035 | __attribute__ ((__nothrow__)) __attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3))); | |
3036 | ||
3037 | ||
3038 | ||
3039 | ||
3040 | ||
3041 | extern char *textdomain (__const char *__domainname) __attribute__ ((__nothrow__)); | |
3042 | ||
3043 | ||
3044 | ||
3045 | extern char *bindtextdomain (__const char *__domainname, | |
3046 | __const char *__dirname) __attribute__ ((__nothrow__)); | |
3047 | ||
3048 | ||
3049 | ||
3050 | extern char *bind_textdomain_codeset (__const char *__domainname, | |
3051 | __const char *__codeset) __attribute__ ((__nothrow__)); | |
3052 | ||
3053 | ||
3054 | ||
3055 | ||
3056 | ||
3057 | ||
3058 | ||
3059 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.0-alpha20070615/include/stddef.h" 1 3 4 | |
3060 | # 102 "/usr/include/gentoo-multilib/x86/libintl.h" 2 3 4 | |
3061 | ||
3062 | ||
3063 | # 1 "/usr/include/locale.h" 1 3 4 | |
3064 | ||
3065 | ||
3066 | ||
3067 | # 1 "/usr/include/gentoo-multilib/x86/locale.h" 1 3 4 | |
3068 | # 26 "/usr/include/gentoo-multilib/x86/locale.h" 3 4 | |
3069 | # 1 "/usr/include/features.h" 1 3 4 | |
3070 | # 27 "/usr/include/gentoo-multilib/x86/locale.h" 2 3 4 | |
3071 | ||
3072 | ||
3073 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.0-alpha20070615/include/stddef.h" 1 3 4 | |
3074 | # 30 "/usr/include/gentoo-multilib/x86/locale.h" 2 3 4 | |
3075 | # 1 "/usr/include/bits/locale.h" 1 3 4 | |
3076 | ||
3077 | ||
3078 | ||
3079 | # 1 "/usr/include/gentoo-multilib/x86/bits/locale.h" 1 3 4 | |
3080 | # 27 "/usr/include/gentoo-multilib/x86/bits/locale.h" 3 4 | |
3081 | enum | |
3082 | { | |
3083 | __LC_CTYPE = 0, | |
3084 | __LC_NUMERIC = 1, | |
3085 | __LC_TIME = 2, | |
3086 | __LC_COLLATE = 3, | |
3087 | __LC_MONETARY = 4, | |
3088 | __LC_MESSAGES = 5, | |
3089 | __LC_ALL = 6, | |
3090 | __LC_PAPER = 7, | |
3091 | __LC_NAME = 8, | |
3092 | __LC_ADDRESS = 9, | |
3093 | __LC_TELEPHONE = 10, | |
3094 | __LC_MEASUREMENT = 11, | |
3095 | __LC_IDENTIFICATION = 12 | |
3096 | }; | |
3097 | # 5 "/usr/include/bits/locale.h" 2 3 4 | |
3098 | # 31 "/usr/include/gentoo-multilib/x86/locale.h" 2 3 4 | |
3099 | ||
3100 | ||
3101 | # 51 "/usr/include/gentoo-multilib/x86/locale.h" 3 4 | |
3102 | ||
3103 | ||
3104 | ||
3105 | struct lconv | |
3106 | { | |
3107 | ||
3108 | ||
3109 | char *decimal_point; | |
3110 | char *thousands_sep; | |
3111 | ||
3112 | ||
3113 | ||
3114 | ||
3115 | ||
3116 | char *grouping; | |
3117 | ||
3118 | ||
3119 | ||
3120 | ||
3121 | ||
3122 | char *int_curr_symbol; | |
3123 | char *currency_symbol; | |
3124 | char *mon_decimal_point; | |
3125 | char *mon_thousands_sep; | |
3126 | char *mon_grouping; | |
3127 | char *positive_sign; | |
3128 | char *negative_sign; | |
3129 | char int_frac_digits; | |
3130 | char frac_digits; | |
3131 | ||
3132 | char p_cs_precedes; | |
3133 | ||
3134 | char p_sep_by_space; | |
3135 | ||
3136 | char n_cs_precedes; | |
3137 | ||
3138 | char n_sep_by_space; | |
3139 | ||
3140 | ||
3141 | ||
3142 | ||
3143 | ||
3144 | ||
3145 | char p_sign_posn; | |
3146 | char n_sign_posn; | |
3147 | # 114 "/usr/include/gentoo-multilib/x86/locale.h" 3 4 | |
3148 | char __int_p_cs_precedes; | |
3149 | char __int_p_sep_by_space; | |
3150 | char __int_n_cs_precedes; | |
3151 | char __int_n_sep_by_space; | |
3152 | char __int_p_sign_posn; | |
3153 | char __int_n_sign_posn; | |
3154 | ||
3155 | }; | |
3156 | ||
3157 | ||
3158 | ||
3159 | extern char *setlocale (int __category, __const char *__locale) __attribute__ ((__nothrow__)); | |
3160 | ||
3161 | ||
3162 | extern struct lconv *localeconv (void) __attribute__ ((__nothrow__)); | |
3163 | ||
3164 | ||
3165 | # 208 "/usr/include/gentoo-multilib/x86/locale.h" 3 4 | |
3166 | ||
3167 | # 5 "/usr/include/locale.h" 2 3 4 | |
3168 | # 105 "/usr/include/gentoo-multilib/x86/libintl.h" 2 3 4 | |
3169 | # 122 "/usr/include/gentoo-multilib/x86/libintl.h" 3 4 | |
3170 | ||
3171 | # 5 "/usr/include/libintl.h" 2 3 4 | |
3172 | # 74 "./util.h" 2 | |
3173 | # 119 "./util.h" | |
3174 | # 1 "./libyasm/compat-queue.h" 1 | |
3175 | # 120 "./util.h" 2 | |
3176 | # 28 "frontends/yasm/yasm.c" 2 | |
3177 | __asm__(".ident\t\"" "$Id: yasm.c 1760 2007-02-08 05:02:37Z peter $" "\""); | |
3178 | ||
3179 | # 1 "/usr/include/ctype.h" 1 3 4 | |
3180 | ||
3181 | ||
3182 | ||
3183 | # 1 "/usr/include/gentoo-multilib/x86/ctype.h" 1 3 4 | |
3184 | # 27 "/usr/include/gentoo-multilib/x86/ctype.h" 3 4 | |
3185 | # 1 "/usr/include/features.h" 1 3 4 | |
3186 | # 28 "/usr/include/gentoo-multilib/x86/ctype.h" 2 3 4 | |
3187 | # 1 "/usr/include/bits/types.h" 1 3 4 | |
3188 | # 29 "/usr/include/gentoo-multilib/x86/ctype.h" 2 3 4 | |
3189 | ||
3190 | ||
3191 | # 41 "/usr/include/gentoo-multilib/x86/ctype.h" 3 4 | |
3192 | # 1 "/usr/include/endian.h" 1 3 4 | |
3193 | # 42 "/usr/include/gentoo-multilib/x86/ctype.h" 2 3 4 | |
3194 | ||
3195 | ||
3196 | ||
3197 | ||
3198 | ||
3199 | ||
3200 | enum | |
3201 | { | |
3202 | _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)), | |
3203 | _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)), | |
3204 | _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)), | |
3205 | _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)), | |
3206 | _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)), | |
3207 | _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)), | |
3208 | _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)), | |
3209 | _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)), | |
3210 | _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)), | |
3211 | _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)), | |
3212 | _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)), | |
3213 | _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8)) | |
3214 | }; | |
3215 | # 81 "/usr/include/gentoo-multilib/x86/ctype.h" 3 4 | |
3216 | extern __const unsigned short int **__ctype_b_loc (void) | |
3217 | __attribute__ ((__const)); | |
3218 | extern __const __int32_t **__ctype_tolower_loc (void) | |
3219 | __attribute__ ((__const)); | |
3220 | extern __const __int32_t **__ctype_toupper_loc (void) | |
3221 | __attribute__ ((__const)); | |
3222 | # 96 "/usr/include/gentoo-multilib/x86/ctype.h" 3 4 | |
3223 | ||
3224 | ||
3225 | ||
3226 | ||
3227 | ||
3228 | ||
3229 | extern int isalnum (int) __attribute__ ((__nothrow__)); | |
3230 | extern int isalpha (int) __attribute__ ((__nothrow__)); | |
3231 | extern int iscntrl (int) __attribute__ ((__nothrow__)); | |
3232 | extern int isdigit (int) __attribute__ ((__nothrow__)); | |
3233 | extern int islower (int) __attribute__ ((__nothrow__)); | |
3234 | extern int isgraph (int) __attribute__ ((__nothrow__)); | |
3235 | extern int isprint (int) __attribute__ ((__nothrow__)); | |
3236 | extern int ispunct (int) __attribute__ ((__nothrow__)); | |
3237 | extern int isspace (int) __attribute__ ((__nothrow__)); | |
3238 | extern int isupper (int) __attribute__ ((__nothrow__)); | |
3239 | extern int isxdigit (int) __attribute__ ((__nothrow__)); | |
3240 | ||
3241 | ||
3242 | ||
3243 | extern int tolower (int __c) __attribute__ ((__nothrow__)); | |
3244 | ||
3245 | ||
3246 | extern int toupper (int __c) __attribute__ ((__nothrow__)); | |
3247 | ||
3248 | ||
3249 | # 142 "/usr/include/gentoo-multilib/x86/ctype.h" 3 4 | |
3250 | extern int isascii (int __c) __attribute__ ((__nothrow__)); | |
3251 | ||
3252 | ||
3253 | ||
3254 | extern int toascii (int __c) __attribute__ ((__nothrow__)); | |
3255 | ||
3256 | ||
3257 | ||
3258 | extern int _toupper (int) __attribute__ ((__nothrow__)); | |
3259 | extern int _tolower (int) __attribute__ ((__nothrow__)); | |
3260 | # 190 "/usr/include/gentoo-multilib/x86/ctype.h" 3 4 | |
3261 | extern __inline int | |
3262 | __attribute__ ((__nothrow__)) tolower (int __c) | |
3263 | { | |
3264 | return __c >= -128 && __c < 256 ? (*__ctype_tolower_loc ())[__c] : __c; | |
3265 | } | |
3266 | ||
3267 | extern __inline int | |
3268 | __attribute__ ((__nothrow__)) toupper (int __c) | |
3269 | { | |
3270 | return __c >= -128 && __c < 256 ? (*__ctype_toupper_loc ())[__c] : __c; | |
3271 | } | |
3272 | # 323 "/usr/include/gentoo-multilib/x86/ctype.h" 3 4 | |
3273 | ||
3274 | # 5 "/usr/include/ctype.h" 2 3 4 | |
3275 | # 31 "frontends/yasm/yasm.c" 2 | |
3276 | ||
3277 | # 1 "./libyasm/bitvect.h" 1 | |
3278 | # 19 "./libyasm/bitvect.h" | |
3279 | typedef unsigned char N_char; | |
3280 | typedef unsigned char N_byte; | |
3281 | typedef unsigned short N_short; | |
3282 | typedef unsigned short N_shortword; | |
3283 | typedef unsigned int N_int; | |
3284 | typedef unsigned int N_word; | |
3285 | typedef unsigned long N_long; | |
3286 | typedef unsigned long N_longword; | |
3287 | ||
3288 | ||
3289 | ||
3290 | ||
3291 | typedef signed char Z_char; | |
3292 | typedef signed char Z_byte; | |
3293 | typedef signed short Z_short; | |
3294 | typedef signed short Z_shortword; | |
3295 | typedef signed int Z_int; | |
3296 | typedef signed int Z_word; | |
3297 | typedef signed long Z_long; | |
3298 | typedef signed long Z_longword; | |
3299 | ||
3300 | ||
3301 | ||
3302 | ||
3303 | typedef void *voidptr; | |
3304 | typedef N_char *charptr; | |
3305 | typedef N_byte *byteptr; | |
3306 | typedef N_short *shortptr; | |
3307 | typedef N_shortword *shortwordptr; | |
3308 | typedef N_int *intptr; | |
3309 | typedef N_word *wordptr; | |
3310 | typedef N_long *longptr; | |
3311 | typedef N_longword *longwordptr; | |
3312 | ||
3313 | typedef N_char *N_charptr; | |
3314 | typedef N_byte *N_byteptr; | |
3315 | typedef N_short *N_shortptr; | |
3316 | typedef N_shortword *N_shortwordptr; | |
3317 | typedef N_int *N_intptr; | |
3318 | typedef N_word *N_wordptr; | |
3319 | typedef N_long *N_longptr; | |
3320 | typedef N_longword *N_longwordptr; | |
3321 | ||
3322 | typedef Z_char *Z_charptr; | |
3323 | typedef Z_byte *Z_byteptr; | |
3324 | typedef Z_short *Z_shortptr; | |
3325 | typedef Z_shortword *Z_shortwordptr; | |
3326 | typedef Z_int *Z_intptr; | |
3327 | typedef Z_word *Z_wordptr; | |
3328 | typedef Z_long *Z_longptr; | |
3329 | typedef Z_longword *Z_longwordptr; | |
3330 | # 85 "./libyasm/bitvect.h" | |
3331 | typedef enum boolean { false = (0!=0), true = (0==0) } boolean; | |
3332 | ||
3333 | ||
3334 | ||
3335 | ||
3336 | ||
3337 | ||
3338 | ||
3339 | typedef enum ErrCode | |
3340 | { | |
3341 | ErrCode_Ok = 0, | |
3342 | ||
3343 | ErrCode_Type, | |
3344 | ErrCode_Bits, | |
3345 | ErrCode_Word, | |
3346 | ErrCode_Long, | |
3347 | ErrCode_Powr, | |
3348 | ErrCode_Loga, | |
3349 | ||
3350 | ErrCode_Null, | |
3351 | ||
3352 | ErrCode_Indx, | |
3353 | ErrCode_Ordr, | |
3354 | ErrCode_Size, | |
3355 | ErrCode_Pars, | |
3356 | ErrCode_Ovfl, | |
3357 | ErrCode_Same, | |
3358 | ErrCode_Expo, | |
3359 | ErrCode_Zero | |
3360 | } ErrCode; | |
3361 | ||
3362 | typedef wordptr *listptr; | |
3363 | ||
3364 | ||
3365 | ||
3366 | const char * BitVector_Error (ErrCode error); | |
3367 | ||
3368 | ErrCode BitVector_Boot (void); | |
3369 | void BitVector_Shutdown (void); | |
3370 | ||
3371 | N_word BitVector_Size (N_int bits); | |
3372 | N_word BitVector_Mask (N_int bits); | |
3373 | ||
3374 | ||
3375 | ||
3376 | const char * BitVector_Version (void); | |
3377 | ||
3378 | N_int BitVector_Word_Bits (void); | |
3379 | N_int BitVector_Long_Bits (void); | |
3380 | ||
3381 | ||
3382 | ||
3383 | wordptr BitVector_Create (N_int bits, boolean clear); | |
3384 | listptr BitVector_Create_List(N_int bits, boolean clear, N_int count); | |
3385 | ||
3386 | wordptr BitVector_Resize (wordptr oldaddr, N_int bits); | |
3387 | ||
3388 | wordptr BitVector_Shadow (wordptr addr); | |
3389 | wordptr BitVector_Clone (wordptr addr); | |
3390 | ||
3391 | wordptr BitVector_Concat (wordptr X, wordptr Y); | |
3392 | ||
3393 | ||
3394 | ||
3395 | void BitVector_Dispose ( charptr string); | |
3396 | void BitVector_Destroy ( wordptr addr); | |
3397 | void BitVector_Destroy_List (listptr list, N_int count); | |
3398 | ||
3399 | ||
3400 | ||
3401 | ||
3402 | ||
3403 | void BitVector_Copy (wordptr X, wordptr Y); | |
3404 | ||
3405 | ||
3406 | ||
3407 | void BitVector_Empty (wordptr addr); | |
3408 | void BitVector_Fill (wordptr addr); | |
3409 | void BitVector_Flip (wordptr addr); | |
3410 | ||
3411 | void BitVector_Primes (wordptr addr); | |
3412 | ||
3413 | ||
3414 | ||
3415 | void BitVector_Reverse (wordptr X, wordptr Y); | |
3416 | ||
3417 | ||
3418 | ||
3419 | void BitVector_Interval_Empty ( wordptr addr, N_int lower, N_int upper); | |
3420 | void BitVector_Interval_Fill ( wordptr addr, N_int lower, N_int upper); | |
3421 | void BitVector_Interval_Flip ( wordptr addr, N_int lower, N_int upper); | |
3422 | void BitVector_Interval_Reverse ( wordptr addr, N_int lower, N_int upper); | |
3423 | ||
3424 | boolean BitVector_interval_scan_inc (wordptr addr, N_int start, | |
3425 | N_intptr min, N_intptr max); | |
3426 | boolean BitVector_interval_scan_dec (wordptr addr, N_int start, | |
3427 | N_intptr min, N_intptr max); | |
3428 | ||
3429 | void BitVector_Interval_Copy ( wordptr X, wordptr Y, N_int Xoffset, | |
3430 | N_int Yoffset, N_int length); | |
3431 | ||
3432 | wordptr BitVector_Interval_Substitute( wordptr X, wordptr Y, | |
3433 | N_int Xoffset, N_int Xlength, | |
3434 | N_int Yoffset, N_int Ylength); | |
3435 | ||
3436 | ||
3437 | ||
3438 | boolean BitVector_is_empty (wordptr addr); | |
3439 | boolean BitVector_is_full (wordptr addr); | |
3440 | ||
3441 | boolean BitVector_equal (wordptr X, wordptr Y); | |
3442 | Z_int BitVector_Lexicompare(wordptr X, wordptr Y); | |
3443 | Z_int BitVector_Compare (wordptr X, wordptr Y); | |
3444 | ||
3445 | ||
3446 | ||
3447 | charptr BitVector_to_Hex (wordptr addr); | |
3448 | ErrCode BitVector_from_Hex ( wordptr addr, charptr string); | |
3449 | ||
3450 | ErrCode BitVector_from_Oct( wordptr addr, charptr string); | |
3451 | ||
3452 | charptr BitVector_to_Bin (wordptr addr); | |
3453 | ErrCode BitVector_from_Bin ( wordptr addr, charptr string); | |
3454 | ||
3455 | charptr BitVector_to_Dec (wordptr addr); | |
3456 | ErrCode BitVector_from_Dec ( wordptr addr, charptr string); | |
3457 | ||
3458 | typedef struct BitVector_from_Dec_static_data BitVector_from_Dec_static_data; | |
3459 | BitVector_from_Dec_static_data *BitVector_from_Dec_static_Boot(N_word bits); | |
3460 | void BitVector_from_Dec_static_Shutdown( BitVector_from_Dec_static_data *data); | |
3461 | ErrCode BitVector_from_Dec_static(BitVector_from_Dec_static_data *data, | |
3462 | wordptr addr, charptr string); | |
3463 | ||
3464 | charptr BitVector_to_Enum (wordptr addr); | |
3465 | ErrCode BitVector_from_Enum ( wordptr addr, charptr string); | |
3466 | ||
3467 | ||
3468 | ||
3469 | void BitVector_Bit_Off ( wordptr addr, N_int indx); | |
3470 | void BitVector_Bit_On ( wordptr addr, N_int indx); | |
3471 | boolean BitVector_bit_flip ( wordptr addr, N_int indx); | |
3472 | ||
3473 | boolean BitVector_bit_test (wordptr addr, N_int indx); | |
3474 | ||
3475 | void BitVector_Bit_Copy ( wordptr addr, N_int indx, boolean bit); | |
3476 | ||
3477 | ||
3478 | ||
3479 | void BitVector_LSB ( wordptr addr, boolean bit); | |
3480 | void BitVector_MSB ( wordptr addr, boolean bit); | |
3481 | boolean BitVector_lsb_ (wordptr addr); | |
3482 | boolean BitVector_msb_ (wordptr addr); | |
3483 | boolean BitVector_rotate_left (wordptr addr); | |
3484 | boolean BitVector_rotate_right (wordptr addr); | |
3485 | boolean BitVector_shift_left (wordptr addr, boolean carry_in); | |
3486 | boolean BitVector_shift_right (wordptr addr, boolean carry_in); | |
3487 | void BitVector_Move_Left (wordptr addr, N_int bits); | |
3488 | void BitVector_Move_Right (wordptr addr, N_int bits); | |
3489 | ||
3490 | ||
3491 | ||
3492 | void BitVector_Insert (wordptr addr, N_int offset, N_int count, | |
3493 | boolean clear); | |
3494 | void BitVector_Delete (wordptr addr, N_int offset, N_int count, | |
3495 | boolean clear); | |
3496 | ||
3497 | ||
3498 | ||
3499 | boolean BitVector_increment (wordptr addr); | |
3500 | boolean BitVector_decrement (wordptr addr); | |
3501 | ||
3502 | boolean BitVector_compute (wordptr X, wordptr Y, wordptr Z, boolean minus, | |
3503 | boolean *carry); | |
3504 | boolean BitVector_add (wordptr X, wordptr Y, wordptr Z, boolean *carry); | |
3505 | boolean BitVector_sub (wordptr X, wordptr Y, wordptr Z, boolean *carry); | |
3506 | boolean BitVector_inc (wordptr X, wordptr Y); | |
3507 | boolean BitVector_dec (wordptr X, wordptr Y); | |
3508 | ||
3509 | void BitVector_Negate (wordptr X, wordptr Y); | |
3510 | void BitVector_Absolute (wordptr X, wordptr Y); | |
3511 | Z_int BitVector_Sign (wordptr addr); | |
3512 | ErrCode BitVector_Mul_Pos (wordptr X, wordptr Y, wordptr Z, boolean strict); | |
3513 | ErrCode BitVector_Multiply (wordptr X, wordptr Y, wordptr Z); | |
3514 | ErrCode BitVector_Div_Pos (wordptr Q, wordptr X, wordptr Y, wordptr R); | |
3515 | ErrCode BitVector_Divide (wordptr Q, wordptr X, wordptr Y, wordptr R); | |
3516 | ErrCode BitVector_GCD (wordptr X, wordptr Y, wordptr Z); | |
3517 | ErrCode BitVector_GCD2 (wordptr U, wordptr V, wordptr W, | |
3518 | wordptr X, wordptr Y); | |
3519 | ErrCode BitVector_Power (wordptr X, wordptr Y, wordptr Z); | |
3520 | ||
3521 | ||
3522 | ||
3523 | void BitVector_Block_Store(wordptr addr, charptr buffer, N_int length); | |
3524 | charptr BitVector_Block_Read (wordptr addr, N_intptr length); | |
3525 | ||
3526 | ||
3527 | ||
3528 | void BitVector_Word_Store (wordptr addr, N_int offset, N_int value); | |
3529 | N_int BitVector_Word_Read (wordptr addr, N_int offset); | |
3530 | ||
3531 | void BitVector_Word_Insert(wordptr addr, N_int offset, N_int count, | |
3532 | boolean clear); | |
3533 | void BitVector_Word_Delete(wordptr addr, N_int offset, N_int count, | |
3534 | boolean clear); | |
3535 | ||
3536 | ||
3537 | ||
3538 | void BitVector_Chunk_Store(wordptr addr, N_int chunksize, | |
3539 | N_int offset, N_long value); | |
3540 | N_long BitVector_Chunk_Read (wordptr addr, N_int chunksize, | |
3541 | N_int offset); | |
3542 | ||
3543 | ||
3544 | ||
3545 | void Set_Union (wordptr X, wordptr Y, wordptr Z); | |
3546 | void Set_Intersection (wordptr X, wordptr Y, wordptr Z); | |
3547 | void Set_Difference (wordptr X, wordptr Y, wordptr Z); | |
3548 | void Set_ExclusiveOr (wordptr X, wordptr Y, wordptr Z); | |
3549 | void Set_Complement (wordptr X, wordptr Y); | |
3550 | ||
3551 | ||
3552 | ||
3553 | boolean Set_subset (wordptr X, wordptr Y); | |
3554 | ||
3555 | N_int Set_Norm (wordptr addr); | |
3556 | N_int Set_Norm2 (wordptr addr); | |
3557 | N_int Set_Norm3 (wordptr addr); | |
3558 | Z_long Set_Min (wordptr addr); | |
3559 | Z_long Set_Max (wordptr addr); | |
3560 | ||
3561 | ||
3562 | ||
3563 | void Matrix_Multiplication(wordptr X, N_int rowsX, N_int colsX, | |
3564 | wordptr Y, N_int rowsY, N_int colsY, | |
3565 | wordptr Z, N_int rowsZ, N_int colsZ); | |
3566 | ||
3567 | void Matrix_Product (wordptr X, N_int rowsX, N_int colsX, | |
3568 | wordptr Y, N_int rowsY, N_int colsY, | |
3569 | wordptr Z, N_int rowsZ, N_int colsZ); | |
3570 | ||
3571 | void Matrix_Closure (wordptr addr, N_int rows, N_int cols); | |
3572 | ||
3573 | void Matrix_Transpose (wordptr X, N_int rowsX, N_int colsX, | |
3574 | wordptr Y, N_int rowsY, N_int colsY); | |
3575 | # 33 "frontends/yasm/yasm.c" 2 | |
3576 | # 1 "./libyasm.h" 1 | |
3577 | # 55 "./libyasm.h" | |
3578 | # 1 "./libyasm-stdint.h" 1 | |
3579 | ||
3580 | ||
3581 | ||
3582 | ||
3583 | ||
3584 | ||
3585 | # 1 "/usr/include/stdint.h" 1 3 4 | |
3586 | ||
3587 | ||
3588 | ||
3589 | # 1 "/usr/include/gentoo-multilib/x86/stdint.h" 1 3 4 | |
3590 | # 26 "/usr/include/gentoo-multilib/x86/stdint.h" 3 4 | |
3591 | # 1 "/usr/include/features.h" 1 3 4 | |
3592 | # 27 "/usr/include/gentoo-multilib/x86/stdint.h" 2 3 4 | |
3593 | # 1 "/usr/include/bits/wchar.h" 1 3 4 | |
3594 | # 28 "/usr/include/gentoo-multilib/x86/stdint.h" 2 3 4 | |
3595 | # 1 "/usr/include/bits/wordsize.h" 1 3 4 | |
3596 | ||
3597 | ||
3598 | ||
3599 | # 1 "/usr/include/gentoo-multilib/x86/bits/wordsize.h" 1 3 4 | |
3600 | # 5 "/usr/include/bits/wordsize.h" 2 3 4 | |
3601 | # 29 "/usr/include/gentoo-multilib/x86/stdint.h" 2 3 4 | |
3602 | # 49 "/usr/include/gentoo-multilib/x86/stdint.h" 3 4 | |
3603 | typedef unsigned char uint8_t; | |
3604 | typedef unsigned short int uint16_t; | |
3605 | ||
3606 | typedef unsigned int uint32_t; | |
3607 | ||
3608 | ||
3609 | ||
3610 | ||
3611 | ||
3612 | __extension__ | |
3613 | typedef unsigned long long int uint64_t; | |
3614 | ||
3615 | ||
3616 | ||
3617 | ||
3618 | ||
3619 | ||
3620 | typedef signed char int_least8_t; | |
3621 | typedef short int int_least16_t; | |
3622 | typedef int int_least32_t; | |
3623 | ||
3624 | ||
3625 | ||
3626 | __extension__ | |
3627 | typedef long long int int_least64_t; | |
3628 | ||
3629 | ||
3630 | ||
3631 | typedef unsigned char uint_least8_t; | |
3632 | typedef unsigned short int uint_least16_t; | |
3633 | typedef unsigned int uint_least32_t; | |
3634 | ||
3635 | ||
3636 | ||
3637 | __extension__ | |
3638 | typedef unsigned long long int uint_least64_t; | |
3639 | ||
3640 | ||
3641 | ||
3642 | ||
3643 | ||
3644 | ||
3645 | typedef signed char int_fast8_t; | |
3646 | ||
3647 | ||
3648 | ||
3649 | ||
3650 | ||
3651 | typedef int int_fast16_t; | |
3652 | typedef int int_fast32_t; | |
3653 | __extension__ | |
3654 | typedef long long int int_fast64_t; | |
3655 | ||
3656 | ||
3657 | ||
3658 | typedef unsigned char uint_fast8_t; | |
3659 | ||
3660 | ||
3661 | ||
3662 | ||
3663 | ||
3664 | typedef unsigned int uint_fast16_t; | |
3665 | typedef unsigned int uint_fast32_t; | |
3666 | __extension__ | |
3667 | typedef unsigned long long int uint_fast64_t; | |
3668 | # 126 "/usr/include/gentoo-multilib/x86/stdint.h" 3 4 | |
3669 | typedef int intptr_t; | |
3670 | ||
3671 | ||
3672 | typedef unsigned int uintptr_t; | |
3673 | # 138 "/usr/include/gentoo-multilib/x86/stdint.h" 3 4 | |
3674 | __extension__ | |
3675 | typedef long long int intmax_t; | |
3676 | __extension__ | |
3677 | typedef unsigned long long int uintmax_t; | |
3678 | # 5 "/usr/include/stdint.h" 2 3 4 | |
3679 | # 8 "./libyasm-stdint.h" 2 | |
3680 | # 56 "./libyasm.h" 2 | |
3681 | ||
3682 | ||
3683 | ||
3684 | ||
3685 | ||
3686 | ||
3687 | ||
3688 | # 1 "./libyasm/valparam.h" 1 | |
3689 | # 54 "./libyasm/valparam.h" | |
3690 | yasm_valparam *yasm_vp_create( char *v, yasm_expr *p); | |
3691 | ||
3692 | ||
3693 | ||
3694 | ||
3695 | yasm_valparamhead *yasm_vps_create(void); | |
3696 | ||
3697 | ||
3698 | ||
3699 | ||
3700 | void yasm_vps_destroy(yasm_valparamhead *headp); | |
3701 | # 84 "./libyasm/valparam.h" | |
3702 | void yasm_vps_append(yasm_valparamhead *headp, yasm_valparam *vp); | |
3703 | # 96 "./libyasm/valparam.h" | |
3704 | yasm_valparam *yasm_vps_first | |
3705 | (yasm_valparamhead *headp); | |
3706 | # 106 "./libyasm/valparam.h" | |
3707 | yasm_valparam *yasm_vps_next(yasm_valparam *cur); | |
3708 | # 122 "./libyasm/valparam.h" | |
3709 | void yasm_vps_print( const yasm_valparamhead *headp, FILE *f); | |
3710 | # 64 "./libyasm.h" 2 | |
3711 | ||
3712 | # 1 "./libyasm/linemap.h" 1 | |
3713 | # 40 "./libyasm/linemap.h" | |
3714 | yasm_linemap *yasm_linemap_create(void); | |
3715 | ||
3716 | ||
3717 | ||
3718 | ||
3719 | void yasm_linemap_destroy(yasm_linemap *linemap); | |
3720 | ||
3721 | ||
3722 | ||
3723 | ||
3724 | ||
3725 | unsigned long yasm_linemap_get_current(yasm_linemap *linemap); | |
3726 | # 62 "./libyasm/linemap.h" | |
3727 | int yasm_linemap_get_source(yasm_linemap *linemap, unsigned long line, | |
3728 | yasm_bytecode **bcp, | |
3729 | const char **sourcep); | |
3730 | # 74 "./libyasm/linemap.h" | |
3731 | void yasm_linemap_add_source(yasm_linemap *linemap, | |
3732 | yasm_bytecode *bc, | |
3733 | const char *source); | |
3734 | ||
3735 | ||
3736 | ||
3737 | ||
3738 | ||
3739 | unsigned long yasm_linemap_goto_next(yasm_linemap *linemap); | |
3740 | # 92 "./libyasm/linemap.h" | |
3741 | void yasm_linemap_set(yasm_linemap *linemap, const char *filename, | |
3742 | unsigned long file_line, unsigned long line_inc); | |
3743 | # 103 "./libyasm/linemap.h" | |
3744 | unsigned long yasm_linemap_poke(yasm_linemap *linemap, | |
3745 | const char *filename, | |
3746 | unsigned long file_line); | |
3747 | ||
3748 | ||
3749 | ||
3750 | ||
3751 | ||
3752 | ||
3753 | ||
3754 | void yasm_linemap_lookup(yasm_linemap *linemap, unsigned long line, | |
3755 | const char **filename, | |
3756 | unsigned long *file_line); | |
3757 | # 125 "./libyasm/linemap.h" | |
3758 | int yasm_linemap_traverse_filenames | |
3759 | (yasm_linemap *linemap, void *d, | |
3760 | int (*func) (const char *filename, void *d)); | |
3761 | # 66 "./libyasm.h" 2 | |
3762 | ||
3763 | # 1 "./libyasm/errwarn.h" 1 | |
3764 | # 38 "./libyasm/errwarn.h" | |
3765 | typedef enum yasm_warn_class { | |
3766 | YASM_WARN_NONE = 0, | |
3767 | YASM_WARN_GENERAL, | |
3768 | YASM_WARN_UNREC_CHAR, | |
3769 | YASM_WARN_PREPROC, | |
3770 | YASM_WARN_ORPHAN_LABEL, | |
3771 | YASM_WARN_UNINIT_CONTENTS | |
3772 | } yasm_warn_class; | |
3773 | ||
3774 | ||
3775 | typedef enum yasm_error_class { | |
3776 | YASM_ERROR_NONE = 0x0000, | |
3777 | YASM_ERROR_GENERAL = 0xFFFF, | |
3778 | YASM_ERROR_ARITHMETIC = 0x0001, | |
3779 | YASM_ERROR_OVERFLOW = 0x8001, | |
3780 | YASM_ERROR_FLOATING_POINT = 0x4001, | |
3781 | YASM_ERROR_ZERO_DIVISION = 0x2001, | |
3782 | YASM_ERROR_ASSERTION = 0x0002, | |
3783 | YASM_ERROR_VALUE = 0x0004, | |
3784 | ||
3785 | YASM_ERROR_NOT_ABSOLUTE = 0x8004, | |
3786 | YASM_ERROR_TOO_COMPLEX = 0x4004, | |
3787 | YASM_ERROR_NOT_CONSTANT = 0x2004, | |
3788 | YASM_ERROR_IO = 0x0008, | |
3789 | YASM_ERROR_NOT_IMPLEMENTED = 0x0010, | |
3790 | YASM_ERROR_TYPE = 0x0020, | |
3791 | YASM_ERROR_SYNTAX = 0x0040, | |
3792 | YASM_ERROR_PARSE = 0x8040 | |
3793 | } yasm_error_class; | |
3794 | ||
3795 | ||
3796 | void yasm_errwarn_initialize(void); | |
3797 | ||
3798 | ||
3799 | ||
3800 | ||
3801 | void yasm_errwarn_cleanup(void); | |
3802 | # 84 "./libyasm/errwarn.h" | |
3803 | extern void (*yasm_internal_error_) | |
3804 | (const char *file, unsigned int line, const char *message); | |
3805 | # 100 "./libyasm/errwarn.h" | |
3806 | extern void (*yasm_fatal) (const char *message, va_list va); | |
3807 | ||
3808 | ||
3809 | ||
3810 | ||
3811 | ||
3812 | ||
3813 | ||
3814 | void yasm__fatal(const char *message, ...); | |
3815 | ||
3816 | ||
3817 | ||
3818 | ||
3819 | void yasm_error_clear(void); | |
3820 | ||
3821 | ||
3822 | ||
3823 | ||
3824 | ||
3825 | ||
3826 | yasm_error_class yasm_error_occurred(void); | |
3827 | # 129 "./libyasm/errwarn.h" | |
3828 | int yasm_error_matches(yasm_error_class eclass); | |
3829 | ||
3830 | ||
3831 | extern yasm_error_class yasm_eclass; | |
3832 | # 142 "./libyasm/errwarn.h" | |
3833 | void yasm_error_set_va(yasm_error_class eclass, const char *format, va_list va); | |
3834 | ||
3835 | ||
3836 | ||
3837 | ||
3838 | ||
3839 | ||
3840 | ||
3841 | void yasm_error_set(yasm_error_class eclass, const char *format, ...) | |
3842 | ; | |
3843 | # 160 "./libyasm/errwarn.h" | |
3844 | void yasm_error_set_xref_va(unsigned long xrefline, const char *format, | |
3845 | va_list va); | |
3846 | # 170 "./libyasm/errwarn.h" | |
3847 | void yasm_error_set_xref(unsigned long xrefline, const char *format, ...) | |
3848 | ; | |
3849 | # 185 "./libyasm/errwarn.h" | |
3850 | void yasm_error_fetch( yasm_error_class *eclass, | |
3851 | char **str, | |
3852 | unsigned long *xrefline, | |
3853 | char **xrefstr); | |
3854 | ||
3855 | ||
3856 | ||
3857 | ||
3858 | void yasm_warn_clear(void); | |
3859 | ||
3860 | ||
3861 | ||
3862 | ||
3863 | ||
3864 | ||
3865 | yasm_warn_class yasm_warn_occurred(void); | |
3866 | ||
3867 | ||
3868 | ||
3869 | ||
3870 | ||
3871 | ||
3872 | void yasm_warn_set_va(yasm_warn_class wclass, const char *format, va_list va); | |
3873 | ||
3874 | ||
3875 | ||
3876 | ||
3877 | ||
3878 | ||
3879 | void yasm_warn_set(yasm_warn_class wclass, const char *format, ...) | |
3880 | ; | |
3881 | # 227 "./libyasm/errwarn.h" | |
3882 | void yasm_warn_fetch( yasm_warn_class *wclass, | |
3883 | char **str); | |
3884 | ||
3885 | ||
3886 | ||
3887 | ||
3888 | void yasm_warn_enable(yasm_warn_class wclass); | |
3889 | ||
3890 | ||
3891 | ||
3892 | ||
3893 | void yasm_warn_disable(yasm_warn_class wclass); | |
3894 | ||
3895 | ||
3896 | void yasm_warn_disable_all(void); | |
3897 | ||
3898 | ||
3899 | ||
3900 | ||
3901 | yasm_errwarns *yasm_errwarns_create(void); | |
3902 | ||
3903 | ||
3904 | ||
3905 | ||
3906 | void yasm_errwarns_destroy( yasm_errwarns *errwarns); | |
3907 | # 263 "./libyasm/errwarn.h" | |
3908 | void yasm_errwarn_propagate(yasm_errwarns *errwarns, unsigned long line); | |
3909 | ||
3910 | ||
3911 | ||
3912 | ||
3913 | ||
3914 | ||
3915 | unsigned int yasm_errwarns_num_errors(yasm_errwarns *errwarns, | |
3916 | int warning_as_error); | |
3917 | # 281 "./libyasm/errwarn.h" | |
3918 | typedef void (*yasm_print_error_func) | |
3919 | (const char *fn, unsigned long line, const char *msg, | |
3920 | const char *xref_fn, unsigned long xref_line, | |
3921 | const char *xref_msg); | |
3922 | ||
3923 | ||
3924 | ||
3925 | ||
3926 | ||
3927 | ||
3928 | typedef void (*yasm_print_warning_func) | |
3929 | (const char *fn, unsigned long line, const char *msg); | |
3930 | # 301 "./libyasm/errwarn.h" | |
3931 | void yasm_errwarns_output_all | |
3932 | (yasm_errwarns *errwarns, yasm_linemap *lm, int warning_as_error, | |
3933 | yasm_print_error_func print_error, yasm_print_warning_func print_warning); | |
3934 | ||
3935 | ||
3936 | ||
3937 | ||
3938 | ||
3939 | ||
3940 | char *yasm__conv_unprint(int ch); | |
3941 | ||
3942 | ||
3943 | ||
3944 | ||
3945 | ||
3946 | extern const char * (*yasm_gettext_hook) (const char *msgid); | |
3947 | # 68 "./libyasm.h" 2 | |
3948 | # 1 "./libyasm/intnum.h" 1 | |
3949 | # 38 "./libyasm/intnum.h" | |
3950 | void yasm_intnum_initialize(void); | |
3951 | ||
3952 | ||
3953 | void yasm_intnum_cleanup(void); | |
3954 | ||
3955 | ||
3956 | ||
3957 | ||
3958 | ||
3959 | yasm_intnum *yasm_intnum_create_dec(char *str); | |
3960 | ||
3961 | ||
3962 | ||
3963 | ||
3964 | ||
3965 | yasm_intnum *yasm_intnum_create_bin(char *str); | |
3966 | ||
3967 | ||
3968 | ||
3969 | ||
3970 | ||
3971 | yasm_intnum *yasm_intnum_create_oct(char *str); | |
3972 | ||
3973 | ||
3974 | ||
3975 | ||
3976 | ||
3977 | yasm_intnum *yasm_intnum_create_hex(char *str); | |
3978 | ||
3979 | ||
3980 | ||
3981 | ||
3982 | ||
3983 | ||
3984 | ||
3985 | yasm_intnum *yasm_intnum_create_charconst_nasm(const char *str); | |
3986 | ||
3987 | ||
3988 | ||
3989 | ||
3990 | ||
3991 | yasm_intnum *yasm_intnum_create_uint(unsigned long i); | |
3992 | ||
3993 | ||
3994 | ||
3995 | ||
3996 | ||
3997 | yasm_intnum *yasm_intnum_create_int(long i); | |
3998 | # 94 "./libyasm/intnum.h" | |
3999 | yasm_intnum *yasm_intnum_create_leb128 | |
4000 | (const unsigned char *ptr, int sign, unsigned long *size); | |
4001 | # 104 "./libyasm/intnum.h" | |
4002 | yasm_intnum *yasm_intnum_create_sized | |
4003 | (unsigned char *ptr, int sign, size_t srcsize, int bigendian); | |
4004 | ||
4005 | ||
4006 | ||
4007 | ||
4008 | ||
4009 | yasm_intnum *yasm_intnum_copy(const yasm_intnum *intn); | |
4010 | ||
4011 | ||
4012 | ||
4013 | ||
4014 | void yasm_intnum_destroy( yasm_intnum *intn); | |
4015 | # 126 "./libyasm/intnum.h" | |
4016 | int yasm_intnum_calc(yasm_intnum *acc, yasm_expr_op op, yasm_intnum *operand); | |
4017 | ||
4018 | ||
4019 | ||
4020 | ||
4021 | void yasm_intnum_zero(yasm_intnum *intn); | |
4022 | ||
4023 | ||
4024 | ||
4025 | ||
4026 | ||
4027 | void yasm_intnum_set_uint(yasm_intnum *intn, unsigned long val); | |
4028 | ||
4029 | ||
4030 | ||
4031 | ||
4032 | ||
4033 | void yasm_intnum_set_int(yasm_intnum *intn, long val); | |
4034 | ||
4035 | ||
4036 | ||
4037 | ||
4038 | ||
4039 | int yasm_intnum_is_zero(const yasm_intnum *acc); | |
4040 | ||
4041 | ||
4042 | ||
4043 | ||
4044 | ||
4045 | int yasm_intnum_is_pos1(const yasm_intnum *acc); | |
4046 | ||
4047 | ||
4048 | ||
4049 | ||
4050 | ||
4051 | int yasm_intnum_is_neg1(const yasm_intnum *acc); | |
4052 | ||
4053 | ||
4054 | ||
4055 | ||
4056 | ||
4057 | int yasm_intnum_sign(const yasm_intnum *acc); | |
4058 | # 176 "./libyasm/intnum.h" | |
4059 | unsigned long yasm_intnum_get_uint(const yasm_intnum *intn); | |
4060 | # 185 "./libyasm/intnum.h" | |
4061 | long yasm_intnum_get_int(const yasm_intnum *intn); | |
4062 | # 201 "./libyasm/intnum.h" | |
4063 | void yasm_intnum_get_sized(const yasm_intnum *intn, unsigned char *ptr, | |
4064 | size_t destsize, size_t valsize, int shift, | |
4065 | int bigendian, int warn); | |
4066 | # 215 "./libyasm/intnum.h" | |
4067 | int yasm_intnum_check_size(const yasm_intnum *intn, size_t size, | |
4068 | size_t rshift, int rangetype); | |
4069 | ||
4070 | ||
4071 | ||
4072 | ||
4073 | ||
4074 | ||
4075 | ||
4076 | int yasm_intnum_in_range(const yasm_intnum *intn, long low, long high); | |
4077 | ||
4078 | ||
4079 | ||
4080 | ||
4081 | ||
4082 | ||
4083 | ||
4084 | unsigned long yasm_intnum_get_leb128(const yasm_intnum *intn, | |
4085 | unsigned char *ptr, int sign); | |
4086 | ||
4087 | ||
4088 | ||
4089 | ||
4090 | ||
4091 | ||
4092 | unsigned long yasm_intnum_size_leb128(const yasm_intnum *intn, int sign); | |
4093 | ||
4094 | ||
4095 | ||
4096 | ||
4097 | ||
4098 | ||
4099 | unsigned long yasm_get_sleb128(long v, unsigned char *ptr); | |
4100 | ||
4101 | ||
4102 | ||
4103 | ||
4104 | ||
4105 | unsigned long yasm_size_sleb128(long v); | |
4106 | ||
4107 | ||
4108 | ||
4109 | ||
4110 | ||
4111 | ||
4112 | unsigned long yasm_get_uleb128(unsigned long v, unsigned char *ptr); | |
4113 | ||
4114 | ||
4115 | ||
4116 | ||
4117 | ||
4118 | unsigned long yasm_size_uleb128(unsigned long v); | |
4119 | ||
4120 | ||
4121 | ||
4122 | ||
4123 | ||
4124 | ||
4125 | ||
4126 | char *yasm_intnum_get_str(const yasm_intnum *intn); | |
4127 | ||
4128 | ||
4129 | ||
4130 | ||
4131 | ||
4132 | void yasm_intnum_print(const yasm_intnum *intn, FILE *f); | |
4133 | # 69 "./libyasm.h" 2 | |
4134 | # 1 "./libyasm/floatnum.h" 1 | |
4135 | # 40 "./libyasm/floatnum.h" | |
4136 | void yasm_floatnum_initialize(void); | |
4137 | ||
4138 | ||
4139 | void yasm_floatnum_cleanup(void); | |
4140 | ||
4141 | ||
4142 | ||
4143 | ||
4144 | ||
4145 | ||
4146 | yasm_floatnum *yasm_floatnum_create(const char *str); | |
4147 | ||
4148 | ||
4149 | ||
4150 | ||
4151 | ||
4152 | yasm_floatnum *yasm_floatnum_copy(const yasm_floatnum *flt); | |
4153 | ||
4154 | ||
4155 | ||
4156 | ||
4157 | void yasm_floatnum_destroy( yasm_floatnum *flt); | |
4158 | # 71 "./libyasm/floatnum.h" | |
4159 | int yasm_floatnum_calc(yasm_floatnum *acc, yasm_expr_op op, | |
4160 | yasm_floatnum *operand); | |
4161 | # 81 "./libyasm/floatnum.h" | |
4162 | int yasm_floatnum_get_int(const yasm_floatnum *flt, | |
4163 | unsigned long *ret_val); | |
4164 | # 101 "./libyasm/floatnum.h" | |
4165 | int yasm_floatnum_get_sized(const yasm_floatnum *flt, unsigned char *ptr, | |
4166 | size_t destsize, size_t valsize, size_t shift, | |
4167 | int bigendian, int warn); | |
4168 | # 113 "./libyasm/floatnum.h" | |
4169 | int yasm_floatnum_check_size(const yasm_floatnum *flt, size_t size); | |
4170 | ||
4171 | ||
4172 | ||
4173 | ||
4174 | ||
4175 | void yasm_floatnum_print(const yasm_floatnum *flt, FILE *f); | |
4176 | # 70 "./libyasm.h" 2 | |
4177 | # 1 "./libyasm/expr.h" 1 | |
4178 | # 38 "./libyasm/expr.h" | |
4179 | typedef struct yasm_expr__item yasm_expr__item; | |
4180 | # 47 "./libyasm/expr.h" | |
4181 | yasm_expr *yasm_expr_create | |
4182 | (yasm_expr_op op, yasm_expr__item *a, | |
4183 | yasm_expr__item *b, unsigned long line); | |
4184 | ||
4185 | ||
4186 | ||
4187 | ||
4188 | ||
4189 | yasm_expr__item *yasm_expr_precbc( yasm_bytecode *precbc); | |
4190 | ||
4191 | ||
4192 | ||
4193 | ||
4194 | ||
4195 | yasm_expr__item *yasm_expr_sym( yasm_symrec *sym); | |
4196 | ||
4197 | ||
4198 | ||
4199 | ||
4200 | ||
4201 | yasm_expr__item *yasm_expr_expr( yasm_expr *e); | |
4202 | ||
4203 | ||
4204 | ||
4205 | ||
4206 | ||
4207 | yasm_expr__item *yasm_expr_int( yasm_intnum *intn); | |
4208 | ||
4209 | ||
4210 | ||
4211 | ||
4212 | ||
4213 | yasm_expr__item *yasm_expr_float( yasm_floatnum *flt); | |
4214 | ||
4215 | ||
4216 | ||
4217 | ||
4218 | ||
4219 | yasm_expr__item *yasm_expr_reg(uintptr_t reg); | |
4220 | # 118 "./libyasm/expr.h" | |
4221 | yasm_expr *yasm_expr_copy(const yasm_expr *e); | |
4222 | ||
4223 | ||
4224 | ||
4225 | ||
4226 | void yasm_expr_destroy( yasm_expr *e); | |
4227 | ||
4228 | ||
4229 | ||
4230 | ||
4231 | ||
4232 | ||
4233 | ||
4234 | int yasm_expr_is_op(const yasm_expr *e, yasm_expr_op op); | |
4235 | ||
4236 | ||
4237 | ||
4238 | ||
4239 | ||
4240 | ||
4241 | ||
4242 | typedef yasm_expr * (*yasm_expr_xform_func) | |
4243 | ( yasm_expr *e, void *d); | |
4244 | # 154 "./libyasm/expr.h" | |
4245 | yasm_expr *yasm_expr__level_tree | |
4246 | ( yasm_expr *e, int fold_const, | |
4247 | int simplify_ident, int simplify_reg_mul, int calc_bc_dist, | |
4248 | yasm_expr_xform_func expr_xform_extra, | |
4249 | void *expr_xform_extra_data); | |
4250 | # 178 "./libyasm/expr.h" | |
4251 | yasm_expr *yasm_expr_extract_deep_segoff(yasm_expr **ep); | |
4252 | # 187 "./libyasm/expr.h" | |
4253 | yasm_expr *yasm_expr_extract_segoff(yasm_expr **ep); | |
4254 | # 197 "./libyasm/expr.h" | |
4255 | yasm_expr *yasm_expr_extract_wrt(yasm_expr **ep); | |
4256 | # 207 "./libyasm/expr.h" | |
4257 | yasm_intnum *yasm_expr_get_intnum | |
4258 | (yasm_expr **ep, int calc_bc_dist); | |
4259 | ||
4260 | ||
4261 | ||
4262 | ||
4263 | ||
4264 | ||
4265 | ||
4266 | const yasm_symrec *yasm_expr_get_symrec | |
4267 | (yasm_expr **ep, int simplify); | |
4268 | ||
4269 | ||
4270 | ||
4271 | ||
4272 | ||
4273 | ||
4274 | ||
4275 | const uintptr_t *yasm_expr_get_reg | |
4276 | (yasm_expr **ep, int simplify); | |
4277 | ||
4278 | ||
4279 | ||
4280 | ||
4281 | ||
4282 | void yasm_expr_print( const yasm_expr *e, FILE *f); | |
4283 | # 71 "./libyasm.h" 2 | |
4284 | # 1 "./libyasm/value.h" 1 | |
4285 | # 48 "./libyasm/value.h" | |
4286 | void yasm_value_initialize( yasm_value *value, | |
4287 | yasm_expr *e, | |
4288 | unsigned int size); | |
4289 | # 59 "./libyasm/value.h" | |
4290 | void yasm_value_init_sym( yasm_value *value, | |
4291 | yasm_symrec *sym, unsigned int size); | |
4292 | ||
4293 | ||
4294 | ||
4295 | ||
4296 | ||
4297 | ||
4298 | void yasm_value_init_copy(yasm_value *value, const yasm_value *orig); | |
4299 | ||
4300 | ||
4301 | ||
4302 | ||
4303 | void yasm_value_delete(yasm_value *value); | |
4304 | # 83 "./libyasm/value.h" | |
4305 | void yasm_value_set_curpos_rel(yasm_value *value, yasm_bytecode *bc, | |
4306 | unsigned int ip_rel); | |
4307 | ||
4308 | ||
4309 | ||
4310 | ||
4311 | ||
4312 | ||
4313 | ||
4314 | int yasm_value_finalize(yasm_value *value, yasm_bytecode *precbc); | |
4315 | # 113 "./libyasm/value.h" | |
4316 | int yasm_value_finalize_expr( yasm_value *value, | |
4317 | yasm_expr *e, | |
4318 | yasm_bytecode *precbc, | |
4319 | unsigned int size); | |
4320 | # 129 "./libyasm/value.h" | |
4321 | yasm_intnum *yasm_value_get_intnum | |
4322 | (yasm_value *value, yasm_bytecode *bc, int calc_bc_dist); | |
4323 | # 151 "./libyasm/value.h" | |
4324 | int yasm_value_output_basic | |
4325 | (yasm_value *value, unsigned char *buf, size_t destsize, | |
4326 | yasm_bytecode *bc, int warn, yasm_arch *arch); | |
4327 | ||
4328 | ||
4329 | ||
4330 | ||
4331 | ||
4332 | ||
4333 | void yasm_value_print(const yasm_value *value, FILE *f, int indent_level); | |
4334 | # 72 "./libyasm.h" 2 | |
4335 | # 1 "./libyasm/symrec.h" 1 | |
4336 | # 41 "./libyasm/symrec.h" | |
4337 | typedef enum yasm_sym_status { | |
4338 | YASM_SYM_NOSTATUS = 0, | |
4339 | YASM_SYM_USED = 1 << 0, | |
4340 | YASM_SYM_DEFINED = 1 << 1, | |
4341 | YASM_SYM_VALUED = 1 << 2, | |
4342 | YASM_SYM_NOTINTABLE = 1 << 3 | |
4343 | } yasm_sym_status; | |
4344 | ||
4345 | ||
4346 | ||
4347 | yasm_symtab *yasm_symtab_create(void); | |
4348 | ||
4349 | ||
4350 | ||
4351 | ||
4352 | ||
4353 | ||
4354 | void yasm_symtab_destroy( yasm_symtab *symtab); | |
4355 | # 67 "./libyasm/symrec.h" | |
4356 | yasm_symrec *yasm_symtab_abs_sym(yasm_symtab *symtab); | |
4357 | # 76 "./libyasm/symrec.h" | |
4358 | yasm_symrec *yasm_symtab_use | |
4359 | (yasm_symtab *symtab, const char *name, unsigned long line); | |
4360 | # 87 "./libyasm/symrec.h" | |
4361 | yasm_symrec *yasm_symtab_get | |
4362 | (yasm_symtab *symtab, const char *name); | |
4363 | # 97 "./libyasm/symrec.h" | |
4364 | yasm_symrec *yasm_symtab_define_equ | |
4365 | (yasm_symtab *symtab, const char *name, yasm_expr *e, | |
4366 | unsigned long line); | |
4367 | # 110 "./libyasm/symrec.h" | |
4368 | yasm_symrec *yasm_symtab_define_label | |
4369 | (yasm_symtab *symtab, const char *name, | |
4370 | yasm_bytecode *precbc, int in_table, unsigned long line); | |
4371 | # 124 "./libyasm/symrec.h" | |
4372 | yasm_symrec *yasm_symtab_define_curpos | |
4373 | (yasm_symtab *symtab, const char *name, | |
4374 | yasm_bytecode *precbc, unsigned long line); | |
4375 | # 136 "./libyasm/symrec.h" | |
4376 | yasm_symrec *yasm_symtab_define_special | |
4377 | (yasm_symtab *symtab, const char *name, yasm_sym_vis vis); | |
4378 | # 147 "./libyasm/symrec.h" | |
4379 | yasm_symrec *yasm_symtab_declare | |
4380 | (yasm_symtab *symtab, const char *name, yasm_sym_vis vis, | |
4381 | unsigned long line); | |
4382 | ||
4383 | ||
4384 | ||
4385 | ||
4386 | ||
4387 | ||
4388 | ||
4389 | void yasm_symrec_declare(yasm_symrec *symrec, yasm_sym_vis vis, | |
4390 | unsigned long line); | |
4391 | ||
4392 | ||
4393 | ||
4394 | ||
4395 | ||
4396 | ||
4397 | typedef int (*yasm_symtab_traverse_callback) | |
4398 | (yasm_symrec *sym, void *d); | |
4399 | # 175 "./libyasm/symrec.h" | |
4400 | int yasm_symtab_traverse | |
4401 | (yasm_symtab *symtab, void *d, | |
4402 | yasm_symtab_traverse_callback func); | |
4403 | ||
4404 | ||
4405 | typedef struct yasm_symtab_iter yasm_symtab_iter; | |
4406 | ||
4407 | ||
4408 | ||
4409 | ||
4410 | ||
4411 | const yasm_symtab_iter *yasm_symtab_first(const yasm_symtab *symtab); | |
4412 | ||
4413 | ||
4414 | ||
4415 | ||
4416 | ||
4417 | const yasm_symtab_iter *yasm_symtab_next | |
4418 | (const yasm_symtab_iter *prev); | |
4419 | ||
4420 | ||
4421 | ||
4422 | ||
4423 | ||
4424 | yasm_symrec *yasm_symtab_iter_value(const yasm_symtab_iter *cur); | |
4425 | # 210 "./libyasm/symrec.h" | |
4426 | void yasm_symtab_parser_finalize(yasm_symtab *symtab, int undef_extern, | |
4427 | yasm_objfmt *objfmt, | |
4428 | yasm_errwarns *errwarns); | |
4429 | ||
4430 | ||
4431 | ||
4432 | ||
4433 | ||
4434 | ||
4435 | void yasm_symtab_print(yasm_symtab *symtab, FILE *f, int indent_level); | |
4436 | ||
4437 | ||
4438 | ||
4439 | ||
4440 | ||
4441 | const char *yasm_symrec_get_name(const yasm_symrec *sym); | |
4442 | ||
4443 | ||
4444 | ||
4445 | ||
4446 | ||
4447 | yasm_sym_vis yasm_symrec_get_visibility(const yasm_symrec *sym); | |
4448 | ||
4449 | ||
4450 | ||
4451 | ||
4452 | ||
4453 | yasm_sym_status yasm_symrec_get_status(const yasm_symrec *sym); | |
4454 | ||
4455 | ||
4456 | ||
4457 | ||
4458 | ||
4459 | unsigned long yasm_symrec_get_line(const yasm_symrec *sym); | |
4460 | ||
4461 | ||
4462 | ||
4463 | ||
4464 | ||
4465 | const yasm_expr *yasm_symrec_get_equ | |
4466 | (const yasm_symrec *sym); | |
4467 | ||
4468 | ||
4469 | typedef yasm_bytecode *yasm_symrec_get_label_bytecodep; | |
4470 | ||
4471 | ||
4472 | ||
4473 | ||
4474 | ||
4475 | ||
4476 | ||
4477 | int yasm_symrec_get_label(const yasm_symrec *sym, | |
4478 | yasm_symrec_get_label_bytecodep *precbc); | |
4479 | ||
4480 | ||
4481 | ||
4482 | ||
4483 | ||
4484 | ||
4485 | int yasm_symrec_is_abs(const yasm_symrec *sym); | |
4486 | ||
4487 | ||
4488 | ||
4489 | ||
4490 | ||
4491 | int yasm_symrec_is_special(const yasm_symrec *sym); | |
4492 | ||
4493 | ||
4494 | ||
4495 | ||
4496 | ||
4497 | int yasm_symrec_is_curpos(const yasm_symrec *sym); | |
4498 | ||
4499 | ||
4500 | ||
4501 | ||
4502 | ||
4503 | ||
4504 | void *yasm_symrec_get_data | |
4505 | (yasm_symrec *sym, const yasm_assoc_data_callback *callback); | |
4506 | ||
4507 | ||
4508 | ||
4509 | ||
4510 | ||
4511 | ||
4512 | ||
4513 | void yasm_symrec_add_data(yasm_symrec *sym, | |
4514 | const yasm_assoc_data_callback *callback, | |
4515 | void *data); | |
4516 | ||
4517 | ||
4518 | ||
4519 | ||
4520 | ||
4521 | ||
4522 | void yasm_symrec_print(const yasm_symrec *sym, FILE *f, int indent_level); | |
4523 | # 73 "./libyasm.h" 2 | |
4524 | ||
4525 | # 1 "./libyasm/bytecode.h" 1 | |
4526 | # 38 "./libyasm/bytecode.h" | |
4527 | typedef struct yasm_effaddr yasm_effaddr; | |
4528 | ||
4529 | ||
4530 | typedef struct yasm_effaddr_callback { | |
4531 | ||
4532 | ||
4533 | ||
4534 | void (*destroy) ( yasm_effaddr *ea); | |
4535 | ||
4536 | ||
4537 | ||
4538 | ||
4539 | ||
4540 | ||
4541 | void (*print) (const yasm_effaddr *ea, FILE *f, int indent_level); | |
4542 | } yasm_effaddr_callback; | |
4543 | ||
4544 | ||
4545 | struct yasm_effaddr { | |
4546 | const yasm_effaddr_callback *callback; | |
4547 | ||
4548 | yasm_value disp; | |
4549 | ||
4550 | uintptr_t segreg; | |
4551 | ||
4552 | unsigned char need_nonzero_len; | |
4553 | unsigned char need_disp; | |
4554 | ||
4555 | ||
4556 | unsigned char nosplit; | |
4557 | ||
4558 | ||
4559 | unsigned char strong; | |
4560 | ||
4561 | ||
4562 | ||
4563 | }; | |
4564 | ||
4565 | ||
4566 | typedef struct yasm_dataval yasm_dataval; | |
4567 | ||
4568 | typedef struct yasm_datavalhead yasm_datavalhead; | |
4569 | # 89 "./libyasm/bytecode.h" | |
4570 | const yasm_expr *yasm_ea_get_disp(const yasm_effaddr *ea); | |
4571 | ||
4572 | ||
4573 | ||
4574 | ||
4575 | ||
4576 | ||
4577 | void yasm_ea_set_len(yasm_effaddr *ea, unsigned int len); | |
4578 | # 106 "./libyasm/bytecode.h" | |
4579 | void yasm_ea_set_nosplit(yasm_effaddr *ea, unsigned int nosplit); | |
4580 | # 116 "./libyasm/bytecode.h" | |
4581 | void yasm_ea_set_strong(yasm_effaddr *ea, unsigned int strong); | |
4582 | ||
4583 | ||
4584 | ||
4585 | ||
4586 | ||
4587 | ||
4588 | ||
4589 | void yasm_ea_set_segreg(yasm_effaddr *ea, uintptr_t segreg); | |
4590 | ||
4591 | ||
4592 | ||
4593 | ||
4594 | void yasm_ea_destroy( yasm_effaddr *ea); | |
4595 | ||
4596 | ||
4597 | ||
4598 | ||
4599 | ||
4600 | ||
4601 | void yasm_ea_print(const yasm_effaddr *ea, FILE *f, int indent_level); | |
4602 | ||
4603 | ||
4604 | ||
4605 | ||
4606 | ||
4607 | ||
4608 | ||
4609 | void yasm_bc_set_multiple(yasm_bytecode *bc, yasm_expr *e); | |
4610 | # 156 "./libyasm/bytecode.h" | |
4611 | yasm_bytecode *yasm_bc_create_data | |
4612 | (yasm_datavalhead *datahead, unsigned int size, int append_zero, | |
4613 | yasm_arch *arch, unsigned long line); | |
4614 | ||
4615 | ||
4616 | ||
4617 | ||
4618 | ||
4619 | ||
4620 | ||
4621 | yasm_bytecode *yasm_bc_create_leb128 | |
4622 | (yasm_datavalhead *datahead, int sign, unsigned long line); | |
4623 | ||
4624 | ||
4625 | ||
4626 | ||
4627 | ||
4628 | ||
4629 | ||
4630 | yasm_bytecode *yasm_bc_create_reserve | |
4631 | ( yasm_expr *numitems, unsigned int itemsize, | |
4632 | unsigned long line); | |
4633 | # 189 "./libyasm/bytecode.h" | |
4634 | yasm_bytecode *yasm_bc_create_incbin | |
4635 | ( char *filename, yasm_expr *start, | |
4636 | yasm_expr *maxlen, yasm_linemap *linemap, | |
4637 | unsigned long line); | |
4638 | # 206 "./libyasm/bytecode.h" | |
4639 | yasm_bytecode *yasm_bc_create_align | |
4640 | ( yasm_expr *boundary, yasm_expr *fill, | |
4641 | yasm_expr *maxskip, | |
4642 | const unsigned char **code_fill, unsigned long line); | |
4643 | ||
4644 | ||
4645 | ||
4646 | ||
4647 | ||
4648 | ||
4649 | ||
4650 | yasm_bytecode *yasm_bc_create_org | |
4651 | (unsigned long start, unsigned long line); | |
4652 | # 230 "./libyasm/bytecode.h" | |
4653 | yasm_bytecode *yasm_bc_create_insn | |
4654 | (yasm_arch *arch, const uintptr_t insn_data[4], int num_operands, | |
4655 | yasm_insn_operands *operands, unsigned long line); | |
4656 | ||
4657 | ||
4658 | ||
4659 | ||
4660 | ||
4661 | ||
4662 | ||
4663 | yasm_bytecode *yasm_bc_create_empty_insn(yasm_arch *arch, | |
4664 | unsigned long line); | |
4665 | ||
4666 | ||
4667 | ||
4668 | ||
4669 | ||
4670 | void yasm_bc_insn_add_prefix(yasm_bytecode *bc, | |
4671 | const uintptr_t prefix_data[4]); | |
4672 | ||
4673 | ||
4674 | ||
4675 | ||
4676 | ||
4677 | void yasm_bc_insn_add_seg_prefix(yasm_bytecode *bc, uintptr_t segreg); | |
4678 | ||
4679 | ||
4680 | ||
4681 | ||
4682 | ||
4683 | ||
4684 | yasm_section *yasm_bc_get_section | |
4685 | (yasm_bytecode *bc); | |
4686 | # 276 "./libyasm/bytecode.h" | |
4687 | void yasm_bc_destroy( yasm_bytecode *bc); | |
4688 | ||
4689 | ||
4690 | ||
4691 | ||
4692 | ||
4693 | ||
4694 | void yasm_bc_print(const yasm_bytecode *bc, FILE *f, int indent_level); | |
4695 | ||
4696 | ||
4697 | ||
4698 | ||
4699 | ||
4700 | void yasm_bc_finalize(yasm_bytecode *bc, yasm_bytecode *prev_bc); | |
4701 | # 298 "./libyasm/bytecode.h" | |
4702 | yasm_intnum *yasm_calc_bc_dist | |
4703 | (yasm_bytecode *precbc1, yasm_bytecode *precbc2); | |
4704 | ||
4705 | ||
4706 | ||
4707 | ||
4708 | ||
4709 | ||
4710 | ||
4711 | unsigned long yasm_bc_next_offset(yasm_bytecode *precbc); | |
4712 | # 319 "./libyasm/bytecode.h" | |
4713 | typedef void (*yasm_bc_add_span_func) | |
4714 | (void *add_span_data, yasm_bytecode *bc, int id, const yasm_value *value, | |
4715 | long neg_thres, long pos_thres); | |
4716 | # 335 "./libyasm/bytecode.h" | |
4717 | int yasm_bc_calc_len(yasm_bytecode *bc, yasm_bc_add_span_func add_span, | |
4718 | void *add_span_data); | |
4719 | # 352 "./libyasm/bytecode.h" | |
4720 | int yasm_bc_expand(yasm_bytecode *bc, int span, long old_val, long new_val, | |
4721 | long *neg_thres, long *pos_thres); | |
4722 | # 375 "./libyasm/bytecode.h" | |
4723 | unsigned char *yasm_bc_tobytes | |
4724 | (yasm_bytecode *bc, unsigned char *buf, unsigned long *bufsize, | |
4725 | int *gap, void *d, yasm_output_value_func output_value, | |
4726 | yasm_output_reloc_func output_reloc) | |
4727 | ; | |
4728 | # 388 "./libyasm/bytecode.h" | |
4729 | int yasm_bc_get_multiple(yasm_bytecode *bc, long *multiple, | |
4730 | int calc_bc_dist); | |
4731 | ||
4732 | ||
4733 | ||
4734 | ||
4735 | ||
4736 | yasm_dataval *yasm_dv_create_expr( yasm_expr *expn); | |
4737 | ||
4738 | ||
4739 | ||
4740 | ||
4741 | ||
4742 | ||
4743 | yasm_dataval *yasm_dv_create_string( char *contents, size_t len); | |
4744 | ||
4745 | ||
4746 | ||
4747 | ||
4748 | ||
4749 | ||
4750 | yasm_dataval *yasm_dv_create_raw( unsigned char *contents, | |
4751 | unsigned long len); | |
4752 | # 420 "./libyasm/bytecode.h" | |
4753 | void yasm_dvs_initialize(yasm_datavalhead *headp); | |
4754 | ||
4755 | ||
4756 | ||
4757 | ||
4758 | ||
4759 | ||
4760 | ||
4761 | void yasm_dvs_delete(yasm_datavalhead *headp); | |
4762 | # 439 "./libyasm/bytecode.h" | |
4763 | yasm_dataval *yasm_dvs_append | |
4764 | (yasm_datavalhead *headp, yasm_dataval *dv); | |
4765 | ||
4766 | ||
4767 | ||
4768 | ||
4769 | ||
4770 | ||
4771 | void yasm_dvs_print(const yasm_datavalhead *headp, FILE *f, int indent_level); | |
4772 | # 75 "./libyasm.h" 2 | |
4773 | # 1 "./libyasm/section.h" 1 | |
4774 | # 40 "./libyasm/section.h" | |
4775 | typedef struct yasm_reloc yasm_reloc; | |
4776 | # 57 "./libyasm/section.h" | |
4777 | yasm_object *yasm_object_create(const char *src_filename, | |
4778 | const char *obj_filename); | |
4779 | # 76 "./libyasm/section.h" | |
4780 | yasm_section *yasm_object_get_general | |
4781 | (yasm_object *object, const char *name, | |
4782 | yasm_expr *start, unsigned long align, int code, | |
4783 | int res_only, int *isnew, unsigned long line); | |
4784 | # 88 "./libyasm/section.h" | |
4785 | yasm_section *yasm_object_create_absolute | |
4786 | (yasm_object *object, yasm_expr *start, unsigned long line); | |
4787 | ||
4788 | ||
4789 | ||
4790 | ||
4791 | ||
4792 | void yasm_object_destroy( yasm_object *object); | |
4793 | ||
4794 | ||
4795 | ||
4796 | ||
4797 | ||
4798 | ||
4799 | void yasm_object_print(const yasm_object *object, FILE *f, int indent_level); | |
4800 | ||
4801 | ||
4802 | ||
4803 | ||
4804 | ||
4805 | ||
4806 | void yasm_object_finalize(yasm_object *object, yasm_errwarns *errwarns); | |
4807 | # 118 "./libyasm/section.h" | |
4808 | int yasm_object_sections_traverse | |
4809 | (yasm_object *object, void *d, | |
4810 | int (*func) (yasm_section *sect, void *d)); | |
4811 | ||
4812 | ||
4813 | ||
4814 | ||
4815 | ||
4816 | ||
4817 | yasm_section *yasm_object_find_general | |
4818 | (yasm_object *object, const char *name); | |
4819 | ||
4820 | ||
4821 | ||
4822 | ||
4823 | ||
4824 | void yasm_object_set_source_fn(yasm_object *object, const char *src_filename); | |
4825 | ||
4826 | ||
4827 | ||
4828 | ||
4829 | ||
4830 | const char *yasm_object_get_source_fn(const yasm_object *object); | |
4831 | ||
4832 | ||
4833 | ||
4834 | ||
4835 | ||
4836 | const char *yasm_object_get_object_fn(const yasm_object *object); | |
4837 | ||
4838 | ||
4839 | ||
4840 | ||
4841 | ||
4842 | yasm_symtab *yasm_object_get_symtab(const yasm_object *object); | |
4843 | ||
4844 | ||
4845 | ||
4846 | ||
4847 | ||
4848 | yasm_linemap *yasm_object_get_linemap | |
4849 | (const yasm_object *object); | |
4850 | # 168 "./libyasm/section.h" | |
4851 | void yasm_object_optimize(yasm_object *object, yasm_arch *arch, | |
4852 | yasm_errwarns *errwarns); | |
4853 | ||
4854 | ||
4855 | ||
4856 | ||
4857 | ||
4858 | int yasm_section_is_absolute(yasm_section *sect); | |
4859 | ||
4860 | ||
4861 | ||
4862 | ||
4863 | ||
4864 | int yasm_section_is_code(yasm_section *sect); | |
4865 | ||
4866 | ||
4867 | ||
4868 | ||
4869 | ||
4870 | unsigned long yasm_section_get_opt_flags(const yasm_section *sect); | |
4871 | ||
4872 | ||
4873 | ||
4874 | ||
4875 | ||
4876 | void yasm_section_set_opt_flags(yasm_section *sect, unsigned long opt_flags); | |
4877 | ||
4878 | ||
4879 | ||
4880 | ||
4881 | ||
4882 | ||
4883 | int yasm_section_is_default(const yasm_section *sect); | |
4884 | ||
4885 | ||
4886 | ||
4887 | ||
4888 | ||
4889 | void yasm_section_set_default(yasm_section *sect, int def); | |
4890 | ||
4891 | ||
4892 | ||
4893 | ||
4894 | ||
4895 | yasm_object *yasm_section_get_object(const yasm_section *sect); | |
4896 | ||
4897 | ||
4898 | ||
4899 | ||
4900 | ||
4901 | ||
4902 | void *yasm_section_get_data | |
4903 | (yasm_section *sect, const yasm_assoc_data_callback *callback); | |
4904 | ||
4905 | ||
4906 | ||
4907 | ||
4908 | ||
4909 | ||
4910 | ||
4911 | void yasm_section_add_data(yasm_section *sect, | |
4912 | const yasm_assoc_data_callback *callback, | |
4913 | void *data); | |
4914 | # 241 "./libyasm/section.h" | |
4915 | void yasm_section_add_reloc(yasm_section *sect, yasm_reloc *reloc, | |
4916 | void (*destroy_func) ( void *reloc)); | |
4917 | ||
4918 | ||
4919 | ||
4920 | ||
4921 | ||
4922 | yasm_reloc *yasm_section_relocs_first(yasm_section *sect); | |
4923 | ||
4924 | ||
4925 | ||
4926 | ||
4927 | ||
4928 | yasm_reloc *yasm_section_reloc_next(yasm_reloc *reloc); | |
4929 | # 265 "./libyasm/section.h" | |
4930 | void yasm_reloc_get(yasm_reloc *reloc, yasm_intnum **addrp, | |
4931 | yasm_symrec **symp); | |
4932 | ||
4933 | ||
4934 | ||
4935 | ||
4936 | ||
4937 | ||
4938 | yasm_bytecode *yasm_section_bcs_first(yasm_section *sect); | |
4939 | ||
4940 | ||
4941 | ||
4942 | ||
4943 | ||
4944 | ||
4945 | yasm_bytecode *yasm_section_bcs_last(yasm_section *sect); | |
4946 | # 291 "./libyasm/section.h" | |
4947 | yasm_bytecode *yasm_section_bcs_append | |
4948 | (yasm_section *sect, | |
4949 | yasm_bytecode *bc); | |
4950 | # 305 "./libyasm/section.h" | |
4951 | int yasm_section_bcs_traverse | |
4952 | (yasm_section *sect, yasm_errwarns *errwarns, | |
4953 | void *d, int (*func) (yasm_bytecode *bc, void *d)); | |
4954 | ||
4955 | ||
4956 | ||
4957 | ||
4958 | ||
4959 | const char *yasm_section_get_name | |
4960 | (const yasm_section *sect); | |
4961 | ||
4962 | ||
4963 | ||
4964 | ||
4965 | ||
4966 | yasm_symrec *yasm_section_abs_get_sym | |
4967 | (const yasm_section *sect); | |
4968 | ||
4969 | ||
4970 | ||
4971 | ||
4972 | ||
4973 | ||
4974 | void yasm_section_set_start(yasm_section *sect, yasm_expr *start, | |
4975 | unsigned long line); | |
4976 | ||
4977 | ||
4978 | ||
4979 | ||
4980 | ||
4981 | ||
4982 | const yasm_expr *yasm_section_get_start | |
4983 | (const yasm_section *sect); | |
4984 | ||
4985 | ||
4986 | ||
4987 | ||
4988 | ||
4989 | ||
4990 | void yasm_section_set_align(yasm_section *sect, unsigned long align, | |
4991 | unsigned long line); | |
4992 | ||
4993 | ||
4994 | ||
4995 | ||
4996 | ||
4997 | unsigned long yasm_section_get_align(const yasm_section *sect); | |
4998 | ||
4999 | ||
5000 | ||
5001 | ||
5002 | ||
5003 | ||
5004 | ||
5005 | void yasm_section_print( const yasm_section *sect, FILE *f, | |
5006 | int indent_level, int print_bcs); | |
5007 | # 76 "./libyasm.h" 2 | |
5008 | ||
5009 | # 1 "./libyasm/arch.h" 1 | |
5010 | # 38 "./libyasm/arch.h" | |
5011 | typedef enum yasm_arch_create_error { | |
5012 | YASM_ARCH_CREATE_OK = 0, | |
5013 | YASM_ARCH_CREATE_BAD_MACHINE, | |
5014 | YASM_ARCH_CREATE_BAD_PARSER | |
5015 | } yasm_arch_create_error; | |
5016 | ||
5017 | ||
5018 | typedef enum yasm_arch_insnprefix { | |
5019 | YASM_ARCH_NOTINSNPREFIX = 0, | |
5020 | YASM_ARCH_INSN, | |
5021 | YASM_ARCH_PREFIX | |
5022 | } yasm_arch_insnprefix; | |
5023 | ||
5024 | ||
5025 | ||
5026 | ||
5027 | typedef enum yasm_arch_regtmod { | |
5028 | YASM_ARCH_NOTREGTMOD = 0, | |
5029 | YASM_ARCH_REG, | |
5030 | YASM_ARCH_REGGROUP, | |
5031 | YASM_ARCH_SEGREG, | |
5032 | YASM_ARCH_TARGETMOD | |
5033 | } yasm_arch_regtmod; | |
5034 | ||
5035 | ||
5036 | typedef struct yasm_insn_operand yasm_insn_operand; | |
5037 | # 72 "./libyasm/arch.h" | |
5038 | typedef struct yasm_arch_base { | |
5039 | ||
5040 | const struct yasm_arch_module *module; | |
5041 | } yasm_arch_base; | |
5042 | # 84 "./libyasm/arch.h" | |
5043 | typedef struct yasm_arch_machine { | |
5044 | ||
5045 | const char *name; | |
5046 | ||
5047 | ||
5048 | const char *keyword; | |
5049 | } yasm_arch_machine; | |
5050 | ||
5051 | ||
5052 | ||
5053 | ||
5054 | ||
5055 | ||
5056 | ||
5057 | typedef struct yasm_arch_module { | |
5058 | ||
5059 | ||
5060 | ||
5061 | const char *name; | |
5062 | ||
5063 | ||
5064 | ||
5065 | ||
5066 | const char *keyword; | |
5067 | ||
5068 | ||
5069 | ||
5070 | ||
5071 | ||
5072 | yasm_arch * (*create) (const char *machine, const char *parser, | |
5073 | yasm_arch_create_error *error); | |
5074 | ||
5075 | ||
5076 | ||
5077 | ||
5078 | void (*destroy) ( yasm_arch *arch); | |
5079 | ||
5080 | ||
5081 | ||
5082 | ||
5083 | const char * (*get_machine) (const yasm_arch *arch); | |
5084 | ||
5085 | ||
5086 | ||
5087 | ||
5088 | unsigned int (*get_address_size) (const yasm_arch *arch); | |
5089 | ||
5090 | ||
5091 | ||
5092 | ||
5093 | int (*set_var) (yasm_arch *arch, const char *var, unsigned long val); | |
5094 | ||
5095 | ||
5096 | ||
5097 | ||
5098 | void (*parse_cpu) (yasm_arch *arch, const char *cpuid, size_t cpuid_len); | |
5099 | ||
5100 | ||
5101 | ||
5102 | ||
5103 | yasm_arch_insnprefix (*parse_check_insnprefix) | |
5104 | (yasm_arch *arch, uintptr_t data[4], const char *id, | |
5105 | size_t id_len); | |
5106 | ||
5107 | ||
5108 | ||
5109 | ||
5110 | yasm_arch_regtmod (*parse_check_regtmod) | |
5111 | (yasm_arch *arch, uintptr_t *data, const char *id, | |
5112 | size_t id_len); | |
5113 | ||
5114 | ||
5115 | ||
5116 | ||
5117 | int (*parse_directive) (yasm_arch *arch, const char *name, | |
5118 | yasm_valparamhead *valparams, | |
5119 | yasm_valparamhead *objext_valparams, | |
5120 | yasm_object *object, unsigned long line); | |
5121 | ||
5122 | ||
5123 | ||
5124 | ||
5125 | const unsigned char ** (*get_fill) (const yasm_arch *arch); | |
5126 | ||
5127 | ||
5128 | ||
5129 | ||
5130 | void (*finalize_insn) | |
5131 | (yasm_arch *arch, yasm_bytecode *bc, yasm_bytecode *prev_bc, | |
5132 | const uintptr_t data[4], int num_operands, | |
5133 | yasm_insn_operands *operands, int num_prefixes, | |
5134 | uintptr_t **prefixes, int num_segregs, const uintptr_t *segregs); | |
5135 | ||
5136 | ||
5137 | ||
5138 | ||
5139 | int (*floatnum_tobytes) (yasm_arch *arch, const yasm_floatnum *flt, | |
5140 | unsigned char *buf, size_t destsize, | |
5141 | size_t valsize, size_t shift, int warn); | |
5142 | ||
5143 | ||
5144 | ||
5145 | ||
5146 | int (*intnum_tobytes) (yasm_arch *arch, const yasm_intnum *intn, | |
5147 | unsigned char *buf, size_t destsize, size_t valsize, | |
5148 | int shift, const yasm_bytecode *bc, | |
5149 | int warn); | |
5150 | ||
5151 | ||
5152 | ||
5153 | ||
5154 | unsigned int (*get_reg_size) (yasm_arch *arch, uintptr_t reg); | |
5155 | ||
5156 | ||
5157 | ||
5158 | ||
5159 | uintptr_t (*reggroup_get_reg) (yasm_arch *arch, uintptr_t reggroup, | |
5160 | unsigned long regindex); | |
5161 | ||
5162 | ||
5163 | ||
5164 | ||
5165 | void (*reg_print) (yasm_arch *arch, uintptr_t reg, FILE *f); | |
5166 | ||
5167 | ||
5168 | ||
5169 | ||
5170 | void (*segreg_print) (yasm_arch *arch, uintptr_t segreg, FILE *f); | |
5171 | ||
5172 | ||
5173 | ||
5174 | ||
5175 | yasm_effaddr * (*ea_create) (yasm_arch *arch, yasm_expr *e); | |
5176 | ||
5177 | ||
5178 | ||
5179 | ||
5180 | ||
5181 | yasm_arch_machine *machines; | |
5182 | ||
5183 | ||
5184 | ||
5185 | ||
5186 | ||
5187 | const char *default_machine_keyword; | |
5188 | ||
5189 | ||
5190 | ||
5191 | ||
5192 | ||
5193 | unsigned int wordsize; | |
5194 | ||
5195 | ||
5196 | ||
5197 | ||
5198 | ||
5199 | unsigned int min_insn_len; | |
5200 | } yasm_arch_module; | |
5201 | # 297 "./libyasm/arch.h" | |
5202 | const char *yasm_arch_name(const yasm_arch *arch); | |
5203 | ||
5204 | ||
5205 | ||
5206 | ||
5207 | ||
5208 | const char *yasm_arch_keyword(const yasm_arch *arch); | |
5209 | ||
5210 | ||
5211 | ||
5212 | ||
5213 | ||
5214 | unsigned int yasm_arch_wordsize(const yasm_arch *arch); | |
5215 | ||
5216 | ||
5217 | ||
5218 | ||
5219 | ||
5220 | unsigned int yasm_arch_min_insn_len(const yasm_arch *arch); | |
5221 | # 326 "./libyasm/arch.h" | |
5222 | yasm_arch *yasm_arch_create(const yasm_arch_module *module, | |
5223 | const char *machine, const char *parser, | |
5224 | yasm_arch_create_error *error); | |
5225 | ||
5226 | ||
5227 | ||
5228 | ||
5229 | void yasm_arch_destroy( yasm_arch *arch); | |
5230 | ||
5231 | ||
5232 | ||
5233 | ||
5234 | ||
5235 | const char *yasm_arch_get_machine(const yasm_arch *arch); | |
5236 | ||
5237 | ||
5238 | ||
5239 | ||
5240 | ||
5241 | unsigned int yasm_arch_get_address_size(const yasm_arch *arch); | |
5242 | ||
5243 | ||
5244 | ||
5245 | ||
5246 | ||
5247 | ||
5248 | ||
5249 | int yasm_arch_set_var(yasm_arch *arch, const char *var, unsigned long val); | |
5250 | # 362 "./libyasm/arch.h" | |
5251 | void yasm_arch_parse_cpu(yasm_arch *arch, const char *cpuid, size_t cpuid_len); | |
5252 | # 376 "./libyasm/arch.h" | |
5253 | yasm_arch_insnprefix yasm_arch_parse_check_insnprefix | |
5254 | (yasm_arch *arch, uintptr_t data[4], const char *id, | |
5255 | size_t id_len); | |
5256 | # 392 "./libyasm/arch.h" | |
5257 | yasm_arch_regtmod yasm_arch_parse_check_regtmod | |
5258 | (yasm_arch *arch, uintptr_t *data, const char *id, | |
5259 | size_t id_len); | |
5260 | # 408 "./libyasm/arch.h" | |
5261 | int yasm_arch_parse_directive(yasm_arch *arch, const char *name, | |
5262 | yasm_valparamhead *valparams, | |
5263 | yasm_valparamhead *objext_valparams, | |
5264 | yasm_object *object, unsigned long line); | |
5265 | ||
5266 | ||
5267 | ||
5268 | ||
5269 | ||
5270 | ||
5271 | const unsigned char **yasm_arch_get_fill(const yasm_arch *arch); | |
5272 | # 436 "./libyasm/arch.h" | |
5273 | void yasm_arch_finalize_insn | |
5274 | (yasm_arch *arch, yasm_bytecode *bc, yasm_bytecode *prev_bc, | |
5275 | const uintptr_t data[4], int num_operands, | |
5276 | yasm_insn_operands *operands, int num_prefixes, | |
5277 | const uintptr_t **prefixes, int num_segregs, const uintptr_t *segregs); | |
5278 | # 456 "./libyasm/arch.h" | |
5279 | int yasm_arch_floatnum_tobytes(yasm_arch *arch, const yasm_floatnum *flt, | |
5280 | unsigned char *buf, size_t destsize, | |
5281 | size_t valsize, size_t shift, int warn); | |
5282 | # 476 "./libyasm/arch.h" | |
5283 | int yasm_arch_intnum_tobytes(yasm_arch *arch, const yasm_intnum *intn, | |
5284 | unsigned char *buf, size_t destsize, | |
5285 | size_t valsize, int shift, | |
5286 | const yasm_bytecode *bc, int warn); | |
5287 | ||
5288 | ||
5289 | ||
5290 | ||
5291 | ||
5292 | ||
5293 | unsigned int yasm_arch_get_reg_size(yasm_arch *arch, uintptr_t reg); | |
5294 | # 496 "./libyasm/arch.h" | |
5295 | uintptr_t yasm_arch_reggroup_get_reg(yasm_arch *arch, uintptr_t reggroup, | |
5296 | unsigned long regindex); | |
5297 | ||
5298 | ||
5299 | ||
5300 | ||
5301 | ||
5302 | ||
5303 | void yasm_arch_reg_print(yasm_arch *arch, uintptr_t reg, FILE *f); | |
5304 | ||
5305 | ||
5306 | ||
5307 | ||
5308 | ||
5309 | ||
5310 | void yasm_arch_segreg_print(yasm_arch *arch, uintptr_t segreg, FILE *f); | |
5311 | ||
5312 | ||
5313 | ||
5314 | ||
5315 | ||
5316 | ||
5317 | yasm_effaddr *yasm_arch_ea_create(yasm_arch *arch, yasm_expr *e); | |
5318 | # 590 "./libyasm/arch.h" | |
5319 | yasm_insn_operand *yasm_operand_create_reg(uintptr_t reg); | |
5320 | ||
5321 | ||
5322 | ||
5323 | ||
5324 | ||
5325 | yasm_insn_operand *yasm_operand_create_segreg(uintptr_t segreg); | |
5326 | ||
5327 | ||
5328 | ||
5329 | ||
5330 | ||
5331 | yasm_insn_operand *yasm_operand_create_mem( yasm_effaddr *ea); | |
5332 | ||
5333 | ||
5334 | ||
5335 | ||
5336 | ||
5337 | ||
5338 | ||
5339 | yasm_insn_operand *yasm_operand_create_imm( yasm_expr *val); | |
5340 | ||
5341 | ||
5342 | ||
5343 | ||
5344 | ||
5345 | ||
5346 | ||
5347 | void yasm_operand_print(const yasm_insn_operand *op, FILE *f, int indent_level, | |
5348 | yasm_arch *arch); | |
5349 | ||
5350 | ||
5351 | ||
5352 | ||
5353 | yasm_insn_operands *yasm_ops_create(void); | |
5354 | ||
5355 | ||
5356 | ||
5357 | ||
5358 | ||
5359 | void yasm_ops_destroy(yasm_insn_operands *headp, int content); | |
5360 | ||
5361 | ||
5362 | ||
5363 | ||
5364 | ||
5365 | yasm_insn_operand *yasm_ops_first(yasm_insn_operands *headp); | |
5366 | ||
5367 | ||
5368 | ||
5369 | ||
5370 | ||
5371 | yasm_insn_operand *yasm_operand_next(yasm_insn_operand *cur); | |
5372 | # 666 "./libyasm/arch.h" | |
5373 | yasm_insn_operand *yasm_ops_append | |
5374 | (yasm_insn_operands *headp, | |
5375 | yasm_insn_operand *op); | |
5376 | ||
5377 | ||
5378 | ||
5379 | ||
5380 | ||
5381 | ||
5382 | ||
5383 | void yasm_ops_print(const yasm_insn_operands *headp, FILE *f, int indent_level, | |
5384 | yasm_arch *arch); | |
5385 | # 78 "./libyasm.h" 2 | |
5386 | # 1 "./libyasm/dbgfmt.h" 1 | |
5387 | # 41 "./libyasm/dbgfmt.h" | |
5388 | typedef struct yasm_dbgfmt_base { | |
5389 | ||
5390 | const struct yasm_dbgfmt_module *module; | |
5391 | } yasm_dbgfmt_base; | |
5392 | ||
5393 | ||
5394 | ||
5395 | typedef struct yasm_dbgfmt_module { | |
5396 | ||
5397 | const char *name; | |
5398 | ||
5399 | ||
5400 | const char *keyword; | |
5401 | # 63 "./libyasm/dbgfmt.h" | |
5402 | yasm_dbgfmt * (*create) | |
5403 | (yasm_object *object, yasm_objfmt *of, yasm_arch *a); | |
5404 | ||
5405 | ||
5406 | ||
5407 | ||
5408 | void (*destroy) ( yasm_dbgfmt *dbgfmt); | |
5409 | ||
5410 | ||
5411 | ||
5412 | ||
5413 | int (*directive) (yasm_dbgfmt *dbgfmt, const char *name, | |
5414 | yasm_section *sect, | |
5415 | yasm_valparamhead *valparams, | |
5416 | unsigned long line); | |
5417 | ||
5418 | ||
5419 | ||
5420 | ||
5421 | void (*generate) (yasm_dbgfmt *dbgfmt, yasm_errwarns *errwarns); | |
5422 | } yasm_dbgfmt_module; | |
5423 | ||
5424 | ||
5425 | ||
5426 | ||
5427 | ||
5428 | const char *yasm_dbgfmt_keyword(const yasm_dbgfmt *dbgfmt); | |
5429 | # 100 "./libyasm/dbgfmt.h" | |
5430 | yasm_dbgfmt *yasm_dbgfmt_create | |
5431 | (const yasm_dbgfmt_module *module, yasm_object *object, yasm_objfmt *of, | |
5432 | yasm_arch *a); | |
5433 | ||
5434 | ||
5435 | ||
5436 | ||
5437 | void yasm_dbgfmt_destroy( yasm_dbgfmt *dbgfmt); | |
5438 | # 118 "./libyasm/dbgfmt.h" | |
5439 | int yasm_dbgfmt_directive(yasm_dbgfmt *dbgfmt, const char *name, | |
5440 | yasm_section *sect, | |
5441 | yasm_valparamhead *valparams, | |
5442 | unsigned long line); | |
5443 | ||
5444 | ||
5445 | ||
5446 | ||
5447 | ||
5448 | ||
5449 | void yasm_dbgfmt_generate(yasm_dbgfmt *dbgfmt, yasm_errwarns *errwarns); | |
5450 | # 79 "./libyasm.h" 2 | |
5451 | # 1 "./libyasm/objfmt.h" 1 | |
5452 | # 41 "./libyasm/objfmt.h" | |
5453 | typedef struct yasm_objfmt_base { | |
5454 | ||
5455 | const struct yasm_objfmt_module *module; | |
5456 | } yasm_objfmt_base; | |
5457 | ||
5458 | ||
5459 | ||
5460 | typedef struct yasm_objfmt_module { | |
5461 | ||
5462 | const char *name; | |
5463 | ||
5464 | ||
5465 | const char *keyword; | |
5466 | ||
5467 | ||
5468 | ||
5469 | ||
5470 | const char *extension; | |
5471 | ||
5472 | ||
5473 | ||
5474 | ||
5475 | const unsigned char default_x86_mode_bits; | |
5476 | ||
5477 | ||
5478 | ||
5479 | ||
5480 | ||
5481 | ||
5482 | const char **dbgfmt_keywords; | |
5483 | ||
5484 | ||
5485 | ||
5486 | ||
5487 | const char *default_dbgfmt_keyword; | |
5488 | # 84 "./libyasm/objfmt.h" | |
5489 | yasm_objfmt * (*create) (yasm_object *object, | |
5490 | yasm_arch *a); | |
5491 | ||
5492 | ||
5493 | ||
5494 | ||
5495 | void (*output) (yasm_objfmt *of, FILE *f, int all_syms, yasm_dbgfmt *df, | |
5496 | yasm_errwarns *errwarns); | |
5497 | ||
5498 | ||
5499 | ||
5500 | ||
5501 | void (*destroy) ( yasm_objfmt *objfmt); | |
5502 | ||
5503 | ||
5504 | ||
5505 | ||
5506 | yasm_section * (*add_default_section) (yasm_objfmt *objfmt); | |
5507 | ||
5508 | ||
5509 | ||
5510 | ||
5511 | yasm_section * | |
5512 | (*section_switch)(yasm_objfmt *objfmt, yasm_valparamhead *valparams, | |
5513 | yasm_valparamhead *objext_valparams, | |
5514 | unsigned long line); | |
5515 | ||
5516 | ||
5517 | ||
5518 | ||
5519 | yasm_symrec * (*extern_declare) | |
5520 | (yasm_objfmt *objfmt, const char *name, | |
5521 | yasm_valparamhead *objext_valparams, unsigned long line); | |
5522 | ||
5523 | ||
5524 | ||
5525 | ||
5526 | yasm_symrec * (*global_declare) | |
5527 | (yasm_objfmt *objfmt, const char *name, | |
5528 | yasm_valparamhead *objext_valparams, unsigned long line); | |
5529 | ||
5530 | ||
5531 | ||
5532 | ||
5533 | yasm_symrec * (*common_declare) | |
5534 | (yasm_objfmt *objfmt, const char *name, yasm_expr *size, | |
5535 | yasm_valparamhead *objext_valparams, unsigned long line); | |
5536 | ||
5537 | ||
5538 | ||
5539 | ||
5540 | int (*directive) (yasm_objfmt *objfmt, const char *name, | |
5541 | yasm_valparamhead *valparams, | |
5542 | yasm_valparamhead *objext_valparams, | |
5543 | unsigned long line); | |
5544 | } yasm_objfmt_module; | |
5545 | ||
5546 | ||
5547 | ||
5548 | ||
5549 | ||
5550 | ||
5551 | ||
5552 | yasm_objfmt *yasm_objfmt_create | |
5553 | (const yasm_objfmt_module *module, yasm_object *object, yasm_arch *a); | |
5554 | # 161 "./libyasm/objfmt.h" | |
5555 | void yasm_objfmt_output(yasm_objfmt *objfmt, FILE *f, int all_syms, | |
5556 | yasm_dbgfmt *df, yasm_errwarns *errwarns); | |
5557 | ||
5558 | ||
5559 | ||
5560 | ||
5561 | void yasm_objfmt_destroy( yasm_objfmt *objfmt); | |
5562 | ||
5563 | ||
5564 | ||
5565 | ||
5566 | ||
5567 | yasm_section *yasm_objfmt_add_default_section(yasm_objfmt *objfmt); | |
5568 | # 184 "./libyasm/objfmt.h" | |
5569 | yasm_section *yasm_objfmt_section_switch | |
5570 | (yasm_objfmt *objfmt, yasm_valparamhead *valparams, | |
5571 | yasm_valparamhead *objext_valparams, unsigned long line); | |
5572 | # 196 "./libyasm/objfmt.h" | |
5573 | yasm_symrec *yasm_objfmt_extern_declare | |
5574 | (yasm_objfmt *objfmt, const char *name, | |
5575 | yasm_valparamhead *objext_valparams, unsigned long line); | |
5576 | # 208 "./libyasm/objfmt.h" | |
5577 | yasm_symrec *yasm_objfmt_global_declare | |
5578 | (yasm_objfmt *objfmt, const char *name, | |
5579 | yasm_valparamhead *objext_valparams, unsigned long line); | |
5580 | # 222 "./libyasm/objfmt.h" | |
5581 | yasm_symrec *yasm_objfmt_common_declare | |
5582 | (yasm_objfmt *objfmt, const char *name, yasm_expr *size, | |
5583 | yasm_valparamhead *objext_valparams, unsigned long line); | |
5584 | # 235 "./libyasm/objfmt.h" | |
5585 | int yasm_objfmt_directive(yasm_objfmt *objfmt, const char *name, | |
5586 | yasm_valparamhead *valparams, | |
5587 | yasm_valparamhead *objext_valparams, | |
5588 | unsigned long line); | |
5589 | # 80 "./libyasm.h" 2 | |
5590 | # 1 "./libyasm/listfmt.h" 1 | |
5591 | # 41 "./libyasm/listfmt.h" | |
5592 | typedef struct yasm_listfmt_base { | |
5593 | ||
5594 | const struct yasm_listfmt_module *module; | |
5595 | } yasm_listfmt_base; | |
5596 | ||
5597 | ||
5598 | ||
5599 | typedef struct yasm_listfmt_module { | |
5600 | ||
5601 | const char *name; | |
5602 | ||
5603 | ||
5604 | const char *keyword; | |
5605 | # 62 "./libyasm/listfmt.h" | |
5606 | yasm_listfmt * (*create) | |
5607 | (const char *in_filename, const char *obj_filename); | |
5608 | ||
5609 | ||
5610 | ||
5611 | ||
5612 | void (*destroy) ( yasm_listfmt *listfmt); | |
5613 | ||
5614 | ||
5615 | ||
5616 | ||
5617 | void (*output) (yasm_listfmt *listfmt, FILE *f, yasm_linemap *linemap, | |
5618 | yasm_arch *arch); | |
5619 | } yasm_listfmt_module; | |
5620 | ||
5621 | ||
5622 | ||
5623 | ||
5624 | ||
5625 | const char *yasm_listfmt_keyword(const yasm_listfmt *listfmt); | |
5626 | # 91 "./libyasm/listfmt.h" | |
5627 | yasm_listfmt *yasm_listfmt_create | |
5628 | (const yasm_listfmt_module *module, const char *in_filename, | |
5629 | const char *obj_filename); | |
5630 | ||
5631 | ||
5632 | ||
5633 | ||
5634 | void yasm_listfmt_destroy( yasm_listfmt *listfmt); | |
5635 | # 107 "./libyasm/listfmt.h" | |
5636 | void yasm_listfmt_output(yasm_listfmt *listfmt, FILE *f, | |
5637 | yasm_linemap *linemap, yasm_arch *arch); | |
5638 | # 81 "./libyasm.h" 2 | |
5639 | # 1 "./libyasm/parser.h" 1 | |
5640 | # 38 "./libyasm/parser.h" | |
5641 | typedef struct yasm_parser_module { | |
5642 | ||
5643 | const char *name; | |
5644 | ||
5645 | ||
5646 | const char *keyword; | |
5647 | ||
5648 | ||
5649 | ||
5650 | ||
5651 | ||
5652 | const char **preproc_keywords; | |
5653 | ||
5654 | ||
5655 | const char *default_preproc_keyword; | |
5656 | # 70 "./libyasm/parser.h" | |
5657 | void (*do_parse) | |
5658 | (yasm_object *object, yasm_preproc *pp, yasm_arch *a, yasm_objfmt *of, | |
5659 | yasm_dbgfmt *df, FILE *f, const char *in_filename, int save_input, | |
5660 | yasm_section *def_sect, yasm_errwarns *errwarns); | |
5661 | } yasm_parser_module; | |
5662 | # 82 "./libyasm.h" 2 | |
5663 | # 1 "./libyasm/preproc.h" 1 | |
5664 | # 41 "./libyasm/preproc.h" | |
5665 | typedef struct yasm_preproc_base { | |
5666 | ||
5667 | const struct yasm_preproc_module *module; | |
5668 | } yasm_preproc_base; | |
5669 | ||
5670 | ||
5671 | ||
5672 | typedef struct yasm_preproc_module { | |
5673 | ||
5674 | const char *name; | |
5675 | ||
5676 | ||
5677 | const char *keyword; | |
5678 | # 67 "./libyasm/preproc.h" | |
5679 | yasm_preproc * (*create) (FILE *f, const char *in_filename, | |
5680 | yasm_linemap *lm, | |
5681 | yasm_errwarns *errwarns); | |
5682 | ||
5683 | ||
5684 | ||
5685 | ||
5686 | void (*destroy) ( yasm_preproc *preproc); | |
5687 | ||
5688 | ||
5689 | ||
5690 | ||
5691 | size_t (*input) (yasm_preproc *preproc, char *buf, | |
5692 | size_t max_size); | |
5693 | ||
5694 | ||
5695 | ||
5696 | ||
5697 | size_t (*get_included_file) (yasm_preproc *preproc, char *buf, | |
5698 | size_t max_size); | |
5699 | ||
5700 | ||
5701 | ||
5702 | ||
5703 | void (*add_include_file) (yasm_preproc *preproc, const char *filename); | |
5704 | ||
5705 | ||
5706 | ||
5707 | ||
5708 | void (*predefine_macro) (yasm_preproc *preproc, const char *macronameval); | |
5709 | ||
5710 | ||
5711 | ||
5712 | ||
5713 | void (*undefine_macro) (yasm_preproc *preproc, const char *macroname); | |
5714 | ||
5715 | ||
5716 | ||
5717 | ||
5718 | void (*define_builtin) (yasm_preproc *preproc, const char *macronameval); | |
5719 | } yasm_preproc_module; | |
5720 | # 120 "./libyasm/preproc.h" | |
5721 | yasm_preproc *yasm_preproc_create | |
5722 | (yasm_preproc_module *module, FILE *f, const char *in_filename, | |
5723 | yasm_linemap *lm, yasm_errwarns *errwarns); | |
5724 | ||
5725 | ||
5726 | ||
5727 | ||
5728 | void yasm_preproc_destroy( yasm_preproc *preproc); | |
5729 | # 136 "./libyasm/preproc.h" | |
5730 | size_t yasm_preproc_input(yasm_preproc *preproc, char *buf, | |
5731 | size_t max_size); | |
5732 | ||
5733 | ||
5734 | ||
5735 | ||
5736 | ||
5737 | ||
5738 | ||
5739 | size_t yasm_preproc_get_included_file(yasm_preproc *preproc, | |
5740 | char *buf, size_t max_size); | |
5741 | ||
5742 | ||
5743 | ||
5744 | ||
5745 | ||
5746 | void yasm_preproc_add_include_file(yasm_preproc *preproc, | |
5747 | const char *filename); | |
5748 | ||
5749 | ||
5750 | ||
5751 | ||
5752 | ||
5753 | void yasm_preproc_predefine_macro(yasm_preproc *preproc, | |
5754 | const char *macronameval); | |
5755 | ||
5756 | ||
5757 | ||
5758 | ||
5759 | ||
5760 | void yasm_preproc_undefine_macro(yasm_preproc *preproc, const char *macroname); | |
5761 | ||
5762 | ||
5763 | ||
5764 | ||
5765 | ||
5766 | void yasm_preproc_define_builtin(yasm_preproc *preproc, | |
5767 | const char *macronameval); | |
5768 | # 83 "./libyasm.h" 2 | |
5769 | ||
5770 | # 1 "./libyasm/file.h" 1 | |
5771 | # 38 "./libyasm/file.h" | |
5772 | typedef struct yasm_scanner { | |
5773 | unsigned char *bot; | |
5774 | unsigned char *tok; | |
5775 | unsigned char *ptr; | |
5776 | unsigned char *cur; | |
5777 | unsigned char *lim; | |
5778 | unsigned char *top; | |
5779 | unsigned char *eof; | |
5780 | } yasm_scanner; | |
5781 | ||
5782 | ||
5783 | ||
5784 | ||
5785 | void yasm_scanner_initialize(yasm_scanner *scanner); | |
5786 | ||
5787 | ||
5788 | ||
5789 | ||
5790 | void yasm_scanner_delete(yasm_scanner *scanner); | |
5791 | # 67 "./libyasm/file.h" | |
5792 | int yasm_fill_helper | |
5793 | (yasm_scanner *scanner, unsigned char **cursor, | |
5794 | size_t (*input_func) (void *d, unsigned char *buf, size_t max), | |
5795 | void *input_func_data); | |
5796 | # 81 "./libyasm/file.h" | |
5797 | void yasm_unescape_cstring(unsigned char *str, size_t *len); | |
5798 | # 90 "./libyasm/file.h" | |
5799 | size_t yasm__splitpath_unix(const char *path, const char **tail); | |
5800 | # 99 "./libyasm/file.h" | |
5801 | size_t yasm__splitpath_win(const char *path, const char **tail); | |
5802 | # 123 "./libyasm/file.h" | |
5803 | char *yasm__abspath_unix(const char *path); | |
5804 | ||
5805 | ||
5806 | ||
5807 | ||
5808 | ||
5809 | ||
5810 | char *yasm__abspath_win(const char *path); | |
5811 | # 156 "./libyasm/file.h" | |
5812 | char *yasm__combpath_unix(const char *from, const char *to); | |
5813 | # 166 "./libyasm/file.h" | |
5814 | char *yasm__combpath_win(const char *from, const char *to); | |
5815 | # 205 "./libyasm/file.h" | |
5816 | FILE *yasm_fopen_include | |
5817 | (const char *iname, const char *from, const char *mode, | |
5818 | char **oname); | |
5819 | ||
5820 | ||
5821 | ||
5822 | void yasm_delete_include_paths(void); | |
5823 | ||
5824 | ||
5825 | ||
5826 | ||
5827 | ||
5828 | ||
5829 | ||
5830 | void yasm_add_include_path(const char *path); | |
5831 | # 349 "./libyasm/file.h" | |
5832 | size_t yasm_fwrite_16_l(unsigned short val, FILE *f); | |
5833 | # 358 "./libyasm/file.h" | |
5834 | size_t yasm_fwrite_32_l(unsigned long val, FILE *f); | |
5835 | # 367 "./libyasm/file.h" | |
5836 | size_t yasm_fwrite_16_b(unsigned short val, FILE *f); | |
5837 | # 376 "./libyasm/file.h" | |
5838 | size_t yasm_fwrite_32_b(unsigned long val, FILE *f); | |
5839 | # 85 "./libyasm.h" 2 | |
5840 | # 1 "./libyasm/module.h" 1 | |
5841 | # 30 "./libyasm/module.h" | |
5842 | typedef enum yasm_module_type { | |
5843 | YASM_MODULE_ARCH = 0, | |
5844 | YASM_MODULE_DBGFMT, | |
5845 | YASM_MODULE_OBJFMT, | |
5846 | YASM_MODULE_LISTFMT, | |
5847 | YASM_MODULE_PARSER, | |
5848 | YASM_MODULE_PREPROC | |
5849 | } yasm_module_type; | |
5850 | ||
5851 | void *yasm_load_module | |
5852 | (yasm_module_type type, const char *keyword); | |
5853 | # 55 "./libyasm/module.h" | |
5854 | void yasm_list_modules | |
5855 | (yasm_module_type type, | |
5856 | void (*printfunc) (const char *name, const char *keyword)); | |
5857 | # 86 "./libyasm.h" 2 | |
5858 | # 34 "frontends/yasm/yasm.c" 2 | |
5859 | ||
5860 | ||
5861 | # 1 "/usr/include/libgen.h" 1 3 4 | |
5862 | ||
5863 | ||
5864 | ||
5865 | # 1 "/usr/include/gentoo-multilib/x86/libgen.h" 1 3 4 | |
5866 | # 22 "/usr/include/gentoo-multilib/x86/libgen.h" 3 4 | |
5867 | # 1 "/usr/include/features.h" 1 3 4 | |
5868 | # 23 "/usr/include/gentoo-multilib/x86/libgen.h" 2 3 4 | |
5869 | ||
5870 | ||
5871 | ||
5872 | ||
5873 | extern char *dirname (char *__path) __attribute__ ((__nothrow__)); | |
5874 | ||
5875 | ||
5876 | ||
5877 | ||
5878 | ||
5879 | ||
5880 | ||
5881 | extern char *__xpg_basename (char *__path) __attribute__ ((__nothrow__)); | |
5882 | ||
5883 | ||
5884 | ||
5885 | # 5 "/usr/include/libgen.h" 2 3 4 | |
5886 | # 37 "frontends/yasm/yasm.c" 2 | |
5887 | ||
5888 | ||
5889 | # 1 "frontends/yasm/yasm-options.h" 1 | |
5890 | # 33 "frontends/yasm/yasm-options.h" | |
5891 | typedef struct opt_option_s | |
5892 | { | |
5893 | ||
5894 | char sopt; | |
5895 | ||
5896 | ||
5897 | const char *lopt; | |
5898 | ||
5899 | ||
5900 | int takes_param; | |
5901 | ||
5902 | int (*handler) (char *cmd, char *param, int extra); | |
5903 | int extra; | |
5904 | ||
5905 | ||
5906 | const char *description; | |
5907 | ||
5908 | ||
5909 | ||
5910 | const char *param_desc; | |
5911 | } opt_option; | |
5912 | ||
5913 | ||
5914 | int not_an_option_handler(char *param); | |
5915 | ||
5916 | ||
5917 | int other_option_handler(char *option); | |
5918 | ||
5919 | ||
5920 | ||
5921 | ||
5922 | ||
5923 | ||
5924 | int parse_cmdline(int argc, char **argv, opt_option *options, size_t nopts, | |
5925 | void (*print_error) (const char *fmt, ...)); | |
5926 | ||
5927 | ||
5928 | ||
5929 | ||
5930 | void help_msg(const char *msg, const char *tail, opt_option *options, | |
5931 | size_t nopts); | |
5932 | # 40 "frontends/yasm/yasm.c" 2 | |
5933 | ||
5934 | # 1 "./license.c" 1 | |
5935 | ||
5936 | ||
5937 | static const char *license_msg[] = { | |
5938 | "Yasm is Copyright (c) 2001-2007 Peter Johnson and other Yasm developers.", | |
5939 | "", | |
5940 | "Yasm developers and/or contributors include:", | |
5941 | " Peter Johnson", | |
5942 | " Michael Urman", | |
5943 | " Brian Gladman (VC8 build files, other fixes)", | |
5944 | " Stanislav Karchebny (options parser)", | |
5945 | " Mathieu Monnier (SSE4 instruction patches)", | |
5946 | " Anonymous \"NASM64\" developer (NASM preprocessor fixes)", | |
5947 | " Stephen Polkowski (x86 instruction patches)", | |
5948 | " Henryk Richter (Mach-O object format)", | |
5949 | " Ben Skeggs (patches, bug reports)", | |
5950 | "", | |
5951 | "-----------------------------------", | |
5952 | "Yasm licensing overview and summary", | |
5953 | "-----------------------------------", | |
5954 | "", | |
5955 | "Note: This document does not provide legal advice nor is it the actual", | |
5956 | "license of any part of Yasm. See the individual licenses for complete", | |
5957 | "details. Consult a lawyer for legal advice.", | |
5958 | "", | |
5959 | "The primary license of Yasm is the 2-clause BSD license. Please use this", | |
5960 | "license if you plan on submitting code to the project.", | |
5961 | "", | |
5962 | "Yasm has absolutely no warranty; not even for merchantibility or fitness", | |
5963 | "for a particular purpose.", | |
5964 | "", | |
5965 | "-------", | |
5966 | "Libyasm", | |
5967 | "-------", | |
5968 | "Libyasm is 2-clause or 3-clause BSD licensed, with the exception of", | |
5969 | "bitvect, which is triple-licensed under the Artistic license, GPL, and", | |
5970 | "LGPL. Libyasm is thus GPL and LGPL compatible. In addition, this also", | |
5971 | "means that libyasm is free for binary-only distribution as long as the", | |
5972 | "terms of the 3-clause BSD license and Artistic license (as it applies to", | |
5973 | "bitvect) are fulfilled.", | |
5974 | "", | |
5975 | "-------", | |
5976 | "Modules", | |
5977 | "-------", | |
5978 | "The modules are 2-clause or 3-clause BSD licensed, with the exception of:", | |
5979 | " preprocs/nasm - LGPL licensed", | |
5980 | "", | |
5981 | "---------", | |
5982 | "Frontends", | |
5983 | "---------", | |
5984 | "The frontends are 2-clause BSD licensed.", | |
5985 | "", | |
5986 | "-------------", | |
5987 | "License Texts", | |
5988 | "-------------", | |
5989 | "The full text of all licenses are provided in separate files in the source", | |
5990 | "distribution. Each source file may include the entire license (in the case", | |
5991 | "of the BSD and Artistic licenses), or may reference the GPL or LGPL license", | |
5992 | "file.", | |
5993 | "", | |
5994 | "BSD.txt - 2-clause and 3-clause BSD licenses", | |
5995 | "Artistic.txt - Artistic license", | |
5996 | "GNU_GPL-2.0 - GNU General Public License", | |
5997 | "GNU_LGPL-2.0 - GNU Library General Public License", | |
5998 | }; | |
5999 | # 42 "frontends/yasm/yasm.c" 2 | |
6000 | ||
6001 | ||
6002 | ||
6003 | ||
6004 | static char *obj_filename = ((void *)0), *in_filename = ((void *)0); | |
6005 | static char *list_filename = ((void *)0); | |
6006 | static char *machine_name = ((void *)0); | |
6007 | static int special_options = 0; | |
6008 | static yasm_arch *cur_arch = ((void *)0); | |
6009 | static const yasm_arch_module * | |
6010 | cur_arch_module = ((void *)0); | |
6011 | static const yasm_parser_module * | |
6012 | cur_parser_module = ((void *)0); | |
6013 | static yasm_preproc *cur_preproc = ((void *)0); | |
6014 | static const yasm_preproc_module * | |
6015 | cur_preproc_module = ((void *)0); | |
6016 | static char *objfmt_keyword = ((void *)0); | |
6017 | static yasm_objfmt *cur_objfmt = ((void *)0); | |
6018 | static const yasm_objfmt_module * | |
6019 | cur_objfmt_module = ((void *)0); | |
6020 | static yasm_dbgfmt *cur_dbgfmt = ((void *)0); | |
6021 | static const yasm_dbgfmt_module * | |
6022 | cur_dbgfmt_module = ((void *)0); | |
6023 | static yasm_listfmt *cur_listfmt = ((void *)0); | |
6024 | static const yasm_listfmt_module * | |
6025 | cur_listfmt_module = ((void *)0); | |
6026 | static int preproc_only = 0; | |
6027 | static unsigned int force_strict = 0; | |
6028 | static int generate_make_dependencies = 0; | |
6029 | static int warning_error = 0; | |
6030 | static enum { | |
6031 | EWSTYLE_GNU = 0, | |
6032 | EWSTYLE_VC | |
6033 | } ewmsg_style = EWSTYLE_GNU; | |
6034 | ||
6035 | static FILE *open_file(const char *filename, | |
6036 | const char *mode); | |
6037 | static void check_errors( yasm_errwarns *errwarns, | |
6038 | yasm_object *object); | |
6039 | static void cleanup( yasm_object *object); | |
6040 | ||
6041 | ||
6042 | static int opt_special_handler(char *cmd, char *param, int extra); | |
6043 | static int opt_arch_handler(char *cmd, char *param, int extra); | |
6044 | static int opt_parser_handler(char *cmd, char *param, int extra); | |
6045 | static int opt_preproc_handler(char *cmd, char *param, int extra); | |
6046 | static int opt_objfmt_handler(char *cmd, char *param, int extra); | |
6047 | static int opt_dbgfmt_handler(char *cmd, char *param, int extra); | |
6048 | static int opt_listfmt_handler(char *cmd, char *param, int extra); | |
6049 | static int opt_listfile_handler(char *cmd, char *param, int extra); | |
6050 | static int opt_objfile_handler(char *cmd, char *param, int extra); | |
6051 | static int opt_machine_handler(char *cmd, char *param, int extra); | |
6052 | static int opt_strict_handler(char *cmd, char *param, int extra); | |
6053 | static int opt_warning_handler(char *cmd, char *param, int extra); | |
6054 | static int preproc_only_handler(char *cmd, char *param, int extra); | |
6055 | static int opt_include_option(char *cmd, char *param, int extra); | |
6056 | static int opt_preproc_option(char *cmd, char *param, int extra); | |
6057 | static int opt_ewmsg_handler(char *cmd, char *param, int extra); | |
6058 | static int opt_makedep_handler(char *cmd, char *param, int extra); | |
6059 | ||
6060 | static char *replace_extension(const char *orig, | |
6061 | const char *ext, const char *def); | |
6062 | static void print_error(const char *fmt, ...); | |
6063 | ||
6064 | static void handle_yasm_int_error(const char *file, | |
6065 | unsigned int line, | |
6066 | const char *message); | |
6067 | static void handle_yasm_fatal(const char *message, va_list va); | |
6068 | static const char *handle_yasm_gettext(const char *msgid); | |
6069 | static void print_yasm_error(const char *filename, unsigned long line, | |
6070 | const char *msg, const char *xref_fn, | |
6071 | unsigned long xref_line, | |
6072 | const char *xref_msg); | |
6073 | static void print_yasm_warning(const char *filename, unsigned long line, | |
6074 | const char *msg); | |
6075 | ||
6076 | static void apply_preproc_builtins(void); | |
6077 | static void apply_preproc_saved_options(void); | |
6078 | static void print_list_keyword_desc(const char *name, const char *keyword); | |
6079 | # 129 "frontends/yasm/yasm.c" | |
6080 | static opt_option options[] = | |
6081 | { | |
6082 | { 0, "version", 0, opt_special_handler, 0x02, | |
6083 | ("show version text"), ((void *)0) }, | |
6084 | { 0, "license", 0, opt_special_handler, 0x04, | |
6085 | ("show license text"), ((void *)0) }, | |
6086 | { 'h', "help", 0, opt_special_handler, 0x01, | |
6087 | ("show help text"), ((void *)0) }, | |
6088 | { 'a', "arch", 1, opt_arch_handler, 0, | |
6089 | ("select architecture (list with -a help)"), ("arch") }, | |
6090 | { 'p', "parser", 1, opt_parser_handler, 0, | |
6091 | ("select parser (list with -p help)"), ("parser") }, | |
6092 | { 'r', "preproc", 1, opt_preproc_handler, 0, | |
6093 | ("select preprocessor (list with -r help)"), ("preproc") }, | |
6094 | { 'f', "oformat", 1, opt_objfmt_handler, 0, | |
6095 | ("select object format (list with -f help)"), ("format") }, | |
6096 | { 'g', "dformat", 1, opt_dbgfmt_handler, 0, | |
6097 | ("select debugging format (list with -g help)"), ("debug") }, | |
6098 | { 'L', "lformat", 1, opt_listfmt_handler, 0, | |
6099 | ("select list format (list with -L help)"), ("list") }, | |
6100 | { 'l', "list", 1, opt_listfile_handler, 0, | |
6101 | ("name of list-file output"), ("listfile") }, | |
6102 | { 'o', "objfile", 1, opt_objfile_handler, 0, | |
6103 | ("name of object-file output"), ("filename") }, | |
6104 | { 'm', "machine", 1, opt_machine_handler, 0, | |
6105 | ("select machine (list with -m help)"), ("machine") }, | |
6106 | { 0, "force-strict", 0, opt_strict_handler, 0, | |
6107 | ("treat all sized operands as if `strict' was used"), ((void *)0) }, | |
6108 | { 'w', ((void *)0), 0, opt_warning_handler, 1, | |
6109 | ("inhibits warning messages"), ((void *)0) }, | |
6110 | { 'W', ((void *)0), 0, opt_warning_handler, 0, | |
6111 | ("enables/disables warning"), ((void *)0) }, | |
6112 | { 'M', ((void *)0), 0, opt_makedep_handler, 0, | |
6113 | ("generate Makefile dependencies on stdout"), ((void *)0) }, | |
6114 | { 'e', "preproc-only", 0, preproc_only_handler, 0, | |
6115 | ("preprocess only (writes output to stdout by default)"), ((void *)0) }, | |
6116 | { 'i', ((void *)0), 1, opt_include_option, 0, | |
6117 | ("add include path"), ("path") }, | |
6118 | { 'I', ((void *)0), 1, opt_include_option, 0, | |
6119 | ("add include path"), ("path") }, | |
6120 | { 'P', ((void *)0), 1, opt_preproc_option, 0, | |
6121 | ("pre-include file"), ("filename") }, | |
6122 | { 'D', ((void *)0), 1, opt_preproc_option, 1, | |
6123 | ("pre-define a macro, optionally to value"), ("macro[=value]") }, | |
6124 | { 'U', ((void *)0), 1, opt_preproc_option, 2, | |
6125 | ("undefine a macro"), ("macro") }, | |
6126 | { 'X', ((void *)0), 1, opt_ewmsg_handler, 0, | |
6127 | ("select error/warning message style (`gnu' or `vc')"), ("style") }, | |
6128 | }; | |
6129 | ||
6130 | ||
6131 | static const char *version_msg[] = { | |
6132 | "yasm" " " "0.6.0" "." "1798", | |
6133 | "Compiled on " "Jun 22 2007" ".", | |
6134 | "Copyright (c) 2001-2007 Peter Johnson and other Yasm developers.", | |
6135 | "Run yasm --license for licensing overview and summary." | |
6136 | }; | |
6137 | ||
6138 | ||
6139 | static const char *help_head = ("usage: yasm [option]* file\n" "Options:\n"); | |
6140 | ||
6141 | ||
6142 | static const char *help_tail = ("\n" "Files are asm sources to be assembled.\n" "\n" "Sample invocation:\n" " yasm -f elf -o object.o source.asm\n" "\n" "Report bugs to bug-yasm@tortall.net\n"); | |
6143 | # 201 "frontends/yasm/yasm.c" | |
6144 | typedef struct constcharparam_head { struct constcharparam *stqh_first; struct constcharparam **stqh_last; } constcharparam_head; | |
6145 | ||
6146 | typedef struct constcharparam { | |
6147 | struct { struct constcharparam *stqe_next; } link; | |
6148 | const char *param; | |
6149 | int id; | |
6150 | } constcharparam; | |
6151 | ||
6152 | static constcharparam_head preproc_options; | |
6153 | ||
6154 | static int | |
6155 | do_preproc_only(FILE *in) | |
6156 | { | |
6157 | yasm_linemap *linemap; | |
6158 | char *preproc_buf = yasm_xmalloc(16384); | |
6159 | size_t got; | |
6160 | const char *base_filename; | |
6161 | FILE *out = ((void *)0); | |
6162 | yasm_errwarns *errwarns = yasm_errwarns_create(); | |
6163 | ||
6164 | ||
6165 | linemap = yasm_linemap_create(); | |
6166 | yasm_linemap_set(linemap, in_filename, 1, 1); | |
6167 | ||
6168 | ||
6169 | ||
6170 | if (!obj_filename || generate_make_dependencies) { | |
6171 | out = stdout; | |
6172 | ||
6173 | ||
6174 | ||
6175 | if (generate_make_dependencies && !obj_filename) { | |
6176 | if (in == stdin) | |
6177 | ||
6178 | obj_filename = yasm__xstrdup("yasm.out"); | |
6179 | else { | |
6180 | ||
6181 | yasm__splitpath_unix(in_filename, &base_filename); | |
6182 | if (base_filename[0] == '\0') | |
6183 | obj_filename = yasm__xstrdup("yasm.out"); | |
6184 | else | |
6185 | obj_filename = replace_extension(base_filename, | |
6186 | cur_objfmt_module->extension, "yasm.out"); | |
6187 | } | |
6188 | } | |
6189 | } else { | |
6190 | ||
6191 | out = open_file(obj_filename, "wt"); | |
6192 | if (!out) { | |
6193 | yasm_xfree(preproc_buf); | |
6194 | return 1; | |
6195 | } | |
6196 | } | |
6197 | ||
6198 | ||
6199 | cur_preproc = cur_preproc_module->create(in, in_filename, linemap, errwarns); | |
6200 | ||
6201 | ||
6202 | apply_preproc_builtins(); | |
6203 | apply_preproc_saved_options(); | |
6204 | ||
6205 | if (generate_make_dependencies) { | |
6206 | size_t totlen; | |
6207 | ||
6208 | fprintf(stdout, "%s: %s", obj_filename, in_filename); | |
6209 | totlen = strlen(obj_filename)+2+strlen(in_filename); | |
6210 | ||
6211 | while ((got = ((yasm_preproc_base *)cur_preproc)->module->get_included_file(cur_preproc, preproc_buf, 16384)) != 0) { | |
6212 | ||
6213 | totlen += got; | |
6214 | if (totlen > 72) { | |
6215 | fputs(" \\\n ", stdout); | |
6216 | totlen = 2; | |
6217 | } | |
6218 | fputc(' ', stdout); | |
6219 | fwrite(preproc_buf, got, 1, stdout); | |
6220 | } | |
6221 | fputc('\n', stdout); | |
6222 | } else { | |
6223 | while ((got = ((yasm_preproc_base *)cur_preproc)->module->input(cur_preproc, preproc_buf, 16384)) != 0) | |
6224 | ||
6225 | fwrite(preproc_buf, got, 1, out); | |
6226 | } | |
6227 | ||
6228 | if (in != stdin) | |
6229 | fclose(in); | |
6230 | ||
6231 | if (out != stdout) | |
6232 | fclose(out); | |
6233 | ||
6234 | if (yasm_errwarns_num_errors(errwarns, warning_error) > 0) { | |
6235 | yasm_errwarns_output_all(errwarns, linemap, warning_error, | |
6236 | print_yasm_error, print_yasm_warning); | |
6237 | if (out != stdout) | |
6238 | remove(obj_filename); | |
6239 | yasm_xfree(preproc_buf); | |
6240 | yasm_linemap_destroy(linemap); | |
6241 | yasm_errwarns_destroy(errwarns); | |
6242 | cleanup(((void *)0)); | |
6243 | return 1; | |
6244 | } | |
6245 | ||
6246 | yasm_errwarns_output_all(errwarns, linemap, warning_error, | |
6247 | print_yasm_error, print_yasm_warning); | |
6248 | yasm_xfree(preproc_buf); | |
6249 | yasm_linemap_destroy(linemap); | |
6250 | yasm_errwarns_destroy(errwarns); | |
6251 | cleanup(((void *)0)); | |
6252 | return 0; | |
6253 | } | |
6254 | ||
6255 | static int | |
6256 | do_assemble(FILE *in) | |
6257 | { | |
6258 | yasm_object *object; | |
6259 | yasm_section *def_sect; | |
6260 | const char *base_filename; | |
6261 | FILE *obj = ((void *)0); | |
6262 | yasm_arch_create_error arch_error; | |
6263 | yasm_errwarns *errwarns = yasm_errwarns_create(); | |
6264 | int i, matched; | |
6265 | ||
6266 | ||
6267 | if (!obj_filename) { | |
6268 | if (in == stdin) | |
6269 | ||
6270 | obj_filename = yasm__xstrdup("yasm.out"); | |
6271 | else { | |
6272 | ||
6273 | yasm__splitpath_unix(in_filename, &base_filename); | |
6274 | if (base_filename[0] == '\0') | |
6275 | obj_filename = yasm__xstrdup("yasm.out"); | |
6276 | else | |
6277 | obj_filename = replace_extension(base_filename, | |
6278 | cur_objfmt_module->extension, | |
6279 | "yasm.out"); | |
6280 | } | |
6281 | } | |
6282 | ||
6283 | ||
6284 | if (!machine_name) { | |
6285 | ||
6286 | ||
6287 | ||
6288 | ||
6289 | if (__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (cur_arch_module->keyword) && __builtin_constant_p ("x86") && (__s1_len = strlen (cur_arch_module->keyword), __s2_len = strlen ("x86"), (!((size_t)(const void *)((cur_arch_module->keyword) + 1) - (size_t)(const void *)(cur_arch_module->keyword) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("x86") + 1) - (size_t)(const void *)("x86") == 1) || __s2_len >= 4)) ? __builtin_strcmp (cur_arch_module->keyword, "x86") : (__builtin_constant_p (cur_arch_module->keyword) && ((size_t)(const void *)((cur_arch_module->keyword) + 1) - (size_t)(const void *)(cur_arch_module->keyword) == 1) && (__s1_len = strlen (cur_arch_module->keyword), __s1_len < 4) ? (__builtin_constant_p ("x86") && ((size_t)(const void *)(("x86") + 1) - (size_t)(const void *)("x86") == 1) ? __builtin_strcmp (cur_arch_module->keyword, "x86") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("x86"); register int __result = (((__const unsigned char *) (__const char *) (cur_arch_module->keyword))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (cur_arch_module->keyword))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (cur_arch_module->keyword))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (cur_arch_module->keyword))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("x86") && ((size_t)(const void *)(("x86") + 1) - (size_t)(const void *)("x86") == 1) && (__s2_len = strlen ("x86"), __s2_len < 4) ? (__builtin_constant_p (cur_arch_module->keyword) && ((size_t)(const void *)((cur_arch_module->keyword) + 1) - (size_t)(const void *)(cur_arch_module->keyword) == 1) ? __builtin_strcmp (cur_arch_module->keyword, "x86") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (cur_arch_module->keyword); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("x86"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("x86"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("x86"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("x86"))[3]); } } __result; }))) : __builtin_strcmp (cur_arch_module->keyword, "x86")))); }) == 0 && | |
6290 | cur_objfmt_module->default_x86_mode_bits == 64) | |
6291 | machine_name = yasm__xstrdup("amd64"); | |
6292 | else | |
6293 | machine_name = | |
6294 | yasm__xstrdup(cur_arch_module->default_machine_keyword); | |
6295 | } | |
6296 | ||
6297 | cur_arch = cur_arch_module->create(machine_name, | |
6298 | cur_parser_module->keyword, | |
6299 | &arch_error); | |
6300 | if (!cur_arch) { | |
6301 | switch (arch_error) { | |
6302 | case YASM_ARCH_CREATE_BAD_MACHINE: | |
6303 | print_error(dcgettext (((void *)0), "%s: `%s' is not a valid %s for %s `%s'", __LC_MESSAGES), | |
6304 | dcgettext (((void *)0), "FATAL", __LC_MESSAGES), machine_name, dcgettext (((void *)0), "machine", __LC_MESSAGES), | |
6305 | dcgettext (((void *)0), "architecture", __LC_MESSAGES), cur_arch_module->keyword); | |
6306 | break; | |
6307 | case YASM_ARCH_CREATE_BAD_PARSER: | |
6308 | print_error(dcgettext (((void *)0), "%s: `%s' is not a valid %s for %s `%s'", __LC_MESSAGES), | |
6309 | dcgettext (((void *)0), "FATAL", __LC_MESSAGES), cur_parser_module->keyword, | |
6310 | dcgettext (((void *)0), "parser", __LC_MESSAGES), dcgettext (((void *)0), "architecture", __LC_MESSAGES), | |
6311 | cur_arch_module->keyword); | |
6312 | break; | |
6313 | default: | |
6314 | print_error(dcgettext (((void *)0), "%s: unknown architecture error", __LC_MESSAGES), dcgettext (((void *)0), "FATAL", __LC_MESSAGES)); | |
6315 | } | |
6316 | ||
6317 | return 1; | |
6318 | } | |
6319 | ||
6320 | ||
6321 | object = yasm_object_create(in_filename, obj_filename); | |
6322 | yasm_linemap_set(yasm_object_get_linemap(object), in_filename, 1, 1); | |
6323 | ||
6324 | ||
6325 | cur_objfmt = cur_objfmt_module->create(object, cur_arch); | |
6326 | if (!cur_objfmt) { | |
6327 | print_error( | |
6328 | dcgettext (((void *)0), "%s: object format `%s' does not support architecture `%s' machine `%s'", __LC_MESSAGES), | |
6329 | dcgettext (((void *)0), "FATAL", __LC_MESSAGES), cur_objfmt_module->keyword, cur_arch_module->keyword, | |
6330 | machine_name); | |
6331 | if (in != stdin) | |
6332 | fclose(in); | |
6333 | cleanup(object); | |
6334 | return 1; | |
6335 | } | |
6336 | ||
6337 | ||
6338 | cur_objfmt_module = ((yasm_objfmt_base *)cur_objfmt)->module; | |
6339 | ||
6340 | ||
6341 | def_sect = ((yasm_objfmt_base *)cur_objfmt)->module->add_default_section(cur_objfmt); | |
6342 | ||
6343 | ||
6344 | ||
6345 | ||
6346 | matched = 0; | |
6347 | for (i=0; cur_objfmt_module->dbgfmt_keywords[i]; i++) | |
6348 | if (strcasecmp(cur_objfmt_module->dbgfmt_keywords[i], cur_dbgfmt_module->keyword) == 0) | |
6349 | ||
6350 | matched = 1; | |
6351 | if (!matched) { | |
6352 | print_error(dcgettext (((void *)0), "%s: `%s' is not a valid %s for %s `%s'", __LC_MESSAGES), | |
6353 | dcgettext (((void *)0), "FATAL", __LC_MESSAGES), cur_dbgfmt_module->keyword, dcgettext (((void *)0), "debug format", __LC_MESSAGES), | |
6354 | dcgettext (((void *)0), "object format", __LC_MESSAGES), cur_objfmt_module->keyword); | |
6355 | if (in != stdin) | |
6356 | fclose(in); | |
6357 | cleanup(object); | |
6358 | return 1; | |
6359 | } | |
6360 | ||
6361 | ||
6362 | cur_dbgfmt = cur_dbgfmt_module->create(object, cur_objfmt, cur_arch); | |
6363 | ||
6364 | if (!cur_dbgfmt) { | |
6365 | print_error( | |
6366 | dcgettext (((void *)0), "%s: debug format `%s' does not work with object format `%s'", __LC_MESSAGES), | |
6367 | dcgettext (((void *)0), "FATAL", __LC_MESSAGES), cur_dbgfmt_module->keyword, | |
6368 | cur_objfmt_module->keyword); | |
6369 | if (in != stdin) | |
6370 | fclose(in); | |
6371 | return 1; | |
6372 | } | |
6373 | ||
6374 | ||
6375 | ||
6376 | ||
6377 | matched = 0; | |
6378 | for (i=0; cur_parser_module->preproc_keywords[i]; i++) | |
6379 | if (strcasecmp(cur_parser_module->preproc_keywords[i], cur_preproc_module->keyword) == 0) | |
6380 | ||
6381 | matched = 1; | |
6382 | if (!matched) { | |
6383 | print_error(dcgettext (((void *)0), "%s: `%s' is not a valid %s for %s `%s'", __LC_MESSAGES), dcgettext (((void *)0), "FATAL", __LC_MESSAGES), | |
6384 | cur_preproc_module->keyword, dcgettext (((void *)0), "preprocessor", __LC_MESSAGES), | |
6385 | dcgettext (((void *)0), "parser", __LC_MESSAGES), cur_parser_module->keyword); | |
6386 | if (in != stdin) | |
6387 | fclose(in); | |
6388 | cleanup(object); | |
6389 | return 1; | |
6390 | } | |
6391 | ||
6392 | cur_preproc = cur_preproc_module->create(in, in_filename, | |
6393 | yasm_object_get_linemap(object), | |
6394 | errwarns); | |
6395 | ||
6396 | apply_preproc_builtins(); | |
6397 | apply_preproc_saved_options(); | |
6398 | ||
6399 | ||
6400 | if (__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (cur_arch_module->keyword) && __builtin_constant_p ("x86") && (__s1_len = strlen (cur_arch_module->keyword), __s2_len = strlen ("x86"), (!((size_t)(const void *)((cur_arch_module->keyword) + 1) - (size_t)(const void *)(cur_arch_module->keyword) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("x86") + 1) - (size_t)(const void *)("x86") == 1) || __s2_len >= 4)) ? __builtin_strcmp (cur_arch_module->keyword, "x86") : (__builtin_constant_p (cur_arch_module->keyword) && ((size_t)(const void *)((cur_arch_module->keyword) + 1) - (size_t)(const void *)(cur_arch_module->keyword) == 1) && (__s1_len = strlen (cur_arch_module->keyword), __s1_len < 4) ? (__builtin_constant_p ("x86") && ((size_t)(const void *)(("x86") + 1) - (size_t)(const void *)("x86") == 1) ? __builtin_strcmp (cur_arch_module->keyword, "x86") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("x86"); register int __result = (((__const unsigned char *) (__const char *) (cur_arch_module->keyword))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (cur_arch_module->keyword))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (cur_arch_module->keyword))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (cur_arch_module->keyword))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("x86") && ((size_t)(const void *)(("x86") + 1) - (size_t)(const void *)("x86") == 1) && (__s2_len = strlen ("x86"), __s2_len < 4) ? (__builtin_constant_p (cur_arch_module->keyword) && ((size_t)(const void *)((cur_arch_module->keyword) + 1) - (size_t)(const void *)(cur_arch_module->keyword) == 1) ? __builtin_strcmp (cur_arch_module->keyword, "x86") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (cur_arch_module->keyword); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("x86"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("x86"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("x86"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("x86"))[3]); } } __result; }))) : __builtin_strcmp (cur_arch_module->keyword, "x86")))); }) == 0) { | |
6401 | ((yasm_arch_base *)cur_arch)->module->set_var(cur_arch, "mode_bits", cur_objfmt_module->default_x86_mode_bits); | |
6402 | ||
6403 | } | |
6404 | ||
6405 | ((yasm_arch_base *)cur_arch)->module->set_var(cur_arch, "force_strict", force_strict); | |
6406 | ||
6407 | ||
6408 | cur_parser_module->do_parse(object, cur_preproc, cur_arch, cur_objfmt, | |
6409 | cur_dbgfmt, in, in_filename, | |
6410 | list_filename != ((void *)0), def_sect, errwarns); | |
6411 | ||
6412 | ||
6413 | if (in != stdin) | |
6414 | fclose(in); | |
6415 | ||
6416 | check_errors(errwarns, object); | |
6417 | ||
6418 | ||
6419 | yasm_symtab_parser_finalize(yasm_object_get_symtab(object), | |
6420 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (cur_parser_module->keyword) && __builtin_constant_p ("gas") && (__s1_len = strlen (cur_parser_module->keyword), __s2_len = strlen ("gas"), (!((size_t)(const void *)((cur_parser_module->keyword) + 1) - (size_t)(const void *)(cur_parser_module->keyword) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("gas") + 1) - (size_t)(const void *)("gas") == 1) || __s2_len >= 4)) ? __builtin_strcmp (cur_parser_module->keyword, "gas") : (__builtin_constant_p (cur_parser_module->keyword) && ((size_t)(const void *)((cur_parser_module->keyword) + 1) - (size_t)(const void *)(cur_parser_module->keyword) == 1) && (__s1_len = strlen (cur_parser_module->keyword), __s1_len < 4) ? (__builtin_constant_p ("gas") && ((size_t)(const void *)(("gas") + 1) - (size_t)(const void *)("gas") == 1) ? __builtin_strcmp (cur_parser_module->keyword, "gas") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("gas"); register int __result = (((__const unsigned char *) (__const char *) (cur_parser_module->keyword))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (cur_parser_module->keyword))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (cur_parser_module->keyword))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (cur_parser_module->keyword))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("gas") && ((size_t)(const void *)(("gas") + 1) - (size_t)(const void *)("gas") == 1) && (__s2_len = strlen ("gas"), __s2_len < 4) ? (__builtin_constant_p (cur_parser_module->keyword) && ((size_t)(const void *)((cur_parser_module->keyword) + 1) - (size_t)(const void *)(cur_parser_module->keyword) == 1) ? __builtin_strcmp (cur_parser_module->keyword, "gas") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (cur_parser_module->keyword); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("gas"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("gas"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("gas"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("gas"))[3]); } } __result; }))) : __builtin_strcmp (cur_parser_module->keyword, "gas")))); })==0 || | |
6421 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (cur_parser_module->keyword) && __builtin_constant_p ("gnu") && (__s1_len = strlen (cur_parser_module->keyword), __s2_len = strlen ("gnu"), (!((size_t)(const void *)((cur_parser_module->keyword) + 1) - (size_t)(const void *)(cur_parser_module->keyword) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("gnu") + 1) - (size_t)(const void *)("gnu") == 1) || __s2_len >= 4)) ? __builtin_strcmp (cur_parser_module->keyword, "gnu") : (__builtin_constant_p (cur_parser_module->keyword) && ((size_t)(const void *)((cur_parser_module->keyword) + 1) - (size_t)(const void *)(cur_parser_module->keyword) == 1) && (__s1_len = strlen (cur_parser_module->keyword), __s1_len < 4) ? (__builtin_constant_p ("gnu") && ((size_t)(const void *)(("gnu") + 1) - (size_t)(const void *)("gnu") == 1) ? __builtin_strcmp (cur_parser_module->keyword, "gnu") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("gnu"); register int __result = (((__const unsigned char *) (__const char *) (cur_parser_module->keyword))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (cur_parser_module->keyword))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (cur_parser_module->keyword))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (cur_parser_module->keyword))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("gnu") && ((size_t)(const void *)(("gnu") + 1) - (size_t)(const void *)("gnu") == 1) && (__s2_len = strlen ("gnu"), __s2_len < 4) ? (__builtin_constant_p (cur_parser_module->keyword) && ((size_t)(const void *)((cur_parser_module->keyword) + 1) - (size_t)(const void *)(cur_parser_module->keyword) == 1) ? __builtin_strcmp (cur_parser_module->keyword, "gnu") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (cur_parser_module->keyword); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("gnu"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("gnu"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("gnu"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("gnu"))[3]); } } __result; }))) : __builtin_strcmp (cur_parser_module->keyword, "gnu")))); })==0, | |
6422 | cur_objfmt, errwarns); | |
6423 | check_errors(errwarns, object); | |
6424 | ||
6425 | ||
6426 | yasm_object_finalize(object, errwarns); | |
6427 | check_errors(errwarns, object); | |
6428 | ||
6429 | ||
6430 | yasm_object_optimize(object, cur_arch, errwarns); | |
6431 | check_errors(errwarns, object); | |
6432 | ||
6433 | ||
6434 | ((yasm_dbgfmt_base *)cur_dbgfmt)->module->generate(cur_dbgfmt, errwarns); | |
6435 | check_errors(errwarns, object); | |
6436 | ||
6437 | ||
6438 | if (!obj && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (cur_objfmt_module->keyword) && __builtin_constant_p ("dbg") && (__s1_len = strlen (cur_objfmt_module->keyword), __s2_len = strlen ("dbg"), (!((size_t)(const void *)((cur_objfmt_module->keyword) + 1) - (size_t)(const void *)(cur_objfmt_module->keyword) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("dbg") + 1) - (size_t)(const void *)("dbg") == 1) || __s2_len >= 4)) ? __builtin_strcmp (cur_objfmt_module->keyword, "dbg") : (__builtin_constant_p (cur_objfmt_module->keyword) && ((size_t)(const void *)((cur_objfmt_module->keyword) + 1) - (size_t)(const void *)(cur_objfmt_module->keyword) == 1) && (__s1_len = strlen (cur_objfmt_module->keyword), __s1_len < 4) ? (__builtin_constant_p ("dbg") && ((size_t)(const void *)(("dbg") + 1) - (size_t)(const void *)("dbg") == 1) ? __builtin_strcmp (cur_objfmt_module->keyword, "dbg") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("dbg"); register int __result = (((__const unsigned char *) (__const char *) (cur_objfmt_module->keyword))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (cur_objfmt_module->keyword))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (cur_objfmt_module->keyword))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (cur_objfmt_module->keyword))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("dbg") && ((size_t)(const void *)(("dbg") + 1) - (size_t)(const void *)("dbg") == 1) && (__s2_len = strlen ("dbg"), __s2_len < 4) ? (__builtin_constant_p (cur_objfmt_module->keyword) && ((size_t)(const void *)((cur_objfmt_module->keyword) + 1) - (size_t)(const void *)(cur_objfmt_module->keyword) == 1) ? __builtin_strcmp (cur_objfmt_module->keyword, "dbg") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (cur_objfmt_module->keyword); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("dbg"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("dbg"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("dbg"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("dbg"))[3]); } } __result; }))) : __builtin_strcmp (cur_objfmt_module->keyword, "dbg")))); }) != 0) { | |
6439 | obj = open_file(obj_filename, "wb"); | |
6440 | if (!obj) { | |
6441 | cleanup(object); | |
6442 | return 1; | |
6443 | } | |
6444 | } | |
6445 | ||
6446 | ||
6447 | ((yasm_objfmt_base *)cur_objfmt)->module->output(cur_objfmt, obj?obj:stderr, __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (cur_dbgfmt_module->keyword) && __builtin_constant_p ("null") && (__s1_len = strlen (cur_dbgfmt_module->keyword), __s2_len = strlen ("null"), (!((size_t)(const void *)((cur_dbgfmt_module->keyword) + 1) - (size_t)(const void *)(cur_dbgfmt_module->keyword) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("null") + 1) - (size_t)(const void *)("null") == 1) || __s2_len >= 4)) ? __builtin_strcmp (cur_dbgfmt_module->keyword, "null") : (__builtin_constant_p (cur_dbgfmt_module->keyword) && ((size_t)(const void *)((cur_dbgfmt_module->keyword) + 1) - (size_t)(const void *)(cur_dbgfmt_module->keyword) == 1) && (__s1_len = strlen (cur_dbgfmt_module->keyword), __s1_len < 4) ? (__builtin_constant_p ("null") && ((size_t)(const void *)(("null") + 1) - (size_t)(const void *)("null") == 1) ? __builtin_strcmp (cur_dbgfmt_module->keyword, "null") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("null"); register int __result = (((__const unsigned char *) (__const char *) (cur_dbgfmt_module->keyword))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (cur_dbgfmt_module->keyword))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (cur_dbgfmt_module->keyword))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (cur_dbgfmt_module->keyword))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("null") && ((size_t)(const void *)(("null") + 1) - (size_t)(const void *)("null") == 1) && (__s2_len = strlen ("null"), __s2_len < 4) ? (__builtin_constant_p (cur_dbgfmt_module->keyword) && ((size_t)(const void *)((cur_dbgfmt_module->keyword) + 1) - (size_t)(const void *)(cur_dbgfmt_module->keyword) == 1) ? __builtin_strcmp (cur_dbgfmt_module->keyword, "null") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (cur_dbgfmt_module->keyword); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("null"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("null"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("null"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("null"))[3]); } } __result; }))) : __builtin_strcmp (cur_dbgfmt_module->keyword, "null")))); }), cur_dbgfmt, errwarns); | |
6448 | ||
6449 | ||
6450 | ||
6451 | ||
6452 | if (obj) | |
6453 | fclose(obj); | |
6454 | ||
6455 | ||
6456 | ||
6457 | ||
6458 | if (yasm_errwarns_num_errors(errwarns, warning_error) > 0) | |
6459 | remove(obj_filename); | |
6460 | check_errors(errwarns, object); | |
6461 | ||
6462 | ||
6463 | if (list_filename) { | |
6464 | FILE *list = open_file(list_filename, "wt"); | |
6465 | if (!list) { | |
6466 | cleanup(object); | |
6467 | return 1; | |
6468 | } | |
6469 | ||
6470 | cur_listfmt = cur_listfmt_module->create(in_filename, obj_filename); | |
6471 | ||
6472 | ((yasm_listfmt_base *)cur_listfmt)->module->output(cur_listfmt, list, yasm_object_get_linemap(object), cur_arch); | |
6473 | ||
6474 | fclose(list); | |
6475 | } | |
6476 | ||
6477 | yasm_errwarns_output_all(errwarns, yasm_object_get_linemap(object), | |
6478 | warning_error, print_yasm_error, | |
6479 | print_yasm_warning); | |
6480 | ||
6481 | yasm_errwarns_destroy(errwarns); | |
6482 | cleanup(object); | |
6483 | return 0; | |
6484 | } | |
6485 | ||
6486 | ||
6487 | ||
6488 | int | |
6489 | main(int argc, char *argv[]) | |
6490 | { | |
6491 | FILE *in = ((void *)0); | |
6492 | size_t i; | |
6493 | ||
6494 | ||
6495 | ||
6496 | ||
6497 | ||
6498 | ||
6499 | ||
6500 | textdomain("yasm"); | |
6501 | ||
6502 | ||
6503 | yasm_internal_error_ = handle_yasm_int_error; | |
6504 | yasm_fatal = handle_yasm_fatal; | |
6505 | yasm_gettext_hook = handle_yasm_gettext; | |
6506 | yasm_errwarn_initialize(); | |
6507 | ||
6508 | ||
6509 | do { (((&preproc_options))->stqh_first) = ((void *)0); (&preproc_options)->stqh_last = &(((&preproc_options))->stqh_first); } while (0); | |
6510 | ||
6511 | if (parse_cmdline(argc, argv, options, (sizeof(options) / sizeof(options[0])), print_error)) | |
6512 | return 1; | |
6513 | ||
6514 | switch (special_options) { | |
6515 | case 0x01: | |
6516 | ||
6517 | help_msg(help_head, help_tail, options, (sizeof(options) / sizeof(options[0]))); | |
6518 | return 0; | |
6519 | case 0x02: | |
6520 | for (i=0; i<(sizeof(version_msg) / sizeof(version_msg[0])); i++) | |
6521 | printf("%s\n", version_msg[i]); | |
6522 | return 0; | |
6523 | case 0x04: | |
6524 | for (i=0; i<(sizeof(license_msg) / sizeof(license_msg[0])); i++) | |
6525 | printf("%s\n", license_msg[i]); | |
6526 | return 0; | |
6527 | case 0x08: | |
6528 | ||
6529 | return 0; | |
6530 | } | |
6531 | ||
6532 | ||
6533 | if (BitVector_Boot() != ErrCode_Ok) { | |
6534 | print_error(dcgettext (((void *)0), "%s: could not initialize BitVector", __LC_MESSAGES), dcgettext (((void *)0), "FATAL", __LC_MESSAGES)); | |
6535 | return 1; | |
6536 | } | |
6537 | ||
6538 | ||
6539 | yasm_intnum_initialize(); | |
6540 | yasm_floatnum_initialize(); | |
6541 | ||
6542 | ||
6543 | if (!cur_objfmt_module) { | |
6544 | if (!objfmt_keyword) | |
6545 | objfmt_keyword = yasm__xstrdup("bin"); | |
6546 | cur_objfmt_module = yasm_load_module(YASM_MODULE_OBJFMT, objfmt_keyword); | |
6547 | if (!cur_objfmt_module) { | |
6548 | print_error(dcgettext (((void *)0), "%s: could not load default %s", __LC_MESSAGES), dcgettext (((void *)0), "FATAL", __LC_MESSAGES), | |
6549 | dcgettext (((void *)0), "object format", __LC_MESSAGES)); | |
6550 | return 1; | |
6551 | } | |
6552 | } | |
6553 | ||
6554 | ||
6555 | if (!cur_arch_module) { | |
6556 | cur_arch_module = yasm_load_module(YASM_MODULE_ARCH, "x86"); | |
6557 | if (!cur_arch_module) { | |
6558 | print_error(dcgettext (((void *)0), "%s: could not load default %s", __LC_MESSAGES), dcgettext (((void *)0), "FATAL", __LC_MESSAGES), | |
6559 | dcgettext (((void *)0), "architecture", __LC_MESSAGES)); | |
6560 | return 1; | |
6561 | } | |
6562 | } | |
6563 | ||
6564 | ||
6565 | if (machine_name && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (machine_name) && __builtin_constant_p ("help") && (__s1_len = strlen (machine_name), __s2_len = strlen ("help"), (!((size_t)(const void *)((machine_name) + 1) - (size_t)(const void *)(machine_name) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("help") + 1) - (size_t)(const void *)("help") == 1) || __s2_len >= 4)) ? __builtin_strcmp (machine_name, "help") : (__builtin_constant_p (machine_name) && ((size_t)(const void *)((machine_name) + 1) - (size_t)(const void *)(machine_name) == 1) && (__s1_len = strlen (machine_name), __s1_len < 4) ? (__builtin_constant_p ("help") && ((size_t)(const void *)(("help") + 1) - (size_t)(const void *)("help") == 1) ? __builtin_strcmp (machine_name, "help") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("help"); register int __result = (((__const unsigned char *) (__const char *) (machine_name))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (machine_name))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (machine_name))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (machine_name))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("help") && ((size_t)(const void *)(("help") + 1) - (size_t)(const void *)("help") == 1) && (__s2_len = strlen ("help"), __s2_len < 4) ? (__builtin_constant_p (machine_name) && ((size_t)(const void *)((machine_name) + 1) - (size_t)(const void *)(machine_name) == 1) ? __builtin_strcmp (machine_name, "help") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (machine_name); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("help"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("help"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("help"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("help"))[3]); } } __result; }))) : __builtin_strcmp (machine_name, "help")))); }) == 0) { | |
6566 | yasm_arch_machine *m = cur_arch_module->machines; | |
6567 | printf(dcgettext (((void *)0), "Available %s for %s `%s':\n", __LC_MESSAGES), dcgettext (((void *)0), "machines", __LC_MESSAGES), | |
6568 | dcgettext (((void *)0), "architecture", __LC_MESSAGES), cur_arch_module->keyword); | |
6569 | while (m->keyword && m->name) { | |
6570 | print_list_keyword_desc(m->name, m->keyword); | |
6571 | m++; | |
6572 | } | |
6573 | return 0; | |
6574 | } | |
6575 | ||
6576 | ||
6577 | if (!cur_parser_module) { | |
6578 | cur_parser_module = yasm_load_module(YASM_MODULE_PARSER, "nasm"); | |
6579 | if (!cur_parser_module) { | |
6580 | print_error(dcgettext (((void *)0), "%s: could not load default %s", __LC_MESSAGES), dcgettext (((void *)0), "FATAL", __LC_MESSAGES), | |
6581 | dcgettext (((void *)0), "parser", __LC_MESSAGES)); | |
6582 | cleanup(((void *)0)); | |
6583 | return 1; | |
6584 | } | |
6585 | } | |
6586 | ||
6587 | ||
6588 | if (!cur_preproc_module) { | |
6589 | cur_preproc_module = | |
6590 | yasm_load_module(YASM_MODULE_PREPROC, cur_parser_module->default_preproc_keyword); | |
6591 | if (!cur_preproc_module) { | |
6592 | print_error(dcgettext (((void *)0), "%s: could not load default %s", __LC_MESSAGES), dcgettext (((void *)0), "FATAL", __LC_MESSAGES), | |
6593 | dcgettext (((void *)0), "preprocessor", __LC_MESSAGES)); | |
6594 | cleanup(((void *)0)); | |
6595 | return 1; | |
6596 | } | |
6597 | } | |
6598 | ||
6599 | ||
6600 | if (!in_filename) { | |
6601 | print_error(dcgettext (((void *)0), "No input files specified", __LC_MESSAGES)); | |
6602 | return 1; | |
6603 | } else if (__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (in_filename) && __builtin_constant_p ("-") && (__s1_len = strlen (in_filename), __s2_len = strlen ("-"), (!((size_t)(const void *)((in_filename) + 1) - (size_t)(const void *)(in_filename) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("-") + 1) - (size_t)(const void *)("-") == 1) || __s2_len >= 4)) ? __builtin_strcmp (in_filename, "-") : (__builtin_constant_p (in_filename) && ((size_t)(const void *)((in_filename) + 1) - (size_t)(const void *)(in_filename) == 1) && (__s1_len = strlen (in_filename), __s1_len < 4) ? (__builtin_constant_p ("-") && ((size_t)(const void *)(("-") + 1) - (size_t)(const void *)("-") == 1) ? __builtin_strcmp (in_filename, "-") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("-"); register int __result = (((__const unsigned char *) (__const char *) (in_filename))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (in_filename))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (in_filename))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (in_filename))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("-") && ((size_t)(const void *)(("-") + 1) - (size_t)(const void *)("-") == 1) && (__s2_len = strlen ("-"), __s2_len < 4) ? (__builtin_constant_p (in_filename) && ((size_t)(const void *)((in_filename) + 1) - (size_t)(const void *)(in_filename) == 1) ? __builtin_strcmp (in_filename, "-") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (in_filename); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("-"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("-"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("-"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("-"))[3]); } } __result; }))) : __builtin_strcmp (in_filename, "-")))); }) != 0) { | |
6604 | ||
6605 | in = fopen(in_filename, "rt"); | |
6606 | if (!in) { | |
6607 | print_error(dcgettext (((void *)0), "%s: could not open file `%s'", __LC_MESSAGES), dcgettext (((void *)0), "FATAL", __LC_MESSAGES), | |
6608 | in_filename); | |
6609 | yasm_xfree(in_filename); | |
6610 | if (obj_filename) | |
6611 | yasm_xfree(obj_filename); | |
6612 | return 1; | |
6613 | } | |
6614 | } else { | |
6615 | ||
6616 | in = stdin; | |
6617 | } | |
6618 | ||
6619 | ||
6620 | if (preproc_only) | |
6621 | return do_preproc_only(in); | |
6622 | ||
6623 | ||
6624 | if (list_filename) { | |
6625 | ||
6626 | if (!cur_listfmt_module) { | |
6627 | cur_listfmt_module = yasm_load_module(YASM_MODULE_LISTFMT, "nasm"); | |
6628 | if (!cur_listfmt_module) { | |
6629 | print_error(dcgettext (((void *)0), "%s: could not load default %s", __LC_MESSAGES), dcgettext (((void *)0), "FATAL", __LC_MESSAGES), | |
6630 | dcgettext (((void *)0), "list format", __LC_MESSAGES)); | |
6631 | return 1; | |
6632 | } | |
6633 | } | |
6634 | } | |
6635 | ||
6636 | ||
6637 | if (!cur_dbgfmt_module) { | |
6638 | cur_dbgfmt_module = yasm_load_module(YASM_MODULE_DBGFMT, "null"); | |
6639 | if (!cur_dbgfmt_module) { | |
6640 | print_error(dcgettext (((void *)0), "%s: could not load default %s", __LC_MESSAGES), dcgettext (((void *)0), "FATAL", __LC_MESSAGES), | |
6641 | dcgettext (((void *)0), "debug format", __LC_MESSAGES)); | |
6642 | return 1; | |
6643 | } | |
6644 | } | |
6645 | ||
6646 | return do_assemble(in); | |
6647 | } | |
6648 | ||
6649 | ||
6650 | ||
6651 | static FILE * | |
6652 | open_file(const char *filename, const char *mode) | |
6653 | { | |
6654 | FILE *f; | |
6655 | ||
6656 | f = fopen(filename, mode); | |
6657 | if (!f) | |
6658 | print_error(dcgettext (((void *)0), "could not open file `%s'", __LC_MESSAGES), filename); | |
6659 | return f; | |
6660 | } | |
6661 | ||
6662 | static void | |
6663 | check_errors(yasm_errwarns *errwarns, yasm_object *object) | |
6664 | { | |
6665 | if (yasm_errwarns_num_errors(errwarns, warning_error) > 0) { | |
6666 | yasm_errwarns_output_all(errwarns, yasm_object_get_linemap(object), | |
6667 | warning_error, print_yasm_error, | |
6668 | print_yasm_warning); | |
6669 | yasm_errwarns_destroy(errwarns); | |
6670 | cleanup(object); | |
6671 | exit(1); | |
6672 | } | |
6673 | } | |
6674 | # 739 "frontends/yasm/yasm.c" | |
6675 | static void | |
6676 | cleanup(yasm_object *object) | |
6677 | { | |
6678 | if (1) { | |
6679 | if (cur_objfmt) | |
6680 | ((yasm_objfmt_base *)cur_objfmt)->module->destroy(cur_objfmt); | |
6681 | if (cur_dbgfmt) | |
6682 | ((yasm_dbgfmt_base *)cur_dbgfmt)->module->destroy(cur_dbgfmt); | |
6683 | if (cur_listfmt) | |
6684 | ((yasm_listfmt_base *)cur_listfmt)->module->destroy(cur_listfmt); | |
6685 | if (cur_preproc) | |
6686 | ((yasm_preproc_base *)cur_preproc)->module->destroy(cur_preproc); | |
6687 | if (object) | |
6688 | yasm_object_destroy(object); | |
6689 | if (cur_arch) | |
6690 | ((yasm_arch_base *)cur_arch)->module->destroy(cur_arch); | |
6691 | ||
6692 | yasm_floatnum_cleanup(); | |
6693 | yasm_intnum_cleanup(); | |
6694 | ||
6695 | yasm_errwarn_cleanup(); | |
6696 | ||
6697 | BitVector_Shutdown(); | |
6698 | } | |
6699 | ||
6700 | if (1) { | |
6701 | if (in_filename) | |
6702 | yasm_xfree(in_filename); | |
6703 | if (obj_filename) | |
6704 | yasm_xfree(obj_filename); | |
6705 | if (list_filename) | |
6706 | yasm_xfree(list_filename); | |
6707 | if (machine_name) | |
6708 | yasm_xfree(machine_name); | |
6709 | if (objfmt_keyword) | |
6710 | yasm_xfree(objfmt_keyword); | |
6711 | } | |
6712 | } | |
6713 | ||
6714 | ||
6715 | ||
6716 | ||
6717 | int | |
6718 | not_an_option_handler(char *param) | |
6719 | { | |
6720 | if (in_filename) { | |
6721 | print_error( | |
6722 | dcgettext (((void *)0), "warning: can open only one input file, only the last file will be processed", __LC_MESSAGES)); | |
6723 | yasm_xfree(in_filename); | |
6724 | } | |
6725 | ||
6726 | in_filename = yasm__xstrdup(param); | |
6727 | ||
6728 | return 0; | |
6729 | } | |
6730 | ||
6731 | int | |
6732 | other_option_handler(char *option) | |
6733 | { | |
6734 | ||
6735 | if (option[0] == '-' && option[1] == 'O') { | |
6736 | int n = 2; | |
6737 | for (;;) { | |
6738 | if (option[n] == '\0') | |
6739 | return 0; | |
6740 | if (!((*__ctype_b_loc ())[(int) ((option[n]))] & (unsigned short int) _ISdigit)) | |
6741 | return 1; | |
6742 | n++; | |
6743 | } | |
6744 | } | |
6745 | return 1; | |
6746 | } | |
6747 | ||
6748 | static int | |
6749 | opt_special_handler( char *cmd, char *param, int extra) | |
6750 | { | |
6751 | if (special_options == 0) | |
6752 | special_options = extra; | |
6753 | return 0; | |
6754 | } | |
6755 | ||
6756 | static int | |
6757 | opt_arch_handler( char *cmd, char *param, int extra) | |
6758 | { | |
6759 | ((void) (0)); | |
6760 | cur_arch_module = yasm_load_module(YASM_MODULE_ARCH, param); | |
6761 | if (!cur_arch_module) { | |
6762 | if (!__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ("help") && __builtin_constant_p (param) && (__s1_len = strlen ("help"), __s2_len = strlen (param), (!((size_t)(const void *)(("help") + 1) - (size_t)(const void *)("help") == 1) || __s1_len >= 4) && (!((size_t)(const void *)((param) + 1) - (size_t)(const void *)(param) == 1) || __s2_len >= 4)) ? __builtin_strcmp ("help", param) : (__builtin_constant_p ("help") && ((size_t)(const void *)(("help") + 1) - (size_t)(const void *)("help") == 1) && (__s1_len = strlen ("help"), __s1_len < 4) ? (__builtin_constant_p (param) && ((size_t)(const void *)((param) + 1) - (size_t)(const void *)(param) == 1) ? __builtin_strcmp ("help", param) : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) (param); register int __result = (((__const unsigned char *) (__const char *) ("help"))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) ("help"))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) ("help"))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) ("help"))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (param) && ((size_t)(const void *)((param) + 1) - (size_t)(const void *)(param) == 1) && (__s2_len = strlen (param), __s2_len < 4) ? (__builtin_constant_p ("help") && ((size_t)(const void *)(("help") + 1) - (size_t)(const void *)("help") == 1) ? __builtin_strcmp ("help", param) : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) ("help"); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) (param))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) (param))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) (param))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) (param))[3]); } } __result; }))) : __builtin_strcmp ("help", param)))); })) { | |
6763 | printf(dcgettext (((void *)0), "Available yasm %s:\n", __LC_MESSAGES), dcgettext (((void *)0), "architectures", __LC_MESSAGES)); | |
6764 | yasm_list_modules(YASM_MODULE_ARCH, print_list_keyword_desc); | |
6765 | special_options = 0x08; | |
6766 | return 0; | |
6767 | } | |
6768 | print_error(dcgettext (((void *)0), "%s: unrecognized %s `%s'", __LC_MESSAGES), dcgettext (((void *)0), "FATAL", __LC_MESSAGES), | |
6769 | dcgettext (((void *)0), "architecture", __LC_MESSAGES), param); | |
6770 | exit(1); | |
6771 | } | |
6772 | return 0; | |
6773 | } | |
6774 | ||
6775 | static int | |
6776 | opt_parser_handler( char *cmd, char *param, int extra) | |
6777 | { | |
6778 | ((void) (0)); | |
6779 | cur_parser_module = yasm_load_module(YASM_MODULE_PARSER, param); | |
6780 | if (!cur_parser_module) { | |
6781 | if (!__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ("help") && __builtin_constant_p (param) && (__s1_len = strlen ("help"), __s2_len = strlen (param), (!((size_t)(const void *)(("help") + 1) - (size_t)(const void *)("help") == 1) || __s1_len >= 4) && (!((size_t)(const void *)((param) + 1) - (size_t)(const void *)(param) == 1) || __s2_len >= 4)) ? __builtin_strcmp ("help", param) : (__builtin_constant_p ("help") && ((size_t)(const void *)(("help") + 1) - (size_t)(const void *)("help") == 1) && (__s1_len = strlen ("help"), __s1_len < 4) ? (__builtin_constant_p (param) && ((size_t)(const void *)((param) + 1) - (size_t)(const void *)(param) == 1) ? __builtin_strcmp ("help", param) : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) (param); register int __result = (((__const unsigned char *) (__const char *) ("help"))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) ("help"))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) ("help"))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) ("help"))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (param) && ((size_t)(const void *)((param) + 1) - (size_t)(const void *)(param) == 1) && (__s2_len = strlen (param), __s2_len < 4) ? (__builtin_constant_p ("help") && ((size_t)(const void *)(("help") + 1) - (size_t)(const void *)("help") == 1) ? __builtin_strcmp ("help", param) : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) ("help"); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) (param))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) (param))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) (param))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) (param))[3]); } } __result; }))) : __builtin_strcmp ("help", param)))); })) { | |
6782 | printf(dcgettext (((void *)0), "Available yasm %s:\n", __LC_MESSAGES), dcgettext (((void *)0), "parsers", __LC_MESSAGES)); | |
6783 | yasm_list_modules(YASM_MODULE_PARSER, print_list_keyword_desc); | |
6784 | special_options = 0x08; | |
6785 | return 0; | |
6786 | } | |
6787 | print_error(dcgettext (((void *)0), "%s: unrecognized %s `%s'", __LC_MESSAGES), dcgettext (((void *)0), "FATAL", __LC_MESSAGES), dcgettext (((void *)0), "parser", __LC_MESSAGES), | |
6788 | param); | |
6789 | exit(1); | |
6790 | } | |
6791 | return 0; | |
6792 | } | |
6793 | ||
6794 | static int | |
6795 | opt_preproc_handler( char *cmd, char *param, int extra) | |
6796 | { | |
6797 | ((void) (0)); | |
6798 | cur_preproc_module = yasm_load_module(YASM_MODULE_PREPROC, param); | |
6799 | if (!cur_preproc_module) { | |
6800 | if (!__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ("help") && __builtin_constant_p (param) && (__s1_len = strlen ("help"), __s2_len = strlen (param), (!((size_t)(const void *)(("help") + 1) - (size_t)(const void *)("help") == 1) || __s1_len >= 4) && (!((size_t)(const void *)((param) + 1) - (size_t)(const void *)(param) == 1) || __s2_len >= 4)) ? __builtin_strcmp ("help", param) : (__builtin_constant_p ("help") && ((size_t)(const void *)(("help") + 1) - (size_t)(const void *)("help") == 1) && (__s1_len = strlen ("help"), __s1_len < 4) ? (__builtin_constant_p (param) && ((size_t)(const void *)((param) + 1) - (size_t)(const void *)(param) == 1) ? __builtin_strcmp ("help", param) : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) (param); register int __result = (((__const unsigned char *) (__const char *) ("help"))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) ("help"))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) ("help"))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) ("help"))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (param) && ((size_t)(const void *)((param) + 1) - (size_t)(const void *)(param) == 1) && (__s2_len = strlen (param), __s2_len < 4) ? (__builtin_constant_p ("help") && ((size_t)(const void *)(("help") + 1) - (size_t)(const void *)("help") == 1) ? __builtin_strcmp ("help", param) : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) ("help"); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) (param))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) (param))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) (param))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) (param))[3]); } } __result; }))) : __builtin_strcmp ("help", param)))); })) { | |
6801 | printf(dcgettext (((void *)0), "Available yasm %s:\n", __LC_MESSAGES), dcgettext (((void *)0), "preprocessors", __LC_MESSAGES)); | |
6802 | yasm_list_modules(YASM_MODULE_PREPROC, print_list_keyword_desc); | |
6803 | special_options = 0x08; | |
6804 | return 0; | |
6805 | } | |
6806 | print_error(dcgettext (((void *)0), "%s: unrecognized %s `%s'", __LC_MESSAGES), dcgettext (((void *)0), "FATAL", __LC_MESSAGES), | |
6807 | dcgettext (((void *)0), "preprocessor", __LC_MESSAGES), param); | |
6808 | exit(1); | |
6809 | } | |
6810 | return 0; | |
6811 | } | |
6812 | ||
6813 | static int | |
6814 | opt_objfmt_handler( char *cmd, char *param, int extra) | |
6815 | { | |
6816 | size_t i; | |
6817 | ((void) (0)); | |
6818 | cur_objfmt_module = yasm_load_module(YASM_MODULE_OBJFMT, param); | |
6819 | if (!cur_objfmt_module) { | |
6820 | if (!__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ("help") && __builtin_constant_p (param) && (__s1_len = strlen ("help"), __s2_len = strlen (param), (!((size_t)(const void *)(("help") + 1) - (size_t)(const void *)("help") == 1) || __s1_len >= 4) && (!((size_t)(const void *)((param) + 1) - (size_t)(const void *)(param) == 1) || __s2_len >= 4)) ? __builtin_strcmp ("help", param) : (__builtin_constant_p ("help") && ((size_t)(const void *)(("help") + 1) - (size_t)(const void *)("help") == 1) && (__s1_len = strlen ("help"), __s1_len < 4) ? (__builtin_constant_p (param) && ((size_t)(const void *)((param) + 1) - (size_t)(const void *)(param) == 1) ? __builtin_strcmp ("help", param) : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) (param); register int __result = (((__const unsigned char *) (__const char *) ("help"))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) ("help"))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) ("help"))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) ("help"))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (param) && ((size_t)(const void *)((param) + 1) - (size_t)(const void *)(param) == 1) && (__s2_len = strlen (param), __s2_len < 4) ? (__builtin_constant_p ("help") && ((size_t)(const void *)(("help") + 1) - (size_t)(const void *)("help") == 1) ? __builtin_strcmp ("help", param) : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) ("help"); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) (param))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) (param))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) (param))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) (param))[3]); } } __result; }))) : __builtin_strcmp ("help", param)))); })) { | |
6821 | printf(dcgettext (((void *)0), "Available yasm %s:\n", __LC_MESSAGES), dcgettext (((void *)0), "object formats", __LC_MESSAGES)); | |
6822 | yasm_list_modules(YASM_MODULE_OBJFMT, print_list_keyword_desc); | |
6823 | special_options = 0x08; | |
6824 | return 0; | |
6825 | } | |
6826 | print_error(dcgettext (((void *)0), "%s: unrecognized %s `%s'", __LC_MESSAGES), dcgettext (((void *)0), "FATAL", __LC_MESSAGES), | |
6827 | dcgettext (((void *)0), "object format", __LC_MESSAGES), param); | |
6828 | exit(1); | |
6829 | } | |
6830 | if (objfmt_keyword) | |
6831 | yasm_xfree(objfmt_keyword); | |
6832 | objfmt_keyword = yasm__xstrdup(param); | |
6833 | for (i=0; i<strlen(objfmt_keyword); i++) | |
6834 | objfmt_keyword[i] = (__extension__ ({ int __res; if (sizeof (objfmt_keyword[i]) > 1) { if (__builtin_constant_p (objfmt_keyword[i])) { int __c = (objfmt_keyword[i]); __res = __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower (objfmt_keyword[i]); } else __res = (*__ctype_tolower_loc ())[(int) (objfmt_keyword[i])]; __res; })); | |
6835 | return 0; | |
6836 | } | |
6837 | ||
6838 | static int | |
6839 | opt_dbgfmt_handler( char *cmd, char *param, int extra) | |
6840 | { | |
6841 | ((void) (0)); | |
6842 | cur_dbgfmt_module = yasm_load_module(YASM_MODULE_DBGFMT, param); | |
6843 | if (!cur_dbgfmt_module) { | |
6844 | if (!__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ("help") && __builtin_constant_p (param) && (__s1_len = strlen ("help"), __s2_len = strlen (param), (!((size_t)(const void *)(("help") + 1) - (size_t)(const void *)("help") == 1) || __s1_len >= 4) && (!((size_t)(const void *)((param) + 1) - (size_t)(const void *)(param) == 1) || __s2_len >= 4)) ? __builtin_strcmp ("help", param) : (__builtin_constant_p ("help") && ((size_t)(const void *)(("help") + 1) - (size_t)(const void *)("help") == 1) && (__s1_len = strlen ("help"), __s1_len < 4) ? (__builtin_constant_p (param) && ((size_t)(const void *)((param) + 1) - (size_t)(const void *)(param) == 1) ? __builtin_strcmp ("help", param) : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) (param); register int __result = (((__const unsigned char *) (__const char *) ("help"))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) ("help"))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) ("help"))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) ("help"))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (param) && ((size_t)(const void *)((param) + 1) - (size_t)(const void *)(param) == 1) && (__s2_len = strlen (param), __s2_len < 4) ? (__builtin_constant_p ("help") && ((size_t)(const void *)(("help") + 1) - (size_t)(const void *)("help") == 1) ? __builtin_strcmp ("help", param) : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) ("help"); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) (param))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) (param))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) (param))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) (param))[3]); } } __result; }))) : __builtin_strcmp ("help", param)))); })) { | |
6845 | printf(dcgettext (((void *)0), "Available yasm %s:\n", __LC_MESSAGES), dcgettext (((void *)0), "debug formats", __LC_MESSAGES)); | |
6846 | yasm_list_modules(YASM_MODULE_DBGFMT, print_list_keyword_desc); | |
6847 | special_options = 0x08; | |
6848 | return 0; | |
6849 | } | |
6850 | print_error(dcgettext (((void *)0), "%s: unrecognized %s `%s'", __LC_MESSAGES), dcgettext (((void *)0), "FATAL", __LC_MESSAGES), | |
6851 | dcgettext (((void *)0), "debug format", __LC_MESSAGES), param); | |
6852 | exit(1); | |
6853 | } | |
6854 | return 0; | |
6855 | } | |
6856 | ||
6857 | static int | |
6858 | opt_listfmt_handler( char *cmd, char *param, | |
6859 | int extra) | |
6860 | { | |
6861 | ((void) (0)); | |
6862 | cur_listfmt_module = yasm_load_module(YASM_MODULE_LISTFMT, param); | |
6863 | if (!cur_listfmt_module) { | |
6864 | if (!__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ("help") && __builtin_constant_p (param) && (__s1_len = strlen ("help"), __s2_len = strlen (param), (!((size_t)(const void *)(("help") + 1) - (size_t)(const void *)("help") == 1) || __s1_len >= 4) && (!((size_t)(const void *)((param) + 1) - (size_t)(const void *)(param) == 1) || __s2_len >= 4)) ? __builtin_strcmp ("help", param) : (__builtin_constant_p ("help") && ((size_t)(const void *)(("help") + 1) - (size_t)(const void *)("help") == 1) && (__s1_len = strlen ("help"), __s1_len < 4) ? (__builtin_constant_p (param) && ((size_t)(const void *)((param) + 1) - (size_t)(const void *)(param) == 1) ? __builtin_strcmp ("help", param) : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) (param); register int __result = (((__const unsigned char *) (__const char *) ("help"))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) ("help"))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) ("help"))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) ("help"))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (param) && ((size_t)(const void *)((param) + 1) - (size_t)(const void *)(param) == 1) && (__s2_len = strlen (param), __s2_len < 4) ? (__builtin_constant_p ("help") && ((size_t)(const void *)(("help") + 1) - (size_t)(const void *)("help") == 1) ? __builtin_strcmp ("help", param) : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) ("help"); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) (param))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) (param))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) (param))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) (param))[3]); } } __result; }))) : __builtin_strcmp ("help", param)))); })) { | |
6865 | printf(dcgettext (((void *)0), "Available yasm %s:\n", __LC_MESSAGES), dcgettext (((void *)0), "list formats", __LC_MESSAGES)); | |
6866 | yasm_list_modules(YASM_MODULE_LISTFMT, print_list_keyword_desc); | |
6867 | special_options = 0x08; | |
6868 | return 0; | |
6869 | } | |
6870 | print_error(dcgettext (((void *)0), "%s: unrecognized %s `%s'", __LC_MESSAGES), dcgettext (((void *)0), "FATAL", __LC_MESSAGES), | |
6871 | dcgettext (((void *)0), "list format", __LC_MESSAGES), param); | |
6872 | exit(1); | |
6873 | } | |
6874 | return 0; | |
6875 | } | |
6876 | ||
6877 | static int | |
6878 | opt_listfile_handler( char *cmd, char *param, | |
6879 | int extra) | |
6880 | { | |
6881 | if (list_filename) { | |
6882 | print_error( | |
6883 | dcgettext (((void *)0), "warning: can output to only one list file, last specified used", __LC_MESSAGES)); | |
6884 | yasm_xfree(list_filename); | |
6885 | } | |
6886 | ||
6887 | ((void) (0)); | |
6888 | list_filename = yasm__xstrdup(param); | |
6889 | ||
6890 | return 0; | |
6891 | } | |
6892 | ||
6893 | static int | |
6894 | opt_objfile_handler( char *cmd, char *param, | |
6895 | int extra) | |
6896 | { | |
6897 | if (obj_filename) { | |
6898 | print_error( | |
6899 | dcgettext (((void *)0), "warning: can output to only one object file, last specified used", __LC_MESSAGES)); | |
6900 | yasm_xfree(obj_filename); | |
6901 | } | |
6902 | ||
6903 | ((void) (0)); | |
6904 | obj_filename = yasm__xstrdup(param); | |
6905 | ||
6906 | return 0; | |
6907 | } | |
6908 | ||
6909 | static int | |
6910 | opt_machine_handler( char *cmd, char *param, | |
6911 | int extra) | |
6912 | { | |
6913 | if (machine_name) | |
6914 | yasm_xfree(machine_name); | |
6915 | ||
6916 | ((void) (0)); | |
6917 | machine_name = yasm__xstrdup(param); | |
6918 | ||
6919 | return 0; | |
6920 | } | |
6921 | ||
6922 | static int | |
6923 | opt_strict_handler( char *cmd, | |
6924 | char *param, | |
6925 | int extra) | |
6926 | { | |
6927 | force_strict = 1; | |
6928 | return 0; | |
6929 | } | |
6930 | ||
6931 | static int | |
6932 | opt_warning_handler(char *cmd, char *param, int extra) | |
6933 | { | |
6934 | ||
6935 | void (*action)(yasm_warn_class wclass) = yasm_warn_enable; | |
6936 | ||
6937 | if (extra == 1) { | |
6938 | ||
6939 | yasm_warn_disable_all(); | |
6940 | return 0; | |
6941 | } | |
6942 | ||
6943 | ||
6944 | cmd++; | |
6945 | ||
6946 | ||
6947 | if (cmd[0] == 'n' && cmd[1] == 'o' && cmd[2] == '-') { | |
6948 | action = yasm_warn_disable; | |
6949 | cmd += 3; | |
6950 | } | |
6951 | ||
6952 | if (cmd[0] == '\0') | |
6953 | ||
6954 | return 1; | |
6955 | else if (__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (cmd) && __builtin_constant_p ("error") && (__s1_len = strlen (cmd), __s2_len = strlen ("error"), (!((size_t)(const void *)((cmd) + 1) - (size_t)(const void *)(cmd) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("error") + 1) - (size_t)(const void *)("error") == 1) || __s2_len >= 4)) ? __builtin_strcmp (cmd, "error") : (__builtin_constant_p (cmd) && ((size_t)(const void *)((cmd) + 1) - (size_t)(const void *)(cmd) == 1) && (__s1_len = strlen (cmd), __s1_len < 4) ? (__builtin_constant_p ("error") && ((size_t)(const void *)(("error") + 1) - (size_t)(const void *)("error") == 1) ? __builtin_strcmp (cmd, "error") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("error"); register int __result = (((__const unsigned char *) (__const char *) (cmd))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (cmd))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (cmd))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (cmd))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("error") && ((size_t)(const void *)(("error") + 1) - (size_t)(const void *)("error") == 1) && (__s2_len = strlen ("error"), __s2_len < 4) ? (__builtin_constant_p (cmd) && ((size_t)(const void *)((cmd) + 1) - (size_t)(const void *)(cmd) == 1) ? __builtin_strcmp (cmd, "error") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (cmd); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("error"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("error"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("error"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("error"))[3]); } } __result; }))) : __builtin_strcmp (cmd, "error")))); }) == 0) | |
6956 | warning_error = (action == yasm_warn_enable); | |
6957 | else if (__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (cmd) && __builtin_constant_p ("unrecognized-char") && (__s1_len = strlen (cmd), __s2_len = strlen ("unrecognized-char"), (!((size_t)(const void *)((cmd) + 1) - (size_t)(const void *)(cmd) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("unrecognized-char") + 1) - (size_t)(const void *)("unrecognized-char") == 1) || __s2_len >= 4)) ? __builtin_strcmp (cmd, "unrecognized-char") : (__builtin_constant_p (cmd) && ((size_t)(const void *)((cmd) + 1) - (size_t)(const void *)(cmd) == 1) && (__s1_len = strlen (cmd), __s1_len < 4) ? (__builtin_constant_p ("unrecognized-char") && ((size_t)(const void *)(("unrecognized-char") + 1) - (size_t)(const void *)("unrecognized-char") == 1) ? __builtin_strcmp (cmd, "unrecognized-char") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("unrecognized-char"); register int __result = (((__const unsigned char *) (__const char *) (cmd))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (cmd))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (cmd))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (cmd))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("unrecognized-char") && ((size_t)(const void *)(("unrecognized-char") + 1) - (size_t)(const void *)("unrecognized-char") == 1) && (__s2_len = strlen ("unrecognized-char"), __s2_len < 4) ? (__builtin_constant_p (cmd) && ((size_t)(const void *)((cmd) + 1) - (size_t)(const void *)(cmd) == 1) ? __builtin_strcmp (cmd, "unrecognized-char") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (cmd); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("unrecognized-char"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("unrecognized-char"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("unrecognized-char"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("unrecognized-char"))[3]); } } __result; }))) : __builtin_strcmp (cmd, "unrecognized-char")))); }) == 0) | |
6958 | action(YASM_WARN_UNREC_CHAR); | |
6959 | else if (__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (cmd) && __builtin_constant_p ("orphan-labels") && (__s1_len = strlen (cmd), __s2_len = strlen ("orphan-labels"), (!((size_t)(const void *)((cmd) + 1) - (size_t)(const void *)(cmd) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("orphan-labels") + 1) - (size_t)(const void *)("orphan-labels") == 1) || __s2_len >= 4)) ? __builtin_strcmp (cmd, "orphan-labels") : (__builtin_constant_p (cmd) && ((size_t)(const void *)((cmd) + 1) - (size_t)(const void *)(cmd) == 1) && (__s1_len = strlen (cmd), __s1_len < 4) ? (__builtin_constant_p ("orphan-labels") && ((size_t)(const void *)(("orphan-labels") + 1) - (size_t)(const void *)("orphan-labels") == 1) ? __builtin_strcmp (cmd, "orphan-labels") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("orphan-labels"); register int __result = (((__const unsigned char *) (__const char *) (cmd))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (cmd))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (cmd))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (cmd))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("orphan-labels") && ((size_t)(const void *)(("orphan-labels") + 1) - (size_t)(const void *)("orphan-labels") == 1) && (__s2_len = strlen ("orphan-labels"), __s2_len < 4) ? (__builtin_constant_p (cmd) && ((size_t)(const void *)((cmd) + 1) - (size_t)(const void *)(cmd) == 1) ? __builtin_strcmp (cmd, "orphan-labels") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (cmd); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("orphan-labels"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("orphan-labels"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("orphan-labels"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("orphan-labels"))[3]); } } __result; }))) : __builtin_strcmp (cmd, "orphan-labels")))); }) == 0) | |
6960 | action(YASM_WARN_ORPHAN_LABEL); | |
6961 | else if (__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (cmd) && __builtin_constant_p ("uninit-contents") && (__s1_len = strlen (cmd), __s2_len = strlen ("uninit-contents"), (!((size_t)(const void *)((cmd) + 1) - (size_t)(const void *)(cmd) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("uninit-contents") + 1) - (size_t)(const void *)("uninit-contents") == 1) || __s2_len >= 4)) ? __builtin_strcmp (cmd, "uninit-contents") : (__builtin_constant_p (cmd) && ((size_t)(const void *)((cmd) + 1) - (size_t)(const void *)(cmd) == 1) && (__s1_len = strlen (cmd), __s1_len < 4) ? (__builtin_constant_p ("uninit-contents") && ((size_t)(const void *)(("uninit-contents") + 1) - (size_t)(const void *)("uninit-contents") == 1) ? __builtin_strcmp (cmd, "uninit-contents") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("uninit-contents"); register int __result = (((__const unsigned char *) (__const char *) (cmd))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (cmd))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (cmd))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (cmd))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("uninit-contents") && ((size_t)(const void *)(("uninit-contents") + 1) - (size_t)(const void *)("uninit-contents") == 1) && (__s2_len = strlen ("uninit-contents"), __s2_len < 4) ? (__builtin_constant_p (cmd) && ((size_t)(const void *)((cmd) + 1) - (size_t)(const void *)(cmd) == 1) ? __builtin_strcmp (cmd, "uninit-contents") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (cmd); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("uninit-contents"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("uninit-contents"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("uninit-contents"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("uninit-contents"))[3]); } } __result; }))) : __builtin_strcmp (cmd, "uninit-contents")))); }) == 0) | |
6962 | action(YASM_WARN_UNINIT_CONTENTS); | |
6963 | else | |
6964 | return 1; | |
6965 | ||
6966 | return 0; | |
6967 | } | |
6968 | ||
6969 | static int | |
6970 | preproc_only_handler( char *cmd, char *param, | |
6971 | int extra) | |
6972 | { | |
6973 | preproc_only = 1; | |
6974 | return 0; | |
6975 | } | |
6976 | ||
6977 | static int | |
6978 | opt_include_option( char *cmd, char *param, int extra) | |
6979 | { | |
6980 | yasm_add_include_path(param); | |
6981 | return 0; | |
6982 | } | |
6983 | ||
6984 | static int | |
6985 | opt_preproc_option( char *cmd, char *param, int extra) | |
6986 | { | |
6987 | constcharparam *cp; | |
6988 | cp = yasm_xmalloc(sizeof(constcharparam)); | |
6989 | cp->param = param; | |
6990 | cp->id = extra; | |
6991 | do { (((cp))->link.stqe_next) = ((void *)0); *(&preproc_options)->stqh_last = (cp); (&preproc_options)->stqh_last = &(((cp))->link.stqe_next); } while (0); | |
6992 | return 0; | |
6993 | } | |
6994 | ||
6995 | static int | |
6996 | opt_ewmsg_handler( char *cmd, char *param, int extra) | |
6997 | { | |
6998 | if (strcasecmp(param, "gnu") == 0 || | |
6999 | strcasecmp(param, "gcc") == 0) { | |
7000 | ewmsg_style = EWSTYLE_GNU; | |
7001 | } else if (strcasecmp(param, "vc") == 0) { | |
7002 | ewmsg_style = EWSTYLE_VC; | |
7003 | } else | |
7004 | print_error(dcgettext (((void *)0), "warning: unrecognized message style `%s'", __LC_MESSAGES), param); | |
7005 | ||
7006 | return 0; | |
7007 | } | |
7008 | ||
7009 | static int | |
7010 | opt_makedep_handler( char *cmd, char *param, | |
7011 | int extra) | |
7012 | { | |
7013 | ||
7014 | preproc_only = 1; | |
7015 | generate_make_dependencies = 1; | |
7016 | ||
7017 | return 0; | |
7018 | } | |
7019 | ||
7020 | static void | |
7021 | apply_preproc_builtins() | |
7022 | { | |
7023 | char *predef; | |
7024 | ||
7025 | ||
7026 | predef = yasm_xmalloc(strlen("__YASM_OBJFMT__=") | |
7027 | + strlen(objfmt_keyword) + 1); | |
7028 | strcpy(predef, "__YASM_OBJFMT__="); | |
7029 | strcat(predef, objfmt_keyword); | |
7030 | ((yasm_preproc_base *)cur_preproc)->module->define_builtin(cur_preproc, predef); | |
7031 | yasm_xfree(predef); | |
7032 | } | |
7033 | ||
7034 | static void | |
7035 | apply_preproc_saved_options() | |
7036 | { | |
7037 | constcharparam *cp, *cpnext; | |
7038 | ||
7039 | void (*funcs[3])(yasm_preproc *, const char *); | |
7040 | funcs[0] = cur_preproc_module->add_include_file; | |
7041 | funcs[1] = cur_preproc_module->predefine_macro; | |
7042 | funcs[2] = cur_preproc_module->undefine_macro; | |
7043 | ||
7044 | for((cp) = (((&preproc_options))->stqh_first); (cp); (cp) = (((cp))->link.stqe_next)) { | |
7045 | if (0 <= cp->id && cp->id < 3 && funcs[cp->id]) | |
7046 | funcs[cp->id](cur_preproc, cp->param); | |
7047 | } | |
7048 | ||
7049 | cp = ((&preproc_options)->stqh_first); | |
7050 | while (cp != ((void *)0)) { | |
7051 | cpnext = ((cp)->link.stqe_next); | |
7052 | yasm_xfree(cp); | |
7053 | cp = cpnext; | |
7054 | } | |
7055 | do { (((&preproc_options))->stqh_first) = ((void *)0); (&preproc_options)->stqh_last = &(((&preproc_options))->stqh_first); } while (0); | |
7056 | } | |
7057 | ||
7058 | ||
7059 | ||
7060 | ||
7061 | ||
7062 | ||
7063 | ||
7064 | static char * | |
7065 | replace_extension(const char *orig, const char *ext, | |
7066 | const char *def) | |
7067 | { | |
7068 | char *out, *outext; | |
7069 | ||
7070 | ||
7071 | out = yasm_xmalloc(strlen(orig)+(ext ? (strlen(ext)+2) : 1)); | |
7072 | strcpy(out, orig); | |
7073 | outext = strrchr(out, '.'); | |
7074 | if (outext) { | |
7075 | ||
7076 | ||
7077 | ||
7078 | outext++; | |
7079 | if (ext && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (outext) && __builtin_constant_p (ext) && (__s1_len = strlen (outext), __s2_len = strlen (ext), (!((size_t)(const void *)((outext) + 1) - (size_t)(const void *)(outext) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((ext) + 1) - (size_t)(const void *)(ext) == 1) || __s2_len >= 4)) ? __builtin_strcmp (outext, ext) : (__builtin_constant_p (outext) && ((size_t)(const void *)((outext) + 1) - (size_t)(const void *)(outext) == 1) && (__s1_len = strlen (outext), __s1_len < 4) ? (__builtin_constant_p (ext) && ((size_t)(const void *)((ext) + 1) - (size_t)(const void *)(ext) == 1) ? __builtin_strcmp (outext, ext) : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) (ext); register int __result = (((__const unsigned char *) (__const char *) (outext))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (outext))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (outext))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (outext))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (ext) && ((size_t)(const void *)((ext) + 1) - (size_t)(const void *)(ext) == 1) && (__s2_len = strlen (ext), __s2_len < 4) ? (__builtin_constant_p (outext) && ((size_t)(const void *)((outext) + 1) - (size_t)(const void *)(outext) == 1) ? __builtin_strcmp (outext, ext) : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (outext); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) (ext))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) (ext))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) (ext))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) (ext))[3]); } } __result; }))) : __builtin_strcmp (outext, ext)))); }) == 0) { | |
7080 | outext = ((void *)0); | |
7081 | print_error( | |
7082 | dcgettext (((void *)0), "file name already ends in `.%s': output will be in `%s'", __LC_MESSAGES), | |
7083 | ext, def); | |
7084 | } | |
7085 | } else { | |
7086 | ||
7087 | ||
7088 | ||
7089 | if (!ext) | |
7090 | print_error( | |
7091 | dcgettext (((void *)0), "file name already has no extension: output will be in `%s'", __LC_MESSAGES), | |
7092 | def); | |
7093 | else { | |
7094 | outext = strrchr(out, '\0'); | |
7095 | *outext++ = '.'; | |
7096 | } | |
7097 | } | |
7098 | ||
7099 | ||
7100 | if (outext) { | |
7101 | if (!ext) { | |
7102 | ||
7103 | outext--; | |
7104 | *outext = '\0'; | |
7105 | } else | |
7106 | strcpy(outext, ext); | |
7107 | } else | |
7108 | strcpy(out, def); | |
7109 | ||
7110 | return out; | |
7111 | } | |
7112 | ||
7113 | void | |
7114 | print_list_keyword_desc(const char *name, const char *keyword) | |
7115 | { | |
7116 | printf("%4s%-12s%s\n", "", keyword, name); | |
7117 | } | |
7118 | ||
7119 | static void | |
7120 | print_error(const char *fmt, ...) | |
7121 | { | |
7122 | va_list va; | |
7123 | fprintf(stderr, "yasm: "); | |
7124 | __builtin_va_start(va,fmt); | |
7125 | vfprintf(stderr, fmt, va); | |
7126 | __builtin_va_end(va); | |
7127 | fputc('\n', stderr); | |
7128 | } | |
7129 | ||
7130 | static void | |
7131 | handle_yasm_int_error(const char *file, unsigned int line, const char *message) | |
7132 | { | |
7133 | fprintf(stderr, dcgettext (((void *)0), "INTERNAL ERROR at %s, line %u: %s\n", __LC_MESSAGES), file, line, | |
7134 | dcgettext (((void *)0), message, __LC_MESSAGES)); | |
7135 | ||
7136 | abort(); | |
7137 | ||
7138 | ||
7139 | ||
7140 | } | |
7141 | ||
7142 | static void | |
7143 | handle_yasm_fatal(const char *fmt, va_list va) | |
7144 | { | |
7145 | fprintf(stderr, "yasm: %s: ", dcgettext (((void *)0), "FATAL", __LC_MESSAGES)); | |
7146 | vfprintf(stderr, dcgettext (((void *)0), fmt, __LC_MESSAGES), va); | |
7147 | fputc('\n', stderr); | |
7148 | exit(1); | |
7149 | } | |
7150 | ||
7151 | static const char * | |
7152 | handle_yasm_gettext(const char *msgid) | |
7153 | { | |
7154 | return dcgettext (((void *)0), msgid, __LC_MESSAGES); | |
7155 | } | |
7156 | ||
7157 | static const char *fmt[2] = { | |
7158 | "%s:%lu: %s%s\n", | |
7159 | "%s(%lu) : %s%s\n" | |
7160 | }; | |
7161 | ||
7162 | static const char *fmt_noline[2] = { | |
7163 | "%s: %s%s\n", | |
7164 | "%s : %s%s\n" | |
7165 | }; | |
7166 | ||
7167 | static void | |
7168 | print_yasm_error(const char *filename, unsigned long line, const char *msg, | |
7169 | const char *xref_fn, unsigned long xref_line, | |
7170 | const char *xref_msg) | |
7171 | { | |
7172 | if (line) | |
7173 | fprintf(stderr, fmt[ewmsg_style], filename, line, "", msg); | |
7174 | else | |
7175 | fprintf(stderr, fmt_noline[ewmsg_style], filename, "", msg); | |
7176 | ||
7177 | if (xref_fn && xref_msg) { | |
7178 | if (xref_line) | |
7179 | fprintf(stderr, fmt[ewmsg_style], xref_fn, xref_line, "", xref_msg); | |
7180 | else | |
7181 | fprintf(stderr, fmt_noline[ewmsg_style], xref_fn, "", xref_msg); | |
7182 | } | |
7183 | } | |
7184 | ||
7185 | static void | |
7186 | print_yasm_warning(const char *filename, unsigned long line, const char *msg) | |
7187 | { | |
7188 | if (line) | |
7189 | fprintf(stderr, fmt[ewmsg_style], filename, line, dcgettext (((void *)0), "warning: ", __LC_MESSAGES), msg); | |
7190 | else | |
7191 | fprintf(stderr, fmt_noline[ewmsg_style], filename, dcgettext (((void *)0), "warning: ", __LC_MESSAGES), msg); | |
7192 | } |