# 1 "regex.c" # 1 "/var/tmp/portage/glibc-2.5/work/glibc-2.5/posix//" # 1 "" # 1 "" # 1 "./../include/libc-symbols.h" 1 # 55 "./../include/libc-symbols.h" # 1 "/var/tmp/portage/glibc-2.5/work/build-default-hppa2.0-unknown-linux-gnu-nptl/config.h" 1 # 56 "./../include/libc-symbols.h" 2 # 824 "./../include/libc-symbols.h" # 1 "../sysdeps/wordsize-32/symbol-hacks.h" 1 # 825 "./../include/libc-symbols.h" 2 # 1 "" 2 # 1 "regex.c" # 52 "regex.c" # 1 "../locale/localeinfo.h" 1 # 23 "../locale/localeinfo.h" # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 152 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 3 4 typedef int ptrdiff_t; # 214 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 3 4 typedef unsigned int size_t; # 326 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 3 4 typedef long int wchar_t; # 24 "../locale/localeinfo.h" 2 # 1 "../include/langinfo.h" 1 # 1 "../locale/langinfo.h" 1 # 24 "../locale/langinfo.h" # 1 "../include/nl_types.h" 1 # 1 "../catgets/nl_types.h" 1 # 22 "../catgets/nl_types.h" # 1 "../include/features.h" 1 # 323 "../include/features.h" # 1 "../include/sys/cdefs.h" 1 # 1 "../misc/sys/cdefs.h" 1 # 313 "../misc/sys/cdefs.h" # 1 "../sysdeps/wordsize-32/bits/wordsize.h" 1 # 314 "../misc/sys/cdefs.h" 2 # 4 "../include/sys/cdefs.h" 2 extern void __chk_fail (void) __attribute__ ((__noreturn__)); # 324 "../include/features.h" 2 # 346 "../include/features.h" # 1 "../include/gnu/stubs.h" 1 # 347 "../include/features.h" 2 # 23 "../catgets/nl_types.h" 2 # 31 "../catgets/nl_types.h" typedef void *nl_catd; typedef int nl_item; extern nl_catd catopen (__const char *__cat_name, int __flag) __attribute__ ((__nonnull__ (1))); extern char *catgets (nl_catd __catalog, int __set, int __number, __const char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int catclose (nl_catd __catalog) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); # 1 "../include/nl_types.h" 2 # 25 "../locale/langinfo.h" 2 # 1 "../include/bits/locale.h" 1 # 1 "../locale/bits/locale.h" 1 # 27 "../locale/bits/locale.h" enum { __LC_CTYPE = 0, __LC_NUMERIC = 1, __LC_TIME = 2, __LC_COLLATE = 3, __LC_MONETARY = 4, __LC_MESSAGES = 5, __LC_ALL = 6, __LC_PAPER = 7, __LC_NAME = 8, __LC_ADDRESS = 9, __LC_TELEPHONE = 10, __LC_MEASUREMENT = 11, __LC_IDENTIFICATION = 12 }; # 1 "../include/bits/locale.h" 2 # 27 "../locale/langinfo.h" 2 # 42 "../locale/langinfo.h" enum { ABDAY_1 = (((__LC_TIME) << 16) | (0)), ABDAY_2, ABDAY_3, ABDAY_4, ABDAY_5, ABDAY_6, ABDAY_7, DAY_1, DAY_2, DAY_3, DAY_4, DAY_5, DAY_6, DAY_7, ABMON_1, ABMON_2, ABMON_3, ABMON_4, ABMON_5, ABMON_6, ABMON_7, ABMON_8, ABMON_9, ABMON_10, ABMON_11, ABMON_12, MON_1, MON_2, MON_3, MON_4, MON_5, MON_6, MON_7, MON_8, MON_9, MON_10, MON_11, MON_12, AM_STR, PM_STR, D_T_FMT, D_FMT, T_FMT, T_FMT_AMPM, ERA, __ERA_YEAR, ERA_D_FMT, ALT_DIGITS, ERA_D_T_FMT, ERA_T_FMT, _NL_TIME_ERA_NUM_ENTRIES, _NL_TIME_ERA_ENTRIES, _NL_WABDAY_1, _NL_WABDAY_2, _NL_WABDAY_3, _NL_WABDAY_4, _NL_WABDAY_5, _NL_WABDAY_6, _NL_WABDAY_7, _NL_WDAY_1, _NL_WDAY_2, _NL_WDAY_3, _NL_WDAY_4, _NL_WDAY_5, _NL_WDAY_6, _NL_WDAY_7, _NL_WABMON_1, _NL_WABMON_2, _NL_WABMON_3, _NL_WABMON_4, _NL_WABMON_5, _NL_WABMON_6, _NL_WABMON_7, _NL_WABMON_8, _NL_WABMON_9, _NL_WABMON_10, _NL_WABMON_11, _NL_WABMON_12, _NL_WMON_1, _NL_WMON_2, _NL_WMON_3, _NL_WMON_4, _NL_WMON_5, _NL_WMON_6, _NL_WMON_7, _NL_WMON_8, _NL_WMON_9, _NL_WMON_10, _NL_WMON_11, _NL_WMON_12, _NL_WAM_STR, _NL_WPM_STR, _NL_WD_T_FMT, _NL_WD_FMT, _NL_WT_FMT, _NL_WT_FMT_AMPM, _NL_WERA_YEAR, _NL_WERA_D_FMT, _NL_WALT_DIGITS, _NL_WERA_D_T_FMT, _NL_WERA_T_FMT, _NL_TIME_WEEK_NDAYS, _NL_TIME_WEEK_1STDAY, _NL_TIME_WEEK_1STWEEK, _NL_TIME_FIRST_WEEKDAY, _NL_TIME_FIRST_WORKDAY, _NL_TIME_CAL_DIRECTION, _NL_TIME_TIMEZONE, _DATE_FMT, _NL_W_DATE_FMT, _NL_TIME_CODESET, _NL_NUM_LC_TIME, _NL_COLLATE_NRULES = (((__LC_COLLATE) << 16) | (0)), _NL_COLLATE_RULESETS, _NL_COLLATE_TABLEMB, _NL_COLLATE_WEIGHTMB, _NL_COLLATE_EXTRAMB, _NL_COLLATE_INDIRECTMB, _NL_COLLATE_GAP1, _NL_COLLATE_GAP2, _NL_COLLATE_GAP3, _NL_COLLATE_TABLEWC, _NL_COLLATE_WEIGHTWC, _NL_COLLATE_EXTRAWC, _NL_COLLATE_INDIRECTWC, _NL_COLLATE_SYMB_HASH_SIZEMB, _NL_COLLATE_SYMB_TABLEMB, _NL_COLLATE_SYMB_EXTRAMB, _NL_COLLATE_COLLSEQMB, _NL_COLLATE_COLLSEQWC, _NL_COLLATE_CODESET, _NL_NUM_LC_COLLATE, _NL_CTYPE_CLASS = (((__LC_CTYPE) << 16) | (0)), _NL_CTYPE_TOUPPER, _NL_CTYPE_GAP1, _NL_CTYPE_TOLOWER, _NL_CTYPE_GAP2, _NL_CTYPE_CLASS32, _NL_CTYPE_GAP3, _NL_CTYPE_GAP4, _NL_CTYPE_GAP5, _NL_CTYPE_GAP6, _NL_CTYPE_CLASS_NAMES, _NL_CTYPE_MAP_NAMES, _NL_CTYPE_WIDTH, _NL_CTYPE_MB_CUR_MAX, _NL_CTYPE_CODESET_NAME, CODESET = _NL_CTYPE_CODESET_NAME, _NL_CTYPE_TOUPPER32, _NL_CTYPE_TOLOWER32, _NL_CTYPE_CLASS_OFFSET, _NL_CTYPE_MAP_OFFSET, _NL_CTYPE_INDIGITS_MB_LEN, _NL_CTYPE_INDIGITS0_MB, _NL_CTYPE_INDIGITS1_MB, _NL_CTYPE_INDIGITS2_MB, _NL_CTYPE_INDIGITS3_MB, _NL_CTYPE_INDIGITS4_MB, _NL_CTYPE_INDIGITS5_MB, _NL_CTYPE_INDIGITS6_MB, _NL_CTYPE_INDIGITS7_MB, _NL_CTYPE_INDIGITS8_MB, _NL_CTYPE_INDIGITS9_MB, _NL_CTYPE_INDIGITS_WC_LEN, _NL_CTYPE_INDIGITS0_WC, _NL_CTYPE_INDIGITS1_WC, _NL_CTYPE_INDIGITS2_WC, _NL_CTYPE_INDIGITS3_WC, _NL_CTYPE_INDIGITS4_WC, _NL_CTYPE_INDIGITS5_WC, _NL_CTYPE_INDIGITS6_WC, _NL_CTYPE_INDIGITS7_WC, _NL_CTYPE_INDIGITS8_WC, _NL_CTYPE_INDIGITS9_WC, _NL_CTYPE_OUTDIGIT0_MB, _NL_CTYPE_OUTDIGIT1_MB, _NL_CTYPE_OUTDIGIT2_MB, _NL_CTYPE_OUTDIGIT3_MB, _NL_CTYPE_OUTDIGIT4_MB, _NL_CTYPE_OUTDIGIT5_MB, _NL_CTYPE_OUTDIGIT6_MB, _NL_CTYPE_OUTDIGIT7_MB, _NL_CTYPE_OUTDIGIT8_MB, _NL_CTYPE_OUTDIGIT9_MB, _NL_CTYPE_OUTDIGIT0_WC, _NL_CTYPE_OUTDIGIT1_WC, _NL_CTYPE_OUTDIGIT2_WC, _NL_CTYPE_OUTDIGIT3_WC, _NL_CTYPE_OUTDIGIT4_WC, _NL_CTYPE_OUTDIGIT5_WC, _NL_CTYPE_OUTDIGIT6_WC, _NL_CTYPE_OUTDIGIT7_WC, _NL_CTYPE_OUTDIGIT8_WC, _NL_CTYPE_OUTDIGIT9_WC, _NL_CTYPE_TRANSLIT_TAB_SIZE, _NL_CTYPE_TRANSLIT_FROM_IDX, _NL_CTYPE_TRANSLIT_FROM_TBL, _NL_CTYPE_TRANSLIT_TO_IDX, _NL_CTYPE_TRANSLIT_TO_TBL, _NL_CTYPE_TRANSLIT_DEFAULT_MISSING_LEN, _NL_CTYPE_TRANSLIT_DEFAULT_MISSING, _NL_CTYPE_TRANSLIT_IGNORE_LEN, _NL_CTYPE_TRANSLIT_IGNORE, _NL_CTYPE_MAP_TO_NONASCII, _NL_CTYPE_EXTRA_MAP_1, _NL_CTYPE_EXTRA_MAP_2, _NL_CTYPE_EXTRA_MAP_3, _NL_CTYPE_EXTRA_MAP_4, _NL_CTYPE_EXTRA_MAP_5, _NL_CTYPE_EXTRA_MAP_6, _NL_CTYPE_EXTRA_MAP_7, _NL_CTYPE_EXTRA_MAP_8, _NL_CTYPE_EXTRA_MAP_9, _NL_CTYPE_EXTRA_MAP_10, _NL_CTYPE_EXTRA_MAP_11, _NL_CTYPE_EXTRA_MAP_12, _NL_CTYPE_EXTRA_MAP_13, _NL_CTYPE_EXTRA_MAP_14, _NL_NUM_LC_CTYPE, __INT_CURR_SYMBOL = (((__LC_MONETARY) << 16) | (0)), __CURRENCY_SYMBOL, __MON_DECIMAL_POINT, __MON_THOUSANDS_SEP, __MON_GROUPING, __POSITIVE_SIGN, __NEGATIVE_SIGN, __INT_FRAC_DIGITS, __FRAC_DIGITS, __P_CS_PRECEDES, __P_SEP_BY_SPACE, __N_CS_PRECEDES, __N_SEP_BY_SPACE, __P_SIGN_POSN, __N_SIGN_POSN, _NL_MONETARY_CRNCYSTR, __INT_P_CS_PRECEDES, __INT_P_SEP_BY_SPACE, __INT_N_CS_PRECEDES, __INT_N_SEP_BY_SPACE, __INT_P_SIGN_POSN, __INT_N_SIGN_POSN, _NL_MONETARY_DUO_INT_CURR_SYMBOL, _NL_MONETARY_DUO_CURRENCY_SYMBOL, _NL_MONETARY_DUO_INT_FRAC_DIGITS, _NL_MONETARY_DUO_FRAC_DIGITS, _NL_MONETARY_DUO_P_CS_PRECEDES, _NL_MONETARY_DUO_P_SEP_BY_SPACE, _NL_MONETARY_DUO_N_CS_PRECEDES, _NL_MONETARY_DUO_N_SEP_BY_SPACE, _NL_MONETARY_DUO_INT_P_CS_PRECEDES, _NL_MONETARY_DUO_INT_P_SEP_BY_SPACE, _NL_MONETARY_DUO_INT_N_CS_PRECEDES, _NL_MONETARY_DUO_INT_N_SEP_BY_SPACE, _NL_MONETARY_DUO_P_SIGN_POSN, _NL_MONETARY_DUO_N_SIGN_POSN, _NL_MONETARY_DUO_INT_P_SIGN_POSN, _NL_MONETARY_DUO_INT_N_SIGN_POSN, _NL_MONETARY_UNO_VALID_FROM, _NL_MONETARY_UNO_VALID_TO, _NL_MONETARY_DUO_VALID_FROM, _NL_MONETARY_DUO_VALID_TO, _NL_MONETARY_CONVERSION_RATE, _NL_MONETARY_DECIMAL_POINT_WC, _NL_MONETARY_THOUSANDS_SEP_WC, _NL_MONETARY_CODESET, _NL_NUM_LC_MONETARY, __DECIMAL_POINT = (((__LC_NUMERIC) << 16) | (0)), RADIXCHAR = __DECIMAL_POINT, __THOUSANDS_SEP, THOUSEP = __THOUSANDS_SEP, __GROUPING, _NL_NUMERIC_DECIMAL_POINT_WC, _NL_NUMERIC_THOUSANDS_SEP_WC, _NL_NUMERIC_CODESET, _NL_NUM_LC_NUMERIC, __YESEXPR = (((__LC_MESSAGES) << 16) | (0)), __NOEXPR, __YESSTR, __NOSTR, _NL_MESSAGES_CODESET, _NL_NUM_LC_MESSAGES, _NL_PAPER_HEIGHT = (((__LC_PAPER) << 16) | (0)), _NL_PAPER_WIDTH, _NL_PAPER_CODESET, _NL_NUM_LC_PAPER, _NL_NAME_NAME_FMT = (((__LC_NAME) << 16) | (0)), _NL_NAME_NAME_GEN, _NL_NAME_NAME_MR, _NL_NAME_NAME_MRS, _NL_NAME_NAME_MISS, _NL_NAME_NAME_MS, _NL_NAME_CODESET, _NL_NUM_LC_NAME, _NL_ADDRESS_POSTAL_FMT = (((__LC_ADDRESS) << 16) | (0)), _NL_ADDRESS_COUNTRY_NAME, _NL_ADDRESS_COUNTRY_POST, _NL_ADDRESS_COUNTRY_AB2, _NL_ADDRESS_COUNTRY_AB3, _NL_ADDRESS_COUNTRY_CAR, _NL_ADDRESS_COUNTRY_NUM, _NL_ADDRESS_COUNTRY_ISBN, _NL_ADDRESS_LANG_NAME, _NL_ADDRESS_LANG_AB, _NL_ADDRESS_LANG_TERM, _NL_ADDRESS_LANG_LIB, _NL_ADDRESS_CODESET, _NL_NUM_LC_ADDRESS, _NL_TELEPHONE_TEL_INT_FMT = (((__LC_TELEPHONE) << 16) | (0)), _NL_TELEPHONE_TEL_DOM_FMT, _NL_TELEPHONE_INT_SELECT, _NL_TELEPHONE_INT_PREFIX, _NL_TELEPHONE_CODESET, _NL_NUM_LC_TELEPHONE, _NL_MEASUREMENT_MEASUREMENT = (((__LC_MEASUREMENT) << 16) | (0)), _NL_MEASUREMENT_CODESET, _NL_NUM_LC_MEASUREMENT, _NL_IDENTIFICATION_TITLE = (((__LC_IDENTIFICATION) << 16) | (0)), _NL_IDENTIFICATION_SOURCE, _NL_IDENTIFICATION_ADDRESS, _NL_IDENTIFICATION_CONTACT, _NL_IDENTIFICATION_EMAIL, _NL_IDENTIFICATION_TEL, _NL_IDENTIFICATION_FAX, _NL_IDENTIFICATION_LANGUAGE, _NL_IDENTIFICATION_TERRITORY, _NL_IDENTIFICATION_AUDIENCE, _NL_IDENTIFICATION_APPLICATION, _NL_IDENTIFICATION_ABBREVIATION, _NL_IDENTIFICATION_REVISION, _NL_IDENTIFICATION_DATE, _NL_IDENTIFICATION_CATEGORY, _NL_IDENTIFICATION_CODESET, _NL_NUM_LC_IDENTIFICATION, _NL_NUM }; # 582 "../locale/langinfo.h" extern char *nl_langinfo (nl_item __item) __attribute__ ((__nothrow__)); # 1 "../include/xlocale.h" 1 # 1 "../locale/xlocale.h" 1 # 28 "../locale/xlocale.h" 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; # 1 "../include/xlocale.h" 2 # 591 "../locale/langinfo.h" 2 extern char *nl_langinfo_l (nl_item __item, __locale_t l); # 4 "../include/langinfo.h" 2 extern __typeof (nl_langinfo_l) __nl_langinfo_l; # 25 "../locale/localeinfo.h" 2 # 1 "../include/limits.h" 1 # 125 "../include/limits.h" # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/limits.h" 1 3 4 # 126 "../include/limits.h" 2 # 145 "../include/limits.h" # 1 "../include/bits/posix1_lim.h" 1 # 1 "../posix/bits/posix1_lim.h" 1 # 153 "../posix/bits/posix1_lim.h" # 1 "../nptl/sysdeps/unix/sysv/linux/bits/local_lim.h" 1 # 36 "../nptl/sysdeps/unix/sysv/linux/bits/local_lim.h" # 1 "/usr/include/linux/limits.h" 1 3 4 # 37 "../nptl/sysdeps/unix/sysv/linux/bits/local_lim.h" 2 # 154 "../posix/bits/posix1_lim.h" 2 # 1 "../include/bits/posix1_lim.h" 2 # 146 "../include/limits.h" 2 # 1 "../include/bits/posix2_lim.h" 1 # 1 "../posix/bits/posix2_lim.h" 1 # 1 "../include/bits/posix2_lim.h" 2 # 150 "../include/limits.h" 2 # 1 "../include/bits/xopen_lim.h" 1 # 34 "../include/bits/xopen_lim.h" # 1 "/var/tmp/portage/glibc-2.5/work/build-default-hppa2.0-unknown-linux-gnu-nptl/bits/stdio_lim.h" 1 # 35 "../include/bits/xopen_lim.h" 2 # 154 "../include/limits.h" 2 # 26 "../locale/localeinfo.h" 2 # 1 "../include/locale.h" 1 # 1 "../locale/locale.h" 1 # 29 "../locale/locale.h" # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 30 "../locale/locale.h" 2 # 1 "../include/bits/locale.h" 1 # 1 "../locale/bits/locale.h" 1 # 1 "../include/bits/locale.h" 2 # 31 "../locale/locale.h" 2 # 52 "../locale/locale.h" struct lconv { char *decimal_point; char *thousands_sep; char *grouping; char *int_curr_symbol; char *currency_symbol; char *mon_decimal_point; char *mon_thousands_sep; char *mon_grouping; char *positive_sign; char *negative_sign; char int_frac_digits; char frac_digits; char p_cs_precedes; char p_sep_by_space; char n_cs_precedes; char n_sep_by_space; char p_sign_posn; char n_sign_posn; char int_p_cs_precedes; char int_p_sep_by_space; char int_n_cs_precedes; char int_n_sep_by_space; char int_p_sign_posn; char int_n_sign_posn; # 119 "../locale/locale.h" }; extern char *setlocale (int __category, __const char *__locale) __attribute__ ((__nothrow__)); extern struct lconv *localeconv (void) __attribute__ ((__nothrow__)); # 146 "../locale/locale.h" # 1 "../include/xlocale.h" 1 # 147 "../locale/locale.h" 2 typedef __locale_t locale_t; extern __locale_t newlocale (int __category_mask, __const char *__locale, __locale_t __base) __attribute__ ((__nothrow__)); # 189 "../locale/locale.h" extern __locale_t duplocale (__locale_t __dataset) __attribute__ ((__nothrow__)); extern void freelocale (__locale_t __dataset) __attribute__ ((__nothrow__)); extern __locale_t uselocale (__locale_t __dataset) __attribute__ ((__nothrow__)); # 3 "../include/locale.h" 2 extern __typeof (uselocale) __uselocale; extern struct loaded_l10nfile *_nl_locale_file_list[] ; extern const struct __locale_struct _nl_C_locobj ; extern struct lconv *__localeconv (void); extern const char *__current_locale_name (int category) ; # 27 "../locale/localeinfo.h" 2 # 1 "../include/time.h" 1 # 1 "../time/time.h" 1 # 31 "../time/time.h" # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 40 "../time/time.h" 2 # 1 "../bits/time.h" 1 # 44 "../time/time.h" 2 # 57 "../time/time.h" # 1 "../bits/types.h" 1 # 28 "../bits/types.h" # 1 "../sysdeps/wordsize-32/bits/wordsize.h" 1 # 29 "../bits/types.h" 2 # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 32 "../bits/types.h" 2 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 "../bits/types.h" # 1 "../bits/typesizes.h" 1 # 135 "../bits/types.h" 2 __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; # 58 "../time/time.h" 2 typedef __clock_t clock_t; # 75 "../time/time.h" typedef __time_t time_t; # 93 "../time/time.h" typedef __clockid_t clockid_t; # 105 "../time/time.h" typedef __timer_t timer_t; # 121 "../time/time.h" struct timespec { __time_t tv_sec; long int tv_nsec; }; struct tm { int tm_sec; int tm_min; int tm_hour; int tm_mday; int tm_mon; int tm_year; int tm_wday; int tm_yday; int tm_isdst; long int tm_gmtoff; __const char *tm_zone; }; struct itimerspec { struct timespec it_interval; struct timespec it_value; }; struct sigevent; typedef __pid_t pid_t; extern clock_t clock (void) __attribute__ ((__nothrow__)); extern time_t time (time_t *__timer) __attribute__ ((__nothrow__)); extern double difftime (time_t __time1, time_t __time0) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern time_t mktime (struct tm *__tp) __attribute__ ((__nothrow__)); extern size_t strftime (char *__restrict __s, size_t __maxsize, __const char *__restrict __format, __const struct tm *__restrict __tp) __attribute__ ((__nothrow__)); extern char *strptime (__const char *__restrict __s, __const char *__restrict __fmt, struct tm *__tp) __attribute__ ((__nothrow__)); # 1 "../include/xlocale.h" 1 # 217 "../time/time.h" 2 extern size_t strftime_l (char *__restrict __s, size_t __maxsize, __const char *__restrict __format, __const struct tm *__restrict __tp, __locale_t __loc) __attribute__ ((__nothrow__)); extern char *strptime_l (__const char *__restrict __s, __const char *__restrict __fmt, struct tm *__tp, __locale_t __loc) __attribute__ ((__nothrow__)); extern struct tm *gmtime (__const time_t *__timer) __attribute__ ((__nothrow__)); extern struct tm *localtime (__const time_t *__timer) __attribute__ ((__nothrow__)); extern struct tm *gmtime_r (__const time_t *__restrict __timer, struct tm *__restrict __tp) __attribute__ ((__nothrow__)); extern struct tm *localtime_r (__const time_t *__restrict __timer, struct tm *__restrict __tp) __attribute__ ((__nothrow__)); extern char *asctime (__const struct tm *__tp) __attribute__ ((__nothrow__)); extern char *ctime (__const time_t *__timer) __attribute__ ((__nothrow__)); extern char *asctime_r (__const struct tm *__restrict __tp, char *__restrict __buf) __attribute__ ((__nothrow__)); extern char *ctime_r (__const time_t *__restrict __timer, char *__restrict __buf) __attribute__ ((__nothrow__)); extern char *__tzname[2]; extern int __daylight; extern long int __timezone; extern char *tzname[2]; extern void tzset (void) __attribute__ ((__nothrow__)); extern int daylight; extern long int timezone; extern int stime (__const time_t *__when) __attribute__ ((__nothrow__)); # 312 "../time/time.h" extern time_t timegm (struct tm *__tp) __attribute__ ((__nothrow__)); extern time_t timelocal (struct tm *__tp) __attribute__ ((__nothrow__)); extern int dysize (int __year) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); # 327 "../time/time.h" extern int nanosleep (__const struct timespec *__requested_time, struct timespec *__remaining); extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __attribute__ ((__nothrow__)); extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __attribute__ ((__nothrow__)); extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp) __attribute__ ((__nothrow__)); extern int clock_nanosleep (clockid_t __clock_id, int __flags, __const struct timespec *__req, struct timespec *__rem); extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __attribute__ ((__nothrow__)); extern int timer_create (clockid_t __clock_id, struct sigevent *__restrict __evp, timer_t *__restrict __timerid) __attribute__ ((__nothrow__)); extern int timer_delete (timer_t __timerid) __attribute__ ((__nothrow__)); extern int timer_settime (timer_t __timerid, int __flags, __const struct itimerspec *__restrict __value, struct itimerspec *__restrict __ovalue) __attribute__ ((__nothrow__)); extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) __attribute__ ((__nothrow__)); extern int timer_getoverrun (timer_t __timerid) __attribute__ ((__nothrow__)); # 389 "../time/time.h" extern int getdate_err; # 398 "../time/time.h" extern struct tm *getdate (__const char *__string); # 412 "../time/time.h" extern int getdate_r (__const char *__restrict __string, struct tm *__restrict __resbufp); # 6 "../include/time.h" 2 # 1 "../include/xlocale.h" 1 # 7 "../include/time.h" 2 extern __typeof (strftime_l) __strftime_l; extern __typeof (strptime_l) __strptime_l; struct tm; extern const unsigned short int __mon_yday[2][13] ; extern struct tm _tmbuf ; extern char *__tzstring (const char *string); extern size_t __tzname_cur_max ; extern int __use_tzfile ; extern void __tzfile_read (const char *file, size_t extra, char **extrap); extern void __tzfile_compute (time_t timer, int use_localtime, long int *leap_correct, int *leap_hit, struct tm *tp); extern void __tzfile_default (const char *std, const char *dst, long int stdoff, long int dstoff); extern time_t __mktime_internal (struct tm *__tp, struct tm *(*__func) (const time_t *, struct tm *), time_t *__offset); extern struct tm *__localtime_r (__const time_t *__timer, struct tm *__tp) ; extern struct tm *__gmtime_r (__const time_t *__restrict __timer, struct tm *__restrict __tp); extern int __offtime (__const time_t *__timer, long int __offset, struct tm *__tp); extern char *__asctime_r (__const struct tm *__tp, char *__buf); extern void __tzset (void); extern struct tm *__tz_convert (const time_t *timer, int use_localtime, struct tm *tp); extern long int __tzname_max (void); extern int __nanosleep (__const struct timespec *__requested_time, struct timespec *__remaining); extern int __nanosleep_nocancel (__const struct timespec *__requested_time, struct timespec *__remaining) ; extern int __getdate_r (__const char *__string, struct tm *__resbufp); extern int __getclktck (void); enum ptime_locale_status { not, loc, raw }; extern char * __strptime_internal (const char *rp, const char *fmt, struct tm *tm, enum ptime_locale_status *decided, int era_cnt, __locale_t locparam) ; extern double __difftime (time_t time1, time_t time0); # 117 "../include/time.h" # 28 "../locale/localeinfo.h" 2 # 1 "../sysdeps/generic/stdint.h" 1 # 27 "../sysdeps/generic/stdint.h" # 1 "../bits/wchar.h" 1 # 28 "../sysdeps/generic/stdint.h" 2 # 1 "../sysdeps/wordsize-32/bits/wordsize.h" 1 # 29 "../sysdeps/generic/stdint.h" 2 # 37 "../sysdeps/generic/stdint.h" typedef signed char int8_t; typedef short int int16_t; typedef int int32_t; __extension__ typedef long long int int64_t; typedef unsigned char uint8_t; typedef unsigned short int uint16_t; typedef unsigned int uint32_t; __extension__ typedef unsigned long long int uint64_t; typedef signed char int_least8_t; typedef short int int_least16_t; typedef int int_least32_t; __extension__ typedef long long int int_least64_t; typedef unsigned char uint_least8_t; typedef unsigned short int uint_least16_t; typedef unsigned int uint_least32_t; __extension__ typedef unsigned long long int uint_least64_t; typedef signed char int_fast8_t; typedef int int_fast16_t; typedef int int_fast32_t; __extension__ typedef long long int int_fast64_t; typedef unsigned char uint_fast8_t; typedef unsigned int uint_fast16_t; typedef unsigned int uint_fast32_t; __extension__ typedef unsigned long long int uint_fast64_t; # 126 "../sysdeps/generic/stdint.h" typedef int intptr_t; typedef unsigned int uintptr_t; # 138 "../sysdeps/generic/stdint.h" __extension__ typedef long long int intmax_t; __extension__ typedef unsigned long long int uintmax_t; # 29 "../locale/localeinfo.h" 2 # 1 "../include/sys/types.h" 1 # 1 "../posix/sys/types.h" 1 # 29 "../posix/sys/types.h" 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; # 105 "../posix/sys/types.h" 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; # 137 "../posix/sys/types.h" typedef __useconds_t useconds_t; typedef __suseconds_t suseconds_t; # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 148 "../posix/sys/types.h" 2 typedef unsigned long int ulong; typedef unsigned short int ushort; typedef unsigned int uint; # 201 "../posix/sys/types.h" 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__))); # 217 "../posix/sys/types.h" # 1 "../include/endian.h" 1 # 1 "../string/endian.h" 1 # 37 "../string/endian.h" # 1 "../ports/sysdeps/hppa/bits/endian.h" 1 # 38 "../string/endian.h" 2 # 2 "../include/endian.h" 2 # 218 "../posix/sys/types.h" 2 # 1 "../include/sys/select.h" 1 # 1 "../misc/sys/select.h" 1 # 31 "../misc/sys/select.h" # 1 "../bits/select.h" 1 # 32 "../misc/sys/select.h" 2 # 1 "../sysdeps/unix/sysv/linux/bits/sigset.h" 1 # 23 "../sysdeps/unix/sysv/linux/bits/sigset.h" typedef int __sig_atomic_t; typedef struct { unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; } __sigset_t; # 35 "../misc/sys/select.h" 2 typedef __sigset_t sigset_t; # 1 "../bits/time.h" 1 # 69 "../bits/time.h" struct timeval { __time_t tv_sec; __suseconds_t tv_usec; }; # 47 "../misc/sys/select.h" 2 # 55 "../misc/sys/select.h" typedef long int __fd_mask; # 67 "../misc/sys/select.h" typedef struct { __fd_mask fds_bits[1024 / (8 * sizeof (__fd_mask))]; } fd_set; typedef __fd_mask fd_mask; # 99 "../misc/sys/select.h" # 109 "../misc/sys/select.h" extern int select (int __nfds, fd_set *__restrict __readfds, fd_set *__restrict __writefds, fd_set *__restrict __exceptfds, struct timeval *__restrict __timeout); # 121 "../misc/sys/select.h" 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); # 3 "../include/sys/select.h" 2 extern int __pselect (int __nfds, fd_set *__readfds, fd_set *__writefds, fd_set *__exceptfds, const struct timespec *__timeout, const __sigset_t *__sigmask); extern int __select (int __nfds, fd_set *__restrict __readfds, fd_set *__restrict __writefds, fd_set *__restrict __exceptfds, struct timeval *__restrict __timeout); # 221 "../posix/sys/types.h" 2 # 1 "../sysdeps/unix/sysv/linux/sys/sysmacros.h" 1 # 29 "../sysdeps/unix/sysv/linux/sys/sysmacros.h" __extension__ extern __inline unsigned int gnu_dev_major (unsigned long long int __dev) __attribute__ ((__nothrow__)); __extension__ extern __inline unsigned int gnu_dev_minor (unsigned long long int __dev) __attribute__ ((__nothrow__)); __extension__ extern __inline unsigned long long int gnu_dev_makedev (unsigned int __major, unsigned int __minor) __attribute__ ((__nothrow__)); __extension__ extern __inline unsigned int __attribute__ ((__nothrow__)) gnu_dev_major (unsigned long long int __dev) { return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); } __extension__ extern __inline unsigned int __attribute__ ((__nothrow__)) gnu_dev_minor (unsigned long long int __dev) { return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); } __extension__ extern __inline unsigned long long int __attribute__ ((__nothrow__)) gnu_dev_makedev (unsigned int __major, unsigned int __minor) { return ((__minor & 0xff) | ((__major & 0xfff) << 8) | (((unsigned long long int) (__minor & ~0xff)) << 12) | (((unsigned long long int) (__major & ~0xfff)) << 32)); } # 224 "../posix/sys/types.h" 2 typedef __blksize_t blksize_t; typedef __blkcnt_t blkcnt_t; typedef __fsblkcnt_t fsblkcnt_t; typedef __fsfilcnt_t fsfilcnt_t; # 262 "../posix/sys/types.h" typedef __blkcnt64_t blkcnt64_t; typedef __fsblkcnt64_t fsblkcnt64_t; typedef __fsfilcnt64_t fsfilcnt64_t; # 1 "../ports/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h" 1 # 48 "../ports/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h" typedef unsigned long int pthread_t; # 60 "../ports/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h" 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[48]; 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[64]; __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[64]; 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[48]; long int __align; } pthread_barrier_t; typedef union { char __size[4]; int __align; } pthread_barrierattr_t; # 271 "../posix/sys/types.h" 2 # 1 "../include/sys/types.h" 2 # 30 "../locale/localeinfo.h" 2 # 1 "../intl/loadinfo.h" 1 # 60 "../intl/loadinfo.h" struct loaded_l10nfile { const char *filename; int decided; const void *data; struct loaded_l10nfile *next; struct loaded_l10nfile *successor[1]; }; extern const char *_nl_normalize_codeset (const char *codeset, size_t name_len); extern struct loaded_l10nfile * _nl_make_l10nflist (struct loaded_l10nfile **l10nfile_list, const char *dirlist, size_t dirlist_len, int mask, const char *language, const char *territory, const char *codeset, const char *normalized_codeset, const char *modifier, const char *filename, int do_allocate); # 89 "../intl/loadinfo.h" extern const char *_nl_expand_alias (const char *name); extern int _nl_explode_name (char *name, const char **language, const char **modifier, const char **territory, const char **codeset, const char **normalized_codeset); # 32 "../locale/localeinfo.h" 2 # 48 "../locale/localeinfo.h" struct locale_data { const char *name; const char *filedata; off_t filesize; enum { ld_malloced, ld_mapped, ld_archive } alloc; struct { void (*cleanup) (struct locale_data *) ; union { void *data; struct lc_time_data *time; const struct gconv_fcts *ctype; }; } private; unsigned int usage_count; int use_translit; unsigned int nstrings; union locale_data_value { const uint32_t *wstr; const char *string; unsigned int word; } values []; }; enum coll_sort_rule { illegal_0__, sort_forward, sort_backward, illegal_3__, sort_position, sort_forward_position, sort_backward_position, sort_mask }; enum value_type { none, string, stringarray, byte, bytearray, word, stringlist, wordarray, wstring, wstringarray, wstringlist }; # 128 "../locale/localeinfo.h" struct era_entry { uint32_t direction; int32_t offset; int32_t start_date[3]; int32_t stop_date[3]; const char *era_name; const char *era_format; const wchar_t *era_wname; const wchar_t *era_wformat; int absolute_direction; }; struct lc_time_data { struct era_entry *eras; size_t num_eras; int era_initialized; const char **alt_digits; const wchar_t **walt_digits; int alt_digits_initialized; int walt_digits_initialized; }; enum { __TOW_toupper = 0, __TOW_tolower = 1 }; # 178 "../locale/localeinfo.h" extern const union catnamestr_t { struct { # 1 "../locale/categories.def" 1 # 42 "../locale/categories.def" char str62[sizeof ("LC_COLLATE")]; # 68 "../locale/categories.def" char str137[sizeof ("LC_CTYPE")]; # 140 "../locale/categories.def" char str189[sizeof ("LC_MONETARY")]; # 192 "../locale/categories.def" char str203[sizeof ("LC_NUMERIC")]; # 206 "../locale/categories.def" char str251[sizeof ("LC_TIME")]; # 254 "../locale/categories.def" char str263[sizeof ("LC_MESSAGES")]; # 265 "../locale/categories.def" char str272[sizeof ("LC_PAPER")]; # 274 "../locale/categories.def" char str285[sizeof ("LC_NAME")]; # 287 "../locale/categories.def" char str304[sizeof ("LC_ADDRESS")]; # 306 "../locale/categories.def" char str315[sizeof ("LC_TELEPHONE")]; # 317 "../locale/categories.def" char str323[sizeof ("LC_MEASUREMENT")]; char str345[sizeof ("LC_IDENTIFICATION")]; # 185 "../locale/localeinfo.h" 2 }; char str[0]; } _nl_category_names ; const uint8_t _nl_category_name_idxs[13] ; extern const uint8_t _nl_category_name_sizes[13] ; extern const char _nl_C_name[] ; extern const char _nl_POSIX_name[] ; extern const char _nl_C_codeset[] ; extern struct __locale_struct _nl_global_locale ; # 1 "../bits/libc-tsd.h" 1 # 45 "../bits/libc-tsd.h" # 1 "../include/tls.h" 1 # 1 "../ports/sysdeps/hppa/nptl/tls.h" 1 # 23 "../ports/sysdeps/hppa/nptl/tls.h" # 1 "../sysdeps/unix/sysv/linux/dl-sysdep.h" 1 # 20 "../sysdeps/unix/sysv/linux/dl-sysdep.h" # 1 "../sysdeps/generic/dl-sysdep.h" 1 # 21 "../sysdeps/unix/sysv/linux/dl-sysdep.h" 2 # 24 "../ports/sysdeps/hppa/nptl/tls.h" 2 # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stdbool.h" 1 3 4 # 27 "../ports/sysdeps/hppa/nptl/tls.h" 2 # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 28 "../ports/sysdeps/hppa/nptl/tls.h" 2 typedef union dtv { size_t counter; struct { void *val; _Bool is_static; } pointer; } dtv_t; # 57 "../ports/sysdeps/hppa/nptl/tls.h" # 1 "../ports/sysdeps/unix/sysv/linux/hppa/sysdep.h" 1 # 22 "../ports/sysdeps/unix/sysv/linux/hppa/sysdep.h" # 1 "/usr/include/asm/unistd.h" 1 3 4 # 23 "../ports/sysdeps/unix/sysv/linux/hppa/sysdep.h" 2 # 1 "../sysdeps/generic/sysdep.h" 1 # 24 "../ports/sysdeps/unix/sysv/linux/hppa/sysdep.h" 2 # 1 "../sysdeps/unix/sysv/linux/sys/syscall.h" 1 # 25 "../ports/sysdeps/unix/sysv/linux/hppa/sysdep.h" 2 # 58 "../ports/sysdeps/hppa/nptl/tls.h" 2 # 1 "../nptl/descr.h" 1 # 23 "../nptl/descr.h" # 1 "../include/limits.h" 1 # 145 "../include/limits.h" # 1 "../include/bits/posix1_lim.h" 1 # 146 "../include/limits.h" 2 # 1 "../include/bits/posix2_lim.h" 1 # 150 "../include/limits.h" 2 # 24 "../nptl/descr.h" 2 # 1 "../include/sched.h" 1 # 1 "../posix/sched.h" 1 # 32 "../posix/sched.h" # 1 "../sysdeps/unix/sysv/linux/bits/sched.h" 1 # 65 "../sysdeps/unix/sysv/linux/bits/sched.h" struct sched_param { int __sched_priority; }; extern int clone (int (*__fn) (void *__arg), void *__child_stack, int __flags, void *__arg, ...) __attribute__ ((__nothrow__)); extern int unshare (int __flags) __attribute__ ((__nothrow__)); struct __sched_param { int __sched_priority; }; # 104 "../sysdeps/unix/sysv/linux/bits/sched.h" typedef unsigned long int __cpu_mask; typedef struct { __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))]; } cpu_set_t; # 33 "../posix/sched.h" 2 extern int sched_setparam (__pid_t __pid, __const struct sched_param *__param) __attribute__ ((__nothrow__)); extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __attribute__ ((__nothrow__)); extern int sched_setscheduler (__pid_t __pid, int __policy, __const struct sched_param *__param) __attribute__ ((__nothrow__)); extern int sched_getscheduler (__pid_t __pid) __attribute__ ((__nothrow__)); extern int sched_yield (void) __attribute__ ((__nothrow__)); extern int sched_get_priority_max (int __algorithm) __attribute__ ((__nothrow__)); extern int sched_get_priority_min (int __algorithm) __attribute__ ((__nothrow__)); extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __attribute__ ((__nothrow__)); # 76 "../posix/sched.h" extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize, __const cpu_set_t *__cpuset) __attribute__ ((__nothrow__)); extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize, cpu_set_t *__cpuset) __attribute__ ((__nothrow__)); # 3 "../include/sched.h" 2 extern int __sched_setparam (__pid_t __pid, __const struct sched_param *__param); extern int __sched_getparam (__pid_t __pid, struct sched_param *__param); extern int __sched_setscheduler (__pid_t __pid, int __policy, __const struct sched_param *__param); extern int __sched_getscheduler (__pid_t __pid); extern int __sched_yield (void); extern int __sched_get_priority_max (int __algorithm); extern int __sched_get_priority_min (int __algorithm); extern int __sched_rr_get_interval (__pid_t __pid, struct timespec *__t); extern int __clone (int (*__fn) (void *__arg), void *__child_stack, int __flags, void *__arg, ...); extern int __clone2 (int (*__fn) (void *__arg), void *__child_stack_base, size_t __child_stack_size, int __flags, void *__arg, ...); # 25 "../nptl/descr.h" 2 # 1 "../include/setjmp.h" 1 # 1 "../setjmp/setjmp.h" 1 # 28 "../setjmp/setjmp.h" # 1 "../ports/sysdeps/hppa/bits/setjmp.h" 1 # 33 "../ports/sysdeps/hppa/bits/setjmp.h" typedef double __jmp_buf[21]; # 31 "../setjmp/setjmp.h" 2 # 1 "../sysdeps/unix/sysv/linux/bits/sigset.h" 1 # 32 "../setjmp/setjmp.h" 2 typedef struct __jmp_buf_tag { __jmp_buf __jmpbuf; int __mask_was_saved; __sigset_t __saved_mask; } jmp_buf[1]; extern int setjmp (jmp_buf __env) __attribute__ ((__nothrow__)); extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) __attribute__ ((__nothrow__)); extern int _setjmp (struct __jmp_buf_tag __env[1]) __attribute__ ((__nothrow__)); # 76 "../setjmp/setjmp.h" extern void longjmp (struct __jmp_buf_tag __env[1], int __val) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); extern void _longjmp (struct __jmp_buf_tag __env[1], int __val) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); typedef struct __jmp_buf_tag sigjmp_buf[1]; # 108 "../setjmp/setjmp.h" extern void siglongjmp (sigjmp_buf __env, int __val) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); # 3 "../include/setjmp.h" 2 extern void __longjmp (__jmp_buf __env, int __val) __attribute__ ((__noreturn__)); extern int __sigjmp_save (jmp_buf __env, int __savemask); extern void _longjmp_unwind (jmp_buf env, int val); extern void __libc_siglongjmp (sigjmp_buf env, int val) __attribute__ ((noreturn)); extern void __libc_longjmp (sigjmp_buf env, int val) __attribute__ ((noreturn)); # 26 "../nptl/descr.h" 2 # 1 "../include/sys/types.h" 1 # 28 "../nptl/descr.h" 2 # 1 "../sysdeps/generic/hp-timing.h" 1 # 71 "../sysdeps/generic/hp-timing.h" typedef int hp_timing_t; # 29 "../nptl/descr.h" 2 # 1 "../nptl/sysdeps/pthread/list.h" 1 # 29 "../nptl/sysdeps/pthread/list.h" typedef struct list_head { struct list_head *next; struct list_head *prev; } list_t; # 46 "../nptl/sysdeps/pthread/list.h" static inline void list_add (list_t *newp, list_t *head) { head->next->prev = newp; newp->next = head->next; newp->prev = head; head->next = newp; } static inline void list_add_tail (list_t *newp, list_t *head) { head->prev->next = newp; newp->next = head; newp->prev = head->prev; head->prev = newp; } static inline void list_del (list_t *elem) { elem->next->prev = elem->prev; elem->prev->next = elem->next; } static inline void list_splice (list_t *add, list_t *head) { if (add != add->next) { add->next->prev = head; add->prev->next = head->next; head->next->prev = add->prev; head->next = add->next; } } # 30 "../nptl/descr.h" 2 # 1 "../ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h" 1 # 23 "../ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h" # 1 "../sysdeps/unix/sysv/linux/sys/param.h" 1 # 22 "../sysdeps/unix/sysv/linux/sys/param.h" # 1 "../include/limits.h" 1 # 145 "../include/limits.h" # 1 "../include/bits/posix1_lim.h" 1 # 146 "../include/limits.h" 2 # 1 "../include/bits/posix2_lim.h" 1 # 150 "../include/limits.h" 2 # 23 "../sysdeps/unix/sysv/linux/sys/param.h" 2 # 1 "/usr/include/linux/param.h" 1 3 4 # 1 "/usr/include/asm/param.h" 1 3 4 # 5 "/usr/include/linux/param.h" 2 3 4 # 25 "../sysdeps/unix/sysv/linux/sys/param.h" 2 # 42 "../sysdeps/unix/sysv/linux/sys/param.h" # 1 "../include/sys/types.h" 1 # 43 "../sysdeps/unix/sysv/linux/sys/param.h" 2 # 24 "../ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h" 2 # 1 "../ports/sysdeps/unix/sysv/linux/hppa/sysdep.h" 1 # 23 "../ports/sysdeps/unix/sysv/linux/hppa/sysdep.h" # 1 "../sysdeps/generic/sysdep.h" 1 # 24 "../ports/sysdeps/unix/sysv/linux/hppa/sysdep.h" 2 # 26 "../ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h" 2 # 1 "../include/atomic.h" 1 # 49 "../include/atomic.h" # 1 "../include/stdlib.h" 1 # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 8 "../include/stdlib.h" 2 # 1 "../stdlib/stdlib.h" 1 # 33 "../stdlib/stdlib.h" # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 34 "../stdlib/stdlib.h" 2 # 1 "../sysdeps/unix/sysv/linux/bits/waitflags.h" 1 # 43 "../stdlib/stdlib.h" 2 # 1 "../bits/waitstatus.h" 1 # 65 "../bits/waitstatus.h" # 1 "../include/endian.h" 1 # 66 "../bits/waitstatus.h" 2 union wait { int w_status; struct { unsigned int:16; unsigned int __w_retcode:8; unsigned int __w_coredump:1; unsigned int __w_termsig:7; } __wait_terminated; struct { unsigned int:16; unsigned int __w_stopsig:8; unsigned int __w_stopval:8; } __wait_stopped; }; # 44 "../stdlib/stdlib.h" 2 # 68 "../stdlib/stdlib.h" typedef union { union wait *__uptr; int *__iptr; } __WAIT_STATUS __attribute__ ((__transparent_union__)); # 96 "../stdlib/stdlib.h" 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 "../stdlib/stdlib.h" extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__)) ; extern double atof (__const char *__nptr) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; extern int atoi (__const char *__nptr) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; extern long int atol (__const char *__nptr) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; __extension__ extern long long int atoll (__const char *__nptr) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; extern double strtod (__const char *__restrict __nptr, char **__restrict __endptr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; extern float strtof (__const char *__restrict __nptr, char **__restrict __endptr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; extern long double strtold (__const char *__restrict __nptr, char **__restrict __endptr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; extern long int strtol (__const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; extern unsigned long int strtoul (__const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; __extension__ extern long long int strtoq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; __extension__ extern unsigned long long int strtouq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; __extension__ extern long long int strtoll (__const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; __extension__ extern unsigned long long int strtoull (__const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; # 236 "../stdlib/stdlib.h" # 1 "../include/xlocale.h" 1 # 237 "../stdlib/stdlib.h" 2 extern long int strtol_l (__const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) ; extern unsigned long int strtoul_l (__const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) ; __extension__ extern long long int strtoll_l (__const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) ; __extension__ extern unsigned long long int strtoull_l (__const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) ; extern double strtod_l (__const char *__restrict __nptr, char **__restrict __endptr, __locale_t __loc) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))) ; extern float strtof_l (__const char *__restrict __nptr, char **__restrict __endptr, __locale_t __loc) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))) ; extern long double strtold_l (__const char *__restrict __nptr, char **__restrict __endptr, __locale_t __loc) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))) ; extern double __strtod_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __group) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; extern float __strtof_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __group) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; extern long double __strtold_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __group) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; extern long int __strtol_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __base, int __group) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; extern unsigned long int __strtoul_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __base, int __group) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; __extension__ extern long long int __strtoll_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __base, int __group) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; __extension__ extern unsigned long long int __strtoull_internal (__const char * __restrict __nptr, char **__restrict __endptr, int __base, int __group) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; extern __inline double __attribute__ ((__nothrow__)) strtod (__const char *__restrict __nptr, char **__restrict __endptr) { return __strtod_internal (__nptr, __endptr, 0); } extern __inline long int __attribute__ ((__nothrow__)) strtol (__const char *__restrict __nptr, char **__restrict __endptr, int __base) { return __strtol_internal (__nptr, __endptr, __base, 0); } extern __inline unsigned long int __attribute__ ((__nothrow__)) strtoul (__const char *__restrict __nptr, char **__restrict __endptr, int __base) { return __strtoul_internal (__nptr, __endptr, __base, 0); } extern __inline float __attribute__ ((__nothrow__)) strtof (__const char *__restrict __nptr, char **__restrict __endptr) { return __strtof_internal (__nptr, __endptr, 0); } extern __inline long double __attribute__ ((__nothrow__)) strtold (__const char *__restrict __nptr, char **__restrict __endptr) { return __strtold_internal (__nptr, __endptr, 0); } __extension__ extern __inline long long int __attribute__ ((__nothrow__)) strtoq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) { return __strtoll_internal (__nptr, __endptr, __base, 0); } __extension__ extern __inline unsigned long long int __attribute__ ((__nothrow__)) strtouq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) { return __strtoull_internal (__nptr, __endptr, __base, 0); } __extension__ extern __inline long long int __attribute__ ((__nothrow__)) strtoll (__const char *__restrict __nptr, char **__restrict __endptr, int __base) { return __strtoll_internal (__nptr, __endptr, __base, 0); } __extension__ extern __inline unsigned long long int __attribute__ ((__nothrow__)) strtoull (__const char * __restrict __nptr, char **__restrict __endptr, int __base) { return __strtoull_internal (__nptr, __endptr, __base, 0); } extern __inline double __attribute__ ((__nothrow__)) atof (__const char *__nptr) { return strtod (__nptr, (char **) ((void *)0)); } extern __inline int __attribute__ ((__nothrow__)) atoi (__const char *__nptr) { return (int) strtol (__nptr, (char **) ((void *)0), 10); } extern __inline long int __attribute__ ((__nothrow__)) atol (__const char *__nptr) { return strtol (__nptr, (char **) ((void *)0), 10); } __extension__ extern __inline long long int __attribute__ ((__nothrow__)) atoll (__const char *__nptr) { return strtoll (__nptr, (char **) ((void *)0), 10); } # 429 "../stdlib/stdlib.h" extern char *l64a (long int __n) __attribute__ ((__nothrow__)) ; extern long int a64l (__const char *__s) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; # 1 "../include/sys/types.h" 1 # 439 "../stdlib/stdlib.h" 2 extern long int random (void) __attribute__ ((__nothrow__)); extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__)); extern char *initstate (unsigned int __seed, char *__statebuf, size_t __statelen) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__)) __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) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int srandom_r (unsigned int __seed, struct random_data *__buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, size_t __statelen, struct random_data *__restrict __buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4))); extern int setstate_r (char *__restrict __statebuf, struct random_data *__restrict __buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int rand (void) __attribute__ ((__nothrow__)); extern void srand (unsigned int __seed) __attribute__ ((__nothrow__)); extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__)); extern double drand48 (void) __attribute__ ((__nothrow__)); extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern long int lrand48 (void) __attribute__ ((__nothrow__)); extern long int nrand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern long int mrand48 (void) __attribute__ ((__nothrow__)); extern long int jrand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern void srand48 (long int __seedval) __attribute__ ((__nothrow__)); extern unsigned short int *seed48 (unsigned short int __seed16v[3]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__)) __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) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int erand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, double *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int lrand48_r (struct drand48_data *__restrict __buffer, long int *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int nrand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, long int *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int mrand48_r (struct drand48_data *__restrict __buffer, long int *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int jrand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, long int *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int srand48_r (long int __seedval, struct drand48_data *__buffer) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); extern int seed48_r (unsigned short int __seed16v[3], struct drand48_data *__buffer) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int lcong48_r (unsigned short int __param[7], struct drand48_data *__buffer) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern void *malloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ; extern void *calloc (size_t __nmemb, size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ; extern void *realloc (void *__ptr, size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); extern void free (void *__ptr) __attribute__ ((__nothrow__)); extern void cfree (void *__ptr) __attribute__ ((__nothrow__)); # 1 "../include/alloca.h" 1 # 1 "../stdlib/alloca.h" 1 # 25 "../stdlib/alloca.h" # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 26 "../stdlib/alloca.h" 2 extern void *alloca (size_t __size) __attribute__ ((__nothrow__)); # 4 "../include/alloca.h" 2 # 1 "../ports/sysdeps/hppa/stackinfo.h" 1 # 5 "../include/alloca.h" 2 extern void *__alloca (size_t __size); extern int __libc_use_alloca (size_t size) __attribute__ ((const)); extern int __libc_alloca_cutoff (size_t size) __attribute__ ((const)); # 1 "../nptl/sysdeps/pthread/allocalim.h" 1 # 20 "../nptl/sysdeps/pthread/allocalim.h" # 1 "../include/alloca.h" 1 # 21 "../nptl/sysdeps/pthread/allocalim.h" 2 # 1 "../include/limits.h" 1 # 145 "../include/limits.h" # 1 "../include/bits/posix1_lim.h" 1 # 146 "../include/limits.h" 2 # 1 "../include/bits/posix2_lim.h" 1 # 150 "../include/limits.h" 2 # 22 "../nptl/sysdeps/pthread/allocalim.h" 2 extern int __inline __attribute__ ((__always_inline__)) __libc_use_alloca (size_t size) { return (__builtin_expect (size <= 16384 / 4, 1) || __libc_alloca_cutoff (size)); } # 21 "../include/alloca.h" 2 # 613 "../stdlib/stdlib.h" 2 extern void *valloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ; extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; extern void abort (void) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern void exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); extern void _Exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); extern char *getenv (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; extern char *__secure_getenv (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; extern int putenv (char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int setenv (__const char *__name, __const char *__value, int __replace) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); extern int unsetenv (__const char *__name) __attribute__ ((__nothrow__)); extern int clearenv (void) __attribute__ ((__nothrow__)); # 698 "../stdlib/stdlib.h" extern char *mktemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; # 709 "../stdlib/stdlib.h" extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) ; # 719 "../stdlib/stdlib.h" extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) ; # 729 "../stdlib/stdlib.h" extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; extern int system (__const char *__command) ; extern char *canonicalize_file_name (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; # 756 "../stdlib/stdlib.h" extern char *realpath (__const char *__restrict __name, char *__restrict __resolved) __attribute__ ((__nothrow__)) ; 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) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ; extern long int labs (long int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ; __extension__ extern long long int llabs (long long int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ; extern div_t div (int __numer, int __denom) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ; extern ldiv_t ldiv (long int __numer, long int __denom) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ; __extension__ extern lldiv_t lldiv (long long int __numer, long long int __denom) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ; # 821 "../stdlib/stdlib.h" extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ; extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ; extern char *gcvt (double __value, int __ndigit, char *__buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))) ; extern char *qecvt (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ; extern char *qfcvt (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ; extern char *qgcvt (long double __value, int __ndigit, char *__buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))) ; extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) __attribute__ ((__nothrow__)) __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) __attribute__ ((__nothrow__)) __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) __attribute__ ((__nothrow__)) __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) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5))); extern int mblen (__const char *__s, size_t __n) __attribute__ ((__nothrow__)) ; extern int mbtowc (wchar_t *__restrict __pwc, __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__)) ; extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__)) ; extern size_t mbstowcs (wchar_t *__restrict __pwcs, __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__)); extern size_t wcstombs (char *__restrict __s, __const wchar_t *__restrict __pwcs, size_t __n) __attribute__ ((__nothrow__)); extern int rpmatch (__const char *__response) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; # 909 "../stdlib/stdlib.h" extern int getsubopt (char **__restrict __optionp, char *__const *__restrict __tokens, char **__restrict __valuep) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2, 3))) ; extern void setkey (__const char *__key) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int posix_openpt (int __oflag) ; extern int grantpt (int __fd) __attribute__ ((__nothrow__)); extern int unlockpt (int __fd) __attribute__ ((__nothrow__)); extern char *ptsname (int __fd) __attribute__ ((__nothrow__)) ; extern int ptsname_r (int __fd, char *__buf, size_t __buflen) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); extern int getpt (void); extern int getloadavg (double __loadavg[], int __nelem) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); # 977 "../stdlib/stdlib.h" # 9 "../include/stdlib.h" 2 extern __typeof (strtol_l) __strtol_l; extern __typeof (strtoul_l) __strtoul_l; extern __typeof (strtoll_l) __strtoll_l; extern __typeof (strtoull_l) __strtoull_l; extern __typeof (strtod_l) __strtod_l; extern __typeof (strtof_l) __strtof_l; extern __typeof (strtold_l) __strtold_l; extern long int __random (void); extern void __srandom (unsigned int __seed); extern char *__initstate (unsigned int __seed, char *__statebuf, size_t __statelen); extern char *__setstate (char *__statebuf); extern int __random_r (struct random_data *__buf, int32_t *__result); extern int __srandom_r (unsigned int __seed, struct random_data *__buf); extern int __initstate_r (unsigned int __seed, char *__statebuf, size_t __statelen, struct random_data *__buf); extern int __setstate_r (char *__statebuf, struct random_data *__buf); extern int __rand_r (unsigned int *__seed); extern int __erand48_r (unsigned short int __xsubi[3], struct drand48_data *__buffer, double *__result); extern int __nrand48_r (unsigned short int __xsubi[3], struct drand48_data *__buffer, long int *__result); extern int __jrand48_r (unsigned short int __xsubi[3], struct drand48_data *__buffer, long int *__result); extern int __srand48_r (long int __seedval, struct drand48_data *__buffer); extern int __seed48_r (unsigned short int __seed16v[3], struct drand48_data *__buffer); extern int __lcong48_r (unsigned short int __param[7], struct drand48_data *__buffer); extern int __drand48_iterate (unsigned short int __xsubi[3], struct drand48_data *__buffer); extern struct drand48_data __libc_drand48_data ; extern int __setenv (__const char *__name, __const char *__value, int __replace); extern int __unsetenv (__const char *__name); extern int __clearenv (void); extern char *__canonicalize_file_name (__const char *__name); extern char *__realpath (__const char *__name, char *__resolved); extern int __ptsname_r (int __fd, char *__buf, size_t __buflen); extern int __getpt (void); extern int __posix_openpt (int __oflag); extern int __add_to_environ (const char *name, const char *value, const char *combines, int replace); extern void _quicksort (void *const pbase, size_t total_elems, size_t size, __compar_fn_t cmp); extern int __on_exit (void (*__func) (int __status, void *__arg), void *__arg); extern int __cxa_atexit (void (*func) (void *), void *arg, void *d); extern int __cxa_atexit_internal (void (*func) (void *), void *arg, void *d) ; extern void __cxa_finalize (void *d); extern int __posix_memalign (void **memptr, size_t alignment, size_t size); extern void *__libc_memalign (size_t alignment, size_t size) __attribute__ ((__malloc__)); extern int __libc_system (const char *line); extern double ____strtod_l_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __group, __locale_t __loc); extern float ____strtof_l_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __group, __locale_t __loc); extern long double ____strtold_l_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __group, __locale_t __loc); extern long int ____strtol_l_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __base, int __group, __locale_t __loc); extern unsigned long int ____strtoul_l_internal (__const char * __restrict __nptr, char **__restrict __endptr, int __base, int __group, __locale_t __loc); __extension__ extern long long int ____strtoll_l_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __base, int __group, __locale_t __loc); __extension__ extern unsigned long long int ____strtoull_l_internal (__const char * __restrict __nptr, char ** __restrict __endptr, int __base, int __group, __locale_t __loc); extern __inline double __attribute__ ((__nothrow__)) __strtod_l (__const char *__restrict __nptr, char **__restrict __endptr, __locale_t __loc) { return ____strtod_l_internal (__nptr, __endptr, 0, __loc); } extern __inline long int __attribute__ ((__nothrow__)) __strtol_l (__const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) { return ____strtol_l_internal (__nptr, __endptr, __base, 0, __loc); } extern __inline unsigned long int __attribute__ ((__nothrow__)) __strtoul_l (__const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) { return ____strtoul_l_internal (__nptr, __endptr, __base, 0, __loc); } extern __inline float __attribute__ ((__nothrow__)) __strtof_l (__const char *__restrict __nptr, char **__restrict __endptr, __locale_t __loc) { return ____strtof_l_internal (__nptr, __endptr, 0, __loc); } extern __inline long double __attribute__ ((__nothrow__)) __strtold_l (__const char *__restrict __nptr, char **__restrict __endptr, __locale_t __loc) { return ____strtold_l_internal (__nptr, __endptr, 0, __loc); } __extension__ extern __inline long long int __attribute__ ((__nothrow__)) __strtoll_l (__const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) { return ____strtoll_l_internal (__nptr, __endptr, __base, 0, __loc); } __extension__ extern __inline unsigned long long int __attribute__ ((__nothrow__)) __strtoull_l (__const char * __restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) { return ____strtoull_l_internal (__nptr, __endptr, __base, 0, __loc); } extern char *__ecvt (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign); extern char *__fcvt (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign); extern char *__gcvt (double __value, int __ndigit, char *__buf); extern int __ecvt_r (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len); extern int __fcvt_r (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len); extern char *__qecvt (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign); extern char *__qfcvt (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign); extern char *__qgcvt (long double __value, int __ndigit, char *__buf); extern int __qecvt_r (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len); extern int __qfcvt_r (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len); # 217 "../include/stdlib.h" extern void *__default_morecore (ptrdiff_t) __attribute__ ((__nothrow__)); # 50 "../include/atomic.h" 2 # 1 "../ports/sysdeps/unix/sysv/linux/hppa/bits/atomic.h" 1 # 21 "../ports/sysdeps/unix/sysv/linux/hppa/bits/atomic.h" # 1 "../ports/sysdeps/unix/sysv/linux/hppa/sysdep.h" 1 # 23 "../ports/sysdeps/unix/sysv/linux/hppa/sysdep.h" # 1 "../sysdeps/generic/sysdep.h" 1 # 24 "../ports/sysdeps/unix/sysv/linux/hppa/sysdep.h" 2 # 22 "../ports/sysdeps/unix/sysv/linux/hppa/bits/atomic.h" 2 # 1 "../ports/sysdeps/hppa/abort-instr.h" 1 # 23 "../ports/sysdeps/unix/sysv/linux/hppa/bits/atomic.h" 2 # 1 "../ports/sysdeps/unix/sysv/linux/hppa/kernel-features.h" 1 # 39 "../ports/sysdeps/unix/sysv/linux/hppa/kernel-features.h" # 1 "../sysdeps/unix/sysv/linux/kernel-features.h" 1 # 39 "../ports/sysdeps/unix/sysv/linux/hppa/kernel-features.h" 2 # 24 "../ports/sysdeps/unix/sysv/linux/hppa/bits/atomic.h" 2 # 34 "../ports/sysdeps/unix/sysv/linux/hppa/bits/atomic.h" typedef int8_t atomic8_t; typedef uint8_t uatomic8_t; typedef int_fast8_t atomic_fast8_t; typedef uint_fast8_t uatomic_fast8_t; typedef int32_t atomic32_t; typedef uint32_t uatomic32_t; typedef int_fast32_t atomic_fast32_t; typedef uint_fast32_t uatomic_fast32_t; typedef intptr_t atomicptr_t; typedef uintptr_t uatomicptr_t; typedef intmax_t atomic_max_t; typedef uintmax_t uatomic_max_t; # 52 "../include/atomic.h" 2 # 27 "../ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h" 2 # 48 "../ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h" typedef int lll_lock_t; # 110 "../ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h" static inline int __attribute__((always_inline)) __lll_mutex_trylock(lll_lock_t *futex) { return ({ volatile int lws_errno = 14; volatile int lws_ret = 0xdeadbeef; asm volatile( "0: \n\t" "copy %3, %%r26 \n\t" "copy %4, %%r25 \n\t" "copy %5, %%r24 \n\t" "ble " "0xb0" "(%%sr2, %%r0) \n\t" "ldi " "0" ", %%r20 \n\t" "cmpib,=,n " "11" ",%%r21,0b \n\t" "nop \n\t" "stw %%r28, %0 \n\t" "sub %%r0, %%r21, %%r21 \n\t" "stw %%r21, %1 \n\t" : "=m" (lws_ret), "=m" (lws_errno), "=m" (*futex) : "r" (futex), "r" (0), "r" (1) : "r1", "r26", "r25", "r24", "r23", "r22", "r21", "r20", "r28", "r31", "memory" ); if(lws_errno == 14 || lws_errno == 251) asm ("iitlbp %r0,(%sr0, %r0)"); lws_ret; }) != 0; } static inline int __attribute__((always_inline)) __lll_robust_mutex_trylock(int *futex, int id) { return ({ volatile int lws_errno = 14; volatile int lws_ret = 0xdeadbeef; asm volatile( "0: \n\t" "copy %3, %%r26 \n\t" "copy %4, %%r25 \n\t" "copy %5, %%r24 \n\t" "ble " "0xb0" "(%%sr2, %%r0) \n\t" "ldi " "0" ", %%r20 \n\t" "cmpib,=,n " "11" ",%%r21,0b \n\t" "nop \n\t" "stw %%r28, %0 \n\t" "sub %%r0, %%r21, %%r21 \n\t" "stw %%r21, %1 \n\t" : "=m" (lws_ret), "=m" (lws_errno), "=m" (*futex) : "r" (futex), "r" (0), "r" (id) : "r1", "r26", "r25", "r24", "r23", "r22", "r21", "r20", "r28", "r31", "memory" ); if(lws_errno == 14 || lws_errno == 251) asm ("iitlbp %r0,(%sr0, %r0)"); lws_ret; }) != 0; } static inline int __attribute__((always_inline)) __lll_mutex_cond_trylock(lll_lock_t *futex) { return ({ volatile int lws_errno = 14; volatile int lws_ret = 0xdeadbeef; asm volatile( "0: \n\t" "copy %3, %%r26 \n\t" "copy %4, %%r25 \n\t" "copy %5, %%r24 \n\t" "ble " "0xb0" "(%%sr2, %%r0) \n\t" "ldi " "0" ", %%r20 \n\t" "cmpib,=,n " "11" ",%%r21,0b \n\t" "nop \n\t" "stw %%r28, %0 \n\t" "sub %%r0, %%r21, %%r21 \n\t" "stw %%r21, %1 \n\t" : "=m" (lws_ret), "=m" (lws_errno), "=m" (*futex) : "r" (futex), "r" (0), "r" (2) : "r1", "r26", "r25", "r24", "r23", "r22", "r21", "r20", "r28", "r31", "memory" ); if(lws_errno == 14 || lws_errno == 251) asm ("iitlbp %r0,(%sr0, %r0)"); lws_ret; }) != 0; } extern void __lll_lock_wait (lll_lock_t *futex) ; static inline void __attribute__((always_inline)) __lll_mutex_lock(lll_lock_t *futex) { if (({ int ret; ret = ({ volatile int lws_errno = 14; volatile int lws_ret = 0xdeadbeef; asm volatile( "0: \n\t" "copy %3, %%r26 \n\t" "copy %4, %%r25 \n\t" "copy %5, %%r24 \n\t" "ble " "0xb0" "(%%sr2, %%r0) \n\t" "ldi " "0" ", %%r20 \n\t" "cmpib,=,n " "11" ",%%r21,0b \n\t" "nop \n\t" "stw %%r28, %0 \n\t" "sub %%r0, %%r21, %%r21 \n\t" "stw %%r21, %1 \n\t" : "=m" (lws_ret), "=m" (lws_errno), "=m" (*futex) : "r" (futex), "r" (0), "r" (1) : "r1", "r26", "r25", "r24", "r23", "r22", "r21", "r20", "r28", "r31", "memory" ); if(lws_errno == 14 || lws_errno == 251) asm ("iitlbp %r0,(%sr0, %r0)"); lws_ret; }); (ret != 0); }) != 0) __lll_lock_wait (futex); } extern int __lll_robust_lock_wait (int *futex) ; static inline int __attribute__ ((always_inline)) __lll_robust_mutex_lock (int *futex, int id) { int result = 0; if (({ int ret; ret = ({ volatile int lws_errno = 14; volatile int lws_ret = 0xdeadbeef; asm volatile( "0: \n\t" "copy %3, %%r26 \n\t" "copy %4, %%r25 \n\t" "copy %5, %%r24 \n\t" "ble " "0xb0" "(%%sr2, %%r0) \n\t" "ldi " "0" ", %%r20 \n\t" "cmpib,=,n " "11" ",%%r21,0b \n\t" "nop \n\t" "stw %%r28, %0 \n\t" "sub %%r0, %%r21, %%r21 \n\t" "stw %%r21, %1 \n\t" : "=m" (lws_ret), "=m" (lws_errno), "=m" (*futex) : "r" (futex), "r" (0), "r" (id) : "r1", "r26", "r25", "r24", "r23", "r22", "r21", "r20", "r28", "r31", "memory" ); if(lws_errno == 14 || lws_errno == 251) asm ("iitlbp %r0,(%sr0, %r0)"); lws_ret; }); (ret != 0); }) != 0) result = __lll_robust_lock_wait (futex); return result; } static inline void __attribute__ ((always_inline)) __lll_mutex_cond_lock (lll_lock_t *futex) { if (({ int ret; ret = ({ volatile int lws_errno = 14; volatile int lws_ret = 0xdeadbeef; asm volatile( "0: \n\t" "copy %3, %%r26 \n\t" "copy %4, %%r25 \n\t" "copy %5, %%r24 \n\t" "ble " "0xb0" "(%%sr2, %%r0) \n\t" "ldi " "0" ", %%r20 \n\t" "cmpib,=,n " "11" ",%%r21,0b \n\t" "nop \n\t" "stw %%r28, %0 \n\t" "sub %%r0, %%r21, %%r21 \n\t" "stw %%r21, %1 \n\t" : "=m" (lws_ret), "=m" (lws_errno), "=m" (*futex) : "r" (futex), "r" (0), "r" (2) : "r1", "r26", "r25", "r24", "r23", "r22", "r21", "r20", "r28", "r31", "memory" ); if(lws_errno == 14 || lws_errno == 251) asm ("iitlbp %r0,(%sr0, %r0)"); lws_ret; }); (ret != 0); }) != 0) __lll_lock_wait (futex); } extern int __lll_timedlock_wait (lll_lock_t *futex, const struct timespec *) ; extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *) ; static inline int __attribute__ ((always_inline)) __lll_mutex_timedlock (lll_lock_t *futex, const struct timespec *abstime) { int result = 0; if (({ int ret; ret = ({ volatile int lws_errno = 14; volatile int lws_ret = 0xdeadbeef; asm volatile( "0: \n\t" "copy %3, %%r26 \n\t" "copy %4, %%r25 \n\t" "copy %5, %%r24 \n\t" "ble " "0xb0" "(%%sr2, %%r0) \n\t" "ldi " "0" ", %%r20 \n\t" "cmpib,=,n " "11" ",%%r21,0b \n\t" "nop \n\t" "stw %%r28, %0 \n\t" "sub %%r0, %%r21, %%r21 \n\t" "stw %%r21, %1 \n\t" : "=m" (lws_ret), "=m" (lws_errno), "=m" (*futex) : "r" (futex), "r" (0), "r" (1) : "r1", "r26", "r25", "r24", "r23", "r22", "r21", "r20", "r28", "r31", "memory" ); if(lws_errno == 14 || lws_errno == 251) asm ("iitlbp %r0,(%sr0, %r0)"); lws_ret; }); (ret != 0); }) != 0) result = __lll_timedlock_wait (futex, abstime); return result; } static inline int __attribute__ ((always_inline)) __lll_robust_mutex_timedlock (int *futex, const struct timespec *abstime, int id) { int result = 0; if (({ int ret; ret = ({ volatile int lws_errno = 14; volatile int lws_ret = 0xdeadbeef; asm volatile( "0: \n\t" "copy %3, %%r26 \n\t" "copy %4, %%r25 \n\t" "copy %5, %%r24 \n\t" "ble " "0xb0" "(%%sr2, %%r0) \n\t" "ldi " "0" ", %%r20 \n\t" "cmpib,=,n " "11" ",%%r21,0b \n\t" "nop \n\t" "stw %%r28, %0 \n\t" "sub %%r0, %%r21, %%r21 \n\t" "stw %%r21, %1 \n\t" : "=m" (lws_ret), "=m" (lws_errno), "=m" (*futex) : "r" (futex), "r" (0), "r" (id) : "r1", "r26", "r25", "r24", "r23", "r22", "r21", "r20", "r28", "r31", "memory" ); if(lws_errno == 14 || lws_errno == 251) asm ("iitlbp %r0,(%sr0, %r0)"); lws_ret; }); (ret != 0); }) != 0) result = __lll_robust_timedlock_wait (futex, abstime); return result; } static inline void __attribute__ ((always_inline)) __lll_mutex_unlock (lll_lock_t *futex) { int val = ({ __typeof (*(futex)) __atg5_oldval; __typeof (futex) __atg5_memp = (futex); __typeof (*(futex)) __atg5_value = (0); do __atg5_oldval = *__atg5_memp; while (__builtin_expect (({ int ret; ret = ({ volatile int lws_errno = 14; volatile int lws_ret = 0xdeadbeef; asm volatile( "0: \n\t" "copy %3, %%r26 \n\t" "copy %4, %%r25 \n\t" "copy %5, %%r24 \n\t" "ble " "0xb0" "(%%sr2, %%r0) \n\t" "ldi " "0" ", %%r20 \n\t" "cmpib,=,n " "11" ",%%r21,0b \n\t" "nop \n\t" "stw %%r28, %0 \n\t" "sub %%r0, %%r21, %%r21 \n\t" "stw %%r21, %1 \n\t" : "=m" (lws_ret), "=m" (lws_errno), "=m" (*__atg5_memp) : "r" (__atg5_memp), "r" (__atg5_oldval), "r" (__atg5_value) : "r1", "r26", "r25", "r24", "r23", "r22", "r21", "r20", "r28", "r31", "memory" ); if(lws_errno == 14 || lws_errno == 251) asm ("iitlbp %r0,(%sr0, %r0)"); lws_ret; }); (ret != __atg5_oldval); }), 0)); __atg5_oldval; }); if (__builtin_expect (val > 1, 0)) ({ ; long int __ret; __ret = ({ long __sys_res; { register unsigned long __res asm("r28"); register unsigned long __r23 __asm__("r23") = (unsigned long)(0); register unsigned long __r24 __asm__("r24") = (unsigned long)((1)); register unsigned long __r25 __asm__("r25") = (unsigned long)(1); register unsigned long __r26 __asm__("r26") = (unsigned long)((futex)); asm volatile( "nop \n" " ble 0x100(%%sr2, %%r0)\n" " ldi %1, %%r20\n" "nop \n" : "=r" (__res) : "i" (((0 + 210))) , "r" (__r26), "r" (__r25), "r" (__r24), "r" (__r23) : "memory", "%r1", "%r2", "%r20", "%r29", "%r31" , "%r21", "%r22" ); __sys_res = (long)__res; } __sys_res; }); __ret; }); } static inline void __attribute__ ((always_inline)) __lll_robust_mutex_unlock (int *futex, int mask) { int val = ({ __typeof (*(futex)) __atg5_oldval; __typeof (futex) __atg5_memp = (futex); __typeof (*(futex)) __atg5_value = (0); do __atg5_oldval = *__atg5_memp; while (__builtin_expect (({ int ret; ret = ({ volatile int lws_errno = 14; volatile int lws_ret = 0xdeadbeef; asm volatile( "0: \n\t" "copy %3, %%r26 \n\t" "copy %4, %%r25 \n\t" "copy %5, %%r24 \n\t" "ble " "0xb0" "(%%sr2, %%r0) \n\t" "ldi " "0" ", %%r20 \n\t" "cmpib,=,n " "11" ",%%r21,0b \n\t" "nop \n\t" "stw %%r28, %0 \n\t" "sub %%r0, %%r21, %%r21 \n\t" "stw %%r21, %1 \n\t" : "=m" (lws_ret), "=m" (lws_errno), "=m" (*__atg5_memp) : "r" (__atg5_memp), "r" (__atg5_oldval), "r" (__atg5_value) : "r1", "r26", "r25", "r24", "r23", "r22", "r21", "r20", "r28", "r31", "memory" ); if(lws_errno == 14 || lws_errno == 251) asm ("iitlbp %r0,(%sr0, %r0)"); lws_ret; }); (ret != __atg5_oldval); }), 0)); __atg5_oldval; }); if (__builtin_expect (val & mask, 0)) ({ ; long int __ret; __ret = ({ long __sys_res; { register unsigned long __res asm("r28"); register unsigned long __r23 __asm__("r23") = (unsigned long)(0); register unsigned long __r24 __asm__("r24") = (unsigned long)((1)); register unsigned long __r25 __asm__("r25") = (unsigned long)(1); register unsigned long __r26 __asm__("r26") = (unsigned long)((futex)); asm volatile( "nop \n" " ble 0x100(%%sr2, %%r0)\n" " ldi %1, %%r20\n" "nop \n" : "=r" (__res) : "i" (((0 + 210))) , "r" (__r26), "r" (__r25), "r" (__r24), "r" (__r23) : "memory", "%r1", "%r2", "%r20", "%r29", "%r31" , "%r21", "%r22" ); __sys_res = (long)__res; } __sys_res; }); __ret; }); } static inline void __attribute__ ((always_inline)) __lll_mutex_unlock_force (lll_lock_t *futex) { (void) ({ __typeof (*(futex)) __atg5_oldval; __typeof (futex) __atg5_memp = (futex); __typeof (*(futex)) __atg5_value = (0); do __atg5_oldval = *__atg5_memp; while (__builtin_expect (({ int ret; ret = ({ volatile int lws_errno = 14; volatile int lws_ret = 0xdeadbeef; asm volatile( "0: \n\t" "copy %3, %%r26 \n\t" "copy %4, %%r25 \n\t" "copy %5, %%r24 \n\t" "ble " "0xb0" "(%%sr2, %%r0) \n\t" "ldi " "0" ", %%r20 \n\t" "cmpib,=,n " "11" ",%%r21,0b \n\t" "nop \n\t" "stw %%r28, %0 \n\t" "sub %%r0, %%r21, %%r21 \n\t" "stw %%r21, %1 \n\t" : "=m" (lws_ret), "=m" (lws_errno), "=m" (*__atg5_memp) : "r" (__atg5_memp), "r" (__atg5_oldval), "r" (__atg5_value) : "r1", "r26", "r25", "r24", "r23", "r22", "r21", "r20", "r28", "r31", "memory" ); if(lws_errno == 14 || lws_errno == 251) asm ("iitlbp %r0,(%sr0, %r0)"); lws_ret; }); (ret != __atg5_oldval); }), 0)); __atg5_oldval; }); ({ ; long int __ret; __ret = ({ long __sys_res; { register unsigned long __res asm("r28"); register unsigned long __r23 __asm__("r23") = (unsigned long)(0); register unsigned long __r24 __asm__("r24") = (unsigned long)((1)); register unsigned long __r25 __asm__("r25") = (unsigned long)(1); register unsigned long __r26 __asm__("r26") = (unsigned long)((futex)); asm volatile( "nop \n" " ble 0x100(%%sr2, %%r0)\n" " ldi %1, %%r20\n" "nop \n" : "=r" (__res) : "i" (((0 + 210))) , "r" (__r26), "r" (__r25), "r" (__r24), "r" (__r23) : "memory", "%r1", "%r2", "%r20", "%r29", "%r31" , "%r21", "%r22" ); __sys_res = (long)__res; } __sys_res; }); __ret; }); } # 242 "../ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h" extern int lll_unlock_wake_cb (lll_lock_t *__futex) ; # 265 "../ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h" extern int __lll_timedwait_tid (int *, const struct timespec *) ; # 279 "../ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h" extern void __lll_cond_wait (pthread_cond_t *cond) ; extern int __lll_cond_timedwait (pthread_cond_t *cond, const struct timespec *abstime) ; extern void __lll_cond_wake (pthread_cond_t *cond) ; extern void __lll_cond_broadcast (pthread_cond_t *cond) ; # 31 "../nptl/descr.h" 2 # 1 "../ports/sysdeps/hppa/nptl/pthreaddef.h" 1 # 34 "../ports/sysdeps/hppa/nptl/pthreaddef.h" register char * stack_pointer __asm__ ("%r30"); # 32 "../nptl/descr.h" 2 # 1 "../sysdeps/unix/sysv/linux/dl-sysdep.h" 1 # 20 "../sysdeps/unix/sysv/linux/dl-sysdep.h" # 1 "../sysdeps/generic/dl-sysdep.h" 1 # 21 "../sysdeps/unix/sysv/linux/dl-sysdep.h" 2 # 33 "../nptl/descr.h" 2 # 1 "../nptl/../nptl_db/thread_db.h" 1 # 26 "../nptl/../nptl_db/thread_db.h" # 1 "../include/pthread.h" 1 # 1 "../nptl/sysdeps/pthread/pthread.h" 1 # 27 "../nptl/sysdeps/pthread/pthread.h" # 1 "../include/signal.h" 1 # 1 "../signal/signal.h" 1 # 31 "../signal/signal.h" # 1 "../sysdeps/unix/sysv/linux/bits/sigset.h" 1 # 34 "../signal/signal.h" 2 # 400 "../signal/signal.h" # 4 "../include/signal.h" 2 # 28 "../nptl/sysdeps/pthread/pthread.h" 2 # 1 "../sysdeps/wordsize-32/bits/wordsize.h" 1 # 31 "../nptl/sysdeps/pthread/pthread.h" 2 enum { PTHREAD_CREATE_JOINABLE, PTHREAD_CREATE_DETACHED }; enum { PTHREAD_MUTEX_TIMED_NP, PTHREAD_MUTEX_RECURSIVE_NP, PTHREAD_MUTEX_ERRORCHECK_NP, PTHREAD_MUTEX_ADAPTIVE_NP , PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP, PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP, PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP, PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP }; enum { PTHREAD_MUTEX_STALLED_NP, PTHREAD_MUTEX_ROBUST_NP }; enum { PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT, PTHREAD_PRIO_PROTECT }; # 113 "../nptl/sysdeps/pthread/pthread.h" enum { PTHREAD_RWLOCK_PREFER_READER_NP, PTHREAD_RWLOCK_PREFER_WRITER_NP, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP }; # 143 "../nptl/sysdeps/pthread/pthread.h" enum { PTHREAD_INHERIT_SCHED, PTHREAD_EXPLICIT_SCHED }; enum { PTHREAD_SCOPE_SYSTEM, PTHREAD_SCOPE_PROCESS }; enum { PTHREAD_PROCESS_PRIVATE, PTHREAD_PROCESS_SHARED }; # 178 "../nptl/sysdeps/pthread/pthread.h" struct _pthread_cleanup_buffer { void (*__routine) (void *); void *__arg; int __canceltype; struct _pthread_cleanup_buffer *__prev; }; enum { PTHREAD_CANCEL_ENABLE, PTHREAD_CANCEL_DISABLE }; enum { PTHREAD_CANCEL_DEFERRED, PTHREAD_CANCEL_ASYNCHRONOUS }; # 216 "../nptl/sysdeps/pthread/pthread.h" extern int pthread_create (pthread_t *__restrict __newthread, __const pthread_attr_t *__restrict __attr, void *(*__start_routine) (void *), void *__restrict __arg) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))); extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__)); extern int pthread_join (pthread_t __th, void **__thread_return); extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) __attribute__ ((__nothrow__)); extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return, __const struct timespec *__abstime); extern int pthread_detach (pthread_t __th) __attribute__ ((__nothrow__)); extern pthread_t pthread_self (void) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) __attribute__ ((__nothrow__)); extern int pthread_attr_init (pthread_attr_t *__attr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_attr_destroy (pthread_attr_t *__attr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr, int *__detachstate) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_attr_setdetachstate (pthread_attr_t *__attr, int __detachstate) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_attr_getguardsize (__const pthread_attr_t *__attr, size_t *__guardsize) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_attr_setguardsize (pthread_attr_t *__attr, size_t __guardsize) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict __attr, struct sched_param *__restrict __param) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr, __const struct sched_param *__restrict __param) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict __attr, int *__restrict __policy) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict __attr, int *__restrict __inherit) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_attr_setinheritsched (pthread_attr_t *__attr, int __inherit) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr, int *__restrict __scope) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict __attr, void **__restrict __stackaddr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__)); extern int pthread_attr_setstackaddr (pthread_attr_t *__attr, void *__stackaddr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)); extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict __attr, size_t *__restrict __stacksize) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_attr_setstacksize (pthread_attr_t *__attr, size_t __stacksize) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr, void **__restrict __stackaddr, size_t *__restrict __stacksize) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2, 3))); extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, size_t __stacksize) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr, size_t __cpusetsize, __const cpu_set_t *__cpuset) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))); extern int pthread_attr_getaffinity_np (__const pthread_attr_t *__attr, size_t __cpusetsize, cpu_set_t *__cpuset) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))); extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); extern int pthread_setschedparam (pthread_t __target_thread, int __policy, __const struct sched_param *__param) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))); extern int pthread_getschedparam (pthread_t __target_thread, int *__restrict __policy, struct sched_param *__restrict __param) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); extern int pthread_setschedprio (pthread_t __target_thread, int __prio) __attribute__ ((__nothrow__)); extern int pthread_getconcurrency (void) __attribute__ ((__nothrow__)); extern int pthread_setconcurrency (int __level) __attribute__ ((__nothrow__)); extern int pthread_yield (void) __attribute__ ((__nothrow__)); extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize, __const cpu_set_t *__cpuset) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))); extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize, cpu_set_t *__cpuset) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))); # 462 "../nptl/sysdeps/pthread/pthread.h" extern int pthread_once (pthread_once_t *__once_control, void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2))); # 474 "../nptl/sysdeps/pthread/pthread.h" extern int pthread_setcancelstate (int __state, int *__oldstate); extern int pthread_setcanceltype (int __type, int *__oldtype); extern int pthread_cancel (pthread_t __th); extern void pthread_testcancel (void); typedef struct { struct { __jmp_buf __cancel_jmp_buf; int __mask_was_saved; } __cancel_jmp_buf[1]; void *__pad[4]; } __pthread_unwind_buf_t __attribute__ ((__aligned__)); # 508 "../nptl/sysdeps/pthread/pthread.h" struct __pthread_cleanup_frame { void (*__cancel_routine) (void *); void *__cancel_arg; int __do_it; int __cancel_type; }; # 648 "../nptl/sysdeps/pthread/pthread.h" extern void __pthread_register_cancel (__pthread_unwind_buf_t *__buf) ; # 659 "../nptl/sysdeps/pthread/pthread.h" extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf) ; # 682 "../nptl/sysdeps/pthread/pthread.h" extern void __pthread_register_cancel_defer (__pthread_unwind_buf_t *__buf) ; # 694 "../nptl/sysdeps/pthread/pthread.h" extern void __pthread_unregister_cancel_restore (__pthread_unwind_buf_t *__buf) ; extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf) __attribute__ ((__noreturn__)) __attribute__ ((__weak__)) ; struct __jmp_buf_tag; extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __attribute__ ((__nothrow__)); extern int pthread_mutex_init (pthread_mutex_t *__mutex, __const pthread_mutexattr_t *__mutexattr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_mutex_trylock (pthread_mutex_t *__mutex) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_mutex_lock (pthread_mutex_t *__mutex) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, __const struct timespec *__restrict __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_mutex_getprioceiling (__const pthread_mutex_t * __restrict __mutex, int *__restrict __prioceiling) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex, int __prioceiling, int *__restrict __old_ceiling) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))); extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t * __restrict __attr, int *__restrict __pshared) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr, int __pshared) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict __attr, int *__restrict __kind) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_mutexattr_getprotocol (__const pthread_mutexattr_t * __restrict __attr, int *__restrict __protocol) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr, int __protocol) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_mutexattr_getprioceiling (__const pthread_mutexattr_t * __restrict __attr, int *__restrict __prioceiling) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr, int __prioceiling) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_mutexattr_getrobust_np (__const pthread_mutexattr_t *__attr, int *__robustness) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr, int __robustness) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); # 842 "../nptl/sysdeps/pthread/pthread.h" extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, __const pthread_rwlockattr_t *__restrict __attr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, __const struct timespec *__restrict __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, __const struct timespec *__restrict __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t * __restrict __attr, int *__restrict __pshared) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, int __pshared) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t * __restrict __attr, int *__restrict __pref) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr, int __pref) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_cond_init (pthread_cond_t *__restrict __cond, __const pthread_condattr_t *__restrict __cond_attr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_cond_destroy (pthread_cond_t *__cond) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_cond_signal (pthread_cond_t *__cond) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_cond_broadcast (pthread_cond_t *__cond) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_cond_wait (pthread_cond_t *__restrict __cond, pthread_mutex_t *__restrict __mutex) __attribute__ ((__nonnull__ (1, 2))); # 954 "../nptl/sysdeps/pthread/pthread.h" extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond, pthread_mutex_t *__restrict __mutex, __const struct timespec *__restrict __abstime) __attribute__ ((__nonnull__ (1, 2, 3))); extern int pthread_condattr_init (pthread_condattr_t *__attr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_condattr_destroy (pthread_condattr_t *__attr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_condattr_getpshared (__const pthread_condattr_t * __restrict __attr, int *__restrict __pshared) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_condattr_setpshared (pthread_condattr_t *__attr, int __pshared) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_condattr_getclock (__const pthread_condattr_t * __restrict __attr, __clockid_t *__restrict __clock_id) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_condattr_setclock (pthread_condattr_t *__attr, __clockid_t __clock_id) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); # 998 "../nptl/sysdeps/pthread/pthread.h" extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_spin_destroy (pthread_spinlock_t *__lock) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_spin_lock (pthread_spinlock_t *__lock) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_spin_trylock (pthread_spinlock_t *__lock) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_spin_unlock (pthread_spinlock_t *__lock) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier, __const pthread_barrierattr_t *__restrict __attr, unsigned int __count) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_barrier_wait (pthread_barrier_t *__barrier) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t * __restrict __attr, int *__restrict __pshared) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr, int __pshared) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); # 1065 "../nptl/sysdeps/pthread/pthread.h" extern int pthread_key_create (pthread_key_t *__key, void (*__destr_function) (void *)) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int pthread_key_delete (pthread_key_t __key) __attribute__ ((__nothrow__)); extern void *pthread_getspecific (pthread_key_t __key) __attribute__ ((__nothrow__)); extern int pthread_setspecific (pthread_key_t __key, __const void *__pointer) __attribute__ ((__nothrow__)) ; extern int pthread_getcpuclockid (pthread_t __thread_id, __clockid_t *__clock_id) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); # 1099 "../nptl/sysdeps/pthread/pthread.h" extern int pthread_atfork (void (*__prepare) (void), void (*__parent) (void), void (*__child) (void)) __attribute__ ((__nothrow__)); extern __inline int __attribute__ ((__nothrow__)) pthread_equal (pthread_t __thread1, pthread_t __thread2) { return __thread1 == __thread2; } # 2 "../include/pthread.h" 2 extern void __pthread_initialize (void) __attribute__ ((weak)); # 27 "../nptl/../nptl_db/thread_db.h" 2 # 1 "../include/sys/types.h" 1 # 29 "../nptl/../nptl_db/thread_db.h" 2 # 1 "../ports/sysdeps/unix/sysv/linux/hppa/sys/procfs.h" 1 # 32 "../ports/sysdeps/unix/sysv/linux/hppa/sys/procfs.h" # 1 "../include/signal.h" 1 # 1 "../signal/signal.h" 1 # 31 "../signal/signal.h" # 1 "../sysdeps/unix/sysv/linux/bits/sigset.h" 1 # 103 "../sysdeps/unix/sysv/linux/bits/sigset.h" extern int __sigismember (__const __sigset_t *, int); extern int __sigaddset (__sigset_t *, int); extern int __sigdelset (__sigset_t *, int); # 117 "../sysdeps/unix/sysv/linux/bits/sigset.h" extern __inline int __sigismember (__const __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return (__set->__val[__word] & __mask) ? 1 : 0; } extern __inline int __sigaddset ( __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return ((__set->__val[__word] |= __mask), 0); } extern __inline int __sigdelset ( __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return ((__set->__val[__word] &= ~__mask), 0); } # 34 "../signal/signal.h" 2 typedef __sig_atomic_t sig_atomic_t; # 58 "../signal/signal.h" # 1 "../ports/sysdeps/unix/sysv/linux/hppa/bits/signum.h" 1 # 59 "../signal/signal.h" 2 # 75 "../signal/signal.h" typedef void (*__sighandler_t) (int); extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler) __attribute__ ((__nothrow__)); extern __sighandler_t sysv_signal (int __sig, __sighandler_t __handler) __attribute__ ((__nothrow__)); extern __sighandler_t signal (int __sig, __sighandler_t __handler) __attribute__ ((__nothrow__)); # 104 "../signal/signal.h" extern __sighandler_t bsd_signal (int __sig, __sighandler_t __handler) __attribute__ ((__nothrow__)); extern int kill (__pid_t __pid, int __sig) __attribute__ ((__nothrow__)); extern int killpg (__pid_t __pgrp, int __sig) __attribute__ ((__nothrow__)); extern int raise (int __sig) __attribute__ ((__nothrow__)); extern __sighandler_t ssignal (int __sig, __sighandler_t __handler) __attribute__ ((__nothrow__)); extern int gsignal (int __sig) __attribute__ ((__nothrow__)); extern void psignal (int __sig, __const char *__s); # 153 "../signal/signal.h" extern int __sigpause (int __sig_or_mask, int __is_sig); # 162 "../signal/signal.h" extern int sigpause (int __sig) __asm__ ("__xpg_sigpause"); # 181 "../signal/signal.h" extern int sigblock (int __mask) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__)); extern int sigsetmask (int __mask) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__)); extern int siggetmask (void) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__)); # 196 "../signal/signal.h" typedef __sighandler_t sighandler_t; typedef __sighandler_t sig_t; # 212 "../signal/signal.h" # 1 "../sysdeps/unix/sysv/linux/bits/siginfo.h" 1 # 25 "../sysdeps/unix/sysv/linux/bits/siginfo.h" # 1 "../sysdeps/wordsize-32/bits/wordsize.h" 1 # 26 "../sysdeps/unix/sysv/linux/bits/siginfo.h" 2 typedef union sigval { int sival_int; void *sival_ptr; } sigval_t; # 51 "../sysdeps/unix/sysv/linux/bits/siginfo.h" typedef struct siginfo { int si_signo; int si_errno; int si_code; union { int _pad[((128 / sizeof (int)) - 3)]; struct { __pid_t si_pid; __uid_t si_uid; } _kill; struct { int si_tid; int si_overrun; sigval_t si_sigval; } _timer; struct { __pid_t si_pid; __uid_t si_uid; sigval_t si_sigval; } _rt; struct { __pid_t si_pid; __uid_t si_uid; int si_status; __clock_t si_utime; __clock_t si_stime; } _sigchld; struct { void *si_addr; } _sigfault; struct { long int si_band; int si_fd; } _sigpoll; } _sifields; } siginfo_t; # 129 "../sysdeps/unix/sysv/linux/bits/siginfo.h" enum { SI_ASYNCNL = -60, SI_TKILL = -6, SI_SIGIO, SI_ASYNCIO, SI_MESGQ, SI_TIMER, SI_QUEUE, SI_USER, SI_KERNEL = 0x80 }; enum { ILL_ILLOPC = 1, ILL_ILLOPN, ILL_ILLADR, ILL_ILLTRP, ILL_PRVOPC, ILL_PRVREG, ILL_COPROC, ILL_BADSTK }; enum { FPE_INTDIV = 1, FPE_INTOVF, FPE_FLTDIV, FPE_FLTOVF, FPE_FLTUND, FPE_FLTRES, FPE_FLTINV, FPE_FLTSUB }; enum { SEGV_MAPERR = 1, SEGV_ACCERR }; enum { BUS_ADRALN = 1, BUS_ADRERR, BUS_OBJERR }; enum { TRAP_BRKPT = 1, TRAP_TRACE }; enum { CLD_EXITED = 1, CLD_KILLED, CLD_DUMPED, CLD_TRAPPED, CLD_STOPPED, CLD_CONTINUED }; enum { POLL_IN = 1, POLL_OUT, POLL_MSG, POLL_ERR, POLL_PRI, POLL_HUP }; # 273 "../sysdeps/unix/sysv/linux/bits/siginfo.h" typedef struct sigevent { sigval_t sigev_value; int sigev_signo; int sigev_notify; union { int _pad[((64 / sizeof (int)) - 3)]; __pid_t _tid; struct { void (*_function) (sigval_t); void *_attribute; } _sigev_thread; } _sigev_un; } sigevent_t; enum { SIGEV_SIGNAL = 0, SIGEV_NONE, SIGEV_THREAD, SIGEV_THREAD_ID = 4 }; # 213 "../signal/signal.h" 2 extern int sigemptyset (sigset_t *__set) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int sigfillset (sigset_t *__set) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int sigaddset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int sigdelset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int sigismember (__const sigset_t *__set, int __signo) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int sigisemptyset (__const sigset_t *__set) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int sigandset (sigset_t *__set, __const sigset_t *__left, __const sigset_t *__right) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2, 3))); extern int sigorset (sigset_t *__set, __const sigset_t *__left, __const sigset_t *__right) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2, 3))); # 1 "../ports/sysdeps/unix/sysv/linux/hppa/bits/sigaction.h" 1 # 25 "../ports/sysdeps/unix/sysv/linux/hppa/bits/sigaction.h" struct sigaction { union { __sighandler_t sa_handler; void (*sa_sigaction) (int, siginfo_t *, void *); } __sigaction_handler; unsigned long int sa_flags; __sigset_t sa_mask; }; # 247 "../signal/signal.h" 2 extern int sigprocmask (int __how, __const sigset_t *__restrict __set, sigset_t *__restrict __oset) __attribute__ ((__nothrow__)); extern int sigsuspend (__const sigset_t *__set) __attribute__ ((__nonnull__ (1))); extern int sigaction (int __sig, __const struct sigaction *__restrict __act, struct sigaction *__restrict __oact) __attribute__ ((__nothrow__)); extern int sigpending (sigset_t *__set) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int sigwait (__const sigset_t *__restrict __set, int *__restrict __sig) __attribute__ ((__nonnull__ (1, 2))); extern int sigwaitinfo (__const sigset_t *__restrict __set, siginfo_t *__restrict __info) __attribute__ ((__nonnull__ (1))); extern int sigtimedwait (__const sigset_t *__restrict __set, siginfo_t *__restrict __info, __const struct timespec *__restrict __timeout) __attribute__ ((__nonnull__ (1))); extern int sigqueue (__pid_t __pid, int __sig, __const union sigval __val) __attribute__ ((__nothrow__)); # 304 "../signal/signal.h" extern __const char *__const _sys_siglist[65]; extern __const char *__const sys_siglist[65]; struct sigvec { __sighandler_t sv_handler; int sv_mask; int sv_flags; }; # 328 "../signal/signal.h" extern int sigvec (int __sig, __const struct sigvec *__vec, struct sigvec *__ovec) __attribute__ ((__nothrow__)); # 1 "../sysdeps/unix/sysv/linux/bits/sigcontext.h" 1 # 28 "../sysdeps/unix/sysv/linux/bits/sigcontext.h" # 1 "/usr/include/asm/sigcontext.h" 1 3 4 # 9 "/usr/include/asm/sigcontext.h" 3 4 struct sigcontext { unsigned long sc_flags; unsigned long sc_gr[32]; unsigned long long sc_fr[32]; unsigned long sc_iasq[2]; unsigned long sc_iaoq[2]; unsigned long sc_sar; }; # 29 "../sysdeps/unix/sysv/linux/bits/sigcontext.h" 2 # 334 "../signal/signal.h" 2 extern int sigreturn (struct sigcontext *__scp) __attribute__ ((__nothrow__)); # 346 "../signal/signal.h" extern int siginterrupt (int __sig, int __interrupt) __attribute__ ((__nothrow__)); # 1 "../sysdeps/unix/sysv/linux/bits/sigstack.h" 1 # 26 "../sysdeps/unix/sysv/linux/bits/sigstack.h" struct sigstack { void *ss_sp; int ss_onstack; }; enum { SS_ONSTACK = 1, SS_DISABLE }; # 50 "../sysdeps/unix/sysv/linux/bits/sigstack.h" typedef struct sigaltstack { void *ss_sp; int ss_flags; size_t ss_size; } stack_t; # 349 "../signal/signal.h" 2 # 1 "../ports/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h" 1 # 29 "../ports/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h" # 1 "../sysdeps/unix/sysv/linux/bits/sigcontext.h" 1 # 30 "../ports/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h" 2 typedef unsigned long int greg_t; typedef struct gregset { greg_t g_regs[32]; greg_t sr_regs[8]; greg_t cr_regs[24]; greg_t g_pad[16]; } gregset_t; typedef struct fpregset { double fp_dregs[32]; } fpregset_t; typedef struct sigcontext mcontext_t; typedef struct ucontext { unsigned long int uc_flags; struct ucontext *uc_link; stack_t uc_stack; mcontext_t uc_mcontext; __sigset_t uc_sigmask; } ucontext_t; # 352 "../signal/signal.h" 2 extern int sigstack (struct sigstack *__ss, struct sigstack *__oss) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__)); extern int sigaltstack (__const struct sigaltstack *__restrict __ss, struct sigaltstack *__restrict __oss) __attribute__ ((__nothrow__)); extern int sighold (int __sig) __attribute__ ((__nothrow__)); extern int sigrelse (int __sig) __attribute__ ((__nothrow__)); extern int sigignore (int __sig) __attribute__ ((__nothrow__)); extern __sighandler_t sigset (int __sig, __sighandler_t __disp) __attribute__ ((__nothrow__)); # 1 "../nptl/sysdeps/pthread/bits/sigthread.h" 1 # 31 "../nptl/sysdeps/pthread/bits/sigthread.h" extern int pthread_sigmask (int __how, __const __sigset_t *__restrict __newmask, __sigset_t *__restrict __oldmask)__attribute__ ((__nothrow__)); extern int pthread_kill (pthread_t __threadid, int __signo) __attribute__ ((__nothrow__)); # 388 "../signal/signal.h" 2 extern int __libc_current_sigrtmin (void) __attribute__ ((__nothrow__)); extern int __libc_current_sigrtmax (void) __attribute__ ((__nothrow__)); # 6 "../include/signal.h" 2 extern __sighandler_t __bsd_signal (int __sig, __sighandler_t __handler); extern int __kill (__pid_t __pid, int __sig); extern int __sigaction (int __sig, __const struct sigaction *__restrict __act, struct sigaction *__restrict __oact); extern int __sigblock (int __mask); extern int __sigsetmask (int __mask); extern int __sigprocmask (int __how, __const sigset_t *__set, sigset_t *__oset); extern int __sigsuspend (__const sigset_t *__set); extern int __sigsuspend_nocancel (__const sigset_t *__set) ; extern int __sigwait (__const sigset_t *__set, int *__sig); extern int __sigwaitinfo (__const sigset_t *__set, siginfo_t *__info); extern int __sigtimedwait (__const sigset_t *__set, siginfo_t *__info, __const struct timespec *__timeout); extern int __sigqueue (__pid_t __pid, int __sig, __const union sigval __val); extern int __sigvec (int __sig, __const struct sigvec *__vec, struct sigvec *__ovec); extern int __sigreturn (struct sigcontext *__scp); extern int __sigaltstack (__const struct sigaltstack *__ss, struct sigaltstack *__oss); extern int __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact); extern int __sigpause (int sig_or_mask, int is_sig); extern int __default_sigpause (int mask); extern int __xpg_sigpause (int sig); extern int __libc_allocate_rtsig (int __high); # 33 "../ports/sysdeps/unix/sysv/linux/hppa/sys/procfs.h" 2 # 1 "../include/sys/time.h" 1 # 1 "../time/sys/time.h" 1 # 29 "../time/sys/time.h" # 1 "../bits/time.h" 1 # 30 "../time/sys/time.h" 2 # 39 "../time/sys/time.h" # 57 "../time/sys/time.h" struct timezone { int tz_minuteswest; int tz_dsttime; }; typedef struct timezone *__restrict __timezone_ptr_t; # 73 "../time/sys/time.h" extern int gettimeofday (struct timeval *__restrict __tv, __timezone_ptr_t __tz) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int settimeofday (__const struct timeval *__tv, __const struct timezone *__tz) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int adjtime (__const struct timeval *__delta, struct timeval *__olddelta) __attribute__ ((__nothrow__)); enum __itimer_which { ITIMER_REAL = 0, ITIMER_VIRTUAL = 1, ITIMER_PROF = 2 }; struct itimerval { struct timeval it_interval; struct timeval it_value; }; typedef enum __itimer_which __itimer_which_t; extern int getitimer (__itimer_which_t __which, struct itimerval *__value) __attribute__ ((__nothrow__)); extern int setitimer (__itimer_which_t __which, __const struct itimerval *__restrict __new, struct itimerval *__restrict __old) __attribute__ ((__nothrow__)); extern int utimes (__const char *__file, __const struct timeval __tvp[2]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int lutimes (__const char *__file, __const struct timeval __tvp[2]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int futimes (int __fd, __const struct timeval __tvp[2]) __attribute__ ((__nothrow__)); extern int futimesat (int __fd, __const char *__file, __const struct timeval __tvp[2]) __attribute__ ((__nothrow__)); # 191 "../time/sys/time.h" # 3 "../include/sys/time.h" 2 extern int __gettimeofday (struct timeval *__tv, struct timezone *__tz); extern int __gettimeofday_internal (struct timeval *__tv, struct timezone *__tz) ; extern int __settimeofday (__const struct timeval *__tv, __const struct timezone *__tz) ; extern int __adjtime (__const struct timeval *__delta, struct timeval *__olddelta); extern int __getitimer (enum __itimer_which __which, struct itimerval *__value); extern int __setitimer (enum __itimer_which __which, __const struct itimerval *__restrict __new, struct itimerval *__restrict __old) ; extern int __utimes (__const char *__file, const struct timeval __tvp[2]) ; extern int __futimes (int fd, __const struct timeval tvp[2]) ; # 34 "../ports/sysdeps/unix/sysv/linux/hppa/sys/procfs.h" 2 # 1 "../include/sys/types.h" 1 # 35 "../ports/sysdeps/unix/sysv/linux/hppa/sys/procfs.h" 2 # 1 "../sysdeps/unix/sysv/linux/sys/user.h" 1 # 1 "/usr/include/linux/user.h" 1 3 4 # 1 "/usr/include/asm/user.h" 1 3 4 # 1 "/usr/include/linux/user.h" 2 3 4 # 1 "../sysdeps/unix/sysv/linux/sys/user.h" 2 # 37 "../ports/sysdeps/unix/sysv/linux/hppa/sys/procfs.h" 2 # 1 "/usr/include/asm/elf.h" 1 3 4 # 1 "/usr/include/asm/ptrace.h" 1 3 4 # 1 "/usr/include/linux/types.h" 1 3 4 # 1 "../include/sys/types.h" 1 3 4 # 5 "/usr/include/linux/types.h" 2 3 4 # 1 "../sysdeps/generic/inttypes.h" 1 3 4 # 35 "../sysdeps/generic/inttypes.h" 3 4 typedef long int __gwchar_t; # 274 "../sysdeps/generic/inttypes.h" 3 4 # 288 "../sysdeps/generic/inttypes.h" 3 4 typedef struct { long long int quot; long long int rem; } imaxdiv_t; extern intmax_t imaxabs (intmax_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern intmax_t strtoimax (__const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__ ((__nothrow__)); extern uintmax_t strtoumax (__const char *__restrict __nptr, char ** __restrict __endptr, int __base) __attribute__ ((__nothrow__)); extern intmax_t wcstoimax (__const __gwchar_t *__restrict __nptr, __gwchar_t **__restrict __endptr, int __base) __attribute__ ((__nothrow__)); extern uintmax_t wcstoumax (__const __gwchar_t *__restrict __nptr, __gwchar_t ** __restrict __endptr, int __base) __attribute__ ((__nothrow__)); # 396 "../sysdeps/generic/inttypes.h" 3 4 extern __inline intmax_t __attribute__ ((__nothrow__)) strtoimax (__const char *__restrict nptr, char **__restrict endptr, int base) { return __strtoll_internal (nptr, endptr, base, 0); } # 414 "../sysdeps/generic/inttypes.h" 3 4 extern __inline uintmax_t __attribute__ ((__nothrow__)) strtoumax (__const char *__restrict nptr, char **__restrict endptr, int base) { return __strtoull_internal (nptr, endptr, base, 0); } __extension__ extern long long int __wcstoll_internal (__const __gwchar_t * __restrict __nptr, __gwchar_t **__restrict __endptr, int __base, int __group) __attribute__ ((__nothrow__)); extern __inline intmax_t __attribute__ ((__nothrow__)) wcstoimax (__const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base) { return __wcstoll_internal (nptr, endptr, base, 0); } __extension__ extern unsigned long long int __wcstoull_internal (__const __gwchar_t * __restrict __nptr, __gwchar_t ** __restrict __endptr, int __base, int __group) __attribute__ ((__nothrow__)); extern __inline uintmax_t __attribute__ ((__nothrow__)) wcstoumax (__const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base) { return __wcstoull_internal (nptr, endptr, base, 0); } # 6 "/usr/include/linux/types.h" 2 3 4 # 1 "/usr/include/linux/posix_types.h" 1 3 4 # 1 "/usr/include/linux/stddef.h" 1 3 4 # 5 "/usr/include/linux/posix_types.h" 2 3 4 # 36 "/usr/include/linux/posix_types.h" 3 4 typedef struct { unsigned long fds_bits [(1024/(8 * sizeof(unsigned long)))]; } __kernel_fd_set; typedef void (*__kernel_sighandler_t)(int); typedef int __kernel_key_t; typedef int __kernel_mqd_t; # 1 "/usr/include/asm/posix_types.h" 1 3 4 # 9 "/usr/include/asm/posix_types.h" 3 4 typedef unsigned long __kernel_ino_t; typedef unsigned short __kernel_mode_t; typedef unsigned short __kernel_nlink_t; typedef long __kernel_off_t; typedef int __kernel_pid_t; typedef unsigned short __kernel_ipc_pid_t; typedef unsigned int __kernel_uid_t; typedef unsigned int __kernel_gid_t; typedef int __kernel_suseconds_t; typedef long __kernel_clock_t; typedef int __kernel_timer_t; typedef int __kernel_clockid_t; typedef int __kernel_daddr_t; typedef unsigned int __kernel_size_t; typedef int __kernel_ssize_t; typedef int __kernel_ptrdiff_t; typedef long __kernel_time_t; typedef char * __kernel_caddr_t; typedef unsigned short __kernel_uid16_t; typedef unsigned short __kernel_gid16_t; typedef unsigned int __kernel_uid32_t; typedef unsigned int __kernel_gid32_t; typedef long long __kernel_loff_t; typedef long long __kernel_off64_t; typedef unsigned long long __kernel_ino64_t; typedef unsigned int __kernel_old_dev_t; typedef struct { int __val[2]; } __kernel_fsid_t; typedef __kernel_uid_t __kernel_old_uid_t; typedef __kernel_gid_t __kernel_old_gid_t; # 48 "/usr/include/linux/posix_types.h" 2 3 4 # 7 "/usr/include/linux/types.h" 2 3 4 # 1 "/usr/include/asm/types.h" 1 3 4 typedef unsigned short umode_t; typedef __signed__ char __s8; typedef unsigned char __u8; typedef __signed__ short __s16; typedef unsigned short __u16; typedef __signed__ int __s32; typedef unsigned int __u32; typedef __signed__ long long __s64; typedef unsigned long long __u64; # 8 "/usr/include/linux/types.h" 2 3 4 # 148 "/usr/include/linux/types.h" 3 4 typedef __u16 __le16; typedef __u16 __be16; typedef __u32 __le32; typedef __u32 __be32; typedef __u64 __le64; typedef __u64 __be64; struct ustat { __kernel_daddr_t f_tfree; __kernel_ino_t f_tinode; char f_fname[6]; char f_fpack[6]; }; # 9 "/usr/include/asm/ptrace.h" 2 3 4 # 18 "/usr/include/asm/ptrace.h" 3 4 struct pt_regs { unsigned long gr[32]; __u64 fr[32]; unsigned long sr[ 8]; unsigned long iasq[2]; unsigned long iaoq[2]; unsigned long cr27; unsigned long pad0; unsigned long orig_r28; unsigned long ksp; unsigned long kpc; unsigned long sar; unsigned long iir; unsigned long isr; unsigned long ior; unsigned long ipsw; }; # 9 "/usr/include/asm/elf.h" 2 3 4 # 158 "/usr/include/asm/elf.h" 3 4 typedef struct elf32_fdesc { __u32 addr; __u32 gp; } Elf32_Fdesc; typedef struct elf64_fdesc { __u64 dummy[2]; __u64 addr; __u64 gp; } Elf64_Fdesc; # 229 "/usr/include/asm/elf.h" 3 4 typedef unsigned long elf_greg_t; # 285 "/usr/include/asm/elf.h" 3 4 typedef elf_greg_t elf_gregset_t[80]; typedef double elf_fpreg_t; typedef elf_fpreg_t elf_fpregset_t[32]; struct task_struct; extern int dump_task_fpu (struct task_struct *, elf_fpregset_t *); struct pt_regs; # 38 "../ports/sysdeps/unix/sysv/linux/hppa/sys/procfs.h" 2 struct elf_siginfo { int si_signo; int si_code; int si_errno; }; # 55 "../ports/sysdeps/unix/sysv/linux/hppa/sys/procfs.h" struct elf_prstatus { struct elf_siginfo pr_info; short int pr_cursig; unsigned long int pr_sigpend; unsigned long int pr_sighold; __pid_t pr_pid; __pid_t pr_ppid; __pid_t pr_pgrp; __pid_t pr_sid; struct timeval pr_utime; struct timeval pr_stime; struct timeval pr_cutime; struct timeval pr_cstime; elf_gregset_t pr_reg; int pr_fpvalid; }; struct elf_prpsinfo { char pr_state; char pr_sname; char pr_zomb; char pr_nice; unsigned long int pr_flag; unsigned int pr_uid; unsigned int pr_gid; int pr_pid, pr_ppid, pr_pgrp, pr_sid; char pr_fname[16]; char pr_psargs[(80)]; }; typedef void *psaddr_t; typedef elf_gregset_t prgregset_t; typedef elf_fpregset_t prfpregset_t; typedef __pid_t lwpid_t; typedef struct elf_prstatus prstatus_t; typedef struct elf_prpsinfo prpsinfo_t; # 30 "../nptl/../nptl_db/thread_db.h" 2 typedef enum { TD_OK, TD_ERR, TD_NOTHR, TD_NOSV, TD_NOLWP, TD_BADPH, TD_BADTH, TD_BADSH, TD_BADTA, TD_BADKEY, TD_NOMSG, TD_NOFPREGS, TD_NOLIBTHREAD, TD_NOEVENT, TD_NOCAPAB, TD_DBERR, TD_NOAPLIC, TD_NOTSD, TD_MALLOC, TD_PARTIALREG, TD_NOXREGS, TD_TLSDEFER, TD_NOTALLOC = TD_TLSDEFER, TD_VERSION, TD_NOTLS } td_err_e; typedef enum { TD_THR_ANY_STATE, TD_THR_UNKNOWN, TD_THR_STOPPED, TD_THR_RUN, TD_THR_ACTIVE, TD_THR_ZOMBIE, TD_THR_SLEEP, TD_THR_STOPPED_ASLEEP } td_thr_state_e; typedef enum { TD_THR_ANY_TYPE, TD_THR_USER, TD_THR_SYSTEM } td_thr_type_e; typedef struct td_thragent td_thragent_t; typedef struct td_thrhandle { td_thragent_t *th_ta_p; psaddr_t th_unique; } td_thrhandle_t; struct link_map; # 116 "../nptl/../nptl_db/thread_db.h" typedef struct td_thr_events { uint32_t event_bits[2]; } td_thr_events_t; # 155 "../nptl/../nptl_db/thread_db.h" typedef enum { TD_ALL_EVENTS, TD_EVENT_NONE = TD_ALL_EVENTS, TD_READY, TD_SLEEP, TD_SWITCHTO, TD_SWITCHFROM, TD_LOCK_TRY, TD_CATCHSIG, TD_IDLE, TD_CREATE, TD_DEATH, TD_PREEMPT, TD_PRI_INHERIT, TD_REAP, TD_CONCURRENCY, TD_TIMEOUT, TD_MIN_EVENT_NUM = TD_READY, TD_MAX_EVENT_NUM = TD_TIMEOUT, TD_EVENTS_ENABLE = 31 } td_event_e; typedef enum { NOTIFY_BPT, NOTIFY_AUTOBPT, NOTIFY_SYSCALL } td_notify_e; typedef struct td_notify { td_notify_e type; union { psaddr_t bptaddr; int syscallno; } u; } td_notify_t; typedef struct td_event_msg { td_event_e event; const td_thrhandle_t *th_p; union { uintptr_t data; } msg; } td_event_msg_t; typedef struct { td_thr_events_t eventmask; td_event_e eventnum; void *eventdata; } td_eventbuf_t; typedef struct td_ta_stats { int nthreads; int r_concurrency; int nrunnable_num; int nrunnable_den; int a_concurrency_num; int a_concurrency_den; int nlwps_num; int nlwps_den; int nidle_num; int nidle_den; } td_ta_stats_t; typedef pthread_t thread_t; typedef pthread_key_t thread_key_t; typedef int td_thr_iter_f (const td_thrhandle_t *, void *); typedef int td_key_iter_f (thread_key_t, void (*) (void *), void *); struct ps_prochandle; typedef struct td_thrinfo { td_thragent_t *ti_ta_p; unsigned int ti_user_flags; thread_t ti_tid; char *ti_tls; psaddr_t ti_startfunc; psaddr_t ti_stkbase; long int ti_stksize; psaddr_t ti_ro_area; int ti_ro_size; td_thr_state_e ti_state; unsigned char ti_db_suspended; td_thr_type_e ti_type; intptr_t ti_pc; intptr_t ti_sp; short int ti_flags; int ti_pri; lwpid_t ti_lid; sigset_t ti_sigmask; unsigned char ti_traceme; unsigned char ti_preemptflag; unsigned char ti_pirecflag; sigset_t ti_pending; td_thr_events_t ti_events; } td_thrinfo_t; extern td_err_e td_init (void); extern td_err_e td_log (void); extern const char **td_symbol_list (void); extern td_err_e td_ta_new (struct ps_prochandle *__ps, td_thragent_t **__ta); extern td_err_e td_ta_delete (td_thragent_t *__ta); extern td_err_e td_ta_get_nthreads (const td_thragent_t *__ta, int *__np); extern td_err_e td_ta_get_ph (const td_thragent_t *__ta, struct ps_prochandle **__ph); extern td_err_e td_ta_map_id2thr (const td_thragent_t *__ta, pthread_t __pt, td_thrhandle_t *__th); extern td_err_e td_ta_map_lwp2thr (const td_thragent_t *__ta, lwpid_t __lwpid, td_thrhandle_t *__th); extern td_err_e td_ta_thr_iter (const td_thragent_t *__ta, td_thr_iter_f *__callback, void *__cbdata_p, td_thr_state_e __state, int __ti_pri, sigset_t *__ti_sigmask_p, unsigned int __ti_user_flags); extern td_err_e td_ta_tsd_iter (const td_thragent_t *__ta, td_key_iter_f *__ki, void *__p); extern td_err_e td_ta_event_addr (const td_thragent_t *__ta, td_event_e __event, td_notify_t *__ptr); extern td_err_e td_ta_set_event (const td_thragent_t *__ta, td_thr_events_t *__event); extern td_err_e td_ta_clear_event (const td_thragent_t *__ta, td_thr_events_t *__event); extern td_err_e td_ta_event_getmsg (const td_thragent_t *__ta, td_event_msg_t *__msg); extern td_err_e td_ta_setconcurrency (const td_thragent_t *__ta, int __level); extern td_err_e td_ta_enable_stats (const td_thragent_t *__ta, int __enable); extern td_err_e td_ta_reset_stats (const td_thragent_t *__ta); extern td_err_e td_ta_get_stats (const td_thragent_t *__ta, td_ta_stats_t *__statsp); extern td_err_e td_thr_validate (const td_thrhandle_t *__th); extern td_err_e td_thr_get_info (const td_thrhandle_t *__th, td_thrinfo_t *__infop); extern td_err_e td_thr_getfpregs (const td_thrhandle_t *__th, prfpregset_t *__regset); extern td_err_e td_thr_getgregs (const td_thrhandle_t *__th, prgregset_t __gregs); extern td_err_e td_thr_getxregs (const td_thrhandle_t *__th, void *__xregs); extern td_err_e td_thr_getxregsize (const td_thrhandle_t *__th, int *__sizep); extern td_err_e td_thr_setfpregs (const td_thrhandle_t *__th, const prfpregset_t *__fpregs); extern td_err_e td_thr_setgregs (const td_thrhandle_t *__th, prgregset_t __gregs); extern td_err_e td_thr_setxregs (const td_thrhandle_t *__th, const void *__addr); extern td_err_e td_thr_tlsbase (const td_thrhandle_t *__th, unsigned long int __modid, psaddr_t *__base); extern td_err_e td_thr_tls_get_addr (const td_thrhandle_t *__th, psaddr_t __map_address, size_t __offset, psaddr_t *__address); extern td_err_e td_thr_event_enable (const td_thrhandle_t *__th, int __event); extern td_err_e td_thr_set_event (const td_thrhandle_t *__th, td_thr_events_t *__event); extern td_err_e td_thr_clear_event (const td_thrhandle_t *__th, td_thr_events_t *__event); extern td_err_e td_thr_event_getmsg (const td_thrhandle_t *__th, td_event_msg_t *__msg); extern td_err_e td_thr_setprio (const td_thrhandle_t *__th, int __prio); extern td_err_e td_thr_setsigpending (const td_thrhandle_t *__th, unsigned char __n, const sigset_t *__ss); extern td_err_e td_thr_sigsetmask (const td_thrhandle_t *__th, const sigset_t *__ss); extern td_err_e td_thr_tsd (const td_thrhandle_t *__th, const thread_key_t __tk, void **__data); extern td_err_e td_thr_dbsuspend (const td_thrhandle_t *__th); extern td_err_e td_thr_dbresume (const td_thrhandle_t *__th); # 34 "../nptl/descr.h" 2 # 1 "../include/tls.h" 1 # 35 "../nptl/descr.h" 2 # 1 "../sysdeps/generic/unwind.h" 1 # 35 "../sysdeps/generic/unwind.h" typedef unsigned _Unwind_Word __attribute__((__mode__(__word__))); typedef signed _Unwind_Sword __attribute__((__mode__(__word__))); typedef unsigned _Unwind_Ptr __attribute__((__mode__(__pointer__))); typedef unsigned _Unwind_Internal_Ptr __attribute__((__mode__(__pointer__))); typedef unsigned _Unwind_Exception_Class __attribute__((__mode__(__DI__))); typedef enum { _URC_NO_REASON = 0, _URC_FOREIGN_EXCEPTION_CAUGHT = 1, _URC_FATAL_PHASE2_ERROR = 2, _URC_FATAL_PHASE1_ERROR = 3, _URC_NORMAL_STOP = 4, _URC_END_OF_STACK = 5, _URC_HANDLER_FOUND = 6, _URC_INSTALL_CONTEXT = 7, _URC_CONTINUE_UNWIND = 8 } _Unwind_Reason_Code; # 72 "../sysdeps/generic/unwind.h" struct _Unwind_Exception; typedef void (*_Unwind_Exception_Cleanup_Fn) (_Unwind_Reason_Code, struct _Unwind_Exception *); struct _Unwind_Exception { _Unwind_Exception_Class exception_class; _Unwind_Exception_Cleanup_Fn exception_cleanup; _Unwind_Word private_1; _Unwind_Word private_2; } __attribute__((__aligned__)); typedef int _Unwind_Action; # 104 "../sysdeps/generic/unwind.h" struct _Unwind_Context; extern _Unwind_Reason_Code _Unwind_RaiseException (struct _Unwind_Exception *); typedef _Unwind_Reason_Code (*_Unwind_Stop_Fn) (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, struct _Unwind_Context *, void *); extern _Unwind_Reason_Code _Unwind_ForcedUnwind (struct _Unwind_Exception *, _Unwind_Stop_Fn, void *); extern void _Unwind_DeleteException (struct _Unwind_Exception *); extern void _Unwind_Resume (struct _Unwind_Exception *); typedef _Unwind_Reason_Code (*_Unwind_Trace_Fn) (struct _Unwind_Context *, void *); extern _Unwind_Reason_Code _Unwind_Backtrace (_Unwind_Trace_Fn, void *); extern _Unwind_Word _Unwind_GetGR (struct _Unwind_Context *, int); extern void _Unwind_SetGR (struct _Unwind_Context *, int, _Unwind_Word); extern _Unwind_Ptr _Unwind_GetIP (struct _Unwind_Context *); extern void _Unwind_SetIP (struct _Unwind_Context *, _Unwind_Ptr); extern _Unwind_Word _Unwind_GetCFA (struct _Unwind_Context *); extern void *_Unwind_GetLanguageSpecificData (struct _Unwind_Context *); extern _Unwind_Ptr _Unwind_GetRegionStart (struct _Unwind_Context *); # 167 "../sysdeps/generic/unwind.h" typedef _Unwind_Reason_Code (*_Unwind_Personality_Fn) (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, struct _Unwind_Context *); struct SjLj_Function_Context; extern void _Unwind_SjLj_Register (struct SjLj_Function_Context *); extern void _Unwind_SjLj_Unregister (struct SjLj_Function_Context *); extern _Unwind_Reason_Code _Unwind_SjLj_RaiseException (struct _Unwind_Exception *); extern _Unwind_Reason_Code _Unwind_SjLj_ForcedUnwind (struct _Unwind_Exception *, _Unwind_Stop_Fn, void *); extern void _Unwind_SjLj_Resume (struct _Unwind_Exception *); # 208 "../sysdeps/generic/unwind.h" extern _Unwind_Ptr _Unwind_GetDataRelBase (struct _Unwind_Context *); extern _Unwind_Ptr _Unwind_GetTextRelBase (struct _Unwind_Context *); extern void * _Unwind_FindEnclosingFunction (void *pc); # 37 "../nptl/descr.h" 2 # 1 "../include/resolv.h" 1 # 12 "../include/resolv.h" # 1 "../resolv/resolv.h" 1 # 56 "../resolv/resolv.h" # 1 "../include/sys/types.h" 1 # 57 "../resolv/resolv.h" 2 # 1 "../include/netinet/in.h" 1 # 1 "../inet/netinet/in.h" 1 # 24 "../inet/netinet/in.h" # 1 "../include/sys/socket.h" 1 # 1 "../socket/sys/socket.h" 1 # 25 "../socket/sys/socket.h" # 1 "../include/sys/uio.h" 1 # 1 "../misc/sys/uio.h" 1 # 24 "../misc/sys/uio.h" # 1 "../include/sys/types.h" 1 # 25 "../misc/sys/uio.h" 2 # 1 "../sysdeps/unix/sysv/linux/bits/uio.h" 1 # 26 "../sysdeps/unix/sysv/linux/bits/uio.h" # 1 "../include/sys/types.h" 1 # 27 "../sysdeps/unix/sysv/linux/bits/uio.h" 2 # 44 "../sysdeps/unix/sysv/linux/bits/uio.h" struct iovec { void *iov_base; size_t iov_len; }; # 30 "../misc/sys/uio.h" 2 # 40 "../misc/sys/uio.h" extern ssize_t readv (int __fd, __const struct iovec *__iovec, int __count); # 50 "../misc/sys/uio.h" extern ssize_t writev (int __fd, __const struct iovec *__iovec, int __count); # 3 "../include/sys/uio.h" 2 extern ssize_t __readv (int __fd, __const struct iovec *__vector, int __count); extern ssize_t __libc_readv (int __fd, __const struct iovec *__vector, int __count); extern ssize_t __writev (int __fd, __const struct iovec *__vector, int __count); extern ssize_t __libc_writev (int __fd, __const struct iovec *__vector, int __count); # 28 "../socket/sys/socket.h" 2 # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 30 "../socket/sys/socket.h" 2 # 1 "../sysdeps/unix/sysv/linux/bits/socket.h" 1 # 29 "../sysdeps/unix/sysv/linux/bits/socket.h" # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 30 "../sysdeps/unix/sysv/linux/bits/socket.h" 2 # 1 "../include/limits.h" 1 # 145 "../include/limits.h" # 1 "../include/bits/posix1_lim.h" 1 # 146 "../include/limits.h" 2 # 1 "../include/bits/posix2_lim.h" 1 # 150 "../include/limits.h" 2 # 32 "../sysdeps/unix/sysv/linux/bits/socket.h" 2 # 1 "../include/sys/types.h" 1 # 33 "../sysdeps/unix/sysv/linux/bits/socket.h" 2 typedef __socklen_t socklen_t; enum __socket_type { SOCK_STREAM = 1, SOCK_DGRAM = 2, SOCK_RAW = 3, SOCK_RDM = 4, SOCK_SEQPACKET = 5, SOCK_PACKET = 10 }; # 142 "../sysdeps/unix/sysv/linux/bits/socket.h" # 1 "../bits/sockaddr.h" 1 # 29 "../bits/sockaddr.h" typedef unsigned short int sa_family_t; # 143 "../sysdeps/unix/sysv/linux/bits/socket.h" 2 struct sockaddr { sa_family_t sa_family; char sa_data[14]; }; # 162 "../sysdeps/unix/sysv/linux/bits/socket.h" struct sockaddr_storage { sa_family_t ss_family; __uint32_t __ss_align; char __ss_padding[(128 - (2 * sizeof (__uint32_t)))]; }; enum { MSG_OOB = 0x01, MSG_PEEK = 0x02, MSG_DONTROUTE = 0x04, MSG_TRYHARD = MSG_DONTROUTE, MSG_CTRUNC = 0x08, MSG_PROXY = 0x10, MSG_TRUNC = 0x20, MSG_DONTWAIT = 0x40, MSG_EOR = 0x80, MSG_WAITALL = 0x100, MSG_FIN = 0x200, MSG_SYN = 0x400, MSG_CONFIRM = 0x800, MSG_RST = 0x1000, MSG_ERRQUEUE = 0x2000, MSG_NOSIGNAL = 0x4000, MSG_MORE = 0x8000 }; struct msghdr { void *msg_name; socklen_t msg_namelen; struct iovec *msg_iov; size_t msg_iovlen; void *msg_control; size_t msg_controllen; int msg_flags; }; struct cmsghdr { size_t cmsg_len; int cmsg_level; int cmsg_type; __extension__ unsigned char __cmsg_data []; }; # 263 "../sysdeps/unix/sysv/linux/bits/socket.h" extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __attribute__ ((__nothrow__)); extern __inline struct cmsghdr * __attribute__ ((__nothrow__)) __cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) { if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr)) return 0; __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg + (((__cmsg->cmsg_len) + sizeof (size_t) - 1) & (size_t) ~(sizeof (size_t) - 1))); if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen) || ((unsigned char *) __cmsg + (((__cmsg->cmsg_len) + sizeof (size_t) - 1) & (size_t) ~(sizeof (size_t) - 1)) > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen))) return 0; return __cmsg; } enum { SCM_RIGHTS = 0x01 , SCM_CREDENTIALS = 0x02 }; struct ucred { pid_t pid; uid_t uid; gid_t gid; }; # 1 "/usr/include/asm/socket.h" 1 3 4 # 1 "/usr/include/asm/sockios.h" 1 3 4 # 5 "/usr/include/asm/socket.h" 2 3 4 # 311 "../sysdeps/unix/sysv/linux/bits/socket.h" 2 struct linger { int l_onoff; int l_linger; }; # 36 "../socket/sys/socket.h" 2 struct osockaddr { unsigned short int sa_family; unsigned char sa_data[14]; }; enum { SHUT_RD = 0, SHUT_WR, SHUT_RDWR }; # 87 "../socket/sys/socket.h" typedef union { struct sockaddr *__restrict __sockaddr__; struct sockaddr_at *__restrict __sockaddr_at__; struct sockaddr_ax25 *__restrict __sockaddr_ax25__; struct sockaddr_dl *__restrict __sockaddr_dl__; struct sockaddr_eon *__restrict __sockaddr_eon__; struct sockaddr_in *__restrict __sockaddr_in__; struct sockaddr_in6 *__restrict __sockaddr_in6__; struct sockaddr_inarp *__restrict __sockaddr_inarp__; struct sockaddr_ipx *__restrict __sockaddr_ipx__; struct sockaddr_iso *__restrict __sockaddr_iso__; struct sockaddr_ns *__restrict __sockaddr_ns__; struct sockaddr_un *__restrict __sockaddr_un__; struct sockaddr_x25 *__restrict __sockaddr_x25__; } __SOCKADDR_ARG __attribute__ ((__transparent_union__)); typedef union { __const struct sockaddr *__restrict __sockaddr__; __const struct sockaddr_at *__restrict __sockaddr_at__; __const struct sockaddr_ax25 *__restrict __sockaddr_ax25__; __const struct sockaddr_dl *__restrict __sockaddr_dl__; __const struct sockaddr_eon *__restrict __sockaddr_eon__; __const struct sockaddr_in *__restrict __sockaddr_in__; __const struct sockaddr_in6 *__restrict __sockaddr_in6__; __const struct sockaddr_inarp *__restrict __sockaddr_inarp__; __const struct sockaddr_ipx *__restrict __sockaddr_ipx__; __const struct sockaddr_iso *__restrict __sockaddr_iso__; __const struct sockaddr_ns *__restrict __sockaddr_ns__; __const struct sockaddr_un *__restrict __sockaddr_un__; __const struct sockaddr_x25 *__restrict __sockaddr_x25__; } __CONST_SOCKADDR_ARG __attribute__ ((__transparent_union__)); extern int socket (int __domain, int __type, int __protocol) __attribute__ ((__nothrow__)); extern int socketpair (int __domain, int __type, int __protocol, int __fds[2]) __attribute__ ((__nothrow__)); extern int bind (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len) __attribute__ ((__nothrow__)); extern int getsockname (int __fd, __SOCKADDR_ARG __addr, socklen_t *__restrict __len) __attribute__ ((__nothrow__)); # 124 "../socket/sys/socket.h" extern int connect (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len); extern int getpeername (int __fd, __SOCKADDR_ARG __addr, socklen_t *__restrict __len) __attribute__ ((__nothrow__)); extern ssize_t send (int __fd, __const void *__buf, size_t __n, int __flags); extern ssize_t recv (int __fd, void *__buf, size_t __n, int __flags); extern ssize_t sendto (int __fd, __const void *__buf, size_t __n, int __flags, __CONST_SOCKADDR_ARG __addr, socklen_t __addr_len); # 161 "../socket/sys/socket.h" extern ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n, int __flags, __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len); extern ssize_t sendmsg (int __fd, __const struct msghdr *__message, int __flags); extern ssize_t recvmsg (int __fd, struct msghdr *__message, int __flags); extern int getsockopt (int __fd, int __level, int __optname, void *__restrict __optval, socklen_t *__restrict __optlen) __attribute__ ((__nothrow__)); extern int setsockopt (int __fd, int __level, int __optname, __const void *__optval, socklen_t __optlen) __attribute__ ((__nothrow__)); extern int listen (int __fd, int __n) __attribute__ ((__nothrow__)); # 209 "../socket/sys/socket.h" extern int accept (int __fd, __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len); extern int shutdown (int __fd, int __how) __attribute__ ((__nothrow__)); extern int sockatmark (int __fd) __attribute__ ((__nothrow__)); extern int isfdtype (int __fd, int __fdtype) __attribute__ ((__nothrow__)); # 240 "../socket/sys/socket.h" # 3 "../include/sys/socket.h" 2 extern int __socket (int __domain, int __type, int __protocol) ; extern int __socketpair (int __domain, int __type, int __protocol, int __fds[2]) ; extern int __opensock (void) ; extern int __getpeername (int __fd, __SOCKADDR_ARG __addr, socklen_t *__len) ; extern ssize_t __libc_send (int __fd, __const void *__buf, size_t __n, int __flags); extern ssize_t __send (int __fd, __const void *__buf, size_t __n, int __flags); extern ssize_t __libc_recv (int __fd, void *__buf, size_t __n, int __flags); extern ssize_t __libc_sendto (int __fd, __const void *__buf, size_t __n, int __flags, __CONST_SOCKADDR_ARG __addr, socklen_t __addr_len); extern ssize_t __libc_recvfrom (int __fd, void *__restrict __buf, size_t __n, int __flags, __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len); extern int __libc_connect (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len); extern int __connect (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len); extern int __connect_internal (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len) ; extern ssize_t __recv (int __fd, void *__buf, size_t __n, int __flags) ; extern ssize_t __libc_sendto (int __fd, __const void *__buf, size_t __n, int __flags, __CONST_SOCKADDR_ARG __addr, socklen_t __addr_len); extern ssize_t __sendto (int __fd, __const void *__buf, size_t __n, int __flags, __CONST_SOCKADDR_ARG __addr, socklen_t __addr_len) ; extern ssize_t __recvfrom (int __fd, void *__restrict __buf, size_t __n, int __flags, __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len) ; extern ssize_t __libc_sendmsg (int __fd, __const struct msghdr *__message, int __flags); extern ssize_t __sendmsg (int __fd, __const struct msghdr *__message, int __flags) ; extern ssize_t __libc_recvmsg (int __fd, struct msghdr *__message, int __flags); extern ssize_t __recvmsg (int __fd, struct msghdr *__message, int __flags) ; extern int __setsockopt (int __fd, int __level, int __optname, __const void *__optval, socklen_t __optlen) ; extern int __getsockopt (int __fd, int __level, int __optname, void *__restrict __optval, socklen_t *__restrict __optlen) ; extern int __getsockname (int __fd, __SOCKADDR_ARG __addr, socklen_t *__restrict __len) ; extern int __bind (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len) ; extern int __listen (int __fd, int __n) ; extern int __libc_accept (int __fd, __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len) __attribute__ ((__nothrow__)); extern int __libc_sa_len (sa_family_t __af); extern int __libc_sa_len_internal (sa_family_t __af) ; # 25 "../inet/netinet/in.h" 2 enum { IPPROTO_IP = 0, IPPROTO_HOPOPTS = 0, IPPROTO_ICMP = 1, IPPROTO_IGMP = 2, IPPROTO_IPIP = 4, IPPROTO_TCP = 6, IPPROTO_EGP = 8, IPPROTO_PUP = 12, IPPROTO_UDP = 17, IPPROTO_IDP = 22, IPPROTO_TP = 29, IPPROTO_IPV6 = 41, IPPROTO_ROUTING = 43, IPPROTO_FRAGMENT = 44, IPPROTO_RSVP = 46, IPPROTO_GRE = 47, IPPROTO_ESP = 50, IPPROTO_AH = 51, IPPROTO_ICMPV6 = 58, IPPROTO_NONE = 59, IPPROTO_DSTOPTS = 60, IPPROTO_MTP = 92, IPPROTO_ENCAP = 98, IPPROTO_PIM = 103, IPPROTO_COMP = 108, IPPROTO_SCTP = 132, IPPROTO_RAW = 255, IPPROTO_MAX }; typedef uint16_t in_port_t; enum { IPPORT_ECHO = 7, IPPORT_DISCARD = 9, IPPORT_SYSTAT = 11, IPPORT_DAYTIME = 13, IPPORT_NETSTAT = 15, IPPORT_FTP = 21, IPPORT_TELNET = 23, IPPORT_SMTP = 25, IPPORT_TIMESERVER = 37, IPPORT_NAMESERVER = 42, IPPORT_WHOIS = 43, IPPORT_MTP = 57, IPPORT_TFTP = 69, IPPORT_RJE = 77, IPPORT_FINGER = 79, IPPORT_TTYLINK = 87, IPPORT_SUPDUP = 95, IPPORT_EXECSERVER = 512, IPPORT_LOGINSERVER = 513, IPPORT_CMDSERVER = 514, IPPORT_EFSSERVER = 520, IPPORT_BIFFUDP = 512, IPPORT_WHOSERVER = 513, IPPORT_ROUTESERVER = 520, IPPORT_RESERVED = 1024, IPPORT_USERRESERVED = 5000 }; typedef uint32_t in_addr_t; struct in_addr { in_addr_t s_addr; }; # 193 "../inet/netinet/in.h" struct in6_addr { union { uint8_t u6_addr8[16]; uint16_t u6_addr16[8]; uint32_t u6_addr32[4]; } in6_u; }; extern const struct in6_addr in6addr_any; extern const struct in6_addr in6addr_loopback; # 219 "../inet/netinet/in.h" struct sockaddr_in { sa_family_t sin_family; in_port_t sin_port; struct in_addr sin_addr; unsigned char sin_zero[sizeof (struct sockaddr) - (sizeof (unsigned short int)) - sizeof (in_port_t) - sizeof (struct in_addr)]; }; struct sockaddr_in6 { sa_family_t sin6_family; in_port_t sin6_port; uint32_t sin6_flowinfo; struct in6_addr sin6_addr; uint32_t sin6_scope_id; }; struct ip_mreq { struct in_addr imr_multiaddr; struct in_addr imr_interface; }; struct ip_mreq_source { struct in_addr imr_multiaddr; struct in_addr imr_interface; struct in_addr imr_sourceaddr; }; struct ipv6_mreq { struct in6_addr ipv6mr_multiaddr; unsigned int ipv6mr_interface; }; struct group_req { uint32_t gr_interface; struct sockaddr_storage gr_group; }; struct group_source_req { uint32_t gsr_interface; struct sockaddr_storage gsr_group; struct sockaddr_storage gsr_source; }; struct ip_msfilter { struct in_addr imsf_multiaddr; struct in_addr imsf_interface; uint32_t imsf_fmode; uint32_t imsf_numsrc; struct in_addr imsf_slist[1]; }; struct group_filter { uint32_t gf_interface; struct sockaddr_storage gf_group; uint32_t gf_fmode; uint32_t gf_numsrc; struct sockaddr_storage gf_slist[1]; }; # 345 "../inet/netinet/in.h" # 1 "../sysdeps/unix/sysv/linux/bits/in.h" 1 # 82 "../sysdeps/unix/sysv/linux/bits/in.h" struct ip_opts { struct in_addr ip_dst; char ip_opts[40]; }; struct ip_mreqn { struct in_addr imr_multiaddr; struct in_addr imr_address; int imr_ifindex; }; struct in_pktinfo { int ipi_ifindex; struct in_addr ipi_spec_dst; struct in_addr ipi_addr; }; # 346 "../inet/netinet/in.h" 2 # 354 "../inet/netinet/in.h" extern uint32_t ntohl (uint32_t __netlong) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern uint16_t ntohs (uint16_t __netshort) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern uint32_t htonl (uint32_t __hostlong) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern uint16_t htons (uint16_t __hostshort) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); # 1 "../include/endian.h" 1 # 363 "../inet/netinet/in.h" 2 # 1 "../bits/byteswap.h" 1 # 366 "../inet/netinet/in.h" 2 # 428 "../inet/netinet/in.h" extern int bindresvport (int __sockfd, struct sockaddr_in *__sock_in) __attribute__ ((__nothrow__)); extern int bindresvport6 (int __sockfd, struct sockaddr_in6 *__sock_in) __attribute__ ((__nothrow__)); # 456 "../inet/netinet/in.h" struct in6_pktinfo { struct in6_addr ipi6_addr; unsigned int ipi6_ifindex; }; struct ip6_mtuinfo { struct sockaddr_in6 ip6m_addr; uint32_t ip6m_mtu; }; extern int inet6_option_space (int __nbytes) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__)); extern int inet6_option_init (void *__bp, struct cmsghdr **__cmsgp, int __type) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__)); extern int inet6_option_append (struct cmsghdr *__cmsg, __const uint8_t *__typep, int __multx, int __plusy) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__)); extern uint8_t *inet6_option_alloc (struct cmsghdr *__cmsg, int __datalen, int __multx, int __plusy) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__)); extern int inet6_option_next (__const struct cmsghdr *__cmsg, uint8_t **__tptrp) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__)); extern int inet6_option_find (__const struct cmsghdr *__cmsg, uint8_t **__tptrp, int __type) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__)); extern int inet6_opt_init (void *__extbuf, socklen_t __extlen) __attribute__ ((__nothrow__)); extern int inet6_opt_append (void *__extbuf, socklen_t __extlen, int __offset, uint8_t __type, socklen_t __len, uint8_t __align, void **__databufp) __attribute__ ((__nothrow__)); extern int inet6_opt_finish (void *__extbuf, socklen_t __extlen, int __offset) __attribute__ ((__nothrow__)); extern int inet6_opt_set_val (void *__databuf, int __offset, void *__val, socklen_t __vallen) __attribute__ ((__nothrow__)); extern int inet6_opt_next (void *__extbuf, socklen_t __extlen, int __offset, uint8_t *__typep, socklen_t *__lenp, void **__databufp) __attribute__ ((__nothrow__)); extern int inet6_opt_find (void *__extbuf, socklen_t __extlen, int __offset, uint8_t __type, socklen_t *__lenp, void **__databufp) __attribute__ ((__nothrow__)); extern int inet6_opt_get_val (void *__databuf, int __offset, void *__val, socklen_t __vallen) __attribute__ ((__nothrow__)); extern socklen_t inet6_rth_space (int __type, int __segments) __attribute__ ((__nothrow__)); extern void *inet6_rth_init (void *__bp, socklen_t __bp_len, int __type, int __segments) __attribute__ ((__nothrow__)); extern int inet6_rth_add (void *__bp, __const struct in6_addr *__addr) __attribute__ ((__nothrow__)); extern int inet6_rth_reverse (__const void *__in, void *__out) __attribute__ ((__nothrow__)); extern int inet6_rth_segments (__const void *__bp) __attribute__ ((__nothrow__)); extern struct in6_addr *inet6_rth_getaddr (__const void *__bp, int __index) __attribute__ ((__nothrow__)); extern int getipv4sourcefilter (int __s, struct in_addr __interface_addr, struct in_addr __group, uint32_t *__fmode, uint32_t *__numsrc, struct in_addr *__slist) __attribute__ ((__nothrow__)); extern int setipv4sourcefilter (int __s, struct in_addr __interface_addr, struct in_addr __group, uint32_t __fmode, uint32_t __numsrc, __const struct in_addr *__slist) __attribute__ ((__nothrow__)); extern int getsourcefilter (int __s, uint32_t __interface_addr, __const struct sockaddr *__group, socklen_t __grouplen, uint32_t *__fmode, uint32_t *__numsrc, struct sockaddr_storage *__slist) __attribute__ ((__nothrow__)); extern int setsourcefilter (int __s, uint32_t __interface_addr, __const struct sockaddr *__group, socklen_t __grouplen, uint32_t __fmode, uint32_t __numsrc, __const struct sockaddr_storage *__slist) __attribute__ ((__nothrow__)); # 4 "../include/netinet/in.h" 2 # 58 "../resolv/resolv.h" 2 # 71 "../resolv/resolv.h" typedef enum { res_goahead, res_nextns, res_modified, res_done, res_error } res_sendhookact; typedef res_sendhookact (*res_send_qhook) (struct sockaddr_in * const *ns, const u_char **query, int *querylen, u_char *ans, int anssiz, int *resplen); typedef res_sendhookact (*res_send_rhook) (const struct sockaddr_in *ns, const u_char *query, int querylen, u_char *ans, int anssiz, int *resplen); # 104 "../resolv/resolv.h" struct __res_state { int retrans; int retry; u_long options; int nscount; struct sockaddr_in nsaddr_list[3]; u_short id; char *dnsrch[6 +1]; char defdname[256]; u_long pfcode; unsigned ndots:4; unsigned nsort:4; char unused[3]; struct { struct in_addr addr; u_int32_t mask; } sort_list[10]; res_send_qhook qhook; res_send_rhook rhook; int res_h_errno; int _vcsock; u_int _flags; union { char pad[52]; struct { u_int16_t nscount; u_int16_t nsmap[3]; int nssocks[3]; u_int16_t nscount6; u_int16_t nsinit; struct sockaddr_in6 *nsaddrs[3]; unsigned long long int initstamp __attribute__((packed)); } _ext; } _u; }; typedef struct __res_state *res_state; # 13 "../include/resolv.h" 2 # 40 "../nptl/descr.h" 2 # 65 "../nptl/descr.h" struct pthread_unwind_buf { struct { __jmp_buf jmp_buf; int mask_was_saved; } cancel_jmp_buf[1]; union { void *pad[4]; struct { struct pthread_unwind_buf *prev; struct _pthread_cleanup_buffer *cleanup; int canceltype; } data; } priv; }; struct xid_command { int syscall_no; long int id[3]; volatile int cntr; }; struct robust_list_head { void *list; long int futex_offset; void *list_op_pending; }; struct priority_protection_data { int priomax; unsigned int priomap[]; }; struct pthread { union { struct { int multiple_threads; } header; void *__padding[16]; }; list_t list; pid_t tid; pid_t pid; # 193 "../nptl/descr.h" union { __pthread_slist_t robust_list; struct robust_list_head robust_head; }; # 231 "../nptl/descr.h" struct _pthread_cleanup_buffer *cleanup; struct pthread_unwind_buf *cleanup_jmp_buf; int cancelhandling; # 273 "../nptl/descr.h" struct pthread_key_data { uintptr_t seq; void *data; } specific_1stblock[32]; struct pthread_key_data *specific[((1024 + 32 - 1) / 32)]; _Bool specific_used; _Bool report_events; _Bool user_stack; _Bool stopped_start; int parent_cancelhandling; lll_lock_t lock; lll_lock_t setxid_futex; # 320 "../nptl/descr.h" struct pthread *joinid; int flags; void *result; struct sched_param schedparam; int schedpolicy; void *(*start_routine) (void *); void *arg; td_eventbuf_t eventbuf; struct pthread *nextevent; struct _Unwind_Exception exc; void *stackblock; size_t stackblock_size; size_t guardsize; size_t reported_guardsize; struct priority_protection_data *tpp; struct __res_state res; char end_padding[]; } __attribute ((aligned (64))); # 64 "../ports/sysdeps/hppa/nptl/tls.h" 2 typedef struct { dtv_t *dtv; void *private; } tcbhead_t; # 135 "../ports/sysdeps/hppa/nptl/tls.h" static inline struct pthread *__get_cr27(void) { long cr27; asm ("mfctl %%cr27, %0" : "=r" (cr27) : ); return (struct pthread *) cr27; } static inline void __set_cr27(struct pthread *cr27) { asm ( "ble 0xe0(%%sr2, %%r0)\n\t" "copy %0, %%r26" : : "r" (cr27) : "r26" ); } # 7 "../include/tls.h" 2 # 46 "../bits/libc-tsd.h" 2 # 208 "../locale/localeinfo.h" 2 extern __thread void *__libc_tsd_LOCALE __attribute__ ((tls_model ("initial-exec"))); # 234 "../locale/localeinfo.h" # 1 "../locale/categories.def" 1 # 42 "../locale/categories.def" extern __thread struct locale_data *const *_nl_current_LC_COLLATE __attribute__ ((tls_model ("initial-exec"))); # 68 "../locale/categories.def" extern __thread struct locale_data *const *_nl_current_LC_CTYPE __attribute__ ((tls_model ("initial-exec"))); # 140 "../locale/categories.def" extern __thread struct locale_data *const *_nl_current_LC_MONETARY __attribute__ ((tls_model ("initial-exec"))); # 192 "../locale/categories.def" extern __thread struct locale_data *const *_nl_current_LC_NUMERIC __attribute__ ((tls_model ("initial-exec"))); # 206 "../locale/categories.def" extern __thread struct locale_data *const *_nl_current_LC_TIME __attribute__ ((tls_model ("initial-exec"))); # 254 "../locale/categories.def" extern __thread struct locale_data *const *_nl_current_LC_MESSAGES __attribute__ ((tls_model ("initial-exec"))); # 265 "../locale/categories.def" extern __thread struct locale_data *const *_nl_current_LC_PAPER __attribute__ ((tls_model ("initial-exec"))); # 274 "../locale/categories.def" extern __thread struct locale_data *const *_nl_current_LC_NAME __attribute__ ((tls_model ("initial-exec"))); # 287 "../locale/categories.def" extern __thread struct locale_data *const *_nl_current_LC_ADDRESS __attribute__ ((tls_model ("initial-exec"))); # 306 "../locale/categories.def" extern __thread struct locale_data *const *_nl_current_LC_TELEPHONE __attribute__ ((tls_model ("initial-exec"))); # 317 "../locale/categories.def" extern __thread struct locale_data *const *_nl_current_LC_MEASUREMENT __attribute__ ((tls_model ("initial-exec"))); extern __thread struct locale_data *const *_nl_current_LC_IDENTIFICATION __attribute__ ((tls_model ("initial-exec"))); # 235 "../locale/localeinfo.h" 2 # 296 "../locale/localeinfo.h" extern const char _nl_default_locale_path[] ; extern struct locale_data *_nl_find_locale (const char *locale_path, size_t locale_path_len, int category, const char **name) ; extern void _nl_load_locale (struct loaded_l10nfile *file, int category) ; extern void _nl_unload_locale (struct locale_data *locale) ; extern void _nl_remove_locale (int locale, struct locale_data *data) ; extern struct locale_data *_nl_load_locale_from_archive (int category, const char **namep) ; extern void _nl_archive_subfreeres (void) ; extern void _nl_locale_subfreeres (void) ; extern struct locale_data *_nl_intern_locale_data (int category, const void *data, size_t datasize) ; extern struct era_entry *_nl_get_era_entry (const struct tm *tp, struct locale_data *lc_time) ; extern struct era_entry *_nl_select_era_entry (int cnt, struct locale_data *lc_time) ; extern const char *_nl_get_alt_digit (unsigned int number, struct locale_data *lc_time) ; extern const wchar_t *_nl_get_walt_digit (unsigned int number, struct locale_data *lc_time) ; extern int _nl_parse_alt_digit (const char **strp, struct locale_data *lc_time) ; extern void _nl_postload_ctype (void); extern void _nl_cleanup_time (struct locale_data *) ; # 53 "regex.c" 2 # 1 "../include/limits.h" 1 # 145 "../include/limits.h" # 1 "../include/bits/posix1_lim.h" 1 # 146 "../include/limits.h" 2 # 1 "../include/bits/posix2_lim.h" 1 # 150 "../include/limits.h" 2 # 59 "regex.c" 2 # 1 "../include/regex.h" 1 # 1 "../posix/regex.h" 1 # 25 "../posix/regex.h" # 1 "../include/sys/types.h" 1 # 26 "../posix/regex.h" 2 # 36 "../posix/regex.h" typedef long int s_reg_t; typedef unsigned long int active_reg_t; typedef unsigned long int reg_syntax_t; # 181 "../posix/regex.h" extern reg_syntax_t re_syntax_options; # 303 "../posix/regex.h" typedef enum { REG_ENOSYS = -1, REG_NOERROR = 0, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE, REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN, REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND, REG_ESIZE, REG_ERPAREN } reg_errcode_t; # 343 "../posix/regex.h" struct re_pattern_buffer { unsigned char *buffer; unsigned long int allocated; unsigned long int used; reg_syntax_t syntax; char *fastmap; unsigned char * translate; size_t re_nsub; unsigned can_be_null : 1; # 386 "../posix/regex.h" unsigned regs_allocated : 2; unsigned fastmap_accurate : 1; unsigned no_sub : 1; unsigned not_bol : 1; unsigned not_eol : 1; unsigned newline_anchor : 1; }; typedef struct re_pattern_buffer regex_t; typedef int regoff_t; struct re_registers { unsigned num_regs; regoff_t *start; regoff_t *end; }; # 434 "../posix/regex.h" typedef struct { regoff_t rm_so; regoff_t rm_eo; } regmatch_t; extern reg_syntax_t __re_set_syntax (reg_syntax_t __syntax); extern const char *__re_compile_pattern (const char *__pattern, size_t __length, struct re_pattern_buffer *__buffer); extern int __re_compile_fastmap (struct re_pattern_buffer *__buffer); extern int __re_search (struct re_pattern_buffer *__buffer, const char *__string, int __length, int __start, int __range, struct re_registers *__regs); extern int __re_search_2 (struct re_pattern_buffer *__buffer, const char *__string1, int __length1, const char *__string2, int __length2, int __start, int __range, struct re_registers *__regs, int __stop); extern int __re_match (struct re_pattern_buffer *__buffer, const char *__string, int __length, int __start, struct re_registers *__regs); extern int __re_match_2 (struct re_pattern_buffer *__buffer, const char *__string1, int __length1, const char *__string2, int __length2, int __start, struct re_registers *__regs, int __stop); # 502 "../posix/regex.h" extern void __re_set_registers (struct re_pattern_buffer *__buffer, struct re_registers *__regs, unsigned int __num_regs, regoff_t *__starts, regoff_t *__ends); extern char *re_comp (const char *); extern int re_exec (const char *); # 537 "../posix/regex.h" extern int __regcomp (regex_t *__restrict __preg, const char *__restrict __pattern, int __cflags); extern int __regexec (const regex_t *__restrict __preg, const char *__restrict __string, size_t __nmatch, regmatch_t __pmatch[__restrict], int __eflags); extern size_t __regerror(int __errcode, const regex_t *__restrict __preg, char *__restrict __errbuf, size_t __errbuf_size); extern void __regfree (regex_t *__preg); # 3 "../include/regex.h" 2 extern reg_syntax_t __re_set_syntax (reg_syntax_t syntax); extern const char *__re_compile_pattern (const char *pattern, size_t length, struct re_pattern_buffer *buffer); extern int __re_compile_fastmap (struct re_pattern_buffer *buffer); extern int __re_search (struct re_pattern_buffer *buffer, const char *string, int length, int start, int range, struct re_registers *regs); extern int __re_search_2 (struct re_pattern_buffer *buffer, const char *string1, int length1, const char *string2, int length2, int start, int range, struct re_registers *regs, int stop); extern int __re_match (struct re_pattern_buffer *buffer, const char *string, int length, int start, struct re_registers *regs); extern int __re_match_2 (struct re_pattern_buffer *buffer, const char *string1, int length1, const char *string2, int length2, int start, struct re_registers *regs, int stop); extern void __re_set_registers (struct re_pattern_buffer *buffer, struct re_registers *regs, unsigned num_regs, regoff_t *starts, regoff_t *ends); extern int __regcomp (regex_t *__preg, const char *__pattern, int __cflags); extern int __regexec (const regex_t *__preg, const char *__string, size_t __nmatch, regmatch_t __pmatch[], int __eflags); extern size_t __regerror (int __errcode, const regex_t *__preg, char *__errbuf, size_t __errbuf_size); extern void __regfree (regex_t *__preg); # 61 "regex.c" 2 # 1 "regex_internal.h" 1 # 24 "regex_internal.h" # 1 "../include/assert.h" 1 # 1 "../assert/assert.h" 1 # 65 "../assert/assert.h" extern void __assert_fail (__const char *__assertion, __const char *__file, unsigned int __line, __const char *__function) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); extern void __assert_perror_fail (int __errnum, __const char *__file, unsigned int __line, __const char *__function) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); extern void __assert (const char *__assertion, const char *__file, int __line) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); # 2 "../include/assert.h" 2 extern void __assert_fail (__const char *__assertion, __const char *__file, unsigned int __line, __const char *__function) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); extern void __assert_perror_fail (int __errnum, __const char *__file, unsigned int __line, __const char *__function) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); # 25 "regex_internal.h" 2 # 1 "../include/ctype.h" 1 extern int __isctype (int __c, int __mask); # 14 "../include/ctype.h" # 1 "../include/../locale/localeinfo.h" 1 # 15 "../include/ctype.h" 2 extern __thread void *__libc_tsd_CTYPE_B __attribute__ ((tls_model ("initial-exec"))); extern __thread void *__libc_tsd_CTYPE_TOUPPER __attribute__ ((tls_model ("initial-exec"))); extern __thread void *__libc_tsd_CTYPE_TOLOWER __attribute__ ((tls_model ("initial-exec"))); extern inline const uint16_t ** __attribute__ ((const)) __ctype_b_loc (void) { union { void **ptr; const uint16_t **tablep; } u; u.ptr = (&__libc_tsd_CTYPE_B); if (__builtin_expect (*u.tablep == ((void *)0), 0)) *u.tablep = (const uint16_t *) ((*_nl_current_LC_CTYPE)->values[((int) (_NL_CTYPE_CLASS) & 0xffff)].string) + 128; return u.tablep; } extern inline const int32_t ** __attribute__ ((const)) __ctype_toupper_loc (void) { union { void **ptr; const int32_t **tablep; } u; u.ptr = (&__libc_tsd_CTYPE_TOUPPER); if (__builtin_expect (*u.tablep == ((void *)0), 0)) *u.tablep = ((int32_t *) ((*_nl_current_LC_CTYPE)->values[((int) (_NL_CTYPE_TOUPPER) & 0xffff)].string) + 128); return u.tablep; } extern inline const int32_t ** __attribute__ ((const)) __ctype_tolower_loc (void) { union { void **ptr; const int32_t **tablep; } u; u.ptr = (&__libc_tsd_CTYPE_TOLOWER); if (__builtin_expect (*u.tablep == ((void *)0), 0)) *u.tablep = ((int32_t *) ((*_nl_current_LC_CTYPE)->values[((int) (_NL_CTYPE_TOLOWER) & 0xffff)].string) + 128); return u.tablep; } # 1 "../ctype/ctype.h" 1 # 30 "../ctype/ctype.h" # 41 "../ctype/ctype.h" # 1 "../include/endian.h" 1 # 42 "../ctype/ctype.h" 2 enum { _ISupper = (1 << (0)), _ISlower = (1 << (1)), _ISalpha = (1 << (2)), _ISdigit = (1 << (3)), _ISxdigit = (1 << (4)), _ISspace = (1 << (5)), _ISprint = (1 << (6)), _ISgraph = (1 << (7)), _ISblank = (1 << (8)), _IScntrl = (1 << (9)), _ISpunct = (1 << (10)), _ISalnum = (1 << (11)) }; # 81 "../ctype/ctype.h" extern __const unsigned short int **__ctype_b_loc (void) __attribute__ ((__const)); extern __const __int32_t **__ctype_tolower_loc (void) __attribute__ ((__const)); extern __const __int32_t **__ctype_toupper_loc (void) __attribute__ ((__const)); # 96 "../ctype/ctype.h" extern int isalnum (int) __attribute__ ((__nothrow__)); extern int isalpha (int) __attribute__ ((__nothrow__)); extern int iscntrl (int) __attribute__ ((__nothrow__)); extern int isdigit (int) __attribute__ ((__nothrow__)); extern int islower (int) __attribute__ ((__nothrow__)); extern int isgraph (int) __attribute__ ((__nothrow__)); extern int isprint (int) __attribute__ ((__nothrow__)); extern int ispunct (int) __attribute__ ((__nothrow__)); extern int isspace (int) __attribute__ ((__nothrow__)); extern int isupper (int) __attribute__ ((__nothrow__)); extern int isxdigit (int) __attribute__ ((__nothrow__)); extern int tolower (int __c) __attribute__ ((__nothrow__)); extern int toupper (int __c) __attribute__ ((__nothrow__)); extern int isblank (int) __attribute__ ((__nothrow__)); extern int isctype (int __c, int __mask) __attribute__ ((__nothrow__)); extern int isascii (int __c) __attribute__ ((__nothrow__)); extern int toascii (int __c) __attribute__ ((__nothrow__)); extern int _toupper (int) __attribute__ ((__nothrow__)); extern int _tolower (int) __attribute__ ((__nothrow__)); # 190 "../ctype/ctype.h" extern __inline int __attribute__ ((__nothrow__)) tolower (int __c) { return __c >= -128 && __c < 256 ? (*__ctype_tolower_loc ())[__c] : __c; } extern __inline int __attribute__ ((__nothrow__)) toupper (int __c) { return __c >= -128 && __c < 256 ? (*__ctype_toupper_loc ())[__c] : __c; } # 233 "../ctype/ctype.h" # 1 "../include/xlocale.h" 1 # 234 "../ctype/ctype.h" 2 # 247 "../ctype/ctype.h" extern int isalnum_l (int, __locale_t) __attribute__ ((__nothrow__)); extern int isalpha_l (int, __locale_t) __attribute__ ((__nothrow__)); extern int iscntrl_l (int, __locale_t) __attribute__ ((__nothrow__)); extern int isdigit_l (int, __locale_t) __attribute__ ((__nothrow__)); extern int islower_l (int, __locale_t) __attribute__ ((__nothrow__)); extern int isgraph_l (int, __locale_t) __attribute__ ((__nothrow__)); extern int isprint_l (int, __locale_t) __attribute__ ((__nothrow__)); extern int ispunct_l (int, __locale_t) __attribute__ ((__nothrow__)); extern int isspace_l (int, __locale_t) __attribute__ ((__nothrow__)); extern int isupper_l (int, __locale_t) __attribute__ ((__nothrow__)); extern int isxdigit_l (int, __locale_t) __attribute__ ((__nothrow__)); extern int isblank_l (int, __locale_t) __attribute__ ((__nothrow__)); extern int __tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__)); extern int tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__)); extern int __toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__)); extern int toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__)); # 323 "../ctype/ctype.h" # 70 "../include/ctype.h" 2 # 26 "regex_internal.h" 2 # 1 "../include/stdio.h" 1 # 1 "../libio/stdio.h" 1 # 30 "../libio/stdio.h" # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 35 "../libio/stdio.h" 2 # 44 "../libio/stdio.h" typedef struct _IO_FILE FILE; # 62 "../libio/stdio.h" typedef struct _IO_FILE __FILE; # 72 "../libio/stdio.h" # 1 "../include/libio.h" 1 # 1 "../libio/libio.h" 1 # 32 "../libio/libio.h" # 1 "../sysdeps/gnu/_G_config.h" 1 # 14 "../sysdeps/gnu/_G_config.h" # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 355 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 3 4 typedef unsigned int wint_t; # 15 "../sysdeps/gnu/_G_config.h" 2 # 24 "../sysdeps/gnu/_G_config.h" # 1 "../include/wchar.h" 1 # 1 "../wcsmbs/wchar.h" 1 # 48 "../wcsmbs/wchar.h" # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 49 "../wcsmbs/wchar.h" 2 # 76 "../wcsmbs/wchar.h" typedef struct { int __count; union { wint_t __wch; char __wchb[4]; } __value; } __mbstate_t; # 3 "../include/wchar.h" 2 # 25 "../sysdeps/gnu/_G_config.h" 2 typedef struct { __off_t __pos; __mbstate_t __state; } _G_fpos_t; typedef struct { __off64_t __pos; __mbstate_t __state; } _G_fpos64_t; # 44 "../sysdeps/gnu/_G_config.h" # 1 "../include/gconv.h" 1 # 1 "../iconv/gconv.h" 1 # 28 "../iconv/gconv.h" # 1 "../include/wchar.h" 1 # 1 "../wcsmbs/wchar.h" 1 # 48 "../wcsmbs/wchar.h" # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 49 "../wcsmbs/wchar.h" 2 # 3 "../include/wchar.h" 2 # 29 "../iconv/gconv.h" 2 # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 32 "../iconv/gconv.h" 2 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; # 1 "../include/gconv.h" 2 # 45 "../sysdeps/gnu/_G_config.h" 2 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 "../libio/libio.h" 2 # 53 "../libio/libio.h" # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stdarg.h" 1 3 4 # 43 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stdarg.h" 3 4 typedef __builtin_va_list __gnuc_va_list; # 54 "../libio/libio.h" 2 # 167 "../libio/libio.h" struct _IO_jump_t; struct _IO_FILE; # 177 "../libio/libio.h" typedef void _IO_lock_t; struct _IO_marker { struct _IO_marker *_next; struct _IO_FILE *_sbuf; int _pos; # 200 "../libio/libio.h" }; enum __codecvt_result { __codecvt_ok, __codecvt_partial, __codecvt_error, __codecvt_noconv }; struct _IO_codecvt { void (*__codecvt_destr) (struct _IO_codecvt *); enum __codecvt_result (*__codecvt_do_out) (struct _IO_codecvt *, __mbstate_t *, const wchar_t *, const wchar_t *, const wchar_t **, char *, char *, char **); enum __codecvt_result (*__codecvt_do_unshift) (struct _IO_codecvt *, __mbstate_t *, char *, char *, char **); enum __codecvt_result (*__codecvt_do_in) (struct _IO_codecvt *, __mbstate_t *, const char *, const char *, const char **, wchar_t *, wchar_t *, wchar_t **); int (*__codecvt_do_encoding) (struct _IO_codecvt *); int (*__codecvt_do_always_noconv) (struct _IO_codecvt *); int (*__codecvt_do_length) (struct _IO_codecvt *, __mbstate_t *, const char *, const char *, size_t); int (*__codecvt_do_max_length) (struct _IO_codecvt *); _G_iconv_t __cd_in; _G_iconv_t __cd_out; }; struct _IO_wide_data { wchar_t *_IO_read_ptr; wchar_t *_IO_read_end; wchar_t *_IO_read_base; wchar_t *_IO_write_base; wchar_t *_IO_write_ptr; wchar_t *_IO_write_end; wchar_t *_IO_buf_base; wchar_t *_IO_buf_end; wchar_t *_IO_save_base; wchar_t *_IO_backup_base; wchar_t *_IO_save_end; __mbstate_t _IO_state; __mbstate_t _IO_last_state; struct _IO_codecvt _codecvt; wchar_t _shortbuf[1]; const struct _IO_jump_t *_wide_vtable; }; 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 "../libio/libio.h" __off64_t _offset; struct _IO_codecvt *_codecvt; struct _IO_wide_data *_wide_data; struct _IO_FILE *_freeres_list; void *_freeres_buf; size_t _freeres_size; int _mode; char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; }; typedef struct _IO_FILE _IO_FILE; 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_; extern _IO_FILE *_IO_stdin ; extern _IO_FILE *_IO_stdout ; extern _IO_FILE *_IO_stderr ; 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 int __underflow (_IO_FILE *) __attribute__ ((__nothrow__)); extern int __uflow (_IO_FILE *) __attribute__ ((__nothrow__)); extern int __overflow (_IO_FILE *, int) __attribute__ ((__nothrow__)); extern wint_t __wunderflow (_IO_FILE *) __attribute__ ((__nothrow__)); extern wint_t __wuflow (_IO_FILE *) __attribute__ ((__nothrow__)); extern wint_t __woverflow (_IO_FILE *, wint_t) __attribute__ ((__nothrow__)); # 451 "../libio/libio.h" extern int _IO_getc (_IO_FILE *__fp) __attribute__ ((__nothrow__)); extern int _IO_putc (int __c, _IO_FILE *__fp) __attribute__ ((__nothrow__)); extern int _IO_feof (_IO_FILE *__fp) __attribute__ ((__nothrow__)); extern int _IO_ferror (_IO_FILE *__fp) __attribute__ ((__nothrow__)); extern int _IO_peekc_locked (_IO_FILE *__fp) __attribute__ ((__nothrow__)); extern void _IO_flockfile (_IO_FILE *) __attribute__ ((__nothrow__)); extern void _IO_funlockfile (_IO_FILE *) __attribute__ ((__nothrow__)); extern int _IO_ftrylockfile (_IO_FILE *) __attribute__ ((__nothrow__)); # 481 "../libio/libio.h" 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) __attribute__ ((__nothrow__)); extern size_t _IO_sgetn (_IO_FILE *, void *, size_t) __attribute__ ((__nothrow__)); extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int) __attribute__ ((__nothrow__)); extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int) __attribute__ ((__nothrow__)); extern void _IO_free_backup_area (_IO_FILE *) __attribute__ ((__nothrow__)); extern wint_t _IO_getwc (_IO_FILE *__fp) __attribute__ ((__nothrow__)); extern wint_t _IO_putwc (wchar_t __wc, _IO_FILE *__fp) __attribute__ ((__nothrow__)); extern int _IO_fwide (_IO_FILE *__fp, int __mode) __attribute__ ((__nothrow__)); # 530 "../libio/libio.h" extern int _IO_vfwscanf (_IO_FILE * __restrict, const wchar_t * __restrict, __gnuc_va_list, int *__restrict); extern int _IO_vfwprintf (_IO_FILE *__restrict, const wchar_t *__restrict, __gnuc_va_list); extern __ssize_t _IO_wpadn (_IO_FILE *, wint_t, __ssize_t) __attribute__ ((__nothrow__)); extern void _IO_free_wbackup_area (_IO_FILE *) __attribute__ ((__nothrow__)); # 2 "../include/libio.h" 2 # 73 "../libio/stdio.h" 2 typedef __gnuc_va_list va_list; # 86 "../libio/stdio.h" typedef _G_fpos_t fpos_t; typedef _G_fpos64_t fpos64_t; # 138 "../libio/stdio.h" # 1 "/var/tmp/portage/glibc-2.5/work/build-default-hppa2.0-unknown-linux-gnu-nptl/bits/stdio_lim.h" 1 # 139 "../libio/stdio.h" 2 extern struct _IO_FILE *stdin; extern struct _IO_FILE *stdout; extern struct _IO_FILE *stderr; extern int remove (__const char *__filename) __attribute__ ((__nothrow__)); extern int rename (__const char *__old, __const char *__new) __attribute__ ((__nothrow__)); extern int renameat (int __oldfd, __const char *__old, int __newfd, __const char *__new) __attribute__ ((__nothrow__)); extern FILE *tmpfile (void) ; # 179 "../libio/stdio.h" extern FILE *tmpfile64 (void) ; extern char *tmpnam (char *__s) __attribute__ ((__nothrow__)) ; extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__)) ; # 201 "../libio/stdio.h" extern char *tempnam (__const char *__dir, __const char *__pfx) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ; extern int fclose (FILE *__stream); extern int fflush (FILE *__stream); # 226 "../libio/stdio.h" extern int fflush_unlocked (FILE *__stream); # 236 "../libio/stdio.h" 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) ; # 269 "../libio/stdio.h" 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) __attribute__ ((__nothrow__)) ; extern FILE *fopencookie (void *__restrict __magic_cookie, __const char *__restrict __modes, _IO_cookie_io_functions_t __io_funcs) __attribute__ ((__nothrow__)) ; extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes) __attribute__ ((__nothrow__)) ; extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __attribute__ ((__nothrow__)) ; extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__)); extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, int __modes, size_t __n) __attribute__ ((__nothrow__)); extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, size_t __size) __attribute__ ((__nothrow__)); extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__)); 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, ...) __attribute__ ((__nothrow__)); 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) __attribute__ ((__nothrow__)); extern int snprintf (char *__restrict __s, size_t __maxlen, __const char *__restrict __format, ...) __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4))); extern int vsnprintf (char *__restrict __s, size_t __maxlen, __const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0))); extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f, __gnuc_va_list __arg) __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0))) ; extern int __asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))) ; extern int asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) __attribute__ ((__nothrow__)) __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, ...) __attribute__ ((__nothrow__)); 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) __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__scanf__, 2, 0))); extern int fgetc (FILE *__stream); extern int getc (FILE *__stream); extern int getchar (void); # 461 "../libio/stdio.h" extern int getc_unlocked (FILE *__stream); extern int getchar_unlocked (void); # 472 "../libio/stdio.h" 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); # 505 "../libio/stdio.h" 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) ; # 551 "../libio/stdio.h" extern char *fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream) ; # 567 "../libio/stdio.h" 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) ; # 628 "../libio/stdio.h" extern int fputs_unlocked (__const char *__restrict __s, FILE *__restrict __stream); # 639 "../libio/stdio.h" 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); # 675 "../libio/stdio.h" extern int fseeko (FILE *__stream, __off_t __off, int __whence); extern __off_t ftello (FILE *__stream) ; # 694 "../libio/stdio.h" extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos); extern int fsetpos (FILE *__stream, __const fpos_t *__pos); # 717 "../libio/stdio.h" 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) __attribute__ ((__nothrow__)); extern int feof (FILE *__stream) __attribute__ ((__nothrow__)) ; extern int ferror (FILE *__stream) __attribute__ ((__nothrow__)) ; extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__)); extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ; extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ; extern void perror (__const char *__s); # 1 "../sysdeps/unix/sysv/linux/bits/sys_errlist.h" 1 # 27 "../sysdeps/unix/sysv/linux/bits/sys_errlist.h" extern int sys_nerr; extern __const char *__const sys_errlist[]; extern int _sys_nerr; extern __const char *__const _sys_errlist[]; # 756 "../libio/stdio.h" 2 extern int fileno (FILE *__stream) __attribute__ ((__nothrow__)) ; extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ; # 775 "../libio/stdio.h" extern FILE *popen (__const char *__command, __const char *__modes) ; extern int pclose (FILE *__stream); extern char *ctermid (char *__s) __attribute__ ((__nothrow__)); extern char *cuserid (char *__s); struct obstack; extern int obstack_printf (struct obstack *__restrict __obstack, __const char *__restrict __format, ...) __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))); extern int obstack_vprintf (struct obstack *__restrict __obstack, __const char *__restrict __format, __gnuc_va_list __args) __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0))); extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__)); extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__)) ; extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__)); # 836 "../libio/stdio.h" # 1 "../libio/bits/stdio.h" 1 # 33 "../libio/bits/stdio.h" extern __inline int vprintf (__const char *__restrict __fmt, __gnuc_va_list __arg) { return vfprintf (stdout, __fmt, __arg); } extern __inline int getchar (void) { return _IO_getc (stdin); } extern __inline int getc_unlocked (FILE *__fp) { return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); } extern __inline int getchar_unlocked (void) { return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++); } extern __inline int putchar (int __c) { return _IO_putc (__c, stdout); } extern __inline int fputc_unlocked (int __c, FILE *__stream) { return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); } extern __inline int putc_unlocked (int __c, FILE *__stream) { return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); } extern __inline int putchar_unlocked (int __c) { return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c))); } extern __inline __ssize_t getline (char **__lineptr, size_t *__n, FILE *__stream) { return __getdelim (__lineptr, __n, '\n', __stream); } extern __inline int __attribute__ ((__nothrow__)) feof_unlocked (FILE *__stream) { return (((__stream)->_flags & 0x10) != 0); } extern __inline int __attribute__ ((__nothrow__)) ferror_unlocked (FILE *__stream) { return (((__stream)->_flags & 0x20) != 0); } # 837 "../libio/stdio.h" 2 # 845 "../libio/stdio.h" # 6 "../include/stdio.h" 2 extern int __fcloseall (void); extern int __snprintf (char *__restrict __s, size_t __maxlen, __const char *__restrict __format, ...) __attribute__ ((__format__ (__printf__, 3, 4))); extern int __vsnprintf (char *__restrict __s, size_t __maxlen, __const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__format__ (__printf__, 3, 0))); 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 __ssize_t __getline (char **__lineptr, size_t *__n, FILE *__stream); extern int __vsscanf (__const char *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__format__ (__scanf__, 2, 0))); extern int __sprintf_chk (char *, int, size_t, const char *, ...) __attribute__ ((__nothrow__)); extern int __snprintf_chk (char *, size_t, int, size_t, const char *, ...) __attribute__ ((__nothrow__)); extern int __vsprintf_chk (char *, int, size_t, const char *, __gnuc_va_list) __attribute__ ((__nothrow__)); extern int __vsnprintf_chk (char *, size_t, int, size_t, const char *, __gnuc_va_list) __attribute__ ((__nothrow__)); extern int __printf_chk (int, const char *, ...); extern int __fprintf_chk (FILE *, int, const char *, ...); extern int __vprintf_chk (int, const char *, __gnuc_va_list); extern int __vfprintf_chk (FILE *, int, const char *, __gnuc_va_list); extern char *__fgets_unlocked_chk (char *buf, size_t size, int n, FILE *fp); extern char *__fgets_chk (char *buf, size_t size, int n, FILE *fp); extern FILE *__new_tmpfile (void); extern FILE *__old_tmpfile (void); # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 52 "../include/stdio.h" 2 extern int __path_search (char *__tmpl, size_t __tmpl_len, __const char *__dir, __const char *__pfx, int __try_tempdir); extern int __gen_tempname (char *__tmpl, int __kind); extern void __libc_fatal (__const char *__message) __attribute__ ((__noreturn__)); extern void __libc_message (int do_abort, __const char *__fnt, ...); extern void __flockfile (FILE *__stream); extern void __funlockfile (FILE *__stream); extern int __ftrylockfile (FILE *__stream); extern int __getc_unlocked (FILE *__fp); extern wint_t __getwc_unlocked (FILE *__fp); extern int __fxprintf (FILE *__fp, const char *__fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3))); extern __const char *__const _sys_errlist_internal[] ; extern int _sys_nerr_internal ; extern int __asprintf_internal (char **__restrict __ptr, __const char *__restrict __fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3))); extern _IO_FILE *_IO_new_fopen (const char*, const char*); extern _IO_FILE *_IO_new_fdopen (int, const char*); extern int _IO_new_fclose (_IO_FILE*); extern int _IO_fputs (const char*, _IO_FILE*); extern int _IO_new_fsetpos (_IO_FILE *, const _G_fpos_t *); extern int _IO_new_fgetpos (_IO_FILE *, _G_fpos_t *); # 27 "regex_internal.h" 2 # 1 "../include/string.h" 1 # 1 "../include/sys/types.h" 1 # 4 "../include/string.h" 2 extern void *__memccpy (void *__dest, __const void *__src, int __c, size_t __n); extern size_t __strnlen (__const char *__string, size_t __maxlen) __attribute__ ((__pure__)); extern char *__strsep (char **__stringp, __const char *__delim); extern int __strverscmp (__const char *__s1, __const char *__s2) __attribute__ ((__pure__)); extern int __strncasecmp (__const char *__s1, __const char *__s2, size_t __n) __attribute__ ((__pure__)); extern int __strcasecmp (__const char *__s1, __const char *__s2) __attribute__ ((__pure__)); extern char *__strcasestr (__const char *__haystack, __const char *__needle) __attribute__ ((__pure__)); extern char *__strdup (__const char *__string) __attribute__ ((__malloc__)); extern char *__strndup (__const char *__string, size_t __n) __attribute__ ((__malloc__)); extern void *__rawmemchr (__const void *__s, int __c) __attribute__ ((__pure__)); extern char *__strchrnul (__const char *__s, int __c) __attribute__ ((__pure__)); extern void *__memrchr (__const void *__s, int __c, size_t __n) __attribute__ ((__pure__)); extern void *__memchr (__const void *__s, int __c, size_t __n) __attribute__ ((__pure__)); extern int __ffs (int __i) __attribute__ ((const)); extern char *__strerror_r (int __errnum, char *__buf, size_t __buflen); # 1 "../string/string.h" 1 # 28 "../string/string.h" # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 34 "../string/string.h" 2 extern void *memcpy (void *__restrict __dest, __const void *__restrict __src, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern void *memmove (void *__dest, __const void *__src, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern void *memccpy (void *__restrict __dest, __const void *__restrict __src, int __c, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int memcmp (__const void *__s1, __const void *__s2, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern void *memchr (__const void *__s, int __c, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern void *rawmemchr (__const void *__s, int __c) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern void *memrchr (__const void *__s, int __c, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *strcpy (char *__restrict __dest, __const char *__restrict __src) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strncpy (char *__restrict __dest, __const char *__restrict __src, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strcat (char *__restrict __dest, __const char *__restrict __src) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strncat (char *__restrict __dest, __const char *__restrict __src, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int strcmp (__const char *__s1, __const char *__s2) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strncmp (__const char *__s1, __const char *__s2, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strcoll (__const char *__s1, __const char *__s2) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern size_t strxfrm (char *__restrict __dest, __const char *__restrict __src, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); # 1 "../include/xlocale.h" 1 # 119 "../string/string.h" 2 extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n, __locale_t __l) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4))); extern char *strdup (__const char *__s) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); extern char *strndup (__const char *__string, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); # 165 "../string/string.h" extern char *strchr (__const char *__s, int __c) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *strrchr (__const char *__s, int __c) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *strchrnul (__const char *__s, int __c) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern size_t strcspn (__const char *__s, __const char *__reject) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern size_t strspn (__const char *__s, __const char *__accept) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strpbrk (__const char *__s, __const char *__accept) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strstr (__const char *__haystack, __const char *__needle) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strtok (char *__restrict __s, __const char *__restrict __delim) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); extern char *__strtok_r (char *__restrict __s, __const char *__restrict __delim, char **__restrict __save_ptr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim, char **__restrict __save_ptr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); extern char *strcasestr (__const char *__haystack, __const char *__needle) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern void *memmem (__const void *__haystack, size_t __haystacklen, __const void *__needle, size_t __needlelen) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3))); extern void *__mempcpy (void *__restrict __dest, __const void *__restrict __src, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern void *mempcpy (void *__restrict __dest, __const void *__restrict __src, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern size_t strlen (__const char *__s) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern size_t strnlen (__const char *__string, size_t __maxlen) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *strerror (int __errnum) __attribute__ ((__nothrow__)); # 281 "../string/string.h" extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); extern void __bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern void bcopy (__const void *__src, void *__dest, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int bcmp (__const void *__s1, __const void *__s2, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *index (__const char *__s, int __c) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *rindex (__const char *__s, int __c) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern int ffs (int __i) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern int ffsl (long int __l) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); __extension__ extern int ffsll (long long int __ll) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern int strcasecmp (__const char *__s1, __const char *__s2) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strcasecmp_l (__const char *__s1, __const char *__s2, __locale_t __loc) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); extern int strncasecmp_l (__const char *__s1, __const char *__s2, size_t __n, __locale_t __loc) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4))); extern char *strsep (char **__restrict __stringp, __const char *__restrict __delim) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int strverscmp (__const char *__s1, __const char *__s2) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strsignal (int __sig) __attribute__ ((__nothrow__)); extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern char *__stpncpy (char *__restrict __dest, __const char *__restrict __src, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern char *stpncpy (char *__restrict __dest, __const char *__restrict __src, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strfry (char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern void *memfrob (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern char *basename (__const char *__filename) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); # 414 "../string/string.h" # 1 "../bits/string.h" 1 # 415 "../string/string.h" 2 # 1 "../include/bits/string2.h" 1 # 1 "../string/bits/string2.h" 1 # 80 "../string/bits/string2.h" typedef struct { unsigned char __arr[2]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR2; typedef struct { unsigned char __arr[3]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR3; typedef struct { unsigned char __arr[4]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR4; typedef struct { unsigned char __arr[5]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR5; typedef struct { unsigned char __arr[6]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR6; typedef struct { unsigned char __arr[7]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR7; typedef struct { unsigned char __arr[8]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR8; # 394 "../string/bits/string2.h" extern void *__rawmemchr (const void *__s, int __c); # 969 "../string/bits/string2.h" extern __inline size_t __strcspn_c1 (__const char *__s, int __reject); extern __inline size_t __strcspn_c1 (__const char *__s, int __reject) { register size_t __result = 0; while (__s[__result] != '\0' && __s[__result] != __reject) ++__result; return __result; } extern __inline size_t __strcspn_c2 (__const char *__s, int __reject1, int __reject2); extern __inline size_t __strcspn_c2 (__const char *__s, int __reject1, int __reject2) { register size_t __result = 0; while (__s[__result] != '\0' && __s[__result] != __reject1 && __s[__result] != __reject2) ++__result; return __result; } extern __inline size_t __strcspn_c3 (__const char *__s, int __reject1, int __reject2, int __reject3); extern __inline size_t __strcspn_c3 (__const char *__s, int __reject1, int __reject2, int __reject3) { register size_t __result = 0; while (__s[__result] != '\0' && __s[__result] != __reject1 && __s[__result] != __reject2 && __s[__result] != __reject3) ++__result; return __result; } # 1045 "../string/bits/string2.h" extern __inline size_t __strspn_c1 (__const char *__s, int __accept); extern __inline size_t __strspn_c1 (__const char *__s, int __accept) { register size_t __result = 0; while (__s[__result] == __accept) ++__result; return __result; } extern __inline size_t __strspn_c2 (__const char *__s, int __accept1, int __accept2); extern __inline size_t __strspn_c2 (__const char *__s, int __accept1, int __accept2) { register size_t __result = 0; while (__s[__result] == __accept1 || __s[__result] == __accept2) ++__result; return __result; } extern __inline size_t __strspn_c3 (__const char *__s, int __accept1, int __accept2, int __accept3); extern __inline size_t __strspn_c3 (__const char *__s, int __accept1, int __accept2, int __accept3) { register size_t __result = 0; while (__s[__result] == __accept1 || __s[__result] == __accept2 || __s[__result] == __accept3) ++__result; return __result; } # 1121 "../string/bits/string2.h" extern __inline char *__strpbrk_c2 (__const char *__s, int __accept1, int __accept2); extern __inline char * __strpbrk_c2 (__const char *__s, int __accept1, int __accept2) { while (*__s != '\0' && *__s != __accept1 && *__s != __accept2) ++__s; return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s; } extern __inline char *__strpbrk_c3 (__const char *__s, int __accept1, int __accept2, int __accept3); extern __inline char * __strpbrk_c3 (__const char *__s, int __accept1, int __accept2, int __accept3) { while (*__s != '\0' && *__s != __accept1 && *__s != __accept2 && *__s != __accept3) ++__s; return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s; } # 1173 "../string/bits/string2.h" extern __inline char *__strtok_r_1c (char *__s, char __sep, char **__nextp); extern __inline char * __strtok_r_1c (char *__s, char __sep, char **__nextp) { char *__result; if (__s == ((void *)0)) __s = *__nextp; while (*__s == __sep) ++__s; __result = ((void *)0); if (*__s != '\0') { __result = __s++; while (*__s != '\0') if (*__s++ == __sep) { __s[-1] = '\0'; break; } *__nextp = __s; } return __result; } # 1205 "../string/bits/string2.h" extern char *__strsep_g (char **__stringp, __const char *__delim); # 1223 "../string/bits/string2.h" extern __inline char *__strsep_1c (char **__s, char __reject); extern __inline char * __strsep_1c (char **__s, char __reject) { register char *__retval = *__s; if (__retval != ((void *)0) && (*__s = (__extension__ (__builtin_constant_p (__reject) && !__builtin_constant_p (__retval) && (__reject) == '\0' ? (char *) __rawmemchr (__retval, __reject) : __builtin_strchr (__retval, __reject)))) != ((void *)0)) *(*__s)++ = '\0'; return __retval; } extern __inline char *__strsep_2c (char **__s, char __reject1, char __reject2); extern __inline char * __strsep_2c (char **__s, char __reject1, char __reject2) { register char *__retval = *__s; if (__retval != ((void *)0)) { register char *__cp = __retval; while (1) { if (*__cp == '\0') { __cp = ((void *)0); break; } if (*__cp == __reject1 || *__cp == __reject2) { *__cp++ = '\0'; break; } ++__cp; } *__s = __cp; } return __retval; } extern __inline char *__strsep_3c (char **__s, char __reject1, char __reject2, char __reject3); extern __inline char * __strsep_3c (char **__s, char __reject1, char __reject2, char __reject3) { register char *__retval = *__s; if (__retval != ((void *)0)) { register char *__cp = __retval; while (1) { if (*__cp == '\0') { __cp = ((void *)0); break; } if (*__cp == __reject1 || *__cp == __reject2 || *__cp == __reject3) { *__cp++ = '\0'; break; } ++__cp; } *__s = __cp; } return __retval; } # 1304 "../string/bits/string2.h" extern char *__strdup (__const char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)); # 1323 "../string/bits/string2.h" extern char *__strndup (__const char *__string, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)); # 1 "../include/bits/string2.h" 2 # 418 "../string/string.h" 2 # 426 "../string/string.h" # 50 "../include/string.h" 2 extern __typeof (strcoll_l) __strcoll_l; extern __typeof (strxfrm_l) __strxfrm_l; extern __typeof (strcasecmp_l) __strcasecmp_l; extern __typeof (strncasecmp_l) __strncasecmp_l; # 70 "../include/string.h" extern char *__strsep_g (char **__stringp, __const char *__delim); # 120 "../include/string.h" extern void *__memcpy_chk (void *__restrict __dest, const void *__restrict __src, size_t __len, size_t __destlen) __attribute__ ((__nothrow__)); extern void *__memmove_chk (void *__dest, const void *__src, size_t __len, size_t __destlen) __attribute__ ((__nothrow__)); extern void *__mempcpy_chk (void *__restrict __dest, const void *__restrict __src, size_t __len, size_t __destlen) __attribute__ ((__nothrow__)); extern void *__memset_chk (void *__dest, int __ch, size_t __len, size_t __destlen) __attribute__ ((__nothrow__)); extern char *__strcpy_chk (char *__restrict __dest, const char *__restrict __src, size_t __destlen) __attribute__ ((__nothrow__)); extern char *__stpcpy_chk (char *__restrict __dest, const char *__restrict __src, size_t __destlen) __attribute__ ((__nothrow__)); extern char *__strncpy_chk (char *__restrict __dest, const char *__restrict __src, size_t __len, size_t __destlen) __attribute__ ((__nothrow__)); extern char *__strcat_chk (char *__restrict __dest, const char *__restrict __src, size_t __destlen) __attribute__ ((__nothrow__)); extern char *__strncat_chk (char *__restrict __dest, const char *__restrict __src, size_t __len, size_t __destlen) __attribute__ ((__nothrow__)); # 29 "regex_internal.h" 2 # 37 "regex_internal.h" # 1 "../include/wchar.h" 1 # 1 "../wcsmbs/wchar.h" 1 # 40 "../wcsmbs/wchar.h" # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stdarg.h" 1 3 4 # 41 "../wcsmbs/wchar.h" 2 # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 49 "../wcsmbs/wchar.h" 2 # 93 "../wcsmbs/wchar.h" typedef __mbstate_t mbstate_t; # 118 "../wcsmbs/wchar.h" struct tm; extern wchar_t *wcscpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src) __attribute__ ((__nothrow__)); extern wchar_t *wcsncpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) __attribute__ ((__nothrow__)); extern wchar_t *wcscat (wchar_t *__restrict __dest, __const wchar_t *__restrict __src) __attribute__ ((__nothrow__)); extern wchar_t *wcsncat (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) __attribute__ ((__nothrow__)); extern int wcscmp (__const wchar_t *__s1, __const wchar_t *__s2) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)); extern int wcsncmp (__const wchar_t *__s1, __const wchar_t *__s2, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)); extern int wcscasecmp (__const wchar_t *__s1, __const wchar_t *__s2) __attribute__ ((__nothrow__)); extern int wcsncasecmp (__const wchar_t *__s1, __const wchar_t *__s2, size_t __n) __attribute__ ((__nothrow__)); # 1 "../include/xlocale.h" 1 # 167 "../wcsmbs/wchar.h" 2 extern int wcscasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2, __locale_t __loc) __attribute__ ((__nothrow__)); extern int wcsncasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2, size_t __n, __locale_t __loc) __attribute__ ((__nothrow__)); extern int wcscoll (__const wchar_t *__s1, __const wchar_t *__s2) __attribute__ ((__nothrow__)); extern size_t wcsxfrm (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) __attribute__ ((__nothrow__)); extern int wcscoll_l (__const wchar_t *__s1, __const wchar_t *__s2, __locale_t __loc) __attribute__ ((__nothrow__)); extern size_t wcsxfrm_l (wchar_t *__s1, __const wchar_t *__s2, size_t __n, __locale_t __loc) __attribute__ ((__nothrow__)); extern wchar_t *wcsdup (__const wchar_t *__s) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)); extern wchar_t *wcschr (__const wchar_t *__wcs, wchar_t __wc) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)); extern wchar_t *wcsrchr (__const wchar_t *__wcs, wchar_t __wc) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)); extern wchar_t *wcschrnul (__const wchar_t *__s, wchar_t __wc) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)); extern size_t wcscspn (__const wchar_t *__wcs, __const wchar_t *__reject) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)); extern size_t wcsspn (__const wchar_t *__wcs, __const wchar_t *__accept) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)); extern wchar_t *wcspbrk (__const wchar_t *__wcs, __const wchar_t *__accept) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)); extern wchar_t *wcsstr (__const wchar_t *__haystack, __const wchar_t *__needle) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)); extern wchar_t *wcstok (wchar_t *__restrict __s, __const wchar_t *__restrict __delim, wchar_t **__restrict __ptr) __attribute__ ((__nothrow__)); extern size_t wcslen (__const wchar_t *__s) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)); extern wchar_t *wcswcs (__const wchar_t *__haystack, __const wchar_t *__needle) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)); extern size_t wcsnlen (__const wchar_t *__s, size_t __maxlen) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)); extern wchar_t *wmemchr (__const wchar_t *__s, wchar_t __c, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)); extern int wmemcmp (__const wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)); extern wchar_t *wmemcpy (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) __attribute__ ((__nothrow__)); extern wchar_t *wmemmove (wchar_t *__s1, __const wchar_t *__s2, size_t __n) __attribute__ ((__nothrow__)); extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __attribute__ ((__nothrow__)); extern wchar_t *wmempcpy (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) __attribute__ ((__nothrow__)); extern wint_t btowc (int __c) __attribute__ ((__nothrow__)); extern int wctob (wint_t __c) __attribute__ ((__nothrow__)); extern int mbsinit (__const mbstate_t *__ps) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)); extern size_t mbrtowc (wchar_t *__restrict __pwc, __const char *__restrict __s, size_t __n, mbstate_t *__p) __attribute__ ((__nothrow__)); extern size_t wcrtomb (char *__restrict __s, wchar_t __wc, mbstate_t *__restrict __ps) __attribute__ ((__nothrow__)); extern size_t __mbrlen (__const char *__restrict __s, size_t __n, mbstate_t *__restrict __ps) __attribute__ ((__nothrow__)); extern size_t mbrlen (__const char *__restrict __s, size_t __n, mbstate_t *__restrict __ps) __attribute__ ((__nothrow__)); # 328 "../wcsmbs/wchar.h" extern wint_t __btowc_alias (int __c) __asm ("btowc"); extern __inline wint_t __attribute__ ((__nothrow__)) btowc (int __c) { return (__builtin_constant_p (__c) && __c >= '\0' && __c <= '\x7f' ? (wint_t) __c : __btowc_alias (__c)); } extern int __wctob_alias (wint_t __c) __asm ("wctob"); extern __inline int __attribute__ ((__nothrow__)) wctob (wint_t __wc) { return (__builtin_constant_p (__wc) && __wc >= L'\0' && __wc <= L'\x7f' ? (int) __wc : __wctob_alias (__wc)); } extern __inline size_t __attribute__ ((__nothrow__)) mbrlen (__const char *__restrict __s, size_t __n, mbstate_t *__restrict __ps) { return (__ps != ((void *)0) ? mbrtowc (((void *)0), __s, __n, __ps) : __mbrlen (__s, __n, ((void *)0))); } extern size_t mbsrtowcs (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps) __attribute__ ((__nothrow__)); extern size_t wcsrtombs (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps) __attribute__ ((__nothrow__)); extern size_t mbsnrtowcs (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps) __attribute__ ((__nothrow__)); extern size_t wcsnrtombs (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps) __attribute__ ((__nothrow__)); extern int wcwidth (wchar_t __c) __attribute__ ((__nothrow__)); extern int wcswidth (__const wchar_t *__s, size_t __n) __attribute__ ((__nothrow__)); extern double wcstod (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __attribute__ ((__nothrow__)); extern float wcstof (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __attribute__ ((__nothrow__)); extern long double wcstold (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __attribute__ ((__nothrow__)); extern long int wcstol (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) __attribute__ ((__nothrow__)); extern unsigned long int wcstoul (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) __attribute__ ((__nothrow__)); __extension__ extern long long int wcstoll (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) __attribute__ ((__nothrow__)); __extension__ extern unsigned long long int wcstoull (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) __attribute__ ((__nothrow__)); __extension__ extern long long int wcstoq (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) __attribute__ ((__nothrow__)); __extension__ extern unsigned long long int wcstouq (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) __attribute__ ((__nothrow__)); # 463 "../wcsmbs/wchar.h" # 1 "../include/xlocale.h" 1 # 464 "../wcsmbs/wchar.h" 2 extern long int wcstol_l (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, __locale_t __loc) __attribute__ ((__nothrow__)); extern unsigned long int wcstoul_l (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, __locale_t __loc) __attribute__ ((__nothrow__)); __extension__ extern long long int wcstoll_l (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, __locale_t __loc) __attribute__ ((__nothrow__)); __extension__ extern unsigned long long int wcstoull_l (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, __locale_t __loc) __attribute__ ((__nothrow__)); extern double wcstod_l (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, __locale_t __loc) __attribute__ ((__nothrow__)); extern float wcstof_l (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, __locale_t __loc) __attribute__ ((__nothrow__)); extern long double wcstold_l (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, __locale_t __loc) __attribute__ ((__nothrow__)); extern double __wcstod_internal (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __group) __attribute__ ((__nothrow__)); extern float __wcstof_internal (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __group) __attribute__ ((__nothrow__)); extern long double __wcstold_internal (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __group) __attribute__ ((__nothrow__)); extern long int __wcstol_internal (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, int __group) __attribute__ ((__nothrow__)); extern unsigned long int __wcstoul_internal (__const wchar_t *__restrict __npt, wchar_t **__restrict __endptr, int __base, int __group) __attribute__ ((__nothrow__)); # 549 "../wcsmbs/wchar.h" extern __inline double __attribute__ ((__nothrow__)) wcstod (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) { return __wcstod_internal (__nptr, __endptr, 0); } extern __inline long int __attribute__ ((__nothrow__)) wcstol (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) { return __wcstol_internal (__nptr, __endptr, __base, 0); } extern __inline unsigned long int __attribute__ ((__nothrow__)) wcstoul (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) { return __wcstoul_internal (__nptr, __endptr, __base, 0); } extern __inline float __attribute__ ((__nothrow__)) wcstof (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) { return __wcstof_internal (__nptr, __endptr, 0); } extern __inline long double __attribute__ ((__nothrow__)) wcstold (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) { return __wcstold_internal (__nptr, __endptr, 0); } __extension__ extern __inline long long int __attribute__ ((__nothrow__)) wcstoq (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) { return __wcstoll_internal (__nptr, __endptr, __base, 0); } __extension__ extern __inline unsigned long long int __attribute__ ((__nothrow__)) wcstouq (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) { return __wcstoull_internal (__nptr, __endptr, __base, 0); } extern wchar_t *wcpcpy (wchar_t *__dest, __const wchar_t *__src) __attribute__ ((__nothrow__)); extern wchar_t *wcpncpy (wchar_t *__dest, __const wchar_t *__src, size_t __n) __attribute__ ((__nothrow__)); # 607 "../wcsmbs/wchar.h" extern __FILE *open_wmemstream (wchar_t **__bufloc, size_t *__sizeloc) __attribute__ ((__nothrow__)); extern int fwide (__FILE *__fp, int __mode) __attribute__ ((__nothrow__)); extern int fwprintf (__FILE *__restrict __stream, __const wchar_t *__restrict __format, ...) ; extern int wprintf (__const wchar_t *__restrict __format, ...) ; extern int swprintf (wchar_t *__restrict __s, size_t __n, __const wchar_t *__restrict __format, ...) __attribute__ ((__nothrow__)) ; extern int vfwprintf (__FILE *__restrict __s, __const wchar_t *__restrict __format, __gnuc_va_list __arg) ; extern int vwprintf (__const wchar_t *__restrict __format, __gnuc_va_list __arg) ; extern int vswprintf (wchar_t *__restrict __s, size_t __n, __const wchar_t *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__nothrow__)) ; extern int fwscanf (__FILE *__restrict __stream, __const wchar_t *__restrict __format, ...) ; extern int wscanf (__const wchar_t *__restrict __format, ...) ; extern int swscanf (__const wchar_t *__restrict __s, __const wchar_t *__restrict __format, ...) __attribute__ ((__nothrow__)) ; extern int vfwscanf (__FILE *__restrict __s, __const wchar_t *__restrict __format, __gnuc_va_list __arg) ; extern int vwscanf (__const wchar_t *__restrict __format, __gnuc_va_list __arg) ; extern int vswscanf (__const wchar_t *__restrict __s, __const wchar_t *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__nothrow__)) ; extern wint_t fgetwc (__FILE *__stream); extern wint_t getwc (__FILE *__stream); extern wint_t getwchar (void); extern wint_t fputwc (wchar_t __wc, __FILE *__stream); extern wint_t putwc (wchar_t __wc, __FILE *__stream); extern wint_t putwchar (wchar_t __wc); extern wchar_t *fgetws (wchar_t *__restrict __ws, int __n, __FILE *__restrict __stream); extern int fputws (__const wchar_t *__restrict __ws, __FILE *__restrict __stream); extern wint_t ungetwc (wint_t __wc, __FILE *__stream); # 768 "../wcsmbs/wchar.h" extern wint_t getwc_unlocked (__FILE *__stream); extern wint_t getwchar_unlocked (void); extern wint_t fgetwc_unlocked (__FILE *__stream); extern wint_t fputwc_unlocked (wchar_t __wc, __FILE *__stream); # 794 "../wcsmbs/wchar.h" extern wint_t putwc_unlocked (wchar_t __wc, __FILE *__stream); extern wint_t putwchar_unlocked (wchar_t __wc); # 804 "../wcsmbs/wchar.h" extern wchar_t *fgetws_unlocked (wchar_t *__restrict __ws, int __n, __FILE *__restrict __stream); extern int fputws_unlocked (__const wchar_t *__restrict __ws, __FILE *__restrict __stream); extern size_t wcsftime (wchar_t *__restrict __s, size_t __maxsize, __const wchar_t *__restrict __format, __const struct tm *__restrict __tp) __attribute__ ((__nothrow__)); # 1 "../include/xlocale.h" 1 # 829 "../wcsmbs/wchar.h" 2 extern size_t wcsftime_l (wchar_t *__restrict __s, size_t __maxsize, __const wchar_t *__restrict __format, __const struct tm *__restrict __tp, __locale_t __loc) __attribute__ ((__nothrow__)); # 858 "../wcsmbs/wchar.h" # 3 "../include/wchar.h" 2 extern __typeof (wcscasecmp_l) __wcscasecmp_l; extern __typeof (wcsncasecmp_l) __wcsncasecmp_l; extern __typeof (wcscoll_l) __wcscoll_l; extern __typeof (wcsxfrm_l) __wcsxfrm_l; extern __typeof (wcstol_l) __wcstol_l; extern __typeof (wcstoul_l) __wcstoul_l; extern __typeof (wcstoll_l) __wcstoll_l; extern __typeof (wcstoull_l) __wcstoull_l; extern __typeof (wcstod_l) __wcstod_l; extern __typeof (wcstof_l) __wcstof_l; extern __typeof (wcstold_l) __wcstold_l; extern __typeof (wcsftime_l) __wcsftime_l; extern int __wcscasecmp (__const wchar_t *__s1, __const wchar_t *__s2) __attribute__ ((__pure__)); extern int __wcsncasecmp (__const wchar_t *__s1, __const wchar_t *__s2, size_t __n) __attribute__ ((__pure__)); extern size_t __wcslen (__const wchar_t *__s) __attribute__ ((__pure__)); extern size_t __wcsnlen (__const wchar_t *__s, size_t __maxlen) __attribute__ ((__pure__)); extern wchar_t *__wcscat (wchar_t *dest, const wchar_t *src); extern wint_t __btowc (int __c); extern int __mbsinit (__const __mbstate_t *__ps); extern size_t __mbrtowc (wchar_t *__restrict __pwc, __const char *__restrict __s, size_t __n, __mbstate_t *__restrict __p); extern size_t __wcrtomb (char *__restrict __s, wchar_t __wc, __mbstate_t *__restrict __ps); extern size_t __mbsrtowcs (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __len, __mbstate_t *__restrict __ps); extern size_t __wcsrtombs (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __len, __mbstate_t *__restrict __ps); extern size_t __mbsnrtowcs (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __nmc, size_t __len, __mbstate_t *__restrict __ps); extern size_t __wcsnrtombs (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __nwc, size_t __len, __mbstate_t *__restrict __ps); extern wchar_t *__wcsncpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n); extern wchar_t *__wcpcpy (wchar_t *__dest, __const wchar_t *__src); extern wchar_t *__wcpncpy (wchar_t *__dest, __const wchar_t *__src, size_t __n); extern wchar_t *__wmemcpy (wchar_t *__s1, __const wchar_t *s2, size_t __n); extern wchar_t *__wmempcpy (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n); extern wchar_t *__wmemmove (wchar_t *__s1, __const wchar_t *__s2, size_t __n); extern wchar_t *__wcschrnul (__const wchar_t *__s, wchar_t __wc) __attribute__ ((__pure__)); extern int __vfwscanf (__FILE *__restrict __s, __const wchar_t *__restrict __format, __gnuc_va_list __arg) ; extern int __vswprintf (wchar_t *__restrict __s, size_t __n, __const wchar_t *__restrict __format, __gnuc_va_list __arg) ; extern int __fwprintf (__FILE *__restrict __s, __const wchar_t *__restrict __format, ...) ; extern int __vfwprintf (__FILE *__restrict __s, __const wchar_t *__restrict __format, __gnuc_va_list __arg) ; extern int __vfwprintf_chk (FILE *__restrict __s, int __flag, const wchar_t *__restrict __format, __gnuc_va_list __arg) ; extern int __vswprintf_chk (wchar_t *__restrict __s, size_t __n, int __flag, size_t __s_len, __const wchar_t *__restrict __format, __gnuc_va_list __arg) ; extern size_t __mbsrtowcs_l (wchar_t *dst, const char **src, size_t len, mbstate_t *ps, __locale_t l) ; # 38 "regex_internal.h" 2 # 1 "../include/wctype.h" 1 # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 7 "../include/wctype.h" 2 # 19 "../include/wctype.h" extern int iswalpha (wint_t __wc); extern int iswalnum (wint_t __wc); extern int iswdigit (wint_t __wc); extern int iswlower (wint_t __wc); extern int iswspace (wint_t __wc); extern int iswxdigit (wint_t __wc); extern wint_t towlower (wint_t __wc); extern wint_t towupper (wint_t __wc); # 1 "../wctype/wctype.h" 1 # 35 "../wctype/wctype.h" # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 36 "../wctype/wctype.h" 2 # 45 "../wctype/wctype.h" # 63 "../wctype/wctype.h" typedef unsigned long int wctype_t; # 1 "../include/endian.h" 1 # 75 "../wctype/wctype.h" 2 # 85 "../wctype/wctype.h" enum { __ISwupper = 0, __ISwlower = 1, __ISwalpha = 2, __ISwdigit = 3, __ISwxdigit = 4, __ISwspace = 5, __ISwprint = 6, __ISwgraph = 7, __ISwblank = 8, __ISwcntrl = 9, __ISwpunct = 10, __ISwalnum = 11, _ISwupper = (1 << (__ISwupper)), _ISwlower = (1 << (__ISwlower)), _ISwalpha = (1 << (__ISwalpha)), _ISwdigit = (1 << (__ISwdigit)), _ISwxdigit = (1 << (__ISwxdigit)), _ISwspace = (1 << (__ISwspace)), _ISwprint = (1 << (__ISwprint)), _ISwgraph = (1 << (__ISwgraph)), _ISwblank = (1 << (__ISwblank)), _ISwcntrl = (1 << (__ISwcntrl)), _ISwpunct = (1 << (__ISwpunct)), _ISwalnum = (1 << (__ISwalnum)) }; extern int iswalnum (wint_t __wc) __attribute__ ((__nothrow__)); extern int iswalpha (wint_t __wc) __attribute__ ((__nothrow__)); extern int iswcntrl (wint_t __wc) __attribute__ ((__nothrow__)); extern int iswdigit (wint_t __wc) __attribute__ ((__nothrow__)); extern int iswgraph (wint_t __wc) __attribute__ ((__nothrow__)); extern int iswlower (wint_t __wc) __attribute__ ((__nothrow__)); extern int iswprint (wint_t __wc) __attribute__ ((__nothrow__)); extern int iswpunct (wint_t __wc) __attribute__ ((__nothrow__)); extern int iswspace (wint_t __wc) __attribute__ ((__nothrow__)); extern int iswupper (wint_t __wc) __attribute__ ((__nothrow__)); extern int iswxdigit (wint_t __wc) __attribute__ ((__nothrow__)); extern int iswblank (wint_t __wc) __attribute__ ((__nothrow__)); # 185 "../wctype/wctype.h" extern wctype_t wctype (__const char *__property) __attribute__ ((__nothrow__)); extern int iswctype (wint_t __wc, wctype_t __desc) __attribute__ ((__nothrow__)); typedef __const __int32_t *wctrans_t; extern wint_t towlower (wint_t __wc) __attribute__ ((__nothrow__)); extern wint_t towupper (wint_t __wc) __attribute__ ((__nothrow__)); # 227 "../wctype/wctype.h" extern wctrans_t wctrans (__const char *__property) __attribute__ ((__nothrow__)); extern wint_t towctrans (wint_t __wc, wctrans_t __desc) __attribute__ ((__nothrow__)); # 1 "../include/xlocale.h" 1 # 241 "../wctype/wctype.h" 2 extern int iswalnum_l (wint_t __wc, __locale_t __locale) __attribute__ ((__nothrow__)); extern int iswalpha_l (wint_t __wc, __locale_t __locale) __attribute__ ((__nothrow__)); extern int iswcntrl_l (wint_t __wc, __locale_t __locale) __attribute__ ((__nothrow__)); extern int iswdigit_l (wint_t __wc, __locale_t __locale) __attribute__ ((__nothrow__)); extern int iswgraph_l (wint_t __wc, __locale_t __locale) __attribute__ ((__nothrow__)); extern int iswlower_l (wint_t __wc, __locale_t __locale) __attribute__ ((__nothrow__)); extern int iswprint_l (wint_t __wc, __locale_t __locale) __attribute__ ((__nothrow__)); extern int iswpunct_l (wint_t __wc, __locale_t __locale) __attribute__ ((__nothrow__)); extern int iswspace_l (wint_t __wc, __locale_t __locale) __attribute__ ((__nothrow__)); extern int iswupper_l (wint_t __wc, __locale_t __locale) __attribute__ ((__nothrow__)); extern int iswxdigit_l (wint_t __wc, __locale_t __locale) __attribute__ ((__nothrow__)); extern int iswblank_l (wint_t __wc, __locale_t __locale) __attribute__ ((__nothrow__)); extern wctype_t wctype_l (__const char *__property, __locale_t __locale) __attribute__ ((__nothrow__)); extern int iswctype_l (wint_t __wc, wctype_t __desc, __locale_t __locale) __attribute__ ((__nothrow__)); extern wint_t towlower_l (wint_t __wc, __locale_t __locale) __attribute__ ((__nothrow__)); extern wint_t towupper_l (wint_t __wc, __locale_t __locale) __attribute__ ((__nothrow__)); extern wctrans_t wctrans_l (__const char *__property, __locale_t __locale) __attribute__ ((__nothrow__)); extern wint_t towctrans_l (wint_t __wc, wctrans_t __desc, __locale_t __locale) __attribute__ ((__nothrow__)); # 38 "../include/wctype.h" 2 extern int __iswalpha_l_internal (wint_t __wc, __locale_t __locale) ; extern int __iswdigit_l_internal (wint_t __wc, __locale_t __locale) ; extern int __iswspace_l_internal (wint_t __wc, __locale_t __locale) ; extern int __iswxdigit_l_internal (wint_t __wc, __locale_t __locale) ; extern int __iswspace (wint_t __wc); extern int __iswctype (wint_t __wc, wctype_t __desc); extern int __iswctype_internal (wint_t __wc, wctype_t __desc) ; extern wctype_t __wctype (__const char *__property); extern wctrans_t __wctrans (const char *__property); extern wint_t __towctrans (wint_t __wc, wctrans_t __desc); extern __typeof (iswalnum_l) __iswalnum_l; extern __typeof (iswalpha_l) __iswalpha_l; extern __typeof (iswblank_l) __iswblank_l; extern __typeof (iswcntrl_l) __iswcntrl_l; extern __typeof (iswdigit_l) __iswdigit_l; extern __typeof (iswlower_l) __iswlower_l; extern __typeof (iswgraph_l) __iswgraph_l; extern __typeof (iswprint_l) __iswprint_l; extern __typeof (iswpunct_l) __iswpunct_l; extern __typeof (iswspace_l) __iswspace_l; extern __typeof (iswupper_l) __iswupper_l; extern __typeof (iswxdigit_l) __iswxdigit_l; extern __typeof (towlower_l) __towlower_l; extern __typeof (towupper_l) __towupper_l; # 41 "regex_internal.h" 2 # 49 "regex_internal.h" # 1 "../nptl/sysdeps/pthread/bits/libc-lock.h" 1 # 23 "../nptl/sysdeps/pthread/bits/libc-lock.h" # 1 "../include/pthread.h" 1 extern void __pthread_initialize (void) __attribute__ ((weak)); # 24 "../nptl/sysdeps/pthread/bits/libc-lock.h" 2 # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 26 "../nptl/sysdeps/pthread/bits/libc-lock.h" 2 # 37 "../nptl/sysdeps/pthread/bits/libc-lock.h" # 1 "../nptl/sysdeps/pthread/pthread-functions.h" 1 # 23 "../nptl/sysdeps/pthread/pthread-functions.h" # 1 "../include/pthread.h" 1 extern void __pthread_initialize (void) __attribute__ ((weak)); # 24 "../nptl/sysdeps/pthread/pthread-functions.h" 2 # 1 "../ports/sysdeps/unix/sysv/linux/hppa/nptl/internaltypes.h" 1 # 26 "../ports/sysdeps/unix/sysv/linux/hppa/nptl/internaltypes.h" struct pthread_attr { struct sched_param schedparam; int schedpolicy; int flags; size_t guardsize; void *stackaddr; size_t stacksize; cpu_set_t *cpuset; size_t cpusetsize; }; # 53 "../ports/sysdeps/unix/sysv/linux/hppa/nptl/internaltypes.h" struct pthread_mutexattr { int mutexkind; }; struct pthread_condattr { int value; }; # 85 "../ports/sysdeps/unix/sysv/linux/hppa/nptl/internaltypes.h" struct pthread_rwlockattr { int lockkind; int pshared; }; struct pthread_barrier { unsigned int curr_event; int lock; unsigned int left; unsigned int init_count; }; struct pthread_barrierattr { int pshared; }; struct pthread_key_struct { uintptr_t seq; void (*destr) (void *); }; # 140 "../ports/sysdeps/unix/sysv/linux/hppa/nptl/internaltypes.h" struct sem { unsigned int count; }; typedef struct { pthread_cond_t *cond; } pthread_cond_2_0_t; # 26 "../nptl/sysdeps/pthread/pthread-functions.h" 2 # 1 "../ports/sysdeps/unix/sysv/linux/hppa/sysdep.h" 1 # 23 "../ports/sysdeps/unix/sysv/linux/hppa/sysdep.h" # 1 "../sysdeps/generic/sysdep.h" 1 # 24 "../ports/sysdeps/unix/sysv/linux/hppa/sysdep.h" 2 # 27 "../nptl/sysdeps/pthread/pthread-functions.h" 2 struct xid_command; struct pthread_functions { int (*ptr_pthread_attr_destroy) (pthread_attr_t *); int (*ptr___pthread_attr_init_2_0) (pthread_attr_t *); int (*ptr___pthread_attr_init_2_1) (pthread_attr_t *); int (*ptr_pthread_attr_getdetachstate) (const pthread_attr_t *, int *); int (*ptr_pthread_attr_setdetachstate) (pthread_attr_t *, int); int (*ptr_pthread_attr_getinheritsched) (const pthread_attr_t *, int *); int (*ptr_pthread_attr_setinheritsched) (pthread_attr_t *, int); int (*ptr_pthread_attr_getschedparam) (const pthread_attr_t *, struct sched_param *); int (*ptr_pthread_attr_setschedparam) (pthread_attr_t *, const struct sched_param *); int (*ptr_pthread_attr_getschedpolicy) (const pthread_attr_t *, int *); int (*ptr_pthread_attr_setschedpolicy) (pthread_attr_t *, int); int (*ptr_pthread_attr_getscope) (const pthread_attr_t *, int *); int (*ptr_pthread_attr_setscope) (pthread_attr_t *, int); int (*ptr_pthread_condattr_destroy) (pthread_condattr_t *); int (*ptr_pthread_condattr_init) (pthread_condattr_t *); int (*ptr___pthread_cond_broadcast) (pthread_cond_t *); int (*ptr___pthread_cond_destroy) (pthread_cond_t *); int (*ptr___pthread_cond_init) (pthread_cond_t *, const pthread_condattr_t *); int (*ptr___pthread_cond_signal) (pthread_cond_t *); int (*ptr___pthread_cond_wait) (pthread_cond_t *, pthread_mutex_t *); int (*ptr___pthread_cond_timedwait) (pthread_cond_t *, pthread_mutex_t *, const struct timespec *); int (*ptr___pthread_cond_broadcast_2_0) (pthread_cond_2_0_t *); int (*ptr___pthread_cond_destroy_2_0) (pthread_cond_2_0_t *); int (*ptr___pthread_cond_init_2_0) (pthread_cond_2_0_t *, const pthread_condattr_t *); int (*ptr___pthread_cond_signal_2_0) (pthread_cond_2_0_t *); int (*ptr___pthread_cond_wait_2_0) (pthread_cond_2_0_t *, pthread_mutex_t *); int (*ptr___pthread_cond_timedwait_2_0) (pthread_cond_2_0_t *, pthread_mutex_t *, const struct timespec *); int (*ptr_pthread_equal) (pthread_t, pthread_t); void (*ptr___pthread_exit) (void *); int (*ptr_pthread_getschedparam) (pthread_t, int *, struct sched_param *); int (*ptr_pthread_setschedparam) (pthread_t, int, const struct sched_param *); int (*ptr_pthread_mutex_destroy) (pthread_mutex_t *); int (*ptr_pthread_mutex_init) (pthread_mutex_t *, const pthread_mutexattr_t *); int (*ptr_pthread_mutex_lock) (pthread_mutex_t *); int (*ptr_pthread_mutex_unlock) (pthread_mutex_t *); pthread_t (*ptr_pthread_self) (void); int (*ptr_pthread_setcancelstate) (int, int *); int (*ptr_pthread_setcanceltype) (int, int *); void (*ptr___pthread_cleanup_upto) (__jmp_buf, char *); int (*ptr___pthread_once) (pthread_once_t *, void (*) (void)); int (*ptr___pthread_rwlock_rdlock) (pthread_rwlock_t *); int (*ptr___pthread_rwlock_wrlock) (pthread_rwlock_t *); int (*ptr___pthread_rwlock_unlock) (pthread_rwlock_t *); int (*ptr___pthread_key_create) (pthread_key_t *, void (*) (void *)); void *(*ptr___pthread_getspecific) (pthread_key_t); int (*ptr___pthread_setspecific) (pthread_key_t, const void *); void (*ptr__pthread_cleanup_push_defer) (struct _pthread_cleanup_buffer *, void (*) (void *), void *); void (*ptr__pthread_cleanup_pop_restore) (struct _pthread_cleanup_buffer *, int); unsigned int *ptr_nthreads; void (*ptr___pthread_unwind) (__pthread_unwind_buf_t *) __attribute ((noreturn)) ; void (*ptr__nptl_deallocate_tsd) (void); int (*ptr__nptl_setxid) (struct xid_command *); void (*ptr_freeres) (void); }; extern struct pthread_functions __libc_pthread_functions ; extern int __libc_pthread_functions_init ; # 38 "../nptl/sysdeps/pthread/bits/libc-lock.h" 2 # 46 "../nptl/sysdeps/pthread/bits/libc-lock.h" typedef int __libc_lock_t; typedef struct { int lock; int cnt; void *owner; } __libc_lock_recursive_t; typedef struct { pthread_mutex_t mutex; } __rtld_lock_recursive_t; typedef pthread_rwlock_t __libc_rwlock_t; # 62 "../nptl/sysdeps/pthread/bits/libc-lock.h" typedef pthread_key_t __libc_key_t; # 374 "../nptl/sysdeps/pthread/bits/libc-lock.h" extern void _pthread_cleanup_push (struct _pthread_cleanup_buffer *buffer, void (*routine) (void *), void *arg); extern void _pthread_cleanup_pop (struct _pthread_cleanup_buffer *buffer, int execute); extern void _pthread_cleanup_push_defer (struct _pthread_cleanup_buffer *buffer, void (*routine) (void *), void *arg); extern void _pthread_cleanup_pop_restore (struct _pthread_cleanup_buffer *buffer, int execute); # 417 "../nptl/sysdeps/pthread/bits/libc-lock.h" extern __inline void __libc_cleanup_routine (struct __pthread_cleanup_frame *f) { if (f->__do_it) f->__cancel_routine (f->__cancel_arg); } # 454 "../nptl/sysdeps/pthread/bits/libc-lock.h" extern int __register_atfork (void (*__prepare) (void), void (*__parent) (void), void (*__child) (void), void *__dso_handle); extern int __pthread_mutex_init (pthread_mutex_t *__mutex, __const pthread_mutexattr_t *__mutex_attr); extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex); extern int __pthread_mutex_trylock (pthread_mutex_t *__mutex); extern int __pthread_mutex_lock (pthread_mutex_t *__mutex); extern int __pthread_mutex_unlock (pthread_mutex_t *__mutex); extern int __pthread_mutexattr_init (pthread_mutexattr_t *__attr); extern int __pthread_mutexattr_destroy (pthread_mutexattr_t *__attr); extern int __pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind); extern int __pthread_rwlock_init (pthread_rwlock_t *__rwlock, __const pthread_rwlockattr_t *__attr); extern int __pthread_rwlock_destroy (pthread_rwlock_t *__rwlock); extern int __pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock); extern int __pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock); extern int __pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock); extern int __pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock); extern int __pthread_rwlock_unlock (pthread_rwlock_t *__rwlock); extern int __pthread_key_create (pthread_key_t *__key, void (*__destr_function) (void *)); extern int __pthread_setspecific (pthread_key_t __key, __const void *__pointer); extern void *__pthread_getspecific (pthread_key_t __key); extern int __pthread_once (pthread_once_t *__once_control, void (*__init_routine) (void)); extern int __pthread_atfork (void (*__prepare) (void), void (*__parent) (void), void (*__child) (void)); # 519 "../nptl/sysdeps/pthread/bits/libc-lock.h" # 1 "../sysdeps/generic/bp-sym.h" 1 # 520 "../nptl/sysdeps/pthread/bits/libc-lock.h" 2 # 523 "../nptl/sysdeps/pthread/bits/libc-lock.h" #pragma weak __pthread_mutex_init # 523 "../nptl/sysdeps/pthread/bits/libc-lock.h" # 524 "../nptl/sysdeps/pthread/bits/libc-lock.h" #pragma weak __pthread_mutex_destroy # 524 "../nptl/sysdeps/pthread/bits/libc-lock.h" # 525 "../nptl/sysdeps/pthread/bits/libc-lock.h" #pragma weak __pthread_mutex_lock # 525 "../nptl/sysdeps/pthread/bits/libc-lock.h" # 526 "../nptl/sysdeps/pthread/bits/libc-lock.h" #pragma weak __pthread_mutex_trylock # 526 "../nptl/sysdeps/pthread/bits/libc-lock.h" # 527 "../nptl/sysdeps/pthread/bits/libc-lock.h" #pragma weak __pthread_mutex_unlock # 527 "../nptl/sysdeps/pthread/bits/libc-lock.h" # 528 "../nptl/sysdeps/pthread/bits/libc-lock.h" #pragma weak __pthread_mutexattr_init # 528 "../nptl/sysdeps/pthread/bits/libc-lock.h" # 529 "../nptl/sysdeps/pthread/bits/libc-lock.h" #pragma weak __pthread_mutexattr_destroy # 529 "../nptl/sysdeps/pthread/bits/libc-lock.h" # 530 "../nptl/sysdeps/pthread/bits/libc-lock.h" #pragma weak __pthread_mutexattr_settype # 530 "../nptl/sysdeps/pthread/bits/libc-lock.h" # 531 "../nptl/sysdeps/pthread/bits/libc-lock.h" #pragma weak __pthread_rwlock_init # 531 "../nptl/sysdeps/pthread/bits/libc-lock.h" # 532 "../nptl/sysdeps/pthread/bits/libc-lock.h" #pragma weak __pthread_rwlock_destroy # 532 "../nptl/sysdeps/pthread/bits/libc-lock.h" # 533 "../nptl/sysdeps/pthread/bits/libc-lock.h" #pragma weak __pthread_rwlock_rdlock # 533 "../nptl/sysdeps/pthread/bits/libc-lock.h" # 534 "../nptl/sysdeps/pthread/bits/libc-lock.h" #pragma weak __pthread_rwlock_tryrdlock # 534 "../nptl/sysdeps/pthread/bits/libc-lock.h" # 535 "../nptl/sysdeps/pthread/bits/libc-lock.h" #pragma weak __pthread_rwlock_wrlock # 535 "../nptl/sysdeps/pthread/bits/libc-lock.h" # 536 "../nptl/sysdeps/pthread/bits/libc-lock.h" #pragma weak __pthread_rwlock_trywrlock # 536 "../nptl/sysdeps/pthread/bits/libc-lock.h" # 537 "../nptl/sysdeps/pthread/bits/libc-lock.h" #pragma weak __pthread_rwlock_unlock # 537 "../nptl/sysdeps/pthread/bits/libc-lock.h" # 538 "../nptl/sysdeps/pthread/bits/libc-lock.h" #pragma weak __pthread_key_create # 538 "../nptl/sysdeps/pthread/bits/libc-lock.h" # 539 "../nptl/sysdeps/pthread/bits/libc-lock.h" #pragma weak __pthread_setspecific # 539 "../nptl/sysdeps/pthread/bits/libc-lock.h" # 540 "../nptl/sysdeps/pthread/bits/libc-lock.h" #pragma weak __pthread_getspecific # 540 "../nptl/sysdeps/pthread/bits/libc-lock.h" # 541 "../nptl/sysdeps/pthread/bits/libc-lock.h" #pragma weak __pthread_once # 541 "../nptl/sysdeps/pthread/bits/libc-lock.h" # 542 "../nptl/sysdeps/pthread/bits/libc-lock.h" #pragma weak __pthread_initialize # 542 "../nptl/sysdeps/pthread/bits/libc-lock.h" # 543 "../nptl/sysdeps/pthread/bits/libc-lock.h" #pragma weak __pthread_atfork # 543 "../nptl/sysdeps/pthread/bits/libc-lock.h" # 544 "../nptl/sysdeps/pthread/bits/libc-lock.h" #pragma weak _pthread_cleanup_push_defer # 544 "../nptl/sysdeps/pthread/bits/libc-lock.h" # 545 "../nptl/sysdeps/pthread/bits/libc-lock.h" #pragma weak _pthread_cleanup_pop_restore # 545 "../nptl/sysdeps/pthread/bits/libc-lock.h" # 546 "../nptl/sysdeps/pthread/bits/libc-lock.h" #pragma weak pthread_setcancelstate # 546 "../nptl/sysdeps/pthread/bits/libc-lock.h" # 50 "regex_internal.h" 2 # 65 "regex_internal.h" # 1 "../locale/localeinfo.h" 1 # 66 "regex_internal.h" 2 # 1 "../locale/elem-hash.h" 1 # 22 "../locale/elem-hash.h" static inline int32_t elem_hash (const char *str, int_fast32_t n) { int32_t result = n; while (n-- > 0) { result <<= 3; result += *str++; } return result; } # 67 "regex_internal.h" 2 # 1 "../locale/coll-lookup.h" 1 # 23 "../locale/coll-lookup.h" extern int32_t __collidx_table_lookup (const char *table, uint32_t wc) ; extern uint32_t __collseq_table_lookup (const char *table, uint32_t wc) ; # 68 "regex_internal.h" 2 # 1 "../include/libintl.h" 1 # 1 "../intl/libintl.h" 1 # 35 "../intl/libintl.h" extern char *gettext (__const char *__msgid) __attribute__ ((__nothrow__)) __attribute__ ((__format_arg__ (1))); extern char *dgettext (__const char *__domainname, __const char *__msgid) __attribute__ ((__nothrow__)) __attribute__ ((__format_arg__ (2))); extern char *__dgettext (__const char *__domainname, __const char *__msgid) __attribute__ ((__nothrow__)) __attribute__ ((__format_arg__ (2))); extern char *dcgettext (__const char *__domainname, __const char *__msgid, int __category) __attribute__ ((__nothrow__)) __attribute__ ((__format_arg__ (2))); extern char *__dcgettext (__const char *__domainname, __const char *__msgid, int __category) __attribute__ ((__nothrow__)) __attribute__ ((__format_arg__ (2))); extern char *ngettext (__const char *__msgid1, __const char *__msgid2, unsigned long int __n) __attribute__ ((__nothrow__)) __attribute__ ((__format_arg__ (1))) __attribute__ ((__format_arg__ (2))); extern char *dngettext (__const char *__domainname, __const char *__msgid1, __const char *__msgid2, unsigned long int __n) __attribute__ ((__nothrow__)) __attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3))); extern char *dcngettext (__const char *__domainname, __const char *__msgid1, __const char *__msgid2, unsigned long int __n, int __category) __attribute__ ((__nothrow__)) __attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3))); extern char *textdomain (__const char *__domainname) __attribute__ ((__nothrow__)); extern char *bindtextdomain (__const char *__domainname, __const char *__dirname) __attribute__ ((__nothrow__)); extern char *bind_textdomain_codeset (__const char *__domainname, __const char *__codeset) __attribute__ ((__nothrow__)); # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 102 "../intl/libintl.h" 2 # 122 "../intl/libintl.h" # 3 "../include/libintl.h" 2 extern char *__gettext (__const char *__msgid) __attribute__ ((__format_arg__ (1))); extern char *__dgettext (__const char *__domainname, __const char *__msgid) __attribute__ ((__format_arg__ (2))); extern char *__dcgettext (__const char *__domainname, __const char *__msgid, int __category) __attribute__ ((__format_arg__ (2))); extern char *__dcgettext_internal (__const char *__domainname, __const char *__msgid, int __category) __attribute__ ((__format_arg__ (2))) ; extern char *__ngettext (__const char *__msgid1, __const char *__msgid2, unsigned long int __n) __attribute__ ((__format_arg__ (1))) __attribute__ ((__format_arg__ (2))); extern char *__dngettext (__const char *__domainname, __const char *__msgid1, __const char *__msgid2, unsigned long int __n) __attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3))); extern char *__dcngettext (__const char *__domainname, __const char *__msgid1, __const char *__msgid2, unsigned long int __n, int __category) __attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3))); extern char *__dcngettext_internal (__const char *__domainname, __const char *__msgid1, __const char *__msgid2, unsigned long int __n, int __category) __attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3))) ; extern char *__textdomain (__const char *__domainname); extern char *__bindtextdomain (__const char *__domainname, __const char *__dirname); extern char *__bind_textdomain_codeset (__const char *__domainname, __const char *__codeset); extern const char _libc_intl_domainname[]; # 74 "regex_internal.h" 2 # 131 "regex_internal.h" extern const char __re_error_msgid[] ; extern const size_t __re_error_msgid_idx[] ; typedef unsigned long int bitset_word_t; typedef bitset_word_t bitset_t[(256 / (sizeof (bitset_word_t) * 8))]; typedef bitset_word_t *re_bitset_ptr_t; typedef const bitset_word_t *re_const_bitset_ptr_t; # 168 "regex_internal.h" typedef enum { INSIDE_WORD = 0x0001 | 0x0004, WORD_FIRST = 0x0002 | 0x0004, WORD_LAST = 0x0001 | 0x0008, INSIDE_NOTWORD = 0x0002 | 0x0008, LINE_FIRST = 0x0010, LINE_LAST = 0x0020, BUF_FIRST = 0x0040, BUF_LAST = 0x0080, WORD_DELIM = 0x0100, NOT_WORD_DELIM = 0x0200 } re_context_type; typedef struct { int alloc; int nelem; int *elems; } re_node_set; typedef enum { NON_TYPE = 0, CHARACTER = 1, END_OF_RE = 2, SIMPLE_BRACKET = 3, OP_BACK_REF = 4, OP_PERIOD = 5, COMPLEX_BRACKET = 6, OP_UTF8_PERIOD = 7, OP_OPEN_SUBEXP = 8 | 0, OP_CLOSE_SUBEXP = 8 | 1, OP_ALT = 8 | 2, OP_DUP_ASTERISK = 8 | 3, ANCHOR = 8 | 4, CONCAT = 16, SUBEXP = 17, OP_DUP_PLUS = 18, OP_DUP_QUESTION, OP_OPEN_BRACKET, OP_CLOSE_BRACKET, OP_CHARSET_RANGE, OP_OPEN_DUP_NUM, OP_CLOSE_DUP_NUM, OP_NON_MATCH_LIST, OP_OPEN_COLL_ELEM, OP_CLOSE_COLL_ELEM, OP_OPEN_EQUIV_CLASS, OP_CLOSE_EQUIV_CLASS, OP_OPEN_CHAR_CLASS, OP_CLOSE_CHAR_CLASS, OP_WORD, OP_NOTWORD, OP_SPACE, OP_NOTSPACE, BACK_SLASH } re_token_type_t; typedef struct { wchar_t *mbchars; int32_t *coll_syms; int32_t *equiv_classes; uint32_t *range_starts; uint32_t *range_ends; wctype_t *char_classes; unsigned int non_match : 1; int nmbchars; int ncoll_syms; int nequiv_classes; int nranges; int nchar_classes; } re_charset_t; typedef struct { union { unsigned char c; re_bitset_ptr_t sbcset; re_charset_t *mbcset; int idx; re_context_type ctx_type; } opr; re_token_type_t type : 8; unsigned int constraint : 10; unsigned int duplicated : 1; unsigned int opt_subexp : 1; unsigned int accept_mb : 1; unsigned int mb_partial : 1; unsigned int word_char : 1; } re_token_t; struct re_string_t { const unsigned char *raw_mbs; unsigned char *mbs; wint_t *wcs; int *offsets; mbstate_t cur_state; int raw_mbs_idx; int valid_len; int valid_raw_len; int bufs_len; int cur_idx; int raw_len; int len; int raw_stop; int stop; unsigned int tip_context; unsigned char * trans; re_const_bitset_ptr_t word_char; unsigned char icase; unsigned char is_utf8; unsigned char map_notascii; unsigned char mbs_allocated; unsigned char offsets_needed; unsigned char newline_anchor; unsigned char word_ops_used; int mb_cur_max; }; typedef struct re_string_t re_string_t; struct re_dfa_t; typedef struct re_dfa_t re_dfa_t; # 388 "regex_internal.h" static reg_errcode_t re_string_realloc_buffers (re_string_t *pstr, int new_buf_len) ; static void build_wcs_buffer (re_string_t *pstr) ; static int build_wcs_upper_buffer (re_string_t *pstr) ; static void build_upper_buffer (re_string_t *pstr) ; static void re_string_translate_buffer (re_string_t *pstr) ; static unsigned int re_string_context_at (const re_string_t *input, int idx, int eflags) __attribute__ ((pure)); # 436 "regex_internal.h" struct bin_tree_t { struct bin_tree_t *parent; struct bin_tree_t *left; struct bin_tree_t *right; struct bin_tree_t *first; struct bin_tree_t *next; re_token_t token; int node_idx; }; typedef struct bin_tree_t bin_tree_t; struct bin_tree_storage_t { struct bin_tree_storage_t *next; bin_tree_t data[((1024 - sizeof (void *)) / sizeof (bin_tree_t))]; }; typedef struct bin_tree_storage_t bin_tree_storage_t; # 490 "regex_internal.h" struct re_dfastate_t { unsigned int hash; re_node_set nodes; re_node_set non_eps_nodes; re_node_set inveclosure; re_node_set *entrance_nodes; struct re_dfastate_t **trtable, **word_trtable; unsigned int context : 4; unsigned int halt : 1; unsigned int accept_mb : 1; unsigned int has_backref : 1; unsigned int has_constraint : 1; }; typedef struct re_dfastate_t re_dfastate_t; struct re_state_table_entry { int num; int alloc; re_dfastate_t **array; }; typedef struct { int next_idx; int alloc; re_dfastate_t **array; } state_array_t; typedef struct { int node; int str_idx; state_array_t path; } re_sub_match_last_t; typedef struct { int str_idx; int node; state_array_t *path; int alasts; int nlasts; re_sub_match_last_t **lasts; } re_sub_match_top_t; struct re_backref_cache_entry { int node; int str_idx; int subexp_from; int subexp_to; char more; char unused; unsigned short int eps_reachable_subexps_map; }; typedef struct { re_string_t input; const re_dfa_t *const dfa; int eflags; int match_last; int last_node; re_dfastate_t **state_log; int state_log_top; int nbkref_ents; int abkref_ents; struct re_backref_cache_entry *bkref_ents; int max_mb_elem_len; int nsub_tops; int asub_tops; re_sub_match_top_t **sub_tops; } re_match_context_t; typedef struct { re_dfastate_t **sifted_states; re_dfastate_t **limited_states; int last_node; int last_str_idx; re_node_set limits; } re_sift_context_t; struct re_fail_stack_ent_t { int idx; int node; regmatch_t *regs; re_node_set eps_via_nodes; }; struct re_fail_stack_t { int num; int alloc; struct re_fail_stack_ent_t *stack; }; struct re_dfa_t { re_token_t *nodes; size_t nodes_alloc; size_t nodes_len; int *nexts; int *org_indices; re_node_set *edests; re_node_set *eclosures; re_node_set *inveclosures; struct re_state_table_entry *state_table; re_dfastate_t *init_state; re_dfastate_t *init_state_word; re_dfastate_t *init_state_nl; re_dfastate_t *init_state_begbuf; bin_tree_t *str_tree; bin_tree_storage_t *str_tree_storage; re_bitset_ptr_t sb_char; int str_tree_storage_idx; unsigned int state_hash_mask; int init_node; int nbackref; bitset_word_t used_bkref_map; bitset_word_t completed_bkref_map; unsigned int has_plural_match : 1; unsigned int has_mb_node : 1; unsigned int is_utf8 : 1; unsigned int map_notascii : 1; unsigned int word_ops_used : 1; int mb_cur_max; bitset_t word_char; reg_syntax_t syntax; int *subexp_map; __libc_lock_t lock; }; # 665 "regex_internal.h" typedef enum { SB_CHAR, MB_CHAR, EQUIV_CLASS, COLL_SYM, CHAR_CLASS } bracket_elem_type; typedef struct { bracket_elem_type type; union { unsigned char ch; unsigned char *name; wchar_t wch; } opr; } bracket_elem_t; static inline void bitset_not (bitset_t set) { int bitset_i; for (bitset_i = 0; bitset_i < (256 / (sizeof (bitset_word_t) * 8)); ++bitset_i) set[bitset_i] = ~set[bitset_i]; } static inline void bitset_merge (bitset_t dest, const bitset_t src) { int bitset_i; for (bitset_i = 0; bitset_i < (256 / (sizeof (bitset_word_t) * 8)); ++bitset_i) dest[bitset_i] |= src[bitset_i]; } static inline void bitset_mask (bitset_t dest, const bitset_t src) { int bitset_i; for (bitset_i = 0; bitset_i < (256 / (sizeof (bitset_word_t) * 8)); ++bitset_i) dest[bitset_i] &= src[bitset_i]; } static inline int __attribute__ ((pure)) re_string_char_size_at (const re_string_t *pstr, int idx) { int byte_idx; if (pstr->mb_cur_max == 1) return 1; for (byte_idx = 1; idx + byte_idx < pstr->valid_len; ++byte_idx) if (pstr->wcs[idx + byte_idx] != (0xffffffffu)) break; return byte_idx; } static inline wint_t __attribute__ ((pure)) re_string_wchar_at (const re_string_t *pstr, int idx) { if (pstr->mb_cur_max == 1) return (wint_t) pstr->mbs[idx]; return (wint_t) pstr->wcs[idx]; } static int __attribute__ ((pure)) re_string_elem_size_at (const re_string_t *pstr, int idx) { const unsigned char *p, *extra; const int32_t *table, *indirect; int32_t tmp; # 1 "../locale/weight.h" 1 # 21 "../locale/weight.h" auto inline int32_t __attribute__ ((always_inline)) findidx (const unsigned char **cpp) { int_fast32_t i = table[*(*cpp)++]; const unsigned char *cp; const unsigned char *usrc; if (i >= 0) return i; cp = &extra[-i]; usrc = *cpp; while (1) { size_t nhere; i = *((const int32_t *) cp); cp += sizeof (int32_t); nhere = *cp++; if (i >= 0) { size_t cnt; for (cnt = 0; cnt < nhere; ++cnt) if (cp[cnt] != usrc[cnt]) break; if (cnt == nhere) { *cpp += nhere; return i; } cp += nhere; if ((1 + nhere) % __alignof__ (int32_t) != 0) cp += __alignof__ (int32_t) - (1 + nhere) % __alignof__ (int32_t); } else { size_t cnt; size_t offset = 0; for (cnt = 0; cnt < nhere; ++cnt) if (cp[cnt] != usrc[cnt]) break; if (cnt != nhere) { if (cp[cnt] > usrc[cnt]) { cp += 2 * nhere; if ((1 + 2 * nhere) % __alignof__ (int32_t) != 0) cp += (__alignof__ (int32_t) - (1 + 2 * nhere) % __alignof__ (int32_t)); continue; } for (cnt = 0; cnt < nhere; ++cnt) if (cp[nhere + cnt] != usrc[cnt]) break; if (cnt != nhere && cp[nhere + cnt] < usrc[cnt]) { cp += 2 * nhere; if ((1 + 2 * nhere) % __alignof__ (int32_t) != 0) cp += (__alignof__ (int32_t) - (1 + 2 * nhere) % __alignof__ (int32_t)); continue; } for (cnt = 0; cp[cnt] == usrc[cnt]; ++cnt); do { offset <<= 8; offset += usrc[cnt] - cp[cnt]; } while (++cnt < nhere); } *cpp += nhere; return indirect[-i + offset]; } } return 0x43219876; } # 744 "regex_internal.h" 2 uint_fast32_t nrules = ((uint32_t) (*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_NRULES) & 0xffff)].word); if (nrules != 0) { table = (const int32_t *) ((*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_TABLEMB) & 0xffff)].string); extra = (const unsigned char *) ((*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_EXTRAMB) & 0xffff)].string); indirect = (const int32_t *) ((*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_INDIRECTMB) & 0xffff)].string); p = pstr->mbs + idx; tmp = findidx (&p); return p - pstr->mbs - idx; } else return 1; } # 62 "regex.c" 2 # 1 "regex_internal.c" 1 # 21 "regex_internal.c" static void re_string_construct_common (const char *str, int len, re_string_t *pstr, unsigned char * trans, int icase, const re_dfa_t *dfa) ; static re_dfastate_t *create_ci_newstate (const re_dfa_t *dfa, const re_node_set *nodes, unsigned int hash) ; static re_dfastate_t *create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes, unsigned int context, unsigned int hash) ; static reg_errcode_t re_string_allocate (re_string_t *pstr, const char *str, int len, int init_len, unsigned char * trans, int icase, const re_dfa_t *dfa) { reg_errcode_t ret; int init_buf_len; if (init_len < dfa->mb_cur_max) init_len = dfa->mb_cur_max; init_buf_len = (len + 1 < init_len) ? len + 1: init_len; re_string_construct_common (str, len, pstr, trans, icase, dfa); ret = re_string_realloc_buffers (pstr, init_buf_len); if (__builtin_expect (ret != REG_NOERROR, 0)) return ret; pstr->word_char = dfa->word_char; pstr->word_ops_used = dfa->word_ops_used; pstr->mbs = pstr->mbs_allocated ? pstr->mbs : (unsigned char *) str; pstr->valid_len = (pstr->mbs_allocated || dfa->mb_cur_max > 1) ? 0 : len; pstr->valid_raw_len = pstr->valid_len; return REG_NOERROR; } static reg_errcode_t re_string_construct (re_string_t *pstr, const char *str, int len, unsigned char * trans, int icase, const re_dfa_t *dfa) { reg_errcode_t ret; memset (pstr, '\0', sizeof (re_string_t)); re_string_construct_common (str, len, pstr, trans, icase, dfa); if (len > 0) { ret = re_string_realloc_buffers (pstr, len + 1); if (__builtin_expect (ret != REG_NOERROR, 0)) return ret; } pstr->mbs = pstr->mbs_allocated ? pstr->mbs : (unsigned char *) str; if (icase) { if (dfa->mb_cur_max > 1) { while (1) { ret = build_wcs_upper_buffer (pstr); if (__builtin_expect (ret != REG_NOERROR, 0)) return ret; if (pstr->valid_raw_len >= len) break; if (pstr->bufs_len > pstr->valid_len + dfa->mb_cur_max) break; ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2); if (__builtin_expect (ret != REG_NOERROR, 0)) return ret; } } else build_upper_buffer (pstr); } else { if (dfa->mb_cur_max > 1) build_wcs_buffer (pstr); else { if (trans != ((void *)0)) re_string_translate_buffer (pstr); else { pstr->valid_len = pstr->bufs_len; pstr->valid_raw_len = pstr->bufs_len; } } } return REG_NOERROR; } static reg_errcode_t re_string_realloc_buffers (re_string_t *pstr, int new_buf_len) { if (pstr->mb_cur_max > 1) { wint_t *new_wcs = ((wint_t *) realloc (pstr->wcs, (new_buf_len) * sizeof (wint_t))); if (__builtin_expect (new_wcs == ((void *)0), 0)) return REG_ESPACE; pstr->wcs = new_wcs; if (pstr->offsets != ((void *)0)) { int *new_offsets = ((int *) realloc (pstr->offsets, (new_buf_len) * sizeof (int))); if (__builtin_expect (new_offsets == ((void *)0), 0)) return REG_ESPACE; pstr->offsets = new_offsets; } } if (pstr->mbs_allocated) { unsigned char *new_mbs = ((unsigned char *) realloc (pstr->mbs, (new_buf_len) * sizeof (unsigned char))); if (__builtin_expect (new_mbs == ((void *)0), 0)) return REG_ESPACE; pstr->mbs = new_mbs; } pstr->bufs_len = new_buf_len; return REG_NOERROR; } static void re_string_construct_common (const char *str, int len, re_string_t *pstr, unsigned char * trans, int icase, const re_dfa_t *dfa) { pstr->raw_mbs = (const unsigned char *) str; pstr->len = len; pstr->raw_len = len; pstr->trans = trans; pstr->icase = icase ? 1 : 0; pstr->mbs_allocated = (trans != ((void *)0) || icase); pstr->mb_cur_max = dfa->mb_cur_max; pstr->is_utf8 = dfa->is_utf8; pstr->map_notascii = dfa->map_notascii; pstr->stop = pstr->len; pstr->raw_stop = pstr->stop; } # 194 "regex_internal.c" static void build_wcs_buffer (re_string_t *pstr) { unsigned char buf[16]; ((16 >= pstr->mb_cur_max) ? (void) (0) : (__assert_fail ("16 >= pstr->mb_cur_max", "regex_internal.c", 200, __PRETTY_FUNCTION__), (void) (0))); mbstate_t prev_st; int byte_idx, end_idx, remain_len; size_t mbclen; end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; for (byte_idx = pstr->valid_len; byte_idx < end_idx;) { wchar_t wc; const char *p; remain_len = end_idx - byte_idx; prev_st = pstr->cur_state; if (__builtin_expect (pstr->trans != ((void *)0), 0)) { int i, ch; for (i = 0; i < pstr->mb_cur_max && i < remain_len; ++i) { ch = pstr->raw_mbs [pstr->raw_mbs_idx + byte_idx + i]; buf[i] = pstr->mbs[byte_idx + i] = pstr->trans[ch]; } p = (const char *) buf; } else p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx; mbclen = mbrtowc (&wc, p, remain_len, &pstr->cur_state); if (__builtin_expect (mbclen == (size_t) -2, 0)) { pstr->cur_state = prev_st; break; } else if (__builtin_expect (mbclen == (size_t) -1 || mbclen == 0, 0)) { mbclen = 1; wc = (wchar_t) pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]; if (__builtin_expect (pstr->trans != ((void *)0), 0)) wc = pstr->trans[wc]; pstr->cur_state = prev_st; } pstr->wcs[byte_idx++] = wc; for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;) pstr->wcs[byte_idx++] = (0xffffffffu); } pstr->valid_len = byte_idx; pstr->valid_raw_len = byte_idx; } static reg_errcode_t build_wcs_upper_buffer (re_string_t *pstr) { mbstate_t prev_st; int src_idx, byte_idx, end_idx, remain_len; size_t mbclen; char buf[16]; ((16 >= pstr->mb_cur_max) ? (void) (0) : (__assert_fail ("16 >= pstr->mb_cur_max", "regex_internal.c", 271, __PRETTY_FUNCTION__), (void) (0))); byte_idx = pstr->valid_len; end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; if (! pstr->map_notascii && pstr->trans == ((void *)0) && !pstr->offsets_needed) { while (byte_idx < end_idx) { wchar_t wc; if ((((pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]) & ~0x7f) == 0) && ((&pstr->cur_state)->__count == 0)) { pstr->mbs[byte_idx] = (__extension__ ({ int __res; if (sizeof (pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]) > 1) { if (__builtin_constant_p (pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx])) { int __c = (pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper (pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]); } else __res = (*__ctype_toupper_loc ())[(int) (pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx])]; __res; })); pstr->wcs[byte_idx] = (wchar_t) pstr->mbs[byte_idx]; ++byte_idx; continue; } remain_len = end_idx - byte_idx; prev_st = pstr->cur_state; mbclen = mbrtowc (&wc, ((const char *) pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx), remain_len, &pstr->cur_state); if (__builtin_expect (mbclen + 2 > 2, 1)) { wchar_t wcu = wc; if (iswlower (wc)) { size_t mbcdlen; wcu = towupper (wc); mbcdlen = wcrtomb (buf, wcu, &prev_st); if (__builtin_expect (mbclen == mbcdlen, 1)) memcpy (pstr->mbs + byte_idx, buf, mbclen); else { src_idx = byte_idx; goto offsets_needed; } } else memcpy (pstr->mbs + byte_idx, pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx, mbclen); pstr->wcs[byte_idx++] = wcu; for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;) pstr->wcs[byte_idx++] = (0xffffffffu); } else if (mbclen == (size_t) -1 || mbclen == 0) { int ch = pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]; pstr->mbs[byte_idx] = ch; pstr->wcs[byte_idx++] = (wchar_t) ch; if (__builtin_expect (mbclen == (size_t) -1, 0)) pstr->cur_state = prev_st; } else { pstr->cur_state = prev_st; break; } } pstr->valid_len = byte_idx; pstr->valid_raw_len = byte_idx; return REG_NOERROR; } else for (src_idx = pstr->valid_raw_len; byte_idx < end_idx;) { wchar_t wc; const char *p; offsets_needed: remain_len = end_idx - byte_idx; prev_st = pstr->cur_state; if (__builtin_expect (pstr->trans != ((void *)0), 0)) { int i, ch; for (i = 0; i < pstr->mb_cur_max && i < remain_len; ++i) { ch = pstr->raw_mbs [pstr->raw_mbs_idx + src_idx + i]; buf[i] = pstr->trans[ch]; } p = (const char *) buf; } else p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + src_idx; mbclen = mbrtowc (&wc, p, remain_len, &pstr->cur_state); if (__builtin_expect (mbclen + 2 > 2, 1)) { wchar_t wcu = wc; if (iswlower (wc)) { size_t mbcdlen; wcu = towupper (wc); mbcdlen = wcrtomb ((char *) buf, wcu, &prev_st); if (__builtin_expect (mbclen == mbcdlen, 1)) memcpy (pstr->mbs + byte_idx, buf, mbclen); else if (mbcdlen != (size_t) -1) { size_t i; if (byte_idx + mbcdlen > pstr->bufs_len) { pstr->cur_state = prev_st; break; } if (pstr->offsets == ((void *)0)) { pstr->offsets = ((int *) malloc ((pstr->bufs_len) * sizeof (int))); if (pstr->offsets == ((void *)0)) return REG_ESPACE; } if (!pstr->offsets_needed) { for (i = 0; i < (size_t) byte_idx; ++i) pstr->offsets[i] = i; pstr->offsets_needed = 1; } memcpy (pstr->mbs + byte_idx, buf, mbcdlen); pstr->wcs[byte_idx] = wcu; pstr->offsets[byte_idx] = src_idx; for (i = 1; i < mbcdlen; ++i) { pstr->offsets[byte_idx + i] = src_idx + (i < mbclen ? i : mbclen - 1); pstr->wcs[byte_idx + i] = (0xffffffffu); } pstr->len += mbcdlen - mbclen; if (pstr->raw_stop > src_idx) pstr->stop += mbcdlen - mbclen; end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; byte_idx += mbcdlen; src_idx += mbclen; continue; } else memcpy (pstr->mbs + byte_idx, p, mbclen); } else memcpy (pstr->mbs + byte_idx, p, mbclen); if (__builtin_expect (pstr->offsets_needed != 0, 0)) { size_t i; for (i = 0; i < mbclen; ++i) pstr->offsets[byte_idx + i] = src_idx + i; } src_idx += mbclen; pstr->wcs[byte_idx++] = wcu; for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;) pstr->wcs[byte_idx++] = (0xffffffffu); } else if (mbclen == (size_t) -1 || mbclen == 0) { int ch = pstr->raw_mbs[pstr->raw_mbs_idx + src_idx]; if (__builtin_expect (pstr->trans != ((void *)0), 0)) ch = pstr->trans [ch]; pstr->mbs[byte_idx] = ch; if (__builtin_expect (pstr->offsets_needed != 0, 0)) pstr->offsets[byte_idx] = src_idx; ++src_idx; pstr->wcs[byte_idx++] = (wchar_t) ch; if (__builtin_expect (mbclen == (size_t) -1, 0)) pstr->cur_state = prev_st; } else { pstr->cur_state = prev_st; break; } } pstr->valid_len = byte_idx; pstr->valid_raw_len = src_idx; return REG_NOERROR; } static int re_string_skip_chars (re_string_t *pstr, int new_raw_idx, wint_t *last_wc) { mbstate_t prev_st; int rawbuf_idx; size_t mbclen; wchar_t wc = (0xffffffffu); for (rawbuf_idx = pstr->raw_mbs_idx + pstr->valid_raw_len; rawbuf_idx < new_raw_idx;) { int remain_len; remain_len = pstr->len - rawbuf_idx; prev_st = pstr->cur_state; mbclen = mbrtowc (&wc, (const char *) pstr->raw_mbs + rawbuf_idx, remain_len, &pstr->cur_state); if (__builtin_expect (mbclen == (size_t) -2 || mbclen == (size_t) -1 || mbclen == 0, 0)) { if (mbclen == 0 || remain_len == 0) wc = L'\0'; else wc = *(unsigned char *) (pstr->raw_mbs + rawbuf_idx); mbclen = 1; pstr->cur_state = prev_st; } rawbuf_idx += mbclen; } *last_wc = (wint_t) wc; return rawbuf_idx; } static void build_upper_buffer (re_string_t *pstr) { int char_idx, end_idx; end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; for (char_idx = pstr->valid_len; char_idx < end_idx; ++char_idx) { int ch = pstr->raw_mbs[pstr->raw_mbs_idx + char_idx]; if (__builtin_expect (pstr->trans != ((void *)0), 0)) ch = pstr->trans[ch]; if (((*__ctype_b_loc ())[(int) ((ch))] & (unsigned short int) _ISlower)) pstr->mbs[char_idx] = (__extension__ ({ int __res; if (sizeof (ch) > 1) { if (__builtin_constant_p (ch)) { int __c = (ch); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper (ch); } else __res = (*__ctype_toupper_loc ())[(int) (ch)]; __res; })); else pstr->mbs[char_idx] = ch; } pstr->valid_len = char_idx; pstr->valid_raw_len = char_idx; } static void re_string_translate_buffer (re_string_t *pstr) { int buf_idx, end_idx; end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; for (buf_idx = pstr->valid_len; buf_idx < end_idx; ++buf_idx) { int ch = pstr->raw_mbs[pstr->raw_mbs_idx + buf_idx]; pstr->mbs[buf_idx] = pstr->trans[ch]; } pstr->valid_len = buf_idx; pstr->valid_raw_len = buf_idx; } static reg_errcode_t re_string_reconstruct (re_string_t *pstr, int idx, int eflags) { int offset = idx - pstr->raw_mbs_idx; if (__builtin_expect (offset < 0, 0)) { if (pstr->mb_cur_max > 1) memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); pstr->len = pstr->raw_len; pstr->stop = pstr->raw_stop; pstr->valid_len = 0; pstr->raw_mbs_idx = 0; pstr->valid_raw_len = 0; pstr->offsets_needed = 0; pstr->tip_context = ((eflags & 1) ? ((1 << 1) << 1) : (1 << 1) | ((1 << 1) << 1)); if (!pstr->mbs_allocated) pstr->mbs = (unsigned char *) pstr->raw_mbs; offset = idx; } if (__builtin_expect (offset != 0, 1)) { if (__builtin_expect (offset < pstr->valid_raw_len, 1)) { if (__builtin_expect (pstr->offsets_needed, 0)) { int low = 0, high = pstr->valid_len, mid; do { mid = (high + low) / 2; if (pstr->offsets[mid] > offset) high = mid; else if (pstr->offsets[mid] < offset) low = mid + 1; else break; } while (low < high); if (pstr->offsets[mid] < offset) ++mid; pstr->tip_context = re_string_context_at (pstr, mid - 1, eflags); if (pstr->valid_len > offset && mid == offset && pstr->offsets[mid] == offset) { memmove (pstr->wcs, pstr->wcs + offset, (pstr->valid_len - offset) * sizeof (wint_t)); memmove (pstr->mbs, pstr->mbs + offset, pstr->valid_len - offset); pstr->valid_len -= offset; pstr->valid_raw_len -= offset; for (low = 0; low < pstr->valid_len; low++) pstr->offsets[low] = pstr->offsets[low + offset] - offset; } else { pstr->len = pstr->raw_len - idx + offset; pstr->stop = pstr->raw_stop - idx + offset; pstr->offsets_needed = 0; while (mid > 0 && pstr->offsets[mid - 1] == offset) --mid; while (mid < pstr->valid_len) if (pstr->wcs[mid] != (0xffffffffu)) break; else ++mid; if (mid == pstr->valid_len) pstr->valid_len = 0; else { pstr->valid_len = pstr->offsets[mid] - offset; if (pstr->valid_len) { for (low = 0; low < pstr->valid_len; ++low) pstr->wcs[low] = (0xffffffffu); memset (pstr->mbs, 255, pstr->valid_len); } } pstr->valid_raw_len = pstr->valid_len; } } else { pstr->tip_context = re_string_context_at (pstr, offset - 1, eflags); if (pstr->mb_cur_max > 1) memmove (pstr->wcs, pstr->wcs + offset, (pstr->valid_len - offset) * sizeof (wint_t)); if (__builtin_expect (pstr->mbs_allocated, 0)) memmove (pstr->mbs, pstr->mbs + offset, pstr->valid_len - offset); pstr->valid_len -= offset; pstr->valid_raw_len -= offset; } } else { int prev_valid_len = pstr->valid_len; if (__builtin_expect (pstr->offsets_needed, 0)) { pstr->len = pstr->raw_len - idx + offset; pstr->stop = pstr->raw_stop - idx + offset; pstr->offsets_needed = 0; } pstr->valid_len = 0; if (pstr->mb_cur_max > 1) { int wcs_idx; wint_t wc = (0xffffffffu); if (pstr->is_utf8) { const unsigned char *raw, *p, *q, *end; raw = pstr->raw_mbs + pstr->raw_mbs_idx; end = raw + (offset - pstr->mb_cur_max); if (end < pstr->raw_mbs) end = pstr->raw_mbs; p = raw + offset - 1; if ((((*p) & ~0x7f) == 0) && __builtin_expect (pstr->trans == ((void *)0), 1)) { memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); wc = (wchar_t) *p; } else for (; p >= end; --p) if ((*p & 0xc0) != 0x80) { mbstate_t cur_state; wchar_t wc2; int mlen = raw + pstr->len - p; unsigned char buf[6]; size_t mbclen; q = p; if (__builtin_expect (pstr->trans != ((void *)0), 0)) { int i = mlen < 6 ? mlen : 6; while (--i >= 0) buf[i] = pstr->trans[p[i]]; q = buf; } memset (&cur_state, 0, sizeof (cur_state)); mbclen = mbrtowc (&wc2, (const char *) p, mlen, &cur_state); if (raw + offset - p <= mbclen && mbclen < (size_t) -2) { memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); pstr->valid_len = mbclen - (raw + offset - p); wc = wc2; } break; } } if (wc == (0xffffffffu)) pstr->valid_len = re_string_skip_chars (pstr, idx, &wc) - idx; if (wc == (0xffffffffu)) pstr->tip_context = re_string_context_at (pstr, prev_valid_len - 1, eflags); else pstr->tip_context = ((__builtin_expect (pstr->word_ops_used != 0, 0) && (iswalnum (wc) || (wc) == L'_')) ? 1 : ((((wc) == L'\n') && pstr->newline_anchor) ? (1 << 1) : 0)); if (__builtin_expect (pstr->valid_len, 0)) { for (wcs_idx = 0; wcs_idx < pstr->valid_len; ++wcs_idx) pstr->wcs[wcs_idx] = (0xffffffffu); if (pstr->mbs_allocated) memset (pstr->mbs, 255, pstr->valid_len); } pstr->valid_raw_len = pstr->valid_len; } else { int c = pstr->raw_mbs[pstr->raw_mbs_idx + offset - 1]; pstr->valid_raw_len = 0; if (pstr->trans) c = pstr->trans[c]; pstr->tip_context = ((pstr->word_char[c / (sizeof (bitset_word_t) * 8)] & ((bitset_word_t) 1 << c % (sizeof (bitset_word_t) * 8))) ? 1 : ((((c) == '\n') && pstr->newline_anchor) ? (1 << 1) : 0)); } } if (!__builtin_expect (pstr->mbs_allocated, 0)) pstr->mbs += offset; } pstr->raw_mbs_idx = idx; pstr->len -= offset; pstr->stop -= offset; if (pstr->mb_cur_max > 1) { if (pstr->icase) { reg_errcode_t ret = build_wcs_upper_buffer (pstr); if (__builtin_expect (ret != REG_NOERROR, 0)) return ret; } else build_wcs_buffer (pstr); } else if (__builtin_expect (pstr->mbs_allocated, 0)) { if (pstr->icase) build_upper_buffer (pstr); else if (pstr->trans != ((void *)0)) re_string_translate_buffer (pstr); } else pstr->valid_len = pstr->len; pstr->cur_idx = 0; return REG_NOERROR; } static unsigned char __attribute__ ((pure)) re_string_peek_byte_case (const re_string_t *pstr, int idx) { int ch, off; if (__builtin_expect (!pstr->mbs_allocated, 1)) return ((pstr)->mbs[(pstr)->cur_idx + idx]); if (pstr->mb_cur_max > 1 && ! ((pstr)->wcs[pstr->cur_idx + idx] != (0xffffffffu) && ((pstr)->valid_len == (pstr->cur_idx + idx) + 1 || (pstr)->wcs[(pstr->cur_idx + idx) + 1] != (0xffffffffu)))) return ((pstr)->mbs[(pstr)->cur_idx + idx]); off = pstr->cur_idx + idx; if (pstr->offsets_needed) off = pstr->offsets[off]; ch = pstr->raw_mbs[pstr->raw_mbs_idx + off]; if (pstr->offsets_needed && !(((ch) & ~0x7f) == 0)) return ((pstr)->mbs[(pstr)->cur_idx + idx]); return ch; } static unsigned char __attribute__ ((pure)) re_string_fetch_byte_case (re_string_t *pstr) { if (__builtin_expect (!pstr->mbs_allocated, 1)) return ((pstr)->mbs[(pstr)->cur_idx++]); if (pstr->offsets_needed) { int off, ch; # 876 "regex_internal.c" if (!((pstr->cur_idx) == (pstr)->valid_len || (pstr)->wcs[pstr->cur_idx] != (0xffffffffu))) return ((pstr)->mbs[(pstr)->cur_idx++]); off = pstr->offsets[pstr->cur_idx]; ch = pstr->raw_mbs[pstr->raw_mbs_idx + off]; if (! (((ch) & ~0x7f) == 0)) return ((pstr)->mbs[(pstr)->cur_idx++]); ((pstr)->cur_idx += (re_string_char_size_at (pstr, pstr->cur_idx))); return ch; } return pstr->raw_mbs[pstr->raw_mbs_idx + pstr->cur_idx++]; } static void re_string_destruct (re_string_t *pstr) { free (pstr->wcs); free (pstr->offsets); if (pstr->mbs_allocated) free (pstr->mbs); } static unsigned int re_string_context_at (const re_string_t *input, int idx, int eflags) { int c; if (__builtin_expect (idx < 0, 0)) return input->tip_context; if (__builtin_expect (idx == input->len, 0)) return ((eflags & (1 << 1)) ? (((1 << 1) << 1) << 1) : (1 << 1) | (((1 << 1) << 1) << 1)); if (input->mb_cur_max > 1) { wint_t wc; int wc_idx = idx; while(input->wcs[wc_idx] == (0xffffffffu)) { --wc_idx; if (wc_idx < 0) return input->tip_context; } wc = input->wcs[wc_idx]; if (__builtin_expect (input->word_ops_used != 0, 0) && (iswalnum (wc) || (wc) == L'_')) return 1; return (((wc) == L'\n') && input->newline_anchor ? (1 << 1) : 0); } else { c = ((input)->mbs[idx]); if ((input->word_char[c / (sizeof (bitset_word_t) * 8)] & ((bitset_word_t) 1 << c % (sizeof (bitset_word_t) * 8)))) return 1; return ((c) == '\n') && input->newline_anchor ? (1 << 1) : 0; } } static reg_errcode_t re_node_set_alloc (re_node_set *set, int size) { set->alloc = size; set->nelem = 0; set->elems = ((int *) malloc ((size) * sizeof (int))); if (__builtin_expect (set->elems == ((void *)0), 0)) return REG_ESPACE; return REG_NOERROR; } static reg_errcode_t re_node_set_init_1 (re_node_set *set, int elem) { set->alloc = 1; set->nelem = 1; set->elems = ((int *) malloc ((1) * sizeof (int))); if (__builtin_expect (set->elems == ((void *)0), 0)) { set->alloc = set->nelem = 0; return REG_ESPACE; } set->elems[0] = elem; return REG_NOERROR; } static reg_errcode_t re_node_set_init_2 (re_node_set *set, int elem1, int elem2) { set->alloc = 2; set->elems = ((int *) malloc ((2) * sizeof (int))); if (__builtin_expect (set->elems == ((void *)0), 0)) return REG_ESPACE; if (elem1 == elem2) { set->nelem = 1; set->elems[0] = elem1; } else { set->nelem = 2; if (elem1 < elem2) { set->elems[0] = elem1; set->elems[1] = elem2; } else { set->elems[0] = elem2; set->elems[1] = elem1; } } return REG_NOERROR; } static reg_errcode_t re_node_set_init_copy (re_node_set *dest, const re_node_set *src) { dest->nelem = src->nelem; if (src->nelem > 0) { dest->alloc = dest->nelem; dest->elems = ((int *) malloc ((dest->alloc) * sizeof (int))); if (__builtin_expect (dest->elems == ((void *)0), 0)) { dest->alloc = dest->nelem = 0; return REG_ESPACE; } memcpy (dest->elems, src->elems, src->nelem * sizeof (int)); } else memset (dest, '\0', sizeof (re_node_set)); return REG_NOERROR; } static reg_errcode_t re_node_set_add_intersect (re_node_set *dest, const re_node_set *src1, const re_node_set *src2) { int i1, i2, is, id, delta, sbase; if (src1->nelem == 0 || src2->nelem == 0) return REG_NOERROR; if (src1->nelem + src2->nelem + dest->nelem > dest->alloc) { int new_alloc = src1->nelem + src2->nelem + dest->alloc; int *new_elems = ((int *) realloc (dest->elems, (new_alloc) * sizeof (int))); if (__builtin_expect (new_elems == ((void *)0), 0)) return REG_ESPACE; dest->elems = new_elems; dest->alloc = new_alloc; } sbase = dest->nelem + src1->nelem + src2->nelem; i1 = src1->nelem - 1; i2 = src2->nelem - 1; id = dest->nelem - 1; for (;;) { if (src1->elems[i1] == src2->elems[i2]) { while (id >= 0 && dest->elems[id] > src1->elems[i1]) --id; if (id < 0 || dest->elems[id] != src1->elems[i1]) dest->elems[--sbase] = src1->elems[i1]; if (--i1 < 0 || --i2 < 0) break; } else if (src1->elems[i1] < src2->elems[i2]) { if (--i2 < 0) break; } else { if (--i1 < 0) break; } } id = dest->nelem - 1; is = dest->nelem + src1->nelem + src2->nelem - 1; delta = is - sbase + 1; dest->nelem += delta; if (delta > 0 && id >= 0) for (;;) { if (dest->elems[is] > dest->elems[id]) { dest->elems[id + delta--] = dest->elems[is--]; if (delta == 0) break; } else { dest->elems[id + delta] = dest->elems[id]; if (--id < 0) break; } } memcpy (dest->elems, dest->elems + sbase, delta * sizeof (int)); return REG_NOERROR; } static reg_errcode_t re_node_set_init_union (re_node_set *dest, const re_node_set *src1, const re_node_set *src2) { int i1, i2, id; if (src1 != ((void *)0) && src1->nelem > 0 && src2 != ((void *)0) && src2->nelem > 0) { dest->alloc = src1->nelem + src2->nelem; dest->elems = ((int *) malloc ((dest->alloc) * sizeof (int))); if (__builtin_expect (dest->elems == ((void *)0), 0)) return REG_ESPACE; } else { if (src1 != ((void *)0) && src1->nelem > 0) return re_node_set_init_copy (dest, src1); else if (src2 != ((void *)0) && src2->nelem > 0) return re_node_set_init_copy (dest, src2); else memset (dest, '\0', sizeof (re_node_set)); return REG_NOERROR; } for (i1 = i2 = id = 0 ; i1 < src1->nelem && i2 < src2->nelem ;) { if (src1->elems[i1] > src2->elems[i2]) { dest->elems[id++] = src2->elems[i2++]; continue; } if (src1->elems[i1] == src2->elems[i2]) ++i2; dest->elems[id++] = src1->elems[i1++]; } if (i1 < src1->nelem) { memcpy (dest->elems + id, src1->elems + i1, (src1->nelem - i1) * sizeof (int)); id += src1->nelem - i1; } else if (i2 < src2->nelem) { memcpy (dest->elems + id, src2->elems + i2, (src2->nelem - i2) * sizeof (int)); id += src2->nelem - i2; } dest->nelem = id; return REG_NOERROR; } static reg_errcode_t re_node_set_merge (re_node_set *dest, const re_node_set *src) { int is, id, sbase, delta; if (src == ((void *)0) || src->nelem == 0) return REG_NOERROR; if (dest->alloc < 2 * src->nelem + dest->nelem) { int new_alloc = 2 * (src->nelem + dest->alloc); int *new_buffer = ((int *) realloc (dest->elems, (new_alloc) * sizeof (int))); if (__builtin_expect (new_buffer == ((void *)0), 0)) return REG_ESPACE; dest->elems = new_buffer; dest->alloc = new_alloc; } if (__builtin_expect (dest->nelem == 0, 0)) { dest->nelem = src->nelem; memcpy (dest->elems, src->elems, src->nelem * sizeof (int)); return REG_NOERROR; } for (sbase = dest->nelem + 2 * src->nelem, is = src->nelem - 1, id = dest->nelem - 1; is >= 0 && id >= 0; ) { if (dest->elems[id] == src->elems[is]) is--, id--; else if (dest->elems[id] < src->elems[is]) dest->elems[--sbase] = src->elems[is--]; else --id; } if (is >= 0) { sbase -= is + 1; memcpy (dest->elems + sbase, src->elems, (is + 1) * sizeof (int)); } id = dest->nelem - 1; is = dest->nelem + 2 * src->nelem - 1; delta = is - sbase + 1; if (delta == 0) return REG_NOERROR; dest->nelem += delta; for (;;) { if (dest->elems[is] > dest->elems[id]) { dest->elems[id + delta--] = dest->elems[is--]; if (delta == 0) break; } else { dest->elems[id + delta] = dest->elems[id]; if (--id < 0) { memcpy (dest->elems, dest->elems + sbase, delta * sizeof (int)); break; } } } return REG_NOERROR; } static int re_node_set_insert (re_node_set *set, int elem) { int idx; if (set->alloc == 0) { if (__builtin_expect (re_node_set_init_1 (set, elem) == REG_NOERROR, 1)) return 1; else return -1; } if (__builtin_expect (set->nelem, 0) == 0) { set->elems[0] = elem; ++set->nelem; return 1; } if (set->alloc == set->nelem) { int *new_elems; set->alloc = set->alloc * 2; new_elems = ((int *) realloc (set->elems, (set->alloc) * sizeof (int))); if (__builtin_expect (new_elems == ((void *)0), 0)) return -1; set->elems = new_elems; } if (elem < set->elems[0]) { idx = 0; for (idx = set->nelem; idx > 0; idx--) set->elems[idx] = set->elems[idx - 1]; } else { for (idx = set->nelem; set->elems[idx - 1] > elem; idx--) set->elems[idx] = set->elems[idx - 1]; } set->elems[idx] = elem; ++set->nelem; return 1; } static int re_node_set_insert_last (re_node_set *set, int elem) { if (set->alloc == set->nelem) { int *new_elems; set->alloc = (set->alloc + 1) * 2; new_elems = ((int *) realloc (set->elems, (set->alloc) * sizeof (int))); if (__builtin_expect (new_elems == ((void *)0), 0)) return -1; set->elems = new_elems; } set->elems[set->nelem++] = elem; return 1; } static int __attribute__ ((pure)) re_node_set_compare (const re_node_set *set1, const re_node_set *set2) { int i; if (set1 == ((void *)0) || set2 == ((void *)0) || set1->nelem != set2->nelem) return 0; for (i = set1->nelem ; --i >= 0 ; ) if (set1->elems[i] != set2->elems[i]) return 0; return 1; } static int __attribute__ ((pure)) re_node_set_contains (const re_node_set *set, int elem) { unsigned int idx, right, mid; if (set->nelem <= 0) return 0; idx = 0; right = set->nelem - 1; while (idx < right) { mid = (idx + right) / 2; if (set->elems[mid] < elem) idx = mid + 1; else right = mid; } return set->elems[idx] == elem ? idx + 1 : 0; } static void re_node_set_remove_at (re_node_set *set, int idx) { if (idx < 0 || idx >= set->nelem) return; --set->nelem; for (; idx < set->nelem; idx++) set->elems[idx] = set->elems[idx + 1]; } static int re_dfa_add_node (re_dfa_t *dfa, re_token_t token) { int type = token.type; if (__builtin_expect (dfa->nodes_len >= dfa->nodes_alloc, 0)) { size_t new_nodes_alloc = dfa->nodes_alloc * 2; int *new_nexts, *new_indices; re_node_set *new_edests, *new_eclosures; re_token_t *new_nodes; if (__builtin_expect (new_nodes_alloc < dfa->nodes_alloc, 0)) return -1; new_nodes = ((re_token_t *) realloc (dfa->nodes, (new_nodes_alloc) * sizeof (re_token_t))); if (__builtin_expect (new_nodes == ((void *)0), 0)) return -1; dfa->nodes = new_nodes; new_nexts = ((int *) realloc (dfa->nexts, (new_nodes_alloc) * sizeof (int))); new_indices = ((int *) realloc (dfa->org_indices, (new_nodes_alloc) * sizeof (int))); new_edests = ((re_node_set *) realloc (dfa->edests, (new_nodes_alloc) * sizeof (re_node_set))); new_eclosures = ((re_node_set *) realloc (dfa->eclosures, (new_nodes_alloc) * sizeof (re_node_set))); if (__builtin_expect (new_nexts == ((void *)0) || new_indices == ((void *)0) || new_edests == ((void *)0) || new_eclosures == ((void *)0), 0)) return -1; dfa->nexts = new_nexts; dfa->org_indices = new_indices; dfa->edests = new_edests; dfa->eclosures = new_eclosures; dfa->nodes_alloc = new_nodes_alloc; } dfa->nodes[dfa->nodes_len] = token; dfa->nodes[dfa->nodes_len].constraint = 0; dfa->nodes[dfa->nodes_len].accept_mb = (type == OP_PERIOD && dfa->mb_cur_max > 1) || type == COMPLEX_BRACKET; dfa->nexts[dfa->nodes_len] = -1; memset (dfa->edests + dfa->nodes_len, '\0', sizeof (re_node_set)); memset (dfa->eclosures + dfa->nodes_len, '\0', sizeof (re_node_set)); return dfa->nodes_len++; } static inline unsigned int calc_state_hash (const re_node_set *nodes, unsigned int context) { unsigned int hash = nodes->nelem + context; int i; for (i = 0 ; i < nodes->nelem ; i++) hash += nodes->elems[i]; return hash; } # 1460 "regex_internal.c" static re_dfastate_t * re_acquire_state (reg_errcode_t *err, const re_dfa_t *dfa, const re_node_set *nodes) { unsigned int hash; re_dfastate_t *new_state; struct re_state_table_entry *spot; int i; if (__builtin_expect (nodes->nelem == 0, 0)) { *err = REG_NOERROR; return ((void *)0); } hash = calc_state_hash (nodes, 0); spot = dfa->state_table + (hash & dfa->state_hash_mask); for (i = 0 ; i < spot->num ; i++) { re_dfastate_t *state = spot->array[i]; if (hash != state->hash) continue; if (re_node_set_compare (&state->nodes, nodes)) return state; } new_state = create_ci_newstate (dfa, nodes, hash); if (__builtin_expect (new_state == ((void *)0), 0)) *err = REG_ESPACE; return new_state; } # 1504 "regex_internal.c" static re_dfastate_t * re_acquire_state_context (reg_errcode_t *err, const re_dfa_t *dfa, const re_node_set *nodes, unsigned int context) { unsigned int hash; re_dfastate_t *new_state; struct re_state_table_entry *spot; int i; if (nodes->nelem == 0) { *err = REG_NOERROR; return ((void *)0); } hash = calc_state_hash (nodes, context); spot = dfa->state_table + (hash & dfa->state_hash_mask); for (i = 0 ; i < spot->num ; i++) { re_dfastate_t *state = spot->array[i]; if (state->hash == hash && state->context == context && re_node_set_compare (state->entrance_nodes, nodes)) return state; } new_state = create_cd_newstate (dfa, nodes, context, hash); if (__builtin_expect (new_state == ((void *)0), 0)) *err = REG_ESPACE; return new_state; } static reg_errcode_t register_state (const re_dfa_t *dfa, re_dfastate_t *newstate, unsigned int hash) { struct re_state_table_entry *spot; reg_errcode_t err; int i; newstate->hash = hash; err = re_node_set_alloc (&newstate->non_eps_nodes, newstate->nodes.nelem); if (__builtin_expect (err != REG_NOERROR, 0)) return REG_ESPACE; for (i = 0; i < newstate->nodes.nelem; i++) { int elem = newstate->nodes.elems[i]; if (!((dfa->nodes[elem].type) & 8)) re_node_set_insert_last (&newstate->non_eps_nodes, elem); } spot = dfa->state_table + (hash & dfa->state_hash_mask); if (__builtin_expect (spot->alloc <= spot->num, 0)) { int new_alloc = 2 * spot->num + 2; re_dfastate_t **new_array = ((re_dfastate_t * *) realloc (spot->array, (new_alloc) * sizeof (re_dfastate_t *))); if (__builtin_expect (new_array == ((void *)0), 0)) return REG_ESPACE; spot->array = new_array; spot->alloc = new_alloc; } spot->array[spot->num++] = newstate; return REG_NOERROR; } static void free_state (re_dfastate_t *state) { free ((&state->non_eps_nodes)->elems); free ((&state->inveclosure)->elems); if (state->entrance_nodes != &state->nodes) { free ((state->entrance_nodes)->elems); free (state->entrance_nodes); } free ((&state->nodes)->elems); free (state->word_trtable); free (state->trtable); free (state); } static re_dfastate_t * create_ci_newstate (const re_dfa_t *dfa, const re_node_set *nodes, unsigned int hash) { int i; reg_errcode_t err; re_dfastate_t *newstate; newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1); if (__builtin_expect (newstate == ((void *)0), 0)) return ((void *)0); err = re_node_set_init_copy (&newstate->nodes, nodes); if (__builtin_expect (err != REG_NOERROR, 0)) { free (newstate); return ((void *)0); } newstate->entrance_nodes = &newstate->nodes; for (i = 0 ; i < nodes->nelem ; i++) { re_token_t *node = dfa->nodes + nodes->elems[i]; re_token_type_t type = node->type; if (type == CHARACTER && !node->constraint) continue; newstate->accept_mb |= node->accept_mb; if (type == END_OF_RE) newstate->halt = 1; else if (type == OP_BACK_REF) newstate->has_backref = 1; else if (type == ANCHOR || node->constraint) newstate->has_constraint = 1; } err = register_state (dfa, newstate, hash); if (__builtin_expect (err != REG_NOERROR, 0)) { free_state (newstate); newstate = ((void *)0); } return newstate; } static re_dfastate_t * create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes, unsigned int context, unsigned int hash) { int i, nctx_nodes = 0; reg_errcode_t err; re_dfastate_t *newstate; newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1); if (__builtin_expect (newstate == ((void *)0), 0)) return ((void *)0); err = re_node_set_init_copy (&newstate->nodes, nodes); if (__builtin_expect (err != REG_NOERROR, 0)) { free (newstate); return ((void *)0); } newstate->context = context; newstate->entrance_nodes = &newstate->nodes; for (i = 0 ; i < nodes->nelem ; i++) { unsigned int constraint = 0; re_token_t *node = dfa->nodes + nodes->elems[i]; re_token_type_t type = node->type; if (node->constraint) constraint = node->constraint; if (type == CHARACTER && !constraint) continue; newstate->accept_mb |= node->accept_mb; if (type == END_OF_RE) newstate->halt = 1; else if (type == OP_BACK_REF) newstate->has_backref = 1; else if (type == ANCHOR) constraint = node->opr.ctx_type; if (constraint) { if (newstate->entrance_nodes == &newstate->nodes) { newstate->entrance_nodes = ((re_node_set *) malloc ((1) * sizeof (re_node_set))); if (__builtin_expect (newstate->entrance_nodes == ((void *)0), 0)) { free_state (newstate); return ((void *)0); } re_node_set_init_copy (newstate->entrance_nodes, nodes); nctx_nodes = 0; newstate->has_constraint = 1; } if (((((constraint) & 0x0001) && !((context) & 1)) || ((constraint & 0x0002) && ((context) & 1)) || ((constraint & 0x0010) && !((context) & (1 << 1))) || ((constraint & 0x0040) && !((context) & ((1 << 1) << 1))))) { re_node_set_remove_at (&newstate->nodes, i - nctx_nodes); ++nctx_nodes; } } } err = register_state (dfa, newstate, hash); if (__builtin_expect (err != REG_NOERROR, 0)) { free_state (newstate); newstate = ((void *)0); } return newstate; } # 64 "regex.c" 2 # 1 "regcomp.c" 1 # 21 "regcomp.c" static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern, size_t length, reg_syntax_t syntax); static void re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, char *fastmap); static reg_errcode_t init_dfa (re_dfa_t *dfa, size_t pat_len); static void free_charset (re_charset_t *cset); static void free_workarea_compile (regex_t *preg); static reg_errcode_t create_initial_state (re_dfa_t *dfa); static void optimize_utf8 (re_dfa_t *dfa); static reg_errcode_t analyze (regex_t *preg); static reg_errcode_t preorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)), void *extra); static reg_errcode_t postorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)), void *extra); static reg_errcode_t optimize_subexps (void *extra, bin_tree_t *node); static reg_errcode_t lower_subexps (void *extra, bin_tree_t *node); static bin_tree_t *lower_subexp (reg_errcode_t *err, regex_t *preg, bin_tree_t *node); static reg_errcode_t calc_first (void *extra, bin_tree_t *node); static reg_errcode_t calc_next (void *extra, bin_tree_t *node); static reg_errcode_t link_nfa_nodes (void *extra, bin_tree_t *node); static int duplicate_node (re_dfa_t *dfa, int org_idx, unsigned int constraint); static int search_duplicated_node (const re_dfa_t *dfa, int org_node, unsigned int constraint); static reg_errcode_t calc_eclosure (re_dfa_t *dfa); static reg_errcode_t calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, int node, int root); static reg_errcode_t calc_inveclosure (re_dfa_t *dfa); static int fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax); static int peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax) ; static bin_tree_t *parse (re_string_t *regexp, regex_t *preg, reg_syntax_t syntax, reg_errcode_t *err); static bin_tree_t *parse_reg_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, int nest, reg_errcode_t *err); static bin_tree_t *parse_branch (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, int nest, reg_errcode_t *err); static bin_tree_t *parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, int nest, reg_errcode_t *err); static bin_tree_t *parse_sub_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, int nest, reg_errcode_t *err); static bin_tree_t *parse_dup_op (bin_tree_t *dup_elem, re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, reg_syntax_t syntax, reg_errcode_t *err); static bin_tree_t *parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, reg_syntax_t syntax, reg_errcode_t *err); static reg_errcode_t parse_bracket_element (bracket_elem_t *elem, re_string_t *regexp, re_token_t *token, int token_len, re_dfa_t *dfa, reg_syntax_t syntax, int accept_hyphen); static reg_errcode_t parse_bracket_symbol (bracket_elem_t *elem, re_string_t *regexp, re_token_t *token); static reg_errcode_t build_equiv_class (bitset_t sbcset, re_charset_t *mbcset, int *equiv_class_alloc, const unsigned char *name); static reg_errcode_t build_charclass (unsigned char * trans, bitset_t sbcset, re_charset_t *mbcset, int *char_class_alloc, const unsigned char *class_name, reg_syntax_t syntax); # 108 "regcomp.c" static bin_tree_t *build_charclass_op (re_dfa_t *dfa, unsigned char * trans, const unsigned char *class_name, const unsigned char *extra, int non_match, reg_errcode_t *err); static bin_tree_t *create_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right, re_token_type_t type); static bin_tree_t *create_token_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right, const re_token_t *token); static bin_tree_t *duplicate_tree (const bin_tree_t *src, re_dfa_t *dfa); static void free_token (re_token_t *node); static reg_errcode_t free_tree (void *extra, bin_tree_t *node); static reg_errcode_t mark_opt_subexp (void *extra, bin_tree_t *node); const char __re_error_msgid[] = { "Success" "\0" "No match" "\0" "Invalid regular expression" "\0" "Invalid collation character" "\0" "Invalid character class name" "\0" "Trailing backslash" "\0" "Invalid back reference" "\0" "Unmatched [ or [^" "\0" "Unmatched ( or \\(" "\0" "Unmatched \\{" "\0" "Invalid content of \\{\\}" "\0" "Invalid range end" "\0" "Memory exhausted" "\0" "Invalid preceding regular expression" "\0" "Premature end of regular expression" "\0" "Regular expression too big" "\0" "Unmatched ) or \\)" }; const size_t __re_error_msgid_idx[] = { 0, (0 + sizeof "Success"), ((0 + sizeof "Success") + sizeof "No match"), (((0 + sizeof "Success") + sizeof "No match") + sizeof "Invalid regular expression"), ((((0 + sizeof "Success") + sizeof "No match") + sizeof "Invalid regular expression") + sizeof "Invalid collation character"), (((((0 + sizeof "Success") + sizeof "No match") + sizeof "Invalid regular expression") + sizeof "Invalid collation character") + sizeof "Invalid character class name"), ((((((0 + sizeof "Success") + sizeof "No match") + sizeof "Invalid regular expression") + sizeof "Invalid collation character") + sizeof "Invalid character class name") + sizeof "Trailing backslash"), (((((((0 + sizeof "Success") + sizeof "No match") + sizeof "Invalid regular expression") + sizeof "Invalid collation character") + sizeof "Invalid character class name") + sizeof "Trailing backslash") + sizeof "Invalid back reference"), ((((((((0 + sizeof "Success") + sizeof "No match") + sizeof "Invalid regular expression") + sizeof "Invalid collation character") + sizeof "Invalid character class name") + sizeof "Trailing backslash") + sizeof "Invalid back reference") + sizeof "Unmatched [ or [^"), (((((((((0 + sizeof "Success") + sizeof "No match") + sizeof "Invalid regular expression") + sizeof "Invalid collation character") + sizeof "Invalid character class name") + sizeof "Trailing backslash") + sizeof "Invalid back reference") + sizeof "Unmatched [ or [^") + sizeof "Unmatched ( or \\("), ((((((((((0 + sizeof "Success") + sizeof "No match") + sizeof "Invalid regular expression") + sizeof "Invalid collation character") + sizeof "Invalid character class name") + sizeof "Trailing backslash") + sizeof "Invalid back reference") + sizeof "Unmatched [ or [^") + sizeof "Unmatched ( or \\(") + sizeof "Unmatched \\{"), (((((((((((0 + sizeof "Success") + sizeof "No match") + sizeof "Invalid regular expression") + sizeof "Invalid collation character") + sizeof "Invalid character class name") + sizeof "Trailing backslash") + sizeof "Invalid back reference") + sizeof "Unmatched [ or [^") + sizeof "Unmatched ( or \\(") + sizeof "Unmatched \\{") + sizeof "Invalid content of \\{\\}"), ((((((((((((0 + sizeof "Success") + sizeof "No match") + sizeof "Invalid regular expression") + sizeof "Invalid collation character") + sizeof "Invalid character class name") + sizeof "Trailing backslash") + sizeof "Invalid back reference") + sizeof "Unmatched [ or [^") + sizeof "Unmatched ( or \\(") + sizeof "Unmatched \\{") + sizeof "Invalid content of \\{\\}") + sizeof "Invalid range end"), (((((((((((((0 + sizeof "Success") + sizeof "No match") + sizeof "Invalid regular expression") + sizeof "Invalid collation character") + sizeof "Invalid character class name") + sizeof "Trailing backslash") + sizeof "Invalid back reference") + sizeof "Unmatched [ or [^") + sizeof "Unmatched ( or \\(") + sizeof "Unmatched \\{") + sizeof "Invalid content of \\{\\}") + sizeof "Invalid range end") + sizeof "Memory exhausted"), ((((((((((((((0 + sizeof "Success") + sizeof "No match") + sizeof "Invalid regular expression") + sizeof "Invalid collation character") + sizeof "Invalid character class name") + sizeof "Trailing backslash") + sizeof "Invalid back reference") + sizeof "Unmatched [ or [^") + sizeof "Unmatched ( or \\(") + sizeof "Unmatched \\{") + sizeof "Invalid content of \\{\\}") + sizeof "Invalid range end") + sizeof "Memory exhausted") + sizeof "Invalid preceding regular expression"), (((((((((((((((0 + sizeof "Success") + sizeof "No match") + sizeof "Invalid regular expression") + sizeof "Invalid collation character") + sizeof "Invalid character class name") + sizeof "Trailing backslash") + sizeof "Invalid back reference") + sizeof "Unmatched [ or [^") + sizeof "Unmatched ( or \\(") + sizeof "Unmatched \\{") + sizeof "Invalid content of \\{\\}") + sizeof "Invalid range end") + sizeof "Memory exhausted") + sizeof "Invalid preceding regular expression") + sizeof "Premature end of regular expression"), ((((((((((((((((0 + sizeof "Success") + sizeof "No match") + sizeof "Invalid regular expression") + sizeof "Invalid collation character") + sizeof "Invalid character class name") + sizeof "Trailing backslash") + sizeof "Invalid back reference") + sizeof "Unmatched [ or [^") + sizeof "Unmatched ( or \\(") + sizeof "Unmatched \\{") + sizeof "Invalid content of \\{\\}") + sizeof "Invalid range end") + sizeof "Memory exhausted") + sizeof "Invalid preceding regular expression") + sizeof "Premature end of regular expression") + sizeof "Regular expression too big") }; # 213 "regcomp.c" const char * __re_compile_pattern (pattern, length, bufp) const char *pattern; size_t length; struct re_pattern_buffer *bufp; { reg_errcode_t ret; bufp->no_sub = !!(re_syntax_options & (((((((((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)); bufp->newline_anchor = 1; ret = re_compile_internal (bufp, pattern, length, re_syntax_options); if (!ret) return ((void *)0); return __dcgettext (_libc_intl_domainname, __re_error_msgid + __re_error_msgid_idx[(int) ret], __LC_MESSAGES); } extern __typeof (__re_compile_pattern) re_compile_pattern __attribute__ ((weak, alias ("__re_compile_pattern"))); reg_syntax_t re_syntax_options; # 254 "regcomp.c" reg_syntax_t __re_set_syntax (syntax) reg_syntax_t syntax; { reg_syntax_t ret = re_syntax_options; re_syntax_options = syntax; return ret; } extern __typeof (__re_set_syntax) re_set_syntax __attribute__ ((weak, alias ("__re_set_syntax"))); int __re_compile_fastmap (bufp) struct re_pattern_buffer *bufp; { re_dfa_t *dfa = (re_dfa_t *) bufp->buffer; char *fastmap = bufp->fastmap; memset (fastmap, '\0', sizeof (char) * 256); re_compile_fastmap_iter (bufp, dfa->init_state, fastmap); if (dfa->init_state != dfa->init_state_word) re_compile_fastmap_iter (bufp, dfa->init_state_word, fastmap); if (dfa->init_state != dfa->init_state_nl) re_compile_fastmap_iter (bufp, dfa->init_state_nl, fastmap); if (dfa->init_state != dfa->init_state_begbuf) re_compile_fastmap_iter (bufp, dfa->init_state_begbuf, fastmap); bufp->fastmap_accurate = 1; return 0; } extern __typeof (__re_compile_fastmap) re_compile_fastmap __attribute__ ((weak, alias ("__re_compile_fastmap"))); static inline void __attribute__ ((always_inline)) re_set_fastmap (char *fastmap, int icase, int ch) { fastmap[ch] = 1; if (icase) fastmap[(__extension__ ({ int __res; if (sizeof (ch) > 1) { if (__builtin_constant_p (ch)) { int __c = (ch); __res = __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower (ch); } else __res = (*__ctype_tolower_loc ())[(int) (ch)]; __res; }))] = 1; } static void re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, char *fastmap) { re_dfa_t *dfa = (re_dfa_t *) bufp->buffer; int node_cnt; int icase = (dfa->mb_cur_max == 1 && (bufp->syntax & ((((((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1))); for (node_cnt = 0; node_cnt < init_state->nodes.nelem; ++node_cnt) { int node = init_state->nodes.elems[node_cnt]; re_token_type_t type = dfa->nodes[node].type; if (type == CHARACTER) { re_set_fastmap (fastmap, icase, dfa->nodes[node].opr.c); if ((bufp->syntax & ((((((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) && dfa->mb_cur_max > 1) { unsigned char *buf = __builtin_alloca (dfa->mb_cur_max), *p; wchar_t wc; mbstate_t state; p = buf; *p++ = dfa->nodes[node].opr.c; while (++node < dfa->nodes_len && dfa->nodes[node].type == CHARACTER && dfa->nodes[node].mb_partial) *p++ = dfa->nodes[node].opr.c; memset (&state, '\0', sizeof (state)); if (mbrtowc (&wc, (const char *) buf, p - buf, &state) == p - buf && (__wcrtomb ((char *) buf, towlower (wc), &state) != (size_t) -1)) re_set_fastmap (fastmap, 0, buf[0]); } } else if (type == SIMPLE_BRACKET) { int i, ch; for (i = 0, ch = 0; i < (256 / (sizeof (bitset_word_t) * 8)); ++i) { int j; bitset_word_t w = dfa->nodes[node].opr.sbcset[i]; for (j = 0; j < (sizeof (bitset_word_t) * 8); ++j, ++ch) if (w & ((bitset_word_t) 1 << j)) re_set_fastmap (fastmap, icase, ch); } } else if (type == COMPLEX_BRACKET) { int i; re_charset_t *cset = dfa->nodes[node].opr.mbcset; if (cset->non_match || cset->ncoll_syms || cset->nequiv_classes || cset->nranges || cset->nchar_classes) { if (((uint32_t) (*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_NRULES) & 0xffff)].word) != 0) { const int32_t *table = (const int32_t *) ((*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_TABLEMB) & 0xffff)].string); for (i = 0; i < 256; ++i) if (table[i] < 0) re_set_fastmap (fastmap, icase, i); } } for (i = 0; i < cset->nmbchars; ++i) { char buf[256]; mbstate_t state; memset (&state, '\0', sizeof (state)); if (__wcrtomb (buf, cset->mbchars[i], &state) != (size_t) -1) re_set_fastmap (fastmap, icase, *(unsigned char *) buf); if ((bufp->syntax & ((((((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) && dfa->mb_cur_max > 1) { if (__wcrtomb (buf, towlower (cset->mbchars[i]), &state) != (size_t) -1) re_set_fastmap (fastmap, 0, *(unsigned char *) buf); } } } else if (type == OP_PERIOD || type == OP_UTF8_PERIOD || type == END_OF_RE) { memset (fastmap, '\1', sizeof (char) * 256); if (type == END_OF_RE) bufp->can_be_null = 1; return; } } } # 446 "regcomp.c" int __regcomp (preg, pattern, cflags) regex_t *__restrict preg; const char *__restrict pattern; int cflags; { reg_errcode_t ret; reg_syntax_t syntax = ((cflags & 1) ? ((((((unsigned long int) 1) << 1) << 1) | ((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) | (((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) | (((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) | ((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) | (((((unsigned long int) 1) << 1) << 1) << 1) | ((((((unsigned long int) 1) << 1) << 1) << 1) << 1) | ((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) | (((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) | (((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) | (((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) | (((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) : ((((((unsigned long int) 1) << 1) << 1) | ((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) | (((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) | (((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) | ((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) | (((unsigned long int) 1) << 1) | ((((((((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1))); preg->buffer = ((void *)0); preg->allocated = 0; preg->used = 0; preg->fastmap = ((char *) malloc ((256) * sizeof (char))); if (__builtin_expect (preg->fastmap == ((void *)0), 0)) return REG_ESPACE; syntax |= (cflags & (1 << 1)) ? ((((((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) : 0; if (cflags & ((1 << 1) << 1)) { syntax &= ~((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1); syntax |= ((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1); preg->newline_anchor = 1; } else preg->newline_anchor = 0; preg->no_sub = !!(cflags & (((1 << 1) << 1) << 1)); preg->translate = ((void *)0); ret = re_compile_internal (preg, pattern, strlen (pattern), syntax); if (ret == REG_ERPAREN) ret = REG_EPAREN; if (__builtin_expect (ret == REG_NOERROR, 1)) (void) __re_compile_fastmap (preg); else { free (preg->fastmap); preg->fastmap = ((void *)0); } return (int) ret; } extern __typeof (__regcomp) regcomp __attribute__ ((weak, alias ("__regcomp"))); size_t __regerror(errcode, preg, errbuf, errbuf_size) int errcode; const regex_t *__restrict preg; char *__restrict errbuf; size_t errbuf_size; { const char *msg; size_t msg_size; if (__builtin_expect (errcode < 0 || errcode >= (int) (sizeof (__re_error_msgid_idx) / sizeof (__re_error_msgid_idx[0])), 0)) abort (); msg = __dcgettext (_libc_intl_domainname, __re_error_msgid + __re_error_msgid_idx[errcode], __LC_MESSAGES); msg_size = strlen (msg) + 1; if (__builtin_expect (errbuf_size != 0, 1)) { if (__builtin_expect (msg_size > errbuf_size, 0)) { *((char *) __builtin_mempcpy (errbuf, msg, errbuf_size - 1)) = '\0'; } else memcpy (errbuf, msg, msg_size); } return msg_size; } extern __typeof (__regerror) regerror __attribute__ ((weak, alias ("__regerror"))); # 558 "regcomp.c" static const bitset_t utf8_sb_map = { [0 ... 0x80 / (sizeof (bitset_word_t) * 8) - 1] = (2147483647L * 2UL + 1UL) }; static void free_dfa_content (re_dfa_t *dfa) { int i, j; if (dfa->nodes) for (i = 0; i < dfa->nodes_len; ++i) free_token (dfa->nodes + i); free (dfa->nexts); for (i = 0; i < dfa->nodes_len; ++i) { if (dfa->eclosures != ((void *)0)) free ((dfa->eclosures + i)->elems); if (dfa->inveclosures != ((void *)0)) free ((dfa->inveclosures + i)->elems); if (dfa->edests != ((void *)0)) free ((dfa->edests + i)->elems); } free (dfa->edests); free (dfa->eclosures); free (dfa->inveclosures); free (dfa->nodes); if (dfa->state_table) for (i = 0; i <= dfa->state_hash_mask; ++i) { struct re_state_table_entry *entry = dfa->state_table + i; for (j = 0; j < entry->num; ++j) { re_dfastate_t *state = entry->array[j]; free_state (state); } free (entry->array); } free (dfa->state_table); if (dfa->sb_char != utf8_sb_map) free (dfa->sb_char); free (dfa->subexp_map); free (dfa); } void __regfree (preg) regex_t *preg; { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; if (__builtin_expect (dfa != ((void *)0), 1)) free_dfa_content (dfa); preg->buffer = ((void *)0); preg->allocated = 0; free (preg->fastmap); preg->fastmap = ((void *)0); free (preg->translate); preg->translate = ((void *)0); } extern __typeof (__regfree) regfree __attribute__ ((weak, alias ("__regfree"))); # 642 "regcomp.c" static struct re_pattern_buffer re_comp_buf; char * __attribute__ ((weak)) re_comp (s) const char *s; { reg_errcode_t ret; char *fastmap; if (!s) { if (!re_comp_buf.buffer) return __dcgettext (_libc_intl_domainname, "No previous regular expression", __LC_MESSAGES); return 0; } if (re_comp_buf.buffer) { fastmap = re_comp_buf.fastmap; re_comp_buf.fastmap = ((void *)0); __regfree (&re_comp_buf); memset (&re_comp_buf, '\0', sizeof (re_comp_buf)); re_comp_buf.fastmap = fastmap; } if (re_comp_buf.fastmap == ((void *)0)) { re_comp_buf.fastmap = (char *) malloc (256); if (re_comp_buf.fastmap == ((void *)0)) return (char *) __dcgettext (_libc_intl_domainname, __re_error_msgid + __re_error_msgid_idx[(int) REG_ESPACE], __LC_MESSAGES); } re_comp_buf.newline_anchor = 1; ret = re_compile_internal (&re_comp_buf, s, strlen (s), re_syntax_options); if (!ret) return ((void *)0); return (char *) __dcgettext (_libc_intl_domainname, __re_error_msgid + __re_error_msgid_idx[(int) ret], __LC_MESSAGES); } static void free_mem (void) __attribute__ ((__used__)) __attribute__ ((section ("__libc_freeres_fn"))); static const void *const __elf_set___libc_subfreeres_element_free_mem__ __attribute__ ((used, section ("__libc_subfreeres"))) = &(free_mem); static void free_mem (void) { __regfree (&re_comp_buf); } # 709 "regcomp.c" static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern, size_t length, reg_syntax_t syntax) { reg_errcode_t err = REG_NOERROR; re_dfa_t *dfa; re_string_t regexp; preg->fastmap_accurate = 0; preg->syntax = syntax; preg->not_bol = preg->not_eol = 0; preg->used = 0; preg->re_nsub = 0; preg->can_be_null = 0; preg->regs_allocated = 0; dfa = (re_dfa_t *) preg->buffer; if (__builtin_expect (preg->allocated < sizeof (re_dfa_t), 0)) { dfa = ((re_dfa_t *) realloc (preg->buffer, (1) * sizeof (re_dfa_t))); if (dfa == ((void *)0)) return REG_ESPACE; preg->allocated = sizeof (re_dfa_t); preg->buffer = (unsigned char *) dfa; } preg->used = sizeof (re_dfa_t); err = init_dfa (dfa, length); if (__builtin_expect (err != REG_NOERROR, 0)) { free_dfa_content (dfa); preg->buffer = ((void *)0); preg->allocated = 0; return err; } ((dfa->lock) = (0), 0); err = re_string_construct (®exp, pattern, length, preg->translate, syntax & ((((((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1), dfa); if (__builtin_expect (err != REG_NOERROR, 0)) { re_compile_internal_free_return: free_workarea_compile (preg); re_string_destruct (®exp); free_dfa_content (dfa); preg->buffer = ((void *)0); preg->allocated = 0; return err; } preg->re_nsub = 0; dfa->str_tree = parse (®exp, preg, syntax, &err); if (__builtin_expect (dfa->str_tree == ((void *)0), 0)) goto re_compile_internal_free_return; err = analyze (preg); if (__builtin_expect (err != REG_NOERROR, 0)) goto re_compile_internal_free_return; if (dfa->is_utf8 && !(syntax & ((((((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) && preg->translate == ((void *)0)) optimize_utf8 (dfa); err = create_initial_state (dfa); free_workarea_compile (preg); re_string_destruct (®exp); if (__builtin_expect (err != REG_NOERROR, 0)) { free_dfa_content (dfa); preg->buffer = ((void *)0); preg->allocated = 0; } return err; } static reg_errcode_t init_dfa (re_dfa_t *dfa, size_t pat_len) { unsigned int table_size; memset (dfa, '\0', sizeof (re_dfa_t)); dfa->str_tree_storage_idx = ((1024 - sizeof (void *)) / sizeof (bin_tree_t)); if (pat_len == (4294967295U)) return REG_ESPACE; dfa->nodes_alloc = pat_len + 1; dfa->nodes = ((re_token_t *) malloc ((dfa->nodes_alloc) * sizeof (re_token_t))); for (table_size = 1; ; table_size <<= 1) if (table_size > pat_len) break; dfa->state_table = calloc (sizeof (struct re_state_table_entry), table_size); dfa->state_hash_mask = table_size - 1; dfa->mb_cur_max = (((uint32_t) (*_nl_current_LC_CTYPE)->values[((int) (_NL_CTYPE_MB_CUR_MAX) & 0xffff)].word)); if (dfa->mb_cur_max == 6 && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (((*_nl_current_LC_CTYPE)->values[((int) (_NL_CTYPE_CODESET_NAME) & 0xffff)].string)) && __builtin_constant_p ("UTF-8") && (__s1_len = strlen (((*_nl_current_LC_CTYPE)->values[((int) (_NL_CTYPE_CODESET_NAME) & 0xffff)].string)), __s2_len = strlen ("UTF-8"), (!((size_t)(const void *)((((*_nl_current_LC_CTYPE)->values[((int) (_NL_CTYPE_CODESET_NAME) & 0xffff)].string)) + 1) - (size_t)(const void *)(((*_nl_current_LC_CTYPE)->values[((int) (_NL_CTYPE_CODESET_NAME) & 0xffff)].string)) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("UTF-8") + 1) - (size_t)(const void *)("UTF-8") == 1) || __s2_len >= 4)) ? __builtin_strcmp (((*_nl_current_LC_CTYPE)->values[((int) (_NL_CTYPE_CODESET_NAME) & 0xffff)].string), "UTF-8") : (__builtin_constant_p (((*_nl_current_LC_CTYPE)->values[((int) (_NL_CTYPE_CODESET_NAME) & 0xffff)].string)) && ((size_t)(const void *)((((*_nl_current_LC_CTYPE)->values[((int) (_NL_CTYPE_CODESET_NAME) & 0xffff)].string)) + 1) - (size_t)(const void *)(((*_nl_current_LC_CTYPE)->values[((int) (_NL_CTYPE_CODESET_NAME) & 0xffff)].string)) == 1) && (__s1_len = strlen (((*_nl_current_LC_CTYPE)->values[((int) (_NL_CTYPE_CODESET_NAME) & 0xffff)].string)), __s1_len < 4) ? (__builtin_constant_p ("UTF-8") && ((size_t)(const void *)(("UTF-8") + 1) - (size_t)(const void *)("UTF-8") == 1) ? __builtin_strcmp (((*_nl_current_LC_CTYPE)->values[((int) (_NL_CTYPE_CODESET_NAME) & 0xffff)].string), "UTF-8") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("UTF-8"); register int __result = (((__const unsigned char *) (__const char *) (((*_nl_current_LC_CTYPE)->values[((int) (_NL_CTYPE_CODESET_NAME) & 0xffff)].string)))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (((*_nl_current_LC_CTYPE)->values[((int) (_NL_CTYPE_CODESET_NAME) & 0xffff)].string)))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (((*_nl_current_LC_CTYPE)->values[((int) (_NL_CTYPE_CODESET_NAME) & 0xffff)].string)))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (((*_nl_current_LC_CTYPE)->values[((int) (_NL_CTYPE_CODESET_NAME) & 0xffff)].string)))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("UTF-8") && ((size_t)(const void *)(("UTF-8") + 1) - (size_t)(const void *)("UTF-8") == 1) && (__s2_len = strlen ("UTF-8"), __s2_len < 4) ? (__builtin_constant_p (((*_nl_current_LC_CTYPE)->values[((int) (_NL_CTYPE_CODESET_NAME) & 0xffff)].string)) && ((size_t)(const void *)((((*_nl_current_LC_CTYPE)->values[((int) (_NL_CTYPE_CODESET_NAME) & 0xffff)].string)) + 1) - (size_t)(const void *)(((*_nl_current_LC_CTYPE)->values[((int) (_NL_CTYPE_CODESET_NAME) & 0xffff)].string)) == 1) ? __builtin_strcmp (((*_nl_current_LC_CTYPE)->values[((int) (_NL_CTYPE_CODESET_NAME) & 0xffff)].string), "UTF-8") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (((*_nl_current_LC_CTYPE)->values[((int) (_NL_CTYPE_CODESET_NAME) & 0xffff)].string)); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("UTF-8"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("UTF-8"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("UTF-8"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("UTF-8"))[3]); } } __result; }))) : __builtin_strcmp (((*_nl_current_LC_CTYPE)->values[((int) (_NL_CTYPE_CODESET_NAME) & 0xffff)].string), "UTF-8")))); }) == 0) dfa->is_utf8 = 1; dfa->map_notascii = (((uint32_t) (*_nl_current_LC_CTYPE)->values[((int) (_NL_CTYPE_MAP_TO_NONASCII) & 0xffff)].word) != 0); # 868 "regcomp.c" if (dfa->mb_cur_max > 1) { if (dfa->is_utf8) dfa->sb_char = (re_bitset_ptr_t) utf8_sb_map; else { int i, j, ch; dfa->sb_char = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1); if (__builtin_expect (dfa->sb_char == ((void *)0), 0)) return REG_ESPACE; for (i = 0, ch = 0; i < (256 / (sizeof (bitset_word_t) * 8)); ++i) for (j = 0; j < (sizeof (bitset_word_t) * 8); ++j, ++ch) { wint_t wch = __btowc (ch); if (wch != (0xffffffffu)) dfa->sb_char[i] |= (bitset_word_t) 1 << j; } } } if (__builtin_expect (dfa->nodes == ((void *)0) || dfa->state_table == ((void *)0), 0)) return REG_ESPACE; return REG_NOERROR; } static void init_word_char (re_dfa_t *dfa) { int i, j, ch; dfa->word_ops_used = 1; for (i = 0, ch = 0; i < (256 / (sizeof (bitset_word_t) * 8)); ++i) for (j = 0; j < (sizeof (bitset_word_t) * 8); ++j, ++ch) if (((*__ctype_b_loc ())[(int) ((ch))] & (unsigned short int) _ISalnum) || ch == '_') dfa->word_char[i] |= (bitset_word_t) 1 << j; } static void free_workarea_compile (regex_t *preg) { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_storage_t *storage, *next; for (storage = dfa->str_tree_storage; storage; storage = next) { next = storage->next; free (storage); } dfa->str_tree_storage = ((void *)0); dfa->str_tree_storage_idx = ((1024 - sizeof (void *)) / sizeof (bin_tree_t)); dfa->str_tree = ((void *)0); free (dfa->org_indices); dfa->org_indices = ((void *)0); } static reg_errcode_t create_initial_state (re_dfa_t *dfa) { int first, i; reg_errcode_t err; re_node_set init_nodes; first = dfa->str_tree->first->node_idx; dfa->init_node = first; err = re_node_set_init_copy (&init_nodes, dfa->eclosures + first); if (__builtin_expect (err != REG_NOERROR, 0)) return err; if (dfa->nbackref > 0) for (i = 0; i < init_nodes.nelem; ++i) { int node_idx = init_nodes.elems[i]; re_token_type_t type = dfa->nodes[node_idx].type; int clexp_idx; if (type != OP_BACK_REF) continue; for (clexp_idx = 0; clexp_idx < init_nodes.nelem; ++clexp_idx) { re_token_t *clexp_node; clexp_node = dfa->nodes + init_nodes.elems[clexp_idx]; if (clexp_node->type == OP_CLOSE_SUBEXP && clexp_node->opr.idx == dfa->nodes[node_idx].opr.idx) break; } if (clexp_idx == init_nodes.nelem) continue; if (type == OP_BACK_REF) { int dest_idx = dfa->edests[node_idx].elems[0]; if (!re_node_set_contains (&init_nodes, dest_idx)) { re_node_set_merge (&init_nodes, dfa->eclosures + dest_idx); i = 0; } } } dfa->init_state = re_acquire_state_context (&err, dfa, &init_nodes, 0); if (__builtin_expect (dfa->init_state == ((void *)0), 0)) return err; if (dfa->init_state->has_constraint) { dfa->init_state_word = re_acquire_state_context (&err, dfa, &init_nodes, 1); dfa->init_state_nl = re_acquire_state_context (&err, dfa, &init_nodes, (1 << 1)); dfa->init_state_begbuf = re_acquire_state_context (&err, dfa, &init_nodes, (1 << 1) | ((1 << 1) << 1)); if (__builtin_expect (dfa->init_state_word == ((void *)0) || dfa->init_state_nl == ((void *)0) || dfa->init_state_begbuf == ((void *)0), 0)) return err; } else dfa->init_state_word = dfa->init_state_nl = dfa->init_state_begbuf = dfa->init_state; free ((&init_nodes)->elems); return REG_NOERROR; } static void optimize_utf8 (re_dfa_t *dfa) { int node, i, mb_chars = 0, has_period = 0; for (node = 0; node < dfa->nodes_len; ++node) switch (dfa->nodes[node].type) { case CHARACTER: if (dfa->nodes[node].opr.c >= 0x80) mb_chars = 1; break; case ANCHOR: switch (dfa->nodes[node].opr.idx) { case LINE_FIRST: case LINE_LAST: case BUF_FIRST: case BUF_LAST: break; default: return; } break; case OP_PERIOD: has_period = 1; break; case OP_BACK_REF: case OP_ALT: case END_OF_RE: case OP_DUP_ASTERISK: case OP_OPEN_SUBEXP: case OP_CLOSE_SUBEXP: break; case COMPLEX_BRACKET: return; case SIMPLE_BRACKET: ((0x80 % (sizeof (bitset_word_t) * 8) == 0) ? (void) (0) : (__assert_fail ("0x80 % (sizeof (bitset_word_t) * 8) == 0", "regcomp.c", 1059, __PRETTY_FUNCTION__), (void) (0))); for (i = 0x80 / (sizeof (bitset_word_t) * 8); i < (256 / (sizeof (bitset_word_t) * 8)); ++i) if (dfa->nodes[node].opr.sbcset[i]) return; break; default: abort (); } if (mb_chars || has_period) for (node = 0; node < dfa->nodes_len; ++node) { if (dfa->nodes[node].type == CHARACTER && dfa->nodes[node].opr.c >= 0x80) dfa->nodes[node].mb_partial = 0; else if (dfa->nodes[node].type == OP_PERIOD) dfa->nodes[node].type = OP_UTF8_PERIOD; } dfa->mb_cur_max = 1; dfa->is_utf8 = 0; dfa->has_mb_node = dfa->nbackref > 0 || has_period; } static reg_errcode_t analyze (regex_t *preg) { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; reg_errcode_t ret; dfa->nexts = ((int *) malloc ((dfa->nodes_alloc) * sizeof (int))); dfa->org_indices = ((int *) malloc ((dfa->nodes_alloc) * sizeof (int))); dfa->edests = ((re_node_set *) malloc ((dfa->nodes_alloc) * sizeof (re_node_set))); dfa->eclosures = ((re_node_set *) malloc ((dfa->nodes_alloc) * sizeof (re_node_set))); if (__builtin_expect (dfa->nexts == ((void *)0) || dfa->org_indices == ((void *)0) || dfa->edests == ((void *)0) || dfa->eclosures == ((void *)0), 0)) return REG_ESPACE; dfa->subexp_map = ((int *) malloc ((preg->re_nsub) * sizeof (int))); if (dfa->subexp_map != ((void *)0)) { int i; for (i = 0; i < preg->re_nsub; i++) dfa->subexp_map[i] = i; preorder (dfa->str_tree, optimize_subexps, dfa); for (i = 0; i < preg->re_nsub; i++) if (dfa->subexp_map[i] != i) break; if (i == preg->re_nsub) { free (dfa->subexp_map); dfa->subexp_map = ((void *)0); } } ret = postorder (dfa->str_tree, lower_subexps, preg); if (__builtin_expect (ret != REG_NOERROR, 0)) return ret; ret = postorder (dfa->str_tree, calc_first, dfa); if (__builtin_expect (ret != REG_NOERROR, 0)) return ret; preorder (dfa->str_tree, calc_next, dfa); ret = preorder (dfa->str_tree, link_nfa_nodes, dfa); if (__builtin_expect (ret != REG_NOERROR, 0)) return ret; ret = calc_eclosure (dfa); if (__builtin_expect (ret != REG_NOERROR, 0)) return ret; if ((!preg->no_sub && preg->re_nsub > 0 && dfa->has_plural_match) || dfa->nbackref) { dfa->inveclosures = ((re_node_set *) malloc ((dfa->nodes_len) * sizeof (re_node_set))); if (__builtin_expect (dfa->inveclosures == ((void *)0), 0)) return REG_ESPACE; ret = calc_inveclosure (dfa); } return ret; } static reg_errcode_t postorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)), void *extra) { bin_tree_t *node, *prev; for (node = root; ; ) { while (node->left || node->right) if (node->left) node = node->left; else node = node->right; do { reg_errcode_t err = fn (extra, node); if (__builtin_expect (err != REG_NOERROR, 0)) return err; if (node->parent == ((void *)0)) return REG_NOERROR; prev = node; node = node->parent; } while (node->right == prev || node->right == ((void *)0)); node = node->right; } } static reg_errcode_t preorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)), void *extra) { bin_tree_t *node; for (node = root; ; ) { reg_errcode_t err = fn (extra, node); if (__builtin_expect (err != REG_NOERROR, 0)) return err; if (node->left) node = node->left; else { bin_tree_t *prev = ((void *)0); while (node->right == prev || node->right == ((void *)0)) { prev = node; node = node->parent; if (!node) return REG_NOERROR; } node = node->right; } } } static reg_errcode_t optimize_subexps (void *extra, bin_tree_t *node) { re_dfa_t *dfa = (re_dfa_t *) extra; if (node->token.type == OP_BACK_REF && dfa->subexp_map) { int idx = node->token.opr.idx; node->token.opr.idx = dfa->subexp_map[idx]; dfa->used_bkref_map |= 1 << node->token.opr.idx; } else if (node->token.type == SUBEXP && node->left && node->left->token.type == SUBEXP) { int other_idx = node->left->token.opr.idx; node->left = node->left->left; if (node->left) node->left->parent = node; dfa->subexp_map[other_idx] = dfa->subexp_map[node->token.opr.idx]; if (other_idx < (sizeof (bitset_word_t) * 8)) dfa->used_bkref_map &= ~((bitset_word_t) 1 << other_idx); } return REG_NOERROR; } static reg_errcode_t lower_subexps (void *extra, bin_tree_t *node) { regex_t *preg = (regex_t *) extra; reg_errcode_t err = REG_NOERROR; if (node->left && node->left->token.type == SUBEXP) { node->left = lower_subexp (&err, preg, node->left); if (node->left) node->left->parent = node; } if (node->right && node->right->token.type == SUBEXP) { node->right = lower_subexp (&err, preg, node->right); if (node->right) node->right->parent = node; } return err; } static bin_tree_t * lower_subexp (reg_errcode_t *err, regex_t *preg, bin_tree_t *node) { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_t *body = node->left; bin_tree_t *op, *cls, *tree1, *tree; if (preg->no_sub && node->left != ((void *)0) && (node->token.opr.idx >= (sizeof (bitset_word_t) * 8) || !(dfa->used_bkref_map & ((bitset_word_t) 1 << node->token.opr.idx)))) return node->left; op = create_tree (dfa, ((void *)0), ((void *)0), OP_OPEN_SUBEXP); cls = create_tree (dfa, ((void *)0), ((void *)0), OP_CLOSE_SUBEXP); tree1 = body ? create_tree (dfa, body, cls, CONCAT) : cls; tree = create_tree (dfa, op, tree1, CONCAT); if (__builtin_expect (tree == ((void *)0) || tree1 == ((void *)0) || op == ((void *)0) || cls == ((void *)0), 0)) { *err = REG_ESPACE; return ((void *)0); } op->token.opr.idx = cls->token.opr.idx = node->token.opr.idx; op->token.opt_subexp = cls->token.opt_subexp = node->token.opt_subexp; return tree; } static reg_errcode_t calc_first (void *extra, bin_tree_t *node) { re_dfa_t *dfa = (re_dfa_t *) extra; if (node->token.type == CONCAT) { node->first = node->left->first; node->node_idx = node->left->node_idx; } else { node->first = node; node->node_idx = re_dfa_add_node (dfa, node->token); if (__builtin_expect (node->node_idx == -1, 0)) return REG_ESPACE; } return REG_NOERROR; } static reg_errcode_t calc_next (void *extra, bin_tree_t *node) { switch (node->token.type) { case OP_DUP_ASTERISK: node->left->next = node; break; case CONCAT: node->left->next = node->right->first; node->right->next = node->next; break; default: if (node->left) node->left->next = node->next; if (node->right) node->right->next = node->next; break; } return REG_NOERROR; } static reg_errcode_t link_nfa_nodes (void *extra, bin_tree_t *node) { re_dfa_t *dfa = (re_dfa_t *) extra; int idx = node->node_idx; reg_errcode_t err = REG_NOERROR; switch (node->token.type) { case CONCAT: break; case END_OF_RE: ((node->next == ((void *)0)) ? (void) (0) : (__assert_fail ("node->next == ((void *)0)", "regcomp.c", 1362, __PRETTY_FUNCTION__), (void) (0))); break; case OP_DUP_ASTERISK: case OP_ALT: { int left, right; dfa->has_plural_match = 1; if (node->left != ((void *)0)) left = node->left->first->node_idx; else left = node->next->node_idx; if (node->right != ((void *)0)) right = node->right->first->node_idx; else right = node->next->node_idx; ((left > -1) ? (void) (0) : (__assert_fail ("left > -1", "regcomp.c", 1378, __PRETTY_FUNCTION__), (void) (0))); ((right > -1) ? (void) (0) : (__assert_fail ("right > -1", "regcomp.c", 1379, __PRETTY_FUNCTION__), (void) (0))); err = re_node_set_init_2 (dfa->edests + idx, left, right); } break; case ANCHOR: case OP_OPEN_SUBEXP: case OP_CLOSE_SUBEXP: err = re_node_set_init_1 (dfa->edests + idx, node->next->node_idx); break; case OP_BACK_REF: dfa->nexts[idx] = node->next->node_idx; if (node->token.type == OP_BACK_REF) re_node_set_init_1 (dfa->edests + idx, dfa->nexts[idx]); break; default: ((!((node->token.type) & 8)) ? (void) (0) : (__assert_fail ("!((node->token.type) & 8)", "regcomp.c", 1397, __PRETTY_FUNCTION__), (void) (0))); dfa->nexts[idx] = node->next->node_idx; break; } return err; } static reg_errcode_t duplicate_node_closure (re_dfa_t *dfa, int top_org_node, int top_clone_node, int root_node, unsigned int init_constraint) { int org_node, clone_node, ret; unsigned int constraint = init_constraint; for (org_node = top_org_node, clone_node = top_clone_node;;) { int org_dest, clone_dest; if (dfa->nodes[org_node].type == OP_BACK_REF) { org_dest = dfa->nexts[org_node]; ((dfa->edests + clone_node)->nelem = 0); clone_dest = duplicate_node (dfa, org_dest, constraint); if (__builtin_expect (clone_dest == -1, 0)) return REG_ESPACE; dfa->nexts[clone_node] = dfa->nexts[org_node]; ret = re_node_set_insert (dfa->edests + clone_node, clone_dest); if (__builtin_expect (ret < 0, 0)) return REG_ESPACE; } else if (dfa->edests[org_node].nelem == 0) { dfa->nexts[clone_node] = dfa->nexts[org_node]; break; } else if (dfa->edests[org_node].nelem == 1) { org_dest = dfa->edests[org_node].elems[0]; ((dfa->edests + clone_node)->nelem = 0); if (dfa->nodes[org_node].type == ANCHOR) { if (org_node == root_node && clone_node != org_node) { ret = re_node_set_insert (dfa->edests + clone_node, org_dest); if (__builtin_expect (ret < 0, 0)) return REG_ESPACE; break; } constraint |= dfa->nodes[org_node].opr.ctx_type; } clone_dest = duplicate_node (dfa, org_dest, constraint); if (__builtin_expect (clone_dest == -1, 0)) return REG_ESPACE; ret = re_node_set_insert (dfa->edests + clone_node, clone_dest); if (__builtin_expect (ret < 0, 0)) return REG_ESPACE; } else { org_dest = dfa->edests[org_node].elems[0]; ((dfa->edests + clone_node)->nelem = 0); clone_dest = search_duplicated_node (dfa, org_dest, constraint); if (clone_dest == -1) { reg_errcode_t err; clone_dest = duplicate_node (dfa, org_dest, constraint); if (__builtin_expect (clone_dest == -1, 0)) return REG_ESPACE; ret = re_node_set_insert (dfa->edests + clone_node, clone_dest); if (__builtin_expect (ret < 0, 0)) return REG_ESPACE; err = duplicate_node_closure (dfa, org_dest, clone_dest, root_node, constraint); if (__builtin_expect (err != REG_NOERROR, 0)) return err; } else { ret = re_node_set_insert (dfa->edests + clone_node, clone_dest); if (__builtin_expect (ret < 0, 0)) return REG_ESPACE; } org_dest = dfa->edests[org_node].elems[1]; clone_dest = duplicate_node (dfa, org_dest, constraint); if (__builtin_expect (clone_dest == -1, 0)) return REG_ESPACE; ret = re_node_set_insert (dfa->edests + clone_node, clone_dest); if (__builtin_expect (ret < 0, 0)) return REG_ESPACE; } org_node = org_dest; clone_node = clone_dest; } return REG_NOERROR; } static int search_duplicated_node (const re_dfa_t *dfa, int org_node, unsigned int constraint) { int idx; for (idx = dfa->nodes_len - 1; dfa->nodes[idx].duplicated && idx > 0; --idx) { if (org_node == dfa->org_indices[idx] && constraint == dfa->nodes[idx].constraint) return idx; } return -1; } static int duplicate_node (re_dfa_t *dfa, int org_idx, unsigned int constraint) { int dup_idx = re_dfa_add_node (dfa, dfa->nodes[org_idx]); if (__builtin_expect (dup_idx != -1, 1)) { dfa->nodes[dup_idx].constraint = constraint; if (dfa->nodes[org_idx].type == ANCHOR) dfa->nodes[dup_idx].constraint |= dfa->nodes[org_idx].opr.ctx_type; dfa->nodes[dup_idx].duplicated = 1; dfa->org_indices[dup_idx] = org_idx; } return dup_idx; } static reg_errcode_t calc_inveclosure (re_dfa_t *dfa) { int src, idx, ret; for (idx = 0; idx < dfa->nodes_len; ++idx) memset (dfa->inveclosures + idx, '\0', sizeof (re_node_set)); for (src = 0; src < dfa->nodes_len; ++src) { int *elems = dfa->eclosures[src].elems; for (idx = 0; idx < dfa->eclosures[src].nelem; ++idx) { ret = re_node_set_insert_last (dfa->inveclosures + elems[idx], src); if (__builtin_expect (ret == -1, 0)) return REG_ESPACE; } } return REG_NOERROR; } static reg_errcode_t calc_eclosure (re_dfa_t *dfa) { int node_idx, incomplete; incomplete = 0; for (node_idx = 0; ; ++node_idx) { reg_errcode_t err; re_node_set eclosure_elem; if (node_idx == dfa->nodes_len) { if (!incomplete) break; incomplete = 0; node_idx = 0; } if (dfa->eclosures[node_idx].nelem != 0) continue; err = calc_eclosure_iter (&eclosure_elem, dfa, node_idx, 1); if (__builtin_expect (err != REG_NOERROR, 0)) return err; if (dfa->eclosures[node_idx].nelem == 0) { incomplete = 1; free ((&eclosure_elem)->elems); } } return REG_NOERROR; } static reg_errcode_t calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, int node, int root) { reg_errcode_t err; unsigned int constraint; int i, incomplete; re_node_set eclosure; incomplete = 0; err = re_node_set_alloc (&eclosure, dfa->edests[node].nelem + 1); if (__builtin_expect (err != REG_NOERROR, 0)) return err; dfa->eclosures[node].nelem = -1; constraint = ((dfa->nodes[node].type == ANCHOR) ? dfa->nodes[node].opr.ctx_type : 0); if (constraint && dfa->edests[node].nelem && !dfa->nodes[dfa->edests[node].elems[0]].duplicated) { err = duplicate_node_closure (dfa, node, node, node, constraint); if (__builtin_expect (err != REG_NOERROR, 0)) return err; } if (((dfa->nodes[node].type) & 8)) for (i = 0; i < dfa->edests[node].nelem; ++i) { re_node_set eclosure_elem; int edest = dfa->edests[node].elems[i]; if (dfa->eclosures[edest].nelem == -1) { incomplete = 1; continue; } if (dfa->eclosures[edest].nelem == 0) { err = calc_eclosure_iter (&eclosure_elem, dfa, edest, 0); if (__builtin_expect (err != REG_NOERROR, 0)) return err; } else eclosure_elem = dfa->eclosures[edest]; re_node_set_merge (&eclosure, &eclosure_elem); if (dfa->eclosures[edest].nelem == 0) { incomplete = 1; free ((&eclosure_elem)->elems); } } re_node_set_insert (&eclosure, node); if (incomplete && !root) dfa->eclosures[node].nelem = 0; else dfa->eclosures[node] = eclosure; *new_set = eclosure; return REG_NOERROR; } static void fetch_token (re_token_t *result, re_string_t *input, reg_syntax_t syntax) { ((input)->cur_idx += (peek_token (result, input, syntax))); } static int peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax) { unsigned char c; if (((input)->stop <= (input)->cur_idx)) { token->type = END_OF_RE; return 0; } c = ((input)->mbs[(input)->cur_idx + 0]); token->opr.c = c; token->word_char = 0; token->mb_partial = 0; if (input->mb_cur_max > 1 && !((((input)->cur_idx)) == (input)->valid_len || (input)->wcs[((input)->cur_idx)] != (0xffffffffu))) { token->type = CHARACTER; token->mb_partial = 1; return 1; } if (c == '\\') { unsigned char c2; if (((input)->cur_idx) + 1 >= ((input)->len)) { token->type = BACK_SLASH; return 1; } c2 = re_string_peek_byte_case (input, 1); token->opr.c = c2; token->type = CHARACTER; if (input->mb_cur_max > 1) { wint_t wc = re_string_wchar_at (input, ((input)->cur_idx) + 1); token->word_char = (iswalnum (wc) || (wc) == L'_') != 0; } else token->word_char = (((*__ctype_b_loc ())[(int) ((c2))] & (unsigned short int) _ISalnum) || (c2) == '_') != 0; switch (c2) { case '|': if (!(syntax & ((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) && !(syntax & (((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1))) token->type = OP_ALT; break; case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (!(syntax & ((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1))) { token->type = OP_BACK_REF; token->opr.idx = c2 - '1'; } break; case '<': if (!(syntax & (((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1))) { token->type = ANCHOR; token->opr.ctx_type = WORD_FIRST; } break; case '>': if (!(syntax & (((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1))) { token->type = ANCHOR; token->opr.ctx_type = WORD_LAST; } break; case 'b': if (!(syntax & (((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1))) { token->type = ANCHOR; token->opr.ctx_type = WORD_DELIM; } break; case 'B': if (!(syntax & (((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1))) { token->type = ANCHOR; token->opr.ctx_type = NOT_WORD_DELIM; } break; case 'w': if (!(syntax & (((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1))) token->type = OP_WORD; break; case 'W': if (!(syntax & (((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1))) token->type = OP_NOTWORD; break; case 's': if (!(syntax & (((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1))) token->type = OP_SPACE; break; case 'S': if (!(syntax & (((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1))) token->type = OP_NOTSPACE; break; case '`': if (!(syntax & (((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1))) { token->type = ANCHOR; token->opr.ctx_type = BUF_FIRST; } break; case '\'': if (!(syntax & (((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1))) { token->type = ANCHOR; token->opr.ctx_type = BUF_LAST; } break; case '(': if (!(syntax & (((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1))) token->type = OP_OPEN_SUBEXP; break; case ')': if (!(syntax & (((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1))) token->type = OP_CLOSE_SUBEXP; break; case '+': if (!(syntax & ((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) && (syntax & (((unsigned long int) 1) << 1))) token->type = OP_DUP_PLUS; break; case '?': if (!(syntax & ((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) && (syntax & (((unsigned long int) 1) << 1))) token->type = OP_DUP_QUESTION; break; case '{': if ((syntax & (((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) && (!(syntax & ((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)))) token->type = OP_OPEN_DUP_NUM; break; case '}': if ((syntax & (((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) && (!(syntax & ((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)))) token->type = OP_CLOSE_DUP_NUM; break; default: break; } return 2; } token->type = CHARACTER; if (input->mb_cur_max > 1) { wint_t wc = re_string_wchar_at (input, ((input)->cur_idx)); token->word_char = (iswalnum (wc) || (wc) == L'_') != 0; } else token->word_char = (((*__ctype_b_loc ())[(int) ((token->opr.c))] & (unsigned short int) _ISalnum) || (token->opr.c) == '_'); switch (c) { case '\n': if (syntax & (((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) token->type = OP_ALT; break; case '|': if (!(syntax & ((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) && (syntax & (((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1))) token->type = OP_ALT; break; case '*': token->type = OP_DUP_ASTERISK; break; case '+': if (!(syntax & ((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) && !(syntax & (((unsigned long int) 1) << 1))) token->type = OP_DUP_PLUS; break; case '?': if (!(syntax & ((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) && !(syntax & (((unsigned long int) 1) << 1))) token->type = OP_DUP_QUESTION; break; case '{': if ((syntax & (((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) && (syntax & ((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1))) token->type = OP_OPEN_DUP_NUM; break; case '}': if ((syntax & (((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) && (syntax & ((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1))) token->type = OP_CLOSE_DUP_NUM; break; case '(': if (syntax & (((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) token->type = OP_OPEN_SUBEXP; break; case ')': if (syntax & (((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) token->type = OP_CLOSE_SUBEXP; break; case '[': token->type = OP_OPEN_BRACKET; break; case '.': token->type = OP_PERIOD; break; case '^': if (!(syntax & ((((((unsigned long int) 1) << 1) << 1) << 1) | (((((((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1))) && ((input)->cur_idx) != 0) { char prev = ((input)->mbs[(input)->cur_idx + -1]); if (!(syntax & (((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) || prev != '\n') break; } token->type = ANCHOR; token->opr.ctx_type = LINE_FIRST; break; case '$': if (!(syntax & (((((unsigned long int) 1) << 1) << 1) << 1)) && ((input)->cur_idx) + 1 != ((input)->len)) { re_token_t next; ((input)->cur_idx += (1)); peek_token (&next, input, syntax); ((input)->cur_idx += (-1)); if (next.type != OP_ALT && next.type != OP_CLOSE_SUBEXP) break; } token->type = ANCHOR; token->opr.ctx_type = LINE_LAST; break; default: break; } return 1; } static int peek_token_bracket (re_token_t *token, re_string_t *input, reg_syntax_t syntax) { unsigned char c; if (((input)->stop <= (input)->cur_idx)) { token->type = END_OF_RE; return 0; } c = ((input)->mbs[(input)->cur_idx + 0]); token->opr.c = c; if (input->mb_cur_max > 1 && !((((input)->cur_idx)) == (input)->valid_len || (input)->wcs[((input)->cur_idx)] != (0xffffffffu))) { token->type = CHARACTER; return 1; } if (c == '\\' && (syntax & ((unsigned long int) 1)) && ((input)->cur_idx) + 1 < ((input)->len)) { unsigned char c2; ((input)->cur_idx += (1)); c2 = ((input)->mbs[(input)->cur_idx + 0]); token->opr.c = c2; token->type = CHARACTER; return 1; } if (c == '[') { unsigned char c2; int token_len; if (((input)->cur_idx) + 1 < ((input)->len)) c2 = ((input)->mbs[(input)->cur_idx + 1]); else c2 = 0; token->opr.c = c2; token_len = 2; switch (c2) { case '.': token->type = OP_OPEN_COLL_ELEM; break; case '=': token->type = OP_OPEN_EQUIV_CLASS; break; case ':': if (syntax & ((((unsigned long int) 1) << 1) << 1)) { token->type = OP_OPEN_CHAR_CLASS; break; } default: token->type = CHARACTER; token->opr.c = c; token_len = 1; break; } return token_len; } switch (c) { case '-': token->type = OP_CHARSET_RANGE; break; case ']': token->type = OP_CLOSE_BRACKET; break; case '^': token->type = OP_NON_MATCH_LIST; break; default: token->type = CHARACTER; } return 1; } # 2047 "regcomp.c" static bin_tree_t * parse (re_string_t *regexp, regex_t *preg, reg_syntax_t syntax, reg_errcode_t *err) { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_t *tree, *eor, *root; re_token_t current_token; dfa->syntax = syntax; fetch_token (¤t_token, regexp, syntax | (((((((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)); tree = parse_reg_exp (regexp, preg, ¤t_token, syntax, 0, err); if (__builtin_expect (*err != REG_NOERROR && tree == ((void *)0), 0)) return ((void *)0); eor = create_tree (dfa, ((void *)0), ((void *)0), END_OF_RE); if (tree != ((void *)0)) root = create_tree (dfa, tree, eor, CONCAT); else root = eor; if (__builtin_expect (eor == ((void *)0) || root == ((void *)0), 0)) { *err = REG_ESPACE; return ((void *)0); } return root; } # 2081 "regcomp.c" static bin_tree_t * parse_reg_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, int nest, reg_errcode_t *err) { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_t *tree, *branch = ((void *)0); tree = parse_branch (regexp, preg, token, syntax, nest, err); if (__builtin_expect (*err != REG_NOERROR && tree == ((void *)0), 0)) return ((void *)0); while (token->type == OP_ALT) { fetch_token (token, regexp, syntax | (((((((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)); if (token->type != OP_ALT && token->type != END_OF_RE && (nest == 0 || token->type != OP_CLOSE_SUBEXP)) { branch = parse_branch (regexp, preg, token, syntax, nest, err); if (__builtin_expect (*err != REG_NOERROR && branch == ((void *)0), 0)) return ((void *)0); } else branch = ((void *)0); tree = create_tree (dfa, tree, branch, OP_ALT); if (__builtin_expect (tree == ((void *)0), 0)) { *err = REG_ESPACE; return ((void *)0); } } return tree; } # 2122 "regcomp.c" static bin_tree_t * parse_branch (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, int nest, reg_errcode_t *err) { bin_tree_t *tree, *exp; re_dfa_t *dfa = (re_dfa_t *) preg->buffer; tree = parse_expression (regexp, preg, token, syntax, nest, err); if (__builtin_expect (*err != REG_NOERROR && tree == ((void *)0), 0)) return ((void *)0); while (token->type != OP_ALT && token->type != END_OF_RE && (nest == 0 || token->type != OP_CLOSE_SUBEXP)) { exp = parse_expression (regexp, preg, token, syntax, nest, err); if (__builtin_expect (*err != REG_NOERROR && exp == ((void *)0), 0)) { return ((void *)0); } if (tree != ((void *)0) && exp != ((void *)0)) { tree = create_tree (dfa, tree, exp, CONCAT); if (tree == ((void *)0)) { *err = REG_ESPACE; return ((void *)0); } } else if (tree == ((void *)0)) tree = exp; } return tree; } static bin_tree_t * parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, int nest, reg_errcode_t *err) { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_t *tree; switch (token->type) { case CHARACTER: tree = create_token_tree (dfa, ((void *)0), ((void *)0), token); if (__builtin_expect (tree == ((void *)0), 0)) { *err = REG_ESPACE; return ((void *)0); } if (dfa->mb_cur_max > 1) { while (!((regexp)->stop <= (regexp)->cur_idx) && !((((regexp)->cur_idx)) == (regexp)->valid_len || (regexp)->wcs[((regexp)->cur_idx)] != (0xffffffffu))) { bin_tree_t *mbc_remain; fetch_token (token, regexp, syntax); mbc_remain = create_token_tree (dfa, ((void *)0), ((void *)0), token); tree = create_tree (dfa, tree, mbc_remain, CONCAT); if (__builtin_expect (mbc_remain == ((void *)0) || tree == ((void *)0), 0)) { *err = REG_ESPACE; return ((void *)0); } } } break; case OP_OPEN_SUBEXP: tree = parse_sub_exp (regexp, preg, token, syntax, nest + 1, err); if (__builtin_expect (*err != REG_NOERROR && tree == ((void *)0), 0)) return ((void *)0); break; case OP_OPEN_BRACKET: tree = parse_bracket_exp (regexp, dfa, token, syntax, err); if (__builtin_expect (*err != REG_NOERROR && tree == ((void *)0), 0)) return ((void *)0); break; case OP_BACK_REF: if (!__builtin_expect (dfa->completed_bkref_map & (1 << token->opr.idx), 1)) { *err = REG_ESUBREG; return ((void *)0); } dfa->used_bkref_map |= 1 << token->opr.idx; tree = create_token_tree (dfa, ((void *)0), ((void *)0), token); if (__builtin_expect (tree == ((void *)0), 0)) { *err = REG_ESPACE; return ((void *)0); } ++dfa->nbackref; dfa->has_mb_node = 1; break; case OP_OPEN_DUP_NUM: if (syntax & ((((((((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) { *err = REG_BADRPT; return ((void *)0); } case OP_DUP_ASTERISK: case OP_DUP_PLUS: case OP_DUP_QUESTION: if (syntax & (((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1)) { *err = REG_BADRPT; return ((void *)0); } else if (syntax & ((((((unsigned long int) 1) << 1) << 1) << 1) << 1)) { fetch_token (token, regexp, syntax); return parse_expression (regexp, preg, token, syntax, nest, err); } case OP_CLOSE_SUBEXP: if ((token->type == OP_CLOSE_SUBEXP) && !(syntax & (((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1))) { *err = REG_ERPAREN; return ((void *)0); } case OP_CLOSE_DUP_NUM: token->type = CHARACTER; tree = create_token_tree (dfa, ((void *)0), ((void *)0), token); if (__builtin_expect (tree == ((void *)0), 0)) { *err = REG_ESPACE; return ((void *)0); } break; case ANCHOR: if ((token->opr.ctx_type & (WORD_DELIM | NOT_WORD_DELIM | WORD_FIRST | WORD_LAST)) && dfa->word_ops_used == 0) init_word_char (dfa); if (token->opr.ctx_type == WORD_DELIM || token->opr.ctx_type == NOT_WORD_DELIM) { bin_tree_t *tree_first, *tree_last; if (token->opr.ctx_type == WORD_DELIM) { token->opr.ctx_type = WORD_FIRST; tree_first = create_token_tree (dfa, ((void *)0), ((void *)0), token); token->opr.ctx_type = WORD_LAST; } else { token->opr.ctx_type = INSIDE_WORD; tree_first = create_token_tree (dfa, ((void *)0), ((void *)0), token); token->opr.ctx_type = INSIDE_NOTWORD; } tree_last = create_token_tree (dfa, ((void *)0), ((void *)0), token); tree = create_tree (dfa, tree_first, tree_last, OP_ALT); if (__builtin_expect (tree_first == ((void *)0) || tree_last == ((void *)0) || tree == ((void *)0), 0)) { *err = REG_ESPACE; return ((void *)0); } } else { tree = create_token_tree (dfa, ((void *)0), ((void *)0), token); if (__builtin_expect (tree == ((void *)0), 0)) { *err = REG_ESPACE; return ((void *)0); } } fetch_token (token, regexp, syntax); return tree; case OP_PERIOD: tree = create_token_tree (dfa, ((void *)0), ((void *)0), token); if (__builtin_expect (tree == ((void *)0), 0)) { *err = REG_ESPACE; return ((void *)0); } if (dfa->mb_cur_max > 1) dfa->has_mb_node = 1; break; case OP_WORD: case OP_NOTWORD: tree = build_charclass_op (dfa, regexp->trans, (const unsigned char *) "alnum", (const unsigned char *) "_", token->type == OP_NOTWORD, err); if (__builtin_expect (*err != REG_NOERROR && tree == ((void *)0), 0)) return ((void *)0); break; case OP_SPACE: case OP_NOTSPACE: tree = build_charclass_op (dfa, regexp->trans, (const unsigned char *) "space", (const unsigned char *) "", token->type == OP_NOTSPACE, err); if (__builtin_expect (*err != REG_NOERROR && tree == ((void *)0), 0)) return ((void *)0); break; case OP_ALT: case END_OF_RE: return ((void *)0); case BACK_SLASH: *err = REG_EESCAPE; return ((void *)0); default: return ((void *)0); } fetch_token (token, regexp, syntax); while (token->type == OP_DUP_ASTERISK || token->type == OP_DUP_PLUS || token->type == OP_DUP_QUESTION || token->type == OP_OPEN_DUP_NUM) { tree = parse_dup_op (tree, regexp, dfa, token, syntax, err); if (__builtin_expect (*err != REG_NOERROR && tree == ((void *)0), 0)) return ((void *)0); if ((syntax & ((((((((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) && (token->type == OP_DUP_ASTERISK || token->type == OP_OPEN_DUP_NUM)) { *err = REG_BADRPT; return ((void *)0); } } return tree; } # 2378 "regcomp.c" static bin_tree_t * parse_sub_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, int nest, reg_errcode_t *err) { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_t *tree; size_t cur_nsub; cur_nsub = preg->re_nsub++; fetch_token (token, regexp, syntax | (((((((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)); if (token->type == OP_CLOSE_SUBEXP) tree = ((void *)0); else { tree = parse_reg_exp (regexp, preg, token, syntax, nest, err); if (__builtin_expect (*err == REG_NOERROR && token->type != OP_CLOSE_SUBEXP, 0)) *err = REG_EPAREN; if (__builtin_expect (*err != REG_NOERROR, 0)) return ((void *)0); } if (cur_nsub <= '9' - '1') dfa->completed_bkref_map |= 1 << cur_nsub; tree = create_tree (dfa, tree, ((void *)0), SUBEXP); if (__builtin_expect (tree == ((void *)0), 0)) { *err = REG_ESPACE; return ((void *)0); } tree->token.opr.idx = cur_nsub; return tree; } static bin_tree_t * parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, reg_syntax_t syntax, reg_errcode_t *err) { bin_tree_t *tree = ((void *)0), *old_tree = ((void *)0); int i, start, end, start_idx = ((regexp)->cur_idx); re_token_t start_token = *token; if (token->type == OP_OPEN_DUP_NUM) { end = 0; start = fetch_number (regexp, token, syntax); if (start == -1) { if (token->type == CHARACTER && token->opr.c == ',') start = 0; else { *err = REG_BADBR; return ((void *)0); } } if (__builtin_expect (start != -2, 1)) { end = ((token->type == OP_CLOSE_DUP_NUM) ? start : ((token->type == CHARACTER && token->opr.c == ',') ? fetch_number (regexp, token, syntax) : -2)); } if (__builtin_expect (start == -2 || end == -2, 0)) { if (__builtin_expect (!(syntax & (((((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)), 0)) { if (token->type == END_OF_RE) *err = REG_EBRACE; else *err = REG_BADBR; return ((void *)0); } ((regexp)->cur_idx = (start_idx)); *token = start_token; token->type = CHARACTER; return elem; } if (__builtin_expect (end != -1 && start > end, 0)) { *err = REG_BADBR; return ((void *)0); } } else { start = (token->type == OP_DUP_PLUS) ? 1 : 0; end = (token->type == OP_DUP_QUESTION) ? 1 : -1; } fetch_token (token, regexp, syntax); if (__builtin_expect (elem == ((void *)0), 0)) return ((void *)0); if (__builtin_expect (start == 0 && end == 0, 0)) { postorder (elem, free_tree, ((void *)0)); return ((void *)0); } if (__builtin_expect (start > 0, 0)) { tree = elem; for (i = 2; i <= start; ++i) { elem = duplicate_tree (elem, dfa); tree = create_tree (dfa, tree, elem, CONCAT); if (__builtin_expect (elem == ((void *)0) || tree == ((void *)0), 0)) goto parse_dup_op_espace; } if (start == end) return tree; elem = duplicate_tree (elem, dfa); old_tree = tree; } else old_tree = ((void *)0); if (elem->token.type == SUBEXP) postorder (elem, mark_opt_subexp, (void *) (long) elem->token.opr.idx); tree = create_tree (dfa, elem, ((void *)0), (end == -1 ? OP_DUP_ASTERISK : OP_ALT)); if (__builtin_expect (tree == ((void *)0), 0)) goto parse_dup_op_espace; for (i = start + 2; i <= end; ++i) { elem = duplicate_tree (elem, dfa); tree = create_tree (dfa, tree, elem, CONCAT); if (__builtin_expect (elem == ((void *)0) || tree == ((void *)0), 0)) goto parse_dup_op_espace; tree = create_tree (dfa, tree, ((void *)0), OP_ALT); if (__builtin_expect (tree == ((void *)0), 0)) goto parse_dup_op_espace; } if (old_tree) tree = create_tree (dfa, old_tree, tree, CONCAT); return tree; parse_dup_op_espace: *err = REG_ESPACE; return ((void *)0); } # 2700 "regcomp.c" static bin_tree_t * parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, reg_syntax_t syntax, reg_errcode_t *err) { const unsigned char *collseqmb; const char *collseqwc; uint32_t nrules; int32_t table_size; const int32_t *symb_table; const unsigned char *extra; auto inline int32_t __attribute__ ((always_inline)) seek_collating_symbol_entry (name, name_len) const unsigned char *name; size_t name_len; { int32_t hash = elem_hash ((const char *) name, name_len); int32_t elem = hash % table_size; if (symb_table[2 * elem] != 0) { int32_t second = hash % (table_size - 2) + 1; do { if (symb_table[2 * elem] == hash && name_len == extra[symb_table[2 * elem + 1]] && memcmp (name, &extra[symb_table[2 * elem + 1] + 1], name_len) == 0) { break; } elem += second; } while (symb_table[2 * elem] != 0); } return elem; } auto inline unsigned int __attribute__ ((always_inline)) lookup_collation_sequence_value (br_elem) bracket_elem_t *br_elem; { if (br_elem->type == SB_CHAR) { if (nrules == 0) return collseqmb[br_elem->opr.ch]; else { wint_t wc = __btowc (br_elem->opr.ch); return __collseq_table_lookup (collseqwc, wc); } } else if (br_elem->type == MB_CHAR) { return __collseq_table_lookup (collseqwc, br_elem->opr.wch); } else if (br_elem->type == COLL_SYM) { size_t sym_name_len = strlen ((char *) br_elem->opr.name); if (nrules != 0) { int32_t elem, idx; elem = seek_collating_symbol_entry (br_elem->opr.name, sym_name_len); if (symb_table[2 * elem] != 0) { idx = symb_table[2 * elem + 1]; idx += 1 + extra[idx]; idx += 1 + extra[idx]; idx = (idx + 3) & ~3; idx += sizeof (unsigned int); idx += sizeof (unsigned int) * (1 + *(unsigned int *) (extra + idx)); return *(unsigned int *) (extra + idx); } else if (symb_table[2 * elem] == 0 && sym_name_len == 1) { return collseqmb[br_elem->opr.name[0]]; } } else if (sym_name_len == 1) return collseqmb[br_elem->opr.name[0]]; } return (2147483647 * 2U + 1U); } # 2822 "regcomp.c" auto inline reg_errcode_t __attribute__ ((always_inline)) build_range_exp (sbcset, mbcset, range_alloc, start_elem, end_elem) re_charset_t *mbcset; int *range_alloc; bitset_t sbcset; bracket_elem_t *start_elem, *end_elem; { unsigned int ch; uint32_t start_collseq; uint32_t end_collseq; if (__builtin_expect (start_elem->type == EQUIV_CLASS || start_elem->type == CHAR_CLASS || end_elem->type == EQUIV_CLASS || end_elem->type == CHAR_CLASS, 0)) return REG_ERANGE; start_collseq = lookup_collation_sequence_value (start_elem); end_collseq = lookup_collation_sequence_value (end_elem); if (__builtin_expect (start_collseq == (2147483647 * 2U + 1U) || end_collseq == (2147483647 * 2U + 1U), 0)) return REG_ECOLLATE; if (__builtin_expect ((syntax & ((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) && start_collseq > end_collseq, 0)) return REG_ERANGE; if (nrules > 0 || dfa->mb_cur_max > 1) { if (__builtin_expect (*range_alloc == mbcset->nranges, 0)) { uint32_t *new_array_start; uint32_t *new_array_end; int new_nranges; new_nranges = 2 * mbcset->nranges + 1; new_array_start = ((uint32_t *) realloc (mbcset->range_starts, (new_nranges) * sizeof (uint32_t))); new_array_end = ((uint32_t *) realloc (mbcset->range_ends, (new_nranges) * sizeof (uint32_t))); if (__builtin_expect (new_array_start == ((void *)0) || new_array_end == ((void *)0), 0)) return REG_ESPACE; mbcset->range_starts = new_array_start; mbcset->range_ends = new_array_end; *range_alloc = new_nranges; } mbcset->range_starts[mbcset->nranges] = start_collseq; mbcset->range_ends[mbcset->nranges++] = end_collseq; } for (ch = 0; ch < 256; ch++) { uint32_t ch_collseq; if (nrules == 0) ch_collseq = collseqmb[ch]; else ch_collseq = __collseq_table_lookup (collseqwc, __btowc (ch)); if (start_collseq <= ch_collseq && ch_collseq <= end_collseq) (sbcset[ch / (sizeof (bitset_word_t) * 8)] |= (bitset_word_t) 1 << ch % (sizeof (bitset_word_t) * 8)); } return REG_NOERROR; } auto inline reg_errcode_t __attribute__ ((always_inline)) build_collating_symbol (sbcset, mbcset, coll_sym_alloc, name) re_charset_t *mbcset; int *coll_sym_alloc; bitset_t sbcset; const unsigned char *name; { int32_t elem, idx; size_t name_len = strlen ((const char *) name); if (nrules != 0) { elem = seek_collating_symbol_entry (name, name_len); if (symb_table[2 * elem] != 0) { idx = symb_table[2 * elem + 1]; idx += 1 + extra[idx]; } else if (symb_table[2 * elem] == 0 && name_len == 1) { (sbcset[name[0] / (sizeof (bitset_word_t) * 8)] |= (bitset_word_t) 1 << name[0] % (sizeof (bitset_word_t) * 8)); return REG_NOERROR; } else return REG_ECOLLATE; if (__builtin_expect (*coll_sym_alloc == mbcset->ncoll_syms, 0)) { int new_coll_sym_alloc = 2 * mbcset->ncoll_syms + 1; int32_t *new_coll_syms = ((int32_t *) realloc (mbcset->coll_syms, (new_coll_sym_alloc) * sizeof (int32_t))); if (__builtin_expect (new_coll_syms == ((void *)0), 0)) return REG_ESPACE; mbcset->coll_syms = new_coll_syms; *coll_sym_alloc = new_coll_sym_alloc; } mbcset->coll_syms[mbcset->ncoll_syms++] = idx; return REG_NOERROR; } else { if (__builtin_expect (name_len != 1, 0)) return REG_ECOLLATE; else { (sbcset[name[0] / (sizeof (bitset_word_t) * 8)] |= (bitset_word_t) 1 << name[0] % (sizeof (bitset_word_t) * 8)); return REG_NOERROR; } } } re_token_t br_token; re_bitset_ptr_t sbcset; re_charset_t *mbcset; int coll_sym_alloc = 0, range_alloc = 0, mbchar_alloc = 0; int equiv_class_alloc = 0, char_class_alloc = 0; int non_match = 0; bin_tree_t *work_tree; int token_len; int first_round = 1; collseqmb = (const unsigned char *) ((*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_COLLSEQMB) & 0xffff)].string); nrules = ((uint32_t) (*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_NRULES) & 0xffff)].word); if (nrules) { collseqwc = ((*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_COLLSEQWC) & 0xffff)].string); table_size = ((uint32_t) (*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_SYMB_HASH_SIZEMB) & 0xffff)].word); symb_table = (const int32_t *) ((*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_SYMB_TABLEMB) & 0xffff)].string); extra = (const unsigned char *) ((*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_SYMB_EXTRAMB) & 0xffff)].string); } sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1); mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1); if (__builtin_expect (sbcset == ((void *)0) || mbcset == ((void *)0), 0)) { *err = REG_ESPACE; return ((void *)0); } token_len = peek_token_bracket (token, regexp, syntax); if (__builtin_expect (token->type == END_OF_RE, 0)) { *err = REG_BADPAT; goto parse_bracket_exp_free_return; } if (token->type == OP_NON_MATCH_LIST) { mbcset->non_match = 1; non_match = 1; if (syntax & ((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) (sbcset['\0' / (sizeof (bitset_word_t) * 8)] |= (bitset_word_t) 1 << '\0' % (sizeof (bitset_word_t) * 8)); ((regexp)->cur_idx += (token_len)); token_len = peek_token_bracket (token, regexp, syntax); if (__builtin_expect (token->type == END_OF_RE, 0)) { *err = REG_BADPAT; goto parse_bracket_exp_free_return; } } if (token->type == OP_CLOSE_BRACKET) token->type = CHARACTER; while (1) { bracket_elem_t start_elem, end_elem; unsigned char start_name_buf[32]; unsigned char end_name_buf[32]; reg_errcode_t ret; int token_len2 = 0, is_range_exp = 0; re_token_t token2; start_elem.opr.name = start_name_buf; ret = parse_bracket_element (&start_elem, regexp, token, token_len, dfa, syntax, first_round); if (__builtin_expect (ret != REG_NOERROR, 0)) { *err = ret; goto parse_bracket_exp_free_return; } first_round = 0; token_len = peek_token_bracket (token, regexp, syntax); if (start_elem.type != CHAR_CLASS && start_elem.type != EQUIV_CLASS) { if (__builtin_expect (token->type == END_OF_RE, 0)) { *err = REG_EBRACK; goto parse_bracket_exp_free_return; } if (token->type == OP_CHARSET_RANGE) { ((regexp)->cur_idx += (token_len)); token_len2 = peek_token_bracket (&token2, regexp, syntax); if (__builtin_expect (token2.type == END_OF_RE, 0)) { *err = REG_EBRACK; goto parse_bracket_exp_free_return; } if (token2.type == OP_CLOSE_BRACKET) { ((regexp)->cur_idx += (-token_len)); token->type = CHARACTER; } else is_range_exp = 1; } } if (is_range_exp == 1) { end_elem.opr.name = end_name_buf; ret = parse_bracket_element (&end_elem, regexp, &token2, token_len2, dfa, syntax, 1); if (__builtin_expect (ret != REG_NOERROR, 0)) { *err = ret; goto parse_bracket_exp_free_return; } token_len = peek_token_bracket (token, regexp, syntax); *err = build_range_exp (sbcset, mbcset, &range_alloc, &start_elem, &end_elem); # 3111 "regcomp.c" if (__builtin_expect (*err != REG_NOERROR, 0)) goto parse_bracket_exp_free_return; } else { switch (start_elem.type) { case SB_CHAR: (sbcset[start_elem.opr.ch / (sizeof (bitset_word_t) * 8)] |= (bitset_word_t) 1 << start_elem.opr.ch % (sizeof (bitset_word_t) * 8)); break; case MB_CHAR: if (__builtin_expect (mbchar_alloc == mbcset->nmbchars, 0)) { wchar_t *new_mbchars; mbchar_alloc = 2 * mbcset->nmbchars + 1; new_mbchars = ((wchar_t *) realloc (mbcset->mbchars, (mbchar_alloc) * sizeof (wchar_t))); if (__builtin_expect (new_mbchars == ((void *)0), 0)) goto parse_bracket_exp_espace; mbcset->mbchars = new_mbchars; } mbcset->mbchars[mbcset->nmbchars++] = start_elem.opr.wch; break; case EQUIV_CLASS: *err = build_equiv_class (sbcset, mbcset, &equiv_class_alloc, start_elem.opr.name); if (__builtin_expect (*err != REG_NOERROR, 0)) goto parse_bracket_exp_free_return; break; case COLL_SYM: *err = build_collating_symbol (sbcset, mbcset, &coll_sym_alloc, start_elem.opr.name); if (__builtin_expect (*err != REG_NOERROR, 0)) goto parse_bracket_exp_free_return; break; case CHAR_CLASS: *err = build_charclass (regexp->trans, sbcset, mbcset, &char_class_alloc, start_elem.opr.name, syntax); if (__builtin_expect (*err != REG_NOERROR, 0)) goto parse_bracket_exp_free_return; break; default: ((0) ? (void) (0) : (__assert_fail ("0", "regcomp.c", 3168, __PRETTY_FUNCTION__), (void) (0))); break; } } if (__builtin_expect (token->type == END_OF_RE, 0)) { *err = REG_EBRACK; goto parse_bracket_exp_free_return; } if (token->type == OP_CLOSE_BRACKET) break; } ((regexp)->cur_idx += (token_len)); if (non_match) bitset_not (sbcset); if (dfa->mb_cur_max > 1) bitset_mask (sbcset, dfa->sb_char); if (mbcset->nmbchars || mbcset->ncoll_syms || mbcset->nequiv_classes || mbcset->nranges || (dfa->mb_cur_max > 1 && (mbcset->nchar_classes || mbcset->non_match))) { bin_tree_t *mbc_tree; int sbc_idx; dfa->has_mb_node = 1; br_token.type = COMPLEX_BRACKET; br_token.opr.mbcset = mbcset; mbc_tree = create_token_tree (dfa, ((void *)0), ((void *)0), &br_token); if (__builtin_expect (mbc_tree == ((void *)0), 0)) goto parse_bracket_exp_espace; for (sbc_idx = 0; sbc_idx < (256 / (sizeof (bitset_word_t) * 8)); ++sbc_idx) if (sbcset[sbc_idx]) break; if (sbc_idx < (256 / (sizeof (bitset_word_t) * 8))) { br_token.type = SIMPLE_BRACKET; br_token.opr.sbcset = sbcset; work_tree = create_token_tree (dfa, ((void *)0), ((void *)0), &br_token); if (__builtin_expect (work_tree == ((void *)0), 0)) goto parse_bracket_exp_espace; work_tree = create_tree (dfa, work_tree, mbc_tree, OP_ALT); if (__builtin_expect (work_tree == ((void *)0), 0)) goto parse_bracket_exp_espace; } else { free (sbcset); work_tree = mbc_tree; } } else { free_charset (mbcset); br_token.type = SIMPLE_BRACKET; br_token.opr.sbcset = sbcset; work_tree = create_token_tree (dfa, ((void *)0), ((void *)0), &br_token); if (__builtin_expect (work_tree == ((void *)0), 0)) goto parse_bracket_exp_espace; } return work_tree; parse_bracket_exp_espace: *err = REG_ESPACE; parse_bracket_exp_free_return: free (sbcset); free_charset (mbcset); return ((void *)0); } static reg_errcode_t parse_bracket_element (bracket_elem_t *elem, re_string_t *regexp, re_token_t *token, int token_len, re_dfa_t *dfa, reg_syntax_t syntax, int accept_hyphen) { int cur_char_size; cur_char_size = re_string_char_size_at (regexp, ((regexp)->cur_idx)); if (cur_char_size > 1) { elem->type = MB_CHAR; elem->opr.wch = re_string_wchar_at (regexp, ((regexp)->cur_idx)); ((regexp)->cur_idx += (cur_char_size)); return REG_NOERROR; } ((regexp)->cur_idx += (token_len)); if (token->type == OP_OPEN_COLL_ELEM || token->type == OP_OPEN_CHAR_CLASS || token->type == OP_OPEN_EQUIV_CLASS) return parse_bracket_symbol (elem, regexp, token); if (__builtin_expect (token->type == OP_CHARSET_RANGE, 0) && !accept_hyphen) { re_token_t token2; (void) peek_token_bracket (&token2, regexp, syntax); if (token2.type != OP_CLOSE_BRACKET) return REG_ERANGE; } elem->type = SB_CHAR; elem->opr.ch = token->opr.c; return REG_NOERROR; } static reg_errcode_t parse_bracket_symbol (bracket_elem_t *elem, re_string_t *regexp, re_token_t *token) { unsigned char ch, delim = token->opr.c; int i = 0; if (((regexp)->stop <= (regexp)->cur_idx)) return REG_EBRACK; for (;; ++i) { if (i >= 32) return REG_EBRACK; if (token->type == OP_OPEN_CHAR_CLASS) ch = re_string_fetch_byte_case (regexp); else ch = ((regexp)->mbs[(regexp)->cur_idx++]); if (((regexp)->stop <= (regexp)->cur_idx)) return REG_EBRACK; if (ch == delim && ((regexp)->mbs[(regexp)->cur_idx + 0]) == ']') break; elem->opr.name[i] = ch; } ((regexp)->cur_idx += (1)); elem->opr.name[i] = '\0'; switch (token->type) { case OP_OPEN_COLL_ELEM: elem->type = COLL_SYM; break; case OP_OPEN_EQUIV_CLASS: elem->type = EQUIV_CLASS; break; case OP_OPEN_CHAR_CLASS: elem->type = CHAR_CLASS; break; default: break; } return REG_NOERROR; } static reg_errcode_t build_equiv_class (bitset_t sbcset, re_charset_t *mbcset, int *equiv_class_alloc, const unsigned char *name) { uint32_t nrules = ((uint32_t) (*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_NRULES) & 0xffff)].word); if (nrules != 0) { const int32_t *table, *indirect; const unsigned char *weights, *extra, *cp; unsigned char char_buf[2]; int32_t idx1, idx2; unsigned int ch; size_t len; # 1 "../locale/weight.h" 1 # 21 "../locale/weight.h" auto inline int32_t __attribute__ ((always_inline)) findidx (const unsigned char **cpp) { int_fast32_t i = table[*(*cpp)++]; const unsigned char *cp; const unsigned char *usrc; if (i >= 0) return i; cp = &extra[-i]; usrc = *cpp; while (1) { size_t nhere; i = *((const int32_t *) cp); cp += sizeof (int32_t); nhere = *cp++; if (i >= 0) { size_t cnt; for (cnt = 0; cnt < nhere; ++cnt) if (cp[cnt] != usrc[cnt]) break; if (cnt == nhere) { *cpp += nhere; return i; } cp += nhere; if ((1 + nhere) % __alignof__ (int32_t) != 0) cp += __alignof__ (int32_t) - (1 + nhere) % __alignof__ (int32_t); } else { size_t cnt; size_t offset = 0; for (cnt = 0; cnt < nhere; ++cnt) if (cp[cnt] != usrc[cnt]) break; if (cnt != nhere) { if (cp[cnt] > usrc[cnt]) { cp += 2 * nhere; if ((1 + 2 * nhere) % __alignof__ (int32_t) != 0) cp += (__alignof__ (int32_t) - (1 + 2 * nhere) % __alignof__ (int32_t)); continue; } for (cnt = 0; cnt < nhere; ++cnt) if (cp[nhere + cnt] != usrc[cnt]) break; if (cnt != nhere && cp[nhere + cnt] < usrc[cnt]) { cp += 2 * nhere; if ((1 + 2 * nhere) % __alignof__ (int32_t) != 0) cp += (__alignof__ (int32_t) - (1 + 2 * nhere) % __alignof__ (int32_t)); continue; } for (cnt = 0; cp[cnt] == usrc[cnt]; ++cnt); do { offset <<= 8; offset += usrc[cnt] - cp[cnt]; } while (++cnt < nhere); } *cpp += nhere; return indirect[-i + offset]; } } return 0x43219876; } # 3364 "regcomp.c" 2 cp = name; table = (const int32_t *) ((*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_TABLEMB) & 0xffff)].string); weights = (const unsigned char *) ((*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_WEIGHTMB) & 0xffff)].string); extra = (const unsigned char *) ((*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_EXTRAMB) & 0xffff)].string); indirect = (const int32_t *) ((*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_INDIRECTMB) & 0xffff)].string); idx1 = findidx (&cp); if (__builtin_expect (idx1 == 0 || cp < name + strlen ((const char *) name), 0)) return REG_ECOLLATE; char_buf[1] = (unsigned char) '\0'; len = weights[idx1]; for (ch = 0; ch < 256; ++ch) { char_buf[0] = ch; cp = char_buf; idx2 = findidx (&cp); if (idx2 == 0) continue; if (len == weights[idx2]) { int cnt = 0; while (cnt <= len && weights[idx1 + 1 + cnt] == weights[idx2 + 1 + cnt]) ++cnt; if (cnt > len) (sbcset[ch / (sizeof (bitset_word_t) * 8)] |= (bitset_word_t) 1 << ch % (sizeof (bitset_word_t) * 8)); } } if (__builtin_expect (*equiv_class_alloc == mbcset->nequiv_classes, 0)) { int new_equiv_class_alloc = 2 * mbcset->nequiv_classes + 1; int32_t *new_equiv_classes = ((int32_t *) realloc (mbcset->equiv_classes, (new_equiv_class_alloc) * sizeof (int32_t))); if (__builtin_expect (new_equiv_classes == ((void *)0), 0)) return REG_ESPACE; mbcset->equiv_classes = new_equiv_classes; *equiv_class_alloc = new_equiv_class_alloc; } mbcset->equiv_classes[mbcset->nequiv_classes++] = idx1; } else { if (__builtin_expect (strlen ((const char *) name) != 1, 0)) return REG_ECOLLATE; (sbcset[*name / (sizeof (bitset_word_t) * 8)] |= (bitset_word_t) 1 << *name % (sizeof (bitset_word_t) * 8)); } return REG_NOERROR; } static reg_errcode_t build_charclass (unsigned char * trans, bitset_t sbcset, re_charset_t *mbcset, int *char_class_alloc, const unsigned char *class_name, reg_syntax_t syntax) { int i; const char *name = (const char *) class_name; if ((syntax & ((((((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) && (__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (name) && __builtin_constant_p ("upper") && (__s1_len = strlen (name), __s2_len = strlen ("upper"), (!((size_t)(const void *)((name) + 1) - (size_t)(const void *)(name) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("upper") + 1) - (size_t)(const void *)("upper") == 1) || __s2_len >= 4)) ? __builtin_strcmp (name, "upper") : (__builtin_constant_p (name) && ((size_t)(const void *)((name) + 1) - (size_t)(const void *)(name) == 1) && (__s1_len = strlen (name), __s1_len < 4) ? (__builtin_constant_p ("upper") && ((size_t)(const void *)(("upper") + 1) - (size_t)(const void *)("upper") == 1) ? __builtin_strcmp (name, "upper") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("upper"); register int __result = (((__const unsigned char *) (__const char *) (name))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (name))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (name))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (name))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("upper") && ((size_t)(const void *)(("upper") + 1) - (size_t)(const void *)("upper") == 1) && (__s2_len = strlen ("upper"), __s2_len < 4) ? (__builtin_constant_p (name) && ((size_t)(const void *)((name) + 1) - (size_t)(const void *)(name) == 1) ? __builtin_strcmp (name, "upper") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (name); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("upper"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("upper"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("upper"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("upper"))[3]); } } __result; }))) : __builtin_strcmp (name, "upper")))); }) == 0 || __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (name) && __builtin_constant_p ("lower") && (__s1_len = strlen (name), __s2_len = strlen ("lower"), (!((size_t)(const void *)((name) + 1) - (size_t)(const void *)(name) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("lower") + 1) - (size_t)(const void *)("lower") == 1) || __s2_len >= 4)) ? __builtin_strcmp (name, "lower") : (__builtin_constant_p (name) && ((size_t)(const void *)((name) + 1) - (size_t)(const void *)(name) == 1) && (__s1_len = strlen (name), __s1_len < 4) ? (__builtin_constant_p ("lower") && ((size_t)(const void *)(("lower") + 1) - (size_t)(const void *)("lower") == 1) ? __builtin_strcmp (name, "lower") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("lower"); register int __result = (((__const unsigned char *) (__const char *) (name))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (name))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (name))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (name))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("lower") && ((size_t)(const void *)(("lower") + 1) - (size_t)(const void *)("lower") == 1) && (__s2_len = strlen ("lower"), __s2_len < 4) ? (__builtin_constant_p (name) && ((size_t)(const void *)((name) + 1) - (size_t)(const void *)(name) == 1) ? __builtin_strcmp (name, "lower") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (name); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("lower"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("lower"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("lower"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("lower"))[3]); } } __result; }))) : __builtin_strcmp (name, "lower")))); }) == 0)) name = "alpha"; if (__builtin_expect (*char_class_alloc == mbcset->nchar_classes, 0)) { int new_char_class_alloc = 2 * mbcset->nchar_classes + 1; wctype_t *new_char_classes = ((wctype_t *) realloc (mbcset->char_classes, (new_char_class_alloc) * sizeof (wctype_t))); if (__builtin_expect (new_char_classes == ((void *)0), 0)) return REG_ESPACE; mbcset->char_classes = new_char_classes; *char_class_alloc = new_char_class_alloc; } mbcset->char_classes[mbcset->nchar_classes++] = __wctype (name); # 3489 "regcomp.c" if (__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (name) && __builtin_constant_p ("alnum") && (__s1_len = strlen (name), __s2_len = strlen ("alnum"), (!((size_t)(const void *)((name) + 1) - (size_t)(const void *)(name) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("alnum") + 1) - (size_t)(const void *)("alnum") == 1) || __s2_len >= 4)) ? __builtin_strcmp (name, "alnum") : (__builtin_constant_p (name) && ((size_t)(const void *)((name) + 1) - (size_t)(const void *)(name) == 1) && (__s1_len = strlen (name), __s1_len < 4) ? (__builtin_constant_p ("alnum") && ((size_t)(const void *)(("alnum") + 1) - (size_t)(const void *)("alnum") == 1) ? __builtin_strcmp (name, "alnum") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("alnum"); register int __result = (((__const unsigned char *) (__const char *) (name))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (name))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (name))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (name))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("alnum") && ((size_t)(const void *)(("alnum") + 1) - (size_t)(const void *)("alnum") == 1) && (__s2_len = strlen ("alnum"), __s2_len < 4) ? (__builtin_constant_p (name) && ((size_t)(const void *)((name) + 1) - (size_t)(const void *)(name) == 1) ? __builtin_strcmp (name, "alnum") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (name); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("alnum"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("alnum"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("alnum"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("alnum"))[3]); } } __result; }))) : __builtin_strcmp (name, "alnum")))); }) == 0) do { if (__builtin_expect (trans != ((void *)0), 0)) { for (i = 0; i < 256; ++i) if (((*__ctype_b_loc ())[(int) ((i))] & (unsigned short int) _ISalnum)) (sbcset[trans[i] / (sizeof (bitset_word_t) * 8)] |= (bitset_word_t) 1 << trans[i] % (sizeof (bitset_word_t) * 8)); } else { for (i = 0; i < 256; ++i) if (((*__ctype_b_loc ())[(int) ((i))] & (unsigned short int) _ISalnum)) (sbcset[i / (sizeof (bitset_word_t) * 8)] |= (bitset_word_t) 1 << i % (sizeof (bitset_word_t) * 8)); } } while (0); else if (__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (name) && __builtin_constant_p ("cntrl") && (__s1_len = strlen (name), __s2_len = strlen ("cntrl"), (!((size_t)(const void *)((name) + 1) - (size_t)(const void *)(name) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("cntrl") + 1) - (size_t)(const void *)("cntrl") == 1) || __s2_len >= 4)) ? __builtin_strcmp (name, "cntrl") : (__builtin_constant_p (name) && ((size_t)(const void *)((name) + 1) - (size_t)(const void *)(name) == 1) && (__s1_len = strlen (name), __s1_len < 4) ? (__builtin_constant_p ("cntrl") && ((size_t)(const void *)(("cntrl") + 1) - (size_t)(const void *)("cntrl") == 1) ? __builtin_strcmp (name, "cntrl") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("cntrl"); register int __result = (((__const unsigned char *) (__const char *) (name))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (name))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (name))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (name))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("cntrl") && ((size_t)(const void *)(("cntrl") + 1) - (size_t)(const void *)("cntrl") == 1) && (__s2_len = strlen ("cntrl"), __s2_len < 4) ? (__builtin_constant_p (name) && ((size_t)(const void *)((name) + 1) - (size_t)(const void *)(name) == 1) ? __builtin_strcmp (name, "cntrl") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (name); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("cntrl"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("cntrl"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("cntrl"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("cntrl"))[3]); } } __result; }))) : __builtin_strcmp (name, "cntrl")))); }) == 0) do { if (__builtin_expect (trans != ((void *)0), 0)) { for (i = 0; i < 256; ++i) if (((*__ctype_b_loc ())[(int) ((i))] & (unsigned short int) _IScntrl)) (sbcset[trans[i] / (sizeof (bitset_word_t) * 8)] |= (bitset_word_t) 1 << trans[i] % (sizeof (bitset_word_t) * 8)); } else { for (i = 0; i < 256; ++i) if (((*__ctype_b_loc ())[(int) ((i))] & (unsigned short int) _IScntrl)) (sbcset[i / (sizeof (bitset_word_t) * 8)] |= (bitset_word_t) 1 << i % (sizeof (bitset_word_t) * 8)); } } while (0); else if (__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (name) && __builtin_constant_p ("lower") && (__s1_len = strlen (name), __s2_len = strlen ("lower"), (!((size_t)(const void *)((name) + 1) - (size_t)(const void *)(name) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("lower") + 1) - (size_t)(const void *)("lower") == 1) || __s2_len >= 4)) ? __builtin_strcmp (name, "lower") : (__builtin_constant_p (name) && ((size_t)(const void *)((name) + 1) - (size_t)(const void *)(name) == 1) && (__s1_len = strlen (name), __s1_len < 4) ? (__builtin_constant_p ("lower") && ((size_t)(const void *)(("lower") + 1) - (size_t)(const void *)("lower") == 1) ? __builtin_strcmp (name, "lower") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("lower"); register int __result = (((__const unsigned char *) (__const char *) (name))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (name))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (name))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (name))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("lower") && ((size_t)(const void *)(("lower") + 1) - (size_t)(const void *)("lower") == 1) && (__s2_len = strlen ("lower"), __s2_len < 4) ? (__builtin_constant_p (name) && ((size_t)(const void *)((name) + 1) - (size_t)(const void *)(name) == 1) ? __builtin_strcmp (name, "lower") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (name); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("lower"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("lower"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("lower"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("lower"))[3]); } } __result; }))) : __builtin_strcmp (name, "lower")))); }) == 0) do { if (__builtin_expect (trans != ((void *)0), 0)) { for (i = 0; i < 256; ++i) if (((*__ctype_b_loc ())[(int) ((i))] & (unsigned short int) _ISlower)) (sbcset[trans[i] / (sizeof (bitset_word_t) * 8)] |= (bitset_word_t) 1 << trans[i] % (sizeof (bitset_word_t) * 8)); } else { for (i = 0; i < 256; ++i) if (((*__ctype_b_loc ())[(int) ((i))] & (unsigned short int) _ISlower)) (sbcset[i / (sizeof (bitset_word_t) * 8)] |= (bitset_word_t) 1 << i % (sizeof (bitset_word_t) * 8)); } } while (0); else if (__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (name) && __builtin_constant_p ("space") && (__s1_len = strlen (name), __s2_len = strlen ("space"), (!((size_t)(const void *)((name) + 1) - (size_t)(const void *)(name) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("space") + 1) - (size_t)(const void *)("space") == 1) || __s2_len >= 4)) ? __builtin_strcmp (name, "space") : (__builtin_constant_p (name) && ((size_t)(const void *)((name) + 1) - (size_t)(const void *)(name) == 1) && (__s1_len = strlen (name), __s1_len < 4) ? (__builtin_constant_p ("space") && ((size_t)(const void *)(("space") + 1) - (size_t)(const void *)("space") == 1) ? __builtin_strcmp (name, "space") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("space"); register int __result = (((__const unsigned char *) (__const char *) (name))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (name))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (name))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (name))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("space") && ((size_t)(const void *)(("space") + 1) - (size_t)(const void *)("space") == 1) && (__s2_len = strlen ("space"), __s2_len < 4) ? (__builtin_constant_p (name) && ((size_t)(const void *)((name) + 1) - (size_t)(const void *)(name) == 1) ? __builtin_strcmp (name, "space") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (name); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("space"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("space"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("space"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("space"))[3]); } } __result; }))) : __builtin_strcmp (name, "space")))); }) == 0) do { if (__builtin_expect (trans != ((void *)0), 0)) { for (i = 0; i < 256; ++i) if (((*__ctype_b_loc ())[(int) ((i))] & (unsigned short int) _ISspace)) (sbcset[trans[i] / (sizeof (bitset_word_t) * 8)] |= (bitset_word_t) 1 << trans[i] % (sizeof (bitset_word_t) * 8)); } else { for (i = 0; i < 256; ++i) if (((*__ctype_b_loc ())[(int) ((i))] & (unsigned short int) _ISspace)) (sbcset[i / (sizeof (bitset_word_t) * 8)] |= (bitset_word_t) 1 << i % (sizeof (bitset_word_t) * 8)); } } while (0); else if (__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (name) && __builtin_constant_p ("alpha") && (__s1_len = strlen (name), __s2_len = strlen ("alpha"), (!((size_t)(const void *)((name) + 1) - (size_t)(const void *)(name) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("alpha") + 1) - (size_t)(const void *)("alpha") == 1) || __s2_len >= 4)) ? __builtin_strcmp (name, "alpha") : (__builtin_constant_p (name) && ((size_t)(const void *)((name) + 1) - (size_t)(const void *)(name) == 1) && (__s1_len = strlen (name), __s1_len < 4) ? (__builtin_constant_p ("alpha") && ((size_t)(const void *)(("alpha") + 1) - (size_t)(const void *)("alpha") == 1) ? __builtin_strcmp (name, "alpha") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("alpha"); register int __result = (((__const unsigned char *) (__const char *) (name))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (name))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (name))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (name))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("alpha") && ((size_t)(const void *)(("alpha") + 1) - (size_t)(const void *)("alpha") == 1) && (__s2_len = strlen ("alpha"), __s2_len < 4) ? (__builtin_constant_p (name) && ((size_t)(const void *)((name) + 1) - (size_t)(const void *)(name) == 1) ? __builtin_strcmp (name, "alpha") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (name); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("alpha"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("alpha"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("alpha"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("alpha"))[3]); } } __result; }))) : __builtin_strcmp (name, "alpha")))); }) == 0) do { if (__builtin_expect (trans != ((void *)0), 0)) { for (i = 0; i < 256; ++i) if (((*__ctype_b_loc ())[(int) ((i))] & (unsigned short int) _ISalpha)) (sbcset[trans[i] / (sizeof (bitset_word_t) * 8)] |= (bitset_word_t) 1 << trans[i] % (sizeof (bitset_word_t) * 8)); } else { for (i = 0; i < 256; ++i) if (((*__ctype_b_loc ())[(int) ((i))] & (unsigned short int) _ISalpha)) (sbcset[i / (sizeof (bitset_word_t) * 8)] |= (bitset_word_t) 1 << i % (sizeof (bitset_word_t) * 8)); } } while (0); else if (__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (name) && __builtin_constant_p ("digit") && (__s1_len = strlen (name), __s2_len = strlen ("digit"), (!((size_t)(const void *)((name) + 1) - (size_t)(const void *)(name) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("digit") + 1) - (size_t)(const void *)("digit") == 1) || __s2_len >= 4)) ? __builtin_strcmp (name, "digit") : (__builtin_constant_p (name) && ((size_t)(const void *)((name) + 1) - (size_t)(const void *)(name) == 1) && (__s1_len = strlen (name), __s1_len < 4) ? (__builtin_constant_p ("digit") && ((size_t)(const void *)(("digit") + 1) - (size_t)(const void *)("digit") == 1) ? __builtin_strcmp (name, "digit") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("digit"); register int __result = (((__const unsigned char *) (__const char *) (name))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (name))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (name))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (name))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("digit") && ((size_t)(const void *)(("digit") + 1) - (size_t)(const void *)("digit") == 1) && (__s2_len = strlen ("digit"), __s2_len < 4) ? (__builtin_constant_p (name) && ((size_t)(const void *)((name) + 1) - (size_t)(const void *)(name) == 1) ? __builtin_strcmp (name, "digit") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (name); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("digit"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("digit"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("digit"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("digit"))[3]); } } __result; }))) : __builtin_strcmp (name, "digit")))); }) == 0) do { if (__builtin_expect (trans != ((void *)0), 0)) { for (i = 0; i < 256; ++i) if (({ int __c = (i); __c >= '0' && __c <= '9'; })) (sbcset[trans[i] / (sizeof (bitset_word_t) * 8)] |= (bitset_word_t) 1 << trans[i] % (sizeof (bitset_word_t) * 8)); } else { for (i = 0; i < 256; ++i) if (({ int __c = (i); __c >= '0' && __c <= '9'; })) (sbcset[i / (sizeof (bitset_word_t) * 8)] |= (bitset_word_t) 1 << i % (sizeof (bitset_word_t) * 8)); } } while (0); else if (__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (name) && __builtin_constant_p ("print") && (__s1_len = strlen (name), __s2_len = strlen ("print"), (!((size_t)(const void *)((name) + 1) - (size_t)(const void *)(name) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("print") + 1) - (size_t)(const void *)("print") == 1) || __s2_len >= 4)) ? __builtin_strcmp (name, "print") : (__builtin_constant_p (name) && ((size_t)(const void *)((name) + 1) - (size_t)(const void *)(name) == 1) && (__s1_len = strlen (name), __s1_len < 4) ? (__builtin_constant_p ("print") && ((size_t)(const void *)(("print") + 1) - (size_t)(const void *)("print") == 1) ? __builtin_strcmp (name, "print") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("print"); register int __result = (((__const unsigned char *) (__const char *) (name))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (name))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (name))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (name))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("print") && ((size_t)(const void *)(("print") + 1) - (size_t)(const void *)("print") == 1) && (__s2_len = strlen ("print"), __s2_len < 4) ? (__builtin_constant_p (name) && ((size_t)(const void *)((name) + 1) - (size_t)(const void *)(name) == 1) ? __builtin_strcmp (name, "print") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (name); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("print"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("print"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("print"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("print"))[3]); } } __result; }))) : __builtin_strcmp (name, "print")))); }) == 0) do { if (__builtin_expect (trans != ((void *)0), 0)) { for (i = 0; i < 256; ++i) if (((*__ctype_b_loc ())[(int) ((i))] & (unsigned short int) _ISprint)) (sbcset[trans[i] / (sizeof (bitset_word_t) * 8)] |= (bitset_word_t) 1 << trans[i] % (sizeof (bitset_word_t) * 8)); } else { for (i = 0; i < 256; ++i) if (((*__ctype_b_loc ())[(int) ((i))] & (unsigned short int) _ISprint)) (sbcset[i / (sizeof (bitset_word_t) * 8)] |= (bitset_word_t) 1 << i % (sizeof (bitset_word_t) * 8)); } } while (0); else if (__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (name) && __builtin_constant_p ("upper") && (__s1_len = strlen (name), __s2_len = strlen ("upper"), (!((size_t)(const void *)((name) + 1) - (size_t)(const void *)(name) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("upper") + 1) - (size_t)(const void *)("upper") == 1) || __s2_len >= 4)) ? __builtin_strcmp (name, "upper") : (__builtin_constant_p (name) && ((size_t)(const void *)((name) + 1) - (size_t)(const void *)(name) == 1) && (__s1_len = strlen (name), __s1_len < 4) ? (__builtin_constant_p ("upper") && ((size_t)(const void *)(("upper") + 1) - (size_t)(const void *)("upper") == 1) ? __builtin_strcmp (name, "upper") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("upper"); register int __result = (((__const unsigned char *) (__const char *) (name))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (name))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (name))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (name))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("upper") && ((size_t)(const void *)(("upper") + 1) - (size_t)(const void *)("upper") == 1) && (__s2_len = strlen ("upper"), __s2_len < 4) ? (__builtin_constant_p (name) && ((size_t)(const void *)((name) + 1) - (size_t)(const void *)(name) == 1) ? __builtin_strcmp (name, "upper") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (name); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("upper"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("upper"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("upper"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("upper"))[3]); } } __result; }))) : __builtin_strcmp (name, "upper")))); }) == 0) do { if (__builtin_expect (trans != ((void *)0), 0)) { for (i = 0; i < 256; ++i) if (((*__ctype_b_loc ())[(int) ((i))] & (unsigned short int) _ISupper)) (sbcset[trans[i] / (sizeof (bitset_word_t) * 8)] |= (bitset_word_t) 1 << trans[i] % (sizeof (bitset_word_t) * 8)); } else { for (i = 0; i < 256; ++i) if (((*__ctype_b_loc ())[(int) ((i))] & (unsigned short int) _ISupper)) (sbcset[i / (sizeof (bitset_word_t) * 8)] |= (bitset_word_t) 1 << i % (sizeof (bitset_word_t) * 8)); } } while (0); else if (__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (name) && __builtin_constant_p ("blank") && (__s1_len = strlen (name), __s2_len = strlen ("blank"), (!((size_t)(const void *)((name) + 1) - (size_t)(const void *)(name) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("blank") + 1) - (size_t)(const void *)("blank") == 1) || __s2_len >= 4)) ? __builtin_strcmp (name, "blank") : (__builtin_constant_p (name) && ((size_t)(const void *)((name) + 1) - (size_t)(const void *)(name) == 1) && (__s1_len = strlen (name), __s1_len < 4) ? (__builtin_constant_p ("blank") && ((size_t)(const void *)(("blank") + 1) - (size_t)(const void *)("blank") == 1) ? __builtin_strcmp (name, "blank") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("blank"); register int __result = (((__const unsigned char *) (__const char *) (name))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (name))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (name))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (name))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("blank") && ((size_t)(const void *)(("blank") + 1) - (size_t)(const void *)("blank") == 1) && (__s2_len = strlen ("blank"), __s2_len < 4) ? (__builtin_constant_p (name) && ((size_t)(const void *)((name) + 1) - (size_t)(const void *)(name) == 1) ? __builtin_strcmp (name, "blank") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (name); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("blank"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("blank"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("blank"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("blank"))[3]); } } __result; }))) : __builtin_strcmp (name, "blank")))); }) == 0) do { if (__builtin_expect (trans != ((void *)0), 0)) { for (i = 0; i < 256; ++i) if (((*__ctype_b_loc ())[(int) ((i))] & (unsigned short int) _ISblank)) (sbcset[trans[i] / (sizeof (bitset_word_t) * 8)] |= (bitset_word_t) 1 << trans[i] % (sizeof (bitset_word_t) * 8)); } else { for (i = 0; i < 256; ++i) if (((*__ctype_b_loc ())[(int) ((i))] & (unsigned short int) _ISblank)) (sbcset[i / (sizeof (bitset_word_t) * 8)] |= (bitset_word_t) 1 << i % (sizeof (bitset_word_t) * 8)); } } while (0); else if (__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (name) && __builtin_constant_p ("graph") && (__s1_len = strlen (name), __s2_len = strlen ("graph"), (!((size_t)(const void *)((name) + 1) - (size_t)(const void *)(name) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("graph") + 1) - (size_t)(const void *)("graph") == 1) || __s2_len >= 4)) ? __builtin_strcmp (name, "graph") : (__builtin_constant_p (name) && ((size_t)(const void *)((name) + 1) - (size_t)(const void *)(name) == 1) && (__s1_len = strlen (name), __s1_len < 4) ? (__builtin_constant_p ("graph") && ((size_t)(const void *)(("graph") + 1) - (size_t)(const void *)("graph") == 1) ? __builtin_strcmp (name, "graph") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("graph"); register int __result = (((__const unsigned char *) (__const char *) (name))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (name))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (name))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (name))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("graph") && ((size_t)(const void *)(("graph") + 1) - (size_t)(const void *)("graph") == 1) && (__s2_len = strlen ("graph"), __s2_len < 4) ? (__builtin_constant_p (name) && ((size_t)(const void *)((name) + 1) - (size_t)(const void *)(name) == 1) ? __builtin_strcmp (name, "graph") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (name); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("graph"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("graph"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("graph"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("graph"))[3]); } } __result; }))) : __builtin_strcmp (name, "graph")))); }) == 0) do { if (__builtin_expect (trans != ((void *)0), 0)) { for (i = 0; i < 256; ++i) if (((*__ctype_b_loc ())[(int) ((i))] & (unsigned short int) _ISgraph)) (sbcset[trans[i] / (sizeof (bitset_word_t) * 8)] |= (bitset_word_t) 1 << trans[i] % (sizeof (bitset_word_t) * 8)); } else { for (i = 0; i < 256; ++i) if (((*__ctype_b_loc ())[(int) ((i))] & (unsigned short int) _ISgraph)) (sbcset[i / (sizeof (bitset_word_t) * 8)] |= (bitset_word_t) 1 << i % (sizeof (bitset_word_t) * 8)); } } while (0); else if (__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (name) && __builtin_constant_p ("punct") && (__s1_len = strlen (name), __s2_len = strlen ("punct"), (!((size_t)(const void *)((name) + 1) - (size_t)(const void *)(name) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("punct") + 1) - (size_t)(const void *)("punct") == 1) || __s2_len >= 4)) ? __builtin_strcmp (name, "punct") : (__builtin_constant_p (name) && ((size_t)(const void *)((name) + 1) - (size_t)(const void *)(name) == 1) && (__s1_len = strlen (name), __s1_len < 4) ? (__builtin_constant_p ("punct") && ((size_t)(const void *)(("punct") + 1) - (size_t)(const void *)("punct") == 1) ? __builtin_strcmp (name, "punct") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("punct"); register int __result = (((__const unsigned char *) (__const char *) (name))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (name))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (name))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (name))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("punct") && ((size_t)(const void *)(("punct") + 1) - (size_t)(const void *)("punct") == 1) && (__s2_len = strlen ("punct"), __s2_len < 4) ? (__builtin_constant_p (name) && ((size_t)(const void *)((name) + 1) - (size_t)(const void *)(name) == 1) ? __builtin_strcmp (name, "punct") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (name); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("punct"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("punct"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("punct"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("punct"))[3]); } } __result; }))) : __builtin_strcmp (name, "punct")))); }) == 0) do { if (__builtin_expect (trans != ((void *)0), 0)) { for (i = 0; i < 256; ++i) if (((*__ctype_b_loc ())[(int) ((i))] & (unsigned short int) _ISpunct)) (sbcset[trans[i] / (sizeof (bitset_word_t) * 8)] |= (bitset_word_t) 1 << trans[i] % (sizeof (bitset_word_t) * 8)); } else { for (i = 0; i < 256; ++i) if (((*__ctype_b_loc ())[(int) ((i))] & (unsigned short int) _ISpunct)) (sbcset[i / (sizeof (bitset_word_t) * 8)] |= (bitset_word_t) 1 << i % (sizeof (bitset_word_t) * 8)); } } while (0); else if (__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (name) && __builtin_constant_p ("xdigit") && (__s1_len = strlen (name), __s2_len = strlen ("xdigit"), (!((size_t)(const void *)((name) + 1) - (size_t)(const void *)(name) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("xdigit") + 1) - (size_t)(const void *)("xdigit") == 1) || __s2_len >= 4)) ? __builtin_strcmp (name, "xdigit") : (__builtin_constant_p (name) && ((size_t)(const void *)((name) + 1) - (size_t)(const void *)(name) == 1) && (__s1_len = strlen (name), __s1_len < 4) ? (__builtin_constant_p ("xdigit") && ((size_t)(const void *)(("xdigit") + 1) - (size_t)(const void *)("xdigit") == 1) ? __builtin_strcmp (name, "xdigit") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("xdigit"); register int __result = (((__const unsigned char *) (__const char *) (name))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (name))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (name))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (name))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("xdigit") && ((size_t)(const void *)(("xdigit") + 1) - (size_t)(const void *)("xdigit") == 1) && (__s2_len = strlen ("xdigit"), __s2_len < 4) ? (__builtin_constant_p (name) && ((size_t)(const void *)((name) + 1) - (size_t)(const void *)(name) == 1) ? __builtin_strcmp (name, "xdigit") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (name); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("xdigit"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("xdigit"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("xdigit"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("xdigit"))[3]); } } __result; }))) : __builtin_strcmp (name, "xdigit")))); }) == 0) do { if (__builtin_expect (trans != ((void *)0), 0)) { for (i = 0; i < 256; ++i) if (((*__ctype_b_loc ())[(int) ((i))] & (unsigned short int) _ISxdigit)) (sbcset[trans[i] / (sizeof (bitset_word_t) * 8)] |= (bitset_word_t) 1 << trans[i] % (sizeof (bitset_word_t) * 8)); } else { for (i = 0; i < 256; ++i) if (((*__ctype_b_loc ())[(int) ((i))] & (unsigned short int) _ISxdigit)) (sbcset[i / (sizeof (bitset_word_t) * 8)] |= (bitset_word_t) 1 << i % (sizeof (bitset_word_t) * 8)); } } while (0); else return REG_ECTYPE; return REG_NOERROR; } static bin_tree_t * build_charclass_op (re_dfa_t *dfa, unsigned char * trans, const unsigned char *class_name, const unsigned char *extra, int non_match, reg_errcode_t *err) { re_bitset_ptr_t sbcset; re_charset_t *mbcset; int alloc = 0; reg_errcode_t ret; re_token_t br_token; bin_tree_t *tree; sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1); mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1); if (__builtin_expect (sbcset == ((void *)0) || mbcset == ((void *)0), 0)) { *err = REG_ESPACE; return ((void *)0); } if (non_match) { mbcset->non_match = 1; } ret = build_charclass (trans, sbcset, mbcset, &alloc, class_name, 0); if (__builtin_expect (ret != REG_NOERROR, 0)) { free (sbcset); free_charset (mbcset); *err = ret; return ((void *)0); } for (; *extra; extra++) (sbcset[*extra / (sizeof (bitset_word_t) * 8)] |= (bitset_word_t) 1 << *extra % (sizeof (bitset_word_t) * 8)); if (non_match) bitset_not (sbcset); if (dfa->mb_cur_max > 1) bitset_mask (sbcset, dfa->sb_char); br_token.type = SIMPLE_BRACKET; br_token.opr.sbcset = sbcset; tree = create_token_tree (dfa, ((void *)0), ((void *)0), &br_token); if (__builtin_expect (tree == ((void *)0), 0)) goto build_word_op_espace; if (dfa->mb_cur_max > 1) { bin_tree_t *mbc_tree; br_token.type = COMPLEX_BRACKET; br_token.opr.mbcset = mbcset; dfa->has_mb_node = 1; mbc_tree = create_token_tree (dfa, ((void *)0), ((void *)0), &br_token); if (__builtin_expect (mbc_tree == ((void *)0), 0)) goto build_word_op_espace; tree = create_tree (dfa, tree, mbc_tree, OP_ALT); if (__builtin_expect (mbc_tree != ((void *)0), 1)) return tree; } else { free_charset (mbcset); return tree; } build_word_op_espace: free (sbcset); free_charset (mbcset); *err = REG_ESPACE; return ((void *)0); } static int fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax) { int num = -1; unsigned char c; while (1) { fetch_token (token, input, syntax); c = token->opr.c; if (__builtin_expect (token->type == END_OF_RE, 0)) return -2; if (token->type == OP_CLOSE_DUP_NUM || c == ',') break; num = ((token->type != CHARACTER || c < '0' || '9' < c || num == -2) ? -2 : ((num == -1) ? c - '0' : num * 10 + c - '0')); num = (num > (0x7fff)) ? -2 : num; } return num; } static void free_charset (re_charset_t *cset) { free (cset->mbchars); free (cset->coll_syms); free (cset->equiv_classes); free (cset->range_starts); free (cset->range_ends); free (cset->char_classes); free (cset); } static bin_tree_t * create_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right, re_token_type_t type) { re_token_t t; t.type = type; return create_token_tree (dfa, left, right, &t); } static bin_tree_t * create_token_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right, const re_token_t *token) { bin_tree_t *tree; if (__builtin_expect (dfa->str_tree_storage_idx == ((1024 - sizeof (void *)) / sizeof (bin_tree_t)), 0)) { bin_tree_storage_t *storage = ((bin_tree_storage_t *) malloc ((1) * sizeof (bin_tree_storage_t))); if (storage == ((void *)0)) return ((void *)0); storage->next = dfa->str_tree_storage; dfa->str_tree_storage = storage; dfa->str_tree_storage_idx = 0; } tree = &dfa->str_tree_storage->data[dfa->str_tree_storage_idx++]; tree->parent = ((void *)0); tree->left = left; tree->right = right; tree->token = *token; tree->token.duplicated = 0; tree->token.opt_subexp = 0; tree->first = ((void *)0); tree->next = ((void *)0); tree->node_idx = -1; if (left != ((void *)0)) left->parent = tree; if (right != ((void *)0)) right->parent = tree; return tree; } static reg_errcode_t mark_opt_subexp (void *extra, bin_tree_t *node) { int idx = (int) (long) extra; if (node->token.type == SUBEXP && node->token.opr.idx == idx) node->token.opt_subexp = 1; return REG_NOERROR; } static void free_token (re_token_t *node) { if (node->type == COMPLEX_BRACKET && node->duplicated == 0) free_charset (node->opr.mbcset); else if (node->type == SIMPLE_BRACKET && node->duplicated == 0) free (node->opr.sbcset); } static reg_errcode_t free_tree (void *extra, bin_tree_t *node) { free_token (&node->token); return REG_NOERROR; } static bin_tree_t * duplicate_tree (const bin_tree_t *root, re_dfa_t *dfa) { const bin_tree_t *node; bin_tree_t *dup_root; bin_tree_t **p_new = &dup_root, *dup_node = root->parent; for (node = root; ; ) { *p_new = create_token_tree (dfa, ((void *)0), ((void *)0), &node->token); if (*p_new == ((void *)0)) return ((void *)0); (*p_new)->parent = dup_node; (*p_new)->token.duplicated = 1; dup_node = *p_new; if (node->left) { node = node->left; p_new = &dup_node->left; } else { const bin_tree_t *prev = ((void *)0); while (node->right == prev || node->right == ((void *)0)) { prev = node; node = node->parent; dup_node = dup_node->parent; if (!node) return dup_root; } node = node->right; p_new = &dup_node->right; } } } # 65 "regex.c" 2 # 1 "regexec.c" 1 # 21 "regexec.c" static reg_errcode_t match_ctx_init (re_match_context_t *cache, int eflags, int n) ; static void match_ctx_clean (re_match_context_t *mctx) ; static void match_ctx_free (re_match_context_t *cache) ; static reg_errcode_t match_ctx_add_entry (re_match_context_t *cache, int node, int str_idx, int from, int to) ; static int search_cur_bkref_entry (const re_match_context_t *mctx, int str_idx) ; static reg_errcode_t match_ctx_add_subtop (re_match_context_t *mctx, int node, int str_idx) ; static re_sub_match_last_t * match_ctx_add_sublast (re_sub_match_top_t *subtop, int node, int str_idx) ; static void sift_ctx_init (re_sift_context_t *sctx, re_dfastate_t **sifted_sts, re_dfastate_t **limited_sts, int last_node, int last_str_idx) ; static reg_errcode_t re_search_internal (const regex_t *preg, const char *string, int length, int start, int range, int stop, size_t nmatch, regmatch_t pmatch[], int eflags) ; static int re_search_2_stub (struct re_pattern_buffer *bufp, const char *string1, int length1, const char *string2, int length2, int start, int range, struct re_registers *regs, int stop, int ret_len) ; static int re_search_stub (struct re_pattern_buffer *bufp, const char *string, int length, int start, int range, int stop, struct re_registers *regs, int ret_len) ; static unsigned re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, int nregs, int regs_allocated) ; static reg_errcode_t prune_impossible_nodes (re_match_context_t *mctx) ; static int check_matching (re_match_context_t *mctx, int fl_longest_match, int *p_match_first) ; static int check_halt_state_context (const re_match_context_t *mctx, const re_dfastate_t *state, int idx) ; static void update_regs (const re_dfa_t *dfa, regmatch_t *pmatch, regmatch_t *prev_idx_match, int cur_node, int cur_idx, int nmatch) ; static reg_errcode_t push_fail_stack (struct re_fail_stack_t *fs, int str_idx, int dest_node, int nregs, regmatch_t *regs, re_node_set *eps_via_nodes) ; static reg_errcode_t set_regs (const regex_t *preg, const re_match_context_t *mctx, size_t nmatch, regmatch_t *pmatch, int fl_backtrack) ; static reg_errcode_t free_fail_stack_return (struct re_fail_stack_t *fs) ; static int sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx, int node_idx, int str_idx, int max_str_idx) ; static reg_errcode_t sift_states_backward (const re_match_context_t *mctx, re_sift_context_t *sctx) ; static reg_errcode_t build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx, int str_idx, re_node_set *cur_dest) ; static reg_errcode_t update_cur_sifted_state (const re_match_context_t *mctx, re_sift_context_t *sctx, int str_idx, re_node_set *dest_nodes) ; static reg_errcode_t add_epsilon_src_nodes (const re_dfa_t *dfa, re_node_set *dest_nodes, const re_node_set *candidates) ; static int check_dst_limits (const re_match_context_t *mctx, re_node_set *limits, int dst_node, int dst_idx, int src_node, int src_idx) ; static int check_dst_limits_calc_pos_1 (const re_match_context_t *mctx, int boundaries, int subexp_idx, int from_node, int bkref_idx) ; static int check_dst_limits_calc_pos (const re_match_context_t *mctx, int limit, int subexp_idx, int node, int str_idx, int bkref_idx) ; static reg_errcode_t check_subexp_limits (const re_dfa_t *dfa, re_node_set *dest_nodes, const re_node_set *candidates, re_node_set *limits, struct re_backref_cache_entry *bkref_ents, int str_idx) ; static reg_errcode_t sift_states_bkref (const re_match_context_t *mctx, re_sift_context_t *sctx, int str_idx, const re_node_set *candidates) ; static reg_errcode_t merge_state_array (const re_dfa_t *dfa, re_dfastate_t **dst, re_dfastate_t **src, int num) ; static re_dfastate_t *find_recover_state (reg_errcode_t *err, re_match_context_t *mctx) ; static re_dfastate_t *transit_state (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *state) ; static re_dfastate_t *merge_state_with_log (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *next_state) ; static reg_errcode_t check_subexp_matching_top (re_match_context_t *mctx, re_node_set *cur_nodes, int str_idx) ; static reg_errcode_t transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate) ; static reg_errcode_t transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes) ; static reg_errcode_t get_subexp (re_match_context_t *mctx, int bkref_node, int bkref_str_idx) ; static reg_errcode_t get_subexp_sub (re_match_context_t *mctx, const re_sub_match_top_t *sub_top, re_sub_match_last_t *sub_last, int bkref_node, int bkref_str) ; static int find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes, int subexp_idx, int type) ; static reg_errcode_t check_arrival (re_match_context_t *mctx, state_array_t *path, int top_node, int top_str, int last_node, int last_str, int type) ; static reg_errcode_t check_arrival_add_next_nodes (re_match_context_t *mctx, int str_idx, re_node_set *cur_nodes, re_node_set *next_nodes) ; static reg_errcode_t check_arrival_expand_ecl (const re_dfa_t *dfa, re_node_set *cur_nodes, int ex_subexp, int type) ; static reg_errcode_t check_arrival_expand_ecl_sub (const re_dfa_t *dfa, re_node_set *dst_nodes, int target, int ex_subexp, int type) ; static reg_errcode_t expand_bkref_cache (re_match_context_t *mctx, re_node_set *cur_nodes, int cur_str, int subexp_num, int type) ; static int build_trtable (const re_dfa_t *dfa, re_dfastate_t *state) ; static int check_node_accept_bytes (const re_dfa_t *dfa, int node_idx, const re_string_t *input, int idx) ; static unsigned int find_collation_sequence_value (const unsigned char *mbs, size_t name_len) ; static int group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, re_node_set *states_node, bitset_t *states_ch) ; static int check_node_accept (const re_match_context_t *mctx, const re_token_t *node, int idx) ; static reg_errcode_t extend_buffers (re_match_context_t *mctx) ; # 220 "regexec.c" int __regexec (preg, string, nmatch, pmatch, eflags) const regex_t *__restrict preg; const char *__restrict string; size_t nmatch; regmatch_t pmatch[]; int eflags; { reg_errcode_t err; int start, length; re_dfa_t *dfa = (re_dfa_t *) preg->buffer; if (eflags & ~(1 | (1 << 1) | (1 << 2))) return REG_BADPAT; if (eflags & (1 << 2)) { start = pmatch[0].rm_so; length = pmatch[0].rm_eo; } else { start = 0; length = strlen (string); } ({ __lll_mutex_lock (&(dfa->lock)); 0; }); if (preg->no_sub) err = re_search_internal (preg, string, length, start, length - start, length, 0, ((void *)0), eflags); else err = re_search_internal (preg, string, length, start, length - start, length, nmatch, pmatch, eflags); __lll_mutex_unlock(&(dfa->lock)); return err != REG_NOERROR; } # 1 "../include/shlib-compat.h" 1 # 26 "../include/shlib-compat.h" # 1 "/var/tmp/portage/glibc-2.5/work/build-default-hppa2.0-unknown-linux-gnu-nptl/abi-versions.h" 1 # 27 "../include/shlib-compat.h" 2 # 259 "regexec.c" 2 extern __typeof (__regexec) regexec __attribute__ ((weak, alias ("__regexec")));; # 306 "regexec.c" int __re_match (bufp, string, length, start, regs) struct re_pattern_buffer *bufp; const char *string; int length, start; struct re_registers *regs; { return re_search_stub (bufp, string, length, start, 0, length, regs, 1); } extern __typeof (__re_match) re_match __attribute__ ((weak, alias ("__re_match"))); int __re_search (bufp, string, length, start, range, regs) struct re_pattern_buffer *bufp; const char *string; int length, start, range; struct re_registers *regs; { return re_search_stub (bufp, string, length, start, range, length, regs, 0); } extern __typeof (__re_search) re_search __attribute__ ((weak, alias ("__re_search"))); int __re_match_2 (bufp, string1, length1, string2, length2, start, regs, stop) struct re_pattern_buffer *bufp; const char *string1, *string2; int length1, length2, start, stop; struct re_registers *regs; { return re_search_2_stub (bufp, string1, length1, string2, length2, start, 0, regs, stop, 1); } extern __typeof (__re_match_2) re_match_2 __attribute__ ((weak, alias ("__re_match_2"))); int __re_search_2 (bufp, string1, length1, string2, length2, start, range, regs, stop) struct re_pattern_buffer *bufp; const char *string1, *string2; int length1, length2, start, range, stop; struct re_registers *regs; { return re_search_2_stub (bufp, string1, length1, string2, length2, start, range, regs, stop, 0); } extern __typeof (__re_search_2) re_search_2 __attribute__ ((weak, alias ("__re_search_2"))); static int re_search_2_stub (bufp, string1, length1, string2, length2, start, range, regs, stop, ret_len) struct re_pattern_buffer *bufp; const char *string1, *string2; int length1, length2, start, range, stop, ret_len; struct re_registers *regs; { const char *str; int rval; int len = length1 + length2; int free_str = 0; if (__builtin_expect (length1 < 0 || length2 < 0 || stop < 0, 0)) return -2; if (length2 > 0) if (length1 > 0) { char *s = ((char *) malloc ((len) * sizeof (char))); if (__builtin_expect (s == ((void *)0), 0)) return -2; memcpy (__builtin_mempcpy (s, string1, length1), string2, length2); str = s; free_str = 1; } else str = string2; else str = string1; rval = re_search_stub (bufp, str, len, start, range, stop, regs, ret_len); if (free_str) free ((char *) str); return rval; } static int re_search_stub (bufp, string, length, start, range, stop, regs, ret_len) struct re_pattern_buffer *bufp; const char *string; int length, start, range, stop, ret_len; struct re_registers *regs; { reg_errcode_t result; regmatch_t *pmatch; int nregs, rval; int eflags = 0; re_dfa_t *dfa = (re_dfa_t *) bufp->buffer; if (__builtin_expect (start < 0 || start > length, 0)) return -1; if (__builtin_expect (start + range > length, 0)) range = length - start; else if (__builtin_expect (start + range < 0, 0)) range = -start; ({ __lll_mutex_lock (&(dfa->lock)); 0; }); eflags |= (bufp->not_bol) ? 1 : 0; eflags |= (bufp->not_eol) ? (1 << 1) : 0; if (range > 0 && bufp->fastmap != ((void *)0) && !bufp->fastmap_accurate) __re_compile_fastmap (bufp); if (__builtin_expect (bufp->no_sub, 0)) regs = ((void *)0); if (regs == ((void *)0)) nregs = 1; else if (__builtin_expect (bufp->regs_allocated == 2 && regs->num_regs < bufp->re_nsub + 1, 0)) { nregs = regs->num_regs; if (__builtin_expect (nregs < 1, 0)) { regs = ((void *)0); nregs = 1; } } else nregs = bufp->re_nsub + 1; pmatch = ((regmatch_t *) malloc ((nregs) * sizeof (regmatch_t))); if (__builtin_expect (pmatch == ((void *)0), 0)) { rval = -2; goto out; } result = re_search_internal (bufp, string, length, start, range, stop, nregs, pmatch, eflags); rval = 0; if (result != REG_NOERROR) rval = -1; else if (regs != ((void *)0)) { bufp->regs_allocated = re_copy_regs (regs, pmatch, nregs, bufp->regs_allocated); if (__builtin_expect (bufp->regs_allocated == 0, 0)) rval = -2; } if (__builtin_expect (rval == 0, 1)) { if (ret_len) { ((pmatch[0].rm_so == start) ? (void) (0) : (__assert_fail ("pmatch[0].rm_so == start", "regexec.c", 487, __PRETTY_FUNCTION__), (void) (0))); rval = pmatch[0].rm_eo - start; } else rval = pmatch[0].rm_so; } free (pmatch); out: __lll_mutex_unlock(&(dfa->lock)); return rval; } static unsigned re_copy_regs (regs, pmatch, nregs, regs_allocated) struct re_registers *regs; regmatch_t *pmatch; int nregs, regs_allocated; { int rval = 1; int i; int need_regs = nregs + 1; if (regs_allocated == 0) { regs->start = ((regoff_t *) malloc ((need_regs) * sizeof (regoff_t))); regs->end = ((regoff_t *) malloc ((need_regs) * sizeof (regoff_t))); if (__builtin_expect (regs->start == ((void *)0), 0) || __builtin_expect (regs->end == ((void *)0), 0)) return 0; regs->num_regs = need_regs; } else if (regs_allocated == 1) { if (__builtin_expect (need_regs > regs->num_regs, 0)) { regoff_t *new_start = ((regoff_t *) realloc (regs->start, (need_regs) * sizeof (regoff_t))); regoff_t *new_end = ((regoff_t *) realloc (regs->end, (need_regs) * sizeof (regoff_t))); if (__builtin_expect (new_start == ((void *)0), 0) || __builtin_expect (new_end == ((void *)0), 0)) return 0; regs->start = new_start; regs->end = new_end; regs->num_regs = need_regs; } } else { ((regs_allocated == 2) ? (void) (0) : (__assert_fail ("regs_allocated == 2", "regexec.c", 537, __PRETTY_FUNCTION__), (void) (0))); ((regs->num_regs >= nregs) ? (void) (0) : (__assert_fail ("regs->num_regs >= nregs", "regexec.c", 539, __PRETTY_FUNCTION__), (void) (0))); rval = 2; } for (i = 0; i < nregs; ++i) { regs->start[i] = pmatch[i].rm_so; regs->end[i] = pmatch[i].rm_eo; } for ( ; i < regs->num_regs; ++i) regs->start[i] = regs->end[i] = -1; return rval; } # 568 "regexec.c" void __re_set_registers (bufp, regs, num_regs, starts, ends) struct re_pattern_buffer *bufp; struct re_registers *regs; unsigned num_regs; regoff_t *starts, *ends; { if (num_regs) { bufp->regs_allocated = 1; regs->num_regs = num_regs; regs->start = starts; regs->end = ends; } else { bufp->regs_allocated = 0; regs->num_regs = 0; regs->start = regs->end = (regoff_t *) 0; } } extern __typeof (__re_set_registers) re_set_registers __attribute__ ((weak, alias ("__re_set_registers"))); int __attribute__ ((weak)) re_exec (s) const char *s; { return 0 == __regexec (&re_comp_buf, s, 0, ((void *)0), 0); } # 619 "regexec.c" static reg_errcode_t re_search_internal (preg, string, length, start, range, stop, nmatch, pmatch, eflags) const regex_t *preg; const char *string; int length, start, range, stop, eflags; size_t nmatch; regmatch_t pmatch[]; { reg_errcode_t err; const re_dfa_t *dfa = (const re_dfa_t *) preg->buffer; int left_lim, right_lim, incr; int fl_longest_match, match_first, match_kind, match_last = -1; int extra_nmatch; int sb, ch; re_match_context_t mctx = { .dfa = dfa }; char *fastmap = (preg->fastmap != ((void *)0) && preg->fastmap_accurate && range && !preg->can_be_null) ? preg->fastmap : ((void *)0); unsigned char * t = preg->translate; extra_nmatch = (nmatch > preg->re_nsub) ? nmatch - (preg->re_nsub + 1) : 0; nmatch -= extra_nmatch; if (__builtin_expect (preg->used == 0 || dfa->init_state == ((void *)0) || dfa->init_state_word == ((void *)0) || dfa->init_state_nl == ((void *)0) || dfa->init_state_begbuf == ((void *)0), 0)) return REG_NOMATCH; # 665 "regexec.c" if (dfa->init_state->nodes.nelem == 0 && dfa->init_state_word->nodes.nelem == 0 && (dfa->init_state_nl->nodes.nelem == 0 || !preg->newline_anchor)) { if (start != 0 && start + range != 0) return REG_NOMATCH; start = range = 0; } fl_longest_match = (nmatch != 0 || dfa->nbackref); err = re_string_allocate (&mctx.input, string, length, dfa->nodes_len + 1, preg->translate, preg->syntax & ((((((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1), dfa); if (__builtin_expect (err != REG_NOERROR, 0)) goto free_return; mctx.input.stop = stop; mctx.input.raw_stop = stop; mctx.input.newline_anchor = preg->newline_anchor; err = match_ctx_init (&mctx, eflags, dfa->nbackref * 2); if (__builtin_expect (err != REG_NOERROR, 0)) goto free_return; if (nmatch > 1 || dfa->has_mb_node) { mctx.state_log = ((re_dfastate_t * *) malloc ((mctx.input.bufs_len + 1) * sizeof (re_dfastate_t *))); if (__builtin_expect (mctx.state_log == ((void *)0), 0)) { err = REG_ESPACE; goto free_return; } } else mctx.state_log = ((void *)0); match_first = start; mctx.input.tip_context = (eflags & 1) ? ((1 << 1) << 1) : (1 << 1) | ((1 << 1) << 1); incr = (range < 0) ? -1 : 1; left_lim = (range < 0) ? start + range : start; right_lim = (range < 0) ? start : start + range; sb = dfa->mb_cur_max == 1; match_kind = (fastmap ? ((sb || !(preg->syntax & ((((((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) || t) ? 4 : 0) | (range >= 0 ? 2 : 0) | (t != ((void *)0) ? 1 : 0)) : 8); for (;; match_first += incr) { err = REG_NOMATCH; if (match_first < left_lim || right_lim < match_first) goto free_return; switch (match_kind) { case 8: break; case 7: while (__builtin_expect (match_first < right_lim, 1) && !fastmap[t[(unsigned char) string[match_first]]]) ++match_first; goto forward_match_found_start_or_reached_end; case 6: while (__builtin_expect (match_first < right_lim, 1) && !fastmap[(unsigned char) string[match_first]]) ++match_first; forward_match_found_start_or_reached_end: if (__builtin_expect (match_first == right_lim, 0)) { ch = match_first >= length ? 0 : (unsigned char) string[match_first]; if (!fastmap[t ? t[ch] : ch]) goto free_return; } break; case 4: case 5: while (match_first >= left_lim) { ch = match_first >= length ? 0 : (unsigned char) string[match_first]; if (fastmap[t ? t[ch] : ch]) break; --match_first; } if (match_first < left_lim) goto free_return; break; default: for (;;) { unsigned int offset = match_first - mctx.input.raw_mbs_idx; if (__builtin_expect (offset >= (unsigned int) mctx.input.valid_raw_len, 0)) { err = re_string_reconstruct (&mctx.input, match_first, eflags); if (__builtin_expect (err != REG_NOERROR, 0)) goto free_return; offset = match_first - mctx.input.raw_mbs_idx; } ch = (match_first >= length ? 0 : ((&mctx.input)->mbs[offset])); if (fastmap[ch]) break; match_first += incr; if (match_first < left_lim || match_first > right_lim) { err = REG_NOMATCH; goto free_return; } } break; } err = re_string_reconstruct (&mctx.input, match_first, eflags); if (__builtin_expect (err != REG_NOERROR, 0)) goto free_return; if (!sb && !((0) == (&mctx.input)->valid_len || (&mctx.input)->wcs[0] != (0xffffffffu))) continue; mctx.state_log_top = mctx.nbkref_ents = mctx.max_mb_elem_len = 0; match_last = check_matching (&mctx, fl_longest_match, range >= 0 ? &match_first : ((void *)0)); if (match_last != -1) { if (__builtin_expect (match_last == -2, 0)) { err = REG_ESPACE; goto free_return; } else { mctx.match_last = match_last; if ((!preg->no_sub && nmatch > 1) || dfa->nbackref) { re_dfastate_t *pstate = mctx.state_log[match_last]; mctx.last_node = check_halt_state_context (&mctx, pstate, match_last); } if ((!preg->no_sub && nmatch > 1 && dfa->has_plural_match) || dfa->nbackref) { err = prune_impossible_nodes (&mctx); if (err == REG_NOERROR) break; if (__builtin_expect (err != REG_NOMATCH, 0)) goto free_return; match_last = -1; } else break; } } match_ctx_clean (&mctx); } if (nmatch > 0) { int reg_idx; for (reg_idx = 1; reg_idx < nmatch; ++reg_idx) pmatch[reg_idx].rm_so = pmatch[reg_idx].rm_eo = -1; pmatch[0].rm_so = 0; pmatch[0].rm_eo = mctx.match_last; if (!preg->no_sub && nmatch > 1) { err = set_regs (preg, &mctx, nmatch, pmatch, dfa->has_plural_match && dfa->nbackref > 0); if (__builtin_expect (err != REG_NOERROR, 0)) goto free_return; } for (reg_idx = 0; reg_idx < nmatch; ++reg_idx) if (pmatch[reg_idx].rm_so != -1) { if (__builtin_expect (mctx.input.offsets_needed != 0, 0)) { pmatch[reg_idx].rm_so = (pmatch[reg_idx].rm_so == mctx.input.valid_len ? mctx.input.valid_raw_len : mctx.input.offsets[pmatch[reg_idx].rm_so]); pmatch[reg_idx].rm_eo = (pmatch[reg_idx].rm_eo == mctx.input.valid_len ? mctx.input.valid_raw_len : mctx.input.offsets[pmatch[reg_idx].rm_eo]); } pmatch[reg_idx].rm_so += match_first; pmatch[reg_idx].rm_eo += match_first; } for (reg_idx = 0; reg_idx < extra_nmatch; ++reg_idx) { pmatch[nmatch + reg_idx].rm_so = -1; pmatch[nmatch + reg_idx].rm_eo = -1; } if (dfa->subexp_map) for (reg_idx = 0; reg_idx + 1 < nmatch; reg_idx++) if (dfa->subexp_map[reg_idx] != reg_idx) { pmatch[reg_idx + 1].rm_so = pmatch[dfa->subexp_map[reg_idx] + 1].rm_so; pmatch[reg_idx + 1].rm_eo = pmatch[dfa->subexp_map[reg_idx] + 1].rm_eo; } } free_return: free (mctx.state_log); if (dfa->nbackref) match_ctx_free (&mctx); re_string_destruct (&mctx.input); return err; } static reg_errcode_t prune_impossible_nodes (mctx) re_match_context_t *mctx; { const re_dfa_t *const dfa = mctx->dfa; int halt_node, match_last; reg_errcode_t ret; re_dfastate_t **sifted_states; re_dfastate_t **lim_states = ((void *)0); re_sift_context_t sctx; match_last = mctx->match_last; halt_node = mctx->last_node; sifted_states = ((re_dfastate_t * *) malloc ((match_last + 1) * sizeof (re_dfastate_t *))); if (__builtin_expect (sifted_states == ((void *)0), 0)) { ret = REG_ESPACE; goto free_return; } if (dfa->nbackref) { lim_states = ((re_dfastate_t * *) malloc ((match_last + 1) * sizeof (re_dfastate_t *))); if (__builtin_expect (lim_states == ((void *)0), 0)) { ret = REG_ESPACE; goto free_return; } while (1) { memset (lim_states, '\0', sizeof (re_dfastate_t *) * (match_last + 1)); sift_ctx_init (&sctx, sifted_states, lim_states, halt_node, match_last); ret = sift_states_backward (mctx, &sctx); free ((&sctx.limits)->elems); if (__builtin_expect (ret != REG_NOERROR, 0)) goto free_return; if (sifted_states[0] != ((void *)0) || lim_states[0] != ((void *)0)) break; do { --match_last; if (match_last < 0) { ret = REG_NOMATCH; goto free_return; } } while (mctx->state_log[match_last] == ((void *)0) || !mctx->state_log[match_last]->halt); halt_node = check_halt_state_context (mctx, mctx->state_log[match_last], match_last); } ret = merge_state_array (dfa, sifted_states, lim_states, match_last + 1); free (lim_states); lim_states = ((void *)0); if (__builtin_expect (ret != REG_NOERROR, 0)) goto free_return; } else { sift_ctx_init (&sctx, sifted_states, lim_states, halt_node, match_last); ret = sift_states_backward (mctx, &sctx); free ((&sctx.limits)->elems); if (__builtin_expect (ret != REG_NOERROR, 0)) goto free_return; } free (mctx->state_log); mctx->state_log = sifted_states; sifted_states = ((void *)0); mctx->last_node = halt_node; mctx->match_last = match_last; ret = REG_NOERROR; free_return: free (sifted_states); free (lim_states); return ret; } static inline re_dfastate_t * __attribute__ ((always_inline)) acquire_init_state_context (reg_errcode_t *err, const re_match_context_t *mctx, int idx) { const re_dfa_t *const dfa = mctx->dfa; if (dfa->init_state->has_constraint) { unsigned int context; context = re_string_context_at (&mctx->input, idx - 1, mctx->eflags); if (((context) & 1)) return dfa->init_state_word; else if (((context) == 0)) return dfa->init_state; else if (((context) & ((1 << 1) << 1)) && ((context) & (1 << 1))) return dfa->init_state_begbuf; else if (((context) & (1 << 1))) return dfa->init_state_nl; else if (((context) & ((1 << 1) << 1))) { return re_acquire_state_context (err, dfa, dfa->init_state->entrance_nodes, context); } else return dfa->init_state; } else return dfa->init_state; } # 1066 "regexec.c" static int check_matching (re_match_context_t *mctx, int fl_longest_match, int *p_match_first) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; int match = 0; int match_last = -1; int cur_str_idx = ((&mctx->input)->cur_idx); re_dfastate_t *cur_state; int at_init_state = p_match_first != ((void *)0); int next_start_idx = cur_str_idx; err = REG_NOERROR; cur_state = acquire_init_state_context (&err, mctx, cur_str_idx); if (__builtin_expect (cur_state == ((void *)0), 0)) { ((err == REG_ESPACE) ? (void) (0) : (__assert_fail ("err == REG_ESPACE", "regexec.c", 1085, __PRETTY_FUNCTION__), (void) (0))); return -2; } if (mctx->state_log != ((void *)0)) { mctx->state_log[cur_str_idx] = cur_state; if (__builtin_expect (dfa->nbackref, 0)) { at_init_state = 0; err = check_subexp_matching_top (mctx, &cur_state->nodes, 0); if (__builtin_expect (err != REG_NOERROR, 0)) return err; if (cur_state->has_backref) { err = transit_state_bkref (mctx, &cur_state->nodes); if (__builtin_expect (err != REG_NOERROR, 0)) return err; } } } if (__builtin_expect (cur_state->halt, 0)) { if (!cur_state->has_constraint || check_halt_state_context (mctx, cur_state, cur_str_idx)) { if (!fl_longest_match) return cur_str_idx; else { match_last = cur_str_idx; match = 1; } } } while (!((&mctx->input)->stop <= (&mctx->input)->cur_idx)) { re_dfastate_t *old_state = cur_state; int next_char_idx = ((&mctx->input)->cur_idx) + 1; if (__builtin_expect (next_char_idx >= mctx->input.bufs_len, 0) || (__builtin_expect (next_char_idx >= mctx->input.valid_len, 0) && mctx->input.valid_len < mctx->input.len)) { err = extend_buffers (mctx); if (__builtin_expect (err != REG_NOERROR, 0)) { ((err == REG_ESPACE) ? (void) (0) : (__assert_fail ("err == REG_ESPACE", "regexec.c", 1139, __PRETTY_FUNCTION__), (void) (0))); return -2; } } cur_state = transit_state (&err, mctx, cur_state); if (mctx->state_log != ((void *)0)) cur_state = merge_state_with_log (&err, mctx, cur_state); if (cur_state == ((void *)0)) { if (__builtin_expect (err != REG_NOERROR, 0)) return -2; if (mctx->state_log == ((void *)0) || (match && !fl_longest_match) || (cur_state = find_recover_state (&err, mctx)) == ((void *)0)) break; } if (__builtin_expect (at_init_state, 0)) { if (old_state == cur_state) next_start_idx = next_char_idx; else at_init_state = 0; } if (cur_state->halt) { if (!cur_state->has_constraint || check_halt_state_context (mctx, cur_state, ((&mctx->input)->cur_idx))) { match_last = ((&mctx->input)->cur_idx); match = 1; p_match_first = ((void *)0); if (!fl_longest_match) break; } } } if (p_match_first) *p_match_first += next_start_idx; return match_last; } static int check_halt_node_context (const re_dfa_t *dfa, int node, unsigned int context) { re_token_type_t type = dfa->nodes[node].type; unsigned int constraint = dfa->nodes[node].constraint; if (type != END_OF_RE) return 0; if (!constraint) return 1; if (((((constraint) & 0x0004) && !((context) & 1)) || (((constraint) & 0x0008) && ((context) & 1)) || (((constraint) & 0x0020) && !((context) & (1 << 1))) || (((constraint) & 0x0080) && !((context) & (((1 << 1) << 1) << 1))))) return 0; return 1; } static int check_halt_state_context (const re_match_context_t *mctx, const re_dfastate_t *state, int idx) { int i; unsigned int context; context = re_string_context_at (&mctx->input, idx, mctx->eflags); for (i = 0; i < state->nodes.nelem; ++i) if (check_halt_node_context (mctx->dfa, state->nodes.elems[i], context)) return state->nodes.elems[i]; return 0; } static int proceed_next_node (const re_match_context_t *mctx, int nregs, regmatch_t *regs, int *pidx, int node, re_node_set *eps_via_nodes, struct re_fail_stack_t *fs) { const re_dfa_t *const dfa = mctx->dfa; int i, err; if (((dfa->nodes[node].type) & 8)) { re_node_set *cur_nodes = &mctx->state_log[*pidx]->nodes; re_node_set *edests = &dfa->edests[node]; int dest_node; err = re_node_set_insert (eps_via_nodes, node); if (__builtin_expect (err < 0, 0)) return -2; for (dest_node = -1, i = 0; i < edests->nelem; ++i) { int candidate = edests->elems[i]; if (!re_node_set_contains (cur_nodes, candidate)) continue; if (dest_node == -1) dest_node = candidate; else { if (re_node_set_contains (eps_via_nodes, dest_node)) return candidate; else if (fs != ((void *)0) && push_fail_stack (fs, *pidx, candidate, nregs, regs, eps_via_nodes)) return -2; break; } } return dest_node; } else { int naccepted = 0; re_token_type_t type = dfa->nodes[node].type; if (dfa->nodes[node].accept_mb) naccepted = check_node_accept_bytes (dfa, node, &mctx->input, *pidx); else if (type == OP_BACK_REF) { int subexp_idx = dfa->nodes[node].opr.idx + 1; naccepted = regs[subexp_idx].rm_eo - regs[subexp_idx].rm_so; if (fs != ((void *)0)) { if (regs[subexp_idx].rm_so == -1 || regs[subexp_idx].rm_eo == -1) return -1; else if (naccepted) { char *buf = (char *) ((&mctx->input)->mbs); if (memcmp (buf + regs[subexp_idx].rm_so, buf + *pidx, naccepted) != 0) return -1; } } if (naccepted == 0) { int dest_node; err = re_node_set_insert (eps_via_nodes, node); if (__builtin_expect (err < 0, 0)) return -2; dest_node = dfa->edests[node].elems[0]; if (re_node_set_contains (&mctx->state_log[*pidx]->nodes, dest_node)) return dest_node; } } if (naccepted != 0 || check_node_accept (mctx, dfa->nodes + node, *pidx)) { int dest_node = dfa->nexts[node]; *pidx = (naccepted == 0) ? *pidx + 1 : *pidx + naccepted; if (fs && (*pidx > mctx->match_last || mctx->state_log[*pidx] == ((void *)0) || !re_node_set_contains (&mctx->state_log[*pidx]->nodes, dest_node))) return -1; ((eps_via_nodes)->nelem = 0); return dest_node; } } return -1; } static reg_errcode_t push_fail_stack (struct re_fail_stack_t *fs, int str_idx, int dest_node, int nregs, regmatch_t *regs, re_node_set *eps_via_nodes) { reg_errcode_t err; int num = fs->num++; if (fs->num == fs->alloc) { struct re_fail_stack_ent_t *new_array; new_array = realloc (fs->stack, (sizeof (struct re_fail_stack_ent_t) * fs->alloc * 2)); if (new_array == ((void *)0)) return REG_ESPACE; fs->alloc *= 2; fs->stack = new_array; } fs->stack[num].idx = str_idx; fs->stack[num].node = dest_node; fs->stack[num].regs = ((regmatch_t *) malloc ((nregs) * sizeof (regmatch_t))); if (fs->stack[num].regs == ((void *)0)) return REG_ESPACE; memcpy (fs->stack[num].regs, regs, sizeof (regmatch_t) * nregs); err = re_node_set_init_copy (&fs->stack[num].eps_via_nodes, eps_via_nodes); return err; } static int pop_fail_stack (struct re_fail_stack_t *fs, int *pidx, int nregs, regmatch_t *regs, re_node_set *eps_via_nodes) { int num = --fs->num; ((num >= 0) ? (void) (0) : (__assert_fail ("num >= 0", "regexec.c", 1372, __PRETTY_FUNCTION__), (void) (0))); *pidx = fs->stack[num].idx; memcpy (regs, fs->stack[num].regs, sizeof (regmatch_t) * nregs); free ((eps_via_nodes)->elems); free (fs->stack[num].regs); *eps_via_nodes = fs->stack[num].eps_via_nodes; return fs->stack[num].node; } static reg_errcode_t set_regs (const regex_t *preg, const re_match_context_t *mctx, size_t nmatch, regmatch_t *pmatch, int fl_backtrack) { const re_dfa_t *dfa = (const re_dfa_t *) preg->buffer; int idx, cur_node; re_node_set eps_via_nodes; struct re_fail_stack_t *fs; struct re_fail_stack_t fs_body = { 0, 2, ((void *)0) }; regmatch_t *prev_idx_match; int prev_idx_match_malloced = 0; if (fl_backtrack) { fs = &fs_body; fs->stack = ((struct re_fail_stack_ent_t *) malloc ((fs->alloc) * sizeof (struct re_fail_stack_ent_t))); if (fs->stack == ((void *)0)) return REG_ESPACE; } else fs = ((void *)0); cur_node = dfa->init_node; memset (&eps_via_nodes, '\0', sizeof (re_node_set)); if (__libc_use_alloca (nmatch * sizeof (regmatch_t))) prev_idx_match = (regmatch_t *) __builtin_alloca (nmatch * sizeof (regmatch_t)); else { prev_idx_match = ((regmatch_t *) malloc ((nmatch) * sizeof (regmatch_t))); if (prev_idx_match == ((void *)0)) { free_fail_stack_return (fs); return REG_ESPACE; } prev_idx_match_malloced = 1; } memcpy (prev_idx_match, pmatch, sizeof (regmatch_t) * nmatch); for (idx = pmatch[0].rm_so; idx <= pmatch[0].rm_eo ;) { update_regs (dfa, pmatch, prev_idx_match, cur_node, idx, nmatch); if (idx == pmatch[0].rm_eo && cur_node == mctx->last_node) { int reg_idx; if (fs) { for (reg_idx = 0; reg_idx < nmatch; ++reg_idx) if (pmatch[reg_idx].rm_so > -1 && pmatch[reg_idx].rm_eo == -1) break; if (reg_idx == nmatch) { free ((&eps_via_nodes)->elems); if (prev_idx_match_malloced) free (prev_idx_match); return free_fail_stack_return (fs); } cur_node = pop_fail_stack (fs, &idx, nmatch, pmatch, &eps_via_nodes); } else { free ((&eps_via_nodes)->elems); if (prev_idx_match_malloced) free (prev_idx_match); return REG_NOERROR; } } cur_node = proceed_next_node (mctx, nmatch, pmatch, &idx, cur_node, &eps_via_nodes, fs); if (__builtin_expect (cur_node < 0, 0)) { if (__builtin_expect (cur_node == -2, 0)) { free ((&eps_via_nodes)->elems); if (prev_idx_match_malloced) free (prev_idx_match); free_fail_stack_return (fs); return REG_ESPACE; } if (fs) cur_node = pop_fail_stack (fs, &idx, nmatch, pmatch, &eps_via_nodes); else { free ((&eps_via_nodes)->elems); if (prev_idx_match_malloced) free (prev_idx_match); return REG_NOMATCH; } } } free ((&eps_via_nodes)->elems); if (prev_idx_match_malloced) free (prev_idx_match); return free_fail_stack_return (fs); } static reg_errcode_t free_fail_stack_return (struct re_fail_stack_t *fs) { if (fs) { int fs_idx; for (fs_idx = 0; fs_idx < fs->num; ++fs_idx) { free ((&fs->stack[fs_idx].eps_via_nodes)->elems); free (fs->stack[fs_idx].regs); } free (fs->stack); } return REG_NOERROR; } static void update_regs (const re_dfa_t *dfa, regmatch_t *pmatch, regmatch_t *prev_idx_match, int cur_node, int cur_idx, int nmatch) { int type = dfa->nodes[cur_node].type; if (type == OP_OPEN_SUBEXP) { int reg_num = dfa->nodes[cur_node].opr.idx + 1; if (reg_num < nmatch) { pmatch[reg_num].rm_so = cur_idx; pmatch[reg_num].rm_eo = -1; } } else if (type == OP_CLOSE_SUBEXP) { int reg_num = dfa->nodes[cur_node].opr.idx + 1; if (reg_num < nmatch) { if (pmatch[reg_num].rm_so < cur_idx) { pmatch[reg_num].rm_eo = cur_idx; memcpy (prev_idx_match, pmatch, sizeof (regmatch_t) * nmatch); } else { if (dfa->nodes[cur_node].opt_subexp && prev_idx_match[reg_num].rm_so != -1) memcpy (pmatch, prev_idx_match, sizeof (regmatch_t) * nmatch); else pmatch[reg_num].rm_eo = cur_idx; } } } } # 1582 "regexec.c" static reg_errcode_t sift_states_backward (const re_match_context_t *mctx, re_sift_context_t *sctx) { reg_errcode_t err; int null_cnt = 0; int str_idx = sctx->last_str_idx; re_node_set cur_dest; err = re_node_set_init_1 (&cur_dest, sctx->last_node); if (__builtin_expect (err != REG_NOERROR, 0)) return err; err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest); if (__builtin_expect (err != REG_NOERROR, 0)) goto free_return; while (str_idx > 0) { null_cnt = (sctx->sifted_states[str_idx] == ((void *)0)) ? null_cnt + 1 : 0; if (null_cnt > mctx->max_mb_elem_len) { memset (sctx->sifted_states, '\0', sizeof (re_dfastate_t *) * str_idx); free ((&cur_dest)->elems); return REG_NOERROR; } ((&cur_dest)->nelem = 0); --str_idx; if (mctx->state_log[str_idx]) { err = build_sifted_states (mctx, sctx, str_idx, &cur_dest); if (__builtin_expect (err != REG_NOERROR, 0)) goto free_return; } err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest); if (__builtin_expect (err != REG_NOERROR, 0)) goto free_return; } err = REG_NOERROR; free_return: free ((&cur_dest)->elems); return err; } static reg_errcode_t build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx, int str_idx, re_node_set *cur_dest) { const re_dfa_t *const dfa = mctx->dfa; const re_node_set *cur_src = &mctx->state_log[str_idx]->non_eps_nodes; int i; # 1656 "regexec.c" for (i = 0; i < cur_src->nelem; i++) { int prev_node = cur_src->elems[i]; int naccepted = 0; int ret; if (dfa->nodes[prev_node].accept_mb) naccepted = sift_states_iter_mb (mctx, sctx, prev_node, str_idx, sctx->last_str_idx); if (!naccepted && check_node_accept (mctx, dfa->nodes + prev_node, str_idx) && ((sctx->sifted_states[str_idx + 1]) != ((void *)0) && re_node_set_contains (&(sctx->sifted_states[str_idx + 1])->nodes, dfa->nexts[prev_node]))) naccepted = 1; if (naccepted == 0) continue; if (sctx->limits.nelem) { int to_idx = str_idx + naccepted; if (check_dst_limits (mctx, &sctx->limits, dfa->nexts[prev_node], to_idx, prev_node, str_idx)) continue; } ret = re_node_set_insert (cur_dest, prev_node); if (__builtin_expect (ret == -1, 0)) return REG_ESPACE; } return REG_NOERROR; } static reg_errcode_t clean_state_log_if_needed (re_match_context_t *mctx, int next_state_log_idx) { int top = mctx->state_log_top; if (next_state_log_idx >= mctx->input.bufs_len || (next_state_log_idx >= mctx->input.valid_len && mctx->input.valid_len < mctx->input.len)) { reg_errcode_t err; err = extend_buffers (mctx); if (__builtin_expect (err != REG_NOERROR, 0)) return err; } if (top < next_state_log_idx) { memset (mctx->state_log + top + 1, '\0', sizeof (re_dfastate_t *) * (next_state_log_idx - top)); mctx->state_log_top = next_state_log_idx; } return REG_NOERROR; } static reg_errcode_t merge_state_array (const re_dfa_t *dfa, re_dfastate_t **dst, re_dfastate_t **src, int num) { int st_idx; reg_errcode_t err; for (st_idx = 0; st_idx < num; ++st_idx) { if (dst[st_idx] == ((void *)0)) dst[st_idx] = src[st_idx]; else if (src[st_idx] != ((void *)0)) { re_node_set merged_set; err = re_node_set_init_union (&merged_set, &dst[st_idx]->nodes, &src[st_idx]->nodes); if (__builtin_expect (err != REG_NOERROR, 0)) return err; dst[st_idx] = re_acquire_state (&err, dfa, &merged_set); free ((&merged_set)->elems); if (__builtin_expect (err != REG_NOERROR, 0)) return err; } } return REG_NOERROR; } static reg_errcode_t update_cur_sifted_state (const re_match_context_t *mctx, re_sift_context_t *sctx, int str_idx, re_node_set *dest_nodes) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err = REG_NOERROR; const re_node_set *candidates; candidates = ((mctx->state_log[str_idx] == ((void *)0)) ? ((void *)0) : &mctx->state_log[str_idx]->nodes); if (dest_nodes->nelem == 0) sctx->sifted_states[str_idx] = ((void *)0); else { if (candidates) { err = add_epsilon_src_nodes (dfa, dest_nodes, candidates); if (__builtin_expect (err != REG_NOERROR, 0)) return err; if (sctx->limits.nelem) { err = check_subexp_limits (dfa, dest_nodes, candidates, &sctx->limits, mctx->bkref_ents, str_idx); if (__builtin_expect (err != REG_NOERROR, 0)) return err; } } sctx->sifted_states[str_idx] = re_acquire_state (&err, dfa, dest_nodes); if (__builtin_expect (err != REG_NOERROR, 0)) return err; } if (candidates && mctx->state_log[str_idx]->has_backref) { err = sift_states_bkref (mctx, sctx, str_idx, candidates); if (__builtin_expect (err != REG_NOERROR, 0)) return err; } return REG_NOERROR; } static reg_errcode_t add_epsilon_src_nodes (const re_dfa_t *dfa, re_node_set *dest_nodes, const re_node_set *candidates) { reg_errcode_t err = REG_NOERROR; int i; re_dfastate_t *state = re_acquire_state (&err, dfa, dest_nodes); if (__builtin_expect (err != REG_NOERROR, 0)) return err; if (!state->inveclosure.alloc) { err = re_node_set_alloc (&state->inveclosure, dest_nodes->nelem); if (__builtin_expect (err != REG_NOERROR, 0)) return REG_ESPACE; for (i = 0; i < dest_nodes->nelem; i++) re_node_set_merge (&state->inveclosure, dfa->inveclosures + dest_nodes->elems[i]); } return re_node_set_add_intersect (dest_nodes, candidates, &state->inveclosure); } static reg_errcode_t sub_epsilon_src_nodes (const re_dfa_t *dfa, int node, re_node_set *dest_nodes, const re_node_set *candidates) { int ecl_idx; reg_errcode_t err; re_node_set *inv_eclosure = dfa->inveclosures + node; re_node_set except_nodes; memset (&except_nodes, '\0', sizeof (re_node_set)); for (ecl_idx = 0; ecl_idx < inv_eclosure->nelem; ++ecl_idx) { int cur_node = inv_eclosure->elems[ecl_idx]; if (cur_node == node) continue; if (((dfa->nodes[cur_node].type) & 8)) { int edst1 = dfa->edests[cur_node].elems[0]; int edst2 = ((dfa->edests[cur_node].nelem > 1) ? dfa->edests[cur_node].elems[1] : -1); if ((!re_node_set_contains (inv_eclosure, edst1) && re_node_set_contains (dest_nodes, edst1)) || (edst2 > 0 && !re_node_set_contains (inv_eclosure, edst2) && re_node_set_contains (dest_nodes, edst2))) { err = re_node_set_add_intersect (&except_nodes, candidates, dfa->inveclosures + cur_node); if (__builtin_expect (err != REG_NOERROR, 0)) { free ((&except_nodes)->elems); return err; } } } } for (ecl_idx = 0; ecl_idx < inv_eclosure->nelem; ++ecl_idx) { int cur_node = inv_eclosure->elems[ecl_idx]; if (!re_node_set_contains (&except_nodes, cur_node)) { int idx = re_node_set_contains (dest_nodes, cur_node) - 1; re_node_set_remove_at (dest_nodes, idx); } } free ((&except_nodes)->elems); return REG_NOERROR; } static int check_dst_limits (const re_match_context_t *mctx, re_node_set *limits, int dst_node, int dst_idx, int src_node, int src_idx) { const re_dfa_t *const dfa = mctx->dfa; int lim_idx, src_pos, dst_pos; int dst_bkref_idx = search_cur_bkref_entry (mctx, dst_idx); int src_bkref_idx = search_cur_bkref_entry (mctx, src_idx); for (lim_idx = 0; lim_idx < limits->nelem; ++lim_idx) { int subexp_idx; struct re_backref_cache_entry *ent; ent = mctx->bkref_ents + limits->elems[lim_idx]; subexp_idx = dfa->nodes[ent->node].opr.idx; dst_pos = check_dst_limits_calc_pos (mctx, limits->elems[lim_idx], subexp_idx, dst_node, dst_idx, dst_bkref_idx); src_pos = check_dst_limits_calc_pos (mctx, limits->elems[lim_idx], subexp_idx, src_node, src_idx, src_bkref_idx); if (src_pos == dst_pos) continue; else return 1; } return 0; } static int check_dst_limits_calc_pos_1 (const re_match_context_t *mctx, int boundaries, int subexp_idx, int from_node, int bkref_idx) { const re_dfa_t *const dfa = mctx->dfa; const re_node_set *eclosures = dfa->eclosures + from_node; int node_idx; for (node_idx = 0; node_idx < eclosures->nelem; ++node_idx) { int node = eclosures->elems[node_idx]; switch (dfa->nodes[node].type) { case OP_BACK_REF: if (bkref_idx != -1) { struct re_backref_cache_entry *ent = mctx->bkref_ents + bkref_idx; do { int dst, cpos; if (ent->node != node) continue; if (subexp_idx < (sizeof (bitset_word_t) * 8) && !(ent->eps_reachable_subexps_map & ((bitset_word_t) 1 << subexp_idx))) continue; dst = dfa->edests[node].elems[0]; if (dst == from_node) { if (boundaries & 1) return -1; else return 0; } cpos = check_dst_limits_calc_pos_1 (mctx, boundaries, subexp_idx, dst, bkref_idx); if (cpos == -1 ) return -1; if (cpos == 0 && (boundaries & 2)) return 0; if (subexp_idx < (sizeof (bitset_word_t) * 8)) ent->eps_reachable_subexps_map &= ~((bitset_word_t) 1 << subexp_idx); } while (ent++->more); } break; case OP_OPEN_SUBEXP: if ((boundaries & 1) && subexp_idx == dfa->nodes[node].opr.idx) return -1; break; case OP_CLOSE_SUBEXP: if ((boundaries & 2) && subexp_idx == dfa->nodes[node].opr.idx) return 0; break; default: break; } } return (boundaries & 2) ? 1 : 0; } static int check_dst_limits_calc_pos (const re_match_context_t *mctx, int limit, int subexp_idx, int from_node, int str_idx, int bkref_idx) { struct re_backref_cache_entry *lim = mctx->bkref_ents + limit; int boundaries; if (str_idx < lim->subexp_from) return -1; if (lim->subexp_to < str_idx) return 1; boundaries = (str_idx == lim->subexp_from); boundaries |= (str_idx == lim->subexp_to) << 1; if (boundaries == 0) return 0; return check_dst_limits_calc_pos_1 (mctx, boundaries, subexp_idx, from_node, bkref_idx); } static reg_errcode_t check_subexp_limits (const re_dfa_t *dfa, re_node_set *dest_nodes, const re_node_set *candidates, re_node_set *limits, struct re_backref_cache_entry *bkref_ents, int str_idx) { reg_errcode_t err; int node_idx, lim_idx; for (lim_idx = 0; lim_idx < limits->nelem; ++lim_idx) { int subexp_idx; struct re_backref_cache_entry *ent; ent = bkref_ents + limits->elems[lim_idx]; if (str_idx <= ent->subexp_from || ent->str_idx < str_idx) continue; subexp_idx = dfa->nodes[ent->node].opr.idx; if (ent->subexp_to == str_idx) { int ops_node = -1; int cls_node = -1; for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx) { int node = dest_nodes->elems[node_idx]; re_token_type_t type = dfa->nodes[node].type; if (type == OP_OPEN_SUBEXP && subexp_idx == dfa->nodes[node].opr.idx) ops_node = node; else if (type == OP_CLOSE_SUBEXP && subexp_idx == dfa->nodes[node].opr.idx) cls_node = node; } if (ops_node >= 0) { err = sub_epsilon_src_nodes (dfa, ops_node, dest_nodes, candidates); if (__builtin_expect (err != REG_NOERROR, 0)) return err; } if (cls_node >= 0) for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx) { int node = dest_nodes->elems[node_idx]; if (!re_node_set_contains (dfa->inveclosures + node, cls_node) && !re_node_set_contains (dfa->eclosures + node, cls_node)) { err = sub_epsilon_src_nodes (dfa, node, dest_nodes, candidates); if (__builtin_expect (err != REG_NOERROR, 0)) return err; --node_idx; } } } else { for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx) { int node = dest_nodes->elems[node_idx]; re_token_type_t type = dfa->nodes[node].type; if (type == OP_CLOSE_SUBEXP || type == OP_OPEN_SUBEXP) { if (subexp_idx != dfa->nodes[node].opr.idx) continue; err = sub_epsilon_src_nodes (dfa, node, dest_nodes, candidates); if (__builtin_expect (err != REG_NOERROR, 0)) return err; } } } } return REG_NOERROR; } static reg_errcode_t sift_states_bkref (const re_match_context_t *mctx, re_sift_context_t *sctx, int str_idx, const re_node_set *candidates) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; int node_idx, node; re_sift_context_t local_sctx; int first_idx = search_cur_bkref_entry (mctx, str_idx); if (first_idx == -1) return REG_NOERROR; local_sctx.sifted_states = ((void *)0); for (node_idx = 0; node_idx < candidates->nelem; ++node_idx) { int enabled_idx; re_token_type_t type; struct re_backref_cache_entry *entry; node = candidates->elems[node_idx]; type = dfa->nodes[node].type; if (node == sctx->last_node && str_idx == sctx->last_str_idx) continue; if (type != OP_BACK_REF) continue; entry = mctx->bkref_ents + first_idx; enabled_idx = first_idx; do { int subexp_len; int to_idx; int dst_node; int ret; re_dfastate_t *cur_state; if (entry->node != node) continue; subexp_len = entry->subexp_to - entry->subexp_from; to_idx = str_idx + subexp_len; dst_node = (subexp_len ? dfa->nexts[node] : dfa->edests[node].elems[0]); if (to_idx > sctx->last_str_idx || sctx->sifted_states[to_idx] == ((void *)0) || !((sctx->sifted_states[to_idx]) != ((void *)0) && re_node_set_contains (&(sctx->sifted_states[to_idx])->nodes, dst_node)) || check_dst_limits (mctx, &sctx->limits, node, str_idx, dst_node, to_idx)) continue; if (local_sctx.sifted_states == ((void *)0)) { local_sctx = *sctx; err = re_node_set_init_copy (&local_sctx.limits, &sctx->limits); if (__builtin_expect (err != REG_NOERROR, 0)) goto free_return; } local_sctx.last_node = node; local_sctx.last_str_idx = str_idx; ret = re_node_set_insert (&local_sctx.limits, enabled_idx); if (__builtin_expect (ret < 0, 0)) { err = REG_ESPACE; goto free_return; } cur_state = local_sctx.sifted_states[str_idx]; err = sift_states_backward (mctx, &local_sctx); if (__builtin_expect (err != REG_NOERROR, 0)) goto free_return; if (sctx->limited_states != ((void *)0)) { err = merge_state_array (dfa, sctx->limited_states, local_sctx.sifted_states, str_idx + 1); if (__builtin_expect (err != REG_NOERROR, 0)) goto free_return; } local_sctx.sifted_states[str_idx] = cur_state; (re_node_set_remove_at (&local_sctx.limits, re_node_set_contains (&local_sctx.limits, enabled_idx) - 1)); entry = mctx->bkref_ents + enabled_idx; } while (enabled_idx++, entry++->more); } err = REG_NOERROR; free_return: if (local_sctx.sifted_states != ((void *)0)) { free ((&local_sctx.limits)->elems); } return err; } static int sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx, int node_idx, int str_idx, int max_str_idx) { const re_dfa_t *const dfa = mctx->dfa; int naccepted; naccepted = check_node_accept_bytes (dfa, node_idx, &mctx->input, str_idx); if (naccepted > 0 && str_idx + naccepted <= max_str_idx && !((sctx->sifted_states[str_idx + naccepted]) != ((void *)0) && re_node_set_contains (&(sctx->sifted_states[str_idx + naccepted])->nodes, dfa->nexts[node_idx]))) naccepted = 0; return naccepted; } # 2241 "regexec.c" static re_dfastate_t * transit_state (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *state) { re_dfastate_t **trtable; unsigned char ch; if (__builtin_expect (state->accept_mb, 0)) { *err = transit_state_mb (mctx, state); if (__builtin_expect (*err != REG_NOERROR, 0)) return ((void *)0); } # 2267 "regexec.c" ch = ((&mctx->input)->mbs[(&mctx->input)->cur_idx++]); for (;;) { trtable = state->trtable; if (__builtin_expect (trtable != ((void *)0), 1)) return trtable[ch]; trtable = state->word_trtable; if (__builtin_expect (trtable != ((void *)0), 1)) { unsigned int context; context = re_string_context_at (&mctx->input, ((&mctx->input)->cur_idx) - 1, mctx->eflags); if (((context) & 1)) return trtable[ch + 256]; else return trtable[ch]; } if (!build_trtable (mctx->dfa, state)) { *err = REG_ESPACE; return ((void *)0); } } } re_dfastate_t * merge_state_with_log (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *next_state) { const re_dfa_t *const dfa = mctx->dfa; int cur_idx = ((&mctx->input)->cur_idx); if (cur_idx > mctx->state_log_top) { mctx->state_log[cur_idx] = next_state; mctx->state_log_top = cur_idx; } else if (mctx->state_log[cur_idx] == 0) { mctx->state_log[cur_idx] = next_state; } else { re_dfastate_t *pstate; unsigned int context; re_node_set next_nodes, *log_nodes, *table_nodes = ((void *)0); pstate = mctx->state_log[cur_idx]; log_nodes = pstate->entrance_nodes; if (next_state != ((void *)0)) { table_nodes = next_state->entrance_nodes; *err = re_node_set_init_union (&next_nodes, table_nodes, log_nodes); if (__builtin_expect (*err != REG_NOERROR, 0)) return ((void *)0); } else next_nodes = *log_nodes; context = re_string_context_at (&mctx->input, ((&mctx->input)->cur_idx) - 1, mctx->eflags); next_state = mctx->state_log[cur_idx] = re_acquire_state_context (err, dfa, &next_nodes, context); if (table_nodes != ((void *)0)) free ((&next_nodes)->elems); } if (__builtin_expect (dfa->nbackref, 0) && next_state != ((void *)0)) { *err = check_subexp_matching_top (mctx, &next_state->nodes, cur_idx); if (__builtin_expect (*err != REG_NOERROR, 0)) return ((void *)0); if (next_state->has_backref) { *err = transit_state_bkref (mctx, &next_state->nodes); if (__builtin_expect (*err != REG_NOERROR, 0)) return ((void *)0); next_state = mctx->state_log[cur_idx]; } } return next_state; } re_dfastate_t * find_recover_state (reg_errcode_t *err, re_match_context_t *mctx) { re_dfastate_t *cur_state; do { int max = mctx->state_log_top; int cur_str_idx = ((&mctx->input)->cur_idx); do { if (++cur_str_idx > max) return ((void *)0); ((&mctx->input)->cur_idx += (1)); } while (mctx->state_log[cur_str_idx] == ((void *)0)); cur_state = merge_state_with_log (err, mctx, ((void *)0)); } while (*err == REG_NOERROR && cur_state == ((void *)0)); return cur_state; } # 2409 "regexec.c" static reg_errcode_t check_subexp_matching_top (re_match_context_t *mctx, re_node_set *cur_nodes, int str_idx) { const re_dfa_t *const dfa = mctx->dfa; int node_idx; reg_errcode_t err; for (node_idx = 0; node_idx < cur_nodes->nelem; ++node_idx) { int node = cur_nodes->elems[node_idx]; if (dfa->nodes[node].type == OP_OPEN_SUBEXP && dfa->nodes[node].opr.idx < (sizeof (bitset_word_t) * 8) && (dfa->used_bkref_map & ((bitset_word_t) 1 << dfa->nodes[node].opr.idx))) { err = match_ctx_add_subtop (mctx, node, str_idx); if (__builtin_expect (err != REG_NOERROR, 0)) return err; } } return REG_NOERROR; } # 2482 "regexec.c" static reg_errcode_t transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; int i; for (i = 0; i < pstate->nodes.nelem; ++i) { re_node_set dest_nodes, *new_nodes; int cur_node_idx = pstate->nodes.elems[i]; int naccepted, dest_idx; unsigned int context; re_dfastate_t *dest_state; if (!dfa->nodes[cur_node_idx].accept_mb) continue; if (dfa->nodes[cur_node_idx].constraint) { context = re_string_context_at (&mctx->input, ((&mctx->input)->cur_idx), mctx->eflags); if (((((dfa->nodes[cur_node_idx].constraint) & 0x0004) && !((context) & 1)) || (((dfa->nodes[cur_node_idx].constraint) & 0x0008) && ((context) & 1)) || (((dfa->nodes[cur_node_idx].constraint) & 0x0020) && !((context) & (1 << 1))) || (((dfa->nodes[cur_node_idx].constraint) & 0x0080) && !((context) & (((1 << 1) << 1) << 1))))) continue; } naccepted = check_node_accept_bytes (dfa, cur_node_idx, &mctx->input, ((&mctx->input)->cur_idx)); if (naccepted == 0) continue; dest_idx = ((&mctx->input)->cur_idx) + naccepted; mctx->max_mb_elem_len = ((mctx->max_mb_elem_len < naccepted) ? naccepted : mctx->max_mb_elem_len); err = clean_state_log_if_needed (mctx, dest_idx); if (__builtin_expect (err != REG_NOERROR, 0)) return err; new_nodes = dfa->eclosures + dfa->nexts[cur_node_idx]; dest_state = mctx->state_log[dest_idx]; if (dest_state == ((void *)0)) dest_nodes = *new_nodes; else { err = re_node_set_init_union (&dest_nodes, dest_state->entrance_nodes, new_nodes); if (__builtin_expect (err != REG_NOERROR, 0)) return err; } context = re_string_context_at (&mctx->input, dest_idx - 1, mctx->eflags); mctx->state_log[dest_idx] = re_acquire_state_context (&err, dfa, &dest_nodes, context); if (dest_state != ((void *)0)) free ((&dest_nodes)->elems); if (__builtin_expect (mctx->state_log[dest_idx] == ((void *)0) && err != REG_NOERROR, 0)) return err; } return REG_NOERROR; } static reg_errcode_t transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; int i; int cur_str_idx = ((&mctx->input)->cur_idx); for (i = 0; i < nodes->nelem; ++i) { int dest_str_idx, prev_nelem, bkc_idx; int node_idx = nodes->elems[i]; unsigned int context; const re_token_t *node = dfa->nodes + node_idx; re_node_set *new_dest_nodes; if (node->type != OP_BACK_REF) continue; if (node->constraint) { context = re_string_context_at (&mctx->input, cur_str_idx, mctx->eflags); if (((((node->constraint) & 0x0004) && !((context) & 1)) || (((node->constraint) & 0x0008) && ((context) & 1)) || (((node->constraint) & 0x0020) && !((context) & (1 << 1))) || (((node->constraint) & 0x0080) && !((context) & (((1 << 1) << 1) << 1))))) continue; } bkc_idx = mctx->nbkref_ents; err = get_subexp (mctx, node_idx, cur_str_idx); if (__builtin_expect (err != REG_NOERROR, 0)) goto free_return; for (; bkc_idx < mctx->nbkref_ents; ++bkc_idx) { int subexp_len; re_dfastate_t *dest_state; struct re_backref_cache_entry *bkref_ent; bkref_ent = mctx->bkref_ents + bkc_idx; if (bkref_ent->node != node_idx || bkref_ent->str_idx != cur_str_idx) continue; subexp_len = bkref_ent->subexp_to - bkref_ent->subexp_from; new_dest_nodes = (subexp_len == 0 ? dfa->eclosures + dfa->edests[node_idx].elems[0] : dfa->eclosures + dfa->nexts[node_idx]); dest_str_idx = (cur_str_idx + bkref_ent->subexp_to - bkref_ent->subexp_from); context = re_string_context_at (&mctx->input, dest_str_idx - 1, mctx->eflags); dest_state = mctx->state_log[dest_str_idx]; prev_nelem = ((mctx->state_log[cur_str_idx] == ((void *)0)) ? 0 : mctx->state_log[cur_str_idx]->nodes.nelem); if (dest_state == ((void *)0)) { mctx->state_log[dest_str_idx] = re_acquire_state_context (&err, dfa, new_dest_nodes, context); if (__builtin_expect (mctx->state_log[dest_str_idx] == ((void *)0) && err != REG_NOERROR, 0)) goto free_return; } else { re_node_set dest_nodes; err = re_node_set_init_union (&dest_nodes, dest_state->entrance_nodes, new_dest_nodes); if (__builtin_expect (err != REG_NOERROR, 0)) { free ((&dest_nodes)->elems); goto free_return; } mctx->state_log[dest_str_idx] = re_acquire_state_context (&err, dfa, &dest_nodes, context); free ((&dest_nodes)->elems); if (__builtin_expect (mctx->state_log[dest_str_idx] == ((void *)0) && err != REG_NOERROR, 0)) goto free_return; } if (subexp_len == 0 && mctx->state_log[cur_str_idx]->nodes.nelem > prev_nelem) { err = check_subexp_matching_top (mctx, new_dest_nodes, cur_str_idx); if (__builtin_expect (err != REG_NOERROR, 0)) goto free_return; err = transit_state_bkref (mctx, new_dest_nodes); if (__builtin_expect (err != REG_NOERROR, 0)) goto free_return; } } } err = REG_NOERROR; free_return: return err; } static reg_errcode_t get_subexp (re_match_context_t *mctx, int bkref_node, int bkref_str_idx) { const re_dfa_t *const dfa = mctx->dfa; int subexp_num, sub_top_idx; const char *buf = (const char *) ((&mctx->input)->mbs); int cache_idx = search_cur_bkref_entry (mctx, bkref_str_idx); if (cache_idx != -1) { const struct re_backref_cache_entry *entry = mctx->bkref_ents + cache_idx; do if (entry->node == bkref_node) return REG_NOERROR; while (entry++->more); } subexp_num = dfa->nodes[bkref_node].opr.idx; for (sub_top_idx = 0; sub_top_idx < mctx->nsub_tops; ++sub_top_idx) { reg_errcode_t err; re_sub_match_top_t *sub_top = mctx->sub_tops[sub_top_idx]; re_sub_match_last_t *sub_last; int sub_last_idx, sl_str, bkref_str_off; if (dfa->nodes[sub_top->node].opr.idx != subexp_num) continue; sl_str = sub_top->str_idx; bkref_str_off = bkref_str_idx; for (sub_last_idx = 0; sub_last_idx < sub_top->nlasts; ++sub_last_idx) { int sl_str_diff; sub_last = sub_top->lasts[sub_last_idx]; sl_str_diff = sub_last->str_idx - sl_str; if (sl_str_diff > 0) { if (__builtin_expect (bkref_str_off + sl_str_diff > mctx->input.valid_len, 0)) { if (bkref_str_off + sl_str_diff > mctx->input.len) break; err = clean_state_log_if_needed (mctx, bkref_str_off + sl_str_diff); if (__builtin_expect (err != REG_NOERROR, 0)) return err; buf = (const char *) ((&mctx->input)->mbs); } if (memcmp (buf + bkref_str_off, buf + sl_str, sl_str_diff) != 0) break; } bkref_str_off += sl_str_diff; sl_str += sl_str_diff; err = get_subexp_sub (mctx, sub_top, sub_last, bkref_node, bkref_str_idx); buf = (const char *) ((&mctx->input)->mbs); if (err == REG_NOMATCH) continue; if (__builtin_expect (err != REG_NOERROR, 0)) return err; } if (sub_last_idx < sub_top->nlasts) continue; if (sub_last_idx > 0) ++sl_str; for (; sl_str <= bkref_str_idx; ++sl_str) { int cls_node, sl_str_off; const re_node_set *nodes; sl_str_off = sl_str - sub_top->str_idx; if (sl_str_off > 0) { if (__builtin_expect (bkref_str_off >= mctx->input.valid_len, 0)) { if (bkref_str_off >= mctx->input.len) break; err = extend_buffers (mctx); if (__builtin_expect (err != REG_NOERROR, 0)) return err; buf = (const char *) ((&mctx->input)->mbs); } if (buf [bkref_str_off++] != buf[sl_str - 1]) break; } if (mctx->state_log[sl_str] == ((void *)0)) continue; nodes = &mctx->state_log[sl_str]->nodes; cls_node = find_subexp_node (dfa, nodes, subexp_num, OP_CLOSE_SUBEXP); if (cls_node == -1) continue; if (sub_top->path == ((void *)0)) { sub_top->path = calloc (sizeof (state_array_t), sl_str - sub_top->str_idx + 1); if (sub_top->path == ((void *)0)) return REG_ESPACE; } err = check_arrival (mctx, sub_top->path, sub_top->node, sub_top->str_idx, cls_node, sl_str, OP_CLOSE_SUBEXP); if (err == REG_NOMATCH) continue; if (__builtin_expect (err != REG_NOERROR, 0)) return err; sub_last = match_ctx_add_sublast (sub_top, cls_node, sl_str); if (__builtin_expect (sub_last == ((void *)0), 0)) return REG_ESPACE; err = get_subexp_sub (mctx, sub_top, sub_last, bkref_node, bkref_str_idx); if (err == REG_NOMATCH) continue; } } return REG_NOERROR; } static reg_errcode_t get_subexp_sub (re_match_context_t *mctx, const re_sub_match_top_t *sub_top, re_sub_match_last_t *sub_last, int bkref_node, int bkref_str) { reg_errcode_t err; int to_idx; err = check_arrival (mctx, &sub_last->path, sub_last->node, sub_last->str_idx, bkref_node, bkref_str, OP_OPEN_SUBEXP); if (err != REG_NOERROR) return err; err = match_ctx_add_entry (mctx, bkref_node, bkref_str, sub_top->str_idx, sub_last->str_idx); if (__builtin_expect (err != REG_NOERROR, 0)) return err; to_idx = bkref_str + sub_last->str_idx - sub_top->str_idx; return clean_state_log_if_needed (mctx, to_idx); } # 2844 "regexec.c" static int find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes, int subexp_idx, int type) { int cls_idx; for (cls_idx = 0; cls_idx < nodes->nelem; ++cls_idx) { int cls_node = nodes->elems[cls_idx]; const re_token_t *node = dfa->nodes + cls_node; if (node->type == type && node->opr.idx == subexp_idx) return cls_node; } return -1; } static reg_errcode_t check_arrival (re_match_context_t *mctx, state_array_t *path, int top_node, int top_str, int last_node, int last_str, int type) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err = REG_NOERROR; int subexp_num, backup_cur_idx, str_idx, null_cnt; re_dfastate_t *cur_state = ((void *)0); re_node_set *cur_nodes, next_nodes; re_dfastate_t **backup_state_log; unsigned int context; subexp_num = dfa->nodes[top_node].opr.idx; if (__builtin_expect (path->alloc < last_str + mctx->max_mb_elem_len + 1, 0)) { re_dfastate_t **new_array; int old_alloc = path->alloc; path->alloc += last_str + mctx->max_mb_elem_len + 1; new_array = ((re_dfastate_t * *) realloc (path->array, (path->alloc) * sizeof (re_dfastate_t *))); if (__builtin_expect (new_array == ((void *)0), 0)) { path->alloc = old_alloc; return REG_ESPACE; } path->array = new_array; memset (new_array + old_alloc, '\0', sizeof (re_dfastate_t *) * (path->alloc - old_alloc)); } str_idx = path->next_idx ?: top_str; backup_state_log = mctx->state_log; backup_cur_idx = mctx->input.cur_idx; mctx->state_log = path->array; mctx->input.cur_idx = str_idx; context = re_string_context_at (&mctx->input, str_idx - 1, mctx->eflags); if (str_idx == top_str) { err = re_node_set_init_1 (&next_nodes, top_node); if (__builtin_expect (err != REG_NOERROR, 0)) return err; err = check_arrival_expand_ecl (dfa, &next_nodes, subexp_num, type); if (__builtin_expect (err != REG_NOERROR, 0)) { free ((&next_nodes)->elems); return err; } } else { cur_state = mctx->state_log[str_idx]; if (cur_state && cur_state->has_backref) { err = re_node_set_init_copy (&next_nodes, &cur_state->nodes); if (__builtin_expect (err != REG_NOERROR, 0)) return err; } else memset (&next_nodes, '\0', sizeof (re_node_set)); } if (str_idx == top_str || (cur_state && cur_state->has_backref)) { if (next_nodes.nelem) { err = expand_bkref_cache (mctx, &next_nodes, str_idx, subexp_num, type); if (__builtin_expect (err != REG_NOERROR, 0)) { free ((&next_nodes)->elems); return err; } } cur_state = re_acquire_state_context (&err, dfa, &next_nodes, context); if (__builtin_expect (cur_state == ((void *)0) && err != REG_NOERROR, 0)) { free ((&next_nodes)->elems); return err; } mctx->state_log[str_idx] = cur_state; } for (null_cnt = 0; str_idx < last_str && null_cnt <= mctx->max_mb_elem_len;) { ((&next_nodes)->nelem = 0); if (mctx->state_log[str_idx + 1]) { err = re_node_set_merge (&next_nodes, &mctx->state_log[str_idx + 1]->nodes); if (__builtin_expect (err != REG_NOERROR, 0)) { free ((&next_nodes)->elems); return err; } } if (cur_state) { err = check_arrival_add_next_nodes (mctx, str_idx, &cur_state->non_eps_nodes, &next_nodes); if (__builtin_expect (err != REG_NOERROR, 0)) { free ((&next_nodes)->elems); return err; } } ++str_idx; if (next_nodes.nelem) { err = check_arrival_expand_ecl (dfa, &next_nodes, subexp_num, type); if (__builtin_expect (err != REG_NOERROR, 0)) { free ((&next_nodes)->elems); return err; } err = expand_bkref_cache (mctx, &next_nodes, str_idx, subexp_num, type); if (__builtin_expect (err != REG_NOERROR, 0)) { free ((&next_nodes)->elems); return err; } } context = re_string_context_at (&mctx->input, str_idx - 1, mctx->eflags); cur_state = re_acquire_state_context (&err, dfa, &next_nodes, context); if (__builtin_expect (cur_state == ((void *)0) && err != REG_NOERROR, 0)) { free ((&next_nodes)->elems); return err; } mctx->state_log[str_idx] = cur_state; null_cnt = cur_state == ((void *)0) ? null_cnt + 1 : 0; } free ((&next_nodes)->elems); cur_nodes = (mctx->state_log[last_str] == ((void *)0) ? ((void *)0) : &mctx->state_log[last_str]->nodes); path->next_idx = str_idx; mctx->state_log = backup_state_log; mctx->input.cur_idx = backup_cur_idx; if (cur_nodes != ((void *)0) && re_node_set_contains (cur_nodes, last_node)) return REG_NOERROR; return REG_NOMATCH; } # 3027 "regexec.c" static reg_errcode_t check_arrival_add_next_nodes (re_match_context_t *mctx, int str_idx, re_node_set *cur_nodes, re_node_set *next_nodes) { const re_dfa_t *const dfa = mctx->dfa; int result; int cur_idx; reg_errcode_t err = REG_NOERROR; re_node_set union_set; memset (&union_set, '\0', sizeof (re_node_set)); for (cur_idx = 0; cur_idx < cur_nodes->nelem; ++cur_idx) { int naccepted = 0; int cur_node = cur_nodes->elems[cur_idx]; if (dfa->nodes[cur_node].accept_mb) { naccepted = check_node_accept_bytes (dfa, cur_node, &mctx->input, str_idx); if (naccepted > 1) { re_dfastate_t *dest_state; int next_node = dfa->nexts[cur_node]; int next_idx = str_idx + naccepted; dest_state = mctx->state_log[next_idx]; ((&union_set)->nelem = 0); if (dest_state) { err = re_node_set_merge (&union_set, &dest_state->nodes); if (__builtin_expect (err != REG_NOERROR, 0)) { free ((&union_set)->elems); return err; } } result = re_node_set_insert (&union_set, next_node); if (__builtin_expect (result < 0, 0)) { free ((&union_set)->elems); return REG_ESPACE; } mctx->state_log[next_idx] = re_acquire_state (&err, dfa, &union_set); if (__builtin_expect (mctx->state_log[next_idx] == ((void *)0) && err != REG_NOERROR, 0)) { free ((&union_set)->elems); return err; } } } if (naccepted || check_node_accept (mctx, dfa->nodes + cur_node, str_idx)) { result = re_node_set_insert (next_nodes, dfa->nexts[cur_node]); if (__builtin_expect (result < 0, 0)) { free ((&union_set)->elems); return REG_ESPACE; } } } free ((&union_set)->elems); return REG_NOERROR; } static reg_errcode_t check_arrival_expand_ecl (const re_dfa_t *dfa, re_node_set *cur_nodes, int ex_subexp, int type) { reg_errcode_t err; int idx, outside_node; re_node_set new_nodes; err = re_node_set_alloc (&new_nodes, cur_nodes->nelem); if (__builtin_expect (err != REG_NOERROR, 0)) return err; for (idx = 0; idx < cur_nodes->nelem; ++idx) { int cur_node = cur_nodes->elems[idx]; const re_node_set *eclosure = dfa->eclosures + cur_node; outside_node = find_subexp_node (dfa, eclosure, ex_subexp, type); if (outside_node == -1) { err = re_node_set_merge (&new_nodes, eclosure); if (__builtin_expect (err != REG_NOERROR, 0)) { free ((&new_nodes)->elems); return err; } } else { err = check_arrival_expand_ecl_sub (dfa, &new_nodes, cur_node, ex_subexp, type); if (__builtin_expect (err != REG_NOERROR, 0)) { free ((&new_nodes)->elems); return err; } } } free ((cur_nodes)->elems); *cur_nodes = new_nodes; return REG_NOERROR; } static reg_errcode_t check_arrival_expand_ecl_sub (const re_dfa_t *dfa, re_node_set *dst_nodes, int target, int ex_subexp, int type) { int cur_node; for (cur_node = target; !re_node_set_contains (dst_nodes, cur_node);) { int err; if (dfa->nodes[cur_node].type == type && dfa->nodes[cur_node].opr.idx == ex_subexp) { if (type == OP_CLOSE_SUBEXP) { err = re_node_set_insert (dst_nodes, cur_node); if (__builtin_expect (err == -1, 0)) return REG_ESPACE; } break; } err = re_node_set_insert (dst_nodes, cur_node); if (__builtin_expect (err == -1, 0)) return REG_ESPACE; if (dfa->edests[cur_node].nelem == 0) break; if (dfa->edests[cur_node].nelem == 2) { err = check_arrival_expand_ecl_sub (dfa, dst_nodes, dfa->edests[cur_node].elems[1], ex_subexp, type); if (__builtin_expect (err != REG_NOERROR, 0)) return err; } cur_node = dfa->edests[cur_node].elems[0]; } return REG_NOERROR; } static reg_errcode_t expand_bkref_cache (re_match_context_t *mctx, re_node_set *cur_nodes, int cur_str, int subexp_num, int type) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; int cache_idx_start = search_cur_bkref_entry (mctx, cur_str); struct re_backref_cache_entry *ent; if (cache_idx_start == -1) return REG_NOERROR; restart: ent = mctx->bkref_ents + cache_idx_start; do { int to_idx, next_node; if (!re_node_set_contains (cur_nodes, ent->node)) continue; to_idx = cur_str + ent->subexp_to - ent->subexp_from; if (to_idx == cur_str) { re_node_set new_dests; reg_errcode_t err2, err3; next_node = dfa->edests[ent->node].elems[0]; if (re_node_set_contains (cur_nodes, next_node)) continue; err = re_node_set_init_1 (&new_dests, next_node); err2 = check_arrival_expand_ecl (dfa, &new_dests, subexp_num, type); err3 = re_node_set_merge (cur_nodes, &new_dests); free ((&new_dests)->elems); if (__builtin_expect (err != REG_NOERROR || err2 != REG_NOERROR || err3 != REG_NOERROR, 0)) { err = (err != REG_NOERROR ? err : (err2 != REG_NOERROR ? err2 : err3)); return err; } goto restart; } else { re_node_set union_set; next_node = dfa->nexts[ent->node]; if (mctx->state_log[to_idx]) { int ret; if (re_node_set_contains (&mctx->state_log[to_idx]->nodes, next_node)) continue; err = re_node_set_init_copy (&union_set, &mctx->state_log[to_idx]->nodes); ret = re_node_set_insert (&union_set, next_node); if (__builtin_expect (err != REG_NOERROR || ret < 0, 0)) { free ((&union_set)->elems); err = err != REG_NOERROR ? err : REG_ESPACE; return err; } } else { err = re_node_set_init_1 (&union_set, next_node); if (__builtin_expect (err != REG_NOERROR, 0)) return err; } mctx->state_log[to_idx] = re_acquire_state (&err, dfa, &union_set); free ((&union_set)->elems); if (__builtin_expect (mctx->state_log[to_idx] == ((void *)0) && err != REG_NOERROR, 0)) return err; } } while (ent++->more); return REG_NOERROR; } static int build_trtable (const re_dfa_t *dfa, re_dfastate_t *state) { reg_errcode_t err; int i, j, ch, need_word_trtable = 0; bitset_word_t elem, mask; _Bool dests_node_malloced = 0; _Bool dest_states_malloced = 0; int ndests; re_dfastate_t **trtable; re_dfastate_t **dest_states = ((void *)0), **dest_states_word, **dest_states_nl; re_node_set follows, *dests_node; bitset_t *dests_ch; bitset_t acceptable; struct dests_alloc { re_node_set dests_node[256]; bitset_t dests_ch[256]; } *dests_alloc; if (__libc_use_alloca (sizeof (struct dests_alloc))) dests_alloc = (struct dests_alloc *) __builtin_alloca (sizeof (struct dests_alloc)); else { dests_alloc = ((struct dests_alloc *) malloc ((1) * sizeof (struct dests_alloc))); if (__builtin_expect (dests_alloc == ((void *)0), 0)) return 0; dests_node_malloced = 1; } dests_node = dests_alloc->dests_node; dests_ch = dests_alloc->dests_ch; state->word_trtable = state->trtable = ((void *)0); ndests = group_nodes_into_DFAstates (dfa, state, dests_node, dests_ch); if (__builtin_expect (ndests <= 0, 0)) { if (dests_node_malloced) free (dests_alloc); if (ndests == 0) { state->trtable = (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), 256); return 1; } return 0; } err = re_node_set_alloc (&follows, ndests + 1); if (__builtin_expect (err != REG_NOERROR, 0)) goto out_free; if (__libc_use_alloca ((sizeof (re_node_set) + sizeof (bitset_t)) * 256 + ndests * 3 * sizeof (re_dfastate_t *))) dest_states = (re_dfastate_t **) __builtin_alloca (ndests * 3 * sizeof (re_dfastate_t *)); else { dest_states = (re_dfastate_t **) malloc (ndests * 3 * sizeof (re_dfastate_t *)); if (__builtin_expect (dest_states == ((void *)0), 0)) { out_free: if (dest_states_malloced) free (dest_states); free ((&follows)->elems); for (i = 0; i < ndests; ++i) free ((dests_node + i)->elems); if (dests_node_malloced) free (dests_alloc); return 0; } dest_states_malloced = 1; } dest_states_word = dest_states + ndests; dest_states_nl = dest_states_word + ndests; memset (acceptable, '\0', sizeof (bitset_t)); for (i = 0; i < ndests; ++i) { int next_node; ((&follows)->nelem = 0); for (j = 0; j < dests_node[i].nelem; ++j) { next_node = dfa->nexts[dests_node[i].elems[j]]; if (next_node != -1) { err = re_node_set_merge (&follows, dfa->eclosures + next_node); if (__builtin_expect (err != REG_NOERROR, 0)) goto out_free; } } dest_states[i] = re_acquire_state_context (&err, dfa, &follows, 0); if (__builtin_expect (dest_states[i] == ((void *)0) && err != REG_NOERROR, 0)) goto out_free; if (dest_states[i]->has_constraint) { dest_states_word[i] = re_acquire_state_context (&err, dfa, &follows, 1); if (__builtin_expect (dest_states_word[i] == ((void *)0) && err != REG_NOERROR, 0)) goto out_free; if (dest_states[i] != dest_states_word[i] && dfa->mb_cur_max > 1) need_word_trtable = 1; dest_states_nl[i] = re_acquire_state_context (&err, dfa, &follows, (1 << 1)); if (__builtin_expect (dest_states_nl[i] == ((void *)0) && err != REG_NOERROR, 0)) goto out_free; } else { dest_states_word[i] = dest_states[i]; dest_states_nl[i] = dest_states[i]; } bitset_merge (acceptable, dests_ch[i]); } if (!__builtin_expect (need_word_trtable, 0)) { trtable = state->trtable = (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), 256); if (__builtin_expect (trtable == ((void *)0), 0)) goto out_free; for (i = 0; i < (256 / (sizeof (bitset_word_t) * 8)); ++i) for (ch = i * (sizeof (bitset_word_t) * 8), elem = acceptable[i], mask = 1; elem; mask <<= 1, elem >>= 1, ++ch) if (__builtin_expect (elem & 1, 0)) { for (j = 0; (dests_ch[j][i] & mask) == 0; ++j) ; if (dfa->word_char[i] & mask) trtable[ch] = dest_states_word[j]; else trtable[ch] = dest_states[j]; } } else { trtable = state->word_trtable = (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), 2 * 256); if (__builtin_expect (trtable == ((void *)0), 0)) goto out_free; for (i = 0; i < (256 / (sizeof (bitset_word_t) * 8)); ++i) for (ch = i * (sizeof (bitset_word_t) * 8), elem = acceptable[i], mask = 1; elem; mask <<= 1, elem >>= 1, ++ch) if (__builtin_expect (elem & 1, 0)) { for (j = 0; (dests_ch[j][i] & mask) == 0; ++j) ; trtable[ch] = dest_states[j]; trtable[ch + 256] = dest_states_word[j]; } } if ((acceptable['\n' / (sizeof (bitset_word_t) * 8)] & ((bitset_word_t) 1 << '\n' % (sizeof (bitset_word_t) * 8)))) { for (j = 0; j < ndests; ++j) if ((dests_ch[j]['\n' / (sizeof (bitset_word_t) * 8)] & ((bitset_word_t) 1 << '\n' % (sizeof (bitset_word_t) * 8)))) { trtable['\n'] = dest_states_nl[j]; if (need_word_trtable) trtable['\n' + 256] = dest_states_nl[j]; break; } } if (dest_states_malloced) free (dest_states); free ((&follows)->elems); for (i = 0; i < ndests; ++i) free ((dests_node + i)->elems); if (dests_node_malloced) free (dests_alloc); return 1; } static int group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, re_node_set *dests_node, bitset_t *dests_ch) { reg_errcode_t err; int result; int i, j, k; int ndests; bitset_t accepts; const re_node_set *cur_nodes = &state->nodes; memset (accepts, '\0', sizeof (bitset_t)); ndests = 0; for (i = 0; i < cur_nodes->nelem; ++i) { re_token_t *node = &dfa->nodes[cur_nodes->elems[i]]; re_token_type_t type = node->type; unsigned int constraint = node->constraint; if (type == CHARACTER) (accepts[node->opr.c / (sizeof (bitset_word_t) * 8)] |= (bitset_word_t) 1 << node->opr.c % (sizeof (bitset_word_t) * 8)); else if (type == SIMPLE_BRACKET) { bitset_merge (accepts, node->opr.sbcset); } else if (type == OP_PERIOD) { if (dfa->mb_cur_max > 1) bitset_merge (accepts, dfa->sb_char); else memset (accepts, '\xff', sizeof (bitset_t)); if (!(dfa->syntax & ((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1))) (accepts['\n' / (sizeof (bitset_word_t) * 8)] &= ~((bitset_word_t) 1 << '\n' % (sizeof (bitset_word_t) * 8))); if (dfa->syntax & (((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) (accepts['\0' / (sizeof (bitset_word_t) * 8)] &= ~((bitset_word_t) 1 << '\0' % (sizeof (bitset_word_t) * 8))); } else if (type == OP_UTF8_PERIOD) { memset (accepts, '\xff', sizeof (bitset_t) / 2); if (!(dfa->syntax & ((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1))) (accepts['\n' / (sizeof (bitset_word_t) * 8)] &= ~((bitset_word_t) 1 << '\n' % (sizeof (bitset_word_t) * 8))); if (dfa->syntax & (((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) (accepts['\0' / (sizeof (bitset_word_t) * 8)] &= ~((bitset_word_t) 1 << '\0' % (sizeof (bitset_word_t) * 8))); } else continue; if (constraint) { if (constraint & 0x0020) { _Bool accepts_newline = (accepts['\n' / (sizeof (bitset_word_t) * 8)] & ((bitset_word_t) 1 << '\n' % (sizeof (bitset_word_t) * 8))); memset (accepts, '\0', sizeof (bitset_t)); if (accepts_newline) (accepts['\n' / (sizeof (bitset_word_t) * 8)] |= (bitset_word_t) 1 << '\n' % (sizeof (bitset_word_t) * 8)); else continue; } if (constraint & 0x0080) { memset (accepts, '\0', sizeof (bitset_t)); continue; } if (constraint & 0x0004) { bitset_word_t any_set = 0; if (type == CHARACTER && !node->word_char) { memset (accepts, '\0', sizeof (bitset_t)); continue; } if (dfa->mb_cur_max > 1) for (j = 0; j < (256 / (sizeof (bitset_word_t) * 8)); ++j) any_set |= (accepts[j] &= (dfa->word_char[j] | ~dfa->sb_char[j])); else for (j = 0; j < (256 / (sizeof (bitset_word_t) * 8)); ++j) any_set |= (accepts[j] &= dfa->word_char[j]); if (!any_set) continue; } if (constraint & 0x0008) { bitset_word_t any_set = 0; if (type == CHARACTER && node->word_char) { memset (accepts, '\0', sizeof (bitset_t)); continue; } if (dfa->mb_cur_max > 1) for (j = 0; j < (256 / (sizeof (bitset_word_t) * 8)); ++j) any_set |= (accepts[j] &= ~(dfa->word_char[j] & dfa->sb_char[j])); else for (j = 0; j < (256 / (sizeof (bitset_word_t) * 8)); ++j) any_set |= (accepts[j] &= ~dfa->word_char[j]); if (!any_set) continue; } } for (j = 0; j < ndests; ++j) { bitset_t intersec; bitset_t remains; bitset_word_t has_intersec, not_subset, not_consumed; if (type == CHARACTER && !(dests_ch[j][node->opr.c / (sizeof (bitset_word_t) * 8)] & ((bitset_word_t) 1 << node->opr.c % (sizeof (bitset_word_t) * 8)))) continue; has_intersec = 0; for (k = 0; k < (256 / (sizeof (bitset_word_t) * 8)); ++k) has_intersec |= intersec[k] = accepts[k] & dests_ch[j][k]; if (!has_intersec) continue; not_subset = not_consumed = 0; for (k = 0; k < (256 / (sizeof (bitset_word_t) * 8)); ++k) { not_subset |= remains[k] = ~accepts[k] & dests_ch[j][k]; not_consumed |= accepts[k] = accepts[k] & ~dests_ch[j][k]; } if (not_subset) { memcpy (dests_ch[ndests], remains, sizeof (bitset_t)); memcpy (dests_ch[j], intersec, sizeof (bitset_t)); err = re_node_set_init_copy (dests_node + ndests, &dests_node[j]); if (__builtin_expect (err != REG_NOERROR, 0)) goto error_return; ++ndests; } result = re_node_set_insert (&dests_node[j], cur_nodes->elems[i]); if (__builtin_expect (result < 0, 0)) goto error_return; if (!not_consumed) break; } if (j == ndests) { memcpy (dests_ch[ndests], accepts, sizeof (bitset_t)); err = re_node_set_init_1 (dests_node + ndests, cur_nodes->elems[i]); if (__builtin_expect (err != REG_NOERROR, 0)) goto error_return; ++ndests; memset (accepts, '\0', sizeof (bitset_t)); } } return ndests; error_return: for (j = 0; j < ndests; ++j) free ((dests_node + j)->elems); return -1; } # 3709 "regexec.c" static int check_node_accept_bytes (const re_dfa_t *dfa, int node_idx, const re_string_t *input, int str_idx) { const re_token_t *node = dfa->nodes + node_idx; int char_len, elem_len; int i; if (__builtin_expect (node->type == OP_UTF8_PERIOD, 0)) { unsigned char c = ((input)->mbs[str_idx]), d; if (__builtin_expect (c < 0xc2, 1)) return 0; if (str_idx + 2 > input->len) return 0; d = ((input)->mbs[str_idx + 1]); if (c < 0xe0) return (d < 0x80 || d > 0xbf) ? 0 : 2; else if (c < 0xf0) { char_len = 3; if (c == 0xe0 && d < 0xa0) return 0; } else if (c < 0xf8) { char_len = 4; if (c == 0xf0 && d < 0x90) return 0; } else if (c < 0xfc) { char_len = 5; if (c == 0xf8 && d < 0x88) return 0; } else if (c < 0xfe) { char_len = 6; if (c == 0xfc && d < 0x84) return 0; } else return 0; if (str_idx + char_len > input->len) return 0; for (i = 1; i < char_len; ++i) { d = ((input)->mbs[str_idx + i]); if (d < 0x80 || d > 0xbf) return 0; } return char_len; } char_len = re_string_char_size_at (input, str_idx); if (node->type == OP_PERIOD) { if (char_len <= 1) return 0; if ((!(dfa->syntax & ((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1)) && ((input)->mbs[str_idx]) == '\n') || ((dfa->syntax & (((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) && ((input)->mbs[str_idx]) == '\0')) return 0; return char_len; } elem_len = re_string_elem_size_at (input, str_idx); if ((elem_len <= 1 && char_len <= 1) || char_len == 0) return 0; if (node->type == COMPLEX_BRACKET) { const re_charset_t *cset = node->opr.mbcset; const unsigned char *pin = ((const unsigned char *) ((input)->mbs) + str_idx); int j; uint32_t nrules; int match_len = 0; wchar_t wc = ((cset->nranges || cset->nchar_classes || cset->nmbchars) ? re_string_wchar_at (input, str_idx) : 0); for (i = 0; i < cset->nmbchars; ++i) if (wc == cset->mbchars[i]) { match_len = char_len; goto check_node_accept_bytes_match; } for (i = 0; i < cset->nchar_classes; ++i) { wctype_t wt = cset->char_classes[i]; if (__iswctype (wc, wt)) { match_len = char_len; goto check_node_accept_bytes_match; } } nrules = ((uint32_t) (*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_NRULES) & 0xffff)].word); if (nrules != 0) { unsigned int in_collseq = 0; const int32_t *table, *indirect; const unsigned char *weights, *extra; const char *collseqwc; int32_t idx; # 1 "../locale/weight.h" 1 # 21 "../locale/weight.h" auto inline int32_t __attribute__ ((always_inline)) findidx (const unsigned char **cpp) { int_fast32_t i = table[*(*cpp)++]; const unsigned char *cp; const unsigned char *usrc; if (i >= 0) return i; cp = &extra[-i]; usrc = *cpp; while (1) { size_t nhere; i = *((const int32_t *) cp); cp += sizeof (int32_t); nhere = *cp++; if (i >= 0) { size_t cnt; for (cnt = 0; cnt < nhere; ++cnt) if (cp[cnt] != usrc[cnt]) break; if (cnt == nhere) { *cpp += nhere; return i; } cp += nhere; if ((1 + nhere) % __alignof__ (int32_t) != 0) cp += __alignof__ (int32_t) - (1 + nhere) % __alignof__ (int32_t); } else { size_t cnt; size_t offset = 0; for (cnt = 0; cnt < nhere; ++cnt) if (cp[cnt] != usrc[cnt]) break; if (cnt != nhere) { if (cp[cnt] > usrc[cnt]) { cp += 2 * nhere; if ((1 + 2 * nhere) % __alignof__ (int32_t) != 0) cp += (__alignof__ (int32_t) - (1 + 2 * nhere) % __alignof__ (int32_t)); continue; } for (cnt = 0; cnt < nhere; ++cnt) if (cp[nhere + cnt] != usrc[cnt]) break; if (cnt != nhere && cp[nhere + cnt] < usrc[cnt]) { cp += 2 * nhere; if ((1 + 2 * nhere) % __alignof__ (int32_t) != 0) cp += (__alignof__ (int32_t) - (1 + 2 * nhere) % __alignof__ (int32_t)); continue; } for (cnt = 0; cp[cnt] == usrc[cnt]; ++cnt); do { offset <<= 8; offset += usrc[cnt] - cp[cnt]; } while (++cnt < nhere); } *cpp += nhere; return indirect[-i + offset]; } } return 0x43219876; } # 3831 "regexec.c" 2 if (cset->ncoll_syms) extra = (const unsigned char *) ((*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_SYMB_EXTRAMB) & 0xffff)].string); for (i = 0; i < cset->ncoll_syms; ++i) { const unsigned char *coll_sym = extra + cset->coll_syms[i]; if (*coll_sym != elem_len) continue; for (j = 0; j < *coll_sym; j++) if (pin[j] != coll_sym[1 + j]) break; if (j == *coll_sym) { match_len = j; goto check_node_accept_bytes_match; } } if (cset->nranges) { if (elem_len <= char_len) { collseqwc = ((*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_COLLSEQWC) & 0xffff)].string); in_collseq = __collseq_table_lookup (collseqwc, wc); } else in_collseq = find_collation_sequence_value (pin, elem_len); } for (i = 0; i < cset->nranges; ++i) if (cset->range_starts[i] <= in_collseq && in_collseq <= cset->range_ends[i]) { match_len = elem_len; goto check_node_accept_bytes_match; } if (cset->nequiv_classes) { const unsigned char *cp = pin; table = (const int32_t *) ((*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_TABLEMB) & 0xffff)].string); weights = (const unsigned char *) ((*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_WEIGHTMB) & 0xffff)].string); extra = (const unsigned char *) ((*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_EXTRAMB) & 0xffff)].string); indirect = (const int32_t *) ((*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_INDIRECTMB) & 0xffff)].string); idx = findidx (&cp); if (idx > 0) for (i = 0; i < cset->nequiv_classes; ++i) { int32_t equiv_class_idx = cset->equiv_classes[i]; size_t weight_len = weights[idx]; if (weight_len == weights[equiv_class_idx]) { int cnt = 0; while (cnt <= weight_len && (weights[equiv_class_idx + 1 + cnt] == weights[idx + 1 + cnt])) ++cnt; if (cnt > weight_len) { match_len = elem_len; goto check_node_accept_bytes_match; } } } } } else { wchar_t cmp_buf[] = {L'\0', L'\0', wc, L'\0', L'\0', L'\0'}; for (i = 0; i < cset->nranges; ++i) { cmp_buf[0] = cset->range_starts[i]; cmp_buf[4] = cset->range_ends[i]; if (wcscoll (cmp_buf, cmp_buf + 2) <= 0 && wcscoll (cmp_buf + 2, cmp_buf + 4) <= 0) { match_len = char_len; goto check_node_accept_bytes_match; } } } check_node_accept_bytes_match: if (!cset->non_match) return match_len; else { if (match_len > 0) return 0; else return (elem_len > char_len) ? elem_len : char_len; } } return 0; } static unsigned int find_collation_sequence_value (const unsigned char *mbs, size_t mbs_len) { uint32_t nrules = ((uint32_t) (*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_NRULES) & 0xffff)].word); if (nrules == 0) { if (mbs_len == 1) { const unsigned char *collseq = (const unsigned char *) ((*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_COLLSEQMB) & 0xffff)].string); return collseq[mbs[0]]; } return (2147483647 * 2U + 1U); } else { int32_t idx; const unsigned char *extra = (const unsigned char *) ((*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_SYMB_EXTRAMB) & 0xffff)].string); int32_t extrasize = (const unsigned char *) ((*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_SYMB_EXTRAMB + 1) & 0xffff)].string) - extra; for (idx = 0; idx < extrasize;) { int mbs_cnt, found = 0; int32_t elem_mbs_len; idx = idx + extra[idx] + 1; elem_mbs_len = extra[idx++]; if (mbs_len == elem_mbs_len) { for (mbs_cnt = 0; mbs_cnt < elem_mbs_len; ++mbs_cnt) if (extra[idx + mbs_cnt] != mbs[mbs_cnt]) break; if (mbs_cnt == elem_mbs_len) found = 1; } idx += elem_mbs_len; idx = (idx + 3) & ~3; idx += sizeof (uint32_t); idx = idx + sizeof (uint32_t) * (extra[idx] + 1); if (found) return *(uint32_t *) (extra + idx); idx += sizeof (uint32_t); } return (2147483647 * 2U + 1U); } } static int check_node_accept (const re_match_context_t *mctx, const re_token_t *node, int idx) { unsigned char ch; ch = ((&mctx->input)->mbs[idx]); switch (node->type) { case CHARACTER: if (node->opr.c != ch) return 0; break; case SIMPLE_BRACKET: if (!(node->opr.sbcset[ch / (sizeof (bitset_word_t) * 8)] & ((bitset_word_t) 1 << ch % (sizeof (bitset_word_t) * 8)))) return 0; break; case OP_UTF8_PERIOD: if (ch >= 0x80) return 0; case OP_PERIOD: if ((ch == '\n' && !(mctx->dfa->syntax & ((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1))) || (ch == '\0' && (mctx->dfa->syntax & (((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)))) return 0; break; default: return 0; } if (node->constraint) { unsigned int context = re_string_context_at (&mctx->input, idx, mctx->eflags); if (((((node->constraint) & 0x0004) && !((context) & 1)) || (((node->constraint) & 0x0008) && ((context) & 1)) || (((node->constraint) & 0x0020) && !((context) & (1 << 1))) || (((node->constraint) & 0x0080) && !((context) & (((1 << 1) << 1) << 1))))) return 0; } return 1; } static reg_errcode_t extend_buffers (re_match_context_t *mctx) { reg_errcode_t ret; re_string_t *pstr = &mctx->input; ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2); if (__builtin_expect (ret != REG_NOERROR, 0)) return ret; if (mctx->state_log != ((void *)0)) { re_dfastate_t **new_array = ((re_dfastate_t * *) realloc (mctx->state_log, (pstr->bufs_len + 1) * sizeof (re_dfastate_t *))); if (__builtin_expect (new_array == ((void *)0), 0)) return REG_ESPACE; mctx->state_log = new_array; } if (pstr->icase) { if (pstr->mb_cur_max > 1) { ret = build_wcs_upper_buffer (pstr); if (__builtin_expect (ret != REG_NOERROR, 0)) return ret; } else build_upper_buffer (pstr); } else { if (pstr->mb_cur_max > 1) build_wcs_buffer (pstr); else { if (pstr->trans != ((void *)0)) re_string_translate_buffer (pstr); } } return REG_NOERROR; } static reg_errcode_t match_ctx_init (re_match_context_t *mctx, int eflags, int n) { mctx->eflags = eflags; mctx->match_last = -1; if (n > 0) { mctx->bkref_ents = ((struct re_backref_cache_entry *) malloc ((n) * sizeof (struct re_backref_cache_entry))); mctx->sub_tops = ((re_sub_match_top_t * *) malloc ((n) * sizeof (re_sub_match_top_t *))); if (__builtin_expect (mctx->bkref_ents == ((void *)0) || mctx->sub_tops == ((void *)0), 0)) return REG_ESPACE; } mctx->abkref_ents = n; mctx->max_mb_elem_len = 1; mctx->asub_tops = n; return REG_NOERROR; } static void match_ctx_clean (re_match_context_t *mctx) { int st_idx; for (st_idx = 0; st_idx < mctx->nsub_tops; ++st_idx) { int sl_idx; re_sub_match_top_t *top = mctx->sub_tops[st_idx]; for (sl_idx = 0; sl_idx < top->nlasts; ++sl_idx) { re_sub_match_last_t *last = top->lasts[sl_idx]; free (last->path.array); free (last); } free (top->lasts); if (top->path) { free (top->path->array); free (top->path); } free (top); } mctx->nsub_tops = 0; mctx->nbkref_ents = 0; } static void match_ctx_free (re_match_context_t *mctx) { match_ctx_clean (mctx); free (mctx->sub_tops); free (mctx->bkref_ents); } static reg_errcode_t match_ctx_add_entry (re_match_context_t *mctx, int node, int str_idx, int from, int to) { if (mctx->nbkref_ents >= mctx->abkref_ents) { struct re_backref_cache_entry* new_entry; new_entry = ((struct re_backref_cache_entry *) realloc (mctx->bkref_ents, (mctx->abkref_ents * 2) * sizeof (struct re_backref_cache_entry))); if (__builtin_expect (new_entry == ((void *)0), 0)) { free (mctx->bkref_ents); return REG_ESPACE; } mctx->bkref_ents = new_entry; memset (mctx->bkref_ents + mctx->nbkref_ents, '\0', sizeof (struct re_backref_cache_entry) * mctx->abkref_ents); mctx->abkref_ents *= 2; } if (mctx->nbkref_ents > 0 && mctx->bkref_ents[mctx->nbkref_ents - 1].str_idx == str_idx) mctx->bkref_ents[mctx->nbkref_ents - 1].more = 1; mctx->bkref_ents[mctx->nbkref_ents].node = node; mctx->bkref_ents[mctx->nbkref_ents].str_idx = str_idx; mctx->bkref_ents[mctx->nbkref_ents].subexp_from = from; mctx->bkref_ents[mctx->nbkref_ents].subexp_to = to; # 4227 "regexec.c" mctx->bkref_ents[mctx->nbkref_ents].eps_reachable_subexps_map = (from == to ? ~0 : 0); mctx->bkref_ents[mctx->nbkref_ents++].more = 0; if (mctx->max_mb_elem_len < to - from) mctx->max_mb_elem_len = to - from; return REG_NOERROR; } static int search_cur_bkref_entry (const re_match_context_t *mctx, int str_idx) { int left, right, mid, last; last = right = mctx->nbkref_ents; for (left = 0; left < right;) { mid = (left + right) / 2; if (mctx->bkref_ents[mid].str_idx < str_idx) left = mid + 1; else right = mid; } if (left < last && mctx->bkref_ents[left].str_idx == str_idx) return left; else return -1; } static reg_errcode_t match_ctx_add_subtop (re_match_context_t *mctx, int node, int str_idx) { if (__builtin_expect (mctx->nsub_tops == mctx->asub_tops, 0)) { int new_asub_tops = mctx->asub_tops * 2; re_sub_match_top_t **new_array = ((re_sub_match_top_t * *) realloc (mctx->sub_tops, (new_asub_tops) * sizeof (re_sub_match_top_t *))); if (__builtin_expect (new_array == ((void *)0), 0)) return REG_ESPACE; mctx->sub_tops = new_array; mctx->asub_tops = new_asub_tops; } mctx->sub_tops[mctx->nsub_tops] = calloc (1, sizeof (re_sub_match_top_t)); if (__builtin_expect (mctx->sub_tops[mctx->nsub_tops] == ((void *)0), 0)) return REG_ESPACE; mctx->sub_tops[mctx->nsub_tops]->node = node; mctx->sub_tops[mctx->nsub_tops++]->str_idx = str_idx; return REG_NOERROR; } static re_sub_match_last_t * match_ctx_add_sublast (re_sub_match_top_t *subtop, int node, int str_idx) { re_sub_match_last_t *new_entry; if (__builtin_expect (subtop->nlasts == subtop->alasts, 0)) { int new_alasts = 2 * subtop->alasts + 1; re_sub_match_last_t **new_array = ((re_sub_match_last_t * *) realloc (subtop->lasts, (new_alasts) * sizeof (re_sub_match_last_t *))); if (__builtin_expect (new_array == ((void *)0), 0)) return ((void *)0); subtop->lasts = new_array; subtop->alasts = new_alasts; } new_entry = calloc (1, sizeof (re_sub_match_last_t)); if (__builtin_expect (new_entry != ((void *)0), 1)) { subtop->lasts[subtop->nlasts] = new_entry; new_entry->node = node; new_entry->str_idx = str_idx; ++subtop->nlasts; } return new_entry; } static void sift_ctx_init (re_sift_context_t *sctx, re_dfastate_t **sifted_sts, re_dfastate_t **limited_sts, int last_node, int last_str_idx) { sctx->sifted_states = sifted_sts; sctx->limited_states = limited_sts; sctx->last_node = last_node; sctx->last_str_idx = last_str_idx; memset (&sctx->limits, '\0', sizeof (re_node_set)); } # 66 "regex.c" 2