Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 174055 Details for
Bug 249592
[ICE/3.4] C++ inheritance disambiguation causes gcc segfault
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Precompiled source that causes this bug.
bug249592.cc (text/plain), 95.49 KB, created by
Brian J.
on 2008-12-02 09:43:32 UTC
(
hide
)
Description:
Precompiled source that causes this bug.
Filename:
MIME Type:
Creator:
Brian J.
Created:
2008-12-02 09:43:32 UTC
Size:
95.49 KB
patch
obsolete
>// /usr/libexec/gcc/i686-pc-linux-gnu/3.4.6/cc1plus -quiet -v -I ../shared/include -I ../shared/util -I ../drums -I ../shared/util/_val -I ../shared/util/_val/.. -D_GNU_SOURCE -D_CPP=1 ../shared/util/util_script.cc -quiet -dumpbase util_script.cc -mtune=pentiumpro -auxbase-strip objs/util_script.o -version -o - -frandom-seed=0 ># 1 "../shared/util/util_script.cc" ># 1 "<built-in>" ># 1 "<command line>" ># 1 "../shared/util/util_script.cc" ># 11 "../shared/util/util_script.cc" ># 1 "../shared/util/util_script.hh" 1 > > > > > > ># 1 "../shared/util/util_hier.hh" 1 ># 11 "../shared/util/util_hier.hh" ># 1 "../shared/include/types.h" 1 > > > > ># 1 "../shared/include/debug.h" 1 ># 6 "../shared/include/types.h" 2 ># 17 "../shared/include/types.h" ># 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/include/stddef.h" 1 3 4 ># 151 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/include/stddef.h" 3 4 >typedef int ptrdiff_t; ># 213 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/include/stddef.h" 3 4 >typedef unsigned int size_t; ># 18 "../shared/include/types.h" 2 ># 12 "../shared/util/util_hier.hh" 2 ># 1 "/usr/include/stdio.h" 1 3 4 ># 28 "/usr/include/stdio.h" 3 4 ># 1 "/usr/include/features.h" 1 3 4 ># 322 "/usr/include/features.h" 3 4 ># 1 "/usr/include/sys/cdefs.h" 1 3 4 ># 324 "/usr/include/sys/cdefs.h" 3 4 ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 325 "/usr/include/sys/cdefs.h" 2 3 4 ># 323 "/usr/include/features.h" 2 3 4 ># 345 "/usr/include/features.h" 3 4 ># 1 "/usr/include/gnu/stubs.h" 1 3 4 > > > ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 5 "/usr/include/gnu/stubs.h" 2 3 4 > > ># 1 "/usr/include/gnu/stubs-32.h" 1 3 4 ># 8 "/usr/include/gnu/stubs.h" 2 3 4 ># 346 "/usr/include/features.h" 2 3 4 ># 29 "/usr/include/stdio.h" 2 3 4 > >extern "C" { > > > ># 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/include/stddef.h" 1 3 4 ># 35 "/usr/include/stdio.h" 2 3 4 > ># 1 "/usr/include/bits/types.h" 1 3 4 ># 28 "/usr/include/bits/types.h" 3 4 ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 29 "/usr/include/bits/types.h" 2 3 4 > > ># 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/include/stddef.h" 1 3 4 ># 32 "/usr/include/bits/types.h" 2 3 4 > > >typedef unsigned char __u_char; >typedef unsigned short int __u_short; >typedef unsigned int __u_int; >typedef unsigned long int __u_long; > > >typedef signed char __int8_t; >typedef unsigned char __uint8_t; >typedef signed short int __int16_t; >typedef unsigned short int __uint16_t; >typedef signed int __int32_t; >typedef unsigned int __uint32_t; > > > > >__extension__ typedef signed long long int __int64_t; >__extension__ typedef unsigned long long int __uint64_t; > > > > > > > >__extension__ typedef long long int __quad_t; >__extension__ typedef unsigned long long int __u_quad_t; ># 134 "/usr/include/bits/types.h" 3 4 ># 1 "/usr/include/bits/typesizes.h" 1 3 4 ># 135 "/usr/include/bits/types.h" 2 3 4 > > >__extension__ typedef __u_quad_t __dev_t; >__extension__ typedef unsigned int __uid_t; >__extension__ typedef unsigned int __gid_t; >__extension__ typedef unsigned long int __ino_t; >__extension__ typedef __u_quad_t __ino64_t; >__extension__ typedef unsigned int __mode_t; >__extension__ typedef unsigned int __nlink_t; >__extension__ typedef long int __off_t; >__extension__ typedef __quad_t __off64_t; >__extension__ typedef int __pid_t; >__extension__ typedef struct { int __val[2]; } __fsid_t; >__extension__ typedef long int __clock_t; >__extension__ typedef unsigned long int __rlim_t; >__extension__ typedef __u_quad_t __rlim64_t; >__extension__ typedef unsigned int __id_t; >__extension__ typedef long int __time_t; >__extension__ typedef unsigned int __useconds_t; >__extension__ typedef long int __suseconds_t; > >__extension__ typedef int __daddr_t; >__extension__ typedef long int __swblk_t; >__extension__ typedef int __key_t; > > >__extension__ typedef int __clockid_t; > > >__extension__ typedef void * __timer_t; > > >__extension__ typedef long int __blksize_t; > > > > >__extension__ typedef long int __blkcnt_t; >__extension__ typedef __quad_t __blkcnt64_t; > > >__extension__ typedef unsigned long int __fsblkcnt_t; >__extension__ typedef __u_quad_t __fsblkcnt64_t; > > >__extension__ typedef unsigned long int __fsfilcnt_t; >__extension__ typedef __u_quad_t __fsfilcnt64_t; > >__extension__ typedef int __ssize_t; > > > >typedef __off64_t __loff_t; >typedef __quad_t *__qaddr_t; >typedef char *__caddr_t; > > >__extension__ typedef int __intptr_t; > > >__extension__ typedef unsigned int __socklen_t; ># 37 "/usr/include/stdio.h" 2 3 4 ># 45 "/usr/include/stdio.h" 3 4 >struct _IO_FILE; > > > >typedef struct _IO_FILE FILE; > > > > > ># 65 "/usr/include/stdio.h" 3 4 >typedef struct _IO_FILE __FILE; ># 75 "/usr/include/stdio.h" 3 4 ># 1 "/usr/include/libio.h" 1 3 4 ># 32 "/usr/include/libio.h" 3 4 ># 1 "/usr/include/_G_config.h" 1 3 4 ># 14 "/usr/include/_G_config.h" 3 4 ># 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/include/stddef.h" 1 3 4 ># 354 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/include/stddef.h" 3 4 >typedef unsigned int wint_t; ># 15 "/usr/include/_G_config.h" 2 3 4 ># 24 "/usr/include/_G_config.h" 3 4 ># 1 "/usr/include/wchar.h" 1 3 4 ># 48 "/usr/include/wchar.h" 3 4 ># 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/include/stddef.h" 1 3 4 ># 49 "/usr/include/wchar.h" 2 3 4 > ># 1 "/usr/include/bits/wchar.h" 1 3 4 ># 51 "/usr/include/wchar.h" 2 3 4 ># 76 "/usr/include/wchar.h" 3 4 >typedef struct >{ > int __count; > union > { > wint_t __wch; > char __wchb[4]; > } __value; >} __mbstate_t; ># 25 "/usr/include/_G_config.h" 2 3 4 > >typedef struct >{ > __off_t __pos; > __mbstate_t __state; >} _G_fpos_t; >typedef struct >{ > __off64_t __pos; > __mbstate_t __state; >} _G_fpos64_t; ># 44 "/usr/include/_G_config.h" 3 4 ># 1 "/usr/include/gconv.h" 1 3 4 ># 28 "/usr/include/gconv.h" 3 4 ># 1 "/usr/include/wchar.h" 1 3 4 ># 48 "/usr/include/wchar.h" 3 4 ># 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/include/stddef.h" 1 3 4 ># 49 "/usr/include/wchar.h" 2 3 4 ># 29 "/usr/include/gconv.h" 2 3 4 > > ># 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/include/stddef.h" 1 3 4 ># 32 "/usr/include/gconv.h" 2 3 4 > > > > > >enum >{ > __GCONV_OK = 0, > __GCONV_NOCONV, > __GCONV_NODB, > __GCONV_NOMEM, > > __GCONV_EMPTY_INPUT, > __GCONV_FULL_OUTPUT, > __GCONV_ILLEGAL_INPUT, > __GCONV_INCOMPLETE_INPUT, > > __GCONV_ILLEGAL_DESCRIPTOR, > __GCONV_INTERNAL_ERROR >}; > > > >enum >{ > __GCONV_IS_LAST = 0x0001, > __GCONV_IGNORE_ERRORS = 0x0002 >}; > > > >struct __gconv_step; >struct __gconv_step_data; >struct __gconv_loaded_object; >struct __gconv_trans_data; > > > >typedef int (*__gconv_fct) (struct __gconv_step *, struct __gconv_step_data *, > __const unsigned char **, __const unsigned char *, > unsigned char **, size_t *, int, int); > > >typedef wint_t (*__gconv_btowc_fct) (struct __gconv_step *, unsigned char); > > >typedef int (*__gconv_init_fct) (struct __gconv_step *); >typedef void (*__gconv_end_fct) (struct __gconv_step *); > > > >typedef int (*__gconv_trans_fct) (struct __gconv_step *, > struct __gconv_step_data *, void *, > __const unsigned char *, > __const unsigned char **, > __const unsigned char *, unsigned char **, > size_t *); > > >typedef int (*__gconv_trans_context_fct) (void *, __const unsigned char *, > __const unsigned char *, > unsigned char *, unsigned char *); > > >typedef int (*__gconv_trans_query_fct) (__const char *, __const char ***, > size_t *); > > >typedef int (*__gconv_trans_init_fct) (void **, const char *); >typedef void (*__gconv_trans_end_fct) (void *); > >struct __gconv_trans_data >{ > > __gconv_trans_fct __trans_fct; > __gconv_trans_context_fct __trans_context_fct; > __gconv_trans_end_fct __trans_end_fct; > void *__data; > struct __gconv_trans_data *__next; >}; > > > >struct __gconv_step >{ > struct __gconv_loaded_object *__shlib_handle; > __const char *__modname; > > int __counter; > > char *__from_name; > char *__to_name; > > __gconv_fct __fct; > __gconv_btowc_fct __btowc_fct; > __gconv_init_fct __init_fct; > __gconv_end_fct __end_fct; > > > > int __min_needed_from; > int __max_needed_from; > int __min_needed_to; > int __max_needed_to; > > > int __stateful; > > void *__data; >}; > > > >struct __gconv_step_data >{ > unsigned char *__outbuf; > unsigned char *__outbufend; > > > > int __flags; > > > > int __invocation_counter; > > > > int __internal_use; > > __mbstate_t *__statep; > __mbstate_t __state; > > > > struct __gconv_trans_data *__trans; >}; > > > >typedef struct __gconv_info >{ > size_t __nsteps; > struct __gconv_step *__steps; > __extension__ struct __gconv_step_data __data []; >} *__gconv_t; ># 45 "/usr/include/_G_config.h" 2 3 4 >typedef union >{ > struct __gconv_info __cd; > struct > { > struct __gconv_info __cd; > struct __gconv_step_data __data; > } __combined; >} _G_iconv_t; > >typedef int _G_int16_t __attribute__ ((__mode__ (__HI__))); >typedef int _G_int32_t __attribute__ ((__mode__ (__SI__))); >typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__))); >typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__))); ># 33 "/usr/include/libio.h" 2 3 4 ># 53 "/usr/include/libio.h" 3 4 ># 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/include/stdarg.h" 1 3 4 ># 43 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/include/stdarg.h" 3 4 >typedef __builtin_va_list __gnuc_va_list; ># 54 "/usr/include/libio.h" 2 3 4 ># 167 "/usr/include/libio.h" 3 4 >struct _IO_jump_t; struct _IO_FILE; ># 177 "/usr/include/libio.h" 3 4 >typedef void _IO_lock_t; > > > > > >struct _IO_marker { > struct _IO_marker *_next; > struct _IO_FILE *_sbuf; > > > > int _pos; ># 200 "/usr/include/libio.h" 3 4 >}; > > >enum __codecvt_result >{ > __codecvt_ok, > __codecvt_partial, > __codecvt_error, > __codecvt_noconv >}; ># 268 "/usr/include/libio.h" 3 4 >struct _IO_FILE { > int _flags; > > > > > char* _IO_read_ptr; > char* _IO_read_end; > char* _IO_read_base; > char* _IO_write_base; > char* _IO_write_ptr; > char* _IO_write_end; > char* _IO_buf_base; > char* _IO_buf_end; > > char *_IO_save_base; > char *_IO_backup_base; > char *_IO_save_end; > > struct _IO_marker *_markers; > > struct _IO_FILE *_chain; > > int _fileno; > > > > int _flags2; > > __off_t _old_offset; > > > > unsigned short _cur_column; > signed char _vtable_offset; > char _shortbuf[1]; > > > > _IO_lock_t *_lock; ># 316 "/usr/include/libio.h" 3 4 > __off64_t _offset; ># 325 "/usr/include/libio.h" 3 4 > void *__pad1; > void *__pad2; > void *__pad3; > void *__pad4; > size_t __pad5; > > int _mode; > > char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; > >}; > > > > > >struct _IO_FILE_plus; > >extern struct _IO_FILE_plus _IO_2_1_stdin_; >extern struct _IO_FILE_plus _IO_2_1_stdout_; >extern struct _IO_FILE_plus _IO_2_1_stderr_; ># 361 "/usr/include/libio.h" 3 4 >typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes); > > > > > > > >typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf, > size_t __n); > > > > > > > >typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w); > > >typedef int __io_close_fn (void *__cookie); > > > > >typedef __io_read_fn cookie_read_function_t; >typedef __io_write_fn cookie_write_function_t; >typedef __io_seek_fn cookie_seek_function_t; >typedef __io_close_fn cookie_close_function_t; > > >typedef struct >{ > __io_read_fn *read; > __io_write_fn *write; > __io_seek_fn *seek; > __io_close_fn *close; >} _IO_cookie_io_functions_t; >typedef _IO_cookie_io_functions_t cookie_io_functions_t; > >struct _IO_cookie_file; > > >extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write, > void *__cookie, _IO_cookie_io_functions_t __fns); > > > > >extern "C" { > > >extern int __underflow (_IO_FILE *); >extern int __uflow (_IO_FILE *); >extern int __overflow (_IO_FILE *, int); >extern wint_t __wunderflow (_IO_FILE *); >extern wint_t __wuflow (_IO_FILE *); >extern wint_t __woverflow (_IO_FILE *, wint_t); ># 451 "/usr/include/libio.h" 3 4 >extern int _IO_getc (_IO_FILE *__fp); >extern int _IO_putc (int __c, _IO_FILE *__fp); >extern int _IO_feof (_IO_FILE *__fp) throw (); >extern int _IO_ferror (_IO_FILE *__fp) throw (); > >extern int _IO_peekc_locked (_IO_FILE *__fp); > > > > > >extern void _IO_flockfile (_IO_FILE *) throw (); >extern void _IO_funlockfile (_IO_FILE *) throw (); >extern int _IO_ftrylockfile (_IO_FILE *) throw (); ># 481 "/usr/include/libio.h" 3 4 >extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, > __gnuc_va_list, int *__restrict); >extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, > __gnuc_va_list); >extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t); >extern size_t _IO_sgetn (_IO_FILE *, void *, size_t); > >extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int); >extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int); > >extern void _IO_free_backup_area (_IO_FILE *) throw (); ># 543 "/usr/include/libio.h" 3 4 >} ># 76 "/usr/include/stdio.h" 2 3 4 > > > > >typedef __gnuc_va_list va_list; ># 89 "/usr/include/stdio.h" 3 4 > > >typedef _G_fpos_t fpos_t; > > > > > >typedef _G_fpos64_t fpos64_t; ># 141 "/usr/include/stdio.h" 3 4 ># 1 "/usr/include/bits/stdio_lim.h" 1 3 4 ># 142 "/usr/include/stdio.h" 2 3 4 > > > >extern struct _IO_FILE *stdin; >extern struct _IO_FILE *stdout; >extern struct _IO_FILE *stderr; > > > > > > > >extern int remove (__const char *__filename) throw (); > >extern int rename (__const char *__old, __const char *__new) throw (); > > > > >extern int renameat (int __oldfd, __const char *__old, int __newfd, > __const char *__new) throw (); > > > > > > > > >extern FILE *tmpfile (void) ; ># 182 "/usr/include/stdio.h" 3 4 >extern FILE *tmpfile64 (void) ; > > > >extern char *tmpnam (char *__s) throw () ; > > > > > >extern char *tmpnam_r (char *__s) throw () ; ># 204 "/usr/include/stdio.h" 3 4 >extern char *tempnam (__const char *__dir, __const char *__pfx) > throw () __attribute__ ((__malloc__)) ; > > > > > > > > >extern int fclose (FILE *__stream); > > > > >extern int fflush (FILE *__stream); > ># 229 "/usr/include/stdio.h" 3 4 >extern int fflush_unlocked (FILE *__stream); ># 239 "/usr/include/stdio.h" 3 4 >extern int fcloseall (void); > > > > > > > > > >extern FILE *fopen (__const char *__restrict __filename, > __const char *__restrict __modes) ; > > > > >extern FILE *freopen (__const char *__restrict __filename, > __const char *__restrict __modes, > FILE *__restrict __stream) ; ># 272 "/usr/include/stdio.h" 3 4 > > >extern FILE *fopen64 (__const char *__restrict __filename, > __const char *__restrict __modes) ; >extern FILE *freopen64 (__const char *__restrict __filename, > __const char *__restrict __modes, > FILE *__restrict __stream) ; > > > > >extern FILE *fdopen (int __fd, __const char *__modes) throw () ; > > > > > >extern FILE *fopencookie (void *__restrict __magic_cookie, > __const char *__restrict __modes, > _IO_cookie_io_functions_t __io_funcs) throw () ; > > >extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes) > throw () ; > > > > >extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) throw () ; > > > > > > >extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) throw (); > > > >extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, > int __modes, size_t __n) throw (); > > > > > >extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, > size_t __size) throw (); > > >extern void setlinebuf (FILE *__stream) throw (); > > > > > > > > >extern int fprintf (FILE *__restrict __stream, > __const char *__restrict __format, ...); > > > > >extern int printf (__const char *__restrict __format, ...); > >extern int sprintf (char *__restrict __s, > __const char *__restrict __format, ...) throw (); > > > > > >extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format, > __gnuc_va_list __arg); > > > > >extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg); > >extern int vsprintf (char *__restrict __s, __const char *__restrict __format, > __gnuc_va_list __arg) throw (); > > > > > >extern int snprintf (char *__restrict __s, size_t __maxlen, > __const char *__restrict __format, ...) > throw () __attribute__ ((__format__ (__printf__, 3, 4))); > >extern int vsnprintf (char *__restrict __s, size_t __maxlen, > __const char *__restrict __format, __gnuc_va_list __arg) > throw () __attribute__ ((__format__ (__printf__, 3, 0))); > > > > > > >extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f, > __gnuc_va_list __arg) > throw () __attribute__ ((__format__ (__printf__, 2, 0))) ; >extern int __asprintf (char **__restrict __ptr, > __const char *__restrict __fmt, ...) > throw () __attribute__ ((__format__ (__printf__, 2, 3))) ; >extern int asprintf (char **__restrict __ptr, > __const char *__restrict __fmt, ...) > throw () __attribute__ ((__format__ (__printf__, 2, 3))) ; > > > > > > > >extern int vdprintf (int __fd, __const char *__restrict __fmt, > __gnuc_va_list __arg) > __attribute__ ((__format__ (__printf__, 2, 0))); >extern int dprintf (int __fd, __const char *__restrict __fmt, ...) > __attribute__ ((__format__ (__printf__, 2, 3))); > > > > > > > > >extern int fscanf (FILE *__restrict __stream, > __const char *__restrict __format, ...) ; > > > > >extern int scanf (__const char *__restrict __format, ...) ; > >extern int sscanf (__const char *__restrict __s, > __const char *__restrict __format, ...) throw (); > > > > > > > > >extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format, > __gnuc_va_list __arg) > __attribute__ ((__format__ (__scanf__, 2, 0))) ; > > > > > >extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg) > __attribute__ ((__format__ (__scanf__, 1, 0))) ; > > >extern int vsscanf (__const char *__restrict __s, > __const char *__restrict __format, __gnuc_va_list __arg) > throw () __attribute__ ((__format__ (__scanf__, 2, 0))); > > > > > > > > > >extern int fgetc (FILE *__stream); >extern int getc (FILE *__stream); > > > > > >extern int getchar (void); > ># 464 "/usr/include/stdio.h" 3 4 >extern int getc_unlocked (FILE *__stream); >extern int getchar_unlocked (void); ># 475 "/usr/include/stdio.h" 3 4 >extern int fgetc_unlocked (FILE *__stream); > > > > > > > > > > > >extern int fputc (int __c, FILE *__stream); >extern int putc (int __c, FILE *__stream); > > > > > >extern int putchar (int __c); > ># 508 "/usr/include/stdio.h" 3 4 >extern int fputc_unlocked (int __c, FILE *__stream); > > > > > > > >extern int putc_unlocked (int __c, FILE *__stream); >extern int putchar_unlocked (int __c); > > > > > > >extern int getw (FILE *__stream); > > >extern int putw (int __w, FILE *__stream); > > > > > > > > >extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) > ; > > > > > > >extern char *gets (char *__s) ; > ># 554 "/usr/include/stdio.h" 3 4 >extern char *fgets_unlocked (char *__restrict __s, int __n, > FILE *__restrict __stream) ; ># 570 "/usr/include/stdio.h" 3 4 >extern __ssize_t __getdelim (char **__restrict __lineptr, > size_t *__restrict __n, int __delimiter, > FILE *__restrict __stream) ; >extern __ssize_t getdelim (char **__restrict __lineptr, > size_t *__restrict __n, int __delimiter, > FILE *__restrict __stream) ; > > > > > > > >extern __ssize_t getline (char **__restrict __lineptr, > size_t *__restrict __n, > FILE *__restrict __stream) ; > > > > > > > > >extern int fputs (__const char *__restrict __s, FILE *__restrict __stream); > > > > > >extern int puts (__const char *__s); > > > > > > >extern int ungetc (int __c, FILE *__stream); > > > > > > >extern size_t fread (void *__restrict __ptr, size_t __size, > size_t __n, FILE *__restrict __stream) ; > > > > >extern size_t fwrite (__const void *__restrict __ptr, size_t __size, > size_t __n, FILE *__restrict __s) ; > ># 631 "/usr/include/stdio.h" 3 4 >extern int fputs_unlocked (__const char *__restrict __s, > FILE *__restrict __stream); ># 642 "/usr/include/stdio.h" 3 4 >extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, > size_t __n, FILE *__restrict __stream) ; >extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size, > size_t __n, FILE *__restrict __stream) ; > > > > > > > > >extern int fseek (FILE *__stream, long int __off, int __whence); > > > > >extern long int ftell (FILE *__stream) ; > > > > >extern void rewind (FILE *__stream); > ># 678 "/usr/include/stdio.h" 3 4 >extern int fseeko (FILE *__stream, __off_t __off, int __whence); > > > > >extern __off_t ftello (FILE *__stream) ; ># 697 "/usr/include/stdio.h" 3 4 > > > > > > >extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos); > > > > >extern int fsetpos (FILE *__stream, __const fpos_t *__pos); ># 720 "/usr/include/stdio.h" 3 4 > > > >extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence); >extern __off64_t ftello64 (FILE *__stream) ; >extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos); >extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos); > > > > >extern void clearerr (FILE *__stream) throw (); > >extern int feof (FILE *__stream) throw () ; > >extern int ferror (FILE *__stream) throw () ; > > > > >extern void clearerr_unlocked (FILE *__stream) throw (); >extern int feof_unlocked (FILE *__stream) throw () ; >extern int ferror_unlocked (FILE *__stream) throw () ; > > > > > > > > >extern void perror (__const char *__s); > > > > > > ># 1 "/usr/include/bits/sys_errlist.h" 1 3 4 ># 27 "/usr/include/bits/sys_errlist.h" 3 4 >extern int sys_nerr; >extern __const char *__const sys_errlist[]; > > >extern int _sys_nerr; >extern __const char *__const _sys_errlist[]; ># 759 "/usr/include/stdio.h" 2 3 4 > > > > >extern int fileno (FILE *__stream) throw () ; > > > > >extern int fileno_unlocked (FILE *__stream) throw () ; ># 778 "/usr/include/stdio.h" 3 4 >extern FILE *popen (__const char *__command, __const char *__modes) ; > > > > > >extern int pclose (FILE *__stream); > > > > > >extern char *ctermid (char *__s) throw (); > > > > > >extern char *cuserid (char *__s); > > > > >struct obstack; > > >extern int obstack_printf (struct obstack *__restrict __obstack, > __const char *__restrict __format, ...) > throw () __attribute__ ((__format__ (__printf__, 2, 3))); >extern int obstack_vprintf (struct obstack *__restrict __obstack, > __const char *__restrict __format, > __gnuc_va_list __args) > throw () __attribute__ ((__format__ (__printf__, 2, 0))); > > > > > > > >extern void flockfile (FILE *__stream) throw (); > > > >extern int ftrylockfile (FILE *__stream) throw () ; > > >extern void funlockfile (FILE *__stream) throw (); ># 848 "/usr/include/stdio.h" 3 4 >} ># 13 "../shared/util/util_hier.hh" 2 > > > > > > >struct HierConfig { > bool writeTopGroup; > > HierConfig(void) > : writeTopGroup (false) { } >}; > >extern HierConfig defHierConfig; > > > > > > >class HierNode { >public: > enum HierType { > HTComment, > HTItem, > HTGroup, > HTNone > }; > > > > > HierType hierType; > > HierNode *sibling; > > HierNode(HierType hierType=HTNone) > : hierType (hierType), sibling ((HierNode *)__null) { } > virtual ~HierNode(void); > >public: > HierType getHierType(void) const { return hierType; } > HierNode *getSibling(void) const { return sibling; } > > virtual bool writeToFile(FILE *file, const unsigned int indent=0, > HierConfig *config=__null) const = 0; >protected: > bool writeIndent(FILE *file, unsigned int indent) const; >}; > > > > > > >class HierComment > : public HierNode { >protected: > char *text; > >public: > HierComment(const char *text); > > const char *getText(void) const { return text; } > > virtual bool writeToFile(FILE *file, const unsigned int indent=0, > HierConfig *config=__null) const; >}; > > > > > > >class HierItem > : public HierNode { >protected: > char *comment; > >public: > HierItem(void) > : HierNode(HTItem), comment (__null) { } > virtual ~HierItem(void); > > bool setComment(const char *str); > const char *getComment(void) const { return comment; } > bool delComment(void); > > virtual bool writeToFile(FILE *file, const unsigned int indent=0, > HierConfig *config=__null) const; >}; > > > > > > >class HierGroup > : public HierNode { > >public: > > > > unsigned int numItems; > HierNode *items; > >public: > HierGroup(void) > : HierNode(HTGroup), numItems (0), items (__null) { } > virtual ~HierGroup(void); > > > > > bool addItem(HierNode *item); >public: > unsigned int getNumItems(void) const { return numItems; } > > HierNode *getItem(unsigned int index) const; > bool delItem(unsigned int index); > > virtual bool writeToFile(FILE *file, const unsigned int indent=0, > HierConfig *config=__null) const; > virtual bool readFromFile(FILE *file, HierConfig *config=__null); > virtual bool readFromStr(const char *str, HierConfig *config=__null); >protected: > virtual bool readFromStr(char **read, char **scratch, > HierConfig *config=__null) = 0; >}; ># 8 "../shared/util/util_script.hh" 2 > > >typedef double ScriptValue; > > > > > > >enum ScriptNodeType { > snt_none = 0, > snt_expr = 1 << 1, > snt_stmt = 1 << 2, > snt_var = 1 << 3, > snt_struct = 1 << 4, > snt_block = 1 << 5, > snt_rout = 1 << 6, > snt_all =(1 << 7) - 1 >}; > >class ScriptNode > : public HierNode { >protected: > const unsigned int scriptType; > >public: > ScriptNode(const unsigned int scriptType=snt_none) > : scriptType (scriptType) { } > const unsigned int getScriptType(void) const { return scriptType; } >}; > >class ScriptExpr > : public ScriptNode { >public: > ScriptExpr(const unsigned int type=snt_none) > : ScriptNode(type | snt_expr) { } > virtual const ScriptValue getValue(void) const = 0; >}; > >class ScriptStmt > : public ScriptNode { >public: > ScriptStmt(const unsigned int type=snt_none) > : ScriptNode(type | snt_stmt) { } > virtual void exec(void) const = 0; >}; > > > > > > >class ScriptNumber > : public ScriptExpr { >protected: > const ScriptValue val; > >public: > ScriptNumber(const ScriptValue val) > : val (val) { } > const ScriptValue getValue(void) const { return val; } > virtual bool writeToFile(FILE *file, const unsigned int indent=0, > HierConfig *config=__null) const; >}; ># 87 "../shared/util/util_script.hh" >class ScriptID > : public ScriptExpr { >protected: > char *name; > >public: > ScriptID(const char *newName, const unsigned int type=snt_none); > ~ScriptID(void); > const char *getName(void) const { return name; } >}; > > > > > > >class ScriptVar > : public ScriptID { >protected: > const ScriptNumber initVal; > ScriptValue val; > >public: > ScriptVar(const char *name, const ScriptValue num=0, > const unsigned int type=snt_none) > : ScriptID(name, type | snt_var), initVal(num), val (0) { } > void setValue(ScriptValue num) { val = num; } > const ScriptValue getValue(void) const { return val; } > virtual bool writeToFile(FILE *file, const unsigned int indent=0, > HierConfig *config=__null) const; >}; > >class ScriptStruct > : public HierGroup, public ScriptID { >public: > ScriptStruct(const char *name, const unsigned int type=snt_none) > : ScriptID(name, type | snt_struct) { } > ~ScriptStruct(void); > ScriptID *resolve(const char *const sought) const; > virtual bool writeToFile(FILE *file, const unsigned int indent=0, > HierConfig *config=__null) const; >}; > > > > > > >class ScriptBlock > : public HierGroup, public ScriptStmt { >public: > ScriptBlock(const unsigned int type=snt_none) > : ScriptStmt(type | snt_block) { } > void exec(void) const; > virtual bool writeToFile(FILE *file, const unsigned int indent=0, > HierConfig *config=__null) const; >}; ># 152 "../shared/util/util_script.hh" >extern const char *RETURN_VALUE_NAME; >class ScriptRoutine > : public ScriptStruct, public ScriptBlock { >public: > ScriptRoutine(const char *name, const unsigned int type=snt_none); > const ScriptValue getValue(void) const; > virtual bool writeToFile(FILE *file, const unsigned int indent=0, > HierConfig *config=__null) const; >}; ># 171 "../shared/util/util_script.hh" >class ScriptNot > : public ScriptExpr { >protected: > ScriptExpr *const expr; > >public: > ScriptNot(ScriptExpr *const expr); > ~ScriptNot(void); > const ScriptValue getValue(void) const { return !expr->getValue(); } > virtual bool writeToFile(FILE *file, const unsigned int indent=0, > HierConfig *config=__null) const; >}; > >class ScriptNeg > : public ScriptExpr { >protected: > ScriptExpr *const expr; > >public: > ScriptNeg(ScriptExpr *const expr); > ~ScriptNeg(void); > const ScriptValue getValue(void) const { return -expr->getValue(); } > virtual bool writeToFile(FILE *file, const unsigned int indent=0, > HierConfig *config=__null) const; >}; > >class ScriptBinaryOp > : public ScriptExpr { >protected: > ScriptExpr *const left, *const right; > >public: > ScriptBinaryOp(ScriptExpr *const left, ScriptExpr *const right); > ~ScriptBinaryOp(void); >}; ># 218 "../shared/util/util_script.hh" >class ScriptNotEqual : public ScriptBinaryOp { public: ScriptNotEqual(ScriptExpr *const left, ScriptExpr *const right) : ScriptBinaryOp(left, right) { } const ScriptValue getValue(void) const; virtual bool writeToFile(FILE *file, const unsigned int indent=0, HierConfig *config=__null) const; }; >class ScriptEqual : public ScriptBinaryOp { public: ScriptEqual(ScriptExpr *const left, ScriptExpr *const right) : ScriptBinaryOp(left, right) { } const ScriptValue getValue(void) const; virtual bool writeToFile(FILE *file, const unsigned int indent=0, HierConfig *config=__null) const; }; >class ScriptLess : public ScriptBinaryOp { public: ScriptLess(ScriptExpr *const left, ScriptExpr *const right) : ScriptBinaryOp(left, right) { } const ScriptValue getValue(void) const; virtual bool writeToFile(FILE *file, const unsigned int indent=0, HierConfig *config=__null) const; }; >class ScriptGreater : public ScriptBinaryOp { public: ScriptGreater(ScriptExpr *const left, ScriptExpr *const right) : ScriptBinaryOp(left, right) { } const ScriptValue getValue(void) const; virtual bool writeToFile(FILE *file, const unsigned int indent=0, HierConfig *config=__null) const; }; >class ScriptAnd : public ScriptBinaryOp { public: ScriptAnd(ScriptExpr *const left, ScriptExpr *const right) : ScriptBinaryOp(left, right) { } const ScriptValue getValue(void) const; virtual bool writeToFile(FILE *file, const unsigned int indent=0, HierConfig *config=__null) const; }; >class ScriptOr : public ScriptBinaryOp { public: ScriptOr(ScriptExpr *const left, ScriptExpr *const right) : ScriptBinaryOp(left, right) { } const ScriptValue getValue(void) const; virtual bool writeToFile(FILE *file, const unsigned int indent=0, HierConfig *config=__null) const; }; >class ScriptSum : public ScriptBinaryOp { public: ScriptSum(ScriptExpr *const left, ScriptExpr *const right) : ScriptBinaryOp(left, right) { } const ScriptValue getValue(void) const; virtual bool writeToFile(FILE *file, const unsigned int indent=0, HierConfig *config=__null) const; }; >class ScriptDiff : public ScriptBinaryOp { public: ScriptDiff(ScriptExpr *const left, ScriptExpr *const right) : ScriptBinaryOp(left, right) { } const ScriptValue getValue(void) const; virtual bool writeToFile(FILE *file, const unsigned int indent=0, HierConfig *config=__null) const; }; >class ScriptProduct : public ScriptBinaryOp { public: ScriptProduct(ScriptExpr *const left, ScriptExpr *const right) : ScriptBinaryOp(left, right) { } const ScriptValue getValue(void) const; virtual bool writeToFile(FILE *file, const unsigned int indent=0, HierConfig *config=__null) const; }; >class ScriptQuotient : public ScriptBinaryOp { public: ScriptQuotient(ScriptExpr *const left, ScriptExpr *const right) : ScriptBinaryOp(left, right) { } const ScriptValue getValue(void) const; virtual bool writeToFile(FILE *file, const unsigned int indent=0, HierConfig *config=__null) const; }; ># 245 "../shared/util/util_script.hh" >class ScriptAssignOp > : public ScriptStmt { >protected: > ScriptVar *const left; > ScriptExpr *const right; > >public: > ScriptAssignOp(ScriptVar *const left, ScriptExpr *const right); >}; > >class ScriptAssign > : public ScriptAssignOp { >public: > ScriptAssign(ScriptVar *const left, ScriptExpr *const right) > : ScriptAssignOp(left, right) { } > void exec(void) const; > virtual bool writeToFile(FILE *file, const unsigned int indent=0, > HierConfig *config=__null) const; >}; ># 276 "../shared/util/util_script.hh" >class ScriptAdd : public ScriptAssignOp { public: ScriptAdd(ScriptVar *const left, ScriptExpr *const right) : ScriptAssignOp(left, right) { } void exec(void) const; virtual bool writeToFile(FILE *file, const unsigned int indent=0, HierConfig *config=__null) const; }; >class ScriptSubtract : public ScriptAssignOp { public: ScriptSubtract(ScriptVar *const left, ScriptExpr *const right) : ScriptAssignOp(left, right) { } void exec(void) const; virtual bool writeToFile(FILE *file, const unsigned int indent=0, HierConfig *config=__null) const; }; >class ScriptMultiply : public ScriptAssignOp { public: ScriptMultiply(ScriptVar *const left, ScriptExpr *const right) : ScriptAssignOp(left, right) { } void exec(void) const; virtual bool writeToFile(FILE *file, const unsigned int indent=0, HierConfig *config=__null) const; }; >class ScriptDivide : public ScriptAssignOp { public: ScriptDivide(ScriptVar *const left, ScriptExpr *const right) : ScriptAssignOp(left, right) { } void exec(void) const; virtual bool writeToFile(FILE *file, const unsigned int indent=0, HierConfig *config=__null) const; }; ># 294 "../shared/util/util_script.hh" >class ScriptCond > : public ScriptStmt { >protected: > ScriptExpr *const test; > ScriptStmt *const body; > >public: > ScriptCond(ScriptExpr *const test, ScriptStmt *const body); > ~ScriptCond(void); >}; > >class ScriptIf > : public ScriptCond { >protected: > ScriptStmt *const alternate; > >public: > ScriptIf(ScriptExpr *const test, ScriptStmt *const body, > ScriptStmt *const alternate=__null) > : ScriptCond(test, body), alternate (alternate) { } > ~ScriptIf(void); > void exec(void) const; > virtual bool writeToFile(FILE *file, const unsigned int indent=0, > HierConfig *config=__null) const; >}; > >class ScriptWhile > : public ScriptCond { >public: > ScriptWhile(ScriptExpr *const test, ScriptStmt *const body) > : ScriptCond(test, body) { } > void exec(void) const; > virtual bool writeToFile(FILE *file, const unsigned int indent=0, > HierConfig *config=__null) const; >}; ># 357 "../shared/util/util_script.hh" >extern const char *SCRIPT_ROOT_NAME; >class Script > : public ScriptRoutine { >public: > Script(void); > const ScriptValue getValue(int argc, ScriptValue **argv) const; > void exec(int argc, ScriptValue **argv) const; > > > > > > virtual bool readFromFile(FILE *file, HierConfig *config=__null) > { return ScriptBlock::readFromFile(file, config); } >protected: > virtual bool readFromStr(char **read, char **scratch, > HierConfig *config=__null); >}; ># 12 "../shared/util/util_script.cc" 2 > ># 1 "../shared/util/util_io.h" 1 > > > > > > > >extern "C" { > > >long int flen(FILE *file); >char *mvsprintf(unsigned int len, const char *fmt, ...); >void avprintf(bool cond, const char *fmt, ...); > >void escapifyStr(char **dest, const char *source, const char *const sought, > const char escape); >void quotifyStr(char **dest, const char *source, const char escape); > > >} ># 14 "../shared/util/util_script.cc" 2 ># 1 "/usr/include/malloc.h" 1 3 4 ># 24 "/usr/include/malloc.h" 3 4 ># 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/include/stddef.h" 1 3 4 ># 25 "/usr/include/malloc.h" 2 3 4 ># 46 "/usr/include/malloc.h" 3 4 >extern "C" { > > >extern void *malloc (size_t __size) throw () __attribute__ ((__malloc__)) ; > > >extern void *calloc (size_t __nmemb, size_t __size) throw () > __attribute__ ((__malloc__)) ; > > > >extern void *realloc (void *__ptr, size_t __size) throw () > __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); > > >extern void free (void *__ptr) throw (); > > >extern void cfree (void *__ptr) throw (); > > >extern void *memalign (size_t __alignment, size_t __size) throw () > __attribute__ ((__malloc__)) ; > > >extern void *valloc (size_t __size) throw () > __attribute__ ((__malloc__)) ; > > > >extern void * pvalloc (size_t __size) throw () > __attribute__ ((__malloc__)) ; > > > >extern void *(*__morecore) (ptrdiff_t __size); > > >extern void *__default_morecore (ptrdiff_t __size) throw () > __attribute__ ((__malloc__)); > > > >struct mallinfo { > int arena; > int ordblks; > int smblks; > int hblks; > int hblkhd; > int usmblks; > int fsmblks; > int uordblks; > int fordblks; > int keepcost; >}; > > >extern struct mallinfo mallinfo (void) throw (); ># 128 "/usr/include/malloc.h" 3 4 >extern int mallopt (int __param, int __val) throw (); > > > >extern int malloc_trim (size_t __pad) throw (); > > > >extern size_t malloc_usable_size (void *__ptr) throw (); > > >extern void malloc_stats (void) throw (); > > >extern void *malloc_get_state (void) throw (); > > > >extern int malloc_set_state (void *__ptr) throw (); > > > > >extern void (*__malloc_initialize_hook) (void); > >extern void (*__free_hook) (void *__ptr, __const void *); > >extern void *(*__malloc_hook) (size_t __size, __const void *); > >extern void *(*__realloc_hook) (void *__ptr, size_t __size, __const void *); > >extern void *(*__memalign_hook) (size_t __alignment, size_t __size, __const void *); > > >extern void (*__after_morecore_hook) (void); > > >extern void __malloc_check_init (void) throw (); > > >} ># 15 "../shared/util/util_script.cc" 2 ># 1 "/usr/include/string.h" 1 3 4 ># 28 "/usr/include/string.h" 3 4 >extern "C" { > > > > ># 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/include/stddef.h" 1 3 4 ># 34 "/usr/include/string.h" 2 3 4 > > > > >extern void *memcpy (void *__restrict __dest, > __const void *__restrict __src, size_t __n) > throw () __attribute__ ((__nonnull__ (1, 2))); > > >extern void *memmove (void *__dest, __const void *__src, size_t __n) > throw () __attribute__ ((__nonnull__ (1, 2))); > > > > > > >extern void *memccpy (void *__restrict __dest, __const void *__restrict __src, > int __c, size_t __n) > throw () __attribute__ ((__nonnull__ (1, 2))); > > > > > >extern void *memset (void *__s, int __c, size_t __n) throw () __attribute__ ((__nonnull__ (1))); > > >extern int memcmp (__const void *__s1, __const void *__s2, size_t __n) > throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); > > >extern void *memchr (__const void *__s, int __c, size_t __n) > throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); > > > > > >extern void *rawmemchr (__const void *__s, int __c) > throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); > > >extern void *memrchr (__const void *__s, int __c, size_t __n) > throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); > > > > > >extern char *strcpy (char *__restrict __dest, __const char *__restrict __src) > throw () __attribute__ ((__nonnull__ (1, 2))); > >extern char *strncpy (char *__restrict __dest, > __const char *__restrict __src, size_t __n) > throw () __attribute__ ((__nonnull__ (1, 2))); > > >extern char *strcat (char *__restrict __dest, __const char *__restrict __src) > throw () __attribute__ ((__nonnull__ (1, 2))); > >extern char *strncat (char *__restrict __dest, __const char *__restrict __src, > size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); > > >extern int strcmp (__const char *__s1, __const char *__s2) > throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); > >extern int strncmp (__const char *__s1, __const char *__s2, size_t __n) > throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); > > >extern int strcoll (__const char *__s1, __const char *__s2) > throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); > >extern size_t strxfrm (char *__restrict __dest, > __const char *__restrict __src, size_t __n) > throw () __attribute__ ((__nonnull__ (2))); > > > > > > ># 1 "/usr/include/xlocale.h" 1 3 4 ># 28 "/usr/include/xlocale.h" 3 4 >typedef struct __locale_struct >{ > > struct locale_data *__locales[13]; > > > const unsigned short int *__ctype_b; > const int *__ctype_tolower; > const int *__ctype_toupper; > > > const char *__names[13]; >} *__locale_t; ># 119 "/usr/include/string.h" 2 3 4 > > >extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l) > throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); > >extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n, > __locale_t __l) throw () __attribute__ ((__nonnull__ (2, 4))); > > > > >extern char *strdup (__const char *__s) > throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); > > > > > > >extern char *strndup (__const char *__string, size_t __n) > throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); ># 165 "/usr/include/string.h" 3 4 > > >extern char *strchr (__const char *__s, int __c) > throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); > >extern char *strrchr (__const char *__s, int __c) > throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); > > > > > >extern char *strchrnul (__const char *__s, int __c) > throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); > > > > > >extern size_t strcspn (__const char *__s, __const char *__reject) > throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); > > >extern size_t strspn (__const char *__s, __const char *__accept) > throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); > >extern char *strpbrk (__const char *__s, __const char *__accept) > throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); > >extern char *strstr (__const char *__haystack, __const char *__needle) > throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); > > > >extern char *strtok (char *__restrict __s, __const char *__restrict __delim) > throw () __attribute__ ((__nonnull__ (2))); > > > > >extern char *__strtok_r (char *__restrict __s, > __const char *__restrict __delim, > char **__restrict __save_ptr) > throw () __attribute__ ((__nonnull__ (2, 3))); > >extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim, > char **__restrict __save_ptr) > throw () __attribute__ ((__nonnull__ (2, 3))); > > > > >extern char *strcasestr (__const char *__haystack, __const char *__needle) > throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); > > > > > > >extern void *memmem (__const void *__haystack, size_t __haystacklen, > __const void *__needle, size_t __needlelen) > throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3))); > > > >extern void *__mempcpy (void *__restrict __dest, > __const void *__restrict __src, size_t __n) > throw () __attribute__ ((__nonnull__ (1, 2))); >extern void *mempcpy (void *__restrict __dest, > __const void *__restrict __src, size_t __n) > throw () __attribute__ ((__nonnull__ (1, 2))); > > > > > >extern size_t strlen (__const char *__s) > throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); > > > > > >extern size_t strnlen (__const char *__string, size_t __maxlen) > throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); > > > > > >extern char *strerror (int __errnum) throw (); > ># 281 "/usr/include/string.h" 3 4 >extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) > throw () __attribute__ ((__nonnull__ (2))); > > > > > >extern char *strerror_l (int __errnum, __locale_t __l) throw (); > > > > > >extern void __bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); > > > >extern void bcopy (__const void *__src, void *__dest, size_t __n) > throw () __attribute__ ((__nonnull__ (1, 2))); > > >extern void bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); > > >extern int bcmp (__const void *__s1, __const void *__s2, size_t __n) > throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); > > >extern char *index (__const char *__s, int __c) > throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); > > >extern char *rindex (__const char *__s, int __c) > throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); > > > >extern int ffs (int __i) throw () __attribute__ ((__const__)); > > > > >extern int ffsl (long int __l) throw () __attribute__ ((__const__)); > >__extension__ extern int ffsll (long long int __ll) > throw () __attribute__ ((__const__)); > > > > >extern int strcasecmp (__const char *__s1, __const char *__s2) > throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); > > >extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n) > throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); > > > > > >extern int strcasecmp_l (__const char *__s1, __const char *__s2, > __locale_t __loc) > throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); > >extern int strncasecmp_l (__const char *__s1, __const char *__s2, > size_t __n, __locale_t __loc) > throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4))); > > > > > >extern char *strsep (char **__restrict __stringp, > __const char *__restrict __delim) > throw () __attribute__ ((__nonnull__ (1, 2))); > > > > >extern int strverscmp (__const char *__s1, __const char *__s2) > throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); > > >extern char *strsignal (int __sig) throw (); > > >extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src) > throw () __attribute__ ((__nonnull__ (1, 2))); >extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src) > throw () __attribute__ ((__nonnull__ (1, 2))); > > > >extern char *__stpncpy (char *__restrict __dest, > __const char *__restrict __src, size_t __n) > throw () __attribute__ ((__nonnull__ (1, 2))); >extern char *stpncpy (char *__restrict __dest, > __const char *__restrict __src, size_t __n) > throw () __attribute__ ((__nonnull__ (1, 2))); > > >extern char *strfry (char *__string) throw () __attribute__ ((__nonnull__ (1))); > > >extern void *memfrob (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); > > > > > > >extern char *basename (__const char *__filename) throw () __attribute__ ((__nonnull__ (1))); ># 432 "/usr/include/string.h" 3 4 >} ># 16 "../shared/util/util_script.cc" 2 ># 1 "/usr/include/stdlib.h" 1 3 4 ># 33 "/usr/include/stdlib.h" 3 4 ># 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/include/stddef.h" 1 3 4 ># 34 "/usr/include/stdlib.h" 2 3 4 > >extern "C" { > > > > > > ># 1 "/usr/include/bits/waitflags.h" 1 3 4 ># 43 "/usr/include/stdlib.h" 2 3 4 ># 1 "/usr/include/bits/waitstatus.h" 1 3 4 ># 65 "/usr/include/bits/waitstatus.h" 3 4 ># 1 "/usr/include/endian.h" 1 3 4 ># 37 "/usr/include/endian.h" 3 4 ># 1 "/usr/include/bits/endian.h" 1 3 4 ># 38 "/usr/include/endian.h" 2 3 4 ># 66 "/usr/include/bits/waitstatus.h" 2 3 4 > >union wait > { > int w_status; > struct > { > > unsigned int __w_termsig:7; > unsigned int __w_coredump:1; > unsigned int __w_retcode:8; > unsigned int:16; > > > > > > > > } __wait_terminated; > struct > { > > unsigned int __w_stopval:8; > unsigned int __w_stopsig:8; > unsigned int:16; > > > > > > > } __wait_stopped; > }; ># 44 "/usr/include/stdlib.h" 2 3 4 ># 96 "/usr/include/stdlib.h" 3 4 > > >typedef struct > { > int quot; > int rem; > } div_t; > > > >typedef struct > { > long int quot; > long int rem; > } ldiv_t; > > > > > > > >__extension__ typedef struct > { > long long int quot; > long long int rem; > } lldiv_t; > > ># 140 "/usr/include/stdlib.h" 3 4 >extern size_t __ctype_get_mb_cur_max (void) throw () ; > > > > >extern double atof (__const char *__nptr) > throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; > >extern int atoi (__const char *__nptr) > throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; > >extern long int atol (__const char *__nptr) > throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; > > > > > >__extension__ extern long long int atoll (__const char *__nptr) > throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; > > > > > >extern double strtod (__const char *__restrict __nptr, > char **__restrict __endptr) > throw () __attribute__ ((__nonnull__ (1))) ; > > > > > >extern float strtof (__const char *__restrict __nptr, > char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))) ; > >extern long double strtold (__const char *__restrict __nptr, > char **__restrict __endptr) > throw () __attribute__ ((__nonnull__ (1))) ; > > > > > >extern long int strtol (__const char *__restrict __nptr, > char **__restrict __endptr, int __base) > throw () __attribute__ ((__nonnull__ (1))) ; > >extern unsigned long int strtoul (__const char *__restrict __nptr, > char **__restrict __endptr, int __base) > throw () __attribute__ ((__nonnull__ (1))) ; > > > > >__extension__ >extern long long int strtoq (__const char *__restrict __nptr, > char **__restrict __endptr, int __base) > throw () __attribute__ ((__nonnull__ (1))) ; > >__extension__ >extern unsigned long long int strtouq (__const char *__restrict __nptr, > char **__restrict __endptr, int __base) > throw () __attribute__ ((__nonnull__ (1))) ; > > > > > >__extension__ >extern long long int strtoll (__const char *__restrict __nptr, > char **__restrict __endptr, int __base) > throw () __attribute__ ((__nonnull__ (1))) ; > >__extension__ >extern unsigned long long int strtoull (__const char *__restrict __nptr, > char **__restrict __endptr, int __base) > throw () __attribute__ ((__nonnull__ (1))) ; > ># 240 "/usr/include/stdlib.h" 3 4 >extern long int strtol_l (__const char *__restrict __nptr, > char **__restrict __endptr, int __base, > __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))) ; > >extern unsigned long int strtoul_l (__const char *__restrict __nptr, > char **__restrict __endptr, > int __base, __locale_t __loc) > throw () __attribute__ ((__nonnull__ (1, 4))) ; > >__extension__ >extern long long int strtoll_l (__const char *__restrict __nptr, > char **__restrict __endptr, int __base, > __locale_t __loc) > throw () __attribute__ ((__nonnull__ (1, 4))) ; > >__extension__ >extern unsigned long long int strtoull_l (__const char *__restrict __nptr, > char **__restrict __endptr, > int __base, __locale_t __loc) > throw () __attribute__ ((__nonnull__ (1, 4))) ; > >extern double strtod_l (__const char *__restrict __nptr, > char **__restrict __endptr, __locale_t __loc) > throw () __attribute__ ((__nonnull__ (1, 3))) ; > >extern float strtof_l (__const char *__restrict __nptr, > char **__restrict __endptr, __locale_t __loc) > throw () __attribute__ ((__nonnull__ (1, 3))) ; > >extern long double strtold_l (__const char *__restrict __nptr, > char **__restrict __endptr, > __locale_t __loc) > throw () __attribute__ ((__nonnull__ (1, 3))) ; > > > > > > >extern double __strtod_internal (__const char *__restrict __nptr, > char **__restrict __endptr, int __group) > throw () __attribute__ ((__nonnull__ (1))) ; >extern float __strtof_internal (__const char *__restrict __nptr, > char **__restrict __endptr, int __group) > throw () __attribute__ ((__nonnull__ (1))) ; >extern long double __strtold_internal (__const char *__restrict __nptr, > char **__restrict __endptr, > int __group) > throw () __attribute__ ((__nonnull__ (1))) ; > >extern long int __strtol_internal (__const char *__restrict __nptr, > char **__restrict __endptr, > int __base, int __group) > throw () __attribute__ ((__nonnull__ (1))) ; > > > >extern unsigned long int __strtoul_internal (__const char *__restrict __nptr, > char **__restrict __endptr, > int __base, int __group) > throw () __attribute__ ((__nonnull__ (1))) ; > > > > >__extension__ >extern long long int __strtoll_internal (__const char *__restrict __nptr, > char **__restrict __endptr, > int __base, int __group) > throw () __attribute__ ((__nonnull__ (1))) ; > > > >__extension__ >extern unsigned long long int __strtoull_internal (__const char * > __restrict __nptr, > char **__restrict __endptr, > int __base, int __group) > throw () __attribute__ ((__nonnull__ (1))) ; ># 429 "/usr/include/stdlib.h" 3 4 >extern char *l64a (long int __n) throw () ; > > >extern long int a64l (__const char *__s) > throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; > > > > ># 1 "/usr/include/sys/types.h" 1 3 4 ># 29 "/usr/include/sys/types.h" 3 4 >extern "C" { > > > > > >typedef __u_char u_char; >typedef __u_short u_short; >typedef __u_int u_int; >typedef __u_long u_long; >typedef __quad_t quad_t; >typedef __u_quad_t u_quad_t; >typedef __fsid_t fsid_t; > > > > >typedef __loff_t loff_t; > > > >typedef __ino_t ino_t; > > > > > > >typedef __ino64_t ino64_t; > > > > >typedef __dev_t dev_t; > > > > >typedef __gid_t gid_t; > > > > >typedef __mode_t mode_t; > > > > >typedef __nlink_t nlink_t; > > > > >typedef __uid_t uid_t; > > > > > >typedef __off_t off_t; > > > > > > >typedef __off64_t off64_t; > > > > >typedef __pid_t pid_t; > > > > >typedef __id_t id_t; > > > > >typedef __ssize_t ssize_t; > > > > > >typedef __daddr_t daddr_t; >typedef __caddr_t caddr_t; > > > > > >typedef __key_t key_t; ># 133 "/usr/include/sys/types.h" 3 4 ># 1 "/usr/include/time.h" 1 3 4 ># 59 "/usr/include/time.h" 3 4 > > >typedef __clock_t clock_t; > > > ># 75 "/usr/include/time.h" 3 4 > > >typedef __time_t time_t; > > > ># 93 "/usr/include/time.h" 3 4 >typedef __clockid_t clockid_t; ># 105 "/usr/include/time.h" 3 4 >typedef __timer_t timer_t; ># 134 "/usr/include/sys/types.h" 2 3 4 > > > >typedef __useconds_t useconds_t; > > > >typedef __suseconds_t suseconds_t; > > > > > ># 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/include/stddef.h" 1 3 4 ># 148 "/usr/include/sys/types.h" 2 3 4 > > > >typedef unsigned long int ulong; >typedef unsigned short int ushort; >typedef unsigned int uint; ># 195 "/usr/include/sys/types.h" 3 4 >typedef int int8_t __attribute__ ((__mode__ (__QI__))); >typedef int int16_t __attribute__ ((__mode__ (__HI__))); >typedef int int32_t __attribute__ ((__mode__ (__SI__))); >typedef int int64_t __attribute__ ((__mode__ (__DI__))); > > >typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))); >typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__))); >typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__))); >typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__))); > >typedef int register_t __attribute__ ((__mode__ (__word__))); ># 220 "/usr/include/sys/types.h" 3 4 ># 1 "/usr/include/sys/select.h" 1 3 4 ># 31 "/usr/include/sys/select.h" 3 4 ># 1 "/usr/include/bits/select.h" 1 3 4 ># 32 "/usr/include/sys/select.h" 2 3 4 > > ># 1 "/usr/include/bits/sigset.h" 1 3 4 ># 24 "/usr/include/bits/sigset.h" 3 4 >typedef int __sig_atomic_t; > > > > >typedef struct > { > unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; > } __sigset_t; ># 35 "/usr/include/sys/select.h" 2 3 4 > > > >typedef __sigset_t sigset_t; > > > > > ># 1 "/usr/include/time.h" 1 3 4 ># 121 "/usr/include/time.h" 3 4 >struct timespec > { > __time_t tv_sec; > long int tv_nsec; > }; ># 45 "/usr/include/sys/select.h" 2 3 4 > ># 1 "/usr/include/bits/time.h" 1 3 4 ># 69 "/usr/include/bits/time.h" 3 4 >struct timeval > { > __time_t tv_sec; > __suseconds_t tv_usec; > }; ># 47 "/usr/include/sys/select.h" 2 3 4 ># 55 "/usr/include/sys/select.h" 3 4 >typedef long int __fd_mask; ># 67 "/usr/include/sys/select.h" 3 4 >typedef struct > { > > > > __fd_mask fds_bits[1024 / (8 * sizeof (__fd_mask))]; > > > > > > } fd_set; > > > > > > >typedef __fd_mask fd_mask; ># 99 "/usr/include/sys/select.h" 3 4 >extern "C" { ># 109 "/usr/include/sys/select.h" 3 4 >extern int select (int __nfds, fd_set *__restrict __readfds, > fd_set *__restrict __writefds, > fd_set *__restrict __exceptfds, > struct timeval *__restrict __timeout); ># 121 "/usr/include/sys/select.h" 3 4 >extern int pselect (int __nfds, fd_set *__restrict __readfds, > fd_set *__restrict __writefds, > fd_set *__restrict __exceptfds, > const struct timespec *__restrict __timeout, > const __sigset_t *__restrict __sigmask); > > >} ># 221 "/usr/include/sys/types.h" 2 3 4 > > ># 1 "/usr/include/sys/sysmacros.h" 1 3 4 ># 30 "/usr/include/sys/sysmacros.h" 3 4 >__extension__ >extern __inline unsigned int gnu_dev_major (unsigned long long int __dev) > throw (); >__extension__ >extern __inline unsigned int gnu_dev_minor (unsigned long long int __dev) > throw (); >__extension__ >extern __inline unsigned long long int gnu_dev_makedev (unsigned int __major, > unsigned int __minor) > throw (); > > >__extension__ extern __inline unsigned int >gnu_dev_major (unsigned long long int __dev) throw () >{ > return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); >} > >__extension__ extern __inline unsigned int >gnu_dev_minor (unsigned long long int __dev) throw () >{ > return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); >} > >__extension__ extern __inline unsigned long long int >gnu_dev_makedev (unsigned int __major, unsigned int __minor) throw () >{ > return ((__minor & 0xff) | ((__major & 0xfff) << 8) > | (((unsigned long long int) (__minor & ~0xff)) << 12) > | (((unsigned long long int) (__major & ~0xfff)) << 32)); >} ># 224 "/usr/include/sys/types.h" 2 3 4 > > > > >typedef __blksize_t blksize_t; > > > > > > >typedef __blkcnt_t blkcnt_t; > > > >typedef __fsblkcnt_t fsblkcnt_t; > > > >typedef __fsfilcnt_t fsfilcnt_t; ># 262 "/usr/include/sys/types.h" 3 4 >typedef __blkcnt64_t blkcnt64_t; >typedef __fsblkcnt64_t fsblkcnt64_t; >typedef __fsfilcnt64_t fsfilcnt64_t; > > > > > ># 1 "/usr/include/bits/pthreadtypes.h" 1 3 4 ># 36 "/usr/include/bits/pthreadtypes.h" 3 4 >typedef unsigned long int pthread_t; > > >typedef union >{ > char __size[36]; > long int __align; >} pthread_attr_t; > > >typedef struct __pthread_internal_slist >{ > struct __pthread_internal_slist *__next; >} __pthread_slist_t; > > > > >typedef union >{ > struct __pthread_mutex_s > { > int __lock; > unsigned int __count; > int __owner; > > > int __kind; > unsigned int __nusers; > __extension__ union > { > int __spins; > __pthread_slist_t __list; > }; > } __data; > char __size[24]; > long int __align; >} pthread_mutex_t; > >typedef union >{ > char __size[4]; > long int __align; >} pthread_mutexattr_t; > > > > >typedef union >{ > struct > { > int __lock; > unsigned int __futex; > __extension__ unsigned long long int __total_seq; > __extension__ unsigned long long int __wakeup_seq; > __extension__ unsigned long long int __woken_seq; > void *__mutex; > unsigned int __nwaiters; > unsigned int __broadcast_seq; > } __data; > char __size[48]; > __extension__ long long int __align; >} pthread_cond_t; > >typedef union >{ > char __size[4]; > long int __align; >} pthread_condattr_t; > > > >typedef unsigned int pthread_key_t; > > > >typedef int pthread_once_t; > > > > > >typedef union >{ > struct > { > int __lock; > unsigned int __nr_readers; > unsigned int __readers_wakeup; > unsigned int __writer_wakeup; > unsigned int __nr_readers_queued; > unsigned int __nr_writers_queued; > > > unsigned int __flags; > int __writer; > } __data; > char __size[32]; > long int __align; >} pthread_rwlock_t; > >typedef union >{ > char __size[8]; > long int __align; >} pthread_rwlockattr_t; > > > > > >typedef volatile int pthread_spinlock_t; > > > > >typedef union >{ > char __size[20]; > long int __align; >} pthread_barrier_t; > >typedef union >{ > char __size[4]; > int __align; >} pthread_barrierattr_t; ># 271 "/usr/include/sys/types.h" 2 3 4 > > >} ># 439 "/usr/include/stdlib.h" 2 3 4 > > > > > > >extern long int random (void) throw (); > > >extern void srandom (unsigned int __seed) throw (); > > > > > >extern char *initstate (unsigned int __seed, char *__statebuf, > size_t __statelen) throw () __attribute__ ((__nonnull__ (2))); > > > >extern char *setstate (char *__statebuf) throw () __attribute__ ((__nonnull__ (1))); > > > > > > > >struct random_data > { > int32_t *fptr; > int32_t *rptr; > int32_t *state; > int rand_type; > int rand_deg; > int rand_sep; > int32_t *end_ptr; > }; > >extern int random_r (struct random_data *__restrict __buf, > int32_t *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); > >extern int srandom_r (unsigned int __seed, struct random_data *__buf) > throw () __attribute__ ((__nonnull__ (2))); > >extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, > size_t __statelen, > struct random_data *__restrict __buf) > throw () __attribute__ ((__nonnull__ (2, 4))); > >extern int setstate_r (char *__restrict __statebuf, > struct random_data *__restrict __buf) > throw () __attribute__ ((__nonnull__ (1, 2))); > > > > > > >extern int rand (void) throw (); > >extern void srand (unsigned int __seed) throw (); > > > > >extern int rand_r (unsigned int *__seed) throw (); > > > > > > > >extern double drand48 (void) throw (); >extern double erand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1))); > > >extern long int lrand48 (void) throw (); >extern long int nrand48 (unsigned short int __xsubi[3]) > throw () __attribute__ ((__nonnull__ (1))); > > >extern long int mrand48 (void) throw (); >extern long int jrand48 (unsigned short int __xsubi[3]) > throw () __attribute__ ((__nonnull__ (1))); > > >extern void srand48 (long int __seedval) throw (); >extern unsigned short int *seed48 (unsigned short int __seed16v[3]) > throw () __attribute__ ((__nonnull__ (1))); >extern void lcong48 (unsigned short int __param[7]) throw () __attribute__ ((__nonnull__ (1))); > > > > > >struct drand48_data > { > unsigned short int __x[3]; > unsigned short int __old_x[3]; > unsigned short int __c; > unsigned short int __init; > unsigned long long int __a; > }; > > >extern int drand48_r (struct drand48_data *__restrict __buffer, > double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); >extern int erand48_r (unsigned short int __xsubi[3], > struct drand48_data *__restrict __buffer, > double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); > > >extern int lrand48_r (struct drand48_data *__restrict __buffer, > long int *__restrict __result) > throw () __attribute__ ((__nonnull__ (1, 2))); >extern int nrand48_r (unsigned short int __xsubi[3], > struct drand48_data *__restrict __buffer, > long int *__restrict __result) > throw () __attribute__ ((__nonnull__ (1, 2))); > > >extern int mrand48_r (struct drand48_data *__restrict __buffer, > long int *__restrict __result) > throw () __attribute__ ((__nonnull__ (1, 2))); >extern int jrand48_r (unsigned short int __xsubi[3], > struct drand48_data *__restrict __buffer, > long int *__restrict __result) > throw () __attribute__ ((__nonnull__ (1, 2))); > > >extern int srand48_r (long int __seedval, struct drand48_data *__buffer) > throw () __attribute__ ((__nonnull__ (2))); > >extern int seed48_r (unsigned short int __seed16v[3], > struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (1, 2))); > >extern int lcong48_r (unsigned short int __param[7], > struct drand48_data *__buffer) > throw () __attribute__ ((__nonnull__ (1, 2))); > > > > > > > > > >extern void *malloc (size_t __size) throw () __attribute__ ((__malloc__)) ; > >extern void *calloc (size_t __nmemb, size_t __size) > throw () __attribute__ ((__malloc__)) ; > > > > > > > >extern void *realloc (void *__ptr, size_t __size) > throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); > >extern void free (void *__ptr) throw (); > > > > >extern void cfree (void *__ptr) throw (); > > > ># 1 "/usr/include/alloca.h" 1 3 4 ># 25 "/usr/include/alloca.h" 3 4 ># 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/include/stddef.h" 1 3 4 ># 26 "/usr/include/alloca.h" 2 3 4 > >extern "C" { > > > > > >extern void *alloca (size_t __size) throw (); > > > > > >} ># 613 "/usr/include/stdlib.h" 2 3 4 > > > > >extern void *valloc (size_t __size) throw () __attribute__ ((__malloc__)) ; > > > > >extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) > throw () __attribute__ ((__nonnull__ (1))) ; > > > > >extern void abort (void) throw () __attribute__ ((__noreturn__)); > > > >extern int atexit (void (*__func) (void)) throw () __attribute__ ((__nonnull__ (1))); > > > > > >extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) > throw () __attribute__ ((__nonnull__ (1))); > > > > > > >extern void exit (int __status) throw () __attribute__ ((__noreturn__)); > > > > > > >extern void _Exit (int __status) throw () __attribute__ ((__noreturn__)); > > > > > > >extern char *getenv (__const char *__name) throw () __attribute__ ((__nonnull__ (1))) ; > > > > >extern char *__secure_getenv (__const char *__name) > throw () __attribute__ ((__nonnull__ (1))) ; > > > > > >extern int putenv (char *__string) throw () __attribute__ ((__nonnull__ (1))); > > > > > >extern int setenv (__const char *__name, __const char *__value, int __replace) > throw () __attribute__ ((__nonnull__ (2))); > > >extern int unsetenv (__const char *__name) throw (); > > > > > > >extern int clearenv (void) throw (); ># 698 "/usr/include/stdlib.h" 3 4 >extern char *mktemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) ; ># 709 "/usr/include/stdlib.h" 3 4 >extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) ; ># 719 "/usr/include/stdlib.h" 3 4 >extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) ; ># 729 "/usr/include/stdlib.h" 3 4 >extern char *mkdtemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) ; > > > > > > > > >extern int system (__const char *__command) ; > > > > > > >extern char *canonicalize_file_name (__const char *__name) > throw () __attribute__ ((__nonnull__ (1))) ; ># 755 "/usr/include/stdlib.h" 3 4 >extern char *realpath (__const char *__restrict __name, > char *__restrict __resolved) throw () ; > > > > > > >typedef int (*__compar_fn_t) (__const void *, __const void *); > > >typedef __compar_fn_t comparison_fn_t; > > > > > > >extern void *bsearch (__const void *__key, __const void *__base, > size_t __nmemb, size_t __size, __compar_fn_t __compar) > __attribute__ ((__nonnull__ (1, 2, 5))) ; > > > >extern void qsort (void *__base, size_t __nmemb, size_t __size, > __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4))); > > > >extern int abs (int __x) throw () __attribute__ ((__const__)) ; >extern long int labs (long int __x) throw () __attribute__ ((__const__)) ; > > > >__extension__ extern long long int llabs (long long int __x) > throw () __attribute__ ((__const__)) ; > > > > > > > >extern div_t div (int __numer, int __denom) > throw () __attribute__ ((__const__)) ; >extern ldiv_t ldiv (long int __numer, long int __denom) > throw () __attribute__ ((__const__)) ; > > > > >__extension__ extern lldiv_t lldiv (long long int __numer, > long long int __denom) > throw () __attribute__ ((__const__)) ; > ># 820 "/usr/include/stdlib.h" 3 4 >extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, > int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ; > > > > >extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, > int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ; > > > > >extern char *gcvt (double __value, int __ndigit, char *__buf) > throw () __attribute__ ((__nonnull__ (3))) ; > > > > >extern char *qecvt (long double __value, int __ndigit, > int *__restrict __decpt, int *__restrict __sign) > throw () __attribute__ ((__nonnull__ (3, 4))) ; >extern char *qfcvt (long double __value, int __ndigit, > int *__restrict __decpt, int *__restrict __sign) > throw () __attribute__ ((__nonnull__ (3, 4))) ; >extern char *qgcvt (long double __value, int __ndigit, char *__buf) > throw () __attribute__ ((__nonnull__ (3))) ; > > > > >extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, > int *__restrict __sign, char *__restrict __buf, > size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); >extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, > int *__restrict __sign, char *__restrict __buf, > size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); > >extern int qecvt_r (long double __value, int __ndigit, > int *__restrict __decpt, int *__restrict __sign, > char *__restrict __buf, size_t __len) > throw () __attribute__ ((__nonnull__ (3, 4, 5))); >extern int qfcvt_r (long double __value, int __ndigit, > int *__restrict __decpt, int *__restrict __sign, > char *__restrict __buf, size_t __len) > throw () __attribute__ ((__nonnull__ (3, 4, 5))); > > > > > > > >extern int mblen (__const char *__s, size_t __n) throw () ; > > >extern int mbtowc (wchar_t *__restrict __pwc, > __const char *__restrict __s, size_t __n) throw () ; > > >extern int wctomb (char *__s, wchar_t __wchar) throw () ; > > > >extern size_t mbstowcs (wchar_t *__restrict __pwcs, > __const char *__restrict __s, size_t __n) throw (); > >extern size_t wcstombs (char *__restrict __s, > __const wchar_t *__restrict __pwcs, size_t __n) > throw (); > > > > > > > > >extern int rpmatch (__const char *__response) throw () __attribute__ ((__nonnull__ (1))) ; ># 908 "/usr/include/stdlib.h" 3 4 >extern int getsubopt (char **__restrict __optionp, > char *__const *__restrict __tokens, > char **__restrict __valuep) > throw () __attribute__ ((__nonnull__ (1, 2, 3))) ; > > > > > >extern void setkey (__const char *__key) throw () __attribute__ ((__nonnull__ (1))); > > > > > > > >extern int posix_openpt (int __oflag) ; > > > > > > > >extern int grantpt (int __fd) throw (); > > > >extern int unlockpt (int __fd) throw (); > > > > >extern char *ptsname (int __fd) throw () ; > > > > > > >extern int ptsname_r (int __fd, char *__buf, size_t __buflen) > throw () __attribute__ ((__nonnull__ (2))); > > >extern int getpt (void); > > > > > > >extern int getloadavg (double __loadavg[], int __nelem) > throw () __attribute__ ((__nonnull__ (1))); ># 976 "/usr/include/stdlib.h" 3 4 >} ># 17 "../shared/util/util_script.cc" 2 > > >const char *RETURN_VALUE_NAME = "return"; >const char *SCRIPT_ROOT_NAME = "<root>"; > > > > > > >bool ScriptNumber::writeToFile(FILE *file, const unsigned int indent, > HierConfig *config) const >{ > fprintf(file, "%0.0f", val); > return true; >} ># 43 "../shared/util/util_script.cc" >ScriptID::ScriptID(const char *newName, const unsigned int type) > : ScriptExpr(type) >{ > avprintf(newName, "ScriptID::ScriptID(): NULL newName\n"); > name = (char *)malloc(strlen(newName) + 1); > >printf("ScriptID::ScriptID(): malloc(\"%s\") = %#x\n", newName, name); > > strcpy(name, newName); >} > >ScriptID::~ScriptID(void) >{ > >printf("ScriptID::~ScriptID(): delete(name = \"%s\")\n", name); > > delete name; >} > > > > > > >bool ScriptVar::writeToFile(FILE *file, const unsigned int indent, > HierConfig *config) const >{ > fprintf(file, "%s", name); > return true; >} > >ScriptStruct::~ScriptStruct(void) >{ > > >} > >ScriptID *ScriptStruct::resolve(const char *const sought) const >{ > >printf("resolve(\"%s\")\n", sought); > > for (HierNode *node = items; node; node = node->getSibling()) > if ((snt_var | snt_struct | snt_rout) & > ((ScriptNode *)node)->getScriptType()) { > ScriptID *id = (ScriptID *)node; > if (!strcmp(sought, id->getName())) > return id; > } > > >printf("resolve(\"%s\") FAILED\n", sought); > > return __null; >} > >bool ScriptStruct::writeToFile(FILE *file, const unsigned int indent, > HierConfig *config) const >{ > for (HierNode *node = items; node; node = node->getSibling()) { > ScriptID *id = (ScriptID *)node; > fprintf(file, "var "); > id->writeToFile(file, indent, config); > > > > > > > > fprintf(file, "\n"); > } > > return true; >} > > > > > > >void ScriptBlock::exec(void) const >{ > for (HierNode *stmt = items; stmt; stmt = stmt->getSibling()) > if (snt_stmt & ((ScriptNode *)stmt)->getScriptType()) > ((ScriptStmt *)stmt)->exec(); >} > >bool ScriptBlock::writeToFile(FILE *file, const unsigned int indent, > HierConfig *config) const >{ > for (HierNode *node = items; node; node = node->getSibling()) > node->writeToFile(file, indent, config); > return true; >} > >ScriptRoutine::ScriptRoutine(const char *name, const unsigned int type) > : ScriptStruct(name, type | snt_rout) >{ > ScriptStruct::addItem(new ScriptVar(RETURN_VALUE_NAME)); >} > >const ScriptValue ScriptRoutine::getValue(void) const >{ > exec(); > ScriptID *ret = resolve(RETURN_VALUE_NAME); > return (ret ? ret->getValue() : 0); >} > >bool ScriptRoutine::writeToFile(FILE *file, const unsigned int indent, > HierConfig *config) const >{ > ScriptStruct::writeIndent(file, indent); > fprintf(file, "{\n"); > > ScriptStruct::writeToFile(file, indent + 1, config); > ScriptBlock::writeToFile(file, indent + 1, config); > > ScriptBlock::writeIndent(file, indent); > fprintf(file, "}\n"); > return false; >} ># 175 "../shared/util/util_script.cc" >ScriptNot::ScriptNot(ScriptExpr *expr) : expr (expr) >{ > avprintf(expr, "ScriptNot::ScriptNot(): NULL expr\n"); >} > >ScriptNot::~ScriptNot(void) >{ > >printf("ScriptNot::~ScriptNot(): delete(expr = %#x)\n", expr); > > delete expr; >} > >bool ScriptNot::writeToFile(FILE *file, const unsigned int indent, > HierConfig *config) const >{ > fprintf(file, "!"); > return expr->writeToFile(file, indent, config); >} > > >ScriptNeg::ScriptNeg(ScriptExpr *expr) : expr (expr) >{ > avprintf(expr, "ScriptNot::ScriptNot(): NULL expr\n"); >} > >ScriptNeg::~ScriptNeg(void) >{ > >printf("ScriptNeg::~ScriptNeg(): delete(expr = %#x)\n", expr); > > delete expr; >} > >bool ScriptNeg::writeToFile(FILE *file, const unsigned int indent, > HierConfig *config) const >{ > fprintf(file, "-"); > return expr->writeToFile(file, indent, config); >} > > >ScriptBinaryOp::ScriptBinaryOp(ScriptExpr *left, ScriptExpr *right) > : left (left), right (right) >{ > avprintf(left , "ScriptBinaryOp::ScriptBinaryOp(): NULL left\n" ); > avprintf(right, "ScriptBinaryOp::ScriptBinaryOp(): NULL right\n"); >} > >ScriptBinaryOp::~ScriptBinaryOp(void) >{ > >printf("~ScriptBinaryOp(): delete(left = %#x, right = %#x)\n", left, right); > > delete left, right; >} ># 253 "../shared/util/util_script.cc" >const ScriptValue ScriptNotEqual::getValue(void) const { return left->getValue() != right->getValue(); } bool ScriptNotEqual::writeToFile(FILE *file, const unsigned int indent, HierConfig *config) const { fprintf(file, "("); if (!left->writeToFile(file, indent, config)) return false; fprintf(file, " " "!=" " "); if (!right->writeToFile(file, indent, config)) return false; fprintf(file, ")"); return true; }; >const ScriptValue ScriptEqual::getValue(void) const { return left->getValue() == right->getValue(); } bool ScriptEqual::writeToFile(FILE *file, const unsigned int indent, HierConfig *config) const { fprintf(file, "("); if (!left->writeToFile(file, indent, config)) return false; fprintf(file, " " "==" " "); if (!right->writeToFile(file, indent, config)) return false; fprintf(file, ")"); return true; }; >const ScriptValue ScriptLess::getValue(void) const { return left->getValue() < right->getValue(); } bool ScriptLess::writeToFile(FILE *file, const unsigned int indent, HierConfig *config) const { fprintf(file, "("); if (!left->writeToFile(file, indent, config)) return false; fprintf(file, " " "<" " "); if (!right->writeToFile(file, indent, config)) return false; fprintf(file, ")"); return true; }; >const ScriptValue ScriptGreater::getValue(void) const { return left->getValue() > right->getValue(); } bool ScriptGreater::writeToFile(FILE *file, const unsigned int indent, HierConfig *config) const { fprintf(file, "("); if (!left->writeToFile(file, indent, config)) return false; fprintf(file, " " ">" " "); if (!right->writeToFile(file, indent, config)) return false; fprintf(file, ")"); return true; }; >const ScriptValue ScriptAnd::getValue(void) const { return left->getValue() && right->getValue(); } bool ScriptAnd::writeToFile(FILE *file, const unsigned int indent, HierConfig *config) const { fprintf(file, "("); if (!left->writeToFile(file, indent, config)) return false; fprintf(file, " " "&&" " "); if (!right->writeToFile(file, indent, config)) return false; fprintf(file, ")"); return true; }; >const ScriptValue ScriptOr::getValue(void) const { return left->getValue() || right->getValue(); } bool ScriptOr::writeToFile(FILE *file, const unsigned int indent, HierConfig *config) const { fprintf(file, "("); if (!left->writeToFile(file, indent, config)) return false; fprintf(file, " " "||" " "); if (!right->writeToFile(file, indent, config)) return false; fprintf(file, ")"); return true; }; >const ScriptValue ScriptSum::getValue(void) const { return left->getValue() + right->getValue(); } bool ScriptSum::writeToFile(FILE *file, const unsigned int indent, HierConfig *config) const { fprintf(file, "("); if (!left->writeToFile(file, indent, config)) return false; fprintf(file, " " "+" " "); if (!right->writeToFile(file, indent, config)) return false; fprintf(file, ")"); return true; }; >const ScriptValue ScriptDiff::getValue(void) const { return left->getValue() - right->getValue(); } bool ScriptDiff::writeToFile(FILE *file, const unsigned int indent, HierConfig *config) const { fprintf(file, "("); if (!left->writeToFile(file, indent, config)) return false; fprintf(file, " " "-" " "); if (!right->writeToFile(file, indent, config)) return false; fprintf(file, ")"); return true; }; >const ScriptValue ScriptProduct::getValue(void) const { return left->getValue() * right->getValue(); } bool ScriptProduct::writeToFile(FILE *file, const unsigned int indent, HierConfig *config) const { fprintf(file, "("); if (!left->writeToFile(file, indent, config)) return false; fprintf(file, " " "*" " "); if (!right->writeToFile(file, indent, config)) return false; fprintf(file, ")"); return true; }; >const ScriptValue ScriptQuotient::getValue(void) const { return left->getValue() / right->getValue(); } bool ScriptQuotient::writeToFile(FILE *file, const unsigned int indent, HierConfig *config) const { fprintf(file, "("); if (!left->writeToFile(file, indent, config)) return false; fprintf(file, " " "/" " "); if (!right->writeToFile(file, indent, config)) return false; fprintf(file, ")"); return true; }; ># 273 "../shared/util/util_script.cc" >ScriptAssignOp::ScriptAssignOp(ScriptVar *left, ScriptExpr *right) > : left (left), right (right) >{ > avprintf(left , "ScriptAssignOp::ScriptAssignOp(): NULL left\n" ); > avprintf(right, "ScriptAssignOp::ScriptAssignOp(): NULL right\n"); >} > > >void ScriptAssign::exec(void) const >{ > left->setValue(right->getValue()); >} > >bool ScriptAssign::writeToFile(FILE *file, const unsigned int indent, > HierConfig *config) const >{ > writeIndent(file, indent); > > left->writeToFile(file, indent, config); > fprintf(file, " = "); > right->writeToFile(file, indent, config); > > fprintf(file, "\n"); >} ># 316 "../shared/util/util_script.cc" >void ScriptAdd::exec(void) const { left->setValue(left->getValue() + right->getValue()); } bool ScriptAdd::writeToFile(FILE *file, const unsigned int indent, HierConfig *config) const { writeIndent(file, indent); left->writeToFile(file, indent, config); fprintf(file, " " "+" "= "); right->writeToFile(file, indent, config); fprintf(file, "\n"); } >void ScriptSubtract::exec(void) const { left->setValue(left->getValue() - right->getValue()); } bool ScriptSubtract::writeToFile(FILE *file, const unsigned int indent, HierConfig *config) const { writeIndent(file, indent); left->writeToFile(file, indent, config); fprintf(file, " " "-" "= "); right->writeToFile(file, indent, config); fprintf(file, "\n"); } >void ScriptMultiply::exec(void) const { left->setValue(left->getValue() * right->getValue()); } bool ScriptMultiply::writeToFile(FILE *file, const unsigned int indent, HierConfig *config) const { writeIndent(file, indent); left->writeToFile(file, indent, config); fprintf(file, " " "*" "= "); right->writeToFile(file, indent, config); fprintf(file, "\n"); } >void ScriptDivide::exec(void) const { left->setValue(left->getValue() / right->getValue()); } bool ScriptDivide::writeToFile(FILE *file, const unsigned int indent, HierConfig *config) const { writeIndent(file, indent); left->writeToFile(file, indent, config); fprintf(file, " " "/" "= "); right->writeToFile(file, indent, config); fprintf(file, "\n"); } ># 334 "../shared/util/util_script.cc" >ScriptCond::ScriptCond(ScriptExpr *test, ScriptStmt *body) > : test (test), body (body) >{ > avprintf(test, "ScriptCond::ScriptCond(): NULL test\n"); > avprintf(body, "ScriptCond::ScriptCond(): NULL body\n"); >} > >ScriptCond::~ScriptCond(void) >{ > >printf("ScriptCond::~ScriptCond(): delete(test = %#x, body = %#x)\n", test, body); > > delete test, body; >} > > >void ScriptIf::exec(void) const >{ > if (test->getValue()) > body->exec(); > else > alternate->exec(); >} > >ScriptIf::~ScriptIf(void) >{ > if (alternate) { > >printf("ScriptIf::~ScriptIf(): delete(alternate = %#x)\n", alternate); > > delete alternate; > } >} > >bool ScriptIf::writeToFile(FILE *file, const unsigned int indent, > HierConfig *config) const >{ > writeIndent(file, indent); > fprintf(file, "if "); > if (!test->writeToFile(file, indent, config)) > return false; > fprintf(file, " {\n"); > > if (!body->writeToFile(file, indent + 1, config)) > return false; > > if (alternate) { > writeIndent(file, indent); > fprintf(file, "} else {\n"); > if (!alternate->writeToFile(file, indent + 1, config)) > return false; > } > > writeIndent(file, indent); > fprintf(file, "}\n"); > return true; >} > > >void ScriptWhile::exec(void) const >{ > while (test->getValue()) > body->exec(); >} > >bool ScriptWhile::writeToFile(FILE *file, const unsigned int indent, > HierConfig *config) const >{ > writeIndent(file, indent); > fprintf(file, ".while "); > if (!test->writeToFile(file, indent, config)) > return false; > fprintf(file, " {\n"); > > if (!body->writeToFile(file, indent + 1, config)) > return false; > > writeIndent(file, indent); > fprintf(file, "}\n"); > return true; >} > > > > > > >Script::Script(void) > : ScriptRoutine(SCRIPT_ROOT_NAME) >{ > ScriptStruct::addItem(new ScriptVar(RETURN_VALUE_NAME)); >} > >const ScriptValue Script::getValue(int argc, ScriptValue **argv) const >{ > exec(argc, argv); > ScriptID *ret = resolve(RETURN_VALUE_NAME); > return (ret ? ret->getValue() : 0); >} > >void Script::exec(int argc, ScriptValue **argv) const >{ > > ScriptBlock::exec(); >} ># 448 "../shared/util/util_script.cc" >enum ParseError { > pe_none, > pe_eof, > pe_error, > pe_unimplemented, > pe_disabled, > pe_internal, > pe_bad_context, > pe_bad_definition, > pe_bad_statement, > pe_bad_expression, > pe_expected_lbrace, > pe_expected_rparen, > pe_expected_keyword, > pe_bad_keyword, > pe_expected_left_val, > pe_bad_left_val, > pe_unexpected_left_val, > pe_bad_right_val, > pe_bad_operator, > pe_bad_number, > pe_bad_identifier, > pe_last >}; > >enum TokenType { > tok_newline, > > > > > tok_if, > tok_else, > tok_while, > tok_for, > > tok_leftbrace, > tok_rightbrace, > tok_leftparen, > tok_rightparen, > tok_comma, > > tok_exclaim, > tok_notequal, > tok_equalequal, > tok_less, > tok_greater, > tok_notless, > tok_notgreater, > tok_amper, > tok_bar, > tok_plus, > tok_hyphen, > tok_star, > tok_slash, > tok_percent, > > tok_equal, > tok_plusequal, > tok_hyphenequal, > tok_starequal, > tok_slashequal, > tok_percentequal, > > tok_number, > tok_string, > tok_period, > tok_none >}; > > > > > > >static const ScriptValue SCRIPT_BAD_NUM = (ScriptValue)-1; >struct ParseToken { > ParseToken *sibling; > > const TokenType type; > union { > ScriptValue num; > char *str; > }; > > ParseToken(const TokenType type, const char *token=__null, const int len=0); > ~ParseToken(void); >}; > >ParseToken::ParseToken(const TokenType type, const char *token, const int len) > : sibling (__null), type (type) >{ > switch (type) { > case tok_number: > num = atof(token); > break; > > case tok_string: > if (str = (char *)malloc(len + 1)) { > strncpy(str, token, len); > str[len] = '\0'; > } > break; > > default: > str = __null; > break; > } >} > >ParseToken::~ParseToken(void) >{ > if (sibling) { > > > > delete sibling; > } > if (tok_string == type) { > >printf("ParseToken::~ParseToken(): delete(str = %#x)\n", str); > > delete str; > } >} > > > > >static ParseError ParseSctToken(ParseToken **tok, char **read, > HierConfig *config) >{ > *tok = __null; > > > while (**read == '#' || **read == ' ' || **read == '\t') { > if (**read == '#') > while (++*read && **read != '#'); > ++*read; > } > > switch ((*read)[0]) { > case '\0': return pe_eof; > case '\n': ++*read; *tok = new ParseToken(tok_newline); break; > > case '{': ++*read; *tok = new ParseToken(tok_leftbrace ); break; > case '}': ++*read; *tok = new ParseToken(tok_rightbrace); break; > case '(': ++*read; *tok = new ParseToken(tok_leftparen ); break; > case ')': ++*read; *tok = new ParseToken(tok_rightparen); break; > case ',': ++*read; *tok = new ParseToken(tok_comma ); break; > case '&': ++*read; *tok = new ParseToken(tok_amper ); break; > case '|': ++*read; *tok = new ParseToken(tok_bar ); break; > case '.': ++*read; *tok = new ParseToken(tok_period ); break; > > case '<': case '>': > case '!': case '=': > case '+': case '-': > case '*': case '/': case '%': > switch ((*read)[1]) { > case '=': switch ((*read)[0]) { > case '<': *tok = new ParseToken(tok_notgreater ); break; > case '>': *tok = new ParseToken(tok_notless ); break; > case '!': *tok = new ParseToken(tok_notequal ); break; > case '=': *tok = new ParseToken(tok_equalequal ); break; > case '+': *tok = new ParseToken(tok_plusequal ); break; > case '-': *tok = new ParseToken(tok_hyphenequal ); break; > case '*': *tok = new ParseToken(tok_starequal ); break; > case '/': *tok = new ParseToken(tok_slashequal ); break; > case '%': *tok = new ParseToken(tok_percentequal); break; > } ++*read; > break; > default: switch ((*read)[0]) { > case '<': *tok = new ParseToken(tok_less ); break; > case '>': *tok = new ParseToken(tok_greater); break; > case '!': *tok = new ParseToken(tok_exclaim); break; > case '=': *tok = new ParseToken(tok_equal ); break; > case '+': *tok = new ParseToken(tok_plus ); break; > case '-': *tok = new ParseToken(tok_hyphen ); break; > case '*': *tok = new ParseToken(tok_star ); break; > case '/': *tok = new ParseToken(tok_slash ); break; > case '%': *tok = new ParseToken(tok_percent); break; > } break; > } > if (!*tok) > return pe_bad_operator; > ++*read; > break; > > default: > if ('0' <= **read && **read <= '9') { > const char *tok_str = *read; > if ((*read)[0] == '0' && ((*read)[1] == 'x' || > (*read)[1] == 'X')) > ++*read; > while ('0' <= *++*read && **read <= '9'); > *tok = new ParseToken(tok_number, tok_str, *read - tok_str); > if (SCRIPT_BAD_NUM == (*tok)->num) > return pe_bad_number; > break; > > } else if (('A' <= **read && **read <= 'Z') || > ('a' <= **read && **read <= 'z')) { > const char *tok_str = *read; > while (*++*read == '_' || > ('0' <= **read && **read <= '9') || > ('A' <= **read && **read <= 'Z') || > ('a' <= **read && **read <= 'z')); > int len = *read - tok_str; > > switch (len) { > case 2: > if (!strncmp("if", tok_str, 2)) > *tok = new ParseToken(tok_if); > break; > case 3: > > > > > > if (!strncmp("for", tok_str, 3)) > *tok = new ParseToken(tok_for); > break; > case 4: > if (!strncmp("else", tok_str, 4)) > *tok = new ParseToken(tok_else); > break; > case 5: > if (!strncmp("while", tok_str, 5)) > *tok = new ParseToken(tok_while); > break; > } > if (!*tok) > *tok = new ParseToken(tok_string, tok_str, len); > break; > } > return pe_bad_keyword; > } > > return (*tok ? pe_none : pe_internal); >} > > > > > > >static struct ParseContext { > ScriptStruct *node; > ParseContext *parent; > ParseContext(ScriptStruct *node, ParseContext *const parent) > : node (node), parent (parent) { } >} *context = __null; > >static void PushContext(ScriptStruct *node) >{ > ParseContext *add = new ParseContext(node, context); > context = add; >} > >static void PopContext(void) >{ > ParseContext *rem = context; > context = context->parent; > delete rem; >} > >static ScriptID *ResolveRef(const char *const name) >{ > >printf("ResolveRef(\"%s\")\n", name); > > ScriptID *ref = __null; > for (ParseContext *seek = context; seek && !ref; seek = seek->parent) > ref = seek->node->resolve(name); > return ref; >} > >static ScriptID *ResolveOrCreate(ParseToken **tok) >{ > >printf("ResolveOrCreate(\"%s\")\n", (*tok)->str); > > ScriptID *ref; > if (ref = ResolveRef((*tok)->str)) > return ref; > > if (!(*tok)->sibling || > (*tok)->sibling->type == tok_newline || > (*tok)->sibling->type == tok_comma || > (*tok)->sibling->type == tok_equal) { > ref = new ScriptVar((*tok)->str); > context->node->addItem(ref); ># 753 "../shared/util/util_script.cc" > } > > return ref; >} > > > > > > >static int OpPrecedence(TokenType op) >{ > switch (op) { > case tok_leftparen: > return 7; > > case tok_exclaim: > return 6; > > case tok_period: > return 5; > > case tok_star: > case tok_slash: > case tok_percent: > return 4; > > case tok_plus: > case tok_hyphen: > return 3; > > case tok_notequal: > case tok_equalequal: > case tok_less: > case tok_greater: > case tok_notless: > case tok_notgreater: > return 2; > > case tok_amper: > case tok_bar: > return 1; > > case tok_rightparen: > default: > return 0; > } >} > >static ParseError BinOpNode(ScriptExpr **node, ScriptExpr *left, TokenType op, > ScriptExpr *right) >{ > switch (op) { > case tok_notequal: *node = new ScriptNotEqual(left, right); break; > case tok_equalequal: *node = new ScriptEqual (left, right); break; > case tok_less: *node = new ScriptLess (left, right); break; > case tok_greater: *node = new ScriptGreater (left, right); break; > case tok_amper: *node = new ScriptAnd (left, right); break; > case tok_bar: *node = new ScriptOr (left, right); break; > case tok_plus: *node = new ScriptSum (left, right); break; > case tok_hyphen: *node = new ScriptDiff (left, right); break; > case tok_star: *node = new ScriptProduct (left, right); break; > case tok_slash: *node = new ScriptQuotient(left, right); break; > > > > case tok_notless: > case tok_notgreater: > if (tok_notgreater == op) *node = new ScriptLess (right, left); > else if (tok_notless == op) *node = new ScriptGreater(right, left); > *node = new ScriptNot(*node); > break; > default: return pe_internal; > } > return pe_none; >} > >static ParseError ParseExpr(ScriptExpr **expr, ParseToken **tok, > TokenType op = tok_none, ScriptExpr *left=__null) >{ > >printf("ParseExpr(%d)\n", (*tok)->type); > > int next_prec = -1, this_prec = OpPrecedence(op); > ScriptExpr *right; > do { > switch ((*tok)->type) { > case tok_leftparen: > >printf("=== LEFTPAREN\n"); > > if (!(*tok = (*tok)->sibling)) > return pe_bad_expression; > if (pe_none != ParseExpr(&right, tok)) > return (right ? pe_internal : pe_bad_expression); > if (!(*tok && tok_rightparen == (*tok)->type)) > return pe_expected_rparen; > *tok = (*tok)->sibling; > break; > > case tok_exclaim: > case tok_hyphen: { > >printf("=== UNARY\n"); > > ScriptExpr *operand; > op = (*tok)->type; > if (!(*tok = (*tok)->sibling)) > return pe_bad_right_val; > > > > > if (pe_none != ParseExpr(&operand, tok, tok_exclaim)) > return (operand ? pe_internal : pe_bad_expression); > if (tok_exclaim == op) > right = new ScriptNot(operand); > else > right = new ScriptNeg(operand); > } break; > > case tok_number: > >printf("=== NUMBER (%0.0f)\n", (*tok)->num); > > right = new ScriptNumber((*tok)->num); > *tok = (*tok)->sibling; > break; > > case tok_string: > >printf("=== STRING\n"); > > if (tok_period == op) { > if (!(left && (snt_struct & left->getScriptType()))) > return pe_bad_identifier; > right = ((ScriptStruct *)left)->resolve((*tok)->str); > left = __null; > } else > right = ResolveRef((*tok)->str); > *tok = (*tok)->sibling; > break; > > default: > return pe_bad_expression; > } > > > if (this_prec < OpPrecedence(tok_exclaim)) > while (*tok && this_prec < (next_prec = > OpPrecedence((*tok)->type))) > if (pe_none != ParseExpr(&right, tok, (*tok)->type, right)) > return pe_bad_expression; > > if (!left) > left = right; > else { > >printf("=== BINOP\n"); > > if (pe_none != BinOpNode(&left, left, op, right)) > return pe_bad_expression; ># 926 "../shared/util/util_script.cc" > if (*tok) > op = (*tok)->type; > } > > > > > } while (*tok && this_prec && this_prec == next_prec); > > *expr = left; > return pe_none; >} ># 987 "../shared/util/util_script.cc" >static ParseError ParseAssignment(ScriptAssignOp **assign, > ScriptVar *const left, ParseToken **tok) >{ > >printf("ParseAssignment(%d)\n", (*tok)->type); > > TokenType op = (*tok)->type; > if (!(*tok = (*tok)->sibling)) > return pe_bad_statement; > > ScriptExpr *expr; > if (pe_none != ParseExpr(&expr, tok)) > return (expr ? pe_internal : pe_bad_expression); > > switch (op) { > case tok_equal: *assign = new ScriptAssign (left, expr); break; > case tok_plusequal: *assign = new ScriptAdd (left, expr); break; > case tok_hyphenequal: *assign = new ScriptSubtract(left, expr); break; > case tok_starequal: *assign = new ScriptMultiply(left, expr); break; > case tok_slashequal: *assign = new ScriptDivide (left, expr); break; > > > > } > > return pe_none; >} > >static ParseError ParseStmt(ScriptStmt **stmt, ParseToken **tok) >{ > >printf("ParseStmt(%d)\n", (*tok)->type); > > switch ((*tok)->type) { ># 1064 "../shared/util/util_script.cc" > case tok_string: { > > ScriptID *left = ResolveOrCreate(tok); > if (!left) > return pe_bad_identifier; > > if (!(*tok = (*tok)->sibling) || > (*tok)->type == tok_newline || > (*tok)->type == tok_comma) > return pe_none; > while (tok_period == (*tok)->type) { > if (!(*tok = (*tok)->sibling)) > return pe_bad_statement; > if (!(snt_struct & left->getScriptType())) > return pe_bad_identifier; > if (!(left = ((ScriptStruct *)left)->resolve((*tok)->str))) > return pe_bad_identifier; > if (!(*tok = (*tok)->sibling)) > return pe_bad_statement; > } > > switch ((*tok)->type) { > case tok_equal: > case tok_plusequal: > case tok_hyphenequal: > case tok_starequal: > case tok_slashequal: > case tok_percentequal: > if (pe_none != ParseAssignment((ScriptAssignOp **)stmt, > (ScriptVar *)left, tok)) > return (*stmt ? pe_internal : pe_bad_identifier); > break; > > default: > return pe_bad_keyword; > } > } break; > > case tok_newline: > case tok_comma: > >printf("=== NEWLINE or COMMA\n"); > > break; > > default: > return pe_bad_keyword; > } > > if ((*tok)->type != tok_newline && > (*tok)->type != tok_comma) > return pe_bad_statement; > *tok = (*tok)->sibling; > return pe_none; >} ># 1152 "../shared/util/util_script.cc" >bool Script::readFromStr(char **read, char **scratch, HierConfig *config) >{ > ParseToken *tokens = __null; > while (**read) { > ParseToken *last, *tok; > > ParseError ret; > if (pe_eof == (ret = ParseSctToken(&tok, read, config))) > break; > else if (pe_none != ret) { > if (tokens) > delete tokens; > return false; > } > > if (!tokens) > last = tokens = tok; > else > last = last->sibling = tok; > } > if (!tokens) > return true; > > PushContext(this); > for (ParseToken *ptr = tokens; ptr; ) { > ScriptStmt *stmt; > if (pe_none != ParseStmt(&stmt, &ptr)) { > PopContext(); > delete tokens; > return false; > } > ScriptBlock::addItem(stmt); > } > PopContext(); > > delete tokens; > return true; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 249592
: 174055