2 # 1 "/var/tmp/portage/glibc-2.5/work/glibc-2.5/posix//"
5 # 1 "./../include/libc-symbols.h" 1
6 # 55 "./../include/libc-symbols.h"
7 # 1 "/var/tmp/portage/glibc-2.5/work/build-default-hppa2.0-unknown-linux-gnu-nptl/config.h" 1
8 # 56 "./../include/libc-symbols.h" 2
9 # 824 "./../include/libc-symbols.h"
10 # 1 "../sysdeps/wordsize-32/symbol-hacks.h" 1
11 # 825 "./../include/libc-symbols.h" 2
12 # 1 "<command line>" 2
15 # 1 "../locale/localeinfo.h" 1
16 # 23 "../locale/localeinfo.h"
17 # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4
18 # 152 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 3 4
19 typedef int ptrdiff_t;
20 # 214 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 3 4
21 typedef unsigned int size_t;
22 # 326 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 3 4
23 typedef long int wchar_t;
24 # 24 "../locale/localeinfo.h" 2
25 # 1 "../include/langinfo.h" 1
28 # 1 "../locale/langinfo.h" 1
29 # 24 "../locale/langinfo.h"
30 # 1 "../include/nl_types.h" 1
31 # 1 "../catgets/nl_types.h" 1
32 # 22 "../catgets/nl_types.h"
33 # 1 "../include/features.h" 1
34 # 323 "../include/features.h"
35 # 1 "../include/sys/cdefs.h" 1
38 # 1 "../misc/sys/cdefs.h" 1
39 # 313 "../misc/sys/cdefs.h"
40 # 1 "../sysdeps/wordsize-32/bits/wordsize.h" 1
41 # 314 "../misc/sys/cdefs.h" 2
42 # 4 "../include/sys/cdefs.h" 2
44 extern void __chk_fail (void) __attribute__ ((__noreturn__));
47 # 324 "../include/features.h" 2
48 # 346 "../include/features.h"
49 # 1 "../include/gnu/stubs.h" 1
50 # 347 "../include/features.h" 2
51 # 23 "../catgets/nl_types.h" 2
52 # 31 "../catgets/nl_types.h"
56 typedef void *nl_catd;
65 extern nl_catd catopen (__const char *__cat_name, int __flag) __attribute__ ((__nonnull__ (1)));
69 extern char *catgets (nl_catd __catalog, int __set, int __number,
70 __const char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
73 extern int catclose (nl_catd __catalog) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
76 # 1 "../include/nl_types.h" 2
77 # 25 "../locale/langinfo.h" 2
79 # 1 "../include/bits/locale.h" 1
80 # 1 "../locale/bits/locale.h" 1
81 # 27 "../locale/bits/locale.h"
95 __LC_MEASUREMENT = 11,
96 __LC_IDENTIFICATION = 12
98 # 1 "../include/bits/locale.h" 2
99 # 27 "../locale/langinfo.h" 2
103 # 42 "../locale/langinfo.h"
109 ABDAY_1 = (((__LC_TIME) << 16) | (0)),
221 _NL_TIME_ERA_NUM_ENTRIES,
222 _NL_TIME_ERA_ENTRIES,
284 _NL_TIME_WEEK_1STDAY,
285 _NL_TIME_WEEK_1STWEEK,
286 _NL_TIME_FIRST_WEEKDAY,
287 _NL_TIME_FIRST_WORKDAY,
288 _NL_TIME_CAL_DIRECTION,
302 _NL_COLLATE_NRULES = (((__LC_COLLATE) << 16) | (0)),
303 _NL_COLLATE_RULESETS,
305 _NL_COLLATE_WEIGHTMB,
307 _NL_COLLATE_INDIRECTMB,
312 _NL_COLLATE_WEIGHTWC,
314 _NL_COLLATE_INDIRECTWC,
315 _NL_COLLATE_SYMB_HASH_SIZEMB,
316 _NL_COLLATE_SYMB_TABLEMB,
317 _NL_COLLATE_SYMB_EXTRAMB,
318 _NL_COLLATE_COLLSEQMB,
319 _NL_COLLATE_COLLSEQWC,
326 _NL_CTYPE_CLASS = (((__LC_CTYPE) << 16) | (0)),
336 _NL_CTYPE_CLASS_NAMES,
339 _NL_CTYPE_MB_CUR_MAX,
340 _NL_CTYPE_CODESET_NAME,
341 CODESET = _NL_CTYPE_CODESET_NAME,
345 _NL_CTYPE_CLASS_OFFSET,
346 _NL_CTYPE_MAP_OFFSET,
347 _NL_CTYPE_INDIGITS_MB_LEN,
348 _NL_CTYPE_INDIGITS0_MB,
349 _NL_CTYPE_INDIGITS1_MB,
350 _NL_CTYPE_INDIGITS2_MB,
351 _NL_CTYPE_INDIGITS3_MB,
352 _NL_CTYPE_INDIGITS4_MB,
353 _NL_CTYPE_INDIGITS5_MB,
354 _NL_CTYPE_INDIGITS6_MB,
355 _NL_CTYPE_INDIGITS7_MB,
356 _NL_CTYPE_INDIGITS8_MB,
357 _NL_CTYPE_INDIGITS9_MB,
358 _NL_CTYPE_INDIGITS_WC_LEN,
359 _NL_CTYPE_INDIGITS0_WC,
360 _NL_CTYPE_INDIGITS1_WC,
361 _NL_CTYPE_INDIGITS2_WC,
362 _NL_CTYPE_INDIGITS3_WC,
363 _NL_CTYPE_INDIGITS4_WC,
364 _NL_CTYPE_INDIGITS5_WC,
365 _NL_CTYPE_INDIGITS6_WC,
366 _NL_CTYPE_INDIGITS7_WC,
367 _NL_CTYPE_INDIGITS8_WC,
368 _NL_CTYPE_INDIGITS9_WC,
369 _NL_CTYPE_OUTDIGIT0_MB,
370 _NL_CTYPE_OUTDIGIT1_MB,
371 _NL_CTYPE_OUTDIGIT2_MB,
372 _NL_CTYPE_OUTDIGIT3_MB,
373 _NL_CTYPE_OUTDIGIT4_MB,
374 _NL_CTYPE_OUTDIGIT5_MB,
375 _NL_CTYPE_OUTDIGIT6_MB,
376 _NL_CTYPE_OUTDIGIT7_MB,
377 _NL_CTYPE_OUTDIGIT8_MB,
378 _NL_CTYPE_OUTDIGIT9_MB,
379 _NL_CTYPE_OUTDIGIT0_WC,
380 _NL_CTYPE_OUTDIGIT1_WC,
381 _NL_CTYPE_OUTDIGIT2_WC,
382 _NL_CTYPE_OUTDIGIT3_WC,
383 _NL_CTYPE_OUTDIGIT4_WC,
384 _NL_CTYPE_OUTDIGIT5_WC,
385 _NL_CTYPE_OUTDIGIT6_WC,
386 _NL_CTYPE_OUTDIGIT7_WC,
387 _NL_CTYPE_OUTDIGIT8_WC,
388 _NL_CTYPE_OUTDIGIT9_WC,
389 _NL_CTYPE_TRANSLIT_TAB_SIZE,
390 _NL_CTYPE_TRANSLIT_FROM_IDX,
391 _NL_CTYPE_TRANSLIT_FROM_TBL,
392 _NL_CTYPE_TRANSLIT_TO_IDX,
393 _NL_CTYPE_TRANSLIT_TO_TBL,
394 _NL_CTYPE_TRANSLIT_DEFAULT_MISSING_LEN,
395 _NL_CTYPE_TRANSLIT_DEFAULT_MISSING,
396 _NL_CTYPE_TRANSLIT_IGNORE_LEN,
397 _NL_CTYPE_TRANSLIT_IGNORE,
398 _NL_CTYPE_MAP_TO_NONASCII,
399 _NL_CTYPE_EXTRA_MAP_1,
400 _NL_CTYPE_EXTRA_MAP_2,
401 _NL_CTYPE_EXTRA_MAP_3,
402 _NL_CTYPE_EXTRA_MAP_4,
403 _NL_CTYPE_EXTRA_MAP_5,
404 _NL_CTYPE_EXTRA_MAP_6,
405 _NL_CTYPE_EXTRA_MAP_7,
406 _NL_CTYPE_EXTRA_MAP_8,
407 _NL_CTYPE_EXTRA_MAP_9,
408 _NL_CTYPE_EXTRA_MAP_10,
409 _NL_CTYPE_EXTRA_MAP_11,
410 _NL_CTYPE_EXTRA_MAP_12,
411 _NL_CTYPE_EXTRA_MAP_13,
412 _NL_CTYPE_EXTRA_MAP_14,
418 __INT_CURR_SYMBOL = (((__LC_MONETARY) << 16) | (0)),
478 _NL_MONETARY_CRNCYSTR,
484 __INT_P_SEP_BY_SPACE,
492 __INT_N_SEP_BY_SPACE,
504 _NL_MONETARY_DUO_INT_CURR_SYMBOL,
505 _NL_MONETARY_DUO_CURRENCY_SYMBOL,
506 _NL_MONETARY_DUO_INT_FRAC_DIGITS,
507 _NL_MONETARY_DUO_FRAC_DIGITS,
508 _NL_MONETARY_DUO_P_CS_PRECEDES,
509 _NL_MONETARY_DUO_P_SEP_BY_SPACE,
510 _NL_MONETARY_DUO_N_CS_PRECEDES,
511 _NL_MONETARY_DUO_N_SEP_BY_SPACE,
512 _NL_MONETARY_DUO_INT_P_CS_PRECEDES,
513 _NL_MONETARY_DUO_INT_P_SEP_BY_SPACE,
514 _NL_MONETARY_DUO_INT_N_CS_PRECEDES,
515 _NL_MONETARY_DUO_INT_N_SEP_BY_SPACE,
516 _NL_MONETARY_DUO_P_SIGN_POSN,
517 _NL_MONETARY_DUO_N_SIGN_POSN,
518 _NL_MONETARY_DUO_INT_P_SIGN_POSN,
519 _NL_MONETARY_DUO_INT_N_SIGN_POSN,
520 _NL_MONETARY_UNO_VALID_FROM,
521 _NL_MONETARY_UNO_VALID_TO,
522 _NL_MONETARY_DUO_VALID_FROM,
523 _NL_MONETARY_DUO_VALID_TO,
524 _NL_MONETARY_CONVERSION_RATE,
525 _NL_MONETARY_DECIMAL_POINT_WC,
526 _NL_MONETARY_THOUSANDS_SEP_WC,
527 _NL_MONETARY_CODESET,
532 __DECIMAL_POINT = (((__LC_NUMERIC) << 16) | (0)),
536 RADIXCHAR = __DECIMAL_POINT,
542 THOUSEP = __THOUSANDS_SEP,
548 _NL_NUMERIC_DECIMAL_POINT_WC,
549 _NL_NUMERIC_THOUSANDS_SEP_WC,
553 __YESEXPR = (((__LC_MESSAGES) << 16) | (0)),
565 _NL_MESSAGES_CODESET,
568 _NL_PAPER_HEIGHT = (((__LC_PAPER) << 16) | (0)),
573 _NL_NAME_NAME_FMT = (((__LC_NAME) << 16) | (0)),
582 _NL_ADDRESS_POSTAL_FMT = (((__LC_ADDRESS) << 16) | (0)),
583 _NL_ADDRESS_COUNTRY_NAME,
584 _NL_ADDRESS_COUNTRY_POST,
585 _NL_ADDRESS_COUNTRY_AB2,
586 _NL_ADDRESS_COUNTRY_AB3,
587 _NL_ADDRESS_COUNTRY_CAR,
588 _NL_ADDRESS_COUNTRY_NUM,
589 _NL_ADDRESS_COUNTRY_ISBN,
590 _NL_ADDRESS_LANG_NAME,
592 _NL_ADDRESS_LANG_TERM,
593 _NL_ADDRESS_LANG_LIB,
597 _NL_TELEPHONE_TEL_INT_FMT = (((__LC_TELEPHONE) << 16) | (0)),
598 _NL_TELEPHONE_TEL_DOM_FMT,
599 _NL_TELEPHONE_INT_SELECT,
600 _NL_TELEPHONE_INT_PREFIX,
601 _NL_TELEPHONE_CODESET,
602 _NL_NUM_LC_TELEPHONE,
604 _NL_MEASUREMENT_MEASUREMENT = (((__LC_MEASUREMENT) << 16) | (0)),
605 _NL_MEASUREMENT_CODESET,
606 _NL_NUM_LC_MEASUREMENT,
608 _NL_IDENTIFICATION_TITLE = (((__LC_IDENTIFICATION) << 16) | (0)),
609 _NL_IDENTIFICATION_SOURCE,
610 _NL_IDENTIFICATION_ADDRESS,
611 _NL_IDENTIFICATION_CONTACT,
612 _NL_IDENTIFICATION_EMAIL,
613 _NL_IDENTIFICATION_TEL,
614 _NL_IDENTIFICATION_FAX,
615 _NL_IDENTIFICATION_LANGUAGE,
616 _NL_IDENTIFICATION_TERRITORY,
617 _NL_IDENTIFICATION_AUDIENCE,
618 _NL_IDENTIFICATION_APPLICATION,
619 _NL_IDENTIFICATION_ABBREVIATION,
620 _NL_IDENTIFICATION_REVISION,
621 _NL_IDENTIFICATION_DATE,
622 _NL_IDENTIFICATION_CATEGORY,
623 _NL_IDENTIFICATION_CODESET,
624 _NL_NUM_LC_IDENTIFICATION,
629 # 582 "../locale/langinfo.h"
630 extern char *nl_langinfo (nl_item __item) __attribute__ ((__nothrow__));
638 # 1 "../include/xlocale.h" 1
639 # 1 "../locale/xlocale.h" 1
640 # 28 "../locale/xlocale.h"
641 typedef struct __locale_struct
644 struct locale_data *__locales[13];
647 const unsigned short int *__ctype_b;
648 const int *__ctype_tolower;
649 const int *__ctype_toupper;
652 const char *__names[13];
654 # 1 "../include/xlocale.h" 2
655 # 591 "../locale/langinfo.h" 2
658 extern char *nl_langinfo_l (nl_item __item, __locale_t l);
662 # 4 "../include/langinfo.h" 2
666 extern __typeof (nl_langinfo_l) __nl_langinfo_l;
667 # 25 "../locale/localeinfo.h" 2
668 # 1 "../include/limits.h" 1
669 # 125 "../include/limits.h"
670 # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/limits.h" 1 3 4
671 # 126 "../include/limits.h" 2
672 # 145 "../include/limits.h"
673 # 1 "../include/bits/posix1_lim.h" 1
674 # 1 "../posix/bits/posix1_lim.h" 1
675 # 153 "../posix/bits/posix1_lim.h"
676 # 1 "../nptl/sysdeps/unix/sysv/linux/bits/local_lim.h" 1
677 # 36 "../nptl/sysdeps/unix/sysv/linux/bits/local_lim.h"
678 # 1 "/usr/include/linux/limits.h" 1 3 4
679 # 37 "../nptl/sysdeps/unix/sysv/linux/bits/local_lim.h" 2
680 # 154 "../posix/bits/posix1_lim.h" 2
681 # 1 "../include/bits/posix1_lim.h" 2
682 # 146 "../include/limits.h" 2
686 # 1 "../include/bits/posix2_lim.h" 1
687 # 1 "../posix/bits/posix2_lim.h" 1
688 # 1 "../include/bits/posix2_lim.h" 2
689 # 150 "../include/limits.h" 2
693 # 1 "../include/bits/xopen_lim.h" 1
694 # 34 "../include/bits/xopen_lim.h"
695 # 1 "/var/tmp/portage/glibc-2.5/work/build-default-hppa2.0-unknown-linux-gnu-nptl/bits/stdio_lim.h" 1
696 # 35 "../include/bits/xopen_lim.h" 2
697 # 154 "../include/limits.h" 2
698 # 26 "../locale/localeinfo.h" 2
699 # 1 "../include/locale.h" 1
701 # 1 "../locale/locale.h" 1
702 # 29 "../locale/locale.h"
703 # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4
704 # 30 "../locale/locale.h" 2
705 # 1 "../include/bits/locale.h" 1
706 # 1 "../locale/bits/locale.h" 1
707 # 1 "../include/bits/locale.h" 2
708 # 31 "../locale/locale.h" 2
711 # 52 "../locale/locale.h"
729 char *int_curr_symbol;
730 char *currency_symbol;
731 char *mon_decimal_point;
732 char *mon_thousands_sep;
736 char int_frac_digits;
756 char int_p_cs_precedes;
758 char int_p_sep_by_space;
760 char int_n_cs_precedes;
762 char int_n_sep_by_space;
769 char int_p_sign_posn;
770 char int_n_sign_posn;
771 # 119 "../locale/locale.h"
778 extern char *setlocale (int __category, __const char *__locale) __attribute__ ((__nothrow__));
781 extern struct lconv *localeconv (void) __attribute__ ((__nothrow__));
784 # 146 "../locale/locale.h"
785 # 1 "../include/xlocale.h" 1
786 # 147 "../locale/locale.h" 2
788 typedef __locale_t locale_t;
794 extern __locale_t newlocale (int __category_mask, __const char *__locale,
795 __locale_t __base) __attribute__ ((__nothrow__));
796 # 189 "../locale/locale.h"
797 extern __locale_t duplocale (__locale_t __dataset) __attribute__ ((__nothrow__));
801 extern void freelocale (__locale_t __dataset) __attribute__ ((__nothrow__));
808 extern __locale_t uselocale (__locale_t __dataset) __attribute__ ((__nothrow__));
817 # 3 "../include/locale.h" 2
819 extern __typeof (uselocale) __uselocale;
826 extern struct loaded_l10nfile *_nl_locale_file_list[] ;
829 extern const struct __locale_struct _nl_C_locobj ;
833 extern struct lconv *__localeconv (void);
836 extern const char *__current_locale_name (int category) ;
837 # 27 "../locale/localeinfo.h" 2
838 # 1 "../include/time.h" 1
843 # 1 "../time/time.h" 1
844 # 31 "../time/time.h"
853 # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4
854 # 40 "../time/time.h" 2
858 # 1 "../bits/time.h" 1
859 # 44 "../time/time.h" 2
860 # 57 "../time/time.h"
861 # 1 "../bits/types.h" 1
862 # 28 "../bits/types.h"
863 # 1 "../sysdeps/wordsize-32/bits/wordsize.h" 1
864 # 29 "../bits/types.h" 2
867 # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4
868 # 32 "../bits/types.h" 2
871 typedef unsigned char __u_char;
872 typedef unsigned short int __u_short;
873 typedef unsigned int __u_int;
874 typedef unsigned long int __u_long;
877 typedef signed char __int8_t;
878 typedef unsigned char __uint8_t;
879 typedef signed short int __int16_t;
880 typedef unsigned short int __uint16_t;
881 typedef signed int __int32_t;
882 typedef unsigned int __uint32_t;
887 __extension__ typedef signed long long int __int64_t;
888 __extension__ typedef unsigned long long int __uint64_t;
896 __extension__ typedef long long int __quad_t;
897 __extension__ typedef unsigned long long int __u_quad_t;
898 # 134 "../bits/types.h"
899 # 1 "../bits/typesizes.h" 1
900 # 135 "../bits/types.h" 2
903 __extension__ typedef __u_quad_t __dev_t;
904 __extension__ typedef unsigned int __uid_t;
905 __extension__ typedef unsigned int __gid_t;
906 __extension__ typedef unsigned long int __ino_t;
907 __extension__ typedef __u_quad_t __ino64_t;
908 __extension__ typedef unsigned int __mode_t;
909 __extension__ typedef unsigned int __nlink_t;
910 __extension__ typedef long int __off_t;
911 __extension__ typedef __quad_t __off64_t;
912 __extension__ typedef int __pid_t;
913 __extension__ typedef struct { int __val[2]; } __fsid_t;
914 __extension__ typedef long int __clock_t;
915 __extension__ typedef unsigned long int __rlim_t;
916 __extension__ typedef __u_quad_t __rlim64_t;
917 __extension__ typedef unsigned int __id_t;
918 __extension__ typedef long int __time_t;
919 __extension__ typedef unsigned int __useconds_t;
920 __extension__ typedef long int __suseconds_t;
922 __extension__ typedef int __daddr_t;
923 __extension__ typedef long int __swblk_t;
924 __extension__ typedef int __key_t;
927 __extension__ typedef int __clockid_t;
930 __extension__ typedef void * __timer_t;
933 __extension__ typedef long int __blksize_t;
938 __extension__ typedef long int __blkcnt_t;
939 __extension__ typedef __quad_t __blkcnt64_t;
942 __extension__ typedef unsigned long int __fsblkcnt_t;
943 __extension__ typedef __u_quad_t __fsblkcnt64_t;
946 __extension__ typedef unsigned long int __fsfilcnt_t;
947 __extension__ typedef __u_quad_t __fsfilcnt64_t;
949 __extension__ typedef int __ssize_t;
953 typedef __off64_t __loff_t;
954 typedef __quad_t *__qaddr_t;
955 typedef char *__caddr_t;
958 __extension__ typedef int __intptr_t;
961 __extension__ typedef unsigned int __socklen_t;
962 # 58 "../time/time.h" 2
966 typedef __clock_t clock_t;
970 # 75 "../time/time.h"
973 typedef __time_t time_t;
977 # 93 "../time/time.h"
978 typedef __clockid_t clockid_t;
979 # 105 "../time/time.h"
980 typedef __timer_t timer_t;
981 # 121 "../time/time.h"
1009 __const char *tm_zone;
1025 struct timespec it_interval;
1026 struct timespec it_value;
1036 typedef __pid_t pid_t;
1045 extern clock_t clock (void) __attribute__ ((__nothrow__));
1048 extern time_t time (time_t *__timer) __attribute__ ((__nothrow__));
1051 extern double difftime (time_t __time1, time_t __time0)
1052 __attribute__ ((__nothrow__)) __attribute__ ((__const__));
1055 extern time_t mktime (struct tm *__tp) __attribute__ ((__nothrow__));
1061 extern size_t strftime (char *__restrict __s, size_t __maxsize,
1062 __const char *__restrict __format,
1063 __const struct tm *__restrict __tp) __attribute__ ((__nothrow__));
1069 extern char *strptime (__const char *__restrict __s,
1070 __const char *__restrict __fmt, struct tm *__tp)
1071 __attribute__ ((__nothrow__));
1077 # 1 "../include/xlocale.h" 1
1078 # 217 "../time/time.h" 2
1080 extern size_t strftime_l (char *__restrict __s, size_t __maxsize,
1081 __const char *__restrict __format,
1082 __const struct tm *__restrict __tp,
1083 __locale_t __loc) __attribute__ ((__nothrow__));
1085 extern char *strptime_l (__const char *__restrict __s,
1086 __const char *__restrict __fmt, struct tm *__tp,
1087 __locale_t __loc) __attribute__ ((__nothrow__));
1094 extern struct tm *gmtime (__const time_t *__timer) __attribute__ ((__nothrow__));
1098 extern struct tm *localtime (__const time_t *__timer) __attribute__ ((__nothrow__));
1104 extern struct tm *gmtime_r (__const time_t *__restrict __timer,
1105 struct tm *__restrict __tp) __attribute__ ((__nothrow__));
1109 extern struct tm *localtime_r (__const time_t *__restrict __timer,
1110 struct tm *__restrict __tp) __attribute__ ((__nothrow__));
1116 extern char *asctime (__const struct tm *__tp) __attribute__ ((__nothrow__));
1119 extern char *ctime (__const time_t *__timer) __attribute__ ((__nothrow__));
1127 extern char *asctime_r (__const struct tm *__restrict __tp,
1128 char *__restrict __buf) __attribute__ ((__nothrow__));
1131 extern char *ctime_r (__const time_t *__restrict __timer,
1132 char *__restrict __buf) __attribute__ ((__nothrow__));
1137 extern char *__tzname[2];
1138 extern int __daylight;
1139 extern long int __timezone;
1144 extern char *tzname[2];
1148 extern void tzset (void) __attribute__ ((__nothrow__));
1152 extern int daylight;
1153 extern long int timezone;
1159 extern int stime (__const time_t *__when) __attribute__ ((__nothrow__));
1160 # 312 "../time/time.h"
1161 extern time_t timegm (struct tm *__tp) __attribute__ ((__nothrow__));
1164 extern time_t timelocal (struct tm *__tp) __attribute__ ((__nothrow__));
1167 extern int dysize (int __year) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
1168 # 327 "../time/time.h"
1169 extern int nanosleep (__const struct timespec *__requested_time,
1170 struct timespec *__remaining);
1174 extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __attribute__ ((__nothrow__));
1177 extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __attribute__ ((__nothrow__));
1180 extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp)
1181 __attribute__ ((__nothrow__));
1188 extern int clock_nanosleep (clockid_t __clock_id, int __flags,
1189 __const struct timespec *__req,
1190 struct timespec *__rem);
1193 extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __attribute__ ((__nothrow__));
1198 extern int timer_create (clockid_t __clock_id,
1199 struct sigevent *__restrict __evp,
1200 timer_t *__restrict __timerid) __attribute__ ((__nothrow__));
1203 extern int timer_delete (timer_t __timerid) __attribute__ ((__nothrow__));
1206 extern int timer_settime (timer_t __timerid, int __flags,
1207 __const struct itimerspec *__restrict __value,
1208 struct itimerspec *__restrict __ovalue) __attribute__ ((__nothrow__));
1211 extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
1212 __attribute__ ((__nothrow__));
1215 extern int timer_getoverrun (timer_t __timerid) __attribute__ ((__nothrow__));
1216 # 389 "../time/time.h"
1217 extern int getdate_err;
1218 # 398 "../time/time.h"
1219 extern struct tm *getdate (__const char *__string);
1220 # 412 "../time/time.h"
1221 extern int getdate_r (__const char *__restrict __string,
1222 struct tm *__restrict __resbufp);
1226 # 6 "../include/time.h" 2
1227 # 1 "../include/xlocale.h" 1
1228 # 7 "../include/time.h" 2
1232 extern __typeof (strftime_l) __strftime_l;
1234 extern __typeof (strptime_l) __strptime_l;
1250 extern const unsigned short int __mon_yday[2][13] ;
1253 extern struct tm _tmbuf ;
1256 extern char *__tzstring (const char *string);
1259 extern size_t __tzname_cur_max ;
1262 extern int __use_tzfile ;
1264 extern void __tzfile_read (const char *file, size_t extra,
1266 extern void __tzfile_compute (time_t timer, int use_localtime,
1267 long int *leap_correct, int *leap_hit,
1269 extern void __tzfile_default (const char *std, const char *dst,
1270 long int stdoff, long int dstoff);
1275 extern time_t __mktime_internal (struct tm *__tp,
1276 struct tm *(*__func) (const time_t *,
1279 extern struct tm *__localtime_r (__const time_t *__timer,
1282 extern struct tm *__gmtime_r (__const time_t *__restrict __timer,
1283 struct tm *__restrict __tp);
1290 extern int __offtime (__const time_t *__timer,
1294 extern char *__asctime_r (__const struct tm *__tp, char *__buf);
1295 extern void __tzset (void);
1298 extern struct tm *__tz_convert (const time_t *timer, int use_localtime, struct tm *tp);
1302 extern long int __tzname_max (void);
1304 extern int __nanosleep (__const struct timespec *__requested_time,
1305 struct timespec *__remaining);
1307 extern int __nanosleep_nocancel (__const struct timespec *__requested_time,
1308 struct timespec *__remaining)
1310 extern int __getdate_r (__const char *__string, struct tm *__resbufp);
1314 extern int __getclktck (void);
1321 enum ptime_locale_status { not, loc, raw };
1323 extern char * __strptime_internal (const char *rp, const char *fmt,
1325 enum ptime_locale_status *decided,
1326 int era_cnt, __locale_t locparam)
1330 extern double __difftime (time_t time1, time_t time0);
1331 # 117 "../include/time.h"
1333 # 28 "../locale/localeinfo.h" 2
1334 # 1 "../sysdeps/generic/stdint.h" 1
1335 # 27 "../sysdeps/generic/stdint.h"
1336 # 1 "../bits/wchar.h" 1
1337 # 28 "../sysdeps/generic/stdint.h" 2
1338 # 1 "../sysdeps/wordsize-32/bits/wordsize.h" 1
1339 # 29 "../sysdeps/generic/stdint.h" 2
1340 # 37 "../sysdeps/generic/stdint.h"
1341 typedef signed char int8_t;
1342 typedef short int int16_t;
1343 typedef int int32_t;
1348 typedef long long int int64_t;
1353 typedef unsigned char uint8_t;
1354 typedef unsigned short int uint16_t;
1356 typedef unsigned int uint32_t;
1363 typedef unsigned long long int uint64_t;
1370 typedef signed char int_least8_t;
1371 typedef short int int_least16_t;
1372 typedef int int_least32_t;
1377 typedef long long int int_least64_t;
1381 typedef unsigned char uint_least8_t;
1382 typedef unsigned short int uint_least16_t;
1383 typedef unsigned int uint_least32_t;
1388 typedef unsigned long long int uint_least64_t;
1395 typedef signed char int_fast8_t;
1401 typedef int int_fast16_t;
1402 typedef int int_fast32_t;
1404 typedef long long int int_fast64_t;
1408 typedef unsigned char uint_fast8_t;
1414 typedef unsigned int uint_fast16_t;
1415 typedef unsigned int uint_fast32_t;
1417 typedef unsigned long long int uint_fast64_t;
1418 # 126 "../sysdeps/generic/stdint.h"
1419 typedef int intptr_t;
1422 typedef unsigned int uintptr_t;
1423 # 138 "../sysdeps/generic/stdint.h"
1425 typedef long long int intmax_t;
1427 typedef unsigned long long int uintmax_t;
1428 # 29 "../locale/localeinfo.h" 2
1429 # 1 "../include/sys/types.h" 1
1430 # 1 "../posix/sys/types.h" 1
1431 # 29 "../posix/sys/types.h"
1438 typedef __u_char u_char;
1439 typedef __u_short u_short;
1440 typedef __u_int u_int;
1441 typedef __u_long u_long;
1442 typedef __quad_t quad_t;
1443 typedef __u_quad_t u_quad_t;
1444 typedef __fsid_t fsid_t;
1449 typedef __loff_t loff_t;
1453 typedef __ino_t ino_t;
1460 typedef __ino64_t ino64_t;
1465 typedef __dev_t dev_t;
1470 typedef __gid_t gid_t;
1475 typedef __mode_t mode_t;
1480 typedef __nlink_t nlink_t;
1485 typedef __uid_t uid_t;
1491 typedef __off_t off_t;
1498 typedef __off64_t off64_t;
1499 # 105 "../posix/sys/types.h"
1500 typedef __id_t id_t;
1505 typedef __ssize_t ssize_t;
1511 typedef __daddr_t daddr_t;
1512 typedef __caddr_t caddr_t;
1518 typedef __key_t key_t;
1519 # 137 "../posix/sys/types.h"
1520 typedef __useconds_t useconds_t;
1524 typedef __suseconds_t suseconds_t;
1530 # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4
1531 # 148 "../posix/sys/types.h" 2
1535 typedef unsigned long int ulong;
1536 typedef unsigned short int ushort;
1537 typedef unsigned int uint;
1538 # 201 "../posix/sys/types.h"
1539 typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));
1540 typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));
1541 typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));
1542 typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));
1544 typedef int register_t __attribute__ ((__mode__ (__word__)));
1545 # 217 "../posix/sys/types.h"
1546 # 1 "../include/endian.h" 1
1547 # 1 "../string/endian.h" 1
1548 # 37 "../string/endian.h"
1549 # 1 "../ports/sysdeps/hppa/bits/endian.h" 1
1550 # 38 "../string/endian.h" 2
1551 # 2 "../include/endian.h" 2
1552 # 218 "../posix/sys/types.h" 2
1555 # 1 "../include/sys/select.h" 1
1557 # 1 "../misc/sys/select.h" 1
1558 # 31 "../misc/sys/select.h"
1559 # 1 "../bits/select.h" 1
1560 # 32 "../misc/sys/select.h" 2
1563 # 1 "../sysdeps/unix/sysv/linux/bits/sigset.h" 1
1564 # 23 "../sysdeps/unix/sysv/linux/bits/sigset.h"
1565 typedef int __sig_atomic_t;
1572 unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
1574 # 35 "../misc/sys/select.h" 2
1578 typedef __sigset_t sigset_t;
1586 # 1 "../bits/time.h" 1
1587 # 69 "../bits/time.h"
1591 __suseconds_t tv_usec;
1593 # 47 "../misc/sys/select.h" 2
1594 # 55 "../misc/sys/select.h"
1595 typedef long int __fd_mask;
1596 # 67 "../misc/sys/select.h"
1602 __fd_mask fds_bits[1024 / (8 * sizeof (__fd_mask))];
1615 typedef __fd_mask fd_mask;
1616 # 99 "../misc/sys/select.h"
1618 # 109 "../misc/sys/select.h"
1619 extern int select (int __nfds, fd_set *__restrict __readfds,
1620 fd_set *__restrict __writefds,
1621 fd_set *__restrict __exceptfds,
1622 struct timeval *__restrict __timeout);
1623 # 121 "../misc/sys/select.h"
1624 extern int pselect (int __nfds, fd_set *__restrict __readfds,
1625 fd_set *__restrict __writefds,
1626 fd_set *__restrict __exceptfds,
1627 const struct timespec *__restrict __timeout,
1628 const __sigset_t *__restrict __sigmask);
1632 # 3 "../include/sys/select.h" 2
1635 extern int __pselect (int __nfds, fd_set *__readfds,
1636 fd_set *__writefds, fd_set *__exceptfds,
1637 const struct timespec *__timeout,
1638 const __sigset_t *__sigmask);
1640 extern int __select (int __nfds, fd_set *__restrict __readfds,
1641 fd_set *__restrict __writefds,
1642 fd_set *__restrict __exceptfds,
1643 struct timeval *__restrict __timeout);
1645 # 221 "../posix/sys/types.h" 2
1648 # 1 "../sysdeps/unix/sysv/linux/sys/sysmacros.h" 1
1649 # 29 "../sysdeps/unix/sysv/linux/sys/sysmacros.h"
1651 extern __inline unsigned int gnu_dev_major (unsigned long long int __dev)
1652 __attribute__ ((__nothrow__));
1654 extern __inline unsigned int gnu_dev_minor (unsigned long long int __dev)
1655 __attribute__ ((__nothrow__));
1657 extern __inline unsigned long long int gnu_dev_makedev (unsigned int __major,
1658 unsigned int __minor)
1659 __attribute__ ((__nothrow__));
1662 __extension__ extern __inline unsigned int
1663 __attribute__ ((__nothrow__)) gnu_dev_major (unsigned long long int __dev)
1665 return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff);
1668 __extension__ extern __inline unsigned int
1669 __attribute__ ((__nothrow__)) gnu_dev_minor (unsigned long long int __dev)
1671 return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff);
1674 __extension__ extern __inline unsigned long long int
1675 __attribute__ ((__nothrow__)) gnu_dev_makedev (unsigned int __major, unsigned int __minor)
1677 return ((__minor & 0xff) | ((__major & 0xfff) << 8)
1678 | (((unsigned long long int) (__minor & ~0xff)) << 12)
1679 | (((unsigned long long int) (__major & ~0xfff)) << 32));
1681 # 224 "../posix/sys/types.h" 2
1686 typedef __blksize_t blksize_t;
1693 typedef __blkcnt_t blkcnt_t;
1697 typedef __fsblkcnt_t fsblkcnt_t;
1701 typedef __fsfilcnt_t fsfilcnt_t;
1702 # 262 "../posix/sys/types.h"
1703 typedef __blkcnt64_t blkcnt64_t;
1704 typedef __fsblkcnt64_t fsblkcnt64_t;
1705 typedef __fsfilcnt64_t fsfilcnt64_t;
1711 # 1 "../ports/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h" 1
1712 # 48 "../ports/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h"
1713 typedef unsigned long int pthread_t;
1714 # 60 "../ports/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h"
1722 typedef struct __pthread_internal_slist
1724 struct __pthread_internal_slist *__next;
1725 } __pthread_slist_t;
1732 struct __pthread_mutex_s
1735 unsigned int __count;
1740 unsigned int __nusers;
1744 __pthread_slist_t __list;
1755 } pthread_mutexattr_t;
1765 unsigned int __futex;
1766 __extension__ unsigned long long int __total_seq;
1767 __extension__ unsigned long long int __wakeup_seq;
1768 __extension__ unsigned long long int __woken_seq;
1770 unsigned int __nwaiters;
1771 unsigned int __broadcast_seq;
1774 __extension__ long long int __align;
1781 } pthread_condattr_t;
1785 typedef unsigned int pthread_key_t;
1789 typedef int pthread_once_t;
1800 unsigned int __nr_readers;
1801 unsigned int __readers_wakeup;
1802 unsigned int __writer_wakeup;
1803 unsigned int __nr_readers_queued;
1804 unsigned int __nr_writers_queued;
1807 unsigned int __flags;
1818 } pthread_rwlockattr_t;
1824 typedef volatile int pthread_spinlock_t;
1833 } pthread_barrier_t;
1839 } pthread_barrierattr_t;
1840 # 271 "../posix/sys/types.h" 2
1844 # 1 "../include/sys/types.h" 2
1845 # 30 "../locale/localeinfo.h" 2
1847 # 1 "../intl/loadinfo.h" 1
1848 # 60 "../intl/loadinfo.h"
1849 struct loaded_l10nfile
1851 const char *filename;
1856 struct loaded_l10nfile *next;
1857 struct loaded_l10nfile *successor[1];
1865 extern const char *_nl_normalize_codeset (const char *codeset, size_t name_len);
1868 extern struct loaded_l10nfile *
1869 _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);
1870 # 89 "../intl/loadinfo.h"
1871 extern const char *_nl_expand_alias (const char *name);
1875 extern int _nl_explode_name (char *name, const char **language, const char **modifier, const char **territory, const char **codeset, const char **normalized_codeset);
1876 # 32 "../locale/localeinfo.h" 2
1877 # 48 "../locale/localeinfo.h"
1881 const char *filedata;
1895 void (*cleanup) (struct locale_data *) ;
1899 struct lc_time_data *time;
1900 const struct gconv_fcts *ctype;
1904 unsigned int usage_count;
1909 unsigned int nstrings;
1910 union locale_data_value
1912 const uint32_t *wstr;
1927 sort_forward_position,
1928 sort_backward_position,
1947 # 128 "../locale/localeinfo.h"
1952 int32_t start_date[3];
1953 int32_t stop_date[3];
1954 const char *era_name;
1955 const char *era_format;
1956 const wchar_t *era_wname;
1957 const wchar_t *era_wformat;
1958 int absolute_direction;
1968 struct era_entry *eras;
1970 int era_initialized;
1972 const char **alt_digits;
1973 const wchar_t **walt_digits;
1974 int alt_digits_initialized;
1975 int walt_digits_initialized;
1986 # 178 "../locale/localeinfo.h"
1987 extern const union catnamestr_t
1993 # 1 "../locale/categories.def" 1
1994 # 42 "../locale/categories.def"
1995 char str62[sizeof ("LC_COLLATE")];
1996 # 68 "../locale/categories.def"
1997 char str137[sizeof ("LC_CTYPE")];
1998 # 140 "../locale/categories.def"
1999 char str189[sizeof ("LC_MONETARY")];
2000 # 192 "../locale/categories.def"
2001 char str203[sizeof ("LC_NUMERIC")];
2002 # 206 "../locale/categories.def"
2003 char str251[sizeof ("LC_TIME")];
2004 # 254 "../locale/categories.def"
2005 char str263[sizeof ("LC_MESSAGES")];
2006 # 265 "../locale/categories.def"
2007 char str272[sizeof ("LC_PAPER")];
2008 # 274 "../locale/categories.def"
2009 char str285[sizeof ("LC_NAME")];
2010 # 287 "../locale/categories.def"
2011 char str304[sizeof ("LC_ADDRESS")];
2012 # 306 "../locale/categories.def"
2013 char str315[sizeof ("LC_TELEPHONE")];
2014 # 317 "../locale/categories.def"
2015 char str323[sizeof ("LC_MEASUREMENT")];
2023 char str345[sizeof ("LC_IDENTIFICATION")];
2024 # 185 "../locale/localeinfo.h" 2
2028 } _nl_category_names ;
2029 const uint8_t _nl_category_name_idxs[13] ;
2030 extern const uint8_t _nl_category_name_sizes[13] ;
2033 extern const char _nl_C_name[] ;
2034 extern const char _nl_POSIX_name[] ;
2037 extern const char _nl_C_codeset[] ;
2042 extern struct __locale_struct _nl_global_locale ;
2047 # 1 "../bits/libc-tsd.h" 1
2048 # 45 "../bits/libc-tsd.h"
2049 # 1 "../include/tls.h" 1
2055 # 1 "../ports/sysdeps/hppa/nptl/tls.h" 1
2056 # 23 "../ports/sysdeps/hppa/nptl/tls.h"
2057 # 1 "../sysdeps/unix/sysv/linux/dl-sysdep.h" 1
2058 # 20 "../sysdeps/unix/sysv/linux/dl-sysdep.h"
2059 # 1 "../sysdeps/generic/dl-sysdep.h" 1
2060 # 21 "../sysdeps/unix/sysv/linux/dl-sysdep.h" 2
2061 # 24 "../ports/sysdeps/hppa/nptl/tls.h" 2
2064 # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stdbool.h" 1 3 4
2065 # 27 "../ports/sysdeps/hppa/nptl/tls.h" 2
2066 # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4
2067 # 28 "../ports/sysdeps/hppa/nptl/tls.h" 2
2080 # 57 "../ports/sysdeps/hppa/nptl/tls.h"
2081 # 1 "../ports/sysdeps/unix/sysv/linux/hppa/sysdep.h" 1
2082 # 22 "../ports/sysdeps/unix/sysv/linux/hppa/sysdep.h"
2083 # 1 "/usr/include/asm/unistd.h" 1 3 4
2084 # 23 "../ports/sysdeps/unix/sysv/linux/hppa/sysdep.h" 2
2085 # 1 "../sysdeps/generic/sysdep.h" 1
2086 # 24 "../ports/sysdeps/unix/sysv/linux/hppa/sysdep.h" 2
2087 # 1 "../sysdeps/unix/sysv/linux/sys/syscall.h" 1
2088 # 25 "../ports/sysdeps/unix/sysv/linux/hppa/sysdep.h" 2
2089 # 58 "../ports/sysdeps/hppa/nptl/tls.h" 2
2095 # 1 "../nptl/descr.h" 1
2096 # 23 "../nptl/descr.h"
2097 # 1 "../include/limits.h" 1
2098 # 145 "../include/limits.h"
2099 # 1 "../include/bits/posix1_lim.h" 1
2100 # 146 "../include/limits.h" 2
2104 # 1 "../include/bits/posix2_lim.h" 1
2105 # 150 "../include/limits.h" 2
2106 # 24 "../nptl/descr.h" 2
2107 # 1 "../include/sched.h" 1
2109 # 1 "../posix/sched.h" 1
2110 # 32 "../posix/sched.h"
2111 # 1 "../sysdeps/unix/sysv/linux/bits/sched.h" 1
2112 # 65 "../sysdeps/unix/sysv/linux/bits/sched.h"
2115 int __sched_priority;
2122 extern int clone (int (*__fn) (void *__arg), void *__child_stack,
2123 int __flags, void *__arg, ...) __attribute__ ((__nothrow__));
2126 extern int unshare (int __flags) __attribute__ ((__nothrow__));
2137 struct __sched_param
2139 int __sched_priority;
2141 # 104 "../sysdeps/unix/sysv/linux/bits/sched.h"
2142 typedef unsigned long int __cpu_mask;
2151 __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))];
2153 # 33 "../posix/sched.h" 2
2161 extern int sched_setparam (__pid_t __pid, __const struct sched_param *__param)
2162 __attribute__ ((__nothrow__));
2165 extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __attribute__ ((__nothrow__));
2168 extern int sched_setscheduler (__pid_t __pid, int __policy,
2169 __const struct sched_param *__param) __attribute__ ((__nothrow__));
2172 extern int sched_getscheduler (__pid_t __pid) __attribute__ ((__nothrow__));
2175 extern int sched_yield (void) __attribute__ ((__nothrow__));
2178 extern int sched_get_priority_max (int __algorithm) __attribute__ ((__nothrow__));
2181 extern int sched_get_priority_min (int __algorithm) __attribute__ ((__nothrow__));
2184 extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __attribute__ ((__nothrow__));
2185 # 76 "../posix/sched.h"
2186 extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize,
2187 __const cpu_set_t *__cpuset) __attribute__ ((__nothrow__));
2190 extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize,
2191 cpu_set_t *__cpuset) __attribute__ ((__nothrow__));
2195 # 3 "../include/sched.h" 2
2198 extern int __sched_setparam (__pid_t __pid,
2199 __const struct sched_param *__param);
2200 extern int __sched_getparam (__pid_t __pid, struct sched_param *__param);
2201 extern int __sched_setscheduler (__pid_t __pid, int __policy,
2202 __const struct sched_param *__param);
2204 extern int __sched_getscheduler (__pid_t __pid);
2205 extern int __sched_yield (void);
2207 extern int __sched_get_priority_max (int __algorithm);
2208 extern int __sched_get_priority_min (int __algorithm);
2209 extern int __sched_rr_get_interval (__pid_t __pid, struct timespec *__t);
2212 extern int __clone (int (*__fn) (void *__arg), void *__child_stack,
2213 int __flags, void *__arg, ...);
2214 extern int __clone2 (int (*__fn) (void *__arg), void *__child_stack_base,
2215 size_t __child_stack_size, int __flags, void *__arg, ...);
2216 # 25 "../nptl/descr.h" 2
2217 # 1 "../include/setjmp.h" 1
2219 # 1 "../setjmp/setjmp.h" 1
2220 # 28 "../setjmp/setjmp.h"
2223 # 1 "../ports/sysdeps/hppa/bits/setjmp.h" 1
2224 # 33 "../ports/sysdeps/hppa/bits/setjmp.h"
2225 typedef double __jmp_buf[21];
2226 # 31 "../setjmp/setjmp.h" 2
2227 # 1 "../sysdeps/unix/sysv/linux/bits/sigset.h" 1
2228 # 32 "../setjmp/setjmp.h" 2
2233 typedef struct __jmp_buf_tag
2240 int __mask_was_saved;
2241 __sigset_t __saved_mask;
2247 extern int setjmp (jmp_buf __env) __attribute__ ((__nothrow__));
2255 extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) __attribute__ ((__nothrow__));
2260 extern int _setjmp (struct __jmp_buf_tag __env[1]) __attribute__ ((__nothrow__));
2261 # 76 "../setjmp/setjmp.h"
2266 extern void longjmp (struct __jmp_buf_tag __env[1], int __val)
2267 __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
2275 extern void _longjmp (struct __jmp_buf_tag __env[1], int __val)
2276 __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
2284 typedef struct __jmp_buf_tag sigjmp_buf[1];
2285 # 108 "../setjmp/setjmp.h"
2286 extern void siglongjmp (sigjmp_buf __env, int __val)
2287 __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
2291 # 3 "../include/setjmp.h" 2
2296 extern void __longjmp (__jmp_buf __env, int __val)
2297 __attribute__ ((__noreturn__));
2303 extern int __sigjmp_save (jmp_buf __env, int __savemask);
2305 extern void _longjmp_unwind (jmp_buf env, int val);
2307 extern void __libc_siglongjmp (sigjmp_buf env, int val)
2308 __attribute__ ((noreturn));
2309 extern void __libc_longjmp (sigjmp_buf env, int val)
2310 __attribute__ ((noreturn));
2315 # 26 "../nptl/descr.h" 2
2317 # 1 "../include/sys/types.h" 1
2318 # 28 "../nptl/descr.h" 2
2319 # 1 "../sysdeps/generic/hp-timing.h" 1
2320 # 71 "../sysdeps/generic/hp-timing.h"
2321 typedef int hp_timing_t;
2322 # 29 "../nptl/descr.h" 2
2323 # 1 "../nptl/sysdeps/pthread/list.h" 1
2324 # 29 "../nptl/sysdeps/pthread/list.h"
2325 typedef struct list_head
2327 struct list_head *next;
2328 struct list_head *prev;
2330 # 46 "../nptl/sysdeps/pthread/list.h"
2332 list_add (list_t *newp, list_t *head)
2334 head->next->prev = newp;
2335 newp->next = head->next;
2343 list_add_tail (list_t *newp, list_t *head)
2345 head->prev->next = newp;
2347 newp->prev = head->prev;
2354 list_del (list_t *elem)
2356 elem->next->prev = elem->prev;
2357 elem->prev->next = elem->next;
2363 list_splice (list_t *add, list_t *head)
2366 if (add != add->next)
2368 add->next->prev = head;
2369 add->prev->next = head->next;
2370 head->next->prev = add->prev;
2371 head->next = add->next;
2374 # 30 "../nptl/descr.h" 2
2375 # 1 "../ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h" 1
2376 # 23 "../ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h"
2377 # 1 "../sysdeps/unix/sysv/linux/sys/param.h" 1
2378 # 22 "../sysdeps/unix/sysv/linux/sys/param.h"
2379 # 1 "../include/limits.h" 1
2380 # 145 "../include/limits.h"
2381 # 1 "../include/bits/posix1_lim.h" 1
2382 # 146 "../include/limits.h" 2
2386 # 1 "../include/bits/posix2_lim.h" 1
2387 # 150 "../include/limits.h" 2
2388 # 23 "../sysdeps/unix/sysv/linux/sys/param.h" 2
2390 # 1 "/usr/include/linux/param.h" 1 3 4
2394 # 1 "/usr/include/asm/param.h" 1 3 4
2395 # 5 "/usr/include/linux/param.h" 2 3 4
2396 # 25 "../sysdeps/unix/sysv/linux/sys/param.h" 2
2397 # 42 "../sysdeps/unix/sysv/linux/sys/param.h"
2398 # 1 "../include/sys/types.h" 1
2399 # 43 "../sysdeps/unix/sysv/linux/sys/param.h" 2
2400 # 24 "../ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h" 2
2402 # 1 "../ports/sysdeps/unix/sysv/linux/hppa/sysdep.h" 1
2403 # 23 "../ports/sysdeps/unix/sysv/linux/hppa/sysdep.h"
2404 # 1 "../sysdeps/generic/sysdep.h" 1
2405 # 24 "../ports/sysdeps/unix/sysv/linux/hppa/sysdep.h" 2
2406 # 26 "../ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h" 2
2407 # 1 "../include/atomic.h" 1
2408 # 49 "../include/atomic.h"
2409 # 1 "../include/stdlib.h" 1
2416 # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4
2417 # 8 "../include/stdlib.h" 2
2418 # 1 "../stdlib/stdlib.h" 1
2419 # 33 "../stdlib/stdlib.h"
2420 # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4
2421 # 34 "../stdlib/stdlib.h" 2
2430 # 1 "../sysdeps/unix/sysv/linux/bits/waitflags.h" 1
2431 # 43 "../stdlib/stdlib.h" 2
2432 # 1 "../bits/waitstatus.h" 1
2433 # 65 "../bits/waitstatus.h"
2434 # 1 "../include/endian.h" 1
2435 # 66 "../bits/waitstatus.h" 2
2450 unsigned int __w_retcode:8;
2451 unsigned int __w_coredump:1;
2452 unsigned int __w_termsig:7;
2454 } __wait_terminated;
2464 unsigned int __w_stopsig:8;
2465 unsigned int __w_stopval:8;
2469 # 44 "../stdlib/stdlib.h" 2
2470 # 68 "../stdlib/stdlib.h"
2475 } __WAIT_STATUS __attribute__ ((__transparent_union__));
2476 # 96 "../stdlib/stdlib.h"
2499 __extension__ typedef struct
2506 # 140 "../stdlib/stdlib.h"
2507 extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__)) ;
2512 extern double atof (__const char *__nptr)
2513 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
2515 extern int atoi (__const char *__nptr)
2516 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
2518 extern long int atol (__const char *__nptr)
2519 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
2525 __extension__ extern long long int atoll (__const char *__nptr)
2526 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
2532 extern double strtod (__const char *__restrict __nptr,
2533 char **__restrict __endptr)
2534 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
2540 extern float strtof (__const char *__restrict __nptr,
2541 char **__restrict __endptr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
2543 extern long double strtold (__const char *__restrict __nptr,
2544 char **__restrict __endptr)
2545 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
2551 extern long int strtol (__const char *__restrict __nptr,
2552 char **__restrict __endptr, int __base)
2553 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
2555 extern unsigned long int strtoul (__const char *__restrict __nptr,
2556 char **__restrict __endptr, int __base)
2557 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
2563 extern long long int strtoq (__const char *__restrict __nptr,
2564 char **__restrict __endptr, int __base)
2565 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
2568 extern unsigned long long int strtouq (__const char *__restrict __nptr,
2569 char **__restrict __endptr, int __base)
2570 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
2577 extern long long int strtoll (__const char *__restrict __nptr,
2578 char **__restrict __endptr, int __base)
2579 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
2582 extern unsigned long long int strtoull (__const char *__restrict __nptr,
2583 char **__restrict __endptr, int __base)
2584 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
2586 # 236 "../stdlib/stdlib.h"
2587 # 1 "../include/xlocale.h" 1
2588 # 237 "../stdlib/stdlib.h" 2
2592 extern long int strtol_l (__const char *__restrict __nptr,
2593 char **__restrict __endptr, int __base,
2594 __locale_t __loc) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) ;
2596 extern unsigned long int strtoul_l (__const char *__restrict __nptr,
2597 char **__restrict __endptr,
2598 int __base, __locale_t __loc)
2599 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) ;
2602 extern long long int strtoll_l (__const char *__restrict __nptr,
2603 char **__restrict __endptr, int __base,
2605 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) ;
2608 extern unsigned long long int strtoull_l (__const char *__restrict __nptr,
2609 char **__restrict __endptr,
2610 int __base, __locale_t __loc)
2611 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) ;
2613 extern double strtod_l (__const char *__restrict __nptr,
2614 char **__restrict __endptr, __locale_t __loc)
2615 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))) ;
2617 extern float strtof_l (__const char *__restrict __nptr,
2618 char **__restrict __endptr, __locale_t __loc)
2619 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))) ;
2621 extern long double strtold_l (__const char *__restrict __nptr,
2622 char **__restrict __endptr,
2624 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))) ;
2631 extern double __strtod_internal (__const char *__restrict __nptr,
2632 char **__restrict __endptr, int __group)
2633 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
2634 extern float __strtof_internal (__const char *__restrict __nptr,
2635 char **__restrict __endptr, int __group)
2636 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
2637 extern long double __strtold_internal (__const char *__restrict __nptr,
2638 char **__restrict __endptr,
2640 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
2642 extern long int __strtol_internal (__const char *__restrict __nptr,
2643 char **__restrict __endptr,
2644 int __base, int __group)
2645 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
2649 extern unsigned long int __strtoul_internal (__const char *__restrict __nptr,
2650 char **__restrict __endptr,
2651 int __base, int __group)
2652 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
2658 extern long long int __strtoll_internal (__const char *__restrict __nptr,
2659 char **__restrict __endptr,
2660 int __base, int __group)
2661 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
2666 extern unsigned long long int __strtoull_internal (__const char *
2668 char **__restrict __endptr,
2669 int __base, int __group)
2670 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
2679 extern __inline double
2680 __attribute__ ((__nothrow__)) strtod (__const char *__restrict __nptr, char **__restrict __endptr)
2682 return __strtod_internal (__nptr, __endptr, 0);
2684 extern __inline long int
2685 __attribute__ ((__nothrow__)) strtol (__const char *__restrict __nptr, char **__restrict __endptr, int __base)
2688 return __strtol_internal (__nptr, __endptr, __base, 0);
2690 extern __inline unsigned long int
2691 __attribute__ ((__nothrow__)) strtoul (__const char *__restrict __nptr, char **__restrict __endptr, int __base)
2694 return __strtoul_internal (__nptr, __endptr, __base, 0);
2700 extern __inline float
2701 __attribute__ ((__nothrow__)) strtof (__const char *__restrict __nptr, char **__restrict __endptr)
2703 return __strtof_internal (__nptr, __endptr, 0);
2706 extern __inline long double
2707 __attribute__ ((__nothrow__)) strtold (__const char *__restrict __nptr, char **__restrict __endptr)
2709 return __strtold_internal (__nptr, __endptr, 0);
2716 __extension__ extern __inline long long int
2717 __attribute__ ((__nothrow__)) strtoq (__const char *__restrict __nptr, char **__restrict __endptr, int __base)
2720 return __strtoll_internal (__nptr, __endptr, __base, 0);
2722 __extension__ extern __inline unsigned long long int
2723 __attribute__ ((__nothrow__)) strtouq (__const char *__restrict __nptr, char **__restrict __endptr, int __base)
2726 return __strtoull_internal (__nptr, __endptr, __base, 0);
2732 __extension__ extern __inline long long int
2733 __attribute__ ((__nothrow__)) strtoll (__const char *__restrict __nptr, char **__restrict __endptr, int __base)
2736 return __strtoll_internal (__nptr, __endptr, __base, 0);
2738 __extension__ extern __inline unsigned long long int
2739 __attribute__ ((__nothrow__)) strtoull (__const char * __restrict __nptr, char **__restrict __endptr, int __base)
2742 return __strtoull_internal (__nptr, __endptr, __base, 0);
2748 extern __inline double
2749 __attribute__ ((__nothrow__)) atof (__const char *__nptr)
2751 return strtod (__nptr, (char **) ((void *)0));
2754 __attribute__ ((__nothrow__)) atoi (__const char *__nptr)
2756 return (int) strtol (__nptr, (char **) ((void *)0), 10);
2758 extern __inline long int
2759 __attribute__ ((__nothrow__)) atol (__const char *__nptr)
2761 return strtol (__nptr, (char **) ((void *)0), 10);
2767 __extension__ extern __inline long long int
2768 __attribute__ ((__nothrow__)) atoll (__const char *__nptr)
2770 return strtoll (__nptr, (char **) ((void *)0), 10);
2773 # 429 "../stdlib/stdlib.h"
2774 extern char *l64a (long int __n) __attribute__ ((__nothrow__)) ;
2777 extern long int a64l (__const char *__s)
2778 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
2783 # 1 "../include/sys/types.h" 1
2784 # 439 "../stdlib/stdlib.h" 2
2791 extern long int random (void) __attribute__ ((__nothrow__));
2794 extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__));
2800 extern char *initstate (unsigned int __seed, char *__statebuf,
2801 size_t __statelen) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
2805 extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2824 extern int random_r (struct random_data *__restrict __buf,
2825 int32_t *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
2827 extern int srandom_r (unsigned int __seed, struct random_data *__buf)
2828 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
2830 extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
2832 struct random_data *__restrict __buf)
2833 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4)));
2835 extern int setstate_r (char *__restrict __statebuf,
2836 struct random_data *__restrict __buf)
2837 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
2844 extern int rand (void) __attribute__ ((__nothrow__));
2846 extern void srand (unsigned int __seed) __attribute__ ((__nothrow__));
2851 extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__));
2859 extern double drand48 (void) __attribute__ ((__nothrow__));
2860 extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2863 extern long int lrand48 (void) __attribute__ ((__nothrow__));
2864 extern long int nrand48 (unsigned short int __xsubi[3])
2865 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2868 extern long int mrand48 (void) __attribute__ ((__nothrow__));
2869 extern long int jrand48 (unsigned short int __xsubi[3])
2870 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2873 extern void srand48 (long int __seedval) __attribute__ ((__nothrow__));
2874 extern unsigned short int *seed48 (unsigned short int __seed16v[3])
2875 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2876 extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2884 unsigned short int __x[3];
2885 unsigned short int __old_x[3];
2886 unsigned short int __c;
2887 unsigned short int __init;
2888 unsigned long long int __a;
2892 extern int drand48_r (struct drand48_data *__restrict __buffer,
2893 double *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
2894 extern int erand48_r (unsigned short int __xsubi[3],
2895 struct drand48_data *__restrict __buffer,
2896 double *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
2899 extern int lrand48_r (struct drand48_data *__restrict __buffer,
2900 long int *__restrict __result)
2901 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
2902 extern int nrand48_r (unsigned short int __xsubi[3],
2903 struct drand48_data *__restrict __buffer,
2904 long int *__restrict __result)
2905 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
2908 extern int mrand48_r (struct drand48_data *__restrict __buffer,
2909 long int *__restrict __result)
2910 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
2911 extern int jrand48_r (unsigned short int __xsubi[3],
2912 struct drand48_data *__restrict __buffer,
2913 long int *__restrict __result)
2914 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
2917 extern int srand48_r (long int __seedval, struct drand48_data *__buffer)
2918 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
2920 extern int seed48_r (unsigned short int __seed16v[3],
2921 struct drand48_data *__buffer) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
2923 extern int lcong48_r (unsigned short int __param[7],
2924 struct drand48_data *__buffer)
2925 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
2935 extern void *malloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ;
2937 extern void *calloc (size_t __nmemb, size_t __size)
2938 __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ;
2946 extern void *realloc (void *__ptr, size_t __size)
2947 __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__));
2949 extern void free (void *__ptr) __attribute__ ((__nothrow__));
2954 extern void cfree (void *__ptr) __attribute__ ((__nothrow__));
2958 # 1 "../include/alloca.h" 1
2961 # 1 "../stdlib/alloca.h" 1
2962 # 25 "../stdlib/alloca.h"
2963 # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4
2964 # 26 "../stdlib/alloca.h" 2
2972 extern void *alloca (size_t __size) __attribute__ ((__nothrow__));
2979 # 4 "../include/alloca.h" 2
2980 # 1 "../ports/sysdeps/hppa/stackinfo.h" 1
2981 # 5 "../include/alloca.h" 2
2986 extern void *__alloca (size_t __size);
2992 extern int __libc_use_alloca (size_t size) __attribute__ ((const));
2993 extern int __libc_alloca_cutoff (size_t size) __attribute__ ((const));
2997 # 1 "../nptl/sysdeps/pthread/allocalim.h" 1
2998 # 20 "../nptl/sysdeps/pthread/allocalim.h"
2999 # 1 "../include/alloca.h" 1
3000 # 21 "../nptl/sysdeps/pthread/allocalim.h" 2
3001 # 1 "../include/limits.h" 1
3002 # 145 "../include/limits.h"
3003 # 1 "../include/bits/posix1_lim.h" 1
3004 # 146 "../include/limits.h" 2
3008 # 1 "../include/bits/posix2_lim.h" 1
3009 # 150 "../include/limits.h" 2
3010 # 22 "../nptl/sysdeps/pthread/allocalim.h" 2
3014 __inline __attribute__ ((__always_inline__))
3015 __libc_use_alloca (size_t size)
3017 return (__builtin_expect (size <= 16384 / 4, 1)
3018 || __libc_alloca_cutoff (size));
3020 # 21 "../include/alloca.h" 2
3021 # 613 "../stdlib/stdlib.h" 2
3026 extern void *valloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ;
3031 extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
3032 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
3037 extern void abort (void) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
3041 extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3047 extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)
3048 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3055 extern void exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
3062 extern void _Exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
3069 extern char *getenv (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
3074 extern char *__secure_getenv (__const char *__name)
3075 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
3081 extern int putenv (char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3087 extern int setenv (__const char *__name, __const char *__value, int __replace)
3088 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
3091 extern int unsetenv (__const char *__name) __attribute__ ((__nothrow__));
3098 extern int clearenv (void) __attribute__ ((__nothrow__));
3099 # 698 "../stdlib/stdlib.h"
3100 extern char *mktemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
3101 # 709 "../stdlib/stdlib.h"
3102 extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) ;
3103 # 719 "../stdlib/stdlib.h"
3104 extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) ;
3105 # 729 "../stdlib/stdlib.h"
3106 extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
3115 extern int system (__const char *__command) ;
3122 extern char *canonicalize_file_name (__const char *__name)
3123 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
3124 # 756 "../stdlib/stdlib.h"
3125 extern char *realpath (__const char *__restrict __name,
3126 char *__restrict __resolved) __attribute__ ((__nothrow__)) ;
3133 typedef int (*__compar_fn_t) (__const void *, __const void *);
3136 typedef __compar_fn_t comparison_fn_t;
3143 extern void *bsearch (__const void *__key, __const void *__base,
3144 size_t __nmemb, size_t __size, __compar_fn_t __compar)
3145 __attribute__ ((__nonnull__ (1, 2, 5))) ;
3149 extern void qsort (void *__base, size_t __nmemb, size_t __size,
3150 __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4)));
3154 extern int abs (int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ;
3155 extern long int labs (long int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ;
3159 __extension__ extern long long int llabs (long long int __x)
3160 __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ;
3168 extern div_t div (int __numer, int __denom)
3169 __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ;
3170 extern ldiv_t ldiv (long int __numer, long int __denom)
3171 __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ;
3176 __extension__ extern lldiv_t lldiv (long long int __numer,
3177 long long int __denom)
3178 __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ;
3180 # 821 "../stdlib/stdlib.h"
3181 extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,
3182 int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ;
3187 extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,
3188 int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ;
3193 extern char *gcvt (double __value, int __ndigit, char *__buf)
3194 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))) ;
3199 extern char *qecvt (long double __value, int __ndigit,
3200 int *__restrict __decpt, int *__restrict __sign)
3201 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ;
3202 extern char *qfcvt (long double __value, int __ndigit,
3203 int *__restrict __decpt, int *__restrict __sign)
3204 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ;
3205 extern char *qgcvt (long double __value, int __ndigit, char *__buf)
3206 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))) ;
3211 extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
3212 int *__restrict __sign, char *__restrict __buf,
3213 size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5)));
3214 extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
3215 int *__restrict __sign, char *__restrict __buf,
3216 size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5)));
3218 extern int qecvt_r (long double __value, int __ndigit,
3219 int *__restrict __decpt, int *__restrict __sign,
3220 char *__restrict __buf, size_t __len)
3221 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5)));
3222 extern int qfcvt_r (long double __value, int __ndigit,
3223 int *__restrict __decpt, int *__restrict __sign,
3224 char *__restrict __buf, size_t __len)
3225 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5)));
3233 extern int mblen (__const char *__s, size_t __n) __attribute__ ((__nothrow__)) ;
3236 extern int mbtowc (wchar_t *__restrict __pwc,
3237 __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__)) ;
3240 extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__)) ;
3244 extern size_t mbstowcs (wchar_t *__restrict __pwcs,
3245 __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__));
3247 extern size_t wcstombs (char *__restrict __s,
3248 __const wchar_t *__restrict __pwcs, size_t __n)
3249 __attribute__ ((__nothrow__));
3258 extern int rpmatch (__const char *__response) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
3259 # 909 "../stdlib/stdlib.h"
3260 extern int getsubopt (char **__restrict __optionp,
3261 char *__const *__restrict __tokens,
3262 char **__restrict __valuep)
3263 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2, 3))) ;
3269 extern void setkey (__const char *__key) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3277 extern int posix_openpt (int __oflag) ;
3285 extern int grantpt (int __fd) __attribute__ ((__nothrow__));
3289 extern int unlockpt (int __fd) __attribute__ ((__nothrow__));
3294 extern char *ptsname (int __fd) __attribute__ ((__nothrow__)) ;
3301 extern int ptsname_r (int __fd, char *__buf, size_t __buflen)
3302 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
3305 extern int getpt (void);
3312 extern int getloadavg (double __loadavg[], int __nelem)
3313 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3314 # 977 "../stdlib/stdlib.h"
3316 # 9 "../include/stdlib.h" 2
3323 extern __typeof (strtol_l) __strtol_l;
3324 extern __typeof (strtoul_l) __strtoul_l;
3325 extern __typeof (strtoll_l) __strtoll_l;
3326 extern __typeof (strtoull_l) __strtoull_l;
3327 extern __typeof (strtod_l) __strtod_l;
3328 extern __typeof (strtof_l) __strtof_l;
3329 extern __typeof (strtold_l) __strtold_l;
3347 extern long int __random (void);
3348 extern void __srandom (unsigned int __seed);
3349 extern char *__initstate (unsigned int __seed, char *__statebuf,
3351 extern char *__setstate (char *__statebuf);
3352 extern int __random_r (struct random_data *__buf, int32_t *__result);
3353 extern int __srandom_r (unsigned int __seed, struct random_data *__buf);
3354 extern int __initstate_r (unsigned int __seed, char *__statebuf,
3355 size_t __statelen, struct random_data *__buf);
3356 extern int __setstate_r (char *__statebuf, struct random_data *__buf);
3357 extern int __rand_r (unsigned int *__seed);
3358 extern int __erand48_r (unsigned short int __xsubi[3],
3359 struct drand48_data *__buffer, double *__result);
3360 extern int __nrand48_r (unsigned short int __xsubi[3],
3361 struct drand48_data *__buffer,
3362 long int *__result);
3363 extern int __jrand48_r (unsigned short int __xsubi[3],
3364 struct drand48_data *__buffer,
3365 long int *__result);
3366 extern int __srand48_r (long int __seedval,
3367 struct drand48_data *__buffer);
3368 extern int __seed48_r (unsigned short int __seed16v[3],
3369 struct drand48_data *__buffer);
3370 extern int __lcong48_r (unsigned short int __param[7],
3371 struct drand48_data *__buffer);
3374 extern int __drand48_iterate (unsigned short int __xsubi[3],
3375 struct drand48_data *__buffer);
3378 extern struct drand48_data __libc_drand48_data ;
3380 extern int __setenv (__const char *__name, __const char *__value,
3382 extern int __unsetenv (__const char *__name);
3383 extern int __clearenv (void);
3384 extern char *__canonicalize_file_name (__const char *__name);
3385 extern char *__realpath (__const char *__name, char *__resolved);
3386 extern int __ptsname_r (int __fd, char *__buf, size_t __buflen);
3387 extern int __getpt (void);
3388 extern int __posix_openpt (int __oflag);
3390 extern int __add_to_environ (const char *name, const char *value,
3391 const char *combines, int replace);
3393 extern void _quicksort (void *const pbase, size_t total_elems,
3394 size_t size, __compar_fn_t cmp);
3396 extern int __on_exit (void (*__func) (int __status, void *__arg), void *__arg);
3398 extern int __cxa_atexit (void (*func) (void *), void *arg, void *d);
3399 extern int __cxa_atexit_internal (void (*func) (void *), void *arg, void *d)
3402 extern void __cxa_finalize (void *d);
3404 extern int __posix_memalign (void **memptr, size_t alignment, size_t size);
3406 extern void *__libc_memalign (size_t alignment, size_t size)
3407 __attribute__ ((__malloc__));
3409 extern int __libc_system (const char *line);
3411 extern double ____strtod_l_internal (__const char *__restrict __nptr,
3412 char **__restrict __endptr, int __group,
3414 extern float ____strtof_l_internal (__const char *__restrict __nptr,
3415 char **__restrict __endptr, int __group,
3417 extern long double ____strtold_l_internal (__const char *__restrict __nptr,
3418 char **__restrict __endptr,
3419 int __group, __locale_t __loc);
3420 extern long int ____strtol_l_internal (__const char *__restrict __nptr,
3421 char **__restrict __endptr,
3422 int __base, int __group,
3424 extern unsigned long int ____strtoul_l_internal (__const char *
3426 char **__restrict __endptr,
3427 int __base, int __group,
3430 extern long long int ____strtoll_l_internal (__const char *__restrict __nptr,
3431 char **__restrict __endptr,
3432 int __base, int __group,
3435 extern unsigned long long int ____strtoull_l_internal (__const char *
3438 __restrict __endptr,
3439 int __base, int __group,
3450 extern __inline double
3451 __attribute__ ((__nothrow__)) __strtod_l (__const char *__restrict __nptr, char **__restrict __endptr, __locale_t __loc)
3454 return ____strtod_l_internal (__nptr, __endptr, 0, __loc);
3456 extern __inline long int
3457 __attribute__ ((__nothrow__)) __strtol_l (__const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc)
3460 return ____strtol_l_internal (__nptr, __endptr, __base, 0, __loc);
3462 extern __inline unsigned long int
3463 __attribute__ ((__nothrow__)) __strtoul_l (__const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc)
3466 return ____strtoul_l_internal (__nptr, __endptr, __base, 0, __loc);
3468 extern __inline float
3469 __attribute__ ((__nothrow__)) __strtof_l (__const char *__restrict __nptr, char **__restrict __endptr, __locale_t __loc)
3472 return ____strtof_l_internal (__nptr, __endptr, 0, __loc);
3474 extern __inline long double
3475 __attribute__ ((__nothrow__)) __strtold_l (__const char *__restrict __nptr, char **__restrict __endptr, __locale_t __loc)
3478 return ____strtold_l_internal (__nptr, __endptr, 0, __loc);
3480 __extension__ extern __inline long long int
3481 __attribute__ ((__nothrow__)) __strtoll_l (__const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc)
3484 return ____strtoll_l_internal (__nptr, __endptr, __base, 0, __loc);
3486 __extension__ extern __inline unsigned long long int
3487 __attribute__ ((__nothrow__)) __strtoull_l (__const char * __restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc)
3490 return ____strtoull_l_internal (__nptr, __endptr, __base, 0, __loc);
3493 extern char *__ecvt (double __value, int __ndigit, int *__restrict __decpt,
3494 int *__restrict __sign);
3495 extern char *__fcvt (double __value, int __ndigit, int *__restrict __decpt,
3496 int *__restrict __sign);
3497 extern char *__gcvt (double __value, int __ndigit, char *__buf);
3498 extern int __ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
3499 int *__restrict __sign, char *__restrict __buf,
3501 extern int __fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
3502 int *__restrict __sign, char *__restrict __buf,
3504 extern char *__qecvt (long double __value, int __ndigit,
3505 int *__restrict __decpt, int *__restrict __sign);
3506 extern char *__qfcvt (long double __value, int __ndigit,
3507 int *__restrict __decpt, int *__restrict __sign);
3508 extern char *__qgcvt (long double __value, int __ndigit, char *__buf);
3509 extern int __qecvt_r (long double __value, int __ndigit,
3510 int *__restrict __decpt, int *__restrict __sign,
3511 char *__restrict __buf, size_t __len);
3512 extern int __qfcvt_r (long double __value, int __ndigit,
3513 int *__restrict __decpt, int *__restrict __sign,
3514 char *__restrict __buf, size_t __len);
3515 # 217 "../include/stdlib.h"
3516 extern void *__default_morecore (ptrdiff_t) __attribute__ ((__nothrow__));
3520 # 50 "../include/atomic.h" 2
3522 # 1 "../ports/sysdeps/unix/sysv/linux/hppa/bits/atomic.h" 1
3523 # 21 "../ports/sysdeps/unix/sysv/linux/hppa/bits/atomic.h"
3524 # 1 "../ports/sysdeps/unix/sysv/linux/hppa/sysdep.h" 1
3525 # 23 "../ports/sysdeps/unix/sysv/linux/hppa/sysdep.h"
3526 # 1 "../sysdeps/generic/sysdep.h" 1
3527 # 24 "../ports/sysdeps/unix/sysv/linux/hppa/sysdep.h" 2
3528 # 22 "../ports/sysdeps/unix/sysv/linux/hppa/bits/atomic.h" 2
3529 # 1 "../ports/sysdeps/hppa/abort-instr.h" 1
3530 # 23 "../ports/sysdeps/unix/sysv/linux/hppa/bits/atomic.h" 2
3531 # 1 "../ports/sysdeps/unix/sysv/linux/hppa/kernel-features.h" 1
3532 # 39 "../ports/sysdeps/unix/sysv/linux/hppa/kernel-features.h"
3533 # 1 "../sysdeps/unix/sysv/linux/kernel-features.h" 1
3534 # 39 "../ports/sysdeps/unix/sysv/linux/hppa/kernel-features.h" 2
3535 # 24 "../ports/sysdeps/unix/sysv/linux/hppa/bits/atomic.h" 2
3536 # 34 "../ports/sysdeps/unix/sysv/linux/hppa/bits/atomic.h"
3537 typedef int8_t atomic8_t;
3538 typedef uint8_t uatomic8_t;
3539 typedef int_fast8_t atomic_fast8_t;
3540 typedef uint_fast8_t uatomic_fast8_t;
3542 typedef int32_t atomic32_t;
3543 typedef uint32_t uatomic32_t;
3544 typedef int_fast32_t atomic_fast32_t;
3545 typedef uint_fast32_t uatomic_fast32_t;
3547 typedef intptr_t atomicptr_t;
3548 typedef uintptr_t uatomicptr_t;
3549 typedef intmax_t atomic_max_t;
3550 typedef uintmax_t uatomic_max_t;
3551 # 52 "../include/atomic.h" 2
3552 # 27 "../ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h" 2
3553 # 48 "../ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h"
3554 typedef int lll_lock_t;
3555 # 110 "../ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h"
3556 static inline int __attribute__((always_inline))
3557 __lll_mutex_trylock(lll_lock_t *futex)
3559 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;
3563 static inline int __attribute__((always_inline))
3564 __lll_robust_mutex_trylock(int *futex, int id)
3566 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;
3572 static inline int __attribute__((always_inline))
3573 __lll_mutex_cond_trylock(lll_lock_t *futex)
3575 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;
3580 extern void __lll_lock_wait (lll_lock_t *futex) ;
3582 static inline void __attribute__((always_inline))
3583 __lll_mutex_lock(lll_lock_t *futex)
3585 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)
3586 __lll_lock_wait (futex);
3590 extern int __lll_robust_lock_wait (int *futex) ;
3592 static inline int __attribute__ ((always_inline))
3593 __lll_robust_mutex_lock (int *futex, int id)
3596 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)
3597 result = __lll_robust_lock_wait (futex);
3603 static inline void __attribute__ ((always_inline))
3604 __lll_mutex_cond_lock (lll_lock_t *futex)
3606 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)
3607 __lll_lock_wait (futex);
3616 extern int __lll_timedlock_wait (lll_lock_t *futex, const struct timespec *)
3618 extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *)
3621 static inline int __attribute__ ((always_inline))
3622 __lll_mutex_timedlock (lll_lock_t *futex, const struct timespec *abstime)
3625 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)
3626 result = __lll_timedlock_wait (futex, abstime);
3632 static inline int __attribute__ ((always_inline))
3633 __lll_robust_mutex_timedlock (int *futex, const struct timespec *abstime,
3637 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)
3638 result = __lll_robust_timedlock_wait (futex, abstime);
3645 static inline void __attribute__ ((always_inline))
3646 __lll_mutex_unlock (lll_lock_t *futex)
3648 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; });
3649 if (__builtin_expect (val > 1, 0))
3650 ({ ; 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; });
3655 static inline void __attribute__ ((always_inline))
3656 __lll_robust_mutex_unlock (int *futex, int mask)
3658 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; });
3659 if (__builtin_expect (val & mask, 0))
3660 ({ ; 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; });
3666 static inline void __attribute__ ((always_inline))
3667 __lll_mutex_unlock_force (lll_lock_t *futex)
3669 (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; });
3670 ({ ; 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; });
3672 # 242 "../ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h"
3673 extern int lll_unlock_wake_cb (lll_lock_t *__futex) ;
3674 # 265 "../ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h"
3675 extern int __lll_timedwait_tid (int *, const struct timespec *)
3677 # 279 "../ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h"
3678 extern void __lll_cond_wait (pthread_cond_t *cond)
3680 extern int __lll_cond_timedwait (pthread_cond_t *cond,
3681 const struct timespec *abstime)
3683 extern void __lll_cond_wake (pthread_cond_t *cond)
3685 extern void __lll_cond_broadcast (pthread_cond_t *cond)
3687 # 31 "../nptl/descr.h" 2
3688 # 1 "../ports/sysdeps/hppa/nptl/pthreaddef.h" 1
3689 # 34 "../ports/sysdeps/hppa/nptl/pthreaddef.h"
3690 register char * stack_pointer __asm__ ("%r30");
3691 # 32 "../nptl/descr.h" 2
3692 # 1 "../sysdeps/unix/sysv/linux/dl-sysdep.h" 1
3693 # 20 "../sysdeps/unix/sysv/linux/dl-sysdep.h"
3694 # 1 "../sysdeps/generic/dl-sysdep.h" 1
3695 # 21 "../sysdeps/unix/sysv/linux/dl-sysdep.h" 2
3696 # 33 "../nptl/descr.h" 2
3697 # 1 "../nptl/../nptl_db/thread_db.h" 1
3698 # 26 "../nptl/../nptl_db/thread_db.h"
3699 # 1 "../include/pthread.h" 1
3700 # 1 "../nptl/sysdeps/pthread/pthread.h" 1
3701 # 27 "../nptl/sysdeps/pthread/pthread.h"
3702 # 1 "../include/signal.h" 1
3705 # 1 "../signal/signal.h" 1
3706 # 31 "../signal/signal.h"
3709 # 1 "../sysdeps/unix/sysv/linux/bits/sigset.h" 1
3710 # 34 "../signal/signal.h" 2
3711 # 400 "../signal/signal.h"
3713 # 4 "../include/signal.h" 2
3714 # 28 "../nptl/sysdeps/pthread/pthread.h" 2
3717 # 1 "../sysdeps/wordsize-32/bits/wordsize.h" 1
3718 # 31 "../nptl/sysdeps/pthread/pthread.h" 2
3724 PTHREAD_CREATE_JOINABLE,
3726 PTHREAD_CREATE_DETACHED
3734 PTHREAD_MUTEX_TIMED_NP,
3735 PTHREAD_MUTEX_RECURSIVE_NP,
3736 PTHREAD_MUTEX_ERRORCHECK_NP,
3737 PTHREAD_MUTEX_ADAPTIVE_NP
3740 PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP,
3741 PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP,
3742 PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP,
3743 PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL
3747 , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP
3756 PTHREAD_MUTEX_STALLED_NP,
3757 PTHREAD_MUTEX_ROBUST_NP
3767 PTHREAD_PRIO_INHERIT,
3768 PTHREAD_PRIO_PROTECT
3770 # 113 "../nptl/sysdeps/pthread/pthread.h"
3773 PTHREAD_RWLOCK_PREFER_READER_NP,
3774 PTHREAD_RWLOCK_PREFER_WRITER_NP,
3775 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,
3776 PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP
3778 # 143 "../nptl/sysdeps/pthread/pthread.h"
3781 PTHREAD_INHERIT_SCHED,
3783 PTHREAD_EXPLICIT_SCHED
3791 PTHREAD_SCOPE_SYSTEM,
3793 PTHREAD_SCOPE_PROCESS
3801 PTHREAD_PROCESS_PRIVATE,
3803 PTHREAD_PROCESS_SHARED
3806 # 178 "../nptl/sysdeps/pthread/pthread.h"
3807 struct _pthread_cleanup_buffer
3809 void (*__routine) (void *);
3812 struct _pthread_cleanup_buffer *__prev;
3818 PTHREAD_CANCEL_ENABLE,
3820 PTHREAD_CANCEL_DISABLE
3825 PTHREAD_CANCEL_DEFERRED,
3827 PTHREAD_CANCEL_ASYNCHRONOUS
3830 # 216 "../nptl/sysdeps/pthread/pthread.h"
3836 extern int pthread_create (pthread_t *__restrict __newthread,
3837 __const pthread_attr_t *__restrict __attr,
3838 void *(*__start_routine) (void *),
3839 void *__restrict __arg) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3)));
3845 extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__));
3853 extern int pthread_join (pthread_t __th, void **__thread_return);
3858 extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) __attribute__ ((__nothrow__));
3866 extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return,
3867 __const struct timespec *__abstime);
3874 extern int pthread_detach (pthread_t __th) __attribute__ ((__nothrow__));
3878 extern pthread_t pthread_self (void) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
3881 extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) __attribute__ ((__nothrow__));
3889 extern int pthread_attr_init (pthread_attr_t *__attr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3892 extern int pthread_attr_destroy (pthread_attr_t *__attr)
3893 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3896 extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr,
3898 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
3901 extern int pthread_attr_setdetachstate (pthread_attr_t *__attr,
3903 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3907 extern int pthread_attr_getguardsize (__const pthread_attr_t *__attr,
3908 size_t *__guardsize)
3909 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
3912 extern int pthread_attr_setguardsize (pthread_attr_t *__attr,
3914 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3918 extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict
3920 struct sched_param *__restrict __param)
3921 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
3924 extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr,
3925 __const struct sched_param *__restrict
3926 __param) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
3929 extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict
3930 __attr, int *__restrict __policy)
3931 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
3934 extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy)
3935 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3938 extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict
3939 __attr, int *__restrict __inherit)
3940 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
3943 extern int pthread_attr_setinheritsched (pthread_attr_t *__attr,
3945 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3949 extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr,
3950 int *__restrict __scope)
3951 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
3954 extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope)
3955 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3958 extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict
3959 __attr, void **__restrict __stackaddr)
3960 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__));
3966 extern int pthread_attr_setstackaddr (pthread_attr_t *__attr,
3968 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__));
3971 extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict
3972 __attr, size_t *__restrict __stacksize)
3973 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
3978 extern int pthread_attr_setstacksize (pthread_attr_t *__attr,
3980 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3984 extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr,
3985 void **__restrict __stackaddr,
3986 size_t *__restrict __stacksize)
3987 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2, 3)));
3992 extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr,
3993 size_t __stacksize) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3999 extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr,
4000 size_t __cpusetsize,
4001 __const cpu_set_t *__cpuset)
4002 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3)));
4006 extern int pthread_attr_getaffinity_np (__const pthread_attr_t *__attr,
4007 size_t __cpusetsize,
4008 cpu_set_t *__cpuset)
4009 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3)));
4015 extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr)
4016 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
4024 extern int pthread_setschedparam (pthread_t __target_thread, int __policy,
4025 __const struct sched_param *__param)
4026 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3)));
4029 extern int pthread_getschedparam (pthread_t __target_thread,
4030 int *__restrict __policy,
4031 struct sched_param *__restrict __param)
4032 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));
4035 extern int pthread_setschedprio (pthread_t __target_thread, int __prio)
4036 __attribute__ ((__nothrow__));
4041 extern int pthread_getconcurrency (void) __attribute__ ((__nothrow__));
4044 extern int pthread_setconcurrency (int __level) __attribute__ ((__nothrow__));
4052 extern int pthread_yield (void) __attribute__ ((__nothrow__));
4057 extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize,
4058 __const cpu_set_t *__cpuset)
4059 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3)));
4062 extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize,
4063 cpu_set_t *__cpuset)
4064 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3)));
4065 # 462 "../nptl/sysdeps/pthread/pthread.h"
4066 extern int pthread_once (pthread_once_t *__once_control,
4067 void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2)));
4068 # 474 "../nptl/sysdeps/pthread/pthread.h"
4069 extern int pthread_setcancelstate (int __state, int *__oldstate);
4073 extern int pthread_setcanceltype (int __type, int *__oldtype);
4076 extern int pthread_cancel (pthread_t __th);
4081 extern void pthread_testcancel (void);
4090 __jmp_buf __cancel_jmp_buf;
4091 int __mask_was_saved;
4092 } __cancel_jmp_buf[1];
4094 } __pthread_unwind_buf_t __attribute__ ((__aligned__));
4095 # 508 "../nptl/sysdeps/pthread/pthread.h"
4096 struct __pthread_cleanup_frame
4098 void (*__cancel_routine) (void *);
4103 # 648 "../nptl/sysdeps/pthread/pthread.h"
4104 extern void __pthread_register_cancel (__pthread_unwind_buf_t *__buf)
4106 # 659 "../nptl/sysdeps/pthread/pthread.h"
4107 extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf)
4109 # 682 "../nptl/sysdeps/pthread/pthread.h"
4110 extern void __pthread_register_cancel_defer (__pthread_unwind_buf_t *__buf)
4112 # 694 "../nptl/sysdeps/pthread/pthread.h"
4113 extern void __pthread_unregister_cancel_restore (__pthread_unwind_buf_t *__buf)
4118 extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf)
4119 __attribute__ ((__noreturn__))
4121 __attribute__ ((__weak__))
4127 struct __jmp_buf_tag;
4128 extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __attribute__ ((__nothrow__));
4134 extern int pthread_mutex_init (pthread_mutex_t *__mutex,
4135 __const pthread_mutexattr_t *__mutexattr)
4136 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4139 extern int pthread_mutex_destroy (pthread_mutex_t *__mutex)
4140 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4143 extern int pthread_mutex_trylock (pthread_mutex_t *__mutex)
4144 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4147 extern int pthread_mutex_lock (pthread_mutex_t *__mutex)
4148 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4152 extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
4153 __const struct timespec *__restrict
4154 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
4158 extern int pthread_mutex_unlock (pthread_mutex_t *__mutex)
4159 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4164 extern int pthread_mutex_getprioceiling (__const pthread_mutex_t *
4166 int *__restrict __prioceiling)
4167 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
4171 extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex,
4173 int *__restrict __old_ceiling)
4174 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3)));
4180 extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex)
4181 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4189 extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr)
4190 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4193 extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr)
4194 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4197 extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t *
4199 int *__restrict __pshared)
4200 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
4203 extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr,
4205 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4209 extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict
4210 __attr, int *__restrict __kind)
4211 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
4216 extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind)
4217 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4220 extern int pthread_mutexattr_getprotocol (__const pthread_mutexattr_t *
4222 int *__restrict __protocol)
4223 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
4227 extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr,
4229 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4232 extern int pthread_mutexattr_getprioceiling (__const pthread_mutexattr_t *
4234 int *__restrict __prioceiling)
4235 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
4238 extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr,
4240 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4245 extern int pthread_mutexattr_getrobust_np (__const pthread_mutexattr_t *__attr,
4247 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
4250 extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr,
4252 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4253 # 842 "../nptl/sysdeps/pthread/pthread.h"
4254 extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock,
4255 __const pthread_rwlockattr_t *__restrict
4256 __attr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4259 extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock)
4260 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4263 extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock)
4264 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4267 extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock)
4268 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4272 extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
4273 __const struct timespec *__restrict
4274 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
4278 extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock)
4279 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4282 extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock)
4283 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4287 extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
4288 __const struct timespec *__restrict
4289 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
4293 extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock)
4294 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4300 extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr)
4301 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4304 extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr)
4305 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4308 extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t *
4310 int *__restrict __pshared)
4311 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
4314 extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr,
4316 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4319 extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t *
4321 int *__restrict __pref)
4322 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
4325 extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr,
4326 int __pref) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4334 extern int pthread_cond_init (pthread_cond_t *__restrict __cond,
4335 __const pthread_condattr_t *__restrict
4336 __cond_attr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4339 extern int pthread_cond_destroy (pthread_cond_t *__cond)
4340 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4343 extern int pthread_cond_signal (pthread_cond_t *__cond)
4344 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4347 extern int pthread_cond_broadcast (pthread_cond_t *__cond)
4348 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4355 extern int pthread_cond_wait (pthread_cond_t *__restrict __cond,
4356 pthread_mutex_t *__restrict __mutex)
4357 __attribute__ ((__nonnull__ (1, 2)));
4358 # 954 "../nptl/sysdeps/pthread/pthread.h"
4359 extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
4360 pthread_mutex_t *__restrict __mutex,
4361 __const struct timespec *__restrict
4362 __abstime) __attribute__ ((__nonnull__ (1, 2, 3)));
4367 extern int pthread_condattr_init (pthread_condattr_t *__attr)
4368 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4371 extern int pthread_condattr_destroy (pthread_condattr_t *__attr)
4372 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4375 extern int pthread_condattr_getpshared (__const pthread_condattr_t *
4377 int *__restrict __pshared)
4378 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
4381 extern int pthread_condattr_setpshared (pthread_condattr_t *__attr,
4382 int __pshared) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4386 extern int pthread_condattr_getclock (__const pthread_condattr_t *
4388 __clockid_t *__restrict __clock_id)
4389 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
4392 extern int pthread_condattr_setclock (pthread_condattr_t *__attr,
4393 __clockid_t __clock_id)
4394 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4395 # 998 "../nptl/sysdeps/pthread/pthread.h"
4396 extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared)
4397 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4400 extern int pthread_spin_destroy (pthread_spinlock_t *__lock)
4401 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4404 extern int pthread_spin_lock (pthread_spinlock_t *__lock)
4405 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4408 extern int pthread_spin_trylock (pthread_spinlock_t *__lock)
4409 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4412 extern int pthread_spin_unlock (pthread_spinlock_t *__lock)
4413 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4420 extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier,
4421 __const pthread_barrierattr_t *__restrict
4422 __attr, unsigned int __count)
4423 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4426 extern int pthread_barrier_destroy (pthread_barrier_t *__barrier)
4427 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4430 extern int pthread_barrier_wait (pthread_barrier_t *__barrier)
4431 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4435 extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr)
4436 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4439 extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr)
4440 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4443 extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t *
4445 int *__restrict __pshared)
4446 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
4449 extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr,
4451 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4452 # 1065 "../nptl/sysdeps/pthread/pthread.h"
4453 extern int pthread_key_create (pthread_key_t *__key,
4454 void (*__destr_function) (void *))
4455 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4458 extern int pthread_key_delete (pthread_key_t __key) __attribute__ ((__nothrow__));
4461 extern void *pthread_getspecific (pthread_key_t __key) __attribute__ ((__nothrow__));
4464 extern int pthread_setspecific (pthread_key_t __key,
4465 __const void *__pointer) __attribute__ ((__nothrow__)) ;
4470 extern int pthread_getcpuclockid (pthread_t __thread_id,
4471 __clockid_t *__clock_id)
4472 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
4473 # 1099 "../nptl/sysdeps/pthread/pthread.h"
4474 extern int pthread_atfork (void (*__prepare) (void),
4475 void (*__parent) (void),
4476 void (*__child) (void)) __attribute__ ((__nothrow__));
4482 __attribute__ ((__nothrow__)) pthread_equal (pthread_t __thread1, pthread_t __thread2)
4484 return __thread1 == __thread2;
4489 # 2 "../include/pthread.h" 2
4492 extern void __pthread_initialize (void) __attribute__ ((weak));
4493 # 27 "../nptl/../nptl_db/thread_db.h" 2
4495 # 1 "../include/sys/types.h" 1
4496 # 29 "../nptl/../nptl_db/thread_db.h" 2
4497 # 1 "../ports/sysdeps/unix/sysv/linux/hppa/sys/procfs.h" 1
4498 # 32 "../ports/sysdeps/unix/sysv/linux/hppa/sys/procfs.h"
4499 # 1 "../include/signal.h" 1
4504 # 1 "../signal/signal.h" 1
4505 # 31 "../signal/signal.h"
4508 # 1 "../sysdeps/unix/sysv/linux/bits/sigset.h" 1
4509 # 103 "../sysdeps/unix/sysv/linux/bits/sigset.h"
4510 extern int __sigismember (__const __sigset_t *, int);
4511 extern int __sigaddset (__sigset_t *, int);
4512 extern int __sigdelset (__sigset_t *, int);
4513 # 117 "../sysdeps/unix/sysv/linux/bits/sigset.h"
4514 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; }
4515 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); }
4516 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); }
4517 # 34 "../signal/signal.h" 2
4525 typedef __sig_atomic_t sig_atomic_t;
4527 # 58 "../signal/signal.h"
4528 # 1 "../ports/sysdeps/unix/sysv/linux/hppa/bits/signum.h" 1
4529 # 59 "../signal/signal.h" 2
4530 # 75 "../signal/signal.h"
4531 typedef void (*__sighandler_t) (int);
4536 extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler)
4537 __attribute__ ((__nothrow__));
4539 extern __sighandler_t sysv_signal (int __sig, __sighandler_t __handler)
4540 __attribute__ ((__nothrow__));
4548 extern __sighandler_t signal (int __sig, __sighandler_t __handler)
4549 __attribute__ ((__nothrow__));
4550 # 104 "../signal/signal.h"
4556 extern __sighandler_t bsd_signal (int __sig, __sighandler_t __handler)
4557 __attribute__ ((__nothrow__));
4564 extern int kill (__pid_t __pid, int __sig) __attribute__ ((__nothrow__));
4571 extern int killpg (__pid_t __pgrp, int __sig) __attribute__ ((__nothrow__));
4576 extern int raise (int __sig) __attribute__ ((__nothrow__));
4581 extern __sighandler_t ssignal (int __sig, __sighandler_t __handler)
4582 __attribute__ ((__nothrow__));
4583 extern int gsignal (int __sig) __attribute__ ((__nothrow__));
4588 extern void psignal (int __sig, __const char *__s);
4589 # 153 "../signal/signal.h"
4590 extern int __sigpause (int __sig_or_mask, int __is_sig);
4591 # 162 "../signal/signal.h"
4592 extern int sigpause (int __sig) __asm__ ("__xpg_sigpause");
4593 # 181 "../signal/signal.h"
4594 extern int sigblock (int __mask) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__));
4597 extern int sigsetmask (int __mask) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__));
4600 extern int siggetmask (void) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__));
4601 # 196 "../signal/signal.h"
4602 typedef __sighandler_t sighandler_t;
4607 typedef __sighandler_t sig_t;
4608 # 212 "../signal/signal.h"
4609 # 1 "../sysdeps/unix/sysv/linux/bits/siginfo.h" 1
4610 # 25 "../sysdeps/unix/sysv/linux/bits/siginfo.h"
4611 # 1 "../sysdeps/wordsize-32/bits/wordsize.h" 1
4612 # 26 "../sysdeps/unix/sysv/linux/bits/siginfo.h" 2
4620 typedef union sigval
4625 # 51 "../sysdeps/unix/sysv/linux/bits/siginfo.h"
4626 typedef struct siginfo
4635 int _pad[((128 / sizeof (int)) - 3)];
4684 # 129 "../sysdeps/unix/sysv/linux/bits/siginfo.h"
4812 # 273 "../sysdeps/unix/sysv/linux/bits/siginfo.h"
4813 typedef struct sigevent
4815 sigval_t sigev_value;
4821 int _pad[((64 / sizeof (int)) - 3)];
4829 void (*_function) (sigval_t);
4852 # 213 "../signal/signal.h" 2
4856 extern int sigemptyset (sigset_t *__set) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4859 extern int sigfillset (sigset_t *__set) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4862 extern int sigaddset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4865 extern int sigdelset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4868 extern int sigismember (__const sigset_t *__set, int __signo)
4869 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4873 extern int sigisemptyset (__const sigset_t *__set) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4876 extern int sigandset (sigset_t *__set, __const sigset_t *__left,
4877 __const sigset_t *__right) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2, 3)));
4880 extern int sigorset (sigset_t *__set, __const sigset_t *__left,
4881 __const sigset_t *__right) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2, 3)));
4886 # 1 "../ports/sysdeps/unix/sysv/linux/hppa/bits/sigaction.h" 1
4887 # 25 "../ports/sysdeps/unix/sysv/linux/hppa/bits/sigaction.h"
4895 __sighandler_t sa_handler;
4897 void (*sa_sigaction) (int, siginfo_t *, void *);
4899 __sigaction_handler;
4907 unsigned long int sa_flags;
4912 # 247 "../signal/signal.h" 2
4915 extern int sigprocmask (int __how, __const sigset_t *__restrict __set,
4916 sigset_t *__restrict __oset) __attribute__ ((__nothrow__));
4923 extern int sigsuspend (__const sigset_t *__set) __attribute__ ((__nonnull__ (1)));
4926 extern int sigaction (int __sig, __const struct sigaction *__restrict __act,
4927 struct sigaction *__restrict __oact) __attribute__ ((__nothrow__));
4930 extern int sigpending (sigset_t *__set) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4937 extern int sigwait (__const sigset_t *__restrict __set, int *__restrict __sig)
4938 __attribute__ ((__nonnull__ (1, 2)));
4945 extern int sigwaitinfo (__const sigset_t *__restrict __set,
4946 siginfo_t *__restrict __info) __attribute__ ((__nonnull__ (1)));
4953 extern int sigtimedwait (__const sigset_t *__restrict __set,
4954 siginfo_t *__restrict __info,
4955 __const struct timespec *__restrict __timeout)
4956 __attribute__ ((__nonnull__ (1)));
4960 extern int sigqueue (__pid_t __pid, int __sig, __const union sigval __val)
4961 __attribute__ ((__nothrow__));
4962 # 304 "../signal/signal.h"
4963 extern __const char *__const _sys_siglist[65];
4964 extern __const char *__const sys_siglist[65];
4969 __sighandler_t sv_handler;
4975 # 328 "../signal/signal.h"
4976 extern int sigvec (int __sig, __const struct sigvec *__vec,
4977 struct sigvec *__ovec) __attribute__ ((__nothrow__));
4981 # 1 "../sysdeps/unix/sysv/linux/bits/sigcontext.h" 1
4982 # 28 "../sysdeps/unix/sysv/linux/bits/sigcontext.h"
4983 # 1 "/usr/include/asm/sigcontext.h" 1 3 4
4984 # 9 "/usr/include/asm/sigcontext.h" 3 4
4986 unsigned long sc_flags;
4988 unsigned long sc_gr[32];
4989 unsigned long long sc_fr[32];
4990 unsigned long sc_iasq[2];
4991 unsigned long sc_iaoq[2];
4992 unsigned long sc_sar;
4994 # 29 "../sysdeps/unix/sysv/linux/bits/sigcontext.h" 2
4995 # 334 "../signal/signal.h" 2
4998 extern int sigreturn (struct sigcontext *__scp) __attribute__ ((__nothrow__));
4999 # 346 "../signal/signal.h"
5000 extern int siginterrupt (int __sig, int __interrupt) __attribute__ ((__nothrow__));
5002 # 1 "../sysdeps/unix/sysv/linux/bits/sigstack.h" 1
5003 # 26 "../sysdeps/unix/sysv/linux/bits/sigstack.h"
5019 # 50 "../sysdeps/unix/sysv/linux/bits/sigstack.h"
5020 typedef struct sigaltstack
5026 # 349 "../signal/signal.h" 2
5029 # 1 "../ports/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h" 1
5030 # 29 "../ports/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h"
5031 # 1 "../sysdeps/unix/sysv/linux/bits/sigcontext.h" 1
5032 # 30 "../ports/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h" 2
5036 typedef unsigned long int greg_t;
5043 typedef struct gregset
5052 typedef struct fpregset
5054 double fp_dregs[32];
5058 typedef struct sigcontext mcontext_t;
5061 typedef struct ucontext
5063 unsigned long int uc_flags;
5064 struct ucontext *uc_link;
5066 mcontext_t uc_mcontext;
5067 __sigset_t uc_sigmask;
5069 # 352 "../signal/signal.h" 2
5075 extern int sigstack (struct sigstack *__ss, struct sigstack *__oss)
5076 __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__));
5080 extern int sigaltstack (__const struct sigaltstack *__restrict __ss,
5081 struct sigaltstack *__restrict __oss) __attribute__ ((__nothrow__));
5089 extern int sighold (int __sig) __attribute__ ((__nothrow__));
5092 extern int sigrelse (int __sig) __attribute__ ((__nothrow__));
5095 extern int sigignore (int __sig) __attribute__ ((__nothrow__));
5098 extern __sighandler_t sigset (int __sig, __sighandler_t __disp) __attribute__ ((__nothrow__));
5105 # 1 "../nptl/sysdeps/pthread/bits/sigthread.h" 1
5106 # 31 "../nptl/sysdeps/pthread/bits/sigthread.h"
5107 extern int pthread_sigmask (int __how,
5108 __const __sigset_t *__restrict __newmask,
5109 __sigset_t *__restrict __oldmask)__attribute__ ((__nothrow__));
5112 extern int pthread_kill (pthread_t __threadid, int __signo) __attribute__ ((__nothrow__));
5113 # 388 "../signal/signal.h" 2
5120 extern int __libc_current_sigrtmin (void) __attribute__ ((__nothrow__));
5122 extern int __libc_current_sigrtmax (void) __attribute__ ((__nothrow__));
5127 # 6 "../include/signal.h" 2
5140 extern __sighandler_t __bsd_signal (int __sig, __sighandler_t __handler);
5141 extern int __kill (__pid_t __pid, int __sig);
5142 extern int __sigaction (int __sig, __const struct sigaction *__restrict __act,
5143 struct sigaction *__restrict __oact);
5145 extern int __sigblock (int __mask);
5146 extern int __sigsetmask (int __mask);
5147 extern int __sigprocmask (int __how,
5148 __const sigset_t *__set, sigset_t *__oset);
5149 extern int __sigsuspend (__const sigset_t *__set);
5152 extern int __sigsuspend_nocancel (__const sigset_t *__set) ;
5154 extern int __sigwait (__const sigset_t *__set, int *__sig);
5156 extern int __sigwaitinfo (__const sigset_t *__set, siginfo_t *__info);
5158 extern int __sigtimedwait (__const sigset_t *__set, siginfo_t *__info,
5159 __const struct timespec *__timeout);
5161 extern int __sigqueue (__pid_t __pid, int __sig,
5162 __const union sigval __val);
5163 extern int __sigvec (int __sig, __const struct sigvec *__vec,
5164 struct sigvec *__ovec);
5165 extern int __sigreturn (struct sigcontext *__scp);
5166 extern int __sigaltstack (__const struct sigaltstack *__ss,
5167 struct sigaltstack *__oss);
5168 extern int __libc_sigaction (int sig, const struct sigaction *act,
5169 struct sigaction *oact);
5172 extern int __sigpause (int sig_or_mask, int is_sig);
5173 extern int __default_sigpause (int mask);
5174 extern int __xpg_sigpause (int sig);
5182 extern int __libc_allocate_rtsig (int __high);
5183 # 33 "../ports/sysdeps/unix/sysv/linux/hppa/sys/procfs.h" 2
5184 # 1 "../include/sys/time.h" 1
5186 # 1 "../time/sys/time.h" 1
5187 # 29 "../time/sys/time.h"
5188 # 1 "../bits/time.h" 1
5189 # 30 "../time/sys/time.h" 2
5190 # 39 "../time/sys/time.h"
5192 # 57 "../time/sys/time.h"
5199 typedef struct timezone *__restrict __timezone_ptr_t;
5200 # 73 "../time/sys/time.h"
5201 extern int gettimeofday (struct timeval *__restrict __tv,
5202 __timezone_ptr_t __tz) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
5207 extern int settimeofday (__const struct timeval *__tv,
5208 __const struct timezone *__tz)
5209 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
5215 extern int adjtime (__const struct timeval *__delta,
5216 struct timeval *__olddelta) __attribute__ ((__nothrow__));
5240 struct timeval it_interval;
5242 struct timeval it_value;
5248 typedef enum __itimer_which __itimer_which_t;
5255 extern int getitimer (__itimer_which_t __which,
5256 struct itimerval *__value) __attribute__ ((__nothrow__));
5261 extern int setitimer (__itimer_which_t __which,
5262 __const struct itimerval *__restrict __new,
5263 struct itimerval *__restrict __old) __attribute__ ((__nothrow__));
5268 extern int utimes (__const char *__file, __const struct timeval __tvp[2])
5269 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
5273 extern int lutimes (__const char *__file, __const struct timeval __tvp[2])
5274 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
5277 extern int futimes (int __fd, __const struct timeval __tvp[2]) __attribute__ ((__nothrow__));
5284 extern int futimesat (int __fd, __const char *__file,
5285 __const struct timeval __tvp[2]) __attribute__ ((__nothrow__));
5286 # 191 "../time/sys/time.h"
5288 # 3 "../include/sys/time.h" 2
5291 extern int __gettimeofday (struct timeval *__tv,
5292 struct timezone *__tz);
5293 extern int __gettimeofday_internal (struct timeval *__tv,
5294 struct timezone *__tz)
5296 extern int __settimeofday (__const struct timeval *__tv,
5297 __const struct timezone *__tz)
5299 extern int __adjtime (__const struct timeval *__delta,
5300 struct timeval *__olddelta);
5301 extern int __getitimer (enum __itimer_which __which,
5302 struct itimerval *__value);
5303 extern int __setitimer (enum __itimer_which __which,
5304 __const struct itimerval *__restrict __new,
5305 struct itimerval *__restrict __old)
5307 extern int __utimes (__const char *__file, const struct timeval __tvp[2])
5309 extern int __futimes (int fd, __const struct timeval tvp[2]) ;
5310 # 34 "../ports/sysdeps/unix/sysv/linux/hppa/sys/procfs.h" 2
5311 # 1 "../include/sys/types.h" 1
5312 # 35 "../ports/sysdeps/unix/sysv/linux/hppa/sys/procfs.h" 2
5314 # 1 "../sysdeps/unix/sysv/linux/sys/user.h" 1
5315 # 1 "/usr/include/linux/user.h" 1 3 4
5316 # 1 "/usr/include/asm/user.h" 1 3 4
5317 # 1 "/usr/include/linux/user.h" 2 3 4
5318 # 1 "../sysdeps/unix/sysv/linux/sys/user.h" 2
5319 # 37 "../ports/sysdeps/unix/sysv/linux/hppa/sys/procfs.h" 2
5320 # 1 "/usr/include/asm/elf.h" 1 3 4
5328 # 1 "/usr/include/asm/ptrace.h" 1 3 4
5336 # 1 "/usr/include/linux/types.h" 1 3 4
5340 # 1 "../include/sys/types.h" 1 3 4
5341 # 5 "/usr/include/linux/types.h" 2 3 4
5342 # 1 "../sysdeps/generic/inttypes.h" 1 3 4
5343 # 35 "../sysdeps/generic/inttypes.h" 3 4
5344 typedef long int __gwchar_t;
5345 # 274 "../sysdeps/generic/inttypes.h" 3 4
5347 # 288 "../sysdeps/generic/inttypes.h" 3 4
5358 extern intmax_t imaxabs (intmax_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
5361 extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom)
5362 __attribute__ ((__nothrow__)) __attribute__ ((__const__));
5365 extern intmax_t strtoimax (__const char *__restrict __nptr,
5366 char **__restrict __endptr, int __base) __attribute__ ((__nothrow__));
5369 extern uintmax_t strtoumax (__const char *__restrict __nptr,
5370 char ** __restrict __endptr, int __base) __attribute__ ((__nothrow__));
5373 extern intmax_t wcstoimax (__const __gwchar_t *__restrict __nptr,
5374 __gwchar_t **__restrict __endptr, int __base)
5375 __attribute__ ((__nothrow__));
5378 extern uintmax_t wcstoumax (__const __gwchar_t *__restrict __nptr,
5379 __gwchar_t ** __restrict __endptr, int __base)
5380 __attribute__ ((__nothrow__));
5381 # 396 "../sysdeps/generic/inttypes.h" 3 4
5382 extern __inline intmax_t
5383 __attribute__ ((__nothrow__)) strtoimax (__const char *__restrict nptr, char **__restrict endptr, int base)
5386 return __strtoll_internal (nptr, endptr, base, 0);
5388 # 414 "../sysdeps/generic/inttypes.h" 3 4
5389 extern __inline uintmax_t
5390 __attribute__ ((__nothrow__)) strtoumax (__const char *__restrict nptr, char **__restrict endptr, int base)
5393 return __strtoull_internal (nptr, endptr, base, 0);
5399 extern long long int __wcstoll_internal (__const __gwchar_t *
5401 __gwchar_t **__restrict __endptr,
5402 int __base, int __group) __attribute__ ((__nothrow__));
5405 extern __inline intmax_t
5406 __attribute__ ((__nothrow__)) wcstoimax (__const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base)
5409 return __wcstoll_internal (nptr, endptr, base, 0);
5416 extern unsigned long long int __wcstoull_internal (__const __gwchar_t *
5419 __restrict __endptr,
5421 int __group) __attribute__ ((__nothrow__));
5424 extern __inline uintmax_t
5425 __attribute__ ((__nothrow__)) wcstoumax (__const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base)
5428 return __wcstoull_internal (nptr, endptr, base, 0);
5435 # 6 "/usr/include/linux/types.h" 2 3 4
5436 # 1 "/usr/include/linux/posix_types.h" 1 3 4
5440 # 1 "/usr/include/linux/stddef.h" 1 3 4
5441 # 5 "/usr/include/linux/posix_types.h" 2 3 4
5442 # 36 "/usr/include/linux/posix_types.h" 3 4
5444 unsigned long fds_bits [(1024/(8 * sizeof(unsigned long)))];
5448 typedef void (*__kernel_sighandler_t)(int);
5451 typedef int __kernel_key_t;
5452 typedef int __kernel_mqd_t;
5454 # 1 "/usr/include/asm/posix_types.h" 1 3 4
5455 # 9 "/usr/include/asm/posix_types.h" 3 4
5456 typedef unsigned long __kernel_ino_t;
5457 typedef unsigned short __kernel_mode_t;
5458 typedef unsigned short __kernel_nlink_t;
5459 typedef long __kernel_off_t;
5460 typedef int __kernel_pid_t;
5461 typedef unsigned short __kernel_ipc_pid_t;
5462 typedef unsigned int __kernel_uid_t;
5463 typedef unsigned int __kernel_gid_t;
5464 typedef int __kernel_suseconds_t;
5465 typedef long __kernel_clock_t;
5466 typedef int __kernel_timer_t;
5467 typedef int __kernel_clockid_t;
5468 typedef int __kernel_daddr_t;
5476 typedef unsigned int __kernel_size_t;
5477 typedef int __kernel_ssize_t;
5478 typedef int __kernel_ptrdiff_t;
5479 typedef long __kernel_time_t;
5481 typedef char * __kernel_caddr_t;
5483 typedef unsigned short __kernel_uid16_t;
5484 typedef unsigned short __kernel_gid16_t;
5485 typedef unsigned int __kernel_uid32_t;
5486 typedef unsigned int __kernel_gid32_t;
5489 typedef long long __kernel_loff_t;
5490 typedef long long __kernel_off64_t;
5491 typedef unsigned long long __kernel_ino64_t;
5494 typedef unsigned int __kernel_old_dev_t;
5505 typedef __kernel_uid_t __kernel_old_uid_t;
5506 typedef __kernel_gid_t __kernel_old_gid_t;
5507 # 48 "/usr/include/linux/posix_types.h" 2 3 4
5508 # 7 "/usr/include/linux/types.h" 2 3 4
5509 # 1 "/usr/include/asm/types.h" 1 3 4
5515 typedef unsigned short umode_t;
5522 typedef __signed__ char __s8;
5523 typedef unsigned char __u8;
5525 typedef __signed__ short __s16;
5526 typedef unsigned short __u16;
5528 typedef __signed__ int __s32;
5529 typedef unsigned int __u32;
5532 typedef __signed__ long long __s64;
5533 typedef unsigned long long __u64;
5534 # 8 "/usr/include/linux/types.h" 2 3 4
5535 # 148 "/usr/include/linux/types.h" 3 4
5536 typedef __u16 __le16;
5537 typedef __u16 __be16;
5538 typedef __u32 __le32;
5539 typedef __u32 __be32;
5541 typedef __u64 __le64;
5542 typedef __u64 __be64;
5547 __kernel_daddr_t f_tfree;
5548 __kernel_ino_t f_tinode;
5552 # 9 "/usr/include/asm/ptrace.h" 2 3 4
5553 # 18 "/usr/include/asm/ptrace.h" 3 4
5555 unsigned long gr[32];
5557 unsigned long sr[ 8];
5558 unsigned long iasq[2];
5559 unsigned long iaoq[2];
5562 unsigned long orig_r28;
5571 # 9 "/usr/include/asm/elf.h" 2 3 4
5572 # 158 "/usr/include/asm/elf.h" 3 4
5573 typedef struct elf32_fdesc {
5579 typedef struct elf64_fdesc {
5585 # 229 "/usr/include/asm/elf.h" 3 4
5586 typedef unsigned long elf_greg_t;
5587 # 285 "/usr/include/asm/elf.h" 3 4
5588 typedef elf_greg_t elf_gregset_t[80];
5591 typedef double elf_fpreg_t;
5592 typedef elf_fpreg_t elf_fpregset_t[32];
5596 extern int dump_task_fpu (struct task_struct *, elf_fpregset_t *);
5600 # 38 "../ports/sysdeps/unix/sysv/linux/hppa/sys/procfs.h" 2
5610 # 55 "../ports/sysdeps/unix/sysv/linux/hppa/sys/procfs.h"
5613 struct elf_siginfo pr_info;
5614 short int pr_cursig;
5615 unsigned long int pr_sigpend;
5616 unsigned long int pr_sighold;
5621 struct timeval pr_utime;
5622 struct timeval pr_stime;
5623 struct timeval pr_cutime;
5624 struct timeval pr_cstime;
5625 elf_gregset_t pr_reg;
5638 unsigned long int pr_flag;
5639 unsigned int pr_uid;
5640 unsigned int pr_gid;
5641 int pr_pid, pr_ppid, pr_pgrp, pr_sid;
5644 char pr_psargs[(80)];
5653 typedef void *psaddr_t;
5656 typedef elf_gregset_t prgregset_t;
5657 typedef elf_fpregset_t prfpregset_t;
5661 typedef __pid_t lwpid_t;
5664 typedef struct elf_prstatus prstatus_t;
5665 typedef struct elf_prpsinfo prpsinfo_t;
5668 # 30 "../nptl/../nptl_db/thread_db.h" 2
5696 TD_NOTALLOC = TD_TLSDEFER,
5713 TD_THR_STOPPED_ASLEEP
5729 typedef struct td_thragent td_thragent_t;
5732 typedef struct td_thrhandle
5734 td_thragent_t *th_ta_p;
5741 # 116 "../nptl/../nptl_db/thread_db.h"
5742 typedef struct td_thr_events
5744 uint32_t event_bits[2];
5746 # 155 "../nptl/../nptl_db/thread_db.h"
5750 TD_EVENT_NONE = TD_ALL_EVENTS,
5765 TD_MIN_EVENT_NUM = TD_READY,
5766 TD_MAX_EVENT_NUM = TD_TIMEOUT,
5767 TD_EVENTS_ENABLE = 31
5780 typedef struct td_notify
5791 typedef struct td_event_msg
5794 const td_thrhandle_t *th_p;
5807 td_thr_events_t eventmask;
5808 td_event_e eventnum;
5814 typedef struct td_ta_stats
5820 int a_concurrency_num;
5821 int a_concurrency_den;
5835 typedef pthread_t thread_t;
5836 typedef pthread_key_t thread_key_t;
5840 typedef int td_thr_iter_f (const td_thrhandle_t *, void *);
5843 typedef int td_key_iter_f (thread_key_t, void (*) (void *), void *);
5848 struct ps_prochandle;
5852 typedef struct td_thrinfo
5854 td_thragent_t *ti_ta_p;
5855 unsigned int ti_user_flags;
5859 psaddr_t ti_startfunc;
5861 psaddr_t ti_stkbase;
5862 long int ti_stksize;
5863 psaddr_t ti_ro_area;
5865 td_thr_state_e ti_state;
5866 unsigned char ti_db_suspended;
5867 td_thr_type_e ti_type;
5874 sigset_t ti_sigmask;
5875 unsigned char ti_traceme;
5877 unsigned char ti_preemptflag;
5878 unsigned char ti_pirecflag;
5879 sigset_t ti_pending;
5880 td_thr_events_t ti_events;
5888 extern td_err_e td_init (void);
5891 extern td_err_e td_log (void);
5894 extern const char **td_symbol_list (void);
5897 extern td_err_e td_ta_new (struct ps_prochandle *__ps, td_thragent_t **__ta);
5900 extern td_err_e td_ta_delete (td_thragent_t *__ta);
5903 extern td_err_e td_ta_get_nthreads (const td_thragent_t *__ta, int *__np);
5907 extern td_err_e td_ta_get_ph (const td_thragent_t *__ta,
5908 struct ps_prochandle **__ph);
5912 extern td_err_e td_ta_map_id2thr (const td_thragent_t *__ta, pthread_t __pt,
5913 td_thrhandle_t *__th);
5917 extern td_err_e td_ta_map_lwp2thr (const td_thragent_t *__ta, lwpid_t __lwpid,
5918 td_thrhandle_t *__th);
5923 extern td_err_e td_ta_thr_iter (const td_thragent_t *__ta,
5924 td_thr_iter_f *__callback, void *__cbdata_p,
5925 td_thr_state_e __state, int __ti_pri,
5926 sigset_t *__ti_sigmask_p,
5927 unsigned int __ti_user_flags);
5930 extern td_err_e td_ta_tsd_iter (const td_thragent_t *__ta, td_key_iter_f *__ki,
5935 extern td_err_e td_ta_event_addr (const td_thragent_t *__ta,
5936 td_event_e __event, td_notify_t *__ptr);
5939 extern td_err_e td_ta_set_event (const td_thragent_t *__ta,
5940 td_thr_events_t *__event);
5943 extern td_err_e td_ta_clear_event (const td_thragent_t *__ta,
5944 td_thr_events_t *__event);
5947 extern td_err_e td_ta_event_getmsg (const td_thragent_t *__ta,
5948 td_event_msg_t *__msg);
5952 extern td_err_e td_ta_setconcurrency (const td_thragent_t *__ta, int __level);
5956 extern td_err_e td_ta_enable_stats (const td_thragent_t *__ta, int __enable);
5959 extern td_err_e td_ta_reset_stats (const td_thragent_t *__ta);
5962 extern td_err_e td_ta_get_stats (const td_thragent_t *__ta,
5963 td_ta_stats_t *__statsp);
5967 extern td_err_e td_thr_validate (const td_thrhandle_t *__th);
5970 extern td_err_e td_thr_get_info (const td_thrhandle_t *__th,
5971 td_thrinfo_t *__infop);
5974 extern td_err_e td_thr_getfpregs (const td_thrhandle_t *__th,
5975 prfpregset_t *__regset);
5978 extern td_err_e td_thr_getgregs (const td_thrhandle_t *__th,
5979 prgregset_t __gregs);
5982 extern td_err_e td_thr_getxregs (const td_thrhandle_t *__th, void *__xregs);
5985 extern td_err_e td_thr_getxregsize (const td_thrhandle_t *__th, int *__sizep);
5988 extern td_err_e td_thr_setfpregs (const td_thrhandle_t *__th,
5989 const prfpregset_t *__fpregs);
5992 extern td_err_e td_thr_setgregs (const td_thrhandle_t *__th,
5993 prgregset_t __gregs);
5996 extern td_err_e td_thr_setxregs (const td_thrhandle_t *__th,
5997 const void *__addr);
6001 extern td_err_e td_thr_tlsbase (const td_thrhandle_t *__th,
6002 unsigned long int __modid,
6006 extern td_err_e td_thr_tls_get_addr (const td_thrhandle_t *__th,
6007 psaddr_t __map_address, size_t __offset,
6008 psaddr_t *__address);
6012 extern td_err_e td_thr_event_enable (const td_thrhandle_t *__th, int __event);
6015 extern td_err_e td_thr_set_event (const td_thrhandle_t *__th,
6016 td_thr_events_t *__event);
6019 extern td_err_e td_thr_clear_event (const td_thrhandle_t *__th,
6020 td_thr_events_t *__event);
6023 extern td_err_e td_thr_event_getmsg (const td_thrhandle_t *__th,
6024 td_event_msg_t *__msg);
6028 extern td_err_e td_thr_setprio (const td_thrhandle_t *__th, int __prio);
6032 extern td_err_e td_thr_setsigpending (const td_thrhandle_t *__th,
6033 unsigned char __n, const sigset_t *__ss);
6036 extern td_err_e td_thr_sigsetmask (const td_thrhandle_t *__th,
6037 const sigset_t *__ss);
6041 extern td_err_e td_thr_tsd (const td_thrhandle_t *__th,
6042 const thread_key_t __tk, void **__data);
6046 extern td_err_e td_thr_dbsuspend (const td_thrhandle_t *__th);
6049 extern td_err_e td_thr_dbresume (const td_thrhandle_t *__th);
6050 # 34 "../nptl/descr.h" 2
6051 # 1 "../include/tls.h" 1
6052 # 35 "../nptl/descr.h" 2
6054 # 1 "../sysdeps/generic/unwind.h" 1
6055 # 35 "../sysdeps/generic/unwind.h"
6056 typedef unsigned _Unwind_Word __attribute__((__mode__(__word__)));
6057 typedef signed _Unwind_Sword __attribute__((__mode__(__word__)));
6061 typedef unsigned _Unwind_Ptr __attribute__((__mode__(__pointer__)));
6063 typedef unsigned _Unwind_Internal_Ptr __attribute__((__mode__(__pointer__)));
6069 typedef unsigned _Unwind_Exception_Class __attribute__((__mode__(__DI__)));
6076 _URC_FOREIGN_EXCEPTION_CAUGHT = 1,
6077 _URC_FATAL_PHASE2_ERROR = 2,
6078 _URC_FATAL_PHASE1_ERROR = 3,
6079 _URC_NORMAL_STOP = 4,
6080 _URC_END_OF_STACK = 5,
6081 _URC_HANDLER_FOUND = 6,
6082 _URC_INSTALL_CONTEXT = 7,
6083 _URC_CONTINUE_UNWIND = 8
6084 } _Unwind_Reason_Code;
6085 # 72 "../sysdeps/generic/unwind.h"
6086 struct _Unwind_Exception;
6088 typedef void (*_Unwind_Exception_Cleanup_Fn) (_Unwind_Reason_Code,
6089 struct _Unwind_Exception *);
6091 struct _Unwind_Exception
6093 _Unwind_Exception_Class exception_class;
6094 _Unwind_Exception_Cleanup_Fn exception_cleanup;
6095 _Unwind_Word private_1;
6096 _Unwind_Word private_2;
6101 } __attribute__((__aligned__));
6106 typedef int _Unwind_Action;
6107 # 104 "../sysdeps/generic/unwind.h"
6108 struct _Unwind_Context;
6111 extern _Unwind_Reason_Code _Unwind_RaiseException (struct _Unwind_Exception *);
6115 typedef _Unwind_Reason_Code (*_Unwind_Stop_Fn)
6116 (int, _Unwind_Action, _Unwind_Exception_Class,
6117 struct _Unwind_Exception *, struct _Unwind_Context *, void *);
6119 extern _Unwind_Reason_Code _Unwind_ForcedUnwind (struct _Unwind_Exception *,
6124 extern void _Unwind_DeleteException (struct _Unwind_Exception *);
6128 extern void _Unwind_Resume (struct _Unwind_Exception *);
6133 typedef _Unwind_Reason_Code (*_Unwind_Trace_Fn)
6134 (struct _Unwind_Context *, void *);
6136 extern _Unwind_Reason_Code _Unwind_Backtrace (_Unwind_Trace_Fn, void *);
6143 extern _Unwind_Word _Unwind_GetGR (struct _Unwind_Context *, int);
6144 extern void _Unwind_SetGR (struct _Unwind_Context *, int, _Unwind_Word);
6146 extern _Unwind_Ptr _Unwind_GetIP (struct _Unwind_Context *);
6147 extern void _Unwind_SetIP (struct _Unwind_Context *, _Unwind_Ptr);
6150 extern _Unwind_Word _Unwind_GetCFA (struct _Unwind_Context *);
6152 extern void *_Unwind_GetLanguageSpecificData (struct _Unwind_Context *);
6154 extern _Unwind_Ptr _Unwind_GetRegionStart (struct _Unwind_Context *);
6155 # 167 "../sysdeps/generic/unwind.h"
6156 typedef _Unwind_Reason_Code (*_Unwind_Personality_Fn)
6157 (int, _Unwind_Action, _Unwind_Exception_Class,
6158 struct _Unwind_Exception *, struct _Unwind_Context *);
6163 struct SjLj_Function_Context;
6164 extern void _Unwind_SjLj_Register (struct SjLj_Function_Context *);
6165 extern void _Unwind_SjLj_Unregister (struct SjLj_Function_Context *);
6167 extern _Unwind_Reason_Code _Unwind_SjLj_RaiseException
6168 (struct _Unwind_Exception *);
6169 extern _Unwind_Reason_Code _Unwind_SjLj_ForcedUnwind
6170 (struct _Unwind_Exception *, _Unwind_Stop_Fn, void *);
6171 extern void _Unwind_SjLj_Resume (struct _Unwind_Exception *);
6172 # 208 "../sysdeps/generic/unwind.h"
6173 extern _Unwind_Ptr _Unwind_GetDataRelBase (struct _Unwind_Context *);
6174 extern _Unwind_Ptr _Unwind_GetTextRelBase (struct _Unwind_Context *);
6179 extern void * _Unwind_FindEnclosingFunction (void *pc);
6180 # 37 "../nptl/descr.h" 2
6183 # 1 "../include/resolv.h" 1
6184 # 12 "../include/resolv.h"
6185 # 1 "../resolv/resolv.h" 1
6186 # 56 "../resolv/resolv.h"
6187 # 1 "../include/sys/types.h" 1
6188 # 57 "../resolv/resolv.h" 2
6189 # 1 "../include/netinet/in.h" 1
6192 # 1 "../inet/netinet/in.h" 1
6193 # 24 "../inet/netinet/in.h"
6194 # 1 "../include/sys/socket.h" 1
6196 # 1 "../socket/sys/socket.h" 1
6197 # 25 "../socket/sys/socket.h"
6200 # 1 "../include/sys/uio.h" 1
6202 # 1 "../misc/sys/uio.h" 1
6203 # 24 "../misc/sys/uio.h"
6204 # 1 "../include/sys/types.h" 1
6205 # 25 "../misc/sys/uio.h" 2
6210 # 1 "../sysdeps/unix/sysv/linux/bits/uio.h" 1
6211 # 26 "../sysdeps/unix/sysv/linux/bits/uio.h"
6212 # 1 "../include/sys/types.h" 1
6213 # 27 "../sysdeps/unix/sysv/linux/bits/uio.h" 2
6214 # 44 "../sysdeps/unix/sysv/linux/bits/uio.h"
6220 # 30 "../misc/sys/uio.h" 2
6221 # 40 "../misc/sys/uio.h"
6222 extern ssize_t readv (int __fd, __const struct iovec *__iovec, int __count);
6223 # 50 "../misc/sys/uio.h"
6224 extern ssize_t writev (int __fd, __const struct iovec *__iovec, int __count);
6227 # 3 "../include/sys/uio.h" 2
6230 extern ssize_t __readv (int __fd, __const struct iovec *__vector,
6232 extern ssize_t __libc_readv (int __fd, __const struct iovec *__vector,
6234 extern ssize_t __writev (int __fd, __const struct iovec *__vector,
6236 extern ssize_t __libc_writev (int __fd, __const struct iovec *__vector,
6238 # 28 "../socket/sys/socket.h" 2
6240 # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4
6241 # 30 "../socket/sys/socket.h" 2
6247 # 1 "../sysdeps/unix/sysv/linux/bits/socket.h" 1
6248 # 29 "../sysdeps/unix/sysv/linux/bits/socket.h"
6249 # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4
6250 # 30 "../sysdeps/unix/sysv/linux/bits/socket.h" 2
6252 # 1 "../include/limits.h" 1
6253 # 145 "../include/limits.h"
6254 # 1 "../include/bits/posix1_lim.h" 1
6255 # 146 "../include/limits.h" 2
6259 # 1 "../include/bits/posix2_lim.h" 1
6260 # 150 "../include/limits.h" 2
6261 # 32 "../sysdeps/unix/sysv/linux/bits/socket.h" 2
6262 # 1 "../include/sys/types.h" 1
6263 # 33 "../sysdeps/unix/sysv/linux/bits/socket.h" 2
6267 typedef __socklen_t socklen_t;
6292 # 142 "../sysdeps/unix/sysv/linux/bits/socket.h"
6293 # 1 "../bits/sockaddr.h" 1
6294 # 29 "../bits/sockaddr.h"
6295 typedef unsigned short int sa_family_t;
6296 # 143 "../sysdeps/unix/sysv/linux/bits/socket.h" 2
6301 sa_family_t sa_family;
6304 # 162 "../sysdeps/unix/sysv/linux/bits/socket.h"
6305 struct sockaddr_storage
6307 sa_family_t ss_family;
6308 __uint32_t __ss_align;
6309 char __ss_padding[(128 - (2 * sizeof (__uint32_t)))];
6320 MSG_DONTROUTE = 0x04,
6324 MSG_TRYHARD = MSG_DONTROUTE,
6333 MSG_DONTWAIT = 0x40,
6337 MSG_WAITALL = 0x100,
6343 MSG_CONFIRM = 0x800,
6347 MSG_ERRQUEUE = 0x2000,
6349 MSG_NOSIGNAL = 0x4000,
6361 socklen_t msg_namelen;
6363 struct iovec *msg_iov;
6367 size_t msg_controllen;
6386 __extension__ unsigned char __cmsg_data [];
6389 # 263 "../sysdeps/unix/sysv/linux/bits/socket.h"
6390 extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
6391 struct cmsghdr *__cmsg) __attribute__ ((__nothrow__));
6396 extern __inline struct cmsghdr *
6397 __attribute__ ((__nothrow__)) __cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg)
6399 if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
6403 __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
6404 + (((__cmsg->cmsg_len) + sizeof (size_t) - 1) & (size_t) ~(sizeof (size_t) - 1)));
6405 if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control
6406 + __mhdr->msg_controllen)
6407 || ((unsigned char *) __cmsg + (((__cmsg->cmsg_len) + sizeof (size_t) - 1) & (size_t) ~(sizeof (size_t) - 1))
6408 > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
6422 , SCM_CREDENTIALS = 0x02
6437 # 1 "/usr/include/asm/socket.h" 1 3 4
6441 # 1 "/usr/include/asm/sockios.h" 1 3 4
6442 # 5 "/usr/include/asm/socket.h" 2 3 4
6443 # 311 "../sysdeps/unix/sysv/linux/bits/socket.h" 2
6452 # 36 "../socket/sys/socket.h" 2
6459 unsigned short int sa_family;
6460 unsigned char sa_data[14];
6475 # 87 "../socket/sys/socket.h"
6476 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__;
6477 } __SOCKADDR_ARG __attribute__ ((__transparent_union__));
6480 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__;
6481 } __CONST_SOCKADDR_ARG __attribute__ ((__transparent_union__));
6489 extern int socket (int __domain, int __type, int __protocol) __attribute__ ((__nothrow__));
6495 extern int socketpair (int __domain, int __type, int __protocol,
6496 int __fds[2]) __attribute__ ((__nothrow__));
6499 extern int bind (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len)
6500 __attribute__ ((__nothrow__));
6503 extern int getsockname (int __fd, __SOCKADDR_ARG __addr,
6504 socklen_t *__restrict __len) __attribute__ ((__nothrow__));
6505 # 124 "../socket/sys/socket.h"
6506 extern int connect (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len);
6510 extern int getpeername (int __fd, __SOCKADDR_ARG __addr,
6511 socklen_t *__restrict __len) __attribute__ ((__nothrow__));
6518 extern ssize_t send (int __fd, __const void *__buf, size_t __n, int __flags);
6525 extern ssize_t recv (int __fd, void *__buf, size_t __n, int __flags);
6532 extern ssize_t sendto (int __fd, __const void *__buf, size_t __n,
6533 int __flags, __CONST_SOCKADDR_ARG __addr,
6534 socklen_t __addr_len);
6535 # 161 "../socket/sys/socket.h"
6536 extern ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n,
6537 int __flags, __SOCKADDR_ARG __addr,
6538 socklen_t *__restrict __addr_len);
6546 extern ssize_t sendmsg (int __fd, __const struct msghdr *__message,
6554 extern ssize_t recvmsg (int __fd, struct msghdr *__message, int __flags);
6560 extern int getsockopt (int __fd, int __level, int __optname,
6561 void *__restrict __optval,
6562 socklen_t *__restrict __optlen) __attribute__ ((__nothrow__));
6567 extern int setsockopt (int __fd, int __level, int __optname,
6568 __const void *__optval, socklen_t __optlen) __attribute__ ((__nothrow__));
6574 extern int listen (int __fd, int __n) __attribute__ ((__nothrow__));
6575 # 209 "../socket/sys/socket.h"
6576 extern int accept (int __fd, __SOCKADDR_ARG __addr,
6577 socklen_t *__restrict __addr_len);
6585 extern int shutdown (int __fd, int __how) __attribute__ ((__nothrow__));
6590 extern int sockatmark (int __fd) __attribute__ ((__nothrow__));
6598 extern int isfdtype (int __fd, int __fdtype) __attribute__ ((__nothrow__));
6599 # 240 "../socket/sys/socket.h"
6601 # 3 "../include/sys/socket.h" 2
6608 extern int __socket (int __domain, int __type,
6615 extern int __socketpair (int __domain, int __type, int __protocol,
6620 extern int __opensock (void) ;
6624 extern int __getpeername (int __fd, __SOCKADDR_ARG __addr,
6628 extern ssize_t __libc_send (int __fd, __const void *__buf, size_t __n,
6630 extern ssize_t __send (int __fd, __const void *__buf, size_t __n, int __flags);
6635 extern ssize_t __libc_recv (int __fd, void *__buf, size_t __n, int __flags);
6639 extern ssize_t __libc_sendto (int __fd, __const void *__buf, size_t __n,
6640 int __flags, __CONST_SOCKADDR_ARG __addr,
6641 socklen_t __addr_len);
6647 extern ssize_t __libc_recvfrom (int __fd, void *__restrict __buf, size_t __n,
6648 int __flags, __SOCKADDR_ARG __addr,
6649 socklen_t *__restrict __addr_len);
6655 extern int __libc_connect (int __fd, __CONST_SOCKADDR_ARG __addr,
6657 extern int __connect (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len);
6658 extern int __connect_internal (int __fd, __CONST_SOCKADDR_ARG __addr,
6666 extern ssize_t __recv (int __fd, void *__buf, size_t __n, int __flags)
6671 extern ssize_t __libc_sendto (int __fd, __const void *__buf, size_t __n,
6672 int __flags, __CONST_SOCKADDR_ARG __addr,
6673 socklen_t __addr_len);
6674 extern ssize_t __sendto (int __fd, __const void *__buf, size_t __n,
6675 int __flags, __CONST_SOCKADDR_ARG __addr,
6676 socklen_t __addr_len) ;
6682 extern ssize_t __recvfrom (int __fd, void *__restrict __buf, size_t __n,
6683 int __flags, __SOCKADDR_ARG __addr,
6684 socklen_t *__restrict __addr_len) ;
6688 extern ssize_t __libc_sendmsg (int __fd, __const struct msghdr *__message,
6690 extern ssize_t __sendmsg (int __fd, __const struct msghdr *__message,
6695 extern ssize_t __libc_recvmsg (int __fd, struct msghdr *__message,
6697 extern ssize_t __recvmsg (int __fd, struct msghdr *__message,
6703 extern int __setsockopt (int __fd, int __level, int __optname,
6704 __const void *__optval,
6705 socklen_t __optlen) ;
6710 extern int __getsockopt (int __fd, int __level, int __optname,
6711 void *__restrict __optval,
6712 socklen_t *__restrict __optlen) ;
6715 extern int __getsockname (int __fd, __SOCKADDR_ARG __addr,
6716 socklen_t *__restrict __len) ;
6719 extern int __bind (int __fd, __CONST_SOCKADDR_ARG __addr,
6725 extern int __listen (int __fd, int __n) ;
6732 extern int __libc_accept (int __fd, __SOCKADDR_ARG __addr,
6733 socklen_t *__restrict __addr_len)
6734 __attribute__ ((__nothrow__));
6741 extern int __libc_sa_len (sa_family_t __af);
6742 extern int __libc_sa_len_internal (sa_family_t __af) ;
6743 # 25 "../inet/netinet/in.h" 2
6754 IPPROTO_HOPOPTS = 0,
6776 IPPROTO_ROUTING = 43,
6778 IPPROTO_FRAGMENT = 44,
6788 IPPROTO_ICMPV6 = 58,
6792 IPPROTO_DSTOPTS = 60,
6811 typedef uint16_t in_port_t;
6819 IPPORT_DAYTIME = 13,
6820 IPPORT_NETSTAT = 15,
6824 IPPORT_TIMESERVER = 37,
6825 IPPORT_NAMESERVER = 42,
6832 IPPORT_TTYLINK = 87,
6836 IPPORT_EXECSERVER = 512,
6837 IPPORT_LOGINSERVER = 513,
6838 IPPORT_CMDSERVER = 514,
6839 IPPORT_EFSSERVER = 520,
6842 IPPORT_BIFFUDP = 512,
6843 IPPORT_WHOSERVER = 513,
6844 IPPORT_ROUTESERVER = 520,
6847 IPPORT_RESERVED = 1024,
6850 IPPORT_USERRESERVED = 5000
6855 typedef uint32_t in_addr_t;
6860 # 193 "../inet/netinet/in.h"
6865 uint8_t u6_addr8[16];
6866 uint16_t u6_addr16[8];
6867 uint32_t u6_addr32[4];
6874 extern const struct in6_addr in6addr_any;
6875 extern const struct in6_addr in6addr_loopback;
6876 # 219 "../inet/netinet/in.h"
6879 sa_family_t sin_family;
6881 struct in_addr sin_addr;
6884 unsigned char sin_zero[sizeof (struct sockaddr) -
6885 (sizeof (unsigned short int)) -
6886 sizeof (in_port_t) -
6887 sizeof (struct in_addr)];
6893 sa_family_t sin6_family;
6894 in_port_t sin6_port;
6895 uint32_t sin6_flowinfo;
6896 struct in6_addr sin6_addr;
6897 uint32_t sin6_scope_id;
6905 struct in_addr imr_multiaddr;
6908 struct in_addr imr_interface;
6911 struct ip_mreq_source
6914 struct in_addr imr_multiaddr;
6917 struct in_addr imr_interface;
6920 struct in_addr imr_sourceaddr;
6927 struct in6_addr ipv6mr_multiaddr;
6930 unsigned int ipv6mr_interface;
6938 uint32_t gr_interface;
6941 struct sockaddr_storage gr_group;
6944 struct group_source_req
6947 uint32_t gsr_interface;
6950 struct sockaddr_storage gsr_group;
6953 struct sockaddr_storage gsr_source;
6961 struct in_addr imsf_multiaddr;
6964 struct in_addr imsf_interface;
6967 uint32_t imsf_fmode;
6970 uint32_t imsf_numsrc;
6972 struct in_addr imsf_slist[1];
6982 uint32_t gf_interface;
6985 struct sockaddr_storage gf_group;
6993 struct sockaddr_storage gf_slist[1];
6995 # 345 "../inet/netinet/in.h"
6996 # 1 "../sysdeps/unix/sysv/linux/bits/in.h" 1
6997 # 82 "../sysdeps/unix/sysv/linux/bits/in.h"
7000 struct in_addr ip_dst;
7007 struct in_addr imr_multiaddr;
7008 struct in_addr imr_address;
7016 struct in_addr ipi_spec_dst;
7017 struct in_addr ipi_addr;
7019 # 346 "../inet/netinet/in.h" 2
7020 # 354 "../inet/netinet/in.h"
7021 extern uint32_t ntohl (uint32_t __netlong) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
7022 extern uint16_t ntohs (uint16_t __netshort)
7023 __attribute__ ((__nothrow__)) __attribute__ ((__const__));
7024 extern uint32_t htonl (uint32_t __hostlong)
7025 __attribute__ ((__nothrow__)) __attribute__ ((__const__));
7026 extern uint16_t htons (uint16_t __hostshort)
7027 __attribute__ ((__nothrow__)) __attribute__ ((__const__));
7029 # 1 "../include/endian.h" 1
7030 # 363 "../inet/netinet/in.h" 2
7033 # 1 "../bits/byteswap.h" 1
7034 # 366 "../inet/netinet/in.h" 2
7035 # 428 "../inet/netinet/in.h"
7036 extern int bindresvport (int __sockfd, struct sockaddr_in *__sock_in) __attribute__ ((__nothrow__));
7039 extern int bindresvport6 (int __sockfd, struct sockaddr_in6 *__sock_in)
7040 __attribute__ ((__nothrow__));
7041 # 456 "../inet/netinet/in.h"
7044 struct in6_addr ipi6_addr;
7045 unsigned int ipi6_ifindex;
7051 struct sockaddr_in6 ip6m_addr;
7058 extern int inet6_option_space (int __nbytes)
7059 __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__));
7060 extern int inet6_option_init (void *__bp, struct cmsghdr **__cmsgp,
7061 int __type) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__));
7062 extern int inet6_option_append (struct cmsghdr *__cmsg,
7063 __const uint8_t *__typep, int __multx,
7064 int __plusy) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__));
7065 extern uint8_t *inet6_option_alloc (struct cmsghdr *__cmsg, int __datalen,
7066 int __multx, int __plusy)
7067 __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__));
7068 extern int inet6_option_next (__const struct cmsghdr *__cmsg,
7070 __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__));
7071 extern int inet6_option_find (__const struct cmsghdr *__cmsg,
7072 uint8_t **__tptrp, int __type)
7073 __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__));
7077 extern int inet6_opt_init (void *__extbuf, socklen_t __extlen) __attribute__ ((__nothrow__));
7078 extern int inet6_opt_append (void *__extbuf, socklen_t __extlen, int __offset,
7079 uint8_t __type, socklen_t __len, uint8_t __align,
7080 void **__databufp) __attribute__ ((__nothrow__));
7081 extern int inet6_opt_finish (void *__extbuf, socklen_t __extlen, int __offset)
7082 __attribute__ ((__nothrow__));
7083 extern int inet6_opt_set_val (void *__databuf, int __offset, void *__val,
7084 socklen_t __vallen) __attribute__ ((__nothrow__));
7085 extern int inet6_opt_next (void *__extbuf, socklen_t __extlen, int __offset,
7086 uint8_t *__typep, socklen_t *__lenp,
7087 void **__databufp) __attribute__ ((__nothrow__));
7088 extern int inet6_opt_find (void *__extbuf, socklen_t __extlen, int __offset,
7089 uint8_t __type, socklen_t *__lenp,
7090 void **__databufp) __attribute__ ((__nothrow__));
7091 extern int inet6_opt_get_val (void *__databuf, int __offset, void *__val,
7092 socklen_t __vallen) __attribute__ ((__nothrow__));
7096 extern socklen_t inet6_rth_space (int __type, int __segments) __attribute__ ((__nothrow__));
7097 extern void *inet6_rth_init (void *__bp, socklen_t __bp_len, int __type,
7098 int __segments) __attribute__ ((__nothrow__));
7099 extern int inet6_rth_add (void *__bp, __const struct in6_addr *__addr) __attribute__ ((__nothrow__));
7100 extern int inet6_rth_reverse (__const void *__in, void *__out) __attribute__ ((__nothrow__));
7101 extern int inet6_rth_segments (__const void *__bp) __attribute__ ((__nothrow__));
7102 extern struct in6_addr *inet6_rth_getaddr (__const void *__bp, int __index)
7103 __attribute__ ((__nothrow__));
7109 extern int getipv4sourcefilter (int __s, struct in_addr __interface_addr,
7110 struct in_addr __group, uint32_t *__fmode,
7111 uint32_t *__numsrc, struct in_addr *__slist)
7112 __attribute__ ((__nothrow__));
7115 extern int setipv4sourcefilter (int __s, struct in_addr __interface_addr,
7116 struct in_addr __group, uint32_t __fmode,
7118 __const struct in_addr *__slist)
7119 __attribute__ ((__nothrow__));
7123 extern int getsourcefilter (int __s, uint32_t __interface_addr,
7124 __const struct sockaddr *__group,
7125 socklen_t __grouplen, uint32_t *__fmode,
7127 struct sockaddr_storage *__slist) __attribute__ ((__nothrow__));
7130 extern int setsourcefilter (int __s, uint32_t __interface_addr,
7131 __const struct sockaddr *__group,
7132 socklen_t __grouplen, uint32_t __fmode,
7134 __const struct sockaddr_storage *__slist) __attribute__ ((__nothrow__));
7138 # 4 "../include/netinet/in.h" 2
7143 # 58 "../resolv/resolv.h" 2
7144 # 71 "../resolv/resolv.h"
7145 typedef enum { res_goahead, res_nextns, res_modified, res_done, res_error }
7148 typedef res_sendhookact (*res_send_qhook) (struct sockaddr_in * const *ns,
7149 const u_char **query,
7155 typedef res_sendhookact (*res_send_rhook) (const struct sockaddr_in *ns,
7156 const u_char *query,
7161 # 104 "../resolv/resolv.h"
7162 struct __res_state {
7178 struct in_addr addr;
7181 res_send_qhook qhook;
7182 res_send_rhook rhook;
7194 struct sockaddr_in6 *nsaddrs[3];
7196 unsigned long long int initstamp
7197 __attribute__((packed));
7205 typedef struct __res_state *res_state;
7206 # 13 "../include/resolv.h" 2
7207 # 40 "../nptl/descr.h" 2
7208 # 65 "../nptl/descr.h"
7209 struct pthread_unwind_buf
7215 } cancel_jmp_buf[1];
7225 struct pthread_unwind_buf *prev;
7230 struct _pthread_cleanup_buffer *cleanup;
7250 struct robust_list_head
7253 long int futex_offset;
7254 void *list_op_pending;
7259 struct priority_protection_data
7262 unsigned int priomap[];
7277 int multiple_threads;
7285 void *__padding[16];
7297 # 193 "../nptl/descr.h"
7300 __pthread_slist_t robust_list;
7301 struct robust_list_head robust_head;
7303 # 231 "../nptl/descr.h"
7304 struct _pthread_cleanup_buffer *cleanup;
7307 struct pthread_unwind_buf *cleanup_jmp_buf;
7312 # 273 "../nptl/descr.h"
7313 struct pthread_key_data
7322 } specific_1stblock[32];
7325 struct pthread_key_data *specific[((1024 + 32 - 1) / 32)];
7328 _Bool specific_used;
7331 _Bool report_events;
7337 _Bool stopped_start;
7341 int parent_cancelhandling;
7347 lll_lock_t setxid_futex;
7348 # 320 "../nptl/descr.h"
7349 struct pthread *joinid;
7360 struct sched_param schedparam;
7365 void *(*start_routine) (void *);
7369 td_eventbuf_t eventbuf;
7371 struct pthread *nextevent;
7375 struct _Unwind_Exception exc;
7381 size_t stackblock_size;
7385 size_t reported_guardsize;
7388 struct priority_protection_data *tpp;
7391 struct __res_state res;
7398 } __attribute ((aligned (64)));
7399 # 64 "../ports/sysdeps/hppa/nptl/tls.h" 2
7406 # 135 "../ports/sysdeps/hppa/nptl/tls.h"
7407 static inline struct pthread *__get_cr27(void)
7410 asm ("mfctl %%cr27, %0" : "=r" (cr27) : );
7411 return (struct pthread *) cr27;
7414 static inline void __set_cr27(struct pthread *cr27)
7416 asm ( "ble 0xe0(%%sr2, %%r0)\n\t"
7418 : : "r" (cr27) : "r26" );
7420 # 7 "../include/tls.h" 2
7421 # 46 "../bits/libc-tsd.h" 2
7422 # 208 "../locale/localeinfo.h" 2
7423 extern __thread void *__libc_tsd_LOCALE __attribute__ ((tls_model ("initial-exec")));
7424 # 234 "../locale/localeinfo.h"
7425 # 1 "../locale/categories.def" 1
7426 # 42 "../locale/categories.def"
7427 extern __thread struct locale_data *const *_nl_current_LC_COLLATE __attribute__ ((tls_model ("initial-exec")));
7428 # 68 "../locale/categories.def"
7429 extern __thread struct locale_data *const *_nl_current_LC_CTYPE __attribute__ ((tls_model ("initial-exec")));
7430 # 140 "../locale/categories.def"
7431 extern __thread struct locale_data *const *_nl_current_LC_MONETARY __attribute__ ((tls_model ("initial-exec")));
7432 # 192 "../locale/categories.def"
7433 extern __thread struct locale_data *const *_nl_current_LC_NUMERIC __attribute__ ((tls_model ("initial-exec")));
7434 # 206 "../locale/categories.def"
7435 extern __thread struct locale_data *const *_nl_current_LC_TIME __attribute__ ((tls_model ("initial-exec")));
7436 # 254 "../locale/categories.def"
7437 extern __thread struct locale_data *const *_nl_current_LC_MESSAGES __attribute__ ((tls_model ("initial-exec")));
7438 # 265 "../locale/categories.def"
7439 extern __thread struct locale_data *const *_nl_current_LC_PAPER __attribute__ ((tls_model ("initial-exec")));
7440 # 274 "../locale/categories.def"
7441 extern __thread struct locale_data *const *_nl_current_LC_NAME __attribute__ ((tls_model ("initial-exec")));
7442 # 287 "../locale/categories.def"
7443 extern __thread struct locale_data *const *_nl_current_LC_ADDRESS __attribute__ ((tls_model ("initial-exec")));
7444 # 306 "../locale/categories.def"
7445 extern __thread struct locale_data *const *_nl_current_LC_TELEPHONE __attribute__ ((tls_model ("initial-exec")));
7446 # 317 "../locale/categories.def"
7447 extern __thread struct locale_data *const *_nl_current_LC_MEASUREMENT __attribute__ ((tls_model ("initial-exec")));
7455 extern __thread struct locale_data *const *_nl_current_LC_IDENTIFICATION __attribute__ ((tls_model ("initial-exec")));
7456 # 235 "../locale/localeinfo.h" 2
7457 # 296 "../locale/localeinfo.h"
7458 extern const char _nl_default_locale_path[] ;
7466 extern struct locale_data *_nl_find_locale (const char *locale_path,
7467 size_t locale_path_len,
7468 int category, const char **name)
7472 extern void _nl_load_locale (struct loaded_l10nfile *file, int category)
7476 extern void _nl_unload_locale (struct locale_data *locale)
7480 extern void _nl_remove_locale (int locale, struct locale_data *data)
7488 extern struct locale_data *_nl_load_locale_from_archive (int category,
7493 extern void _nl_archive_subfreeres (void) ;
7496 extern void _nl_locale_subfreeres (void) ;
7503 extern struct locale_data *_nl_intern_locale_data (int category,
7510 extern struct era_entry *_nl_get_era_entry (const struct tm *tp,
7511 struct locale_data *lc_time)
7515 extern struct era_entry *_nl_select_era_entry (int cnt,
7516 struct locale_data *lc_time)
7520 extern const char *_nl_get_alt_digit (unsigned int number,
7521 struct locale_data *lc_time)
7525 extern const wchar_t *_nl_get_walt_digit (unsigned int number,
7526 struct locale_data *lc_time)
7530 extern int _nl_parse_alt_digit (const char **strp,
7531 struct locale_data *lc_time)
7535 extern void _nl_postload_ctype (void);
7538 extern void _nl_cleanup_time (struct locale_data *)
7546 # 1 "../include/limits.h" 1
7547 # 145 "../include/limits.h"
7548 # 1 "../include/bits/posix1_lim.h" 1
7549 # 146 "../include/limits.h" 2
7553 # 1 "../include/bits/posix2_lim.h" 1
7554 # 150 "../include/limits.h" 2
7557 # 1 "../include/regex.h" 1
7559 # 1 "../posix/regex.h" 1
7560 # 25 "../posix/regex.h"
7561 # 1 "../include/sys/types.h" 1
7562 # 26 "../posix/regex.h" 2
7563 # 36 "../posix/regex.h"
7564 typedef long int s_reg_t;
7565 typedef unsigned long int active_reg_t;
7572 typedef unsigned long int reg_syntax_t;
7573 # 181 "../posix/regex.h"
7574 extern reg_syntax_t re_syntax_options;
7575 # 303 "../posix/regex.h"
7605 # 343 "../posix/regex.h"
7606 struct re_pattern_buffer
7611 unsigned char *buffer;
7614 unsigned long int allocated;
7617 unsigned long int used;
7620 reg_syntax_t syntax;
7631 unsigned char * translate;
7640 unsigned can_be_null : 1;
7641 # 386 "../posix/regex.h"
7642 unsigned regs_allocated : 2;
7646 unsigned fastmap_accurate : 1;
7650 unsigned no_sub : 1;
7654 unsigned not_bol : 1;
7657 unsigned not_eol : 1;
7660 unsigned newline_anchor : 1;
7663 typedef struct re_pattern_buffer regex_t;
7666 typedef int regoff_t;
7677 # 434 "../posix/regex.h"
7688 extern reg_syntax_t __re_set_syntax (reg_syntax_t __syntax);
7693 extern const char *__re_compile_pattern (const char *__pattern, size_t __length, struct re_pattern_buffer *__buffer);
7700 extern int __re_compile_fastmap (struct re_pattern_buffer *__buffer);
7708 extern int __re_search (struct re_pattern_buffer *__buffer, const char *__string, int __length, int __start, int __range, struct re_registers *__regs);
7715 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);
7723 extern int __re_match (struct re_pattern_buffer *__buffer, const char *__string, int __length, int __start, struct re_registers *__regs);
7728 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);
7729 # 502 "../posix/regex.h"
7730 extern void __re_set_registers (struct re_pattern_buffer *__buffer, struct re_registers *__regs, unsigned int __num_regs, regoff_t *__starts, regoff_t *__ends);
7738 extern char *re_comp (const char *);
7739 extern int re_exec (const char *);
7740 # 537 "../posix/regex.h"
7741 extern int __regcomp (regex_t *__restrict __preg, const char *__restrict __pattern, int __cflags);
7745 extern int __regexec (const regex_t *__restrict __preg, const char *__restrict __string, size_t __nmatch, regmatch_t __pmatch[__restrict], int __eflags);
7750 extern size_t __regerror(int __errcode, const regex_t *__restrict __preg, char *__restrict __errbuf, size_t __errbuf_size);
7753 extern void __regfree (regex_t *__preg);
7754 # 3 "../include/regex.h" 2
7757 extern reg_syntax_t __re_set_syntax (reg_syntax_t syntax);
7759 extern const char *__re_compile_pattern (const char *pattern, size_t length,
7760 struct re_pattern_buffer *buffer);
7762 extern int __re_compile_fastmap (struct re_pattern_buffer *buffer);
7764 extern int __re_search (struct re_pattern_buffer *buffer, const char *string,
7765 int length, int start, int range,
7766 struct re_registers *regs);
7768 extern int __re_search_2
7769 (struct re_pattern_buffer *buffer, const char *string1,
7770 int length1, const char *string2, int length2,
7771 int start, int range, struct re_registers *regs, int stop);
7773 extern int __re_match
7774 (struct re_pattern_buffer *buffer, const char *string,
7775 int length, int start, struct re_registers *regs);
7777 extern int __re_match_2
7778 (struct re_pattern_buffer *buffer, const char *string1,
7779 int length1, const char *string2, int length2,
7780 int start, struct re_registers *regs, int stop);
7782 extern void __re_set_registers
7783 (struct re_pattern_buffer *buffer, struct re_registers *regs,
7784 unsigned num_regs, regoff_t *starts, regoff_t *ends);
7786 extern int __regcomp (regex_t *__preg, const char *__pattern, int __cflags);
7788 extern int __regexec (const regex_t *__preg, const char *__string,
7789 size_t __nmatch, regmatch_t __pmatch[], int __eflags);
7791 extern size_t __regerror (int __errcode, const regex_t *__preg,
7792 char *__errbuf, size_t __errbuf_size);
7794 extern void __regfree (regex_t *__preg);
7796 # 1 "regex_internal.h" 1
7797 # 24 "regex_internal.h"
7798 # 1 "../include/assert.h" 1
7799 # 1 "../assert/assert.h" 1
7800 # 65 "../assert/assert.h"
7804 extern void __assert_fail (__const char *__assertion, __const char *__file,
7805 unsigned int __line, __const char *__function)
7806 __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
7809 extern void __assert_perror_fail (int __errnum, __const char *__file,
7810 unsigned int __line,
7811 __const char *__function)
7812 __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
7817 extern void __assert (const char *__assertion, const char *__file, int __line)
7818 __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
7822 # 2 "../include/assert.h" 2
7827 extern void __assert_fail (__const char *__assertion, __const char *__file,
7828 unsigned int __line, __const char *__function)
7829 __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
7832 extern void __assert_perror_fail (int __errnum, __const char *__file,
7833 unsigned int __line,
7834 __const char *__function)
7835 __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
7840 # 25 "regex_internal.h" 2
7841 # 1 "../include/ctype.h" 1
7844 extern int __isctype (int __c, int __mask);
7845 # 14 "../include/ctype.h"
7846 # 1 "../include/../locale/localeinfo.h" 1
7847 # 15 "../include/ctype.h" 2
7854 extern __thread void *__libc_tsd_CTYPE_B __attribute__ ((tls_model ("initial-exec")));
7855 extern __thread void *__libc_tsd_CTYPE_TOUPPER __attribute__ ((tls_model ("initial-exec")));
7856 extern __thread void *__libc_tsd_CTYPE_TOLOWER __attribute__ ((tls_model ("initial-exec")));
7858 extern inline const uint16_t ** __attribute__ ((const))
7859 __ctype_b_loc (void)
7864 const uint16_t **tablep;
7866 u.ptr = (&__libc_tsd_CTYPE_B);
7867 if (__builtin_expect (*u.tablep == ((void *)0), 0))
7868 *u.tablep = (const uint16_t *) ((*_nl_current_LC_CTYPE)->values[((int) (_NL_CTYPE_CLASS) & 0xffff)].string) + 128;
7872 extern inline const int32_t ** __attribute__ ((const))
7873 __ctype_toupper_loc (void)
7878 const int32_t **tablep;
7880 u.ptr = (&__libc_tsd_CTYPE_TOUPPER);
7881 if (__builtin_expect (*u.tablep == ((void *)0), 0))
7882 *u.tablep = ((int32_t *) ((*_nl_current_LC_CTYPE)->values[((int) (_NL_CTYPE_TOUPPER) & 0xffff)].string) + 128);
7886 extern inline const int32_t ** __attribute__ ((const))
7887 __ctype_tolower_loc (void)
7892 const int32_t **tablep;
7894 u.ptr = (&__libc_tsd_CTYPE_TOLOWER);
7895 if (__builtin_expect (*u.tablep == ((void *)0), 0))
7896 *u.tablep = ((int32_t *) ((*_nl_current_LC_CTYPE)->values[((int) (_NL_CTYPE_TOLOWER) & 0xffff)].string) + 128);
7902 # 1 "../ctype/ctype.h" 1
7903 # 30 "../ctype/ctype.h"
7905 # 41 "../ctype/ctype.h"
7906 # 1 "../include/endian.h" 1
7907 # 42 "../ctype/ctype.h" 2
7916 _ISupper = (1 << (0)),
7917 _ISlower = (1 << (1)),
7918 _ISalpha = (1 << (2)),
7919 _ISdigit = (1 << (3)),
7920 _ISxdigit = (1 << (4)),
7921 _ISspace = (1 << (5)),
7922 _ISprint = (1 << (6)),
7923 _ISgraph = (1 << (7)),
7924 _ISblank = (1 << (8)),
7925 _IScntrl = (1 << (9)),
7926 _ISpunct = (1 << (10)),
7927 _ISalnum = (1 << (11))
7929 # 81 "../ctype/ctype.h"
7930 extern __const unsigned short int **__ctype_b_loc (void)
7931 __attribute__ ((__const));
7932 extern __const __int32_t **__ctype_tolower_loc (void)
7933 __attribute__ ((__const));
7934 extern __const __int32_t **__ctype_toupper_loc (void)
7935 __attribute__ ((__const));
7936 # 96 "../ctype/ctype.h"
7943 extern int isalnum (int) __attribute__ ((__nothrow__));
7944 extern int isalpha (int) __attribute__ ((__nothrow__));
7945 extern int iscntrl (int) __attribute__ ((__nothrow__));
7946 extern int isdigit (int) __attribute__ ((__nothrow__));
7947 extern int islower (int) __attribute__ ((__nothrow__));
7948 extern int isgraph (int) __attribute__ ((__nothrow__));
7949 extern int isprint (int) __attribute__ ((__nothrow__));
7950 extern int ispunct (int) __attribute__ ((__nothrow__));
7951 extern int isspace (int) __attribute__ ((__nothrow__));
7952 extern int isupper (int) __attribute__ ((__nothrow__));
7953 extern int isxdigit (int) __attribute__ ((__nothrow__));
7957 extern int tolower (int __c) __attribute__ ((__nothrow__));
7960 extern int toupper (int __c) __attribute__ ((__nothrow__));
7969 extern int isblank (int) __attribute__ ((__nothrow__));
7976 extern int isctype (int __c, int __mask) __attribute__ ((__nothrow__));
7983 extern int isascii (int __c) __attribute__ ((__nothrow__));
7987 extern int toascii (int __c) __attribute__ ((__nothrow__));
7991 extern int _toupper (int) __attribute__ ((__nothrow__));
7992 extern int _tolower (int) __attribute__ ((__nothrow__));
7993 # 190 "../ctype/ctype.h"
7995 __attribute__ ((__nothrow__)) tolower (int __c)
7997 return __c >= -128 && __c < 256 ? (*__ctype_tolower_loc ())[__c] : __c;
8001 __attribute__ ((__nothrow__)) toupper (int __c)
8003 return __c >= -128 && __c < 256 ? (*__ctype_toupper_loc ())[__c] : __c;
8005 # 233 "../ctype/ctype.h"
8006 # 1 "../include/xlocale.h" 1
8007 # 234 "../ctype/ctype.h" 2
8008 # 247 "../ctype/ctype.h"
8009 extern int isalnum_l (int, __locale_t) __attribute__ ((__nothrow__));
8010 extern int isalpha_l (int, __locale_t) __attribute__ ((__nothrow__));
8011 extern int iscntrl_l (int, __locale_t) __attribute__ ((__nothrow__));
8012 extern int isdigit_l (int, __locale_t) __attribute__ ((__nothrow__));
8013 extern int islower_l (int, __locale_t) __attribute__ ((__nothrow__));
8014 extern int isgraph_l (int, __locale_t) __attribute__ ((__nothrow__));
8015 extern int isprint_l (int, __locale_t) __attribute__ ((__nothrow__));
8016 extern int ispunct_l (int, __locale_t) __attribute__ ((__nothrow__));
8017 extern int isspace_l (int, __locale_t) __attribute__ ((__nothrow__));
8018 extern int isupper_l (int, __locale_t) __attribute__ ((__nothrow__));
8019 extern int isxdigit_l (int, __locale_t) __attribute__ ((__nothrow__));
8021 extern int isblank_l (int, __locale_t) __attribute__ ((__nothrow__));
8025 extern int __tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__));
8026 extern int tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__));
8029 extern int __toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__));
8030 extern int toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__));
8031 # 323 "../ctype/ctype.h"
8033 # 70 "../include/ctype.h" 2
8034 # 26 "regex_internal.h" 2
8035 # 1 "../include/stdio.h" 1
8040 # 1 "../libio/stdio.h" 1
8041 # 30 "../libio/stdio.h"
8046 # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4
8047 # 35 "../libio/stdio.h" 2
8048 # 44 "../libio/stdio.h"
8051 typedef struct _IO_FILE FILE;
8057 # 62 "../libio/stdio.h"
8058 typedef struct _IO_FILE __FILE;
8059 # 72 "../libio/stdio.h"
8060 # 1 "../include/libio.h" 1
8061 # 1 "../libio/libio.h" 1
8062 # 32 "../libio/libio.h"
8063 # 1 "../sysdeps/gnu/_G_config.h" 1
8064 # 14 "../sysdeps/gnu/_G_config.h"
8065 # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4
8066 # 355 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 3 4
8067 typedef unsigned int wint_t;
8068 # 15 "../sysdeps/gnu/_G_config.h" 2
8069 # 24 "../sysdeps/gnu/_G_config.h"
8070 # 1 "../include/wchar.h" 1
8072 # 1 "../wcsmbs/wchar.h" 1
8073 # 48 "../wcsmbs/wchar.h"
8074 # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4
8075 # 49 "../wcsmbs/wchar.h" 2
8076 # 76 "../wcsmbs/wchar.h"
8086 # 3 "../include/wchar.h" 2
8087 # 25 "../sysdeps/gnu/_G_config.h" 2
8092 __mbstate_t __state;
8097 __mbstate_t __state;
8099 # 44 "../sysdeps/gnu/_G_config.h"
8100 # 1 "../include/gconv.h" 1
8101 # 1 "../iconv/gconv.h" 1
8102 # 28 "../iconv/gconv.h"
8103 # 1 "../include/wchar.h" 1
8105 # 1 "../wcsmbs/wchar.h" 1
8106 # 48 "../wcsmbs/wchar.h"
8107 # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4
8108 # 49 "../wcsmbs/wchar.h" 2
8109 # 3 "../include/wchar.h" 2
8110 # 29 "../iconv/gconv.h" 2
8113 # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4
8114 # 32 "../iconv/gconv.h" 2
8127 __GCONV_EMPTY_INPUT,
8128 __GCONV_FULL_OUTPUT,
8129 __GCONV_ILLEGAL_INPUT,
8130 __GCONV_INCOMPLETE_INPUT,
8132 __GCONV_ILLEGAL_DESCRIPTOR,
8133 __GCONV_INTERNAL_ERROR
8140 __GCONV_IS_LAST = 0x0001,
8141 __GCONV_IGNORE_ERRORS = 0x0002
8146 struct __gconv_step;
8147 struct __gconv_step_data;
8148 struct __gconv_loaded_object;
8149 struct __gconv_trans_data;
8153 typedef int (*__gconv_fct) (struct __gconv_step *, struct __gconv_step_data *,
8154 __const unsigned char **, __const unsigned char *,
8155 unsigned char **, size_t *, int, int);
8158 typedef wint_t (*__gconv_btowc_fct) (struct __gconv_step *, unsigned char);
8161 typedef int (*__gconv_init_fct) (struct __gconv_step *);
8162 typedef void (*__gconv_end_fct) (struct __gconv_step *);
8166 typedef int (*__gconv_trans_fct) (struct __gconv_step *,
8167 struct __gconv_step_data *, void *,
8168 __const unsigned char *,
8169 __const unsigned char **,
8170 __const unsigned char *, unsigned char **,
8174 typedef int (*__gconv_trans_context_fct) (void *, __const unsigned char *,
8175 __const unsigned char *,
8176 unsigned char *, unsigned char *);
8179 typedef int (*__gconv_trans_query_fct) (__const char *, __const char ***,
8183 typedef int (*__gconv_trans_init_fct) (void **, const char *);
8184 typedef void (*__gconv_trans_end_fct) (void *);
8186 struct __gconv_trans_data
8189 __gconv_trans_fct __trans_fct;
8190 __gconv_trans_context_fct __trans_context_fct;
8191 __gconv_trans_end_fct __trans_end_fct;
8193 struct __gconv_trans_data *__next;
8200 struct __gconv_loaded_object *__shlib_handle;
8201 __const char *__modname;
8209 __gconv_btowc_fct __btowc_fct;
8210 __gconv_init_fct __init_fct;
8211 __gconv_end_fct __end_fct;
8215 int __min_needed_from;
8216 int __max_needed_from;
8217 int __min_needed_to;
8218 int __max_needed_to;
8228 struct __gconv_step_data
8230 unsigned char *__outbuf;
8231 unsigned char *__outbufend;
8239 int __invocation_counter;
8245 __mbstate_t *__statep;
8246 __mbstate_t __state;
8250 struct __gconv_trans_data *__trans;
8255 typedef struct __gconv_info
8258 struct __gconv_step *__steps;
8259 __extension__ struct __gconv_step_data __data [];
8261 # 1 "../include/gconv.h" 2
8262 # 45 "../sysdeps/gnu/_G_config.h" 2
8265 struct __gconv_info __cd;
8268 struct __gconv_info __cd;
8269 struct __gconv_step_data __data;
8273 typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
8274 typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
8275 typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
8276 typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
8277 # 33 "../libio/libio.h" 2
8278 # 53 "../libio/libio.h"
8279 # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stdarg.h" 1 3 4
8280 # 43 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stdarg.h" 3 4
8281 typedef __builtin_va_list __gnuc_va_list;
8282 # 54 "../libio/libio.h" 2
8283 # 167 "../libio/libio.h"
8284 struct _IO_jump_t; struct _IO_FILE;
8285 # 177 "../libio/libio.h"
8286 typedef void _IO_lock_t;
8293 struct _IO_marker *_next;
8294 struct _IO_FILE *_sbuf;
8299 # 200 "../libio/libio.h"
8303 enum __codecvt_result
8316 void (*__codecvt_destr) (struct _IO_codecvt *);
8317 enum __codecvt_result (*__codecvt_do_out) (struct _IO_codecvt *,
8321 const wchar_t **, char *,
8323 enum __codecvt_result (*__codecvt_do_unshift) (struct _IO_codecvt *,
8324 __mbstate_t *, char *,
8326 enum __codecvt_result (*__codecvt_do_in) (struct _IO_codecvt *,
8328 const char *, const char *,
8329 const char **, wchar_t *,
8330 wchar_t *, wchar_t **);
8331 int (*__codecvt_do_encoding) (struct _IO_codecvt *);
8332 int (*__codecvt_do_always_noconv) (struct _IO_codecvt *);
8333 int (*__codecvt_do_length) (struct _IO_codecvt *, __mbstate_t *,
8334 const char *, const char *, size_t);
8335 int (*__codecvt_do_max_length) (struct _IO_codecvt *);
8338 _G_iconv_t __cd_out;
8342 struct _IO_wide_data
8344 wchar_t *_IO_read_ptr;
8345 wchar_t *_IO_read_end;
8346 wchar_t *_IO_read_base;
8347 wchar_t *_IO_write_base;
8348 wchar_t *_IO_write_ptr;
8349 wchar_t *_IO_write_end;
8350 wchar_t *_IO_buf_base;
8351 wchar_t *_IO_buf_end;
8353 wchar_t *_IO_save_base;
8354 wchar_t *_IO_backup_base;
8356 wchar_t *_IO_save_end;
8358 __mbstate_t _IO_state;
8359 __mbstate_t _IO_last_state;
8360 struct _IO_codecvt _codecvt;
8362 wchar_t _shortbuf[1];
8364 const struct _IO_jump_t *_wide_vtable;
8376 char* _IO_read_base;
8377 char* _IO_write_base;
8378 char* _IO_write_ptr;
8379 char* _IO_write_end;
8383 char *_IO_save_base;
8384 char *_IO_backup_base;
8387 struct _IO_marker *_markers;
8389 struct _IO_FILE *_chain;
8397 __off_t _old_offset;
8401 unsigned short _cur_column;
8402 signed char _vtable_offset;
8408 # 316 "../libio/libio.h"
8412 struct _IO_codecvt *_codecvt;
8413 struct _IO_wide_data *_wide_data;
8414 struct _IO_FILE *_freeres_list;
8416 size_t _freeres_size;
8426 char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];
8431 typedef struct _IO_FILE _IO_FILE;
8434 struct _IO_FILE_plus;
8436 extern struct _IO_FILE_plus _IO_2_1_stdin_;
8437 extern struct _IO_FILE_plus _IO_2_1_stdout_;
8438 extern struct _IO_FILE_plus _IO_2_1_stderr_;
8444 extern _IO_FILE *_IO_stdin ;
8445 extern _IO_FILE *_IO_stdout ;
8446 extern _IO_FILE *_IO_stderr ;
8454 typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes);
8462 typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf,
8471 typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w);
8474 typedef int __io_close_fn (void *__cookie);
8479 typedef __io_read_fn cookie_read_function_t;
8480 typedef __io_write_fn cookie_write_function_t;
8481 typedef __io_seek_fn cookie_seek_function_t;
8482 typedef __io_close_fn cookie_close_function_t;
8488 __io_write_fn *write;
8490 __io_close_fn *close;
8491 } _IO_cookie_io_functions_t;
8492 typedef _IO_cookie_io_functions_t cookie_io_functions_t;
8494 struct _IO_cookie_file;
8497 extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write,
8498 void *__cookie, _IO_cookie_io_functions_t __fns);
8506 extern int __underflow (_IO_FILE *) __attribute__ ((__nothrow__));
8507 extern int __uflow (_IO_FILE *) __attribute__ ((__nothrow__));
8508 extern int __overflow (_IO_FILE *, int) __attribute__ ((__nothrow__));
8509 extern wint_t __wunderflow (_IO_FILE *) __attribute__ ((__nothrow__));
8510 extern wint_t __wuflow (_IO_FILE *) __attribute__ ((__nothrow__));
8511 extern wint_t __woverflow (_IO_FILE *, wint_t) __attribute__ ((__nothrow__));
8512 # 451 "../libio/libio.h"
8513 extern int _IO_getc (_IO_FILE *__fp) __attribute__ ((__nothrow__));
8514 extern int _IO_putc (int __c, _IO_FILE *__fp) __attribute__ ((__nothrow__));
8515 extern int _IO_feof (_IO_FILE *__fp) __attribute__ ((__nothrow__));
8516 extern int _IO_ferror (_IO_FILE *__fp) __attribute__ ((__nothrow__));
8518 extern int _IO_peekc_locked (_IO_FILE *__fp) __attribute__ ((__nothrow__));
8524 extern void _IO_flockfile (_IO_FILE *) __attribute__ ((__nothrow__));
8525 extern void _IO_funlockfile (_IO_FILE *) __attribute__ ((__nothrow__));
8526 extern int _IO_ftrylockfile (_IO_FILE *) __attribute__ ((__nothrow__));
8527 # 481 "../libio/libio.h"
8528 extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict,
8529 __gnuc_va_list, int *__restrict);
8530 extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict,
8532 extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t) __attribute__ ((__nothrow__));
8533 extern size_t _IO_sgetn (_IO_FILE *, void *, size_t) __attribute__ ((__nothrow__));
8535 extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int) __attribute__ ((__nothrow__));
8536 extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int) __attribute__ ((__nothrow__));
8538 extern void _IO_free_backup_area (_IO_FILE *) __attribute__ ((__nothrow__));
8541 extern wint_t _IO_getwc (_IO_FILE *__fp) __attribute__ ((__nothrow__));
8542 extern wint_t _IO_putwc (wchar_t __wc, _IO_FILE *__fp) __attribute__ ((__nothrow__));
8543 extern int _IO_fwide (_IO_FILE *__fp, int __mode) __attribute__ ((__nothrow__));
8544 # 530 "../libio/libio.h"
8545 extern int _IO_vfwscanf (_IO_FILE * __restrict, const wchar_t * __restrict,
8546 __gnuc_va_list, int *__restrict);
8547 extern int _IO_vfwprintf (_IO_FILE *__restrict, const wchar_t *__restrict,
8549 extern __ssize_t _IO_wpadn (_IO_FILE *, wint_t, __ssize_t) __attribute__ ((__nothrow__));
8550 extern void _IO_free_wbackup_area (_IO_FILE *) __attribute__ ((__nothrow__));
8551 # 2 "../include/libio.h" 2
8562 # 73 "../libio/stdio.h" 2
8567 typedef __gnuc_va_list va_list;
8568 # 86 "../libio/stdio.h"
8571 typedef _G_fpos_t fpos_t;
8577 typedef _G_fpos64_t fpos64_t;
8578 # 138 "../libio/stdio.h"
8579 # 1 "/var/tmp/portage/glibc-2.5/work/build-default-hppa2.0-unknown-linux-gnu-nptl/bits/stdio_lim.h" 1
8580 # 139 "../libio/stdio.h" 2
8584 extern struct _IO_FILE *stdin;
8585 extern struct _IO_FILE *stdout;
8586 extern struct _IO_FILE *stderr;
8594 extern int remove (__const char *__filename) __attribute__ ((__nothrow__));
8596 extern int rename (__const char *__old, __const char *__new) __attribute__ ((__nothrow__));
8601 extern int renameat (int __oldfd, __const char *__old, int __newfd,
8602 __const char *__new) __attribute__ ((__nothrow__));
8611 extern FILE *tmpfile (void) ;
8612 # 179 "../libio/stdio.h"
8613 extern FILE *tmpfile64 (void) ;
8617 extern char *tmpnam (char *__s) __attribute__ ((__nothrow__)) ;
8623 extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__)) ;
8624 # 201 "../libio/stdio.h"
8625 extern char *tempnam (__const char *__dir, __const char *__pfx)
8626 __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ;
8635 extern int fclose (FILE *__stream);
8640 extern int fflush (FILE *__stream);
8642 # 226 "../libio/stdio.h"
8643 extern int fflush_unlocked (FILE *__stream);
8644 # 236 "../libio/stdio.h"
8645 extern int fcloseall (void);
8655 extern FILE *fopen (__const char *__restrict __filename,
8656 __const char *__restrict __modes) ;
8661 extern FILE *freopen (__const char *__restrict __filename,
8662 __const char *__restrict __modes,
8663 FILE *__restrict __stream) ;
8664 # 269 "../libio/stdio.h"
8667 extern FILE *fopen64 (__const char *__restrict __filename,
8668 __const char *__restrict __modes) ;
8669 extern FILE *freopen64 (__const char *__restrict __filename,
8670 __const char *__restrict __modes,
8671 FILE *__restrict __stream) ;
8676 extern FILE *fdopen (int __fd, __const char *__modes) __attribute__ ((__nothrow__)) ;
8682 extern FILE *fopencookie (void *__restrict __magic_cookie,
8683 __const char *__restrict __modes,
8684 _IO_cookie_io_functions_t __io_funcs) __attribute__ ((__nothrow__)) ;
8687 extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes)
8688 __attribute__ ((__nothrow__)) ;
8693 extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __attribute__ ((__nothrow__)) ;
8700 extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__));
8704 extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
8705 int __modes, size_t __n) __attribute__ ((__nothrow__));
8711 extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
8712 size_t __size) __attribute__ ((__nothrow__));
8715 extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__));
8724 extern int fprintf (FILE *__restrict __stream,
8725 __const char *__restrict __format, ...);
8730 extern int printf (__const char *__restrict __format, ...);
8732 extern int sprintf (char *__restrict __s,
8733 __const char *__restrict __format, ...) __attribute__ ((__nothrow__));
8739 extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format,
8740 __gnuc_va_list __arg);
8745 extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg);
8747 extern int vsprintf (char *__restrict __s, __const char *__restrict __format,
8748 __gnuc_va_list __arg) __attribute__ ((__nothrow__));
8754 extern int snprintf (char *__restrict __s, size_t __maxlen,
8755 __const char *__restrict __format, ...)
8756 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4)));
8758 extern int vsnprintf (char *__restrict __s, size_t __maxlen,
8759 __const char *__restrict __format, __gnuc_va_list __arg)
8760 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0)));
8767 extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f,
8768 __gnuc_va_list __arg)
8769 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0))) ;
8770 extern int __asprintf (char **__restrict __ptr,
8771 __const char *__restrict __fmt, ...)
8772 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))) ;
8773 extern int asprintf (char **__restrict __ptr,
8774 __const char *__restrict __fmt, ...)
8775 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))) ;
8783 extern int vdprintf (int __fd, __const char *__restrict __fmt,
8784 __gnuc_va_list __arg)
8785 __attribute__ ((__format__ (__printf__, 2, 0)));
8786 extern int dprintf (int __fd, __const char *__restrict __fmt, ...)
8787 __attribute__ ((__format__ (__printf__, 2, 3)));
8796 extern int fscanf (FILE *__restrict __stream,
8797 __const char *__restrict __format, ...) ;
8802 extern int scanf (__const char *__restrict __format, ...) ;
8804 extern int sscanf (__const char *__restrict __s,
8805 __const char *__restrict __format, ...) __attribute__ ((__nothrow__));
8814 extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format,
8815 __gnuc_va_list __arg)
8816 __attribute__ ((__format__ (__scanf__, 2, 0))) ;
8822 extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg)
8823 __attribute__ ((__format__ (__scanf__, 1, 0))) ;
8826 extern int vsscanf (__const char *__restrict __s,
8827 __const char *__restrict __format, __gnuc_va_list __arg)
8828 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__scanf__, 2, 0)));
8838 extern int fgetc (FILE *__stream);
8839 extern int getc (FILE *__stream);
8845 extern int getchar (void);
8847 # 461 "../libio/stdio.h"
8848 extern int getc_unlocked (FILE *__stream);
8849 extern int getchar_unlocked (void);
8850 # 472 "../libio/stdio.h"
8851 extern int fgetc_unlocked (FILE *__stream);
8863 extern int fputc (int __c, FILE *__stream);
8864 extern int putc (int __c, FILE *__stream);
8870 extern int putchar (int __c);
8872 # 505 "../libio/stdio.h"
8873 extern int fputc_unlocked (int __c, FILE *__stream);
8881 extern int putc_unlocked (int __c, FILE *__stream);
8882 extern int putchar_unlocked (int __c);
8889 extern int getw (FILE *__stream);
8892 extern int putw (int __w, FILE *__stream);
8901 extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
8909 extern char *gets (char *__s) ;
8911 # 551 "../libio/stdio.h"
8912 extern char *fgets_unlocked (char *__restrict __s, int __n,
8913 FILE *__restrict __stream) ;
8914 # 567 "../libio/stdio.h"
8915 extern __ssize_t __getdelim (char **__restrict __lineptr,
8916 size_t *__restrict __n, int __delimiter,
8917 FILE *__restrict __stream) ;
8918 extern __ssize_t getdelim (char **__restrict __lineptr,
8919 size_t *__restrict __n, int __delimiter,
8920 FILE *__restrict __stream) ;
8928 extern __ssize_t getline (char **__restrict __lineptr,
8929 size_t *__restrict __n,
8930 FILE *__restrict __stream) ;
8939 extern int fputs (__const char *__restrict __s, FILE *__restrict __stream);
8945 extern int puts (__const char *__s);
8952 extern int ungetc (int __c, FILE *__stream);
8959 extern size_t fread (void *__restrict __ptr, size_t __size,
8960 size_t __n, FILE *__restrict __stream) ;
8965 extern size_t fwrite (__const void *__restrict __ptr, size_t __size,
8966 size_t __n, FILE *__restrict __s) ;
8968 # 628 "../libio/stdio.h"
8969 extern int fputs_unlocked (__const char *__restrict __s,
8970 FILE *__restrict __stream);
8971 # 639 "../libio/stdio.h"
8972 extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
8973 size_t __n, FILE *__restrict __stream) ;
8974 extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size,
8975 size_t __n, FILE *__restrict __stream) ;
8984 extern int fseek (FILE *__stream, long int __off, int __whence);
8989 extern long int ftell (FILE *__stream) ;
8994 extern void rewind (FILE *__stream);
8996 # 675 "../libio/stdio.h"
8997 extern int fseeko (FILE *__stream, __off_t __off, int __whence);
9002 extern __off_t ftello (FILE *__stream) ;
9003 # 694 "../libio/stdio.h"
9010 extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos);
9015 extern int fsetpos (FILE *__stream, __const fpos_t *__pos);
9016 # 717 "../libio/stdio.h"
9020 extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence);
9021 extern __off64_t ftello64 (FILE *__stream) ;
9022 extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos);
9023 extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos);
9028 extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__));
9030 extern int feof (FILE *__stream) __attribute__ ((__nothrow__)) ;
9032 extern int ferror (FILE *__stream) __attribute__ ((__nothrow__)) ;
9037 extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__));
9038 extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ;
9039 extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ;
9048 extern void perror (__const char *__s);
9055 # 1 "../sysdeps/unix/sysv/linux/bits/sys_errlist.h" 1
9056 # 27 "../sysdeps/unix/sysv/linux/bits/sys_errlist.h"
9057 extern int sys_nerr;
9058 extern __const char *__const sys_errlist[];
9061 extern int _sys_nerr;
9062 extern __const char *__const _sys_errlist[];
9063 # 756 "../libio/stdio.h" 2
9068 extern int fileno (FILE *__stream) __attribute__ ((__nothrow__)) ;
9073 extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ;
9074 # 775 "../libio/stdio.h"
9075 extern FILE *popen (__const char *__command, __const char *__modes) ;
9081 extern int pclose (FILE *__stream);
9087 extern char *ctermid (char *__s) __attribute__ ((__nothrow__));
9093 extern char *cuserid (char *__s);
9101 extern int obstack_printf (struct obstack *__restrict __obstack,
9102 __const char *__restrict __format, ...)
9103 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3)));
9104 extern int obstack_vprintf (struct obstack *__restrict __obstack,
9105 __const char *__restrict __format,
9106 __gnuc_va_list __args)
9107 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0)));
9115 extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__));
9119 extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__)) ;
9122 extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__));
9123 # 836 "../libio/stdio.h"
9124 # 1 "../libio/bits/stdio.h" 1
9125 # 33 "../libio/bits/stdio.h"
9127 vprintf (__const char *__restrict __fmt, __gnuc_va_list __arg)
9129 return vfprintf (stdout, __fmt, __arg);
9136 return _IO_getc (stdin);
9143 getc_unlocked (FILE *__fp)
9145 return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++);
9150 getchar_unlocked (void)
9152 return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++);
9161 return _IO_putc (__c, stdout);
9168 fputc_unlocked (int __c, FILE *__stream)
9170 return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
9178 putc_unlocked (int __c, FILE *__stream)
9180 return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
9185 putchar_unlocked (int __c)
9187 return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c)));
9194 extern __inline __ssize_t
9195 getline (char **__lineptr, size_t *__n, FILE *__stream)
9197 return __getdelim (__lineptr, __n, '\n', __stream);
9205 __attribute__ ((__nothrow__)) feof_unlocked (FILE *__stream)
9207 return (((__stream)->_flags & 0x10) != 0);
9212 __attribute__ ((__nothrow__)) ferror_unlocked (FILE *__stream)
9214 return (((__stream)->_flags & 0x20) != 0);
9216 # 837 "../libio/stdio.h" 2
9217 # 845 "../libio/stdio.h"
9219 # 6 "../include/stdio.h" 2
9222 extern int __fcloseall (void);
9223 extern int __snprintf (char *__restrict __s, size_t __maxlen,
9224 __const char *__restrict __format, ...)
9225 __attribute__ ((__format__ (__printf__, 3, 4)));
9226 extern int __vsnprintf (char *__restrict __s, size_t __maxlen,
9227 __const char *__restrict __format, __gnuc_va_list __arg)
9228 __attribute__ ((__format__ (__printf__, 3, 0)));
9229 extern int __vfscanf (FILE *__restrict __s,
9230 __const char *__restrict __format,
9231 __gnuc_va_list __arg)
9232 __attribute__ ((__format__ (__scanf__, 2, 0)));
9234 extern int __vscanf (__const char *__restrict __format,
9235 __gnuc_va_list __arg)
9236 __attribute__ ((__format__ (__scanf__, 1, 0)));
9237 extern __ssize_t __getline (char **__lineptr, size_t *__n,
9239 extern int __vsscanf (__const char *__restrict __s,
9240 __const char *__restrict __format,
9241 __gnuc_va_list __arg)
9242 __attribute__ ((__format__ (__scanf__, 2, 0)));
9244 extern int __sprintf_chk (char *, int, size_t, const char *, ...) __attribute__ ((__nothrow__));
9245 extern int __snprintf_chk (char *, size_t, int, size_t, const char *, ...)
9246 __attribute__ ((__nothrow__));
9247 extern int __vsprintf_chk (char *, int, size_t, const char *,
9248 __gnuc_va_list) __attribute__ ((__nothrow__));
9249 extern int __vsnprintf_chk (char *, size_t, int, size_t, const char *,
9250 __gnuc_va_list) __attribute__ ((__nothrow__));
9251 extern int __printf_chk (int, const char *, ...);
9252 extern int __fprintf_chk (FILE *, int, const char *, ...);
9253 extern int __vprintf_chk (int, const char *, __gnuc_va_list);
9254 extern int __vfprintf_chk (FILE *, int, const char *, __gnuc_va_list);
9255 extern char *__fgets_unlocked_chk (char *buf, size_t size, int n, FILE *fp);
9256 extern char *__fgets_chk (char *buf, size_t size, int n, FILE *fp);
9259 extern FILE *__new_tmpfile (void);
9260 extern FILE *__old_tmpfile (void);
9265 # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4
9266 # 52 "../include/stdio.h" 2
9268 extern int __path_search (char *__tmpl, size_t __tmpl_len,
9269 __const char *__dir, __const char *__pfx,
9272 extern int __gen_tempname (char *__tmpl, int __kind);
9280 extern void __libc_fatal (__const char *__message)
9281 __attribute__ ((__noreturn__));
9282 extern void __libc_message (int do_abort, __const char *__fnt, ...);
9285 extern void __flockfile (FILE *__stream);
9288 extern void __funlockfile (FILE *__stream);
9292 extern int __ftrylockfile (FILE *__stream);
9294 extern int __getc_unlocked (FILE *__fp);
9295 extern wint_t __getwc_unlocked (FILE *__fp);
9297 extern int __fxprintf (FILE *__fp, const char *__fmt, ...)
9298 __attribute__ ((__format__ (__printf__, 2, 3)));
9300 extern __const char *__const _sys_errlist_internal[] ;
9301 extern int _sys_nerr_internal ;
9303 extern int __asprintf_internal (char **__restrict __ptr,
9304 __const char *__restrict __fmt, ...)
9305 __attribute__ ((__format__ (__printf__, 2, 3)));
9310 extern _IO_FILE *_IO_new_fopen (const char*, const char*);
9312 extern _IO_FILE *_IO_new_fdopen (int, const char*);
9314 extern int _IO_new_fclose (_IO_FILE*);
9316 extern int _IO_fputs (const char*, _IO_FILE*);
9319 extern int _IO_new_fsetpos (_IO_FILE *, const _G_fpos_t *);
9321 extern int _IO_new_fgetpos (_IO_FILE *, _G_fpos_t *);
9347 # 27 "regex_internal.h" 2
9349 # 1 "../include/string.h" 1
9352 # 1 "../include/sys/types.h" 1
9353 # 4 "../include/string.h" 2
9355 extern void *__memccpy (void *__dest, __const void *__src,
9356 int __c, size_t __n);
9358 extern size_t __strnlen (__const char *__string, size_t __maxlen)
9359 __attribute__ ((__pure__));
9361 extern char *__strsep (char **__stringp, __const char *__delim);
9363 extern int __strverscmp (__const char *__s1, __const char *__s2)
9364 __attribute__ ((__pure__));
9366 extern int __strncasecmp (__const char *__s1, __const char *__s2,
9368 __attribute__ ((__pure__));
9370 extern int __strcasecmp (__const char *__s1, __const char *__s2)
9371 __attribute__ ((__pure__));
9373 extern char *__strcasestr (__const char *__haystack, __const char *__needle)
9374 __attribute__ ((__pure__));
9376 extern char *__strdup (__const char *__string)
9377 __attribute__ ((__malloc__));
9378 extern char *__strndup (__const char *__string, size_t __n)
9379 __attribute__ ((__malloc__));
9381 extern void *__rawmemchr (__const void *__s, int __c)
9382 __attribute__ ((__pure__));
9384 extern char *__strchrnul (__const char *__s, int __c)
9385 __attribute__ ((__pure__));
9387 extern void *__memrchr (__const void *__s, int __c, size_t __n)
9388 __attribute__ ((__pure__));
9390 extern void *__memchr (__const void *__s, int __c, size_t __n)
9391 __attribute__ ((__pure__));
9393 extern int __ffs (int __i) __attribute__ ((const));
9395 extern char *__strerror_r (int __errnum, char *__buf, size_t __buflen);
9399 # 1 "../string/string.h" 1
9400 # 28 "../string/string.h"
9406 # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4
9407 # 34 "../string/string.h" 2
9412 extern void *memcpy (void *__restrict __dest,
9413 __const void *__restrict __src, size_t __n)
9414 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
9417 extern void *memmove (void *__dest, __const void *__src, size_t __n)
9418 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
9425 extern void *memccpy (void *__restrict __dest, __const void *__restrict __src,
9426 int __c, size_t __n)
9427 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
9433 extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
9436 extern int memcmp (__const void *__s1, __const void *__s2, size_t __n)
9437 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
9440 extern void *memchr (__const void *__s, int __c, size_t __n)
9441 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
9447 extern void *rawmemchr (__const void *__s, int __c)
9448 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
9451 extern void *memrchr (__const void *__s, int __c, size_t __n)
9452 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
9458 extern char *strcpy (char *__restrict __dest, __const char *__restrict __src)
9459 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
9461 extern char *strncpy (char *__restrict __dest,
9462 __const char *__restrict __src, size_t __n)
9463 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
9466 extern char *strcat (char *__restrict __dest, __const char *__restrict __src)
9467 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
9469 extern char *strncat (char *__restrict __dest, __const char *__restrict __src,
9470 size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
9473 extern int strcmp (__const char *__s1, __const char *__s2)
9474 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
9476 extern int strncmp (__const char *__s1, __const char *__s2, size_t __n)
9477 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
9480 extern int strcoll (__const char *__s1, __const char *__s2)
9481 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
9483 extern size_t strxfrm (char *__restrict __dest,
9484 __const char *__restrict __src, size_t __n)
9485 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
9492 # 1 "../include/xlocale.h" 1
9493 # 119 "../string/string.h" 2
9496 extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l)
9497 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
9499 extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n,
9500 __locale_t __l) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4)));
9505 extern char *strdup (__const char *__s)
9506 __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
9513 extern char *strndup (__const char *__string, size_t __n)
9514 __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
9515 # 165 "../string/string.h"
9518 extern char *strchr (__const char *__s, int __c)
9519 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
9521 extern char *strrchr (__const char *__s, int __c)
9522 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
9528 extern char *strchrnul (__const char *__s, int __c)
9529 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
9535 extern size_t strcspn (__const char *__s, __const char *__reject)
9536 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
9539 extern size_t strspn (__const char *__s, __const char *__accept)
9540 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
9542 extern char *strpbrk (__const char *__s, __const char *__accept)
9543 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
9545 extern char *strstr (__const char *__haystack, __const char *__needle)
9546 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
9550 extern char *strtok (char *__restrict __s, __const char *__restrict __delim)
9551 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
9556 extern char *__strtok_r (char *__restrict __s,
9557 __const char *__restrict __delim,
9558 char **__restrict __save_ptr)
9559 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));
9561 extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim,
9562 char **__restrict __save_ptr)
9563 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));
9568 extern char *strcasestr (__const char *__haystack, __const char *__needle)
9569 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
9576 extern void *memmem (__const void *__haystack, size_t __haystacklen,
9577 __const void *__needle, size_t __needlelen)
9578 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3)));
9582 extern void *__mempcpy (void *__restrict __dest,
9583 __const void *__restrict __src, size_t __n)
9584 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
9585 extern void *mempcpy (void *__restrict __dest,
9586 __const void *__restrict __src, size_t __n)
9587 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
9593 extern size_t strlen (__const char *__s)
9594 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
9600 extern size_t strnlen (__const char *__string, size_t __maxlen)
9601 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
9607 extern char *strerror (int __errnum) __attribute__ ((__nothrow__));
9609 # 281 "../string/string.h"
9610 extern char *strerror_r (int __errnum, char *__buf, size_t __buflen)
9611 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
9617 extern void __bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
9621 extern void bcopy (__const void *__src, void *__dest, size_t __n)
9622 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
9625 extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
9628 extern int bcmp (__const void *__s1, __const void *__s2, size_t __n)
9629 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
9632 extern char *index (__const char *__s, int __c)
9633 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
9636 extern char *rindex (__const char *__s, int __c)
9637 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
9641 extern int ffs (int __i) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
9646 extern int ffsl (long int __l) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
9648 __extension__ extern int ffsll (long long int __ll)
9649 __attribute__ ((__nothrow__)) __attribute__ ((__const__));
9654 extern int strcasecmp (__const char *__s1, __const char *__s2)
9655 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
9658 extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n)
9659 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
9665 extern int strcasecmp_l (__const char *__s1, __const char *__s2,
9667 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
9669 extern int strncasecmp_l (__const char *__s1, __const char *__s2,
9670 size_t __n, __locale_t __loc)
9671 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4)));
9677 extern char *strsep (char **__restrict __stringp,
9678 __const char *__restrict __delim)
9679 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
9684 extern int strverscmp (__const char *__s1, __const char *__s2)
9685 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
9688 extern char *strsignal (int __sig) __attribute__ ((__nothrow__));
9691 extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src)
9692 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
9693 extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src)
9694 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
9698 extern char *__stpncpy (char *__restrict __dest,
9699 __const char *__restrict __src, size_t __n)
9700 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
9701 extern char *stpncpy (char *__restrict __dest,
9702 __const char *__restrict __src, size_t __n)
9703 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
9706 extern char *strfry (char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
9709 extern void *memfrob (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
9716 extern char *basename (__const char *__filename) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
9717 # 414 "../string/string.h"
9718 # 1 "../bits/string.h" 1
9719 # 415 "../string/string.h" 2
9722 # 1 "../include/bits/string2.h" 1
9723 # 1 "../string/bits/string2.h" 1
9724 # 80 "../string/bits/string2.h"
9725 typedef struct { unsigned char __arr[2]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR2;
9726 typedef struct { unsigned char __arr[3]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR3;
9727 typedef struct { unsigned char __arr[4]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR4;
9728 typedef struct { unsigned char __arr[5]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR5;
9729 typedef struct { unsigned char __arr[6]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR6;
9730 typedef struct { unsigned char __arr[7]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR7;
9731 typedef struct { unsigned char __arr[8]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR8;
9732 # 394 "../string/bits/string2.h"
9733 extern void *__rawmemchr (const void *__s, int __c);
9734 # 969 "../string/bits/string2.h"
9735 extern __inline size_t __strcspn_c1 (__const char *__s, int __reject);
9736 extern __inline size_t
9737 __strcspn_c1 (__const char *__s, int __reject)
9739 register size_t __result = 0;
9740 while (__s[__result] != '\0' && __s[__result] != __reject)
9745 extern __inline size_t __strcspn_c2 (__const char *__s, int __reject1,
9747 extern __inline size_t
9748 __strcspn_c2 (__const char *__s, int __reject1, int __reject2)
9750 register size_t __result = 0;
9751 while (__s[__result] != '\0' && __s[__result] != __reject1
9752 && __s[__result] != __reject2)
9757 extern __inline size_t __strcspn_c3 (__const char *__s, int __reject1,
9758 int __reject2, int __reject3);
9759 extern __inline size_t
9760 __strcspn_c3 (__const char *__s, int __reject1, int __reject2,
9763 register size_t __result = 0;
9764 while (__s[__result] != '\0' && __s[__result] != __reject1
9765 && __s[__result] != __reject2 && __s[__result] != __reject3)
9769 # 1045 "../string/bits/string2.h"
9770 extern __inline size_t __strspn_c1 (__const char *__s, int __accept);
9771 extern __inline size_t
9772 __strspn_c1 (__const char *__s, int __accept)
9774 register size_t __result = 0;
9776 while (__s[__result] == __accept)
9781 extern __inline size_t __strspn_c2 (__const char *__s, int __accept1,
9783 extern __inline size_t
9784 __strspn_c2 (__const char *__s, int __accept1, int __accept2)
9786 register size_t __result = 0;
9788 while (__s[__result] == __accept1 || __s[__result] == __accept2)
9793 extern __inline size_t __strspn_c3 (__const char *__s, int __accept1,
9794 int __accept2, int __accept3);
9795 extern __inline size_t
9796 __strspn_c3 (__const char *__s, int __accept1, int __accept2, int __accept3)
9798 register size_t __result = 0;
9800 while (__s[__result] == __accept1 || __s[__result] == __accept2
9801 || __s[__result] == __accept3)
9805 # 1121 "../string/bits/string2.h"
9806 extern __inline char *__strpbrk_c2 (__const char *__s, int __accept1,
9808 extern __inline char *
9809 __strpbrk_c2 (__const char *__s, int __accept1, int __accept2)
9812 while (*__s != '\0' && *__s != __accept1 && *__s != __accept2)
9814 return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s;
9817 extern __inline char *__strpbrk_c3 (__const char *__s, int __accept1,
9818 int __accept2, int __accept3);
9819 extern __inline char *
9820 __strpbrk_c3 (__const char *__s, int __accept1, int __accept2,
9824 while (*__s != '\0' && *__s != __accept1 && *__s != __accept2
9825 && *__s != __accept3)
9827 return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s;
9829 # 1173 "../string/bits/string2.h"
9830 extern __inline char *__strtok_r_1c (char *__s, char __sep, char **__nextp);
9831 extern __inline char *
9832 __strtok_r_1c (char *__s, char __sep, char **__nextp)
9835 if (__s == ((void *)0))
9837 while (*__s == __sep)
9839 __result = ((void *)0);
9843 while (*__s != '\0')
9844 if (*__s++ == __sep)
9853 # 1205 "../string/bits/string2.h"
9854 extern char *__strsep_g (char **__stringp, __const char *__delim);
9855 # 1223 "../string/bits/string2.h"
9856 extern __inline char *__strsep_1c (char **__s, char __reject);
9857 extern __inline char *
9858 __strsep_1c (char **__s, char __reject)
9860 register char *__retval = *__s;
9861 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))
9866 extern __inline char *__strsep_2c (char **__s, char __reject1, char __reject2);
9867 extern __inline char *
9868 __strsep_2c (char **__s, char __reject1, char __reject2)
9870 register char *__retval = *__s;
9871 if (__retval != ((void *)0))
9873 register char *__cp = __retval;
9881 if (*__cp == __reject1 || *__cp == __reject2)
9893 extern __inline char *__strsep_3c (char **__s, char __reject1, char __reject2,
9895 extern __inline char *
9896 __strsep_3c (char **__s, char __reject1, char __reject2, char __reject3)
9898 register char *__retval = *__s;
9899 if (__retval != ((void *)0))
9901 register char *__cp = __retval;
9909 if (*__cp == __reject1 || *__cp == __reject2 || *__cp == __reject3)
9920 # 1304 "../string/bits/string2.h"
9921 extern char *__strdup (__const char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__));
9922 # 1323 "../string/bits/string2.h"
9923 extern char *__strndup (__const char *__string, size_t __n)
9924 __attribute__ ((__nothrow__)) __attribute__ ((__malloc__));
9925 # 1 "../include/bits/string2.h" 2
9926 # 418 "../string/string.h" 2
9927 # 426 "../string/string.h"
9929 # 50 "../include/string.h" 2
9931 extern __typeof (strcoll_l) __strcoll_l;
9932 extern __typeof (strxfrm_l) __strxfrm_l;
9933 extern __typeof (strcasecmp_l) __strcasecmp_l;
9934 extern __typeof (strncasecmp_l) __strncasecmp_l;
9935 # 70 "../include/string.h"
9952 extern char *__strsep_g (char **__stringp, __const char *__delim);
9976 # 120 "../include/string.h"
9977 extern void *__memcpy_chk (void *__restrict __dest,
9978 const void *__restrict __src, size_t __len,
9979 size_t __destlen) __attribute__ ((__nothrow__));
9980 extern void *__memmove_chk (void *__dest, const void *__src, size_t __len,
9981 size_t __destlen) __attribute__ ((__nothrow__));
9982 extern void *__mempcpy_chk (void *__restrict __dest,
9983 const void *__restrict __src, size_t __len,
9984 size_t __destlen) __attribute__ ((__nothrow__));
9985 extern void *__memset_chk (void *__dest, int __ch, size_t __len,
9986 size_t __destlen) __attribute__ ((__nothrow__));
9987 extern char *__strcpy_chk (char *__restrict __dest,
9988 const char *__restrict __src,
9989 size_t __destlen) __attribute__ ((__nothrow__));
9990 extern char *__stpcpy_chk (char *__restrict __dest,
9991 const char *__restrict __src,
9992 size_t __destlen) __attribute__ ((__nothrow__));
9993 extern char *__strncpy_chk (char *__restrict __dest,
9994 const char *__restrict __src,
9995 size_t __len, size_t __destlen) __attribute__ ((__nothrow__));
9996 extern char *__strcat_chk (char *__restrict __dest,
9997 const char *__restrict __src,
9998 size_t __destlen) __attribute__ ((__nothrow__));
9999 extern char *__strncat_chk (char *__restrict __dest,
10000 const char *__restrict __src,
10001 size_t __len, size_t __destlen) __attribute__ ((__nothrow__));
10002 # 29 "regex_internal.h" 2
10003 # 37 "regex_internal.h"
10004 # 1 "../include/wchar.h" 1
10006 # 1 "../wcsmbs/wchar.h" 1
10007 # 40 "../wcsmbs/wchar.h"
10008 # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stdarg.h" 1 3 4
10009 # 41 "../wcsmbs/wchar.h" 2
10017 # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4
10018 # 49 "../wcsmbs/wchar.h" 2
10019 # 93 "../wcsmbs/wchar.h"
10022 typedef __mbstate_t mbstate_t;
10026 # 118 "../wcsmbs/wchar.h"
10042 extern wchar_t *wcscpy (wchar_t *__restrict __dest,
10043 __const wchar_t *__restrict __src) __attribute__ ((__nothrow__));
10045 extern wchar_t *wcsncpy (wchar_t *__restrict __dest,
10046 __const wchar_t *__restrict __src, size_t __n)
10047 __attribute__ ((__nothrow__));
10050 extern wchar_t *wcscat (wchar_t *__restrict __dest,
10051 __const wchar_t *__restrict __src) __attribute__ ((__nothrow__));
10053 extern wchar_t *wcsncat (wchar_t *__restrict __dest,
10054 __const wchar_t *__restrict __src, size_t __n)
10055 __attribute__ ((__nothrow__));
10058 extern int wcscmp (__const wchar_t *__s1, __const wchar_t *__s2)
10059 __attribute__ ((__nothrow__)) __attribute__ ((__pure__));
10061 extern int wcsncmp (__const wchar_t *__s1, __const wchar_t *__s2, size_t __n)
10062 __attribute__ ((__nothrow__)) __attribute__ ((__pure__));
10067 extern int wcscasecmp (__const wchar_t *__s1, __const wchar_t *__s2) __attribute__ ((__nothrow__));
10070 extern int wcsncasecmp (__const wchar_t *__s1, __const wchar_t *__s2,
10071 size_t __n) __attribute__ ((__nothrow__));
10075 # 1 "../include/xlocale.h" 1
10076 # 167 "../wcsmbs/wchar.h" 2
10078 extern int wcscasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2,
10079 __locale_t __loc) __attribute__ ((__nothrow__));
10081 extern int wcsncasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2,
10082 size_t __n, __locale_t __loc) __attribute__ ((__nothrow__));
10088 extern int wcscoll (__const wchar_t *__s1, __const wchar_t *__s2) __attribute__ ((__nothrow__));
10092 extern size_t wcsxfrm (wchar_t *__restrict __s1,
10093 __const wchar_t *__restrict __s2, size_t __n) __attribute__ ((__nothrow__));
10102 extern int wcscoll_l (__const wchar_t *__s1, __const wchar_t *__s2,
10103 __locale_t __loc) __attribute__ ((__nothrow__));
10108 extern size_t wcsxfrm_l (wchar_t *__s1, __const wchar_t *__s2,
10109 size_t __n, __locale_t __loc) __attribute__ ((__nothrow__));
10112 extern wchar_t *wcsdup (__const wchar_t *__s) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__));
10117 extern wchar_t *wcschr (__const wchar_t *__wcs, wchar_t __wc)
10118 __attribute__ ((__nothrow__)) __attribute__ ((__pure__));
10120 extern wchar_t *wcsrchr (__const wchar_t *__wcs, wchar_t __wc)
10121 __attribute__ ((__nothrow__)) __attribute__ ((__pure__));
10127 extern wchar_t *wcschrnul (__const wchar_t *__s, wchar_t __wc)
10128 __attribute__ ((__nothrow__)) __attribute__ ((__pure__));
10134 extern size_t wcscspn (__const wchar_t *__wcs, __const wchar_t *__reject)
10135 __attribute__ ((__nothrow__)) __attribute__ ((__pure__));
10138 extern size_t wcsspn (__const wchar_t *__wcs, __const wchar_t *__accept)
10139 __attribute__ ((__nothrow__)) __attribute__ ((__pure__));
10141 extern wchar_t *wcspbrk (__const wchar_t *__wcs, __const wchar_t *__accept)
10142 __attribute__ ((__nothrow__)) __attribute__ ((__pure__));
10144 extern wchar_t *wcsstr (__const wchar_t *__haystack, __const wchar_t *__needle)
10145 __attribute__ ((__nothrow__)) __attribute__ ((__pure__));
10148 extern wchar_t *wcstok (wchar_t *__restrict __s,
10149 __const wchar_t *__restrict __delim,
10150 wchar_t **__restrict __ptr) __attribute__ ((__nothrow__));
10153 extern size_t wcslen (__const wchar_t *__s) __attribute__ ((__nothrow__)) __attribute__ ((__pure__));
10158 extern wchar_t *wcswcs (__const wchar_t *__haystack, __const wchar_t *__needle)
10159 __attribute__ ((__nothrow__)) __attribute__ ((__pure__));
10164 extern size_t wcsnlen (__const wchar_t *__s, size_t __maxlen)
10165 __attribute__ ((__nothrow__)) __attribute__ ((__pure__));
10171 extern wchar_t *wmemchr (__const wchar_t *__s, wchar_t __c, size_t __n)
10172 __attribute__ ((__nothrow__)) __attribute__ ((__pure__));
10175 extern int wmemcmp (__const wchar_t *__restrict __s1,
10176 __const wchar_t *__restrict __s2, size_t __n)
10177 __attribute__ ((__nothrow__)) __attribute__ ((__pure__));
10180 extern wchar_t *wmemcpy (wchar_t *__restrict __s1,
10181 __const wchar_t *__restrict __s2, size_t __n) __attribute__ ((__nothrow__));
10185 extern wchar_t *wmemmove (wchar_t *__s1, __const wchar_t *__s2, size_t __n)
10186 __attribute__ ((__nothrow__));
10189 extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __attribute__ ((__nothrow__));
10195 extern wchar_t *wmempcpy (wchar_t *__restrict __s1,
10196 __const wchar_t *__restrict __s2, size_t __n)
10197 __attribute__ ((__nothrow__));
10204 extern wint_t btowc (int __c) __attribute__ ((__nothrow__));
10208 extern int wctob (wint_t __c) __attribute__ ((__nothrow__));
10212 extern int mbsinit (__const mbstate_t *__ps) __attribute__ ((__nothrow__)) __attribute__ ((__pure__));
10216 extern size_t mbrtowc (wchar_t *__restrict __pwc,
10217 __const char *__restrict __s, size_t __n,
10218 mbstate_t *__p) __attribute__ ((__nothrow__));
10221 extern size_t wcrtomb (char *__restrict __s, wchar_t __wc,
10222 mbstate_t *__restrict __ps) __attribute__ ((__nothrow__));
10225 extern size_t __mbrlen (__const char *__restrict __s, size_t __n,
10226 mbstate_t *__restrict __ps) __attribute__ ((__nothrow__));
10227 extern size_t mbrlen (__const char *__restrict __s, size_t __n,
10228 mbstate_t *__restrict __ps) __attribute__ ((__nothrow__));
10230 # 328 "../wcsmbs/wchar.h"
10231 extern wint_t __btowc_alias (int __c) __asm ("btowc");
10232 extern __inline wint_t
10233 __attribute__ ((__nothrow__)) btowc (int __c)
10234 { return (__builtin_constant_p (__c) && __c >= '\0' && __c <= '\x7f'
10235 ? (wint_t) __c : __btowc_alias (__c)); }
10237 extern int __wctob_alias (wint_t __c) __asm ("wctob");
10238 extern __inline int
10239 __attribute__ ((__nothrow__)) wctob (wint_t __wc)
10240 { return (__builtin_constant_p (__wc) && __wc >= L'\0' && __wc <= L'\x7f'
10241 ? (int) __wc : __wctob_alias (__wc)); }
10244 extern __inline size_t
10245 __attribute__ ((__nothrow__)) mbrlen (__const char *__restrict __s, size_t __n, mbstate_t *__restrict __ps)
10247 { return (__ps != ((void *)0)
10248 ? mbrtowc (((void *)0), __s, __n, __ps) : __mbrlen (__s, __n, ((void *)0))); }
10254 extern size_t mbsrtowcs (wchar_t *__restrict __dst,
10255 __const char **__restrict __src, size_t __len,
10256 mbstate_t *__restrict __ps) __attribute__ ((__nothrow__));
10260 extern size_t wcsrtombs (char *__restrict __dst,
10261 __const wchar_t **__restrict __src, size_t __len,
10262 mbstate_t *__restrict __ps) __attribute__ ((__nothrow__));
10269 extern size_t mbsnrtowcs (wchar_t *__restrict __dst,
10270 __const char **__restrict __src, size_t __nmc,
10271 size_t __len, mbstate_t *__restrict __ps) __attribute__ ((__nothrow__));
10275 extern size_t wcsnrtombs (char *__restrict __dst,
10276 __const wchar_t **__restrict __src,
10277 size_t __nwc, size_t __len,
10278 mbstate_t *__restrict __ps) __attribute__ ((__nothrow__));
10285 extern int wcwidth (wchar_t __c) __attribute__ ((__nothrow__));
10289 extern int wcswidth (__const wchar_t *__s, size_t __n) __attribute__ ((__nothrow__));
10296 extern double wcstod (__const wchar_t *__restrict __nptr,
10297 wchar_t **__restrict __endptr) __attribute__ ((__nothrow__));
10301 extern float wcstof (__const wchar_t *__restrict __nptr,
10302 wchar_t **__restrict __endptr) __attribute__ ((__nothrow__));
10303 extern long double wcstold (__const wchar_t *__restrict __nptr,
10304 wchar_t **__restrict __endptr) __attribute__ ((__nothrow__));
10310 extern long int wcstol (__const wchar_t *__restrict __nptr,
10311 wchar_t **__restrict __endptr, int __base) __attribute__ ((__nothrow__));
10315 extern unsigned long int wcstoul (__const wchar_t *__restrict __nptr,
10316 wchar_t **__restrict __endptr, int __base)
10317 __attribute__ ((__nothrow__));
10323 extern long long int wcstoll (__const wchar_t *__restrict __nptr,
10324 wchar_t **__restrict __endptr, int __base)
10325 __attribute__ ((__nothrow__));
10330 extern unsigned long long int wcstoull (__const wchar_t *__restrict __nptr,
10331 wchar_t **__restrict __endptr,
10332 int __base) __attribute__ ((__nothrow__));
10340 extern long long int wcstoq (__const wchar_t *__restrict __nptr,
10341 wchar_t **__restrict __endptr, int __base)
10342 __attribute__ ((__nothrow__));
10347 extern unsigned long long int wcstouq (__const wchar_t *__restrict __nptr,
10348 wchar_t **__restrict __endptr,
10349 int __base) __attribute__ ((__nothrow__));
10350 # 463 "../wcsmbs/wchar.h"
10351 # 1 "../include/xlocale.h" 1
10352 # 464 "../wcsmbs/wchar.h" 2
10356 extern long int wcstol_l (__const wchar_t *__restrict __nptr,
10357 wchar_t **__restrict __endptr, int __base,
10358 __locale_t __loc) __attribute__ ((__nothrow__));
10360 extern unsigned long int wcstoul_l (__const wchar_t *__restrict __nptr,
10361 wchar_t **__restrict __endptr,
10362 int __base, __locale_t __loc) __attribute__ ((__nothrow__));
10365 extern long long int wcstoll_l (__const wchar_t *__restrict __nptr,
10366 wchar_t **__restrict __endptr,
10367 int __base, __locale_t __loc) __attribute__ ((__nothrow__));
10370 extern unsigned long long int wcstoull_l (__const wchar_t *__restrict __nptr,
10371 wchar_t **__restrict __endptr,
10372 int __base, __locale_t __loc)
10373 __attribute__ ((__nothrow__));
10375 extern double wcstod_l (__const wchar_t *__restrict __nptr,
10376 wchar_t **__restrict __endptr, __locale_t __loc)
10377 __attribute__ ((__nothrow__));
10379 extern float wcstof_l (__const wchar_t *__restrict __nptr,
10380 wchar_t **__restrict __endptr, __locale_t __loc)
10381 __attribute__ ((__nothrow__));
10383 extern long double wcstold_l (__const wchar_t *__restrict __nptr,
10384 wchar_t **__restrict __endptr,
10385 __locale_t __loc) __attribute__ ((__nothrow__));
10391 extern double __wcstod_internal (__const wchar_t *__restrict __nptr,
10392 wchar_t **__restrict __endptr, int __group)
10393 __attribute__ ((__nothrow__));
10394 extern float __wcstof_internal (__const wchar_t *__restrict __nptr,
10395 wchar_t **__restrict __endptr, int __group)
10396 __attribute__ ((__nothrow__));
10397 extern long double __wcstold_internal (__const wchar_t *__restrict __nptr,
10398 wchar_t **__restrict __endptr,
10399 int __group) __attribute__ ((__nothrow__));
10403 extern long int __wcstol_internal (__const wchar_t *__restrict __nptr,
10404 wchar_t **__restrict __endptr,
10405 int __base, int __group) __attribute__ ((__nothrow__));
10410 extern unsigned long int __wcstoul_internal (__const wchar_t *__restrict __npt,
10411 wchar_t **__restrict __endptr,
10412 int __base, int __group) __attribute__ ((__nothrow__));
10413 # 549 "../wcsmbs/wchar.h"
10416 extern __inline double
10417 __attribute__ ((__nothrow__)) wcstod (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr)
10419 { return __wcstod_internal (__nptr, __endptr, 0); }
10420 extern __inline long int
10421 __attribute__ ((__nothrow__)) wcstol (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base)
10423 { return __wcstol_internal (__nptr, __endptr, __base, 0); }
10424 extern __inline unsigned long int
10425 __attribute__ ((__nothrow__)) wcstoul (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base)
10427 { return __wcstoul_internal (__nptr, __endptr, __base, 0); }
10431 extern __inline float
10432 __attribute__ ((__nothrow__)) wcstof (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr)
10434 { return __wcstof_internal (__nptr, __endptr, 0); }
10436 extern __inline long double
10437 __attribute__ ((__nothrow__)) wcstold (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr)
10439 { return __wcstold_internal (__nptr, __endptr, 0); }
10442 extern __inline long long int
10443 __attribute__ ((__nothrow__)) wcstoq (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base)
10445 { return __wcstoll_internal (__nptr, __endptr, __base, 0); }
10447 extern __inline unsigned long long int
10448 __attribute__ ((__nothrow__)) wcstouq (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base)
10450 { return __wcstoull_internal (__nptr, __endptr, __base, 0); }
10458 extern wchar_t *wcpcpy (wchar_t *__dest, __const wchar_t *__src) __attribute__ ((__nothrow__));
10462 extern wchar_t *wcpncpy (wchar_t *__dest, __const wchar_t *__src, size_t __n)
10463 __attribute__ ((__nothrow__));
10464 # 607 "../wcsmbs/wchar.h"
10465 extern __FILE *open_wmemstream (wchar_t **__bufloc, size_t *__sizeloc) __attribute__ ((__nothrow__));
10472 extern int fwide (__FILE *__fp, int __mode) __attribute__ ((__nothrow__));
10479 extern int fwprintf (__FILE *__restrict __stream,
10480 __const wchar_t *__restrict __format, ...)
10486 extern int wprintf (__const wchar_t *__restrict __format, ...)
10489 extern int swprintf (wchar_t *__restrict __s, size_t __n,
10490 __const wchar_t *__restrict __format, ...)
10491 __attribute__ ((__nothrow__)) ;
10497 extern int vfwprintf (__FILE *__restrict __s,
10498 __const wchar_t *__restrict __format,
10499 __gnuc_va_list __arg)
10505 extern int vwprintf (__const wchar_t *__restrict __format,
10506 __gnuc_va_list __arg)
10510 extern int vswprintf (wchar_t *__restrict __s, size_t __n,
10511 __const wchar_t *__restrict __format,
10512 __gnuc_va_list __arg)
10513 __attribute__ ((__nothrow__)) ;
10520 extern int fwscanf (__FILE *__restrict __stream,
10521 __const wchar_t *__restrict __format, ...)
10527 extern int wscanf (__const wchar_t *__restrict __format, ...)
10530 extern int swscanf (__const wchar_t *__restrict __s,
10531 __const wchar_t *__restrict __format, ...)
10532 __attribute__ ((__nothrow__)) ;
10544 extern int vfwscanf (__FILE *__restrict __s,
10545 __const wchar_t *__restrict __format,
10546 __gnuc_va_list __arg)
10552 extern int vwscanf (__const wchar_t *__restrict __format,
10553 __gnuc_va_list __arg)
10556 extern int vswscanf (__const wchar_t *__restrict __s,
10557 __const wchar_t *__restrict __format,
10558 __gnuc_va_list __arg)
10559 __attribute__ ((__nothrow__)) ;
10570 extern wint_t fgetwc (__FILE *__stream);
10571 extern wint_t getwc (__FILE *__stream);
10577 extern wint_t getwchar (void);
10584 extern wint_t fputwc (wchar_t __wc, __FILE *__stream);
10585 extern wint_t putwc (wchar_t __wc, __FILE *__stream);
10591 extern wint_t putwchar (wchar_t __wc);
10599 extern wchar_t *fgetws (wchar_t *__restrict __ws, int __n,
10600 __FILE *__restrict __stream);
10606 extern int fputws (__const wchar_t *__restrict __ws,
10607 __FILE *__restrict __stream);
10614 extern wint_t ungetwc (wint_t __wc, __FILE *__stream);
10616 # 768 "../wcsmbs/wchar.h"
10617 extern wint_t getwc_unlocked (__FILE *__stream);
10618 extern wint_t getwchar_unlocked (void);
10626 extern wint_t fgetwc_unlocked (__FILE *__stream);
10634 extern wint_t fputwc_unlocked (wchar_t __wc, __FILE *__stream);
10635 # 794 "../wcsmbs/wchar.h"
10636 extern wint_t putwc_unlocked (wchar_t __wc, __FILE *__stream);
10637 extern wint_t putwchar_unlocked (wchar_t __wc);
10638 # 804 "../wcsmbs/wchar.h"
10639 extern wchar_t *fgetws_unlocked (wchar_t *__restrict __ws, int __n,
10640 __FILE *__restrict __stream);
10648 extern int fputws_unlocked (__const wchar_t *__restrict __ws,
10649 __FILE *__restrict __stream);
10657 extern size_t wcsftime (wchar_t *__restrict __s, size_t __maxsize,
10658 __const wchar_t *__restrict __format,
10659 __const struct tm *__restrict __tp) __attribute__ ((__nothrow__));
10663 # 1 "../include/xlocale.h" 1
10664 # 829 "../wcsmbs/wchar.h" 2
10668 extern size_t wcsftime_l (wchar_t *__restrict __s, size_t __maxsize,
10669 __const wchar_t *__restrict __format,
10670 __const struct tm *__restrict __tp,
10671 __locale_t __loc) __attribute__ ((__nothrow__));
10672 # 858 "../wcsmbs/wchar.h"
10674 # 3 "../include/wchar.h" 2
10678 extern __typeof (wcscasecmp_l) __wcscasecmp_l;
10679 extern __typeof (wcsncasecmp_l) __wcsncasecmp_l;
10680 extern __typeof (wcscoll_l) __wcscoll_l;
10681 extern __typeof (wcsxfrm_l) __wcsxfrm_l;
10682 extern __typeof (wcstol_l) __wcstol_l;
10683 extern __typeof (wcstoul_l) __wcstoul_l;
10684 extern __typeof (wcstoll_l) __wcstoll_l;
10685 extern __typeof (wcstoull_l) __wcstoull_l;
10686 extern __typeof (wcstod_l) __wcstod_l;
10687 extern __typeof (wcstof_l) __wcstof_l;
10688 extern __typeof (wcstold_l) __wcstold_l;
10689 extern __typeof (wcsftime_l) __wcsftime_l;
10726 extern int __wcscasecmp (__const wchar_t *__s1, __const wchar_t *__s2)
10727 __attribute__ ((__pure__));
10728 extern int __wcsncasecmp (__const wchar_t *__s1, __const wchar_t *__s2,
10730 __attribute__ ((__pure__));
10731 extern size_t __wcslen (__const wchar_t *__s) __attribute__ ((__pure__));
10732 extern size_t __wcsnlen (__const wchar_t *__s, size_t __maxlen)
10733 __attribute__ ((__pure__));
10734 extern wchar_t *__wcscat (wchar_t *dest, const wchar_t *src);
10735 extern wint_t __btowc (int __c);
10736 extern int __mbsinit (__const __mbstate_t *__ps);
10737 extern size_t __mbrtowc (wchar_t *__restrict __pwc,
10738 __const char *__restrict __s, size_t __n,
10739 __mbstate_t *__restrict __p);
10742 extern size_t __wcrtomb (char *__restrict __s, wchar_t __wc,
10743 __mbstate_t *__restrict __ps);
10744 extern size_t __mbsrtowcs (wchar_t *__restrict __dst,
10745 __const char **__restrict __src,
10746 size_t __len, __mbstate_t *__restrict __ps);
10747 extern size_t __wcsrtombs (char *__restrict __dst,
10748 __const wchar_t **__restrict __src,
10749 size_t __len, __mbstate_t *__restrict __ps);
10750 extern size_t __mbsnrtowcs (wchar_t *__restrict __dst,
10751 __const char **__restrict __src, size_t __nmc,
10752 size_t __len, __mbstate_t *__restrict __ps);
10753 extern size_t __wcsnrtombs (char *__restrict __dst,
10754 __const wchar_t **__restrict __src,
10755 size_t __nwc, size_t __len,
10756 __mbstate_t *__restrict __ps);
10757 extern wchar_t *__wcsncpy (wchar_t *__restrict __dest,
10758 __const wchar_t *__restrict __src, size_t __n);
10759 extern wchar_t *__wcpcpy (wchar_t *__dest, __const wchar_t *__src);
10760 extern wchar_t *__wcpncpy (wchar_t *__dest, __const wchar_t *__src,
10762 extern wchar_t *__wmemcpy (wchar_t *__s1, __const wchar_t *s2,
10764 extern wchar_t *__wmempcpy (wchar_t *__restrict __s1,
10765 __const wchar_t *__restrict __s2,
10767 extern wchar_t *__wmemmove (wchar_t *__s1, __const wchar_t *__s2,
10769 extern wchar_t *__wcschrnul (__const wchar_t *__s, wchar_t __wc)
10770 __attribute__ ((__pure__));
10772 extern int __vfwscanf (__FILE *__restrict __s,
10773 __const wchar_t *__restrict __format,
10774 __gnuc_va_list __arg)
10776 extern int __vswprintf (wchar_t *__restrict __s, size_t __n,
10777 __const wchar_t *__restrict __format,
10778 __gnuc_va_list __arg)
10780 extern int __fwprintf (__FILE *__restrict __s,
10781 __const wchar_t *__restrict __format, ...)
10783 extern int __vfwprintf (__FILE *__restrict __s,
10784 __const wchar_t *__restrict __format,
10785 __gnuc_va_list __arg)
10787 extern int __vfwprintf_chk (FILE *__restrict __s, int __flag,
10788 const wchar_t *__restrict __format,
10789 __gnuc_va_list __arg)
10791 extern int __vswprintf_chk (wchar_t *__restrict __s, size_t __n,
10792 int __flag, size_t __s_len,
10793 __const wchar_t *__restrict __format,
10794 __gnuc_va_list __arg)
10800 extern size_t __mbsrtowcs_l (wchar_t *dst, const char **src, size_t len,
10801 mbstate_t *ps, __locale_t l) ;
10802 # 38 "regex_internal.h" 2
10805 # 1 "../include/wctype.h" 1
10811 # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4
10812 # 7 "../include/wctype.h" 2
10813 # 19 "../include/wctype.h"
10814 extern int iswalpha (wint_t __wc);
10815 extern int iswalnum (wint_t __wc);
10816 extern int iswdigit (wint_t __wc);
10817 extern int iswlower (wint_t __wc);
10818 extern int iswspace (wint_t __wc);
10819 extern int iswxdigit (wint_t __wc);
10820 extern wint_t towlower (wint_t __wc);
10821 extern wint_t towupper (wint_t __wc);
10832 # 1 "../wctype/wctype.h" 1
10833 # 35 "../wctype/wctype.h"
10834 # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4
10835 # 36 "../wctype/wctype.h" 2
10836 # 45 "../wctype/wctype.h"
10838 # 63 "../wctype/wctype.h"
10842 typedef unsigned long int wctype_t;
10850 # 1 "../include/endian.h" 1
10851 # 75 "../wctype/wctype.h" 2
10852 # 85 "../wctype/wctype.h"
10868 _ISwupper = (1 << (__ISwupper)),
10869 _ISwlower = (1 << (__ISwlower)),
10870 _ISwalpha = (1 << (__ISwalpha)),
10871 _ISwdigit = (1 << (__ISwdigit)),
10872 _ISwxdigit = (1 << (__ISwxdigit)),
10873 _ISwspace = (1 << (__ISwspace)),
10874 _ISwprint = (1 << (__ISwprint)),
10875 _ISwgraph = (1 << (__ISwgraph)),
10876 _ISwblank = (1 << (__ISwblank)),
10877 _ISwcntrl = (1 << (__ISwcntrl)),
10878 _ISwpunct = (1 << (__ISwpunct)),
10879 _ISwalnum = (1 << (__ISwalnum))
10893 extern int iswalnum (wint_t __wc) __attribute__ ((__nothrow__));
10899 extern int iswalpha (wint_t __wc) __attribute__ ((__nothrow__));
10902 extern int iswcntrl (wint_t __wc) __attribute__ ((__nothrow__));
10906 extern int iswdigit (wint_t __wc) __attribute__ ((__nothrow__));
10910 extern int iswgraph (wint_t __wc) __attribute__ ((__nothrow__));
10915 extern int iswlower (wint_t __wc) __attribute__ ((__nothrow__));
10918 extern int iswprint (wint_t __wc) __attribute__ ((__nothrow__));
10923 extern int iswpunct (wint_t __wc) __attribute__ ((__nothrow__));
10928 extern int iswspace (wint_t __wc) __attribute__ ((__nothrow__));
10933 extern int iswupper (wint_t __wc) __attribute__ ((__nothrow__));
10938 extern int iswxdigit (wint_t __wc) __attribute__ ((__nothrow__));
10944 extern int iswblank (wint_t __wc) __attribute__ ((__nothrow__));
10945 # 185 "../wctype/wctype.h"
10946 extern wctype_t wctype (__const char *__property) __attribute__ ((__nothrow__));
10950 extern int iswctype (wint_t __wc, wctype_t __desc) __attribute__ ((__nothrow__));
10961 typedef __const __int32_t *wctrans_t;
10969 extern wint_t towlower (wint_t __wc) __attribute__ ((__nothrow__));
10972 extern wint_t towupper (wint_t __wc) __attribute__ ((__nothrow__));
10976 # 227 "../wctype/wctype.h"
10982 extern wctrans_t wctrans (__const char *__property) __attribute__ ((__nothrow__));
10985 extern wint_t towctrans (wint_t __wc, wctrans_t __desc) __attribute__ ((__nothrow__));
10990 # 1 "../include/xlocale.h" 1
10991 # 241 "../wctype/wctype.h" 2
10995 extern int iswalnum_l (wint_t __wc, __locale_t __locale) __attribute__ ((__nothrow__));
11001 extern int iswalpha_l (wint_t __wc, __locale_t __locale) __attribute__ ((__nothrow__));
11004 extern int iswcntrl_l (wint_t __wc, __locale_t __locale) __attribute__ ((__nothrow__));
11008 extern int iswdigit_l (wint_t __wc, __locale_t __locale) __attribute__ ((__nothrow__));
11012 extern int iswgraph_l (wint_t __wc, __locale_t __locale) __attribute__ ((__nothrow__));
11017 extern int iswlower_l (wint_t __wc, __locale_t __locale) __attribute__ ((__nothrow__));
11020 extern int iswprint_l (wint_t __wc, __locale_t __locale) __attribute__ ((__nothrow__));
11025 extern int iswpunct_l (wint_t __wc, __locale_t __locale) __attribute__ ((__nothrow__));
11030 extern int iswspace_l (wint_t __wc, __locale_t __locale) __attribute__ ((__nothrow__));
11035 extern int iswupper_l (wint_t __wc, __locale_t __locale) __attribute__ ((__nothrow__));
11040 extern int iswxdigit_l (wint_t __wc, __locale_t __locale) __attribute__ ((__nothrow__));
11045 extern int iswblank_l (wint_t __wc, __locale_t __locale) __attribute__ ((__nothrow__));
11049 extern wctype_t wctype_l (__const char *__property, __locale_t __locale)
11050 __attribute__ ((__nothrow__));
11054 extern int iswctype_l (wint_t __wc, wctype_t __desc, __locale_t __locale)
11055 __attribute__ ((__nothrow__));
11063 extern wint_t towlower_l (wint_t __wc, __locale_t __locale) __attribute__ ((__nothrow__));
11066 extern wint_t towupper_l (wint_t __wc, __locale_t __locale) __attribute__ ((__nothrow__));
11070 extern wctrans_t wctrans_l (__const char *__property, __locale_t __locale)
11071 __attribute__ ((__nothrow__));
11074 extern wint_t towctrans_l (wint_t __wc, wctrans_t __desc,
11075 __locale_t __locale) __attribute__ ((__nothrow__));
11080 # 38 "../include/wctype.h" 2
11083 extern int __iswalpha_l_internal (wint_t __wc, __locale_t __locale)
11085 extern int __iswdigit_l_internal (wint_t __wc, __locale_t __locale)
11087 extern int __iswspace_l_internal (wint_t __wc, __locale_t __locale)
11089 extern int __iswxdigit_l_internal (wint_t __wc, __locale_t __locale)
11091 extern int __iswspace (wint_t __wc);
11092 extern int __iswctype (wint_t __wc, wctype_t __desc);
11093 extern int __iswctype_internal (wint_t __wc, wctype_t __desc) ;
11094 extern wctype_t __wctype (__const char *__property);
11095 extern wctrans_t __wctrans (const char *__property);
11096 extern wint_t __towctrans (wint_t __wc, wctrans_t __desc);
11098 extern __typeof (iswalnum_l) __iswalnum_l;
11099 extern __typeof (iswalpha_l) __iswalpha_l;
11100 extern __typeof (iswblank_l) __iswblank_l;
11101 extern __typeof (iswcntrl_l) __iswcntrl_l;
11102 extern __typeof (iswdigit_l) __iswdigit_l;
11103 extern __typeof (iswlower_l) __iswlower_l;
11104 extern __typeof (iswgraph_l) __iswgraph_l;
11105 extern __typeof (iswprint_l) __iswprint_l;
11106 extern __typeof (iswpunct_l) __iswpunct_l;
11107 extern __typeof (iswspace_l) __iswspace_l;
11108 extern __typeof (iswupper_l) __iswupper_l;
11109 extern __typeof (iswxdigit_l) __iswxdigit_l;
11110 extern __typeof (towlower_l) __towlower_l;
11111 extern __typeof (towupper_l) __towupper_l;
11129 # 41 "regex_internal.h" 2
11130 # 49 "regex_internal.h"
11131 # 1 "../nptl/sysdeps/pthread/bits/libc-lock.h" 1
11132 # 23 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11133 # 1 "../include/pthread.h" 1
11137 extern void __pthread_initialize (void) __attribute__ ((weak));
11138 # 24 "../nptl/sysdeps/pthread/bits/libc-lock.h" 2
11140 # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4
11141 # 26 "../nptl/sysdeps/pthread/bits/libc-lock.h" 2
11142 # 37 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11143 # 1 "../nptl/sysdeps/pthread/pthread-functions.h" 1
11144 # 23 "../nptl/sysdeps/pthread/pthread-functions.h"
11145 # 1 "../include/pthread.h" 1
11149 extern void __pthread_initialize (void) __attribute__ ((weak));
11150 # 24 "../nptl/sysdeps/pthread/pthread-functions.h" 2
11152 # 1 "../ports/sysdeps/unix/sysv/linux/hppa/nptl/internaltypes.h" 1
11153 # 26 "../ports/sysdeps/unix/sysv/linux/hppa/nptl/internaltypes.h"
11154 struct pthread_attr
11157 struct sched_param schedparam;
11170 # 53 "../ports/sysdeps/unix/sysv/linux/hppa/nptl/internaltypes.h"
11171 struct pthread_mutexattr
11184 struct pthread_condattr
11194 # 85 "../ports/sysdeps/unix/sysv/linux/hppa/nptl/internaltypes.h"
11195 struct pthread_rwlockattr
11203 struct pthread_barrier
11205 unsigned int curr_event;
11208 unsigned int init_count;
11213 struct pthread_barrierattr
11220 struct pthread_key_struct
11229 void (*destr) (void *);
11231 # 140 "../ports/sysdeps/unix/sysv/linux/hppa/nptl/internaltypes.h"
11234 unsigned int count;
11241 pthread_cond_t *cond;
11242 } pthread_cond_2_0_t;
11243 # 26 "../nptl/sysdeps/pthread/pthread-functions.h" 2
11244 # 1 "../ports/sysdeps/unix/sysv/linux/hppa/sysdep.h" 1
11245 # 23 "../ports/sysdeps/unix/sysv/linux/hppa/sysdep.h"
11246 # 1 "../sysdeps/generic/sysdep.h" 1
11247 # 24 "../ports/sysdeps/unix/sysv/linux/hppa/sysdep.h" 2
11248 # 27 "../nptl/sysdeps/pthread/pthread-functions.h" 2
11250 struct xid_command;
11254 struct pthread_functions
11256 int (*ptr_pthread_attr_destroy) (pthread_attr_t *);
11257 int (*ptr___pthread_attr_init_2_0) (pthread_attr_t *);
11258 int (*ptr___pthread_attr_init_2_1) (pthread_attr_t *);
11259 int (*ptr_pthread_attr_getdetachstate) (const pthread_attr_t *, int *);
11260 int (*ptr_pthread_attr_setdetachstate) (pthread_attr_t *, int);
11261 int (*ptr_pthread_attr_getinheritsched) (const pthread_attr_t *, int *);
11262 int (*ptr_pthread_attr_setinheritsched) (pthread_attr_t *, int);
11263 int (*ptr_pthread_attr_getschedparam) (const pthread_attr_t *,
11264 struct sched_param *);
11265 int (*ptr_pthread_attr_setschedparam) (pthread_attr_t *,
11266 const struct sched_param *);
11267 int (*ptr_pthread_attr_getschedpolicy) (const pthread_attr_t *, int *);
11268 int (*ptr_pthread_attr_setschedpolicy) (pthread_attr_t *, int);
11269 int (*ptr_pthread_attr_getscope) (const pthread_attr_t *, int *);
11270 int (*ptr_pthread_attr_setscope) (pthread_attr_t *, int);
11271 int (*ptr_pthread_condattr_destroy) (pthread_condattr_t *);
11272 int (*ptr_pthread_condattr_init) (pthread_condattr_t *);
11273 int (*ptr___pthread_cond_broadcast) (pthread_cond_t *);
11274 int (*ptr___pthread_cond_destroy) (pthread_cond_t *);
11275 int (*ptr___pthread_cond_init) (pthread_cond_t *,
11276 const pthread_condattr_t *);
11277 int (*ptr___pthread_cond_signal) (pthread_cond_t *);
11278 int (*ptr___pthread_cond_wait) (pthread_cond_t *, pthread_mutex_t *);
11279 int (*ptr___pthread_cond_timedwait) (pthread_cond_t *, pthread_mutex_t *,
11280 const struct timespec *);
11281 int (*ptr___pthread_cond_broadcast_2_0) (pthread_cond_2_0_t *);
11282 int (*ptr___pthread_cond_destroy_2_0) (pthread_cond_2_0_t *);
11283 int (*ptr___pthread_cond_init_2_0) (pthread_cond_2_0_t *,
11284 const pthread_condattr_t *);
11285 int (*ptr___pthread_cond_signal_2_0) (pthread_cond_2_0_t *);
11286 int (*ptr___pthread_cond_wait_2_0) (pthread_cond_2_0_t *, pthread_mutex_t *);
11287 int (*ptr___pthread_cond_timedwait_2_0) (pthread_cond_2_0_t *,
11289 const struct timespec *);
11290 int (*ptr_pthread_equal) (pthread_t, pthread_t);
11291 void (*ptr___pthread_exit) (void *);
11292 int (*ptr_pthread_getschedparam) (pthread_t, int *, struct sched_param *);
11293 int (*ptr_pthread_setschedparam) (pthread_t, int,
11294 const struct sched_param *);
11295 int (*ptr_pthread_mutex_destroy) (pthread_mutex_t *);
11296 int (*ptr_pthread_mutex_init) (pthread_mutex_t *,
11297 const pthread_mutexattr_t *);
11298 int (*ptr_pthread_mutex_lock) (pthread_mutex_t *);
11299 int (*ptr_pthread_mutex_unlock) (pthread_mutex_t *);
11300 pthread_t (*ptr_pthread_self) (void);
11301 int (*ptr_pthread_setcancelstate) (int, int *);
11302 int (*ptr_pthread_setcanceltype) (int, int *);
11303 void (*ptr___pthread_cleanup_upto) (__jmp_buf, char *);
11304 int (*ptr___pthread_once) (pthread_once_t *, void (*) (void));
11305 int (*ptr___pthread_rwlock_rdlock) (pthread_rwlock_t *);
11306 int (*ptr___pthread_rwlock_wrlock) (pthread_rwlock_t *);
11307 int (*ptr___pthread_rwlock_unlock) (pthread_rwlock_t *);
11308 int (*ptr___pthread_key_create) (pthread_key_t *, void (*) (void *));
11309 void *(*ptr___pthread_getspecific) (pthread_key_t);
11310 int (*ptr___pthread_setspecific) (pthread_key_t, const void *);
11311 void (*ptr__pthread_cleanup_push_defer) (struct _pthread_cleanup_buffer *,
11312 void (*) (void *), void *);
11313 void (*ptr__pthread_cleanup_pop_restore) (struct _pthread_cleanup_buffer *,
11316 unsigned int *ptr_nthreads;
11317 void (*ptr___pthread_unwind) (__pthread_unwind_buf_t *)
11318 __attribute ((noreturn)) ;
11319 void (*ptr__nptl_deallocate_tsd) (void);
11320 int (*ptr__nptl_setxid) (struct xid_command *);
11321 void (*ptr_freeres) (void);
11325 extern struct pthread_functions __libc_pthread_functions ;
11326 extern int __libc_pthread_functions_init ;
11327 # 38 "../nptl/sysdeps/pthread/bits/libc-lock.h" 2
11328 # 46 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11329 typedef int __libc_lock_t;
11330 typedef struct { int lock; int cnt; void *owner; } __libc_lock_recursive_t;
11332 typedef struct { pthread_mutex_t mutex; } __rtld_lock_recursive_t;
11334 typedef pthread_rwlock_t __libc_rwlock_t;
11335 # 62 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11336 typedef pthread_key_t __libc_key_t;
11337 # 374 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11338 extern void _pthread_cleanup_push (struct _pthread_cleanup_buffer *buffer,
11339 void (*routine) (void *), void *arg);
11340 extern void _pthread_cleanup_pop (struct _pthread_cleanup_buffer *buffer,
11342 extern void _pthread_cleanup_push_defer (struct _pthread_cleanup_buffer *buffer,
11343 void (*routine) (void *), void *arg);
11344 extern void _pthread_cleanup_pop_restore (struct _pthread_cleanup_buffer *buffer,
11346 # 417 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11347 extern __inline void
11348 __libc_cleanup_routine (struct __pthread_cleanup_frame *f)
11351 f->__cancel_routine (f->__cancel_arg);
11353 # 454 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11354 extern int __register_atfork (void (*__prepare) (void),
11355 void (*__parent) (void),
11356 void (*__child) (void),
11357 void *__dso_handle);
11362 extern int __pthread_mutex_init (pthread_mutex_t *__mutex,
11363 __const pthread_mutexattr_t *__mutex_attr);
11365 extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex);
11367 extern int __pthread_mutex_trylock (pthread_mutex_t *__mutex);
11369 extern int __pthread_mutex_lock (pthread_mutex_t *__mutex);
11371 extern int __pthread_mutex_unlock (pthread_mutex_t *__mutex);
11373 extern int __pthread_mutexattr_init (pthread_mutexattr_t *__attr);
11375 extern int __pthread_mutexattr_destroy (pthread_mutexattr_t *__attr);
11377 extern int __pthread_mutexattr_settype (pthread_mutexattr_t *__attr,
11381 extern int __pthread_rwlock_init (pthread_rwlock_t *__rwlock,
11382 __const pthread_rwlockattr_t *__attr);
11384 extern int __pthread_rwlock_destroy (pthread_rwlock_t *__rwlock);
11386 extern int __pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock);
11388 extern int __pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock);
11390 extern int __pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock);
11392 extern int __pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock);
11394 extern int __pthread_rwlock_unlock (pthread_rwlock_t *__rwlock);
11397 extern int __pthread_key_create (pthread_key_t *__key,
11398 void (*__destr_function) (void *));
11400 extern int __pthread_setspecific (pthread_key_t __key,
11401 __const void *__pointer);
11403 extern void *__pthread_getspecific (pthread_key_t __key);
11405 extern int __pthread_once (pthread_once_t *__once_control,
11406 void (*__init_routine) (void));
11408 extern int __pthread_atfork (void (*__prepare) (void),
11409 void (*__parent) (void),
11410 void (*__child) (void));
11411 # 519 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11412 # 1 "../sysdeps/generic/bp-sym.h" 1
11413 # 520 "../nptl/sysdeps/pthread/bits/libc-lock.h" 2
11418 # 523 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11419 #pragma weak __pthread_mutex_init
11420 # 523 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11423 # 524 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11424 #pragma weak __pthread_mutex_destroy
11425 # 524 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11428 # 525 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11429 #pragma weak __pthread_mutex_lock
11430 # 525 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11433 # 526 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11434 #pragma weak __pthread_mutex_trylock
11435 # 526 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11438 # 527 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11439 #pragma weak __pthread_mutex_unlock
11440 # 527 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11443 # 528 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11444 #pragma weak __pthread_mutexattr_init
11445 # 528 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11448 # 529 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11449 #pragma weak __pthread_mutexattr_destroy
11450 # 529 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11453 # 530 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11454 #pragma weak __pthread_mutexattr_settype
11455 # 530 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11458 # 531 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11459 #pragma weak __pthread_rwlock_init
11460 # 531 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11463 # 532 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11464 #pragma weak __pthread_rwlock_destroy
11465 # 532 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11468 # 533 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11469 #pragma weak __pthread_rwlock_rdlock
11470 # 533 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11473 # 534 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11474 #pragma weak __pthread_rwlock_tryrdlock
11475 # 534 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11478 # 535 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11479 #pragma weak __pthread_rwlock_wrlock
11480 # 535 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11483 # 536 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11484 #pragma weak __pthread_rwlock_trywrlock
11485 # 536 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11488 # 537 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11489 #pragma weak __pthread_rwlock_unlock
11490 # 537 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11493 # 538 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11494 #pragma weak __pthread_key_create
11495 # 538 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11498 # 539 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11499 #pragma weak __pthread_setspecific
11500 # 539 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11503 # 540 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11504 #pragma weak __pthread_getspecific
11505 # 540 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11508 # 541 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11509 #pragma weak __pthread_once
11510 # 541 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11513 # 542 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11514 #pragma weak __pthread_initialize
11515 # 542 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11518 # 543 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11519 #pragma weak __pthread_atfork
11520 # 543 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11523 # 544 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11524 #pragma weak _pthread_cleanup_push_defer
11525 # 544 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11528 # 545 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11529 #pragma weak _pthread_cleanup_pop_restore
11530 # 545 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11533 # 546 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11534 #pragma weak pthread_setcancelstate
11535 # 546 "../nptl/sysdeps/pthread/bits/libc-lock.h"
11537 # 50 "regex_internal.h" 2
11538 # 65 "regex_internal.h"
11539 # 1 "../locale/localeinfo.h" 1
11540 # 66 "regex_internal.h" 2
11541 # 1 "../locale/elem-hash.h" 1
11542 # 22 "../locale/elem-hash.h"
11543 static inline int32_t
11544 elem_hash (const char *str, int_fast32_t n)
11546 int32_t result = n;
11556 # 67 "regex_internal.h" 2
11557 # 1 "../locale/coll-lookup.h" 1
11558 # 23 "../locale/coll-lookup.h"
11559 extern int32_t __collidx_table_lookup (const char *table, uint32_t wc)
11563 extern uint32_t __collseq_table_lookup (const char *table, uint32_t wc)
11565 # 68 "regex_internal.h" 2
11571 # 1 "../include/libintl.h" 1
11573 # 1 "../intl/libintl.h" 1
11574 # 35 "../intl/libintl.h"
11580 extern char *gettext (__const char *__msgid)
11581 __attribute__ ((__nothrow__)) __attribute__ ((__format_arg__ (1)));
11585 extern char *dgettext (__const char *__domainname, __const char *__msgid)
11586 __attribute__ ((__nothrow__)) __attribute__ ((__format_arg__ (2)));
11587 extern char *__dgettext (__const char *__domainname, __const char *__msgid)
11588 __attribute__ ((__nothrow__)) __attribute__ ((__format_arg__ (2)));
11592 extern char *dcgettext (__const char *__domainname,
11593 __const char *__msgid, int __category)
11594 __attribute__ ((__nothrow__)) __attribute__ ((__format_arg__ (2)));
11595 extern char *__dcgettext (__const char *__domainname,
11596 __const char *__msgid, int __category)
11597 __attribute__ ((__nothrow__)) __attribute__ ((__format_arg__ (2)));
11602 extern char *ngettext (__const char *__msgid1, __const char *__msgid2,
11603 unsigned long int __n)
11604 __attribute__ ((__nothrow__)) __attribute__ ((__format_arg__ (1))) __attribute__ ((__format_arg__ (2)));
11608 extern char *dngettext (__const char *__domainname, __const char *__msgid1,
11609 __const char *__msgid2, unsigned long int __n)
11610 __attribute__ ((__nothrow__)) __attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3)));
11614 extern char *dcngettext (__const char *__domainname, __const char *__msgid1,
11615 __const char *__msgid2, unsigned long int __n,
11617 __attribute__ ((__nothrow__)) __attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3)));
11623 extern char *textdomain (__const char *__domainname) __attribute__ ((__nothrow__));
11627 extern char *bindtextdomain (__const char *__domainname,
11628 __const char *__dirname) __attribute__ ((__nothrow__));
11632 extern char *bind_textdomain_codeset (__const char *__domainname,
11633 __const char *__codeset) __attribute__ ((__nothrow__));
11641 # 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4
11642 # 102 "../intl/libintl.h" 2
11643 # 122 "../intl/libintl.h"
11645 # 3 "../include/libintl.h" 2
11649 extern char *__gettext (__const char *__msgid)
11650 __attribute__ ((__format_arg__ (1)));
11651 extern char *__dgettext (__const char *__domainname,
11652 __const char *__msgid)
11653 __attribute__ ((__format_arg__ (2)));
11654 extern char *__dcgettext (__const char *__domainname,
11655 __const char *__msgid, int __category)
11656 __attribute__ ((__format_arg__ (2)));
11658 extern char *__dcgettext_internal (__const char *__domainname,
11659 __const char *__msgid, int __category)
11660 __attribute__ ((__format_arg__ (2)))
11663 extern char *__ngettext (__const char *__msgid1, __const char *__msgid2,
11664 unsigned long int __n)
11665 __attribute__ ((__format_arg__ (1))) __attribute__ ((__format_arg__ (2)));
11666 extern char *__dngettext (__const char *__domainname,
11667 __const char *__msgid1, __const char *__msgid2,
11668 unsigned long int __n)
11669 __attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3)));
11670 extern char *__dcngettext (__const char *__domainname,
11671 __const char *__msgid1, __const char *__msgid2,
11672 unsigned long int __n, int __category)
11673 __attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3)));
11674 extern char *__dcngettext_internal (__const char *__domainname,
11675 __const char *__msgid1,
11676 __const char *__msgid2,
11677 unsigned long int __n, int __category)
11678 __attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3)))
11681 extern char *__textdomain (__const char *__domainname);
11682 extern char *__bindtextdomain (__const char *__domainname,
11683 __const char *__dirname);
11684 extern char *__bind_textdomain_codeset (__const char *__domainname,
11685 __const char *__codeset);
11687 extern const char _libc_intl_domainname[];
11689 # 74 "regex_internal.h" 2
11690 # 131 "regex_internal.h"
11691 extern const char __re_error_msgid[] ;
11692 extern const size_t __re_error_msgid_idx[] ;
11696 typedef unsigned long int bitset_word_t;
11703 typedef bitset_word_t bitset_t[(256 / (sizeof (bitset_word_t) * 8))];
11704 typedef bitset_word_t *re_bitset_ptr_t;
11705 typedef const bitset_word_t *re_const_bitset_ptr_t;
11706 # 168 "regex_internal.h"
11709 INSIDE_WORD = 0x0001 | 0x0004,
11710 WORD_FIRST = 0x0002 | 0x0004,
11711 WORD_LAST = 0x0001 | 0x0008,
11712 INSIDE_NOTWORD = 0x0002 | 0x0008,
11713 LINE_FIRST = 0x0010,
11714 LINE_LAST = 0x0020,
11715 BUF_FIRST = 0x0040,
11717 WORD_DELIM = 0x0100,
11718 NOT_WORD_DELIM = 0x0200
11735 SIMPLE_BRACKET = 3,
11739 COMPLEX_BRACKET = 6,
11740 OP_UTF8_PERIOD = 7,
11746 OP_OPEN_SUBEXP = 8 | 0,
11747 OP_CLOSE_SUBEXP = 8 | 1,
11749 OP_DUP_ASTERISK = 8 | 3,
11766 OP_CLOSE_COLL_ELEM,
11767 OP_OPEN_EQUIV_CLASS,
11768 OP_CLOSE_EQUIV_CLASS,
11769 OP_OPEN_CHAR_CLASS,
11770 OP_CLOSE_CHAR_CLASS,
11787 int32_t *coll_syms;
11792 int32_t *equiv_classes;
11797 uint32_t *range_starts;
11798 uint32_t *range_ends;
11805 wctype_t *char_classes;
11808 unsigned int non_match : 1;
11817 int nequiv_classes;
11832 re_bitset_ptr_t sbcset;
11834 re_charset_t *mbcset;
11837 re_context_type ctx_type;
11840 re_token_type_t type : 8;
11844 unsigned int constraint : 10;
11845 unsigned int duplicated : 1;
11846 unsigned int opt_subexp : 1;
11848 unsigned int accept_mb : 1;
11851 unsigned int mb_partial : 1;
11853 unsigned int word_char : 1;
11862 const unsigned char *raw_mbs;
11866 unsigned char *mbs;
11871 mbstate_t cur_state;
11898 unsigned int tip_context;
11900 unsigned char * trans;
11902 re_const_bitset_ptr_t word_char;
11904 unsigned char icase;
11905 unsigned char is_utf8;
11906 unsigned char map_notascii;
11907 unsigned char mbs_allocated;
11908 unsigned char offsets_needed;
11909 unsigned char newline_anchor;
11910 unsigned char word_ops_used;
11913 typedef struct re_string_t re_string_t;
11917 typedef struct re_dfa_t re_dfa_t;
11918 # 388 "regex_internal.h"
11919 static reg_errcode_t re_string_realloc_buffers (re_string_t *pstr,
11923 static void build_wcs_buffer (re_string_t *pstr) ;
11924 static int build_wcs_upper_buffer (re_string_t *pstr) ;
11926 static void build_upper_buffer (re_string_t *pstr) ;
11927 static void re_string_translate_buffer (re_string_t *pstr) ;
11928 static unsigned int re_string_context_at (const re_string_t *input, int idx,
11930 __attribute__ ((pure));
11931 # 436 "regex_internal.h"
11934 struct bin_tree_t *parent;
11935 struct bin_tree_t *left;
11936 struct bin_tree_t *right;
11937 struct bin_tree_t *first;
11938 struct bin_tree_t *next;
11946 typedef struct bin_tree_t bin_tree_t;
11951 struct bin_tree_storage_t
11953 struct bin_tree_storage_t *next;
11954 bin_tree_t data[((1024 - sizeof (void *)) / sizeof (bin_tree_t))];
11956 typedef struct bin_tree_storage_t bin_tree_storage_t;
11957 # 490 "regex_internal.h"
11958 struct re_dfastate_t
11962 re_node_set non_eps_nodes;
11963 re_node_set inveclosure;
11964 re_node_set *entrance_nodes;
11965 struct re_dfastate_t **trtable, **word_trtable;
11966 unsigned int context : 4;
11967 unsigned int halt : 1;
11971 unsigned int accept_mb : 1;
11973 unsigned int has_backref : 1;
11974 unsigned int has_constraint : 1;
11976 typedef struct re_dfastate_t re_dfastate_t;
11978 struct re_state_table_entry
11982 re_dfastate_t **array;
11991 re_dfastate_t **array;
12000 state_array_t path;
12001 } re_sub_match_last_t;
12011 state_array_t *path;
12014 re_sub_match_last_t **lasts;
12015 } re_sub_match_top_t;
12017 struct re_backref_cache_entry
12025 unsigned short int eps_reachable_subexps_map;
12033 const re_dfa_t *const dfa;
12043 re_dfastate_t **state_log;
12048 struct re_backref_cache_entry *bkref_ents;
12049 int max_mb_elem_len;
12052 re_sub_match_top_t **sub_tops;
12053 } re_match_context_t;
12057 re_dfastate_t **sifted_states;
12058 re_dfastate_t **limited_states;
12061 re_node_set limits;
12062 } re_sift_context_t;
12064 struct re_fail_stack_ent_t
12069 re_node_set eps_via_nodes;
12072 struct re_fail_stack_t
12076 struct re_fail_stack_ent_t *stack;
12082 size_t nodes_alloc;
12086 re_node_set *edests;
12087 re_node_set *eclosures;
12088 re_node_set *inveclosures;
12089 struct re_state_table_entry *state_table;
12090 re_dfastate_t *init_state;
12091 re_dfastate_t *init_state_word;
12092 re_dfastate_t *init_state_nl;
12093 re_dfastate_t *init_state_begbuf;
12094 bin_tree_t *str_tree;
12095 bin_tree_storage_t *str_tree_storage;
12096 re_bitset_ptr_t sb_char;
12097 int str_tree_storage_idx;
12100 unsigned int state_hash_mask;
12105 bitset_word_t used_bkref_map;
12106 bitset_word_t completed_bkref_map;
12108 unsigned int has_plural_match : 1;
12112 unsigned int has_mb_node : 1;
12113 unsigned int is_utf8 : 1;
12114 unsigned int map_notascii : 1;
12115 unsigned int word_ops_used : 1;
12117 bitset_t word_char;
12118 reg_syntax_t syntax;
12123 __libc_lock_t lock;
12125 # 665 "regex_internal.h"
12133 } bracket_elem_type;
12137 bracket_elem_type type;
12141 unsigned char *name;
12149 bitset_not (bitset_t set)
12152 for (bitset_i = 0; bitset_i < (256 / (sizeof (bitset_word_t) * 8)); ++bitset_i)
12153 set[bitset_i] = ~set[bitset_i];
12157 bitset_merge (bitset_t dest, const bitset_t src)
12160 for (bitset_i = 0; bitset_i < (256 / (sizeof (bitset_word_t) * 8)); ++bitset_i)
12161 dest[bitset_i] |= src[bitset_i];
12165 bitset_mask (bitset_t dest, const bitset_t src)
12168 for (bitset_i = 0; bitset_i < (256 / (sizeof (bitset_word_t) * 8)); ++bitset_i)
12169 dest[bitset_i] &= src[bitset_i];
12175 __attribute__ ((pure))
12176 re_string_char_size_at (const re_string_t *pstr, int idx)
12179 if (pstr->mb_cur_max == 1)
12181 for (byte_idx = 1; idx + byte_idx < pstr->valid_len; ++byte_idx)
12182 if (pstr->wcs[idx + byte_idx] != (0xffffffffu))
12187 static inline wint_t
12188 __attribute__ ((pure))
12189 re_string_wchar_at (const re_string_t *pstr, int idx)
12191 if (pstr->mb_cur_max == 1)
12192 return (wint_t) pstr->mbs[idx];
12193 return (wint_t) pstr->wcs[idx];
12197 __attribute__ ((pure))
12198 re_string_elem_size_at (const re_string_t *pstr, int idx)
12201 const unsigned char *p, *extra;
12202 const int32_t *table, *indirect;
12204 # 1 "../locale/weight.h" 1
12205 # 21 "../locale/weight.h"
12206 auto inline int32_t
12207 __attribute__ ((always_inline))
12208 findidx (const unsigned char **cpp)
12210 int_fast32_t i = table[*(*cpp)++];
12211 const unsigned char *cp;
12212 const unsigned char *usrc;
12227 i = *((const int32_t *) cp);
12228 cp += sizeof (int32_t);
12244 for (cnt = 0; cnt < nhere; ++cnt)
12245 if (cp[cnt] != usrc[cnt])
12257 if ((1 + nhere) % __alignof__ (int32_t) != 0)
12258 cp += __alignof__ (int32_t) - (1 + nhere) % __alignof__ (int32_t);
12267 for (cnt = 0; cnt < nhere; ++cnt)
12268 if (cp[cnt] != usrc[cnt])
12273 if (cp[cnt] > usrc[cnt])
12277 if ((1 + 2 * nhere) % __alignof__ (int32_t) != 0)
12278 cp += (__alignof__ (int32_t)
12279 - (1 + 2 * nhere) % __alignof__ (int32_t));
12284 for (cnt = 0; cnt < nhere; ++cnt)
12285 if (cp[nhere + cnt] != usrc[cnt])
12288 if (cnt != nhere && cp[nhere + cnt] < usrc[cnt])
12292 if ((1 + 2 * nhere) % __alignof__ (int32_t) != 0)
12293 cp += (__alignof__ (int32_t)
12294 - (1 + 2 * nhere) % __alignof__ (int32_t));
12300 for (cnt = 0; cp[cnt] == usrc[cnt]; ++cnt);
12305 offset += usrc[cnt] - cp[cnt];
12307 while (++cnt < nhere);
12311 return indirect[-i + offset];
12318 # 744 "regex_internal.h" 2
12319 uint_fast32_t nrules = ((uint32_t) (*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_NRULES) & 0xffff)].word);
12323 table = (const int32_t *) ((*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_TABLEMB) & 0xffff)].string);
12324 extra = (const unsigned char *)
12325 ((*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_EXTRAMB) & 0xffff)].string);
12326 indirect = (const int32_t *) ((*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_INDIRECTMB) & 0xffff)].string);
12328 p = pstr->mbs + idx;
12329 tmp = findidx (&p);
12330 return p - pstr->mbs - idx;
12338 # 1 "regex_internal.c" 1
12339 # 21 "regex_internal.c"
12340 static void re_string_construct_common (const char *str, int len,
12342 unsigned char * trans, int icase,
12343 const re_dfa_t *dfa) ;
12344 static re_dfastate_t *create_ci_newstate (const re_dfa_t *dfa,
12345 const re_node_set *nodes,
12346 unsigned int hash) ;
12347 static re_dfastate_t *create_cd_newstate (const re_dfa_t *dfa,
12348 const re_node_set *nodes,
12349 unsigned int context,
12350 unsigned int hash) ;
12357 static reg_errcode_t
12359 re_string_allocate (re_string_t *pstr, const char *str, int len, int init_len,
12360 unsigned char * trans, int icase, const re_dfa_t *dfa)
12366 if (init_len < dfa->mb_cur_max)
12367 init_len = dfa->mb_cur_max;
12368 init_buf_len = (len + 1 < init_len) ? len + 1: init_len;
12369 re_string_construct_common (str, len, pstr, trans, icase, dfa);
12371 ret = re_string_realloc_buffers (pstr, init_buf_len);
12372 if (__builtin_expect (ret != REG_NOERROR, 0))
12375 pstr->word_char = dfa->word_char;
12376 pstr->word_ops_used = dfa->word_ops_used;
12377 pstr->mbs = pstr->mbs_allocated ? pstr->mbs : (unsigned char *) str;
12378 pstr->valid_len = (pstr->mbs_allocated || dfa->mb_cur_max > 1) ? 0 : len;
12379 pstr->valid_raw_len = pstr->valid_len;
12380 return REG_NOERROR;
12385 static reg_errcode_t
12387 re_string_construct (re_string_t *pstr, const char *str, int len,
12388 unsigned char * trans, int icase, const re_dfa_t *dfa)
12391 memset (pstr, '\0', sizeof (re_string_t));
12392 re_string_construct_common (str, len, pstr, trans, icase, dfa);
12396 ret = re_string_realloc_buffers (pstr, len + 1);
12397 if (__builtin_expect (ret != REG_NOERROR, 0))
12400 pstr->mbs = pstr->mbs_allocated ? pstr->mbs : (unsigned char *) str;
12405 if (dfa->mb_cur_max > 1)
12409 ret = build_wcs_upper_buffer (pstr);
12410 if (__builtin_expect (ret != REG_NOERROR, 0))
12412 if (pstr->valid_raw_len >= len)
12414 if (pstr->bufs_len > pstr->valid_len + dfa->mb_cur_max)
12416 ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2);
12417 if (__builtin_expect (ret != REG_NOERROR, 0))
12423 build_upper_buffer (pstr);
12428 if (dfa->mb_cur_max > 1)
12429 build_wcs_buffer (pstr);
12433 if (trans != ((void *)0))
12434 re_string_translate_buffer (pstr);
12437 pstr->valid_len = pstr->bufs_len;
12438 pstr->valid_raw_len = pstr->bufs_len;
12443 return REG_NOERROR;
12448 static reg_errcode_t
12450 re_string_realloc_buffers (re_string_t *pstr, int new_buf_len)
12453 if (pstr->mb_cur_max > 1)
12455 wint_t *new_wcs = ((wint_t *) realloc (pstr->wcs, (new_buf_len) * sizeof (wint_t)));
12456 if (__builtin_expect (new_wcs == ((void *)0), 0))
12458 pstr->wcs = new_wcs;
12459 if (pstr->offsets != ((void *)0))
12461 int *new_offsets = ((int *) realloc (pstr->offsets, (new_buf_len) * sizeof (int)));
12462 if (__builtin_expect (new_offsets == ((void *)0), 0))
12464 pstr->offsets = new_offsets;
12468 if (pstr->mbs_allocated)
12470 unsigned char *new_mbs = ((unsigned char *) realloc (pstr->mbs, (new_buf_len) * sizeof (unsigned char)));
12472 if (__builtin_expect (new_mbs == ((void *)0), 0))
12474 pstr->mbs = new_mbs;
12476 pstr->bufs_len = new_buf_len;
12477 return REG_NOERROR;
12483 re_string_construct_common (const char *str, int len, re_string_t *pstr,
12484 unsigned char * trans, int icase,
12485 const re_dfa_t *dfa)
12487 pstr->raw_mbs = (const unsigned char *) str;
12489 pstr->raw_len = len;
12490 pstr->trans = trans;
12491 pstr->icase = icase ? 1 : 0;
12492 pstr->mbs_allocated = (trans != ((void *)0) || icase);
12493 pstr->mb_cur_max = dfa->mb_cur_max;
12494 pstr->is_utf8 = dfa->is_utf8;
12495 pstr->map_notascii = dfa->map_notascii;
12496 pstr->stop = pstr->len;
12497 pstr->raw_stop = pstr->stop;
12499 # 194 "regex_internal.c"
12502 build_wcs_buffer (re_string_t *pstr)
12505 unsigned char buf[16];
12506 ((16 >= pstr->mb_cur_max) ? (void) (0) : (__assert_fail ("16 >= pstr->mb_cur_max", "regex_internal.c", 200, __PRETTY_FUNCTION__), (void) (0)));
12511 int byte_idx, end_idx, remain_len;
12516 end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len;
12517 for (byte_idx = pstr->valid_len; byte_idx < end_idx;)
12522 remain_len = end_idx - byte_idx;
12523 prev_st = pstr->cur_state;
12525 if (__builtin_expect (pstr->trans != ((void *)0), 0))
12529 for (i = 0; i < pstr->mb_cur_max && i < remain_len; ++i)
12531 ch = pstr->raw_mbs [pstr->raw_mbs_idx + byte_idx + i];
12532 buf[i] = pstr->mbs[byte_idx + i] = pstr->trans[ch];
12534 p = (const char *) buf;
12537 p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx;
12538 mbclen = mbrtowc (&wc, p, remain_len, &pstr->cur_state);
12539 if (__builtin_expect (mbclen == (size_t) -2, 0))
12542 pstr->cur_state = prev_st;
12545 else if (__builtin_expect (mbclen == (size_t) -1 || mbclen == 0, 0))
12549 wc = (wchar_t) pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx];
12550 if (__builtin_expect (pstr->trans != ((void *)0), 0))
12551 wc = pstr->trans[wc];
12552 pstr->cur_state = prev_st;
12556 pstr->wcs[byte_idx++] = wc;
12558 for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;)
12559 pstr->wcs[byte_idx++] = (0xffffffffu);
12561 pstr->valid_len = byte_idx;
12562 pstr->valid_raw_len = byte_idx;
12568 static reg_errcode_t
12570 build_wcs_upper_buffer (re_string_t *pstr)
12573 int src_idx, byte_idx, end_idx, remain_len;
12577 ((16 >= pstr->mb_cur_max) ? (void) (0) : (__assert_fail ("16 >= pstr->mb_cur_max", "regex_internal.c", 271, __PRETTY_FUNCTION__), (void) (0)));
12582 byte_idx = pstr->valid_len;
12583 end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len;
12587 if (! pstr->map_notascii && pstr->trans == ((void *)0) && !pstr->offsets_needed)
12589 while (byte_idx < end_idx)
12593 if ((((pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]) & ~0x7f) == 0)
12594 && ((&pstr->cur_state)->__count == 0))
12597 pstr->mbs[byte_idx]
12598 = (__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; }));
12601 pstr->wcs[byte_idx] = (wchar_t) pstr->mbs[byte_idx];
12606 remain_len = end_idx - byte_idx;
12607 prev_st = pstr->cur_state;
12608 mbclen = mbrtowc (&wc,
12609 ((const char *) pstr->raw_mbs + pstr->raw_mbs_idx
12610 + byte_idx), remain_len, &pstr->cur_state);
12611 if (__builtin_expect (mbclen + 2 > 2, 1))
12618 wcu = towupper (wc);
12619 mbcdlen = wcrtomb (buf, wcu, &prev_st);
12620 if (__builtin_expect (mbclen == mbcdlen, 1))
12621 memcpy (pstr->mbs + byte_idx, buf, mbclen);
12624 src_idx = byte_idx;
12625 goto offsets_needed;
12629 memcpy (pstr->mbs + byte_idx,
12630 pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx, mbclen);
12631 pstr->wcs[byte_idx++] = wcu;
12633 for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;)
12634 pstr->wcs[byte_idx++] = (0xffffffffu);
12636 else if (mbclen == (size_t) -1 || mbclen == 0)
12639 int ch = pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx];
12640 pstr->mbs[byte_idx] = ch;
12642 pstr->wcs[byte_idx++] = (wchar_t) ch;
12643 if (__builtin_expect (mbclen == (size_t) -1, 0))
12644 pstr->cur_state = prev_st;
12649 pstr->cur_state = prev_st;
12653 pstr->valid_len = byte_idx;
12654 pstr->valid_raw_len = byte_idx;
12655 return REG_NOERROR;
12658 for (src_idx = pstr->valid_raw_len; byte_idx < end_idx;)
12663 remain_len = end_idx - byte_idx;
12664 prev_st = pstr->cur_state;
12665 if (__builtin_expect (pstr->trans != ((void *)0), 0))
12669 for (i = 0; i < pstr->mb_cur_max && i < remain_len; ++i)
12671 ch = pstr->raw_mbs [pstr->raw_mbs_idx + src_idx + i];
12672 buf[i] = pstr->trans[ch];
12674 p = (const char *) buf;
12677 p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + src_idx;
12678 mbclen = mbrtowc (&wc, p, remain_len, &pstr->cur_state);
12679 if (__builtin_expect (mbclen + 2 > 2, 1))
12686 wcu = towupper (wc);
12687 mbcdlen = wcrtomb ((char *) buf, wcu, &prev_st);
12688 if (__builtin_expect (mbclen == mbcdlen, 1))
12689 memcpy (pstr->mbs + byte_idx, buf, mbclen);
12690 else if (mbcdlen != (size_t) -1)
12694 if (byte_idx + mbcdlen > pstr->bufs_len)
12696 pstr->cur_state = prev_st;
12700 if (pstr->offsets == ((void *)0))
12702 pstr->offsets = ((int *) malloc ((pstr->bufs_len) * sizeof (int)));
12704 if (pstr->offsets == ((void *)0))
12707 if (!pstr->offsets_needed)
12709 for (i = 0; i < (size_t) byte_idx; ++i)
12710 pstr->offsets[i] = i;
12711 pstr->offsets_needed = 1;
12714 memcpy (pstr->mbs + byte_idx, buf, mbcdlen);
12715 pstr->wcs[byte_idx] = wcu;
12716 pstr->offsets[byte_idx] = src_idx;
12717 for (i = 1; i < mbcdlen; ++i)
12719 pstr->offsets[byte_idx + i]
12720 = src_idx + (i < mbclen ? i : mbclen - 1);
12721 pstr->wcs[byte_idx + i] = (0xffffffffu);
12723 pstr->len += mbcdlen - mbclen;
12724 if (pstr->raw_stop > src_idx)
12725 pstr->stop += mbcdlen - mbclen;
12726 end_idx = (pstr->bufs_len > pstr->len)
12727 ? pstr->len : pstr->bufs_len;
12728 byte_idx += mbcdlen;
12733 memcpy (pstr->mbs + byte_idx, p, mbclen);
12736 memcpy (pstr->mbs + byte_idx, p, mbclen);
12738 if (__builtin_expect (pstr->offsets_needed != 0, 0))
12741 for (i = 0; i < mbclen; ++i)
12742 pstr->offsets[byte_idx + i] = src_idx + i;
12746 pstr->wcs[byte_idx++] = wcu;
12748 for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;)
12749 pstr->wcs[byte_idx++] = (0xffffffffu);
12751 else if (mbclen == (size_t) -1 || mbclen == 0)
12754 int ch = pstr->raw_mbs[pstr->raw_mbs_idx + src_idx];
12756 if (__builtin_expect (pstr->trans != ((void *)0), 0))
12757 ch = pstr->trans [ch];
12758 pstr->mbs[byte_idx] = ch;
12760 if (__builtin_expect (pstr->offsets_needed != 0, 0))
12761 pstr->offsets[byte_idx] = src_idx;
12765 pstr->wcs[byte_idx++] = (wchar_t) ch;
12766 if (__builtin_expect (mbclen == (size_t) -1, 0))
12767 pstr->cur_state = prev_st;
12772 pstr->cur_state = prev_st;
12776 pstr->valid_len = byte_idx;
12777 pstr->valid_raw_len = src_idx;
12778 return REG_NOERROR;
12786 re_string_skip_chars (re_string_t *pstr, int new_raw_idx, wint_t *last_wc)
12791 wchar_t wc = (0xffffffffu);
12794 for (rawbuf_idx = pstr->raw_mbs_idx + pstr->valid_raw_len;
12795 rawbuf_idx < new_raw_idx;)
12798 remain_len = pstr->len - rawbuf_idx;
12799 prev_st = pstr->cur_state;
12800 mbclen = mbrtowc (&wc, (const char *) pstr->raw_mbs + rawbuf_idx,
12801 remain_len, &pstr->cur_state);
12802 if (__builtin_expect (mbclen == (size_t) -2 || mbclen == (size_t) -1 || mbclen == 0, 0))
12805 if (mbclen == 0 || remain_len == 0)
12808 wc = *(unsigned char *) (pstr->raw_mbs + rawbuf_idx);
12810 pstr->cur_state = prev_st;
12813 rawbuf_idx += mbclen;
12815 *last_wc = (wint_t) wc;
12825 build_upper_buffer (re_string_t *pstr)
12827 int char_idx, end_idx;
12828 end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len;
12830 for (char_idx = pstr->valid_len; char_idx < end_idx; ++char_idx)
12832 int ch = pstr->raw_mbs[pstr->raw_mbs_idx + char_idx];
12833 if (__builtin_expect (pstr->trans != ((void *)0), 0))
12834 ch = pstr->trans[ch];
12835 if (((*__ctype_b_loc ())[(int) ((ch))] & (unsigned short int) _ISlower))
12836 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; }));
12838 pstr->mbs[char_idx] = ch;
12840 pstr->valid_len = char_idx;
12841 pstr->valid_raw_len = char_idx;
12848 re_string_translate_buffer (re_string_t *pstr)
12850 int buf_idx, end_idx;
12851 end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len;
12853 for (buf_idx = pstr->valid_len; buf_idx < end_idx; ++buf_idx)
12855 int ch = pstr->raw_mbs[pstr->raw_mbs_idx + buf_idx];
12856 pstr->mbs[buf_idx] = pstr->trans[ch];
12859 pstr->valid_len = buf_idx;
12860 pstr->valid_raw_len = buf_idx;
12867 static reg_errcode_t
12869 re_string_reconstruct (re_string_t *pstr, int idx, int eflags)
12871 int offset = idx - pstr->raw_mbs_idx;
12872 if (__builtin_expect (offset < 0, 0))
12876 if (pstr->mb_cur_max > 1)
12877 memset (&pstr->cur_state, '\0', sizeof (mbstate_t));
12879 pstr->len = pstr->raw_len;
12880 pstr->stop = pstr->raw_stop;
12881 pstr->valid_len = 0;
12882 pstr->raw_mbs_idx = 0;
12883 pstr->valid_raw_len = 0;
12884 pstr->offsets_needed = 0;
12885 pstr->tip_context = ((eflags & 1) ? ((1 << 1) << 1)
12886 : (1 << 1) | ((1 << 1) << 1));
12887 if (!pstr->mbs_allocated)
12888 pstr->mbs = (unsigned char *) pstr->raw_mbs;
12892 if (__builtin_expect (offset != 0, 1))
12895 if (__builtin_expect (offset < pstr->valid_raw_len, 1))
12899 if (__builtin_expect (pstr->offsets_needed, 0))
12901 int low = 0, high = pstr->valid_len, mid;
12904 mid = (high + low) / 2;
12905 if (pstr->offsets[mid] > offset)
12907 else if (pstr->offsets[mid] < offset)
12912 while (low < high);
12913 if (pstr->offsets[mid] < offset)
12915 pstr->tip_context = re_string_context_at (pstr, mid - 1,
12921 if (pstr->valid_len > offset
12922 && mid == offset && pstr->offsets[mid] == offset)
12924 memmove (pstr->wcs, pstr->wcs + offset,
12925 (pstr->valid_len - offset) * sizeof (wint_t));
12926 memmove (pstr->mbs, pstr->mbs + offset, pstr->valid_len - offset);
12927 pstr->valid_len -= offset;
12928 pstr->valid_raw_len -= offset;
12929 for (low = 0; low < pstr->valid_len; low++)
12930 pstr->offsets[low] = pstr->offsets[low + offset] - offset;
12936 pstr->len = pstr->raw_len - idx + offset;
12937 pstr->stop = pstr->raw_stop - idx + offset;
12938 pstr->offsets_needed = 0;
12939 while (mid > 0 && pstr->offsets[mid - 1] == offset)
12941 while (mid < pstr->valid_len)
12942 if (pstr->wcs[mid] != (0xffffffffu))
12946 if (mid == pstr->valid_len)
12947 pstr->valid_len = 0;
12950 pstr->valid_len = pstr->offsets[mid] - offset;
12951 if (pstr->valid_len)
12953 for (low = 0; low < pstr->valid_len; ++low)
12954 pstr->wcs[low] = (0xffffffffu);
12955 memset (pstr->mbs, 255, pstr->valid_len);
12958 pstr->valid_raw_len = pstr->valid_len;
12964 pstr->tip_context = re_string_context_at (pstr, offset - 1,
12967 if (pstr->mb_cur_max > 1)
12968 memmove (pstr->wcs, pstr->wcs + offset,
12969 (pstr->valid_len - offset) * sizeof (wint_t));
12971 if (__builtin_expect (pstr->mbs_allocated, 0))
12972 memmove (pstr->mbs, pstr->mbs + offset,
12973 pstr->valid_len - offset);
12974 pstr->valid_len -= offset;
12975 pstr->valid_raw_len -= offset;
12984 int prev_valid_len = pstr->valid_len;
12987 if (__builtin_expect (pstr->offsets_needed, 0))
12989 pstr->len = pstr->raw_len - idx + offset;
12990 pstr->stop = pstr->raw_stop - idx + offset;
12991 pstr->offsets_needed = 0;
12994 pstr->valid_len = 0;
12996 if (pstr->mb_cur_max > 1)
12999 wint_t wc = (0xffffffffu);
13003 const unsigned char *raw, *p, *q, *end;
13007 raw = pstr->raw_mbs + pstr->raw_mbs_idx;
13008 end = raw + (offset - pstr->mb_cur_max);
13009 if (end < pstr->raw_mbs)
13010 end = pstr->raw_mbs;
13011 p = raw + offset - 1;
13015 if ((((*p) & ~0x7f) == 0) && __builtin_expect (pstr->trans == ((void *)0), 1))
13017 memset (&pstr->cur_state, '\0', sizeof (mbstate_t));
13023 for (; p >= end; --p)
13024 if ((*p & 0xc0) != 0x80)
13026 mbstate_t cur_state;
13028 int mlen = raw + pstr->len - p;
13029 unsigned char buf[6];
13033 if (__builtin_expect (pstr->trans != ((void *)0), 0))
13035 int i = mlen < 6 ? mlen : 6;
13037 buf[i] = pstr->trans[p[i]];
13042 memset (&cur_state, 0, sizeof (cur_state));
13043 mbclen = mbrtowc (&wc2, (const char *) p, mlen,
13045 if (raw + offset - p <= mbclen
13046 && mbclen < (size_t) -2)
13048 memset (&pstr->cur_state, '\0',
13049 sizeof (mbstate_t));
13050 pstr->valid_len = mbclen - (raw + offset - p);
13057 if (wc == (0xffffffffu))
13058 pstr->valid_len = re_string_skip_chars (pstr, idx, &wc) - idx;
13059 if (wc == (0xffffffffu))
13061 = re_string_context_at (pstr, prev_valid_len - 1, eflags);
13063 pstr->tip_context = ((__builtin_expect (pstr->word_ops_used != 0, 0)
13064 && (iswalnum (wc) || (wc) == L'_'))
13066 : ((((wc) == L'\n')
13067 && pstr->newline_anchor)
13069 if (__builtin_expect (pstr->valid_len, 0))
13071 for (wcs_idx = 0; wcs_idx < pstr->valid_len; ++wcs_idx)
13072 pstr->wcs[wcs_idx] = (0xffffffffu);
13073 if (pstr->mbs_allocated)
13074 memset (pstr->mbs, 255, pstr->valid_len);
13076 pstr->valid_raw_len = pstr->valid_len;
13081 int c = pstr->raw_mbs[pstr->raw_mbs_idx + offset - 1];
13082 pstr->valid_raw_len = 0;
13084 c = pstr->trans[c];
13085 pstr->tip_context = ((pstr->word_char[c / (sizeof (bitset_word_t) * 8)] & ((bitset_word_t) 1 << c % (sizeof (bitset_word_t) * 8)))
13087 : ((((c) == '\n') && pstr->newline_anchor)
13091 if (!__builtin_expect (pstr->mbs_allocated, 0))
13092 pstr->mbs += offset;
13094 pstr->raw_mbs_idx = idx;
13095 pstr->len -= offset;
13096 pstr->stop -= offset;
13100 if (pstr->mb_cur_max > 1)
13104 reg_errcode_t ret = build_wcs_upper_buffer (pstr);
13105 if (__builtin_expect (ret != REG_NOERROR, 0))
13109 build_wcs_buffer (pstr);
13113 if (__builtin_expect (pstr->mbs_allocated, 0))
13116 build_upper_buffer (pstr);
13117 else if (pstr->trans != ((void *)0))
13118 re_string_translate_buffer (pstr);
13121 pstr->valid_len = pstr->len;
13124 return REG_NOERROR;
13127 static unsigned char
13128 __attribute__ ((pure))
13129 re_string_peek_byte_case (const re_string_t *pstr, int idx)
13134 if (__builtin_expect (!pstr->mbs_allocated, 1))
13135 return ((pstr)->mbs[(pstr)->cur_idx + idx]);
13138 if (pstr->mb_cur_max > 1
13139 && ! ((pstr)->wcs[pstr->cur_idx + idx] != (0xffffffffu) && ((pstr)->valid_len == (pstr->cur_idx + idx) + 1 || (pstr)->wcs[(pstr->cur_idx + idx) + 1] != (0xffffffffu))))
13140 return ((pstr)->mbs[(pstr)->cur_idx + idx]);
13143 off = pstr->cur_idx + idx;
13145 if (pstr->offsets_needed)
13146 off = pstr->offsets[off];
13149 ch = pstr->raw_mbs[pstr->raw_mbs_idx + off];
13156 if (pstr->offsets_needed && !(((ch) & ~0x7f) == 0))
13157 return ((pstr)->mbs[(pstr)->cur_idx + idx]);
13163 static unsigned char
13164 __attribute__ ((pure))
13165 re_string_fetch_byte_case (re_string_t *pstr)
13167 if (__builtin_expect (!pstr->mbs_allocated, 1))
13168 return ((pstr)->mbs[(pstr)->cur_idx++]);
13171 if (pstr->offsets_needed)
13174 # 876 "regex_internal.c"
13175 if (!((pstr->cur_idx) == (pstr)->valid_len || (pstr)->wcs[pstr->cur_idx] != (0xffffffffu)))
13176 return ((pstr)->mbs[(pstr)->cur_idx++]);
13178 off = pstr->offsets[pstr->cur_idx];
13179 ch = pstr->raw_mbs[pstr->raw_mbs_idx + off];
13181 if (! (((ch) & ~0x7f) == 0))
13182 return ((pstr)->mbs[(pstr)->cur_idx++]);
13184 ((pstr)->cur_idx += (re_string_char_size_at (pstr, pstr->cur_idx)));
13190 return pstr->raw_mbs[pstr->raw_mbs_idx + pstr->cur_idx++];
13195 re_string_destruct (re_string_t *pstr)
13199 free (pstr->offsets);
13201 if (pstr->mbs_allocated)
13207 static unsigned int
13209 re_string_context_at (const re_string_t *input, int idx, int eflags)
13212 if (__builtin_expect (idx < 0, 0))
13215 return input->tip_context;
13216 if (__builtin_expect (idx == input->len, 0))
13217 return ((eflags & (1 << 1)) ? (((1 << 1) << 1) << 1)
13218 : (1 << 1) | (((1 << 1) << 1) << 1));
13220 if (input->mb_cur_max > 1)
13224 while(input->wcs[wc_idx] == (0xffffffffu))
13232 return input->tip_context;
13234 wc = input->wcs[wc_idx];
13235 if (__builtin_expect (input->word_ops_used != 0, 0) && (iswalnum (wc) || (wc) == L'_'))
13237 return (((wc) == L'\n') && input->newline_anchor
13243 c = ((input)->mbs[idx]);
13244 if ((input->word_char[c / (sizeof (bitset_word_t) * 8)] & ((bitset_word_t) 1 << c % (sizeof (bitset_word_t) * 8))))
13246 return ((c) == '\n') && input->newline_anchor ? (1 << 1) : 0;
13252 static reg_errcode_t
13254 re_node_set_alloc (re_node_set *set, int size)
13258 set->elems = ((int *) malloc ((size) * sizeof (int)));
13259 if (__builtin_expect (set->elems == ((void *)0), 0))
13261 return REG_NOERROR;
13264 static reg_errcode_t
13266 re_node_set_init_1 (re_node_set *set, int elem)
13270 set->elems = ((int *) malloc ((1) * sizeof (int)));
13271 if (__builtin_expect (set->elems == ((void *)0), 0))
13273 set->alloc = set->nelem = 0;
13276 set->elems[0] = elem;
13277 return REG_NOERROR;
13280 static reg_errcode_t
13282 re_node_set_init_2 (re_node_set *set, int elem1, int elem2)
13285 set->elems = ((int *) malloc ((2) * sizeof (int)));
13286 if (__builtin_expect (set->elems == ((void *)0), 0))
13288 if (elem1 == elem2)
13291 set->elems[0] = elem1;
13298 set->elems[0] = elem1;
13299 set->elems[1] = elem2;
13303 set->elems[0] = elem2;
13304 set->elems[1] = elem1;
13307 return REG_NOERROR;
13310 static reg_errcode_t
13312 re_node_set_init_copy (re_node_set *dest, const re_node_set *src)
13314 dest->nelem = src->nelem;
13315 if (src->nelem > 0)
13317 dest->alloc = dest->nelem;
13318 dest->elems = ((int *) malloc ((dest->alloc) * sizeof (int)));
13319 if (__builtin_expect (dest->elems == ((void *)0), 0))
13321 dest->alloc = dest->nelem = 0;
13324 memcpy (dest->elems, src->elems, src->nelem * sizeof (int));
13327 memset (dest, '\0', sizeof (re_node_set));
13328 return REG_NOERROR;
13335 static reg_errcode_t
13337 re_node_set_add_intersect (re_node_set *dest, const re_node_set *src1,
13338 const re_node_set *src2)
13340 int i1, i2, is, id, delta, sbase;
13341 if (src1->nelem == 0 || src2->nelem == 0)
13342 return REG_NOERROR;
13346 if (src1->nelem + src2->nelem + dest->nelem > dest->alloc)
13348 int new_alloc = src1->nelem + src2->nelem + dest->alloc;
13349 int *new_elems = ((int *) realloc (dest->elems, (new_alloc) * sizeof (int)));
13350 if (__builtin_expect (new_elems == ((void *)0), 0))
13352 dest->elems = new_elems;
13353 dest->alloc = new_alloc;
13358 sbase = dest->nelem + src1->nelem + src2->nelem;
13359 i1 = src1->nelem - 1;
13360 i2 = src2->nelem - 1;
13361 id = dest->nelem - 1;
13364 if (src1->elems[i1] == src2->elems[i2])
13367 while (id >= 0 && dest->elems[id] > src1->elems[i1])
13370 if (id < 0 || dest->elems[id] != src1->elems[i1])
13371 dest->elems[--sbase] = src1->elems[i1];
13373 if (--i1 < 0 || --i2 < 0)
13378 else if (src1->elems[i1] < src2->elems[i2])
13390 id = dest->nelem - 1;
13391 is = dest->nelem + src1->nelem + src2->nelem - 1;
13392 delta = is - sbase + 1;
13397 dest->nelem += delta;
13398 if (delta > 0 && id >= 0)
13401 if (dest->elems[is] > dest->elems[id])
13404 dest->elems[id + delta--] = dest->elems[is--];
13411 dest->elems[id + delta] = dest->elems[id];
13418 memcpy (dest->elems, dest->elems + sbase, delta * sizeof (int));
13420 return REG_NOERROR;
13426 static reg_errcode_t
13428 re_node_set_init_union (re_node_set *dest, const re_node_set *src1,
13429 const re_node_set *src2)
13432 if (src1 != ((void *)0) && src1->nelem > 0 && src2 != ((void *)0) && src2->nelem > 0)
13434 dest->alloc = src1->nelem + src2->nelem;
13435 dest->elems = ((int *) malloc ((dest->alloc) * sizeof (int)));
13436 if (__builtin_expect (dest->elems == ((void *)0), 0))
13441 if (src1 != ((void *)0) && src1->nelem > 0)
13442 return re_node_set_init_copy (dest, src1);
13443 else if (src2 != ((void *)0) && src2->nelem > 0)
13444 return re_node_set_init_copy (dest, src2);
13446 memset (dest, '\0', sizeof (re_node_set));
13447 return REG_NOERROR;
13449 for (i1 = i2 = id = 0 ; i1 < src1->nelem && i2 < src2->nelem ;)
13451 if (src1->elems[i1] > src2->elems[i2])
13453 dest->elems[id++] = src2->elems[i2++];
13456 if (src1->elems[i1] == src2->elems[i2])
13458 dest->elems[id++] = src1->elems[i1++];
13460 if (i1 < src1->nelem)
13462 memcpy (dest->elems + id, src1->elems + i1,
13463 (src1->nelem - i1) * sizeof (int));
13464 id += src1->nelem - i1;
13466 else if (i2 < src2->nelem)
13468 memcpy (dest->elems + id, src2->elems + i2,
13469 (src2->nelem - i2) * sizeof (int));
13470 id += src2->nelem - i2;
13473 return REG_NOERROR;
13479 static reg_errcode_t
13481 re_node_set_merge (re_node_set *dest, const re_node_set *src)
13483 int is, id, sbase, delta;
13484 if (src == ((void *)0) || src->nelem == 0)
13485 return REG_NOERROR;
13486 if (dest->alloc < 2 * src->nelem + dest->nelem)
13488 int new_alloc = 2 * (src->nelem + dest->alloc);
13489 int *new_buffer = ((int *) realloc (dest->elems, (new_alloc) * sizeof (int)));
13490 if (__builtin_expect (new_buffer == ((void *)0), 0))
13492 dest->elems = new_buffer;
13493 dest->alloc = new_alloc;
13496 if (__builtin_expect (dest->nelem == 0, 0))
13498 dest->nelem = src->nelem;
13499 memcpy (dest->elems, src->elems, src->nelem * sizeof (int));
13500 return REG_NOERROR;
13505 for (sbase = dest->nelem + 2 * src->nelem,
13506 is = src->nelem - 1, id = dest->nelem - 1; is >= 0 && id >= 0; )
13508 if (dest->elems[id] == src->elems[is])
13510 else if (dest->elems[id] < src->elems[is])
13511 dest->elems[--sbase] = src->elems[is--];
13520 memcpy (dest->elems + sbase, src->elems, (is + 1) * sizeof (int));
13523 id = dest->nelem - 1;
13524 is = dest->nelem + 2 * src->nelem - 1;
13525 delta = is - sbase + 1;
13527 return REG_NOERROR;
13531 dest->nelem += delta;
13534 if (dest->elems[is] > dest->elems[id])
13537 dest->elems[id + delta--] = dest->elems[is--];
13544 dest->elems[id + delta] = dest->elems[id];
13548 memcpy (dest->elems, dest->elems + sbase,
13549 delta * sizeof (int));
13555 return REG_NOERROR;
13564 re_node_set_insert (re_node_set *set, int elem)
13568 if (set->alloc == 0)
13570 if (__builtin_expect (re_node_set_init_1 (set, elem) == REG_NOERROR, 1))
13576 if (__builtin_expect (set->nelem, 0) == 0)
13579 set->elems[0] = elem;
13585 if (set->alloc == set->nelem)
13588 set->alloc = set->alloc * 2;
13589 new_elems = ((int *) realloc (set->elems, (set->alloc) * sizeof (int)));
13590 if (__builtin_expect (new_elems == ((void *)0), 0))
13592 set->elems = new_elems;
13597 if (elem < set->elems[0])
13600 for (idx = set->nelem; idx > 0; idx--)
13601 set->elems[idx] = set->elems[idx - 1];
13605 for (idx = set->nelem; set->elems[idx - 1] > elem; idx--)
13606 set->elems[idx] = set->elems[idx - 1];
13610 set->elems[idx] = elem;
13621 re_node_set_insert_last (re_node_set *set, int elem)
13624 if (set->alloc == set->nelem)
13627 set->alloc = (set->alloc + 1) * 2;
13628 new_elems = ((int *) realloc (set->elems, (set->alloc) * sizeof (int)));
13629 if (__builtin_expect (new_elems == ((void *)0), 0))
13631 set->elems = new_elems;
13635 set->elems[set->nelem++] = elem;
13643 __attribute__ ((pure))
13644 re_node_set_compare (const re_node_set *set1, const re_node_set *set2)
13647 if (set1 == ((void *)0) || set2 == ((void *)0) || set1->nelem != set2->nelem)
13649 for (i = set1->nelem ; --i >= 0 ; )
13650 if (set1->elems[i] != set2->elems[i])
13658 __attribute__ ((pure))
13659 re_node_set_contains (const re_node_set *set, int elem)
13661 unsigned int idx, right, mid;
13662 if (set->nelem <= 0)
13667 right = set->nelem - 1;
13668 while (idx < right)
13670 mid = (idx + right) / 2;
13671 if (set->elems[mid] < elem)
13676 return set->elems[idx] == elem ? idx + 1 : 0;
13681 re_node_set_remove_at (re_node_set *set, int idx)
13683 if (idx < 0 || idx >= set->nelem)
13686 for (; idx < set->nelem; idx++)
13687 set->elems[idx] = set->elems[idx + 1];
13696 re_dfa_add_node (re_dfa_t *dfa, re_token_t token)
13698 int type = token.type;
13699 if (__builtin_expect (dfa->nodes_len >= dfa->nodes_alloc, 0))
13701 size_t new_nodes_alloc = dfa->nodes_alloc * 2;
13702 int *new_nexts, *new_indices;
13703 re_node_set *new_edests, *new_eclosures;
13704 re_token_t *new_nodes;
13707 if (__builtin_expect (new_nodes_alloc < dfa->nodes_alloc, 0))
13710 new_nodes = ((re_token_t *) realloc (dfa->nodes, (new_nodes_alloc) * sizeof (re_token_t)));
13711 if (__builtin_expect (new_nodes == ((void *)0), 0))
13713 dfa->nodes = new_nodes;
13714 new_nexts = ((int *) realloc (dfa->nexts, (new_nodes_alloc) * sizeof (int)));
13715 new_indices = ((int *) realloc (dfa->org_indices, (new_nodes_alloc) * sizeof (int)));
13716 new_edests = ((re_node_set *) realloc (dfa->edests, (new_nodes_alloc) * sizeof (re_node_set)));
13717 new_eclosures = ((re_node_set *) realloc (dfa->eclosures, (new_nodes_alloc) * sizeof (re_node_set)));
13718 if (__builtin_expect (new_nexts == ((void *)0) || new_indices == ((void *)0) || new_edests == ((void *)0) || new_eclosures == ((void *)0), 0))
13721 dfa->nexts = new_nexts;
13722 dfa->org_indices = new_indices;
13723 dfa->edests = new_edests;
13724 dfa->eclosures = new_eclosures;
13725 dfa->nodes_alloc = new_nodes_alloc;
13727 dfa->nodes[dfa->nodes_len] = token;
13728 dfa->nodes[dfa->nodes_len].constraint = 0;
13730 dfa->nodes[dfa->nodes_len].accept_mb =
13731 (type == OP_PERIOD && dfa->mb_cur_max > 1) || type == COMPLEX_BRACKET;
13733 dfa->nexts[dfa->nodes_len] = -1;
13734 memset (dfa->edests + dfa->nodes_len, '\0', sizeof (re_node_set));
13735 memset (dfa->eclosures + dfa->nodes_len, '\0', sizeof (re_node_set));
13736 return dfa->nodes_len++;
13739 static inline unsigned int
13741 calc_state_hash (const re_node_set *nodes, unsigned int context)
13743 unsigned int hash = nodes->nelem + context;
13745 for (i = 0 ; i < nodes->nelem ; i++)
13746 hash += nodes->elems[i];
13749 # 1460 "regex_internal.c"
13750 static re_dfastate_t *
13752 re_acquire_state (reg_errcode_t *err, const re_dfa_t *dfa,
13753 const re_node_set *nodes)
13756 re_dfastate_t *new_state;
13757 struct re_state_table_entry *spot;
13759 if (__builtin_expect (nodes->nelem == 0, 0))
13761 *err = REG_NOERROR;
13762 return ((void *)0);
13764 hash = calc_state_hash (nodes, 0);
13765 spot = dfa->state_table + (hash & dfa->state_hash_mask);
13767 for (i = 0 ; i < spot->num ; i++)
13769 re_dfastate_t *state = spot->array[i];
13770 if (hash != state->hash)
13772 if (re_node_set_compare (&state->nodes, nodes))
13777 new_state = create_ci_newstate (dfa, nodes, hash);
13778 if (__builtin_expect (new_state == ((void *)0), 0))
13783 # 1504 "regex_internal.c"
13784 static re_dfastate_t *
13786 re_acquire_state_context (reg_errcode_t *err, const re_dfa_t *dfa,
13787 const re_node_set *nodes, unsigned int context)
13790 re_dfastate_t *new_state;
13791 struct re_state_table_entry *spot;
13793 if (nodes->nelem == 0)
13795 *err = REG_NOERROR;
13796 return ((void *)0);
13798 hash = calc_state_hash (nodes, context);
13799 spot = dfa->state_table + (hash & dfa->state_hash_mask);
13801 for (i = 0 ; i < spot->num ; i++)
13803 re_dfastate_t *state = spot->array[i];
13804 if (state->hash == hash
13805 && state->context == context
13806 && re_node_set_compare (state->entrance_nodes, nodes))
13810 new_state = create_cd_newstate (dfa, nodes, context, hash);
13811 if (__builtin_expect (new_state == ((void *)0), 0))
13821 static reg_errcode_t
13822 register_state (const re_dfa_t *dfa, re_dfastate_t *newstate,
13825 struct re_state_table_entry *spot;
13829 newstate->hash = hash;
13830 err = re_node_set_alloc (&newstate->non_eps_nodes, newstate->nodes.nelem);
13831 if (__builtin_expect (err != REG_NOERROR, 0))
13833 for (i = 0; i < newstate->nodes.nelem; i++)
13835 int elem = newstate->nodes.elems[i];
13836 if (!((dfa->nodes[elem].type) & 8))
13837 re_node_set_insert_last (&newstate->non_eps_nodes, elem);
13840 spot = dfa->state_table + (hash & dfa->state_hash_mask);
13841 if (__builtin_expect (spot->alloc <= spot->num, 0))
13843 int new_alloc = 2 * spot->num + 2;
13844 re_dfastate_t **new_array = ((re_dfastate_t * *) realloc (spot->array, (new_alloc) * sizeof (re_dfastate_t *)));
13846 if (__builtin_expect (new_array == ((void *)0), 0))
13848 spot->array = new_array;
13849 spot->alloc = new_alloc;
13851 spot->array[spot->num++] = newstate;
13852 return REG_NOERROR;
13856 free_state (re_dfastate_t *state)
13858 free ((&state->non_eps_nodes)->elems);
13859 free ((&state->inveclosure)->elems);
13860 if (state->entrance_nodes != &state->nodes)
13862 free ((state->entrance_nodes)->elems);
13863 free (state->entrance_nodes);
13865 free ((&state->nodes)->elems);
13866 free (state->word_trtable);
13867 free (state->trtable);
13874 static re_dfastate_t *
13876 create_ci_newstate (const re_dfa_t *dfa, const re_node_set *nodes,
13881 re_dfastate_t *newstate;
13883 newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1);
13884 if (__builtin_expect (newstate == ((void *)0), 0))
13885 return ((void *)0);
13886 err = re_node_set_init_copy (&newstate->nodes, nodes);
13887 if (__builtin_expect (err != REG_NOERROR, 0))
13890 return ((void *)0);
13893 newstate->entrance_nodes = &newstate->nodes;
13894 for (i = 0 ; i < nodes->nelem ; i++)
13896 re_token_t *node = dfa->nodes + nodes->elems[i];
13897 re_token_type_t type = node->type;
13898 if (type == CHARACTER && !node->constraint)
13901 newstate->accept_mb |= node->accept_mb;
13905 if (type == END_OF_RE)
13906 newstate->halt = 1;
13907 else if (type == OP_BACK_REF)
13908 newstate->has_backref = 1;
13909 else if (type == ANCHOR || node->constraint)
13910 newstate->has_constraint = 1;
13912 err = register_state (dfa, newstate, hash);
13913 if (__builtin_expect (err != REG_NOERROR, 0))
13915 free_state (newstate);
13916 newstate = ((void *)0);
13924 static re_dfastate_t *
13926 create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes,
13927 unsigned int context, unsigned int hash)
13929 int i, nctx_nodes = 0;
13931 re_dfastate_t *newstate;
13933 newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1);
13934 if (__builtin_expect (newstate == ((void *)0), 0))
13935 return ((void *)0);
13936 err = re_node_set_init_copy (&newstate->nodes, nodes);
13937 if (__builtin_expect (err != REG_NOERROR, 0))
13940 return ((void *)0);
13943 newstate->context = context;
13944 newstate->entrance_nodes = &newstate->nodes;
13946 for (i = 0 ; i < nodes->nelem ; i++)
13948 unsigned int constraint = 0;
13949 re_token_t *node = dfa->nodes + nodes->elems[i];
13950 re_token_type_t type = node->type;
13951 if (node->constraint)
13952 constraint = node->constraint;
13954 if (type == CHARACTER && !constraint)
13957 newstate->accept_mb |= node->accept_mb;
13961 if (type == END_OF_RE)
13962 newstate->halt = 1;
13963 else if (type == OP_BACK_REF)
13964 newstate->has_backref = 1;
13965 else if (type == ANCHOR)
13966 constraint = node->opr.ctx_type;
13970 if (newstate->entrance_nodes == &newstate->nodes)
13972 newstate->entrance_nodes = ((re_node_set *) malloc ((1) * sizeof (re_node_set)));
13973 if (__builtin_expect (newstate->entrance_nodes == ((void *)0), 0))
13975 free_state (newstate);
13976 return ((void *)0);
13978 re_node_set_init_copy (newstate->entrance_nodes, nodes);
13980 newstate->has_constraint = 1;
13983 if (((((constraint) & 0x0001) && !((context) & 1)) || ((constraint & 0x0002) && ((context) & 1)) || ((constraint & 0x0010) && !((context) & (1 << 1))) || ((constraint & 0x0040) && !((context) & ((1 << 1) << 1)))))
13985 re_node_set_remove_at (&newstate->nodes, i - nctx_nodes);
13990 err = register_state (dfa, newstate, hash);
13991 if (__builtin_expect (err != REG_NOERROR, 0))
13993 free_state (newstate);
13994 newstate = ((void *)0);
14001 static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern,
14002 size_t length, reg_syntax_t syntax);
14003 static void re_compile_fastmap_iter (regex_t *bufp,
14004 const re_dfastate_t *init_state,
14006 static reg_errcode_t init_dfa (re_dfa_t *dfa, size_t pat_len);
14008 static void free_charset (re_charset_t *cset);
14010 static void free_workarea_compile (regex_t *preg);
14011 static reg_errcode_t create_initial_state (re_dfa_t *dfa);
14013 static void optimize_utf8 (re_dfa_t *dfa);
14015 static reg_errcode_t analyze (regex_t *preg);
14016 static reg_errcode_t preorder (bin_tree_t *root,
14017 reg_errcode_t (fn (void *, bin_tree_t *)),
14019 static reg_errcode_t postorder (bin_tree_t *root,
14020 reg_errcode_t (fn (void *, bin_tree_t *)),
14022 static reg_errcode_t optimize_subexps (void *extra, bin_tree_t *node);
14023 static reg_errcode_t lower_subexps (void *extra, bin_tree_t *node);
14024 static bin_tree_t *lower_subexp (reg_errcode_t *err, regex_t *preg,
14026 static reg_errcode_t calc_first (void *extra, bin_tree_t *node);
14027 static reg_errcode_t calc_next (void *extra, bin_tree_t *node);
14028 static reg_errcode_t link_nfa_nodes (void *extra, bin_tree_t *node);
14029 static int duplicate_node (re_dfa_t *dfa, int org_idx, unsigned int constraint);
14030 static int search_duplicated_node (const re_dfa_t *dfa, int org_node,
14031 unsigned int constraint);
14032 static reg_errcode_t calc_eclosure (re_dfa_t *dfa);
14033 static reg_errcode_t calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa,
14034 int node, int root);
14035 static reg_errcode_t calc_inveclosure (re_dfa_t *dfa);
14036 static int fetch_number (re_string_t *input, re_token_t *token,
14037 reg_syntax_t syntax);
14038 static int peek_token (re_token_t *token, re_string_t *input,
14039 reg_syntax_t syntax) ;
14040 static bin_tree_t *parse (re_string_t *regexp, regex_t *preg,
14041 reg_syntax_t syntax, reg_errcode_t *err);
14042 static bin_tree_t *parse_reg_exp (re_string_t *regexp, regex_t *preg,
14043 re_token_t *token, reg_syntax_t syntax,
14044 int nest, reg_errcode_t *err);
14045 static bin_tree_t *parse_branch (re_string_t *regexp, regex_t *preg,
14046 re_token_t *token, reg_syntax_t syntax,
14047 int nest, reg_errcode_t *err);
14048 static bin_tree_t *parse_expression (re_string_t *regexp, regex_t *preg,
14049 re_token_t *token, reg_syntax_t syntax,
14050 int nest, reg_errcode_t *err);
14051 static bin_tree_t *parse_sub_exp (re_string_t *regexp, regex_t *preg,
14052 re_token_t *token, reg_syntax_t syntax,
14053 int nest, reg_errcode_t *err);
14054 static bin_tree_t *parse_dup_op (bin_tree_t *dup_elem, re_string_t *regexp,
14055 re_dfa_t *dfa, re_token_t *token,
14056 reg_syntax_t syntax, reg_errcode_t *err);
14057 static bin_tree_t *parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa,
14058 re_token_t *token, reg_syntax_t syntax,
14059 reg_errcode_t *err);
14060 static reg_errcode_t parse_bracket_element (bracket_elem_t *elem,
14061 re_string_t *regexp,
14062 re_token_t *token, int token_len,
14064 reg_syntax_t syntax,
14065 int accept_hyphen);
14066 static reg_errcode_t parse_bracket_symbol (bracket_elem_t *elem,
14067 re_string_t *regexp,
14068 re_token_t *token);
14070 static reg_errcode_t build_equiv_class (bitset_t sbcset,
14071 re_charset_t *mbcset,
14072 int *equiv_class_alloc,
14073 const unsigned char *name);
14074 static reg_errcode_t build_charclass (unsigned char * trans,
14076 re_charset_t *mbcset,
14077 int *char_class_alloc,
14078 const unsigned char *class_name,
14079 reg_syntax_t syntax);
14081 static bin_tree_t *build_charclass_op (re_dfa_t *dfa,
14082 unsigned char * trans,
14083 const unsigned char *class_name,
14084 const unsigned char *extra,
14085 int non_match, reg_errcode_t *err);
14086 static bin_tree_t *create_tree (re_dfa_t *dfa,
14087 bin_tree_t *left, bin_tree_t *right,
14088 re_token_type_t type);
14089 static bin_tree_t *create_token_tree (re_dfa_t *dfa,
14090 bin_tree_t *left, bin_tree_t *right,
14091 const re_token_t *token);
14092 static bin_tree_t *duplicate_tree (const bin_tree_t *src, re_dfa_t *dfa);
14093 static void free_token (re_token_t *node);
14094 static reg_errcode_t free_tree (void *extra, bin_tree_t *node);
14095 static reg_errcode_t mark_opt_subexp (void *extra, bin_tree_t *node);
14102 const char __re_error_msgid[] =
14111 "Invalid regular expression"
14114 "Invalid collation character"
14117 "Invalid character class name"
14120 "Trailing backslash"
14123 "Invalid back reference"
14126 "Unmatched [ or [^"
14129 "Unmatched ( or \\("
14135 "Invalid content of \\{\\}"
14138 "Invalid range end"
14144 "Invalid preceding regular expression"
14147 "Premature end of regular expression"
14150 "Regular expression too big"
14153 "Unmatched ) or \\)"
14156 const size_t __re_error_msgid_idx[] =
14159 (0 + sizeof "Success"),
14160 ((0 + sizeof "Success") + sizeof "No match"),
14161 (((0 + sizeof "Success") + sizeof "No match") + sizeof "Invalid regular expression"),
14162 ((((0 + sizeof "Success") + sizeof "No match") + sizeof "Invalid regular expression") + sizeof "Invalid collation character"),
14163 (((((0 + sizeof "Success") + sizeof "No match") + sizeof "Invalid regular expression") + sizeof "Invalid collation character") + sizeof "Invalid character class name"),
14164 ((((((0 + sizeof "Success") + sizeof "No match") + sizeof "Invalid regular expression") + sizeof "Invalid collation character") + sizeof "Invalid character class name") + sizeof "Trailing backslash"),
14165 (((((((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"),
14166 ((((((((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 [^"),
14167 (((((((((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 \\("),
14168 ((((((((((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 \\{"),
14169 (((((((((((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 \\{\\}"),
14170 ((((((((((((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"),
14171 (((((((((((((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"),
14172 ((((((((((((((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"),
14173 (((((((((((((((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"),
14174 ((((((((((((((((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")
14178 __re_compile_pattern (pattern, length, bufp)
14179 const char *pattern;
14181 struct re_pattern_buffer *bufp;
14188 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));
14191 bufp->newline_anchor = 1;
14193 ret = re_compile_internal (bufp, pattern, length, re_syntax_options);
14196 return ((void *)0);
14197 return __dcgettext (_libc_intl_domainname, __re_error_msgid + __re_error_msgid_idx[(int) ret], __LC_MESSAGES);
14200 extern __typeof (__re_compile_pattern) re_compile_pattern __attribute__ ((weak, alias ("__re_compile_pattern")));
14208 reg_syntax_t re_syntax_options;
14211 __re_set_syntax (syntax)
14212 reg_syntax_t syntax;
14214 reg_syntax_t ret = re_syntax_options;
14216 re_syntax_options = syntax;
14220 extern __typeof (__re_set_syntax) re_set_syntax __attribute__ ((weak, alias ("__re_set_syntax")));
14224 __re_compile_fastmap (bufp)
14225 struct re_pattern_buffer *bufp;
14227 re_dfa_t *dfa = (re_dfa_t *) bufp->buffer;
14228 char *fastmap = bufp->fastmap;
14230 memset (fastmap, '\0', sizeof (char) * 256);
14231 re_compile_fastmap_iter (bufp, dfa->init_state, fastmap);
14232 if (dfa->init_state != dfa->init_state_word)
14233 re_compile_fastmap_iter (bufp, dfa->init_state_word, fastmap);
14234 if (dfa->init_state != dfa->init_state_nl)
14235 re_compile_fastmap_iter (bufp, dfa->init_state_nl, fastmap);
14236 if (dfa->init_state != dfa->init_state_begbuf)
14237 re_compile_fastmap_iter (bufp, dfa->init_state_begbuf, fastmap);
14238 bufp->fastmap_accurate = 1;
14242 extern __typeof (__re_compile_fastmap) re_compile_fastmap __attribute__ ((weak, alias ("__re_compile_fastmap")));
14246 __attribute__ ((always_inline))
14247 re_set_fastmap (char *fastmap, int icase, int ch)
14251 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;
14258 re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state,
14261 re_dfa_t *dfa = (re_dfa_t *) bufp->buffer;
14263 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)));
14264 for (node_cnt = 0; node_cnt < init_state->nodes.nelem; ++node_cnt)
14266 int node = init_state->nodes.elems[node_cnt];
14267 re_token_type_t type = dfa->nodes[node].type;
14269 if (type == CHARACTER)
14271 re_set_fastmap (fastmap, icase, dfa->nodes[node].opr.c);
14273 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)
14275 unsigned char *buf = __builtin_alloca (dfa->mb_cur_max), *p;
14280 *p++ = dfa->nodes[node].opr.c;
14281 while (++node < dfa->nodes_len
14282 && dfa->nodes[node].type == CHARACTER
14283 && dfa->nodes[node].mb_partial)
14284 *p++ = dfa->nodes[node].opr.c;
14285 memset (&state, '\0', sizeof (state));
14286 if (mbrtowc (&wc, (const char *) buf, p - buf,
14288 && (__wcrtomb ((char *) buf, towlower (wc), &state)
14290 re_set_fastmap (fastmap, 0, buf[0]);
14294 else if (type == SIMPLE_BRACKET)
14297 for (i = 0, ch = 0; i < (256 / (sizeof (bitset_word_t) * 8)); ++i)
14300 bitset_word_t w = dfa->nodes[node].opr.sbcset[i];
14301 for (j = 0; j < (sizeof (bitset_word_t) * 8); ++j, ++ch)
14302 if (w & ((bitset_word_t) 1 << j))
14303 re_set_fastmap (fastmap, icase, ch);
14307 else if (type == COMPLEX_BRACKET)
14310 re_charset_t *cset = dfa->nodes[node].opr.mbcset;
14311 if (cset->non_match || cset->ncoll_syms || cset->nequiv_classes
14312 || cset->nranges || cset->nchar_classes)
14315 if (((uint32_t) (*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_NRULES) & 0xffff)].word) != 0)
14323 const int32_t *table = (const int32_t *)
14324 ((*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_TABLEMB) & 0xffff)].string);
14325 for (i = 0; i < 256; ++i)
14327 re_set_fastmap (fastmap, icase, i);
14336 for (i = 0; i < cset->nmbchars; ++i)
14340 memset (&state, '\0', sizeof (state));
14341 if (__wcrtomb (buf, cset->mbchars[i], &state) != (size_t) -1)
14342 re_set_fastmap (fastmap, icase, *(unsigned char *) buf);
14343 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)
14345 if (__wcrtomb (buf, towlower (cset->mbchars[i]), &state)
14347 re_set_fastmap (fastmap, 0, *(unsigned char *) buf);
14352 else if (type == OP_PERIOD
14354 || type == OP_UTF8_PERIOD
14356 || type == END_OF_RE)
14358 memset (fastmap, '\1', sizeof (char) * 256);
14359 if (type == END_OF_RE)
14360 bufp->can_be_null = 1;
14367 __regcomp (preg, pattern, cflags)
14368 regex_t *__restrict preg;
14369 const char *__restrict pattern;
14373 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))
14374 : ((((((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)));
14376 preg->buffer = ((void *)0);
14377 preg->allocated = 0;
14381 preg->fastmap = ((char *) malloc ((256) * sizeof (char)));
14382 if (__builtin_expect (preg->fastmap == ((void *)0), 0))
14385 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;
14388 if (cflags & ((1 << 1) << 1))
14390 syntax &= ~((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1);
14391 syntax |= ((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1);
14393 preg->newline_anchor = 1;
14396 preg->newline_anchor = 0;
14397 preg->no_sub = !!(cflags & (((1 << 1) << 1) << 1));
14398 preg->translate = ((void *)0);
14400 ret = re_compile_internal (preg, pattern, strlen (pattern), syntax);
14404 if (ret == REG_ERPAREN)
14408 if (__builtin_expect (ret == REG_NOERROR, 1))
14411 (void) __re_compile_fastmap (preg);
14415 free (preg->fastmap);
14416 preg->fastmap = ((void *)0);
14422 extern __typeof (__regcomp) regcomp __attribute__ ((weak, alias ("__regcomp")));
14429 __regerror(errcode, preg, errbuf, errbuf_size)
14431 const regex_t *__restrict preg;
14432 char *__restrict errbuf;
14433 size_t errbuf_size;
14438 if (__builtin_expect (errcode < 0 || errcode >= (int) (sizeof (__re_error_msgid_idx) / sizeof (__re_error_msgid_idx[0])), 0))
14447 msg = __dcgettext (_libc_intl_domainname, __re_error_msgid + __re_error_msgid_idx[errcode], __LC_MESSAGES);
14449 msg_size = strlen (msg) + 1;
14451 if (__builtin_expect (errbuf_size != 0, 1))
14453 if (__builtin_expect (msg_size > errbuf_size, 0))
14456 *((char *) __builtin_mempcpy (errbuf, msg, errbuf_size - 1)) = '\0';
14463 memcpy (errbuf, msg, msg_size);
14469 extern __typeof (__regerror) regerror __attribute__ ((weak, alias ("__regerror")));
14471 static const bitset_t utf8_sb_map =
14474 [0 ... 0x80 / (sizeof (bitset_word_t) * 8) - 1] = (2147483647L * 2UL + 1UL)
14480 free_dfa_content (re_dfa_t *dfa)
14485 for (i = 0; i < dfa->nodes_len; ++i)
14486 free_token (dfa->nodes + i);
14488 for (i = 0; i < dfa->nodes_len; ++i)
14490 if (dfa->eclosures != ((void *)0))
14491 free ((dfa->eclosures + i)->elems);
14492 if (dfa->inveclosures != ((void *)0))
14493 free ((dfa->inveclosures + i)->elems);
14494 if (dfa->edests != ((void *)0))
14495 free ((dfa->edests + i)->elems);
14497 free (dfa->edests);
14498 free (dfa->eclosures);
14499 free (dfa->inveclosures);
14502 if (dfa->state_table)
14503 for (i = 0; i <= dfa->state_hash_mask; ++i)
14505 struct re_state_table_entry *entry = dfa->state_table + i;
14506 for (j = 0; j < entry->num; ++j)
14508 re_dfastate_t *state = entry->array[j];
14509 free_state (state);
14511 free (entry->array);
14513 free (dfa->state_table);
14515 if (dfa->sb_char != utf8_sb_map)
14516 free (dfa->sb_char);
14518 free (dfa->subexp_map);
14533 re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
14534 if (__builtin_expect (dfa != ((void *)0), 1))
14535 free_dfa_content (dfa);
14536 preg->buffer = ((void *)0);
14537 preg->allocated = 0;
14539 free (preg->fastmap);
14540 preg->fastmap = ((void *)0);
14542 free (preg->translate);
14543 preg->translate = ((void *)0);
14546 extern __typeof (__regfree) regfree __attribute__ ((weak, alias ("__regfree")));
14548 static struct re_pattern_buffer re_comp_buf;
14555 __attribute__ ((weak))
14565 if (!re_comp_buf.buffer)
14566 return __dcgettext (_libc_intl_domainname, "No previous regular expression", __LC_MESSAGES);
14570 if (re_comp_buf.buffer)
14572 fastmap = re_comp_buf.fastmap;
14573 re_comp_buf.fastmap = ((void *)0);
14574 __regfree (&re_comp_buf);
14575 memset (&re_comp_buf, '\0', sizeof (re_comp_buf));
14576 re_comp_buf.fastmap = fastmap;
14579 if (re_comp_buf.fastmap == ((void *)0))
14581 re_comp_buf.fastmap = (char *) malloc (256);
14582 if (re_comp_buf.fastmap == ((void *)0))
14583 return (char *) __dcgettext (_libc_intl_domainname, __re_error_msgid + __re_error_msgid_idx[(int) REG_ESPACE], __LC_MESSAGES);
14591 re_comp_buf.newline_anchor = 1;
14593 ret = re_compile_internal (&re_comp_buf, s, strlen (s), re_syntax_options);
14596 return ((void *)0);
14599 return (char *) __dcgettext (_libc_intl_domainname, __re_error_msgid + __re_error_msgid_idx[(int) ret], __LC_MESSAGES);
14603 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)
14605 __regfree (&re_comp_buf);
14608 static reg_errcode_t
14609 re_compile_internal (regex_t *preg, const char * pattern, size_t length,
14610 reg_syntax_t syntax)
14612 reg_errcode_t err = REG_NOERROR;
14614 re_string_t regexp;
14617 preg->fastmap_accurate = 0;
14618 preg->syntax = syntax;
14619 preg->not_bol = preg->not_eol = 0;
14622 preg->can_be_null = 0;
14623 preg->regs_allocated = 0;
14626 dfa = (re_dfa_t *) preg->buffer;
14627 if (__builtin_expect (preg->allocated < sizeof (re_dfa_t), 0))
14633 dfa = ((re_dfa_t *) realloc (preg->buffer, (1) * sizeof (re_dfa_t)));
14634 if (dfa == ((void *)0))
14636 preg->allocated = sizeof (re_dfa_t);
14637 preg->buffer = (unsigned char *) dfa;
14639 preg->used = sizeof (re_dfa_t);
14641 err = init_dfa (dfa, length);
14642 if (__builtin_expect (err != REG_NOERROR, 0))
14644 free_dfa_content (dfa);
14645 preg->buffer = ((void *)0);
14646 preg->allocated = 0;
14655 ((dfa->lock) = (0), 0);
14657 err = re_string_construct (®exp, pattern, length, preg->translate,
14658 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);
14659 if (__builtin_expect (err != REG_NOERROR, 0))
14661 re_compile_internal_free_return:
14662 free_workarea_compile (preg);
14663 re_string_destruct (®exp);
14664 free_dfa_content (dfa);
14665 preg->buffer = ((void *)0);
14666 preg->allocated = 0;
14672 dfa->str_tree = parse (®exp, preg, syntax, &err);
14673 if (__builtin_expect (dfa->str_tree == ((void *)0), 0))
14674 goto re_compile_internal_free_return;
14677 err = analyze (preg);
14678 if (__builtin_expect (err != REG_NOERROR, 0))
14679 goto re_compile_internal_free_return;
14683 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))
14684 optimize_utf8 (dfa);
14688 err = create_initial_state (dfa);
14691 free_workarea_compile (preg);
14692 re_string_destruct (®exp);
14694 if (__builtin_expect (err != REG_NOERROR, 0))
14696 free_dfa_content (dfa);
14697 preg->buffer = ((void *)0);
14698 preg->allocated = 0;
14707 static reg_errcode_t
14708 init_dfa (re_dfa_t *dfa, size_t pat_len)
14710 unsigned int table_size;
14715 memset (dfa, '\0', sizeof (re_dfa_t));
14718 dfa->str_tree_storage_idx = ((1024 - sizeof (void *)) / sizeof (bin_tree_t));
14721 if (pat_len == (4294967295U))
14724 dfa->nodes_alloc = pat_len + 1;
14725 dfa->nodes = ((re_token_t *) malloc ((dfa->nodes_alloc) * sizeof (re_token_t)));
14728 for (table_size = 1; ; table_size <<= 1)
14729 if (table_size > pat_len)
14732 dfa->state_table = calloc (sizeof (struct re_state_table_entry), table_size);
14733 dfa->state_hash_mask = table_size - 1;
14735 dfa->mb_cur_max = (((uint32_t) (*_nl_current_LC_CTYPE)->values[((int) (_NL_CTYPE_MB_CUR_MAX) & 0xffff)].word));
14737 if (dfa->mb_cur_max == 6
14738 && __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)
14740 dfa->map_notascii = (((uint32_t) (*_nl_current_LC_CTYPE)->values[((int) (_NL_CTYPE_MAP_TO_NONASCII) & 0xffff)].word)
14743 if (dfa->mb_cur_max > 1)
14746 dfa->sb_char = (re_bitset_ptr_t) utf8_sb_map;
14751 dfa->sb_char = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1);
14752 if (__builtin_expect (dfa->sb_char == ((void *)0), 0))
14756 for (i = 0, ch = 0; i < (256 / (sizeof (bitset_word_t) * 8)); ++i)
14757 for (j = 0; j < (sizeof (bitset_word_t) * 8); ++j, ++ch)
14759 wint_t wch = __btowc (ch);
14760 if (wch != (0xffffffffu))
14761 dfa->sb_char[i] |= (bitset_word_t) 1 << j;
14771 if (__builtin_expect (dfa->nodes == ((void *)0) || dfa->state_table == ((void *)0), 0))
14773 return REG_NOERROR;
14782 init_word_char (re_dfa_t *dfa)
14785 dfa->word_ops_used = 1;
14786 for (i = 0, ch = 0; i < (256 / (sizeof (bitset_word_t) * 8)); ++i)
14787 for (j = 0; j < (sizeof (bitset_word_t) * 8); ++j, ++ch)
14788 if (((*__ctype_b_loc ())[(int) ((ch))] & (unsigned short int) _ISalnum) || ch == '_')
14789 dfa->word_char[i] |= (bitset_word_t) 1 << j;
14795 free_workarea_compile (regex_t *preg)
14797 re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
14798 bin_tree_storage_t *storage, *next;
14799 for (storage = dfa->str_tree_storage; storage; storage = next)
14801 next = storage->next;
14804 dfa->str_tree_storage = ((void *)0);
14805 dfa->str_tree_storage_idx = ((1024 - sizeof (void *)) / sizeof (bin_tree_t));
14806 dfa->str_tree = ((void *)0);
14807 free (dfa->org_indices);
14808 dfa->org_indices = ((void *)0);
14813 static reg_errcode_t
14814 create_initial_state (re_dfa_t *dfa)
14818 re_node_set init_nodes;
14822 first = dfa->str_tree->first->node_idx;
14823 dfa->init_node = first;
14824 err = re_node_set_init_copy (&init_nodes, dfa->eclosures + first);
14825 if (__builtin_expect (err != REG_NOERROR, 0))
14832 if (dfa->nbackref > 0)
14833 for (i = 0; i < init_nodes.nelem; ++i)
14835 int node_idx = init_nodes.elems[i];
14836 re_token_type_t type = dfa->nodes[node_idx].type;
14839 if (type != OP_BACK_REF)
14841 for (clexp_idx = 0; clexp_idx < init_nodes.nelem; ++clexp_idx)
14843 re_token_t *clexp_node;
14844 clexp_node = dfa->nodes + init_nodes.elems[clexp_idx];
14845 if (clexp_node->type == OP_CLOSE_SUBEXP
14846 && clexp_node->opr.idx == dfa->nodes[node_idx].opr.idx)
14849 if (clexp_idx == init_nodes.nelem)
14852 if (type == OP_BACK_REF)
14854 int dest_idx = dfa->edests[node_idx].elems[0];
14855 if (!re_node_set_contains (&init_nodes, dest_idx))
14857 re_node_set_merge (&init_nodes, dfa->eclosures + dest_idx);
14864 dfa->init_state = re_acquire_state_context (&err, dfa, &init_nodes, 0);
14866 if (__builtin_expect (dfa->init_state == ((void *)0), 0))
14868 if (dfa->init_state->has_constraint)
14870 dfa->init_state_word = re_acquire_state_context (&err, dfa, &init_nodes,
14872 dfa->init_state_nl = re_acquire_state_context (&err, dfa, &init_nodes,
14874 dfa->init_state_begbuf = re_acquire_state_context (&err, dfa,
14877 | ((1 << 1) << 1));
14878 if (__builtin_expect (dfa->init_state_word == ((void *)0) || dfa->init_state_nl == ((void *)0) || dfa->init_state_begbuf == ((void *)0), 0))
14883 dfa->init_state_word = dfa->init_state_nl
14884 = dfa->init_state_begbuf = dfa->init_state;
14886 free ((&init_nodes)->elems);
14887 return REG_NOERROR;
14896 optimize_utf8 (re_dfa_t *dfa)
14898 int node, i, mb_chars = 0, has_period = 0;
14900 for (node = 0; node < dfa->nodes_len; ++node)
14901 switch (dfa->nodes[node].type)
14904 if (dfa->nodes[node].opr.c >= 0x80)
14908 switch (dfa->nodes[node].opr.idx)
14926 case OP_DUP_ASTERISK:
14927 case OP_OPEN_SUBEXP:
14928 case OP_CLOSE_SUBEXP:
14930 case COMPLEX_BRACKET:
14932 case SIMPLE_BRACKET:
14934 ((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)));
14935 for (i = 0x80 / (sizeof (bitset_word_t) * 8); i < (256 / (sizeof (bitset_word_t) * 8)); ++i)
14936 if (dfa->nodes[node].opr.sbcset[i])
14943 if (mb_chars || has_period)
14944 for (node = 0; node < dfa->nodes_len; ++node)
14946 if (dfa->nodes[node].type == CHARACTER
14947 && dfa->nodes[node].opr.c >= 0x80)
14948 dfa->nodes[node].mb_partial = 0;
14949 else if (dfa->nodes[node].type == OP_PERIOD)
14950 dfa->nodes[node].type = OP_UTF8_PERIOD;
14954 dfa->mb_cur_max = 1;
14956 dfa->has_mb_node = dfa->nbackref > 0 || has_period;
14963 static reg_errcode_t
14964 analyze (regex_t *preg)
14966 re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
14970 dfa->nexts = ((int *) malloc ((dfa->nodes_alloc) * sizeof (int)));
14971 dfa->org_indices = ((int *) malloc ((dfa->nodes_alloc) * sizeof (int)));
14972 dfa->edests = ((re_node_set *) malloc ((dfa->nodes_alloc) * sizeof (re_node_set)));
14973 dfa->eclosures = ((re_node_set *) malloc ((dfa->nodes_alloc) * sizeof (re_node_set)));
14974 if (__builtin_expect (dfa->nexts == ((void *)0) || dfa->org_indices == ((void *)0) || dfa->edests == ((void *)0) || dfa->eclosures == ((void *)0), 0))
14978 dfa->subexp_map = ((int *) malloc ((preg->re_nsub) * sizeof (int)));
14979 if (dfa->subexp_map != ((void *)0))
14982 for (i = 0; i < preg->re_nsub; i++)
14983 dfa->subexp_map[i] = i;
14984 preorder (dfa->str_tree, optimize_subexps, dfa);
14985 for (i = 0; i < preg->re_nsub; i++)
14986 if (dfa->subexp_map[i] != i)
14988 if (i == preg->re_nsub)
14990 free (dfa->subexp_map);
14991 dfa->subexp_map = ((void *)0);
14995 ret = postorder (dfa->str_tree, lower_subexps, preg);
14996 if (__builtin_expect (ret != REG_NOERROR, 0))
14998 ret = postorder (dfa->str_tree, calc_first, dfa);
14999 if (__builtin_expect (ret != REG_NOERROR, 0))
15001 preorder (dfa->str_tree, calc_next, dfa);
15002 ret = preorder (dfa->str_tree, link_nfa_nodes, dfa);
15003 if (__builtin_expect (ret != REG_NOERROR, 0))
15005 ret = calc_eclosure (dfa);
15006 if (__builtin_expect (ret != REG_NOERROR, 0))
15011 if ((!preg->no_sub && preg->re_nsub > 0 && dfa->has_plural_match)
15014 dfa->inveclosures = ((re_node_set *) malloc ((dfa->nodes_len) * sizeof (re_node_set)));
15015 if (__builtin_expect (dfa->inveclosures == ((void *)0), 0))
15017 ret = calc_inveclosure (dfa);
15026 static reg_errcode_t
15027 postorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)),
15030 bin_tree_t *node, *prev;
15032 for (node = root; ; )
15036 while (node->left || node->right)
15040 node = node->right;
15044 reg_errcode_t err = fn (extra, node);
15045 if (__builtin_expect (err != REG_NOERROR, 0))
15047 if (node->parent == ((void *)0))
15048 return REG_NOERROR;
15050 node = node->parent;
15053 while (node->right == prev || node->right == ((void *)0));
15054 node = node->right;
15058 static reg_errcode_t
15059 preorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)),
15064 for (node = root; ; )
15066 reg_errcode_t err = fn (extra, node);
15067 if (__builtin_expect (err != REG_NOERROR, 0))
15075 bin_tree_t *prev = ((void *)0);
15076 while (node->right == prev || node->right == ((void *)0))
15079 node = node->parent;
15081 return REG_NOERROR;
15083 node = node->right;
15091 static reg_errcode_t
15092 optimize_subexps (void *extra, bin_tree_t *node)
15094 re_dfa_t *dfa = (re_dfa_t *) extra;
15096 if (node->token.type == OP_BACK_REF && dfa->subexp_map)
15098 int idx = node->token.opr.idx;
15099 node->token.opr.idx = dfa->subexp_map[idx];
15100 dfa->used_bkref_map |= 1 << node->token.opr.idx;
15103 else if (node->token.type == SUBEXP
15104 && node->left && node->left->token.type == SUBEXP)
15106 int other_idx = node->left->token.opr.idx;
15108 node->left = node->left->left;
15110 node->left->parent = node;
15112 dfa->subexp_map[other_idx] = dfa->subexp_map[node->token.opr.idx];
15113 if (other_idx < (sizeof (bitset_word_t) * 8))
15114 dfa->used_bkref_map &= ~((bitset_word_t) 1 << other_idx);
15117 return REG_NOERROR;
15122 static reg_errcode_t
15123 lower_subexps (void *extra, bin_tree_t *node)
15125 regex_t *preg = (regex_t *) extra;
15126 reg_errcode_t err = REG_NOERROR;
15128 if (node->left && node->left->token.type == SUBEXP)
15130 node->left = lower_subexp (&err, preg, node->left);
15132 node->left->parent = node;
15134 if (node->right && node->right->token.type == SUBEXP)
15136 node->right = lower_subexp (&err, preg, node->right);
15138 node->right->parent = node;
15144 static bin_tree_t *
15145 lower_subexp (reg_errcode_t *err, regex_t *preg, bin_tree_t *node)
15147 re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
15148 bin_tree_t *body = node->left;
15149 bin_tree_t *op, *cls, *tree1, *tree;
15156 && node->left != ((void *)0)
15157 && (node->token.opr.idx >= (sizeof (bitset_word_t) * 8)
15158 || !(dfa->used_bkref_map
15159 & ((bitset_word_t) 1 << node->token.opr.idx))))
15164 op = create_tree (dfa, ((void *)0), ((void *)0), OP_OPEN_SUBEXP);
15165 cls = create_tree (dfa, ((void *)0), ((void *)0), OP_CLOSE_SUBEXP);
15166 tree1 = body ? create_tree (dfa, body, cls, CONCAT) : cls;
15167 tree = create_tree (dfa, op, tree1, CONCAT);
15168 if (__builtin_expect (tree == ((void *)0) || tree1 == ((void *)0) || op == ((void *)0) || cls == ((void *)0), 0))
15171 return ((void *)0);
15174 op->token.opr.idx = cls->token.opr.idx = node->token.opr.idx;
15175 op->token.opt_subexp = cls->token.opt_subexp = node->token.opt_subexp;
15181 static reg_errcode_t
15182 calc_first (void *extra, bin_tree_t *node)
15184 re_dfa_t *dfa = (re_dfa_t *) extra;
15185 if (node->token.type == CONCAT)
15187 node->first = node->left->first;
15188 node->node_idx = node->left->node_idx;
15192 node->first = node;
15193 node->node_idx = re_dfa_add_node (dfa, node->token);
15194 if (__builtin_expect (node->node_idx == -1, 0))
15197 return REG_NOERROR;
15201 static reg_errcode_t
15202 calc_next (void *extra, bin_tree_t *node)
15204 switch (node->token.type)
15206 case OP_DUP_ASTERISK:
15207 node->left->next = node;
15210 node->left->next = node->right->first;
15211 node->right->next = node->next;
15215 node->left->next = node->next;
15217 node->right->next = node->next;
15220 return REG_NOERROR;
15224 static reg_errcode_t
15225 link_nfa_nodes (void *extra, bin_tree_t *node)
15227 re_dfa_t *dfa = (re_dfa_t *) extra;
15228 int idx = node->node_idx;
15229 reg_errcode_t err = REG_NOERROR;
15231 switch (node->token.type)
15237 ((node->next == ((void *)0)) ? (void) (0) : (__assert_fail ("node->next == ((void *)0)", "regcomp.c", 1362, __PRETTY_FUNCTION__), (void) (0)));
15240 case OP_DUP_ASTERISK:
15244 dfa->has_plural_match = 1;
15245 if (node->left != ((void *)0))
15246 left = node->left->first->node_idx;
15248 left = node->next->node_idx;
15249 if (node->right != ((void *)0))
15250 right = node->right->first->node_idx;
15252 right = node->next->node_idx;
15253 ((left > -1) ? (void) (0) : (__assert_fail ("left > -1", "regcomp.c", 1378, __PRETTY_FUNCTION__), (void) (0)));
15254 ((right > -1) ? (void) (0) : (__assert_fail ("right > -1", "regcomp.c", 1379, __PRETTY_FUNCTION__), (void) (0)));
15255 err = re_node_set_init_2 (dfa->edests + idx, left, right);
15260 case OP_OPEN_SUBEXP:
15261 case OP_CLOSE_SUBEXP:
15262 err = re_node_set_init_1 (dfa->edests + idx, node->next->node_idx);
15266 dfa->nexts[idx] = node->next->node_idx;
15267 if (node->token.type == OP_BACK_REF)
15268 re_node_set_init_1 (dfa->edests + idx, dfa->nexts[idx]);
15272 ((!((node->token.type) & 8)) ? (void) (0) : (__assert_fail ("!((node->token.type) & 8)", "regcomp.c", 1397, __PRETTY_FUNCTION__), (void) (0)));
15273 dfa->nexts[idx] = node->next->node_idx;
15284 static reg_errcode_t
15286 duplicate_node_closure (re_dfa_t *dfa, int top_org_node, int top_clone_node,
15287 int root_node, unsigned int init_constraint)
15289 int org_node, clone_node, ret;
15290 unsigned int constraint = init_constraint;
15291 for (org_node = top_org_node, clone_node = top_clone_node;;)
15293 int org_dest, clone_dest;
15294 if (dfa->nodes[org_node].type == OP_BACK_REF)
15300 org_dest = dfa->nexts[org_node];
15301 ((dfa->edests + clone_node)->nelem = 0);
15302 clone_dest = duplicate_node (dfa, org_dest, constraint);
15303 if (__builtin_expect (clone_dest == -1, 0))
15305 dfa->nexts[clone_node] = dfa->nexts[org_node];
15306 ret = re_node_set_insert (dfa->edests + clone_node, clone_dest);
15307 if (__builtin_expect (ret < 0, 0))
15310 else if (dfa->edests[org_node].nelem == 0)
15315 dfa->nexts[clone_node] = dfa->nexts[org_node];
15318 else if (dfa->edests[org_node].nelem == 1)
15322 org_dest = dfa->edests[org_node].elems[0];
15323 ((dfa->edests + clone_node)->nelem = 0);
15324 if (dfa->nodes[org_node].type == ANCHOR)
15327 if (org_node == root_node && clone_node != org_node)
15332 ret = re_node_set_insert (dfa->edests + clone_node,
15334 if (__builtin_expect (ret < 0, 0))
15338 constraint |= dfa->nodes[org_node].opr.ctx_type;
15340 clone_dest = duplicate_node (dfa, org_dest, constraint);
15341 if (__builtin_expect (clone_dest == -1, 0))
15343 ret = re_node_set_insert (dfa->edests + clone_node, clone_dest);
15344 if (__builtin_expect (ret < 0, 0))
15351 org_dest = dfa->edests[org_node].elems[0];
15352 ((dfa->edests + clone_node)->nelem = 0);
15354 clone_dest = search_duplicated_node (dfa, org_dest, constraint);
15355 if (clone_dest == -1)
15359 clone_dest = duplicate_node (dfa, org_dest, constraint);
15360 if (__builtin_expect (clone_dest == -1, 0))
15362 ret = re_node_set_insert (dfa->edests + clone_node, clone_dest);
15363 if (__builtin_expect (ret < 0, 0))
15365 err = duplicate_node_closure (dfa, org_dest, clone_dest,
15366 root_node, constraint);
15367 if (__builtin_expect (err != REG_NOERROR, 0))
15374 ret = re_node_set_insert (dfa->edests + clone_node, clone_dest);
15375 if (__builtin_expect (ret < 0, 0))
15379 org_dest = dfa->edests[org_node].elems[1];
15380 clone_dest = duplicate_node (dfa, org_dest, constraint);
15381 if (__builtin_expect (clone_dest == -1, 0))
15383 ret = re_node_set_insert (dfa->edests + clone_node, clone_dest);
15384 if (__builtin_expect (ret < 0, 0))
15387 org_node = org_dest;
15388 clone_node = clone_dest;
15390 return REG_NOERROR;
15397 search_duplicated_node (const re_dfa_t *dfa, int org_node,
15398 unsigned int constraint)
15401 for (idx = dfa->nodes_len - 1; dfa->nodes[idx].duplicated && idx > 0; --idx)
15403 if (org_node == dfa->org_indices[idx]
15404 && constraint == dfa->nodes[idx].constraint)
15415 duplicate_node (re_dfa_t *dfa, int org_idx, unsigned int constraint)
15417 int dup_idx = re_dfa_add_node (dfa, dfa->nodes[org_idx]);
15418 if (__builtin_expect (dup_idx != -1, 1))
15420 dfa->nodes[dup_idx].constraint = constraint;
15421 if (dfa->nodes[org_idx].type == ANCHOR)
15422 dfa->nodes[dup_idx].constraint |= dfa->nodes[org_idx].opr.ctx_type;
15423 dfa->nodes[dup_idx].duplicated = 1;
15426 dfa->org_indices[dup_idx] = org_idx;
15431 static reg_errcode_t
15432 calc_inveclosure (re_dfa_t *dfa)
15435 for (idx = 0; idx < dfa->nodes_len; ++idx)
15436 memset (dfa->inveclosures + idx, '\0', sizeof (re_node_set));
15438 for (src = 0; src < dfa->nodes_len; ++src)
15440 int *elems = dfa->eclosures[src].elems;
15441 for (idx = 0; idx < dfa->eclosures[src].nelem; ++idx)
15443 ret = re_node_set_insert_last (dfa->inveclosures + elems[idx], src);
15444 if (__builtin_expect (ret == -1, 0))
15449 return REG_NOERROR;
15454 static reg_errcode_t
15455 calc_eclosure (re_dfa_t *dfa)
15457 int node_idx, incomplete;
15463 for (node_idx = 0; ; ++node_idx)
15466 re_node_set eclosure_elem;
15467 if (node_idx == dfa->nodes_len)
15480 if (dfa->eclosures[node_idx].nelem != 0)
15483 err = calc_eclosure_iter (&eclosure_elem, dfa, node_idx, 1);
15484 if (__builtin_expect (err != REG_NOERROR, 0))
15487 if (dfa->eclosures[node_idx].nelem == 0)
15490 free ((&eclosure_elem)->elems);
15493 return REG_NOERROR;
15498 static reg_errcode_t
15499 calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, int node, int root)
15502 unsigned int constraint;
15504 re_node_set eclosure;
15506 err = re_node_set_alloc (&eclosure, dfa->edests[node].nelem + 1);
15507 if (__builtin_expect (err != REG_NOERROR, 0))
15512 dfa->eclosures[node].nelem = -1;
15514 constraint = ((dfa->nodes[node].type == ANCHOR)
15515 ? dfa->nodes[node].opr.ctx_type : 0);
15519 && dfa->edests[node].nelem
15520 && !dfa->nodes[dfa->edests[node].elems[0]].duplicated)
15522 err = duplicate_node_closure (dfa, node, node, node, constraint);
15523 if (__builtin_expect (err != REG_NOERROR, 0))
15528 if (((dfa->nodes[node].type) & 8))
15529 for (i = 0; i < dfa->edests[node].nelem; ++i)
15531 re_node_set eclosure_elem;
15532 int edest = dfa->edests[node].elems[i];
15535 if (dfa->eclosures[edest].nelem == -1)
15542 if (dfa->eclosures[edest].nelem == 0)
15544 err = calc_eclosure_iter (&eclosure_elem, dfa, edest, 0);
15545 if (__builtin_expect (err != REG_NOERROR, 0))
15549 eclosure_elem = dfa->eclosures[edest];
15551 re_node_set_merge (&eclosure, &eclosure_elem);
15554 if (dfa->eclosures[edest].nelem == 0)
15557 free ((&eclosure_elem)->elems);
15562 re_node_set_insert (&eclosure, node);
15563 if (incomplete && !root)
15564 dfa->eclosures[node].nelem = 0;
15566 dfa->eclosures[node] = eclosure;
15567 *new_set = eclosure;
15568 return REG_NOERROR;
15578 fetch_token (re_token_t *result, re_string_t *input, reg_syntax_t syntax)
15580 ((input)->cur_idx += (peek_token (result, input, syntax)));
15588 peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax)
15592 if (((input)->stop <= (input)->cur_idx))
15594 token->type = END_OF_RE;
15598 c = ((input)->mbs[(input)->cur_idx + 0]);
15601 token->word_char = 0;
15603 token->mb_partial = 0;
15604 if (input->mb_cur_max > 1 &&
15605 !((((input)->cur_idx)) == (input)->valid_len || (input)->wcs[((input)->cur_idx)] != (0xffffffffu)))
15607 token->type = CHARACTER;
15608 token->mb_partial = 1;
15615 if (((input)->cur_idx) + 1 >= ((input)->len))
15617 token->type = BACK_SLASH;
15621 c2 = re_string_peek_byte_case (input, 1);
15623 token->type = CHARACTER;
15625 if (input->mb_cur_max > 1)
15627 wint_t wc = re_string_wchar_at (input,
15628 ((input)->cur_idx) + 1);
15629 token->word_char = (iswalnum (wc) || (wc) == L'_') != 0;
15633 token->word_char = (((*__ctype_b_loc ())[(int) ((c2))] & (unsigned short int) _ISalnum) || (c2) == '_') != 0;
15638 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)))
15639 token->type = OP_ALT;
15641 case '1': case '2': case '3': case '4': case '5':
15642 case '6': case '7': case '8': case '9':
15643 if (!(syntax & ((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)))
15645 token->type = OP_BACK_REF;
15646 token->opr.idx = c2 - '1';
15650 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)))
15652 token->type = ANCHOR;
15653 token->opr.ctx_type = WORD_FIRST;
15657 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)))
15659 token->type = ANCHOR;
15660 token->opr.ctx_type = WORD_LAST;
15664 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)))
15666 token->type = ANCHOR;
15667 token->opr.ctx_type = WORD_DELIM;
15671 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)))
15673 token->type = ANCHOR;
15674 token->opr.ctx_type = NOT_WORD_DELIM;
15678 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)))
15679 token->type = OP_WORD;
15682 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)))
15683 token->type = OP_NOTWORD;
15686 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)))
15687 token->type = OP_SPACE;
15690 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)))
15691 token->type = OP_NOTSPACE;
15694 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)))
15696 token->type = ANCHOR;
15697 token->opr.ctx_type = BUF_FIRST;
15701 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)))
15703 token->type = ANCHOR;
15704 token->opr.ctx_type = BUF_LAST;
15708 if (!(syntax & (((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)))
15709 token->type = OP_OPEN_SUBEXP;
15712 if (!(syntax & (((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)))
15713 token->type = OP_CLOSE_SUBEXP;
15716 if (!(syntax & ((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) && (syntax & (((unsigned long int) 1) << 1)))
15717 token->type = OP_DUP_PLUS;
15720 if (!(syntax & ((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) && (syntax & (((unsigned long int) 1) << 1)))
15721 token->type = OP_DUP_QUESTION;
15724 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))))
15725 token->type = OP_OPEN_DUP_NUM;
15728 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))))
15729 token->type = OP_CLOSE_DUP_NUM;
15737 token->type = CHARACTER;
15739 if (input->mb_cur_max > 1)
15741 wint_t wc = re_string_wchar_at (input, ((input)->cur_idx));
15742 token->word_char = (iswalnum (wc) || (wc) == L'_') != 0;
15746 token->word_char = (((*__ctype_b_loc ())[(int) ((token->opr.c))] & (unsigned short int) _ISalnum) || (token->opr.c) == '_');
15751 if (syntax & (((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1))
15752 token->type = OP_ALT;
15755 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)))
15756 token->type = OP_ALT;
15759 token->type = OP_DUP_ASTERISK;
15762 if (!(syntax & ((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) && !(syntax & (((unsigned long int) 1) << 1)))
15763 token->type = OP_DUP_PLUS;
15766 if (!(syntax & ((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) && !(syntax & (((unsigned long int) 1) << 1)))
15767 token->type = OP_DUP_QUESTION;
15770 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)))
15771 token->type = OP_OPEN_DUP_NUM;
15774 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)))
15775 token->type = OP_CLOSE_DUP_NUM;
15778 if (syntax & (((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1))
15779 token->type = OP_OPEN_SUBEXP;
15782 if (syntax & (((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1))
15783 token->type = OP_CLOSE_SUBEXP;
15786 token->type = OP_OPEN_BRACKET;
15789 token->type = OP_PERIOD;
15792 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))) &&
15793 ((input)->cur_idx) != 0)
15795 char prev = ((input)->mbs[(input)->cur_idx + -1]);
15796 if (!(syntax & (((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) || prev != '\n')
15799 token->type = ANCHOR;
15800 token->opr.ctx_type = LINE_FIRST;
15803 if (!(syntax & (((((unsigned long int) 1) << 1) << 1) << 1)) &&
15804 ((input)->cur_idx) + 1 != ((input)->len))
15807 ((input)->cur_idx += (1));
15808 peek_token (&next, input, syntax);
15809 ((input)->cur_idx += (-1));
15810 if (next.type != OP_ALT && next.type != OP_CLOSE_SUBEXP)
15813 token->type = ANCHOR;
15814 token->opr.ctx_type = LINE_LAST;
15827 peek_token_bracket (re_token_t *token, re_string_t *input, reg_syntax_t syntax)
15830 if (((input)->stop <= (input)->cur_idx))
15832 token->type = END_OF_RE;
15835 c = ((input)->mbs[(input)->cur_idx + 0]);
15839 if (input->mb_cur_max > 1 &&
15840 !((((input)->cur_idx)) == (input)->valid_len || (input)->wcs[((input)->cur_idx)] != (0xffffffffu)))
15842 token->type = CHARACTER;
15847 if (c == '\\' && (syntax & ((unsigned long int) 1))
15848 && ((input)->cur_idx) + 1 < ((input)->len))
15852 ((input)->cur_idx += (1));
15853 c2 = ((input)->mbs[(input)->cur_idx + 0]);
15855 token->type = CHARACTER;
15862 if (((input)->cur_idx) + 1 < ((input)->len))
15863 c2 = ((input)->mbs[(input)->cur_idx + 1]);
15871 token->type = OP_OPEN_COLL_ELEM;
15874 token->type = OP_OPEN_EQUIV_CLASS;
15877 if (syntax & ((((unsigned long int) 1) << 1) << 1))
15879 token->type = OP_OPEN_CHAR_CLASS;
15884 token->type = CHARACTER;
15894 token->type = OP_CHARSET_RANGE;
15897 token->type = OP_CLOSE_BRACKET;
15900 token->type = OP_NON_MATCH_LIST;
15903 token->type = CHARACTER;
15908 static bin_tree_t *
15909 parse (re_string_t *regexp, regex_t *preg, reg_syntax_t syntax,
15910 reg_errcode_t *err)
15912 re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
15913 bin_tree_t *tree, *eor, *root;
15914 re_token_t current_token;
15915 dfa->syntax = syntax;
15916 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));
15917 tree = parse_reg_exp (regexp, preg, ¤t_token, syntax, 0, err);
15918 if (__builtin_expect (*err != REG_NOERROR && tree == ((void *)0), 0))
15919 return ((void *)0);
15920 eor = create_tree (dfa, ((void *)0), ((void *)0), END_OF_RE);
15921 if (tree != ((void *)0))
15922 root = create_tree (dfa, tree, eor, CONCAT);
15925 if (__builtin_expect (eor == ((void *)0) || root == ((void *)0), 0))
15928 return ((void *)0);
15933 static bin_tree_t *
15934 parse_reg_exp (re_string_t *regexp, regex_t *preg, re_token_t *token,
15935 reg_syntax_t syntax, int nest, reg_errcode_t *err)
15937 re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
15938 bin_tree_t *tree, *branch = ((void *)0);
15939 tree = parse_branch (regexp, preg, token, syntax, nest, err);
15940 if (__builtin_expect (*err != REG_NOERROR && tree == ((void *)0), 0))
15941 return ((void *)0);
15943 while (token->type == OP_ALT)
15945 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));
15946 if (token->type != OP_ALT && token->type != END_OF_RE
15947 && (nest == 0 || token->type != OP_CLOSE_SUBEXP))
15949 branch = parse_branch (regexp, preg, token, syntax, nest, err);
15950 if (__builtin_expect (*err != REG_NOERROR && branch == ((void *)0), 0))
15951 return ((void *)0);
15954 branch = ((void *)0);
15955 tree = create_tree (dfa, tree, branch, OP_ALT);
15956 if (__builtin_expect (tree == ((void *)0), 0))
15959 return ((void *)0);
15965 static bin_tree_t *
15966 parse_branch (re_string_t *regexp, regex_t *preg, re_token_t *token,
15967 reg_syntax_t syntax, int nest, reg_errcode_t *err)
15969 bin_tree_t *tree, *exp;
15970 re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
15971 tree = parse_expression (regexp, preg, token, syntax, nest, err);
15972 if (__builtin_expect (*err != REG_NOERROR && tree == ((void *)0), 0))
15973 return ((void *)0);
15975 while (token->type != OP_ALT && token->type != END_OF_RE
15976 && (nest == 0 || token->type != OP_CLOSE_SUBEXP))
15978 exp = parse_expression (regexp, preg, token, syntax, nest, err);
15979 if (__builtin_expect (*err != REG_NOERROR && exp == ((void *)0), 0))
15981 return ((void *)0);
15983 if (tree != ((void *)0) && exp != ((void *)0))
15985 tree = create_tree (dfa, tree, exp, CONCAT);
15986 if (tree == ((void *)0))
15989 return ((void *)0);
15992 else if (tree == ((void *)0))
16005 static bin_tree_t *
16006 parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
16007 reg_syntax_t syntax, int nest, reg_errcode_t *err)
16009 re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
16011 switch (token->type)
16014 tree = create_token_tree (dfa, ((void *)0), ((void *)0), token);
16015 if (__builtin_expect (tree == ((void *)0), 0))
16018 return ((void *)0);
16021 if (dfa->mb_cur_max > 1)
16023 while (!((regexp)->stop <= (regexp)->cur_idx)
16024 && !((((regexp)->cur_idx)) == (regexp)->valid_len || (regexp)->wcs[((regexp)->cur_idx)] != (0xffffffffu)))
16026 bin_tree_t *mbc_remain;
16027 fetch_token (token, regexp, syntax);
16028 mbc_remain = create_token_tree (dfa, ((void *)0), ((void *)0), token);
16029 tree = create_tree (dfa, tree, mbc_remain, CONCAT);
16030 if (__builtin_expect (mbc_remain == ((void *)0) || tree == ((void *)0), 0))
16033 return ((void *)0);
16039 case OP_OPEN_SUBEXP:
16040 tree = parse_sub_exp (regexp, preg, token, syntax, nest + 1, err);
16041 if (__builtin_expect (*err != REG_NOERROR && tree == ((void *)0), 0))
16042 return ((void *)0);
16044 case OP_OPEN_BRACKET:
16045 tree = parse_bracket_exp (regexp, dfa, token, syntax, err);
16046 if (__builtin_expect (*err != REG_NOERROR && tree == ((void *)0), 0))
16047 return ((void *)0);
16050 if (!__builtin_expect (dfa->completed_bkref_map & (1 << token->opr.idx), 1))
16052 *err = REG_ESUBREG;
16053 return ((void *)0);
16055 dfa->used_bkref_map |= 1 << token->opr.idx;
16056 tree = create_token_tree (dfa, ((void *)0), ((void *)0), token);
16057 if (__builtin_expect (tree == ((void *)0), 0))
16060 return ((void *)0);
16063 dfa->has_mb_node = 1;
16065 case OP_OPEN_DUP_NUM:
16066 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))
16069 return ((void *)0);
16072 case OP_DUP_ASTERISK:
16074 case OP_DUP_QUESTION:
16075 if (syntax & (((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1))
16078 return ((void *)0);
16080 else if (syntax & ((((((unsigned long int) 1) << 1) << 1) << 1) << 1))
16082 fetch_token (token, regexp, syntax);
16083 return parse_expression (regexp, preg, token, syntax, nest, err);
16086 case OP_CLOSE_SUBEXP:
16087 if ((token->type == OP_CLOSE_SUBEXP) &&
16088 !(syntax & (((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)))
16090 *err = REG_ERPAREN;
16091 return ((void *)0);
16094 case OP_CLOSE_DUP_NUM:
16098 token->type = CHARACTER;
16101 tree = create_token_tree (dfa, ((void *)0), ((void *)0), token);
16102 if (__builtin_expect (tree == ((void *)0), 0))
16105 return ((void *)0);
16109 if ((token->opr.ctx_type
16110 & (WORD_DELIM | NOT_WORD_DELIM | WORD_FIRST | WORD_LAST))
16111 && dfa->word_ops_used == 0)
16112 init_word_char (dfa);
16113 if (token->opr.ctx_type == WORD_DELIM
16114 || token->opr.ctx_type == NOT_WORD_DELIM)
16116 bin_tree_t *tree_first, *tree_last;
16117 if (token->opr.ctx_type == WORD_DELIM)
16119 token->opr.ctx_type = WORD_FIRST;
16120 tree_first = create_token_tree (dfa, ((void *)0), ((void *)0), token);
16121 token->opr.ctx_type = WORD_LAST;
16125 token->opr.ctx_type = INSIDE_WORD;
16126 tree_first = create_token_tree (dfa, ((void *)0), ((void *)0), token);
16127 token->opr.ctx_type = INSIDE_NOTWORD;
16129 tree_last = create_token_tree (dfa, ((void *)0), ((void *)0), token);
16130 tree = create_tree (dfa, tree_first, tree_last, OP_ALT);
16131 if (__builtin_expect (tree_first == ((void *)0) || tree_last == ((void *)0) || tree == ((void *)0), 0))
16134 return ((void *)0);
16139 tree = create_token_tree (dfa, ((void *)0), ((void *)0), token);
16140 if (__builtin_expect (tree == ((void *)0), 0))
16143 return ((void *)0);
16150 fetch_token (token, regexp, syntax);
16153 tree = create_token_tree (dfa, ((void *)0), ((void *)0), token);
16154 if (__builtin_expect (tree == ((void *)0), 0))
16157 return ((void *)0);
16159 if (dfa->mb_cur_max > 1)
16160 dfa->has_mb_node = 1;
16164 tree = build_charclass_op (dfa, regexp->trans,
16165 (const unsigned char *) "alnum",
16166 (const unsigned char *) "_",
16167 token->type == OP_NOTWORD, err);
16168 if (__builtin_expect (*err != REG_NOERROR && tree == ((void *)0), 0))
16169 return ((void *)0);
16173 tree = build_charclass_op (dfa, regexp->trans,
16174 (const unsigned char *) "space",
16175 (const unsigned char *) "",
16176 token->type == OP_NOTSPACE, err);
16177 if (__builtin_expect (*err != REG_NOERROR && tree == ((void *)0), 0))
16178 return ((void *)0);
16182 return ((void *)0);
16184 *err = REG_EESCAPE;
16185 return ((void *)0);
16191 return ((void *)0);
16193 fetch_token (token, regexp, syntax);
16195 while (token->type == OP_DUP_ASTERISK || token->type == OP_DUP_PLUS
16196 || token->type == OP_DUP_QUESTION || token->type == OP_OPEN_DUP_NUM)
16198 tree = parse_dup_op (tree, regexp, dfa, token, syntax, err);
16199 if (__builtin_expect (*err != REG_NOERROR && tree == ((void *)0), 0))
16200 return ((void *)0);
16202 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))
16203 && (token->type == OP_DUP_ASTERISK
16204 || token->type == OP_OPEN_DUP_NUM))
16207 return ((void *)0);
16214 static bin_tree_t *
16215 parse_sub_exp (re_string_t *regexp, regex_t *preg, re_token_t *token,
16216 reg_syntax_t syntax, int nest, reg_errcode_t *err)
16218 re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
16221 cur_nsub = preg->re_nsub++;
16223 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));
16226 if (token->type == OP_CLOSE_SUBEXP)
16227 tree = ((void *)0);
16230 tree = parse_reg_exp (regexp, preg, token, syntax, nest, err);
16231 if (__builtin_expect (*err == REG_NOERROR && token->type != OP_CLOSE_SUBEXP, 0))
16233 if (__builtin_expect (*err != REG_NOERROR, 0))
16234 return ((void *)0);
16237 if (cur_nsub <= '9' - '1')
16238 dfa->completed_bkref_map |= 1 << cur_nsub;
16240 tree = create_tree (dfa, tree, ((void *)0), SUBEXP);
16241 if (__builtin_expect (tree == ((void *)0), 0))
16244 return ((void *)0);
16246 tree->token.opr.idx = cur_nsub;
16252 static bin_tree_t *
16253 parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
16254 re_token_t *token, reg_syntax_t syntax, reg_errcode_t *err)
16256 bin_tree_t *tree = ((void *)0), *old_tree = ((void *)0);
16257 int i, start, end, start_idx = ((regexp)->cur_idx);
16258 re_token_t start_token = *token;
16260 if (token->type == OP_OPEN_DUP_NUM)
16263 start = fetch_number (regexp, token, syntax);
16266 if (token->type == CHARACTER && token->opr.c == ',')
16271 return ((void *)0);
16274 if (__builtin_expect (start != -2, 1))
16277 end = ((token->type == OP_CLOSE_DUP_NUM) ? start
16278 : ((token->type == CHARACTER && token->opr.c == ',')
16279 ? fetch_number (regexp, token, syntax) : -2));
16281 if (__builtin_expect (start == -2 || end == -2, 0))
16284 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))
16286 if (token->type == END_OF_RE)
16291 return ((void *)0);
16295 ((regexp)->cur_idx = (start_idx));
16296 *token = start_token;
16297 token->type = CHARACTER;
16303 if (__builtin_expect (end != -1 && start > end, 0))
16307 return ((void *)0);
16312 start = (token->type == OP_DUP_PLUS) ? 1 : 0;
16313 end = (token->type == OP_DUP_QUESTION) ? 1 : -1;
16316 fetch_token (token, regexp, syntax);
16318 if (__builtin_expect (elem == ((void *)0), 0))
16319 return ((void *)0);
16320 if (__builtin_expect (start == 0 && end == 0, 0))
16322 postorder (elem, free_tree, ((void *)0));
16323 return ((void *)0);
16327 if (__builtin_expect (start > 0, 0))
16330 for (i = 2; i <= start; ++i)
16332 elem = duplicate_tree (elem, dfa);
16333 tree = create_tree (dfa, tree, elem, CONCAT);
16334 if (__builtin_expect (elem == ((void *)0) || tree == ((void *)0), 0))
16335 goto parse_dup_op_espace;
16342 elem = duplicate_tree (elem, dfa);
16346 old_tree = ((void *)0);
16348 if (elem->token.type == SUBEXP)
16349 postorder (elem, mark_opt_subexp, (void *) (long) elem->token.opr.idx);
16351 tree = create_tree (dfa, elem, ((void *)0), (end == -1 ? OP_DUP_ASTERISK : OP_ALT));
16352 if (__builtin_expect (tree == ((void *)0), 0))
16353 goto parse_dup_op_espace;
16358 for (i = start + 2; i <= end; ++i)
16360 elem = duplicate_tree (elem, dfa);
16361 tree = create_tree (dfa, tree, elem, CONCAT);
16362 if (__builtin_expect (elem == ((void *)0) || tree == ((void *)0), 0))
16363 goto parse_dup_op_espace;
16365 tree = create_tree (dfa, tree, ((void *)0), OP_ALT);
16366 if (__builtin_expect (tree == ((void *)0), 0))
16367 goto parse_dup_op_espace;
16371 tree = create_tree (dfa, old_tree, tree, CONCAT);
16375 parse_dup_op_espace:
16377 return ((void *)0);
16380 static bin_tree_t *
16381 parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
16382 reg_syntax_t syntax, reg_errcode_t *err)
16385 const unsigned char *collseqmb;
16386 const char *collseqwc;
16388 int32_t table_size;
16389 const int32_t *symb_table;
16390 const unsigned char *extra;
16396 auto inline int32_t
16397 __attribute__ ((always_inline))
16398 seek_collating_symbol_entry (name, name_len)
16399 const unsigned char *name;
16402 int32_t hash = elem_hash ((const char *) name, name_len);
16403 int32_t elem = hash % table_size;
16404 if (symb_table[2 * elem] != 0)
16406 int32_t second = hash % (table_size - 2) + 1;
16411 if (symb_table[2 * elem] == hash
16413 && name_len == extra[symb_table[2 * elem + 1]]
16415 && memcmp (name, &extra[symb_table[2 * elem + 1] + 1],
16425 while (symb_table[2 * elem] != 0);
16434 auto inline unsigned int
16435 __attribute__ ((always_inline))
16436 lookup_collation_sequence_value (br_elem)
16437 bracket_elem_t *br_elem;
16439 if (br_elem->type == SB_CHAR)
16445 return collseqmb[br_elem->opr.ch];
16448 wint_t wc = __btowc (br_elem->opr.ch);
16449 return __collseq_table_lookup (collseqwc, wc);
16452 else if (br_elem->type == MB_CHAR)
16454 return __collseq_table_lookup (collseqwc, br_elem->opr.wch);
16456 else if (br_elem->type == COLL_SYM)
16458 size_t sym_name_len = strlen ((char *) br_elem->opr.name);
16462 elem = seek_collating_symbol_entry (br_elem->opr.name,
16464 if (symb_table[2 * elem] != 0)
16467 idx = symb_table[2 * elem + 1];
16469 idx += 1 + extra[idx];
16471 idx += 1 + extra[idx];
16473 idx = (idx + 3) & ~3;
16475 idx += sizeof (unsigned int);
16477 idx += sizeof (unsigned int) *
16478 (1 + *(unsigned int *) (extra + idx));
16480 return *(unsigned int *) (extra + idx);
16482 else if (symb_table[2 * elem] == 0 && sym_name_len == 1)
16486 return collseqmb[br_elem->opr.name[0]];
16489 else if (sym_name_len == 1)
16490 return collseqmb[br_elem->opr.name[0]];
16492 return (2147483647 * 2U + 1U);
16495 auto inline reg_errcode_t
16496 __attribute__ ((always_inline))
16497 build_range_exp (sbcset, mbcset, range_alloc, start_elem, end_elem)
16498 re_charset_t *mbcset;
16501 bracket_elem_t *start_elem, *end_elem;
16504 uint32_t start_collseq;
16505 uint32_t end_collseq;
16509 if (__builtin_expect (start_elem->type == EQUIV_CLASS || start_elem->type == CHAR_CLASS || end_elem->type == EQUIV_CLASS || end_elem->type == CHAR_CLASS, 0))
16514 start_collseq = lookup_collation_sequence_value (start_elem);
16515 end_collseq = lookup_collation_sequence_value (end_elem);
16517 if (__builtin_expect (start_collseq == (2147483647 * 2U + 1U) || end_collseq == (2147483647 * 2U + 1U), 0))
16518 return REG_ECOLLATE;
16519 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))
16526 if (nrules > 0 || dfa->mb_cur_max > 1)
16529 if (__builtin_expect (*range_alloc == mbcset->nranges, 0))
16532 uint32_t *new_array_start;
16533 uint32_t *new_array_end;
16537 new_nranges = 2 * mbcset->nranges + 1;
16538 new_array_start = ((uint32_t *) realloc (mbcset->range_starts, (new_nranges) * sizeof (uint32_t)));
16540 new_array_end = ((uint32_t *) realloc (mbcset->range_ends, (new_nranges) * sizeof (uint32_t)));
16543 if (__builtin_expect (new_array_start == ((void *)0) || new_array_end == ((void *)0), 0))
16546 mbcset->range_starts = new_array_start;
16547 mbcset->range_ends = new_array_end;
16548 *range_alloc = new_nranges;
16551 mbcset->range_starts[mbcset->nranges] = start_collseq;
16552 mbcset->range_ends[mbcset->nranges++] = end_collseq;
16556 for (ch = 0; ch < 256; ch++)
16558 uint32_t ch_collseq;
16563 ch_collseq = collseqmb[ch];
16565 ch_collseq = __collseq_table_lookup (collseqwc, __btowc (ch));
16566 if (start_collseq <= ch_collseq && ch_collseq <= end_collseq)
16567 (sbcset[ch / (sizeof (bitset_word_t) * 8)] |= (bitset_word_t) 1 << ch % (sizeof (bitset_word_t) * 8));
16569 return REG_NOERROR;
16578 auto inline reg_errcode_t
16579 __attribute__ ((always_inline))
16580 build_collating_symbol (sbcset, mbcset, coll_sym_alloc, name)
16581 re_charset_t *mbcset;
16582 int *coll_sym_alloc;
16584 const unsigned char *name;
16587 size_t name_len = strlen ((const char *) name);
16590 elem = seek_collating_symbol_entry (name, name_len);
16591 if (symb_table[2 * elem] != 0)
16594 idx = symb_table[2 * elem + 1];
16596 idx += 1 + extra[idx];
16598 else if (symb_table[2 * elem] == 0 && name_len == 1)
16602 (sbcset[name[0] / (sizeof (bitset_word_t) * 8)] |= (bitset_word_t) 1 << name[0] % (sizeof (bitset_word_t) * 8));
16603 return REG_NOERROR;
16606 return REG_ECOLLATE;
16610 if (__builtin_expect (*coll_sym_alloc == mbcset->ncoll_syms, 0))
16614 int new_coll_sym_alloc = 2 * mbcset->ncoll_syms + 1;
16617 int32_t *new_coll_syms = ((int32_t *) realloc (mbcset->coll_syms, (new_coll_sym_alloc) * sizeof (int32_t)));
16619 if (__builtin_expect (new_coll_syms == ((void *)0), 0))
16621 mbcset->coll_syms = new_coll_syms;
16622 *coll_sym_alloc = new_coll_sym_alloc;
16624 mbcset->coll_syms[mbcset->ncoll_syms++] = idx;
16625 return REG_NOERROR;
16629 if (__builtin_expect (name_len != 1, 0))
16630 return REG_ECOLLATE;
16633 (sbcset[name[0] / (sizeof (bitset_word_t) * 8)] |= (bitset_word_t) 1 << name[0] % (sizeof (bitset_word_t) * 8));
16634 return REG_NOERROR;
16640 re_token_t br_token;
16641 re_bitset_ptr_t sbcset;
16643 re_charset_t *mbcset;
16644 int coll_sym_alloc = 0, range_alloc = 0, mbchar_alloc = 0;
16645 int equiv_class_alloc = 0, char_class_alloc = 0;
16648 bin_tree_t *work_tree;
16650 int first_round = 1;
16652 collseqmb = (const unsigned char *)
16653 ((*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_COLLSEQMB) & 0xffff)].string);
16654 nrules = ((uint32_t) (*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_NRULES) & 0xffff)].word);
16660 collseqwc = ((*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_COLLSEQWC) & 0xffff)].string);
16661 table_size = ((uint32_t) (*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_SYMB_HASH_SIZEMB) & 0xffff)].word);
16662 symb_table = (const int32_t *) ((*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_SYMB_TABLEMB) & 0xffff)].string);
16664 extra = (const unsigned char *) ((*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_SYMB_EXTRAMB) & 0xffff)].string);
16668 sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1);
16670 mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1);
16673 if (__builtin_expect (sbcset == ((void *)0) || mbcset == ((void *)0), 0))
16679 return ((void *)0);
16682 token_len = peek_token_bracket (token, regexp, syntax);
16683 if (__builtin_expect (token->type == END_OF_RE, 0))
16686 goto parse_bracket_exp_free_return;
16688 if (token->type == OP_NON_MATCH_LIST)
16691 mbcset->non_match = 1;
16694 if (syntax & ((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1))
16695 (sbcset['\0' / (sizeof (bitset_word_t) * 8)] |= (bitset_word_t) 1 << '\0' % (sizeof (bitset_word_t) * 8));
16696 ((regexp)->cur_idx += (token_len));
16697 token_len = peek_token_bracket (token, regexp, syntax);
16698 if (__builtin_expect (token->type == END_OF_RE, 0))
16701 goto parse_bracket_exp_free_return;
16706 if (token->type == OP_CLOSE_BRACKET)
16707 token->type = CHARACTER;
16711 bracket_elem_t start_elem, end_elem;
16712 unsigned char start_name_buf[32];
16713 unsigned char end_name_buf[32];
16715 int token_len2 = 0, is_range_exp = 0;
16718 start_elem.opr.name = start_name_buf;
16719 ret = parse_bracket_element (&start_elem, regexp, token, token_len, dfa,
16720 syntax, first_round);
16721 if (__builtin_expect (ret != REG_NOERROR, 0))
16724 goto parse_bracket_exp_free_return;
16729 token_len = peek_token_bracket (token, regexp, syntax);
16732 if (start_elem.type != CHAR_CLASS && start_elem.type != EQUIV_CLASS)
16734 if (__builtin_expect (token->type == END_OF_RE, 0))
16737 goto parse_bracket_exp_free_return;
16739 if (token->type == OP_CHARSET_RANGE)
16741 ((regexp)->cur_idx += (token_len));
16742 token_len2 = peek_token_bracket (&token2, regexp, syntax);
16743 if (__builtin_expect (token2.type == END_OF_RE, 0))
16746 goto parse_bracket_exp_free_return;
16748 if (token2.type == OP_CLOSE_BRACKET)
16751 ((regexp)->cur_idx += (-token_len));
16752 token->type = CHARACTER;
16759 if (is_range_exp == 1)
16761 end_elem.opr.name = end_name_buf;
16762 ret = parse_bracket_element (&end_elem, regexp, &token2, token_len2,
16764 if (__builtin_expect (ret != REG_NOERROR, 0))
16767 goto parse_bracket_exp_free_return;
16770 token_len = peek_token_bracket (token, regexp, syntax);
16773 *err = build_range_exp (sbcset, mbcset, &range_alloc,
16774 &start_elem, &end_elem);
16776 if (__builtin_expect (*err != REG_NOERROR, 0))
16777 goto parse_bracket_exp_free_return;
16781 switch (start_elem.type)
16784 (sbcset[start_elem.opr.ch / (sizeof (bitset_word_t) * 8)] |= (bitset_word_t) 1 << start_elem.opr.ch % (sizeof (bitset_word_t) * 8));
16789 if (__builtin_expect (mbchar_alloc == mbcset->nmbchars, 0))
16791 wchar_t *new_mbchars;
16794 mbchar_alloc = 2 * mbcset->nmbchars + 1;
16796 new_mbchars = ((wchar_t *) realloc (mbcset->mbchars, (mbchar_alloc) * sizeof (wchar_t)));
16798 if (__builtin_expect (new_mbchars == ((void *)0), 0))
16799 goto parse_bracket_exp_espace;
16800 mbcset->mbchars = new_mbchars;
16802 mbcset->mbchars[mbcset->nmbchars++] = start_elem.opr.wch;
16806 *err = build_equiv_class (sbcset,
16808 mbcset, &equiv_class_alloc,
16810 start_elem.opr.name);
16811 if (__builtin_expect (*err != REG_NOERROR, 0))
16812 goto parse_bracket_exp_free_return;
16815 *err = build_collating_symbol (sbcset,
16817 mbcset, &coll_sym_alloc,
16819 start_elem.opr.name);
16820 if (__builtin_expect (*err != REG_NOERROR, 0))
16821 goto parse_bracket_exp_free_return;
16824 *err = build_charclass (regexp->trans, sbcset,
16826 mbcset, &char_class_alloc,
16828 start_elem.opr.name, syntax);
16829 if (__builtin_expect (*err != REG_NOERROR, 0))
16830 goto parse_bracket_exp_free_return;
16833 ((0) ? (void) (0) : (__assert_fail ("0", "regcomp.c", 3168, __PRETTY_FUNCTION__), (void) (0)));
16837 if (__builtin_expect (token->type == END_OF_RE, 0))
16840 goto parse_bracket_exp_free_return;
16842 if (token->type == OP_CLOSE_BRACKET)
16846 ((regexp)->cur_idx += (token_len));
16850 bitset_not (sbcset);
16854 if (dfa->mb_cur_max > 1)
16855 bitset_mask (sbcset, dfa->sb_char);
16857 if (mbcset->nmbchars || mbcset->ncoll_syms || mbcset->nequiv_classes
16858 || mbcset->nranges || (dfa->mb_cur_max > 1 && (mbcset->nchar_classes
16859 || mbcset->non_match)))
16861 bin_tree_t *mbc_tree;
16864 dfa->has_mb_node = 1;
16865 br_token.type = COMPLEX_BRACKET;
16866 br_token.opr.mbcset = mbcset;
16867 mbc_tree = create_token_tree (dfa, ((void *)0), ((void *)0), &br_token);
16868 if (__builtin_expect (mbc_tree == ((void *)0), 0))
16869 goto parse_bracket_exp_espace;
16870 for (sbc_idx = 0; sbc_idx < (256 / (sizeof (bitset_word_t) * 8)); ++sbc_idx)
16871 if (sbcset[sbc_idx])
16875 if (sbc_idx < (256 / (sizeof (bitset_word_t) * 8)))
16878 br_token.type = SIMPLE_BRACKET;
16879 br_token.opr.sbcset = sbcset;
16880 work_tree = create_token_tree (dfa, ((void *)0), ((void *)0), &br_token);
16881 if (__builtin_expect (work_tree == ((void *)0), 0))
16882 goto parse_bracket_exp_espace;
16885 work_tree = create_tree (dfa, work_tree, mbc_tree, OP_ALT);
16886 if (__builtin_expect (work_tree == ((void *)0), 0))
16887 goto parse_bracket_exp_espace;
16892 work_tree = mbc_tree;
16899 free_charset (mbcset);
16902 br_token.type = SIMPLE_BRACKET;
16903 br_token.opr.sbcset = sbcset;
16904 work_tree = create_token_tree (dfa, ((void *)0), ((void *)0), &br_token);
16905 if (__builtin_expect (work_tree == ((void *)0), 0))
16906 goto parse_bracket_exp_espace;
16910 parse_bracket_exp_espace:
16912 parse_bracket_exp_free_return:
16915 free_charset (mbcset);
16917 return ((void *)0);
16922 static reg_errcode_t
16923 parse_bracket_element (bracket_elem_t *elem, re_string_t *regexp,
16924 re_token_t *token, int token_len, re_dfa_t *dfa,
16925 reg_syntax_t syntax, int accept_hyphen)
16929 cur_char_size = re_string_char_size_at (regexp, ((regexp)->cur_idx));
16930 if (cur_char_size > 1)
16932 elem->type = MB_CHAR;
16933 elem->opr.wch = re_string_wchar_at (regexp, ((regexp)->cur_idx));
16934 ((regexp)->cur_idx += (cur_char_size));
16935 return REG_NOERROR;
16938 ((regexp)->cur_idx += (token_len));
16939 if (token->type == OP_OPEN_COLL_ELEM || token->type == OP_OPEN_CHAR_CLASS
16940 || token->type == OP_OPEN_EQUIV_CLASS)
16941 return parse_bracket_symbol (elem, regexp, token);
16942 if (__builtin_expect (token->type == OP_CHARSET_RANGE, 0) && !accept_hyphen)
16947 (void) peek_token_bracket (&token2, regexp, syntax);
16948 if (token2.type != OP_CLOSE_BRACKET)
16953 elem->type = SB_CHAR;
16954 elem->opr.ch = token->opr.c;
16955 return REG_NOERROR;
16962 static reg_errcode_t
16963 parse_bracket_symbol (bracket_elem_t *elem, re_string_t *regexp,
16966 unsigned char ch, delim = token->opr.c;
16968 if (((regexp)->stop <= (regexp)->cur_idx))
16974 if (token->type == OP_OPEN_CHAR_CLASS)
16975 ch = re_string_fetch_byte_case (regexp);
16977 ch = ((regexp)->mbs[(regexp)->cur_idx++]);
16978 if (((regexp)->stop <= (regexp)->cur_idx))
16980 if (ch == delim && ((regexp)->mbs[(regexp)->cur_idx + 0]) == ']')
16982 elem->opr.name[i] = ch;
16984 ((regexp)->cur_idx += (1));
16985 elem->opr.name[i] = '\0';
16986 switch (token->type)
16988 case OP_OPEN_COLL_ELEM:
16989 elem->type = COLL_SYM;
16991 case OP_OPEN_EQUIV_CLASS:
16992 elem->type = EQUIV_CLASS;
16994 case OP_OPEN_CHAR_CLASS:
16995 elem->type = CHAR_CLASS;
17000 return REG_NOERROR;
17009 static reg_errcode_t
17011 build_equiv_class (bitset_t sbcset, re_charset_t *mbcset,
17012 int *equiv_class_alloc, const unsigned char *name)
17018 uint32_t nrules = ((uint32_t) (*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_NRULES) & 0xffff)].word);
17021 const int32_t *table, *indirect;
17022 const unsigned char *weights, *extra, *cp;
17023 unsigned char char_buf[2];
17024 int32_t idx1, idx2;
17028 # 1 "../locale/weight.h" 1
17029 # 21 "../locale/weight.h"
17030 auto inline int32_t
17031 __attribute__ ((always_inline))
17032 findidx (const unsigned char **cpp)
17034 int_fast32_t i = table[*(*cpp)++];
17035 const unsigned char *cp;
17036 const unsigned char *usrc;
17051 i = *((const int32_t *) cp);
17052 cp += sizeof (int32_t);
17068 for (cnt = 0; cnt < nhere; ++cnt)
17069 if (cp[cnt] != usrc[cnt])
17081 if ((1 + nhere) % __alignof__ (int32_t) != 0)
17082 cp += __alignof__ (int32_t) - (1 + nhere) % __alignof__ (int32_t);
17091 for (cnt = 0; cnt < nhere; ++cnt)
17092 if (cp[cnt] != usrc[cnt])
17097 if (cp[cnt] > usrc[cnt])
17101 if ((1 + 2 * nhere) % __alignof__ (int32_t) != 0)
17102 cp += (__alignof__ (int32_t)
17103 - (1 + 2 * nhere) % __alignof__ (int32_t));
17108 for (cnt = 0; cnt < nhere; ++cnt)
17109 if (cp[nhere + cnt] != usrc[cnt])
17112 if (cnt != nhere && cp[nhere + cnt] < usrc[cnt])
17116 if ((1 + 2 * nhere) % __alignof__ (int32_t) != 0)
17117 cp += (__alignof__ (int32_t)
17118 - (1 + 2 * nhere) % __alignof__ (int32_t));
17124 for (cnt = 0; cp[cnt] == usrc[cnt]; ++cnt);
17129 offset += usrc[cnt] - cp[cnt];
17131 while (++cnt < nhere);
17135 return indirect[-i + offset];
17142 # 3364 "regcomp.c" 2
17145 table = (const int32_t *) ((*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_TABLEMB) & 0xffff)].string);
17146 weights = (const unsigned char *) ((*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_WEIGHTMB) & 0xffff)].string);
17148 extra = (const unsigned char *) ((*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_EXTRAMB) & 0xffff)].string);
17150 indirect = (const int32_t *) ((*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_INDIRECTMB) & 0xffff)].string);
17152 idx1 = findidx (&cp);
17153 if (__builtin_expect (idx1 == 0 || cp < name + strlen ((const char *) name), 0))
17155 return REG_ECOLLATE;
17158 char_buf[1] = (unsigned char) '\0';
17159 len = weights[idx1];
17160 for (ch = 0; ch < 256; ++ch)
17164 idx2 = findidx (&cp);
17171 if (len == weights[idx2])
17174 while (cnt <= len &&
17175 weights[idx1 + 1 + cnt] == weights[idx2 + 1 + cnt])
17179 (sbcset[ch / (sizeof (bitset_word_t) * 8)] |= (bitset_word_t) 1 << ch % (sizeof (bitset_word_t) * 8));
17183 if (__builtin_expect (*equiv_class_alloc == mbcset->nequiv_classes, 0))
17187 int new_equiv_class_alloc = 2 * mbcset->nequiv_classes + 1;
17189 int32_t *new_equiv_classes = ((int32_t *) realloc (mbcset->equiv_classes, (new_equiv_class_alloc) * sizeof (int32_t)));
17192 if (__builtin_expect (new_equiv_classes == ((void *)0), 0))
17194 mbcset->equiv_classes = new_equiv_classes;
17195 *equiv_class_alloc = new_equiv_class_alloc;
17197 mbcset->equiv_classes[mbcset->nequiv_classes++] = idx1;
17202 if (__builtin_expect (strlen ((const char *) name) != 1, 0))
17203 return REG_ECOLLATE;
17204 (sbcset[*name / (sizeof (bitset_word_t) * 8)] |= (bitset_word_t) 1 << *name % (sizeof (bitset_word_t) * 8));
17206 return REG_NOERROR;
17215 static reg_errcode_t
17217 build_charclass (unsigned char * trans, bitset_t sbcset,
17218 re_charset_t *mbcset, int *char_class_alloc,
17219 const unsigned char *class_name, reg_syntax_t syntax)
17226 const char *name = (const char *) class_name;
17230 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))
17231 && (__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))
17236 if (__builtin_expect (*char_class_alloc == mbcset->nchar_classes, 0))
17240 int new_char_class_alloc = 2 * mbcset->nchar_classes + 1;
17242 wctype_t *new_char_classes = ((wctype_t *) realloc (mbcset->char_classes, (new_char_class_alloc) * sizeof (wctype_t)));
17244 if (__builtin_expect (new_char_classes == ((void *)0), 0))
17246 mbcset->char_classes = new_char_classes;
17247 *char_class_alloc = new_char_class_alloc;
17249 mbcset->char_classes[mbcset->nchar_classes++] = __wctype (name);
17251 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)
17252 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);
17253 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)
17254 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);
17255 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)
17256 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);
17257 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)
17258 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);
17259 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)
17260 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);
17261 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)
17262 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);
17263 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)
17264 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);
17265 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)
17266 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);
17267 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)
17268 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);
17269 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)
17270 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);
17271 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)
17272 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);
17273 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)
17274 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);
17278 return REG_NOERROR;
17281 static bin_tree_t *
17282 build_charclass_op (re_dfa_t *dfa, unsigned char * trans,
17283 const unsigned char *class_name,
17284 const unsigned char *extra, int non_match,
17285 reg_errcode_t *err)
17287 re_bitset_ptr_t sbcset;
17289 re_charset_t *mbcset;
17293 re_token_t br_token;
17296 sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1);
17298 mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1);
17302 if (__builtin_expect (sbcset == ((void *)0) || mbcset == ((void *)0), 0))
17308 return ((void *)0);
17318 mbcset->non_match = 1;
17323 ret = build_charclass (trans, sbcset,
17329 if (__builtin_expect (ret != REG_NOERROR, 0))
17333 free_charset (mbcset);
17336 return ((void *)0);
17339 for (; *extra; extra++)
17340 (sbcset[*extra / (sizeof (bitset_word_t) * 8)] |= (bitset_word_t) 1 << *extra % (sizeof (bitset_word_t) * 8));
17344 bitset_not (sbcset);
17348 if (dfa->mb_cur_max > 1)
17349 bitset_mask (sbcset, dfa->sb_char);
17353 br_token.type = SIMPLE_BRACKET;
17354 br_token.opr.sbcset = sbcset;
17355 tree = create_token_tree (dfa, ((void *)0), ((void *)0), &br_token);
17356 if (__builtin_expect (tree == ((void *)0), 0))
17357 goto build_word_op_espace;
17360 if (dfa->mb_cur_max > 1)
17362 bin_tree_t *mbc_tree;
17364 br_token.type = COMPLEX_BRACKET;
17365 br_token.opr.mbcset = mbcset;
17366 dfa->has_mb_node = 1;
17367 mbc_tree = create_token_tree (dfa, ((void *)0), ((void *)0), &br_token);
17368 if (__builtin_expect (mbc_tree == ((void *)0), 0))
17369 goto build_word_op_espace;
17371 tree = create_tree (dfa, tree, mbc_tree, OP_ALT);
17372 if (__builtin_expect (mbc_tree != ((void *)0), 1))
17377 free_charset (mbcset);
17384 build_word_op_espace:
17387 free_charset (mbcset);
17390 return ((void *)0);
17399 fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax)
17405 fetch_token (token, input, syntax);
17407 if (__builtin_expect (token->type == END_OF_RE, 0))
17409 if (token->type == OP_CLOSE_DUP_NUM || c == ',')
17411 num = ((token->type != CHARACTER || c < '0' || '9' < c || num == -2)
17412 ? -2 : ((num == -1) ? c - '0' : num * 10 + c - '0'));
17413 num = (num > (0x7fff)) ? -2 : num;
17420 free_charset (re_charset_t *cset)
17422 free (cset->mbchars);
17424 free (cset->coll_syms);
17425 free (cset->equiv_classes);
17426 free (cset->range_starts);
17427 free (cset->range_ends);
17429 free (cset->char_classes);
17438 static bin_tree_t *
17439 create_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right,
17440 re_token_type_t type)
17444 return create_token_tree (dfa, left, right, &t);
17447 static bin_tree_t *
17448 create_token_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right,
17449 const re_token_t *token)
17452 if (__builtin_expect (dfa->str_tree_storage_idx == ((1024 - sizeof (void *)) / sizeof (bin_tree_t)), 0))
17454 bin_tree_storage_t *storage = ((bin_tree_storage_t *) malloc ((1) * sizeof (bin_tree_storage_t)));
17456 if (storage == ((void *)0))
17457 return ((void *)0);
17458 storage->next = dfa->str_tree_storage;
17459 dfa->str_tree_storage = storage;
17460 dfa->str_tree_storage_idx = 0;
17462 tree = &dfa->str_tree_storage->data[dfa->str_tree_storage_idx++];
17464 tree->parent = ((void *)0);
17466 tree->right = right;
17467 tree->token = *token;
17468 tree->token.duplicated = 0;
17469 tree->token.opt_subexp = 0;
17470 tree->first = ((void *)0);
17471 tree->next = ((void *)0);
17472 tree->node_idx = -1;
17474 if (left != ((void *)0))
17475 left->parent = tree;
17476 if (right != ((void *)0))
17477 right->parent = tree;
17484 static reg_errcode_t
17485 mark_opt_subexp (void *extra, bin_tree_t *node)
17487 int idx = (int) (long) extra;
17488 if (node->token.type == SUBEXP && node->token.opr.idx == idx)
17489 node->token.opt_subexp = 1;
17491 return REG_NOERROR;
17497 free_token (re_token_t *node)
17500 if (node->type == COMPLEX_BRACKET && node->duplicated == 0)
17501 free_charset (node->opr.mbcset);
17504 if (node->type == SIMPLE_BRACKET && node->duplicated == 0)
17505 free (node->opr.sbcset);
17511 static reg_errcode_t
17512 free_tree (void *extra, bin_tree_t *node)
17514 free_token (&node->token);
17515 return REG_NOERROR;
17524 static bin_tree_t *
17525 duplicate_tree (const bin_tree_t *root, re_dfa_t *dfa)
17527 const bin_tree_t *node;
17528 bin_tree_t *dup_root;
17529 bin_tree_t **p_new = &dup_root, *dup_node = root->parent;
17531 for (node = root; ; )
17534 *p_new = create_token_tree (dfa, ((void *)0), ((void *)0), &node->token);
17535 if (*p_new == ((void *)0))
17536 return ((void *)0);
17537 (*p_new)->parent = dup_node;
17538 (*p_new)->token.duplicated = 1;
17545 p_new = &dup_node->left;
17549 const bin_tree_t *prev = ((void *)0);
17550 while (node->right == prev || node->right == ((void *)0))
17553 node = node->parent;
17554 dup_node = dup_node->parent;
17558 node = node->right;
17559 p_new = &dup_node->right;
17566 static reg_errcode_t match_ctx_init (re_match_context_t *cache, int eflags,
17568 static void match_ctx_clean (re_match_context_t *mctx) ;
17569 static void match_ctx_free (re_match_context_t *cache) ;
17570 static reg_errcode_t match_ctx_add_entry (re_match_context_t *cache, int node,
17571 int str_idx, int from, int to)
17573 static int search_cur_bkref_entry (const re_match_context_t *mctx, int str_idx)
17575 static reg_errcode_t match_ctx_add_subtop (re_match_context_t *mctx, int node,
17577 static re_sub_match_last_t * match_ctx_add_sublast (re_sub_match_top_t *subtop,
17578 int node, int str_idx)
17580 static void sift_ctx_init (re_sift_context_t *sctx, re_dfastate_t **sifted_sts,
17581 re_dfastate_t **limited_sts, int last_node,
17584 static reg_errcode_t re_search_internal (const regex_t *preg,
17585 const char *string, int length,
17586 int start, int range, int stop,
17587 size_t nmatch, regmatch_t pmatch[],
17589 static int re_search_2_stub (struct re_pattern_buffer *bufp,
17590 const char *string1, int length1,
17591 const char *string2, int length2,
17592 int start, int range, struct re_registers *regs,
17593 int stop, int ret_len) ;
17594 static int re_search_stub (struct re_pattern_buffer *bufp,
17595 const char *string, int length, int start,
17596 int range, int stop, struct re_registers *regs,
17598 static unsigned re_copy_regs (struct re_registers *regs, regmatch_t *pmatch,
17599 int nregs, int regs_allocated) ;
17600 static reg_errcode_t prune_impossible_nodes (re_match_context_t *mctx)
17602 static int check_matching (re_match_context_t *mctx, int fl_longest_match,
17603 int *p_match_first) ;
17604 static int check_halt_state_context (const re_match_context_t *mctx,
17605 const re_dfastate_t *state, int idx)
17607 static void update_regs (const re_dfa_t *dfa, regmatch_t *pmatch,
17608 regmatch_t *prev_idx_match, int cur_node,
17609 int cur_idx, int nmatch) ;
17610 static reg_errcode_t push_fail_stack (struct re_fail_stack_t *fs,
17611 int str_idx, int dest_node, int nregs,
17613 re_node_set *eps_via_nodes)
17615 static reg_errcode_t set_regs (const regex_t *preg,
17616 const re_match_context_t *mctx,
17617 size_t nmatch, regmatch_t *pmatch,
17618 int fl_backtrack) ;
17619 static reg_errcode_t free_fail_stack_return (struct re_fail_stack_t *fs)
17623 static int sift_states_iter_mb (const re_match_context_t *mctx,
17624 re_sift_context_t *sctx,
17625 int node_idx, int str_idx, int max_str_idx)
17628 static reg_errcode_t sift_states_backward (const re_match_context_t *mctx,
17629 re_sift_context_t *sctx)
17631 static reg_errcode_t build_sifted_states (const re_match_context_t *mctx,
17632 re_sift_context_t *sctx, int str_idx,
17633 re_node_set *cur_dest)
17635 static reg_errcode_t update_cur_sifted_state (const re_match_context_t *mctx,
17636 re_sift_context_t *sctx,
17638 re_node_set *dest_nodes)
17640 static reg_errcode_t add_epsilon_src_nodes (const re_dfa_t *dfa,
17641 re_node_set *dest_nodes,
17642 const re_node_set *candidates)
17644 static int check_dst_limits (const re_match_context_t *mctx,
17645 re_node_set *limits,
17646 int dst_node, int dst_idx, int src_node,
17648 static int check_dst_limits_calc_pos_1 (const re_match_context_t *mctx,
17649 int boundaries, int subexp_idx,
17650 int from_node, int bkref_idx)
17652 static int check_dst_limits_calc_pos (const re_match_context_t *mctx,
17653 int limit, int subexp_idx,
17654 int node, int str_idx,
17656 static reg_errcode_t check_subexp_limits (const re_dfa_t *dfa,
17657 re_node_set *dest_nodes,
17658 const re_node_set *candidates,
17659 re_node_set *limits,
17660 struct re_backref_cache_entry *bkref_ents,
17662 static reg_errcode_t sift_states_bkref (const re_match_context_t *mctx,
17663 re_sift_context_t *sctx,
17664 int str_idx, const re_node_set *candidates)
17666 static reg_errcode_t merge_state_array (const re_dfa_t *dfa,
17667 re_dfastate_t **dst,
17668 re_dfastate_t **src, int num)
17670 static re_dfastate_t *find_recover_state (reg_errcode_t *err,
17671 re_match_context_t *mctx) ;
17672 static re_dfastate_t *transit_state (reg_errcode_t *err,
17673 re_match_context_t *mctx,
17674 re_dfastate_t *state) ;
17675 static re_dfastate_t *merge_state_with_log (reg_errcode_t *err,
17676 re_match_context_t *mctx,
17677 re_dfastate_t *next_state)
17679 static reg_errcode_t check_subexp_matching_top (re_match_context_t *mctx,
17680 re_node_set *cur_nodes,
17689 static reg_errcode_t transit_state_mb (re_match_context_t *mctx,
17690 re_dfastate_t *pstate)
17693 static reg_errcode_t transit_state_bkref (re_match_context_t *mctx,
17694 const re_node_set *nodes)
17696 static reg_errcode_t get_subexp (re_match_context_t *mctx,
17697 int bkref_node, int bkref_str_idx)
17699 static reg_errcode_t get_subexp_sub (re_match_context_t *mctx,
17700 const re_sub_match_top_t *sub_top,
17701 re_sub_match_last_t *sub_last,
17702 int bkref_node, int bkref_str)
17704 static int find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes,
17705 int subexp_idx, int type) ;
17706 static reg_errcode_t check_arrival (re_match_context_t *mctx,
17707 state_array_t *path, int top_node,
17708 int top_str, int last_node, int last_str,
17710 static reg_errcode_t check_arrival_add_next_nodes (re_match_context_t *mctx,
17712 re_node_set *cur_nodes,
17713 re_node_set *next_nodes)
17715 static reg_errcode_t check_arrival_expand_ecl (const re_dfa_t *dfa,
17716 re_node_set *cur_nodes,
17717 int ex_subexp, int type)
17719 static reg_errcode_t check_arrival_expand_ecl_sub (const re_dfa_t *dfa,
17720 re_node_set *dst_nodes,
17721 int target, int ex_subexp,
17723 static reg_errcode_t expand_bkref_cache (re_match_context_t *mctx,
17724 re_node_set *cur_nodes, int cur_str,
17725 int subexp_num, int type)
17727 static int build_trtable (const re_dfa_t *dfa,
17728 re_dfastate_t *state) ;
17730 static int check_node_accept_bytes (const re_dfa_t *dfa, int node_idx,
17731 const re_string_t *input, int idx)
17734 static unsigned int find_collation_sequence_value (const unsigned char *mbs,
17739 static int group_nodes_into_DFAstates (const re_dfa_t *dfa,
17740 const re_dfastate_t *state,
17741 re_node_set *states_node,
17742 bitset_t *states_ch) ;
17743 static int check_node_accept (const re_match_context_t *mctx,
17744 const re_token_t *node, int idx)
17746 static reg_errcode_t extend_buffers (re_match_context_t *mctx)
17750 __regexec (preg, string, nmatch, pmatch, eflags)
17751 const regex_t *__restrict preg;
17752 const char *__restrict string;
17754 regmatch_t pmatch[];
17759 re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
17761 if (eflags & ~(1 | (1 << 1) | (1 << 2)))
17764 if (eflags & (1 << 2))
17766 start = pmatch[0].rm_so;
17767 length = pmatch[0].rm_eo;
17772 length = strlen (string);
17775 ({ __lll_mutex_lock (&(dfa->lock)); 0; });
17777 err = re_search_internal (preg, string, length, start, length - start,
17778 length, 0, ((void *)0), eflags);
17780 err = re_search_internal (preg, string, length, start, length - start,
17781 length, nmatch, pmatch, eflags);
17782 __lll_mutex_unlock(&(dfa->lock));
17783 return err != REG_NOERROR;
17787 # 1 "../include/shlib-compat.h" 1
17788 # 26 "../include/shlib-compat.h"
17789 # 1 "/var/tmp/portage/glibc-2.5/work/build-default-hppa2.0-unknown-linux-gnu-nptl/abi-versions.h" 1
17790 # 27 "../include/shlib-compat.h" 2
17791 # 259 "regexec.c" 2
17792 extern __typeof (__regexec) regexec __attribute__ ((weak, alias ("__regexec")));;
17795 __re_match (bufp, string, length, start, regs)
17796 struct re_pattern_buffer *bufp;
17797 const char *string;
17799 struct re_registers *regs;
17801 return re_search_stub (bufp, string, length, start, 0, length, regs, 1);
17804 extern __typeof (__re_match) re_match __attribute__ ((weak, alias ("__re_match")));
17808 __re_search (bufp, string, length, start, range, regs)
17809 struct re_pattern_buffer *bufp;
17810 const char *string;
17811 int length, start, range;
17812 struct re_registers *regs;
17814 return re_search_stub (bufp, string, length, start, range, length, regs, 0);
17817 extern __typeof (__re_search) re_search __attribute__ ((weak, alias ("__re_search")));
17821 __re_match_2 (bufp, string1, length1, string2, length2, start, regs, stop)
17822 struct re_pattern_buffer *bufp;
17823 const char *string1, *string2;
17824 int length1, length2, start, stop;
17825 struct re_registers *regs;
17827 return re_search_2_stub (bufp, string1, length1, string2, length2,
17828 start, 0, regs, stop, 1);
17831 extern __typeof (__re_match_2) re_match_2 __attribute__ ((weak, alias ("__re_match_2")));
17835 __re_search_2 (bufp, string1, length1, string2, length2, start, range, regs, stop)
17836 struct re_pattern_buffer *bufp;
17837 const char *string1, *string2;
17838 int length1, length2, start, range, stop;
17839 struct re_registers *regs;
17841 return re_search_2_stub (bufp, string1, length1, string2, length2,
17842 start, range, regs, stop, 0);
17845 extern __typeof (__re_search_2) re_search_2 __attribute__ ((weak, alias ("__re_search_2")));
17849 re_search_2_stub (bufp, string1, length1, string2, length2, start, range, regs,
17851 struct re_pattern_buffer *bufp;
17852 const char *string1, *string2;
17853 int length1, length2, start, range, stop, ret_len;
17854 struct re_registers *regs;
17858 int len = length1 + length2;
17861 if (__builtin_expect (length1 < 0 || length2 < 0 || stop < 0, 0))
17868 char *s = ((char *) malloc ((len) * sizeof (char)));
17870 if (__builtin_expect (s == ((void *)0), 0))
17873 memcpy (__builtin_mempcpy (s, string1, length1), string2, length2);
17886 rval = re_search_stub (bufp, str, len, start, range, stop, regs,
17889 free ((char *) str);
17899 re_search_stub (bufp, string, length, start, range, stop, regs, ret_len)
17900 struct re_pattern_buffer *bufp;
17901 const char *string;
17902 int length, start, range, stop, ret_len;
17903 struct re_registers *regs;
17905 reg_errcode_t result;
17906 regmatch_t *pmatch;
17909 re_dfa_t *dfa = (re_dfa_t *) bufp->buffer;
17912 if (__builtin_expect (start < 0 || start > length, 0))
17914 if (__builtin_expect (start + range > length, 0))
17915 range = length - start;
17916 else if (__builtin_expect (start + range < 0, 0))
17919 ({ __lll_mutex_lock (&(dfa->lock)); 0; });
17921 eflags |= (bufp->not_bol) ? 1 : 0;
17922 eflags |= (bufp->not_eol) ? (1 << 1) : 0;
17925 if (range > 0 && bufp->fastmap != ((void *)0) && !bufp->fastmap_accurate)
17926 __re_compile_fastmap (bufp);
17928 if (__builtin_expect (bufp->no_sub, 0))
17929 regs = ((void *)0);
17932 if (regs == ((void *)0))
17934 else if (__builtin_expect (bufp->regs_allocated == 2 && regs->num_regs < bufp->re_nsub + 1, 0))
17937 nregs = regs->num_regs;
17938 if (__builtin_expect (nregs < 1, 0))
17941 regs = ((void *)0);
17946 nregs = bufp->re_nsub + 1;
17947 pmatch = ((regmatch_t *) malloc ((nregs) * sizeof (regmatch_t)));
17948 if (__builtin_expect (pmatch == ((void *)0), 0))
17954 result = re_search_internal (bufp, string, length, start, range, stop,
17955 nregs, pmatch, eflags);
17960 if (result != REG_NOERROR)
17962 else if (regs != ((void *)0))
17965 bufp->regs_allocated = re_copy_regs (regs, pmatch, nregs,
17966 bufp->regs_allocated);
17967 if (__builtin_expect (bufp->regs_allocated == 0, 0))
17971 if (__builtin_expect (rval == 0, 1))
17975 ((pmatch[0].rm_so == start) ? (void) (0) : (__assert_fail ("pmatch[0].rm_so == start", "regexec.c", 487, __PRETTY_FUNCTION__), (void) (0)));
17976 rval = pmatch[0].rm_eo - start;
17979 rval = pmatch[0].rm_so;
17983 __lll_mutex_unlock(&(dfa->lock));
17988 re_copy_regs (regs, pmatch, nregs, regs_allocated)
17989 struct re_registers *regs;
17990 regmatch_t *pmatch;
17991 int nregs, regs_allocated;
17995 int need_regs = nregs + 1;
18000 if (regs_allocated == 0)
18002 regs->start = ((regoff_t *) malloc ((need_regs) * sizeof (regoff_t)));
18003 regs->end = ((regoff_t *) malloc ((need_regs) * sizeof (regoff_t)));
18004 if (__builtin_expect (regs->start == ((void *)0), 0) || __builtin_expect (regs->end == ((void *)0), 0))
18006 regs->num_regs = need_regs;
18008 else if (regs_allocated == 1)
18012 if (__builtin_expect (need_regs > regs->num_regs, 0))
18014 regoff_t *new_start = ((regoff_t *) realloc (regs->start, (need_regs) * sizeof (regoff_t)));
18015 regoff_t *new_end = ((regoff_t *) realloc (regs->end, (need_regs) * sizeof (regoff_t)));
18016 if (__builtin_expect (new_start == ((void *)0), 0) || __builtin_expect (new_end == ((void *)0), 0))
18018 regs->start = new_start;
18019 regs->end = new_end;
18020 regs->num_regs = need_regs;
18025 ((regs_allocated == 2) ? (void) (0) : (__assert_fail ("regs_allocated == 2", "regexec.c", 537, __PRETTY_FUNCTION__), (void) (0)));
18027 ((regs->num_regs >= nregs) ? (void) (0) : (__assert_fail ("regs->num_regs >= nregs", "regexec.c", 539, __PRETTY_FUNCTION__), (void) (0)));
18032 for (i = 0; i < nregs; ++i)
18034 regs->start[i] = pmatch[i].rm_so;
18035 regs->end[i] = pmatch[i].rm_eo;
18037 for ( ; i < regs->num_regs; ++i)
18038 regs->start[i] = regs->end[i] = -1;
18044 __re_set_registers (bufp, regs, num_regs, starts, ends)
18045 struct re_pattern_buffer *bufp;
18046 struct re_registers *regs;
18048 regoff_t *starts, *ends;
18052 bufp->regs_allocated = 1;
18053 regs->num_regs = num_regs;
18054 regs->start = starts;
18059 bufp->regs_allocated = 0;
18060 regs->num_regs = 0;
18061 regs->start = regs->end = (regoff_t *) 0;
18065 extern __typeof (__re_set_registers) re_set_registers __attribute__ ((weak, alias ("__re_set_registers")));
18074 __attribute__ ((weak))
18079 return 0 == __regexec (&re_comp_buf, s, 0, ((void *)0), 0);
18082 static reg_errcode_t
18083 re_search_internal (preg, string, length, start, range, stop, nmatch, pmatch,
18085 const regex_t *preg;
18086 const char *string;
18087 int length, start, range, stop, eflags;
18089 regmatch_t pmatch[];
18092 const re_dfa_t *dfa = (const re_dfa_t *) preg->buffer;
18093 int left_lim, right_lim, incr;
18094 int fl_longest_match, match_first, match_kind, match_last = -1;
18098 re_match_context_t mctx = { .dfa = dfa };
18102 char *fastmap = (preg->fastmap != ((void *)0) && preg->fastmap_accurate
18103 && range && !preg->can_be_null) ? preg->fastmap : ((void *)0);
18104 unsigned char * t = preg->translate;
18111 extra_nmatch = (nmatch > preg->re_nsub) ? nmatch - (preg->re_nsub + 1) : 0;
18112 nmatch -= extra_nmatch;
18115 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))
18118 return REG_NOMATCH;
18120 if (dfa->init_state->nodes.nelem == 0
18121 && dfa->init_state_word->nodes.nelem == 0
18122 && (dfa->init_state_nl->nodes.nelem == 0
18123 || !preg->newline_anchor))
18125 if (start != 0 && start + range != 0)
18126 return REG_NOMATCH;
18131 fl_longest_match = (nmatch != 0 || dfa->nbackref);
18133 err = re_string_allocate (&mctx.input, string, length, dfa->nodes_len + 1,
18134 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);
18135 if (__builtin_expect (err != REG_NOERROR, 0))
18137 mctx.input.stop = stop;
18138 mctx.input.raw_stop = stop;
18139 mctx.input.newline_anchor = preg->newline_anchor;
18141 err = match_ctx_init (&mctx, eflags, dfa->nbackref * 2);
18142 if (__builtin_expect (err != REG_NOERROR, 0))
18149 if (nmatch > 1 || dfa->has_mb_node)
18151 mctx.state_log = ((re_dfastate_t * *) malloc ((mctx.input.bufs_len + 1) * sizeof (re_dfastate_t *)));
18152 if (__builtin_expect (mctx.state_log == ((void *)0), 0))
18159 mctx.state_log = ((void *)0);
18161 match_first = start;
18162 mctx.input.tip_context = (eflags & 1) ? ((1 << 1) << 1)
18163 : (1 << 1) | ((1 << 1) << 1);
18166 incr = (range < 0) ? -1 : 1;
18167 left_lim = (range < 0) ? start + range : start;
18168 right_lim = (range < 0) ? start : start + range;
18169 sb = dfa->mb_cur_max == 1;
18172 ? ((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)
18173 | (range >= 0 ? 2 : 0)
18174 | (t != ((void *)0) ? 1 : 0))
18177 for (;; match_first += incr)
18180 if (match_first < left_lim || right_lim < match_first)
18188 switch (match_kind)
18196 while (__builtin_expect (match_first < right_lim, 1)
18197 && !fastmap[t[(unsigned char) string[match_first]]])
18199 goto forward_match_found_start_or_reached_end;
18203 while (__builtin_expect (match_first < right_lim, 1)
18204 && !fastmap[(unsigned char) string[match_first]])
18207 forward_match_found_start_or_reached_end:
18208 if (__builtin_expect (match_first == right_lim, 0))
18210 ch = match_first >= length
18211 ? 0 : (unsigned char) string[match_first];
18212 if (!fastmap[t ? t[ch] : ch])
18220 while (match_first >= left_lim)
18222 ch = match_first >= length
18223 ? 0 : (unsigned char) string[match_first];
18224 if (fastmap[t ? t[ch] : ch])
18228 if (match_first < left_lim)
18240 unsigned int offset = match_first - mctx.input.raw_mbs_idx;
18241 if (__builtin_expect (offset >= (unsigned int) mctx.input.valid_raw_len, 0))
18243 err = re_string_reconstruct (&mctx.input, match_first,
18245 if (__builtin_expect (err != REG_NOERROR, 0))
18248 offset = match_first - mctx.input.raw_mbs_idx;
18252 ch = (match_first >= length
18253 ? 0 : ((&mctx.input)->mbs[offset]));
18256 match_first += incr;
18257 if (match_first < left_lim || match_first > right_lim)
18268 err = re_string_reconstruct (&mctx.input, match_first, eflags);
18269 if (__builtin_expect (err != REG_NOERROR, 0))
18275 if (!sb && !((0) == (&mctx.input)->valid_len || (&mctx.input)->wcs[0] != (0xffffffffu)))
18281 mctx.state_log_top = mctx.nbkref_ents = mctx.max_mb_elem_len = 0;
18282 match_last = check_matching (&mctx, fl_longest_match,
18283 range >= 0 ? &match_first : ((void *)0));
18284 if (match_last != -1)
18286 if (__builtin_expect (match_last == -2, 0))
18293 mctx.match_last = match_last;
18294 if ((!preg->no_sub && nmatch > 1) || dfa->nbackref)
18296 re_dfastate_t *pstate = mctx.state_log[match_last];
18297 mctx.last_node = check_halt_state_context (&mctx, pstate,
18300 if ((!preg->no_sub && nmatch > 1 && dfa->has_plural_match)
18303 err = prune_impossible_nodes (&mctx);
18304 if (err == REG_NOERROR)
18306 if (__builtin_expect (err != REG_NOMATCH, 0))
18315 match_ctx_clean (&mctx);
18329 for (reg_idx = 1; reg_idx < nmatch; ++reg_idx)
18330 pmatch[reg_idx].rm_so = pmatch[reg_idx].rm_eo = -1;
18333 pmatch[0].rm_so = 0;
18334 pmatch[0].rm_eo = mctx.match_last;
18336 if (!preg->no_sub && nmatch > 1)
18338 err = set_regs (preg, &mctx, nmatch, pmatch,
18339 dfa->has_plural_match && dfa->nbackref > 0);
18340 if (__builtin_expect (err != REG_NOERROR, 0))
18347 for (reg_idx = 0; reg_idx < nmatch; ++reg_idx)
18348 if (pmatch[reg_idx].rm_so != -1)
18351 if (__builtin_expect (mctx.input.offsets_needed != 0, 0))
18353 pmatch[reg_idx].rm_so =
18354 (pmatch[reg_idx].rm_so == mctx.input.valid_len
18355 ? mctx.input.valid_raw_len
18356 : mctx.input.offsets[pmatch[reg_idx].rm_so]);
18357 pmatch[reg_idx].rm_eo =
18358 (pmatch[reg_idx].rm_eo == mctx.input.valid_len
18359 ? mctx.input.valid_raw_len
18360 : mctx.input.offsets[pmatch[reg_idx].rm_eo]);
18365 pmatch[reg_idx].rm_so += match_first;
18366 pmatch[reg_idx].rm_eo += match_first;
18368 for (reg_idx = 0; reg_idx < extra_nmatch; ++reg_idx)
18370 pmatch[nmatch + reg_idx].rm_so = -1;
18371 pmatch[nmatch + reg_idx].rm_eo = -1;
18374 if (dfa->subexp_map)
18375 for (reg_idx = 0; reg_idx + 1 < nmatch; reg_idx++)
18376 if (dfa->subexp_map[reg_idx] != reg_idx)
18378 pmatch[reg_idx + 1].rm_so
18379 = pmatch[dfa->subexp_map[reg_idx] + 1].rm_so;
18380 pmatch[reg_idx + 1].rm_eo
18381 = pmatch[dfa->subexp_map[reg_idx] + 1].rm_eo;
18386 free (mctx.state_log);
18388 match_ctx_free (&mctx);
18389 re_string_destruct (&mctx.input);
18393 static reg_errcode_t
18394 prune_impossible_nodes (mctx)
18395 re_match_context_t *mctx;
18397 const re_dfa_t *const dfa = mctx->dfa;
18398 int halt_node, match_last;
18400 re_dfastate_t **sifted_states;
18401 re_dfastate_t **lim_states = ((void *)0);
18402 re_sift_context_t sctx;
18406 match_last = mctx->match_last;
18407 halt_node = mctx->last_node;
18408 sifted_states = ((re_dfastate_t * *) malloc ((match_last + 1) * sizeof (re_dfastate_t *)));
18409 if (__builtin_expect (sifted_states == ((void *)0), 0))
18416 lim_states = ((re_dfastate_t * *) malloc ((match_last + 1) * sizeof (re_dfastate_t *)));
18417 if (__builtin_expect (lim_states == ((void *)0), 0))
18424 memset (lim_states, '\0',
18425 sizeof (re_dfastate_t *) * (match_last + 1));
18426 sift_ctx_init (&sctx, sifted_states, lim_states, halt_node,
18428 ret = sift_states_backward (mctx, &sctx);
18429 free ((&sctx.limits)->elems);
18430 if (__builtin_expect (ret != REG_NOERROR, 0))
18432 if (sifted_states[0] != ((void *)0) || lim_states[0] != ((void *)0))
18437 if (match_last < 0)
18442 } while (mctx->state_log[match_last] == ((void *)0)
18443 || !mctx->state_log[match_last]->halt);
18444 halt_node = check_halt_state_context (mctx,
18445 mctx->state_log[match_last],
18448 ret = merge_state_array (dfa, sifted_states, lim_states,
18451 lim_states = ((void *)0);
18452 if (__builtin_expect (ret != REG_NOERROR, 0))
18457 sift_ctx_init (&sctx, sifted_states, lim_states, halt_node, match_last);
18458 ret = sift_states_backward (mctx, &sctx);
18459 free ((&sctx.limits)->elems);
18460 if (__builtin_expect (ret != REG_NOERROR, 0))
18463 free (mctx->state_log);
18464 mctx->state_log = sifted_states;
18465 sifted_states = ((void *)0);
18466 mctx->last_node = halt_node;
18467 mctx->match_last = match_last;
18470 free (sifted_states);
18479 static inline re_dfastate_t *
18480 __attribute__ ((always_inline))
18481 acquire_init_state_context (reg_errcode_t *err, const re_match_context_t *mctx,
18484 const re_dfa_t *const dfa = mctx->dfa;
18485 if (dfa->init_state->has_constraint)
18487 unsigned int context;
18488 context = re_string_context_at (&mctx->input, idx - 1, mctx->eflags);
18489 if (((context) & 1))
18490 return dfa->init_state_word;
18491 else if (((context) == 0))
18492 return dfa->init_state;
18493 else if (((context) & ((1 << 1) << 1)) && ((context) & (1 << 1)))
18494 return dfa->init_state_begbuf;
18495 else if (((context) & (1 << 1)))
18496 return dfa->init_state_nl;
18497 else if (((context) & ((1 << 1) << 1)))
18500 return re_acquire_state_context (err, dfa,
18501 dfa->init_state->entrance_nodes,
18506 return dfa->init_state;
18509 return dfa->init_state;
18514 check_matching (re_match_context_t *mctx, int fl_longest_match,
18515 int *p_match_first)
18517 const re_dfa_t *const dfa = mctx->dfa;
18520 int match_last = -1;
18521 int cur_str_idx = ((&mctx->input)->cur_idx);
18522 re_dfastate_t *cur_state;
18523 int at_init_state = p_match_first != ((void *)0);
18524 int next_start_idx = cur_str_idx;
18527 cur_state = acquire_init_state_context (&err, mctx, cur_str_idx);
18529 if (__builtin_expect (cur_state == ((void *)0), 0))
18531 ((err == REG_ESPACE) ? (void) (0) : (__assert_fail ("err == REG_ESPACE", "regexec.c", 1085, __PRETTY_FUNCTION__), (void) (0)));
18535 if (mctx->state_log != ((void *)0))
18537 mctx->state_log[cur_str_idx] = cur_state;
18541 if (__builtin_expect (dfa->nbackref, 0))
18544 err = check_subexp_matching_top (mctx, &cur_state->nodes, 0);
18545 if (__builtin_expect (err != REG_NOERROR, 0))
18548 if (cur_state->has_backref)
18550 err = transit_state_bkref (mctx, &cur_state->nodes);
18551 if (__builtin_expect (err != REG_NOERROR, 0))
18558 if (__builtin_expect (cur_state->halt, 0))
18560 if (!cur_state->has_constraint
18561 || check_halt_state_context (mctx, cur_state, cur_str_idx))
18563 if (!fl_longest_match)
18564 return cur_str_idx;
18567 match_last = cur_str_idx;
18573 while (!((&mctx->input)->stop <= (&mctx->input)->cur_idx))
18575 re_dfastate_t *old_state = cur_state;
18576 int next_char_idx = ((&mctx->input)->cur_idx) + 1;
18578 if (__builtin_expect (next_char_idx >= mctx->input.bufs_len, 0)
18579 || (__builtin_expect (next_char_idx >= mctx->input.valid_len, 0)
18580 && mctx->input.valid_len < mctx->input.len))
18582 err = extend_buffers (mctx);
18583 if (__builtin_expect (err != REG_NOERROR, 0))
18585 ((err == REG_ESPACE) ? (void) (0) : (__assert_fail ("err == REG_ESPACE", "regexec.c", 1139, __PRETTY_FUNCTION__), (void) (0)));
18590 cur_state = transit_state (&err, mctx, cur_state);
18591 if (mctx->state_log != ((void *)0))
18592 cur_state = merge_state_with_log (&err, mctx, cur_state);
18594 if (cur_state == ((void *)0))
18599 if (__builtin_expect (err != REG_NOERROR, 0))
18602 if (mctx->state_log == ((void *)0)
18603 || (match && !fl_longest_match)
18604 || (cur_state = find_recover_state (&err, mctx)) == ((void *)0))
18608 if (__builtin_expect (at_init_state, 0))
18610 if (old_state == cur_state)
18611 next_start_idx = next_char_idx;
18616 if (cur_state->halt)
18620 if (!cur_state->has_constraint
18621 || check_halt_state_context (mctx, cur_state,
18622 ((&mctx->input)->cur_idx)))
18625 match_last = ((&mctx->input)->cur_idx);
18629 p_match_first = ((void *)0);
18630 if (!fl_longest_match)
18637 *p_match_first += next_start_idx;
18646 check_halt_node_context (const re_dfa_t *dfa, int node, unsigned int context)
18648 re_token_type_t type = dfa->nodes[node].type;
18649 unsigned int constraint = dfa->nodes[node].constraint;
18650 if (type != END_OF_RE)
18654 if (((((constraint) & 0x0004) && !((context) & 1)) || (((constraint) & 0x0008) && ((context) & 1)) || (((constraint) & 0x0020) && !((context) & (1 << 1))) || (((constraint) & 0x0080) && !((context) & (((1 << 1) << 1) << 1)))))
18665 check_halt_state_context (const re_match_context_t *mctx,
18666 const re_dfastate_t *state, int idx)
18669 unsigned int context;
18673 context = re_string_context_at (&mctx->input, idx, mctx->eflags);
18674 for (i = 0; i < state->nodes.nelem; ++i)
18675 if (check_halt_node_context (mctx->dfa, state->nodes.elems[i], context))
18676 return state->nodes.elems[i];
18687 proceed_next_node (const re_match_context_t *mctx, int nregs, regmatch_t *regs,
18688 int *pidx, int node, re_node_set *eps_via_nodes,
18689 struct re_fail_stack_t *fs)
18691 const re_dfa_t *const dfa = mctx->dfa;
18693 if (((dfa->nodes[node].type) & 8))
18695 re_node_set *cur_nodes = &mctx->state_log[*pidx]->nodes;
18696 re_node_set *edests = &dfa->edests[node];
18698 err = re_node_set_insert (eps_via_nodes, node);
18699 if (__builtin_expect (err < 0, 0))
18702 for (dest_node = -1, i = 0; i < edests->nelem; ++i)
18704 int candidate = edests->elems[i];
18705 if (!re_node_set_contains (cur_nodes, candidate))
18707 if (dest_node == -1)
18708 dest_node = candidate;
18714 if (re_node_set_contains (eps_via_nodes, dest_node))
18718 else if (fs != ((void *)0)
18719 && push_fail_stack (fs, *pidx, candidate, nregs, regs,
18732 re_token_type_t type = dfa->nodes[node].type;
18735 if (dfa->nodes[node].accept_mb)
18736 naccepted = check_node_accept_bytes (dfa, node, &mctx->input, *pidx);
18739 if (type == OP_BACK_REF)
18741 int subexp_idx = dfa->nodes[node].opr.idx + 1;
18742 naccepted = regs[subexp_idx].rm_eo - regs[subexp_idx].rm_so;
18743 if (fs != ((void *)0))
18745 if (regs[subexp_idx].rm_so == -1 || regs[subexp_idx].rm_eo == -1)
18747 else if (naccepted)
18749 char *buf = (char *) ((&mctx->input)->mbs);
18750 if (memcmp (buf + regs[subexp_idx].rm_so, buf + *pidx,
18756 if (naccepted == 0)
18759 err = re_node_set_insert (eps_via_nodes, node);
18760 if (__builtin_expect (err < 0, 0))
18762 dest_node = dfa->edests[node].elems[0];
18763 if (re_node_set_contains (&mctx->state_log[*pidx]->nodes,
18770 || check_node_accept (mctx, dfa->nodes + node, *pidx))
18772 int dest_node = dfa->nexts[node];
18773 *pidx = (naccepted == 0) ? *pidx + 1 : *pidx + naccepted;
18774 if (fs && (*pidx > mctx->match_last || mctx->state_log[*pidx] == ((void *)0)
18775 || !re_node_set_contains (&mctx->state_log[*pidx]->nodes,
18778 ((eps_via_nodes)->nelem = 0);
18785 static reg_errcode_t
18787 push_fail_stack (struct re_fail_stack_t *fs, int str_idx, int dest_node,
18788 int nregs, regmatch_t *regs, re_node_set *eps_via_nodes)
18791 int num = fs->num++;
18792 if (fs->num == fs->alloc)
18794 struct re_fail_stack_ent_t *new_array;
18795 new_array = realloc (fs->stack, (sizeof (struct re_fail_stack_ent_t)
18797 if (new_array == ((void *)0))
18800 fs->stack = new_array;
18802 fs->stack[num].idx = str_idx;
18803 fs->stack[num].node = dest_node;
18804 fs->stack[num].regs = ((regmatch_t *) malloc ((nregs) * sizeof (regmatch_t)));
18805 if (fs->stack[num].regs == ((void *)0))
18807 memcpy (fs->stack[num].regs, regs, sizeof (regmatch_t) * nregs);
18808 err = re_node_set_init_copy (&fs->stack[num].eps_via_nodes, eps_via_nodes);
18814 pop_fail_stack (struct re_fail_stack_t *fs, int *pidx, int nregs,
18815 regmatch_t *regs, re_node_set *eps_via_nodes)
18817 int num = --fs->num;
18818 ((num >= 0) ? (void) (0) : (__assert_fail ("num >= 0", "regexec.c", 1372, __PRETTY_FUNCTION__), (void) (0)));
18819 *pidx = fs->stack[num].idx;
18820 memcpy (regs, fs->stack[num].regs, sizeof (regmatch_t) * nregs);
18821 free ((eps_via_nodes)->elems);
18822 free (fs->stack[num].regs);
18823 *eps_via_nodes = fs->stack[num].eps_via_nodes;
18824 return fs->stack[num].node;
18832 static reg_errcode_t
18834 set_regs (const regex_t *preg, const re_match_context_t *mctx, size_t nmatch,
18835 regmatch_t *pmatch, int fl_backtrack)
18837 const re_dfa_t *dfa = (const re_dfa_t *) preg->buffer;
18839 re_node_set eps_via_nodes;
18840 struct re_fail_stack_t *fs;
18841 struct re_fail_stack_t fs_body = { 0, 2, ((void *)0) };
18842 regmatch_t *prev_idx_match;
18843 int prev_idx_match_malloced = 0;
18852 fs->stack = ((struct re_fail_stack_ent_t *) malloc ((fs->alloc) * sizeof (struct re_fail_stack_ent_t)));
18853 if (fs->stack == ((void *)0))
18859 cur_node = dfa->init_node;
18860 memset (&eps_via_nodes, '\0', sizeof (re_node_set));
18862 if (__libc_use_alloca (nmatch * sizeof (regmatch_t)))
18863 prev_idx_match = (regmatch_t *) __builtin_alloca (nmatch * sizeof (regmatch_t));
18866 prev_idx_match = ((regmatch_t *) malloc ((nmatch) * sizeof (regmatch_t)));
18867 if (prev_idx_match == ((void *)0))
18869 free_fail_stack_return (fs);
18872 prev_idx_match_malloced = 1;
18874 memcpy (prev_idx_match, pmatch, sizeof (regmatch_t) * nmatch);
18876 for (idx = pmatch[0].rm_so; idx <= pmatch[0].rm_eo ;)
18878 update_regs (dfa, pmatch, prev_idx_match, cur_node, idx, nmatch);
18880 if (idx == pmatch[0].rm_eo && cur_node == mctx->last_node)
18885 for (reg_idx = 0; reg_idx < nmatch; ++reg_idx)
18886 if (pmatch[reg_idx].rm_so > -1 && pmatch[reg_idx].rm_eo == -1)
18888 if (reg_idx == nmatch)
18890 free ((&eps_via_nodes)->elems);
18891 if (prev_idx_match_malloced)
18892 free (prev_idx_match);
18893 return free_fail_stack_return (fs);
18895 cur_node = pop_fail_stack (fs, &idx, nmatch, pmatch,
18900 free ((&eps_via_nodes)->elems);
18901 if (prev_idx_match_malloced)
18902 free (prev_idx_match);
18903 return REG_NOERROR;
18908 cur_node = proceed_next_node (mctx, nmatch, pmatch, &idx, cur_node,
18909 &eps_via_nodes, fs);
18911 if (__builtin_expect (cur_node < 0, 0))
18913 if (__builtin_expect (cur_node == -2, 0))
18915 free ((&eps_via_nodes)->elems);
18916 if (prev_idx_match_malloced)
18917 free (prev_idx_match);
18918 free_fail_stack_return (fs);
18922 cur_node = pop_fail_stack (fs, &idx, nmatch, pmatch,
18926 free ((&eps_via_nodes)->elems);
18927 if (prev_idx_match_malloced)
18928 free (prev_idx_match);
18929 return REG_NOMATCH;
18933 free ((&eps_via_nodes)->elems);
18934 if (prev_idx_match_malloced)
18935 free (prev_idx_match);
18936 return free_fail_stack_return (fs);
18939 static reg_errcode_t
18941 free_fail_stack_return (struct re_fail_stack_t *fs)
18946 for (fs_idx = 0; fs_idx < fs->num; ++fs_idx)
18948 free ((&fs->stack[fs_idx].eps_via_nodes)->elems);
18949 free (fs->stack[fs_idx].regs);
18953 return REG_NOERROR;
18958 update_regs (const re_dfa_t *dfa, regmatch_t *pmatch,
18959 regmatch_t *prev_idx_match, int cur_node, int cur_idx, int nmatch)
18961 int type = dfa->nodes[cur_node].type;
18962 if (type == OP_OPEN_SUBEXP)
18964 int reg_num = dfa->nodes[cur_node].opr.idx + 1;
18967 if (reg_num < nmatch)
18969 pmatch[reg_num].rm_so = cur_idx;
18970 pmatch[reg_num].rm_eo = -1;
18973 else if (type == OP_CLOSE_SUBEXP)
18975 int reg_num = dfa->nodes[cur_node].opr.idx + 1;
18976 if (reg_num < nmatch)
18979 if (pmatch[reg_num].rm_so < cur_idx)
18981 pmatch[reg_num].rm_eo = cur_idx;
18984 memcpy (prev_idx_match, pmatch, sizeof (regmatch_t) * nmatch);
18988 if (dfa->nodes[cur_node].opt_subexp
18989 && prev_idx_match[reg_num].rm_so != -1)
18995 memcpy (pmatch, prev_idx_match, sizeof (regmatch_t) * nmatch);
18999 pmatch[reg_num].rm_eo = cur_idx;
19005 static reg_errcode_t
19007 sift_states_backward (const re_match_context_t *mctx, re_sift_context_t *sctx)
19011 int str_idx = sctx->last_str_idx;
19012 re_node_set cur_dest;
19020 err = re_node_set_init_1 (&cur_dest, sctx->last_node);
19021 if (__builtin_expect (err != REG_NOERROR, 0))
19023 err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest);
19024 if (__builtin_expect (err != REG_NOERROR, 0))
19028 while (str_idx > 0)
19031 null_cnt = (sctx->sifted_states[str_idx] == ((void *)0)) ? null_cnt + 1 : 0;
19032 if (null_cnt > mctx->max_mb_elem_len)
19034 memset (sctx->sifted_states, '\0',
19035 sizeof (re_dfastate_t *) * str_idx);
19036 free ((&cur_dest)->elems);
19037 return REG_NOERROR;
19039 ((&cur_dest)->nelem = 0);
19042 if (mctx->state_log[str_idx])
19044 err = build_sifted_states (mctx, sctx, str_idx, &cur_dest);
19045 if (__builtin_expect (err != REG_NOERROR, 0))
19053 err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest);
19054 if (__builtin_expect (err != REG_NOERROR, 0))
19059 free ((&cur_dest)->elems);
19063 static reg_errcode_t
19065 build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx,
19066 int str_idx, re_node_set *cur_dest)
19068 const re_dfa_t *const dfa = mctx->dfa;
19069 const re_node_set *cur_src = &mctx->state_log[str_idx]->non_eps_nodes;
19072 for (i = 0; i < cur_src->nelem; i++)
19074 int prev_node = cur_src->elems[i];
19084 if (dfa->nodes[prev_node].accept_mb)
19085 naccepted = sift_states_iter_mb (mctx, sctx, prev_node,
19086 str_idx, sctx->last_str_idx);
19092 && check_node_accept (mctx, dfa->nodes + prev_node, str_idx)
19093 && ((sctx->sifted_states[str_idx + 1]) != ((void *)0) && re_node_set_contains (&(sctx->sifted_states[str_idx + 1])->nodes, dfa->nexts[prev_node])))
19097 if (naccepted == 0)
19100 if (sctx->limits.nelem)
19102 int to_idx = str_idx + naccepted;
19103 if (check_dst_limits (mctx, &sctx->limits,
19104 dfa->nexts[prev_node], to_idx,
19105 prev_node, str_idx))
19108 ret = re_node_set_insert (cur_dest, prev_node);
19109 if (__builtin_expect (ret == -1, 0))
19113 return REG_NOERROR;
19118 static reg_errcode_t
19120 clean_state_log_if_needed (re_match_context_t *mctx, int next_state_log_idx)
19122 int top = mctx->state_log_top;
19124 if (next_state_log_idx >= mctx->input.bufs_len
19125 || (next_state_log_idx >= mctx->input.valid_len
19126 && mctx->input.valid_len < mctx->input.len))
19129 err = extend_buffers (mctx);
19130 if (__builtin_expect (err != REG_NOERROR, 0))
19134 if (top < next_state_log_idx)
19136 memset (mctx->state_log + top + 1, '\0',
19137 sizeof (re_dfastate_t *) * (next_state_log_idx - top));
19138 mctx->state_log_top = next_state_log_idx;
19140 return REG_NOERROR;
19143 static reg_errcode_t
19145 merge_state_array (const re_dfa_t *dfa, re_dfastate_t **dst,
19146 re_dfastate_t **src, int num)
19150 for (st_idx = 0; st_idx < num; ++st_idx)
19152 if (dst[st_idx] == ((void *)0))
19153 dst[st_idx] = src[st_idx];
19154 else if (src[st_idx] != ((void *)0))
19156 re_node_set merged_set;
19157 err = re_node_set_init_union (&merged_set, &dst[st_idx]->nodes,
19158 &src[st_idx]->nodes);
19159 if (__builtin_expect (err != REG_NOERROR, 0))
19161 dst[st_idx] = re_acquire_state (&err, dfa, &merged_set);
19162 free ((&merged_set)->elems);
19163 if (__builtin_expect (err != REG_NOERROR, 0))
19167 return REG_NOERROR;
19170 static reg_errcode_t
19172 update_cur_sifted_state (const re_match_context_t *mctx,
19173 re_sift_context_t *sctx, int str_idx,
19174 re_node_set *dest_nodes)
19176 const re_dfa_t *const dfa = mctx->dfa;
19177 reg_errcode_t err = REG_NOERROR;
19178 const re_node_set *candidates;
19179 candidates = ((mctx->state_log[str_idx] == ((void *)0)) ? ((void *)0)
19180 : &mctx->state_log[str_idx]->nodes);
19182 if (dest_nodes->nelem == 0)
19183 sctx->sifted_states[str_idx] = ((void *)0);
19190 err = add_epsilon_src_nodes (dfa, dest_nodes, candidates);
19191 if (__builtin_expect (err != REG_NOERROR, 0))
19195 if (sctx->limits.nelem)
19197 err = check_subexp_limits (dfa, dest_nodes, candidates, &sctx->limits,
19198 mctx->bkref_ents, str_idx);
19199 if (__builtin_expect (err != REG_NOERROR, 0))
19204 sctx->sifted_states[str_idx] = re_acquire_state (&err, dfa, dest_nodes);
19205 if (__builtin_expect (err != REG_NOERROR, 0))
19209 if (candidates && mctx->state_log[str_idx]->has_backref)
19211 err = sift_states_bkref (mctx, sctx, str_idx, candidates);
19212 if (__builtin_expect (err != REG_NOERROR, 0))
19215 return REG_NOERROR;
19218 static reg_errcode_t
19220 add_epsilon_src_nodes (const re_dfa_t *dfa, re_node_set *dest_nodes,
19221 const re_node_set *candidates)
19223 reg_errcode_t err = REG_NOERROR;
19226 re_dfastate_t *state = re_acquire_state (&err, dfa, dest_nodes);
19227 if (__builtin_expect (err != REG_NOERROR, 0))
19230 if (!state->inveclosure.alloc)
19232 err = re_node_set_alloc (&state->inveclosure, dest_nodes->nelem);
19233 if (__builtin_expect (err != REG_NOERROR, 0))
19235 for (i = 0; i < dest_nodes->nelem; i++)
19236 re_node_set_merge (&state->inveclosure,
19237 dfa->inveclosures + dest_nodes->elems[i]);
19239 return re_node_set_add_intersect (dest_nodes, candidates,
19240 &state->inveclosure);
19243 static reg_errcode_t
19245 sub_epsilon_src_nodes (const re_dfa_t *dfa, int node, re_node_set *dest_nodes,
19246 const re_node_set *candidates)
19250 re_node_set *inv_eclosure = dfa->inveclosures + node;
19251 re_node_set except_nodes;
19252 memset (&except_nodes, '\0', sizeof (re_node_set));
19253 for (ecl_idx = 0; ecl_idx < inv_eclosure->nelem; ++ecl_idx)
19255 int cur_node = inv_eclosure->elems[ecl_idx];
19256 if (cur_node == node)
19258 if (((dfa->nodes[cur_node].type) & 8))
19260 int edst1 = dfa->edests[cur_node].elems[0];
19261 int edst2 = ((dfa->edests[cur_node].nelem > 1)
19262 ? dfa->edests[cur_node].elems[1] : -1);
19263 if ((!re_node_set_contains (inv_eclosure, edst1)
19264 && re_node_set_contains (dest_nodes, edst1))
19266 && !re_node_set_contains (inv_eclosure, edst2)
19267 && re_node_set_contains (dest_nodes, edst2)))
19269 err = re_node_set_add_intersect (&except_nodes, candidates,
19270 dfa->inveclosures + cur_node);
19271 if (__builtin_expect (err != REG_NOERROR, 0))
19273 free ((&except_nodes)->elems);
19279 for (ecl_idx = 0; ecl_idx < inv_eclosure->nelem; ++ecl_idx)
19281 int cur_node = inv_eclosure->elems[ecl_idx];
19282 if (!re_node_set_contains (&except_nodes, cur_node))
19284 int idx = re_node_set_contains (dest_nodes, cur_node) - 1;
19285 re_node_set_remove_at (dest_nodes, idx);
19288 free ((&except_nodes)->elems);
19289 return REG_NOERROR;
19294 check_dst_limits (const re_match_context_t *mctx, re_node_set *limits,
19295 int dst_node, int dst_idx, int src_node, int src_idx)
19297 const re_dfa_t *const dfa = mctx->dfa;
19298 int lim_idx, src_pos, dst_pos;
19300 int dst_bkref_idx = search_cur_bkref_entry (mctx, dst_idx);
19301 int src_bkref_idx = search_cur_bkref_entry (mctx, src_idx);
19302 for (lim_idx = 0; lim_idx < limits->nelem; ++lim_idx)
19305 struct re_backref_cache_entry *ent;
19306 ent = mctx->bkref_ents + limits->elems[lim_idx];
19307 subexp_idx = dfa->nodes[ent->node].opr.idx;
19309 dst_pos = check_dst_limits_calc_pos (mctx, limits->elems[lim_idx],
19310 subexp_idx, dst_node, dst_idx,
19312 src_pos = check_dst_limits_calc_pos (mctx, limits->elems[lim_idx],
19313 subexp_idx, src_node, src_idx,
19320 if (src_pos == dst_pos)
19330 check_dst_limits_calc_pos_1 (const re_match_context_t *mctx, int boundaries,
19331 int subexp_idx, int from_node, int bkref_idx)
19333 const re_dfa_t *const dfa = mctx->dfa;
19334 const re_node_set *eclosures = dfa->eclosures + from_node;
19339 for (node_idx = 0; node_idx < eclosures->nelem; ++node_idx)
19341 int node = eclosures->elems[node_idx];
19342 switch (dfa->nodes[node].type)
19345 if (bkref_idx != -1)
19347 struct re_backref_cache_entry *ent = mctx->bkref_ents + bkref_idx;
19352 if (ent->node != node)
19355 if (subexp_idx < (sizeof (bitset_word_t) * 8)
19356 && !(ent->eps_reachable_subexps_map
19357 & ((bitset_word_t) 1 << subexp_idx)))
19366 dst = dfa->edests[node].elems[0];
19367 if (dst == from_node)
19369 if (boundaries & 1)
19376 check_dst_limits_calc_pos_1 (mctx, boundaries, subexp_idx,
19380 if (cpos == 0 && (boundaries & 2))
19383 if (subexp_idx < (sizeof (bitset_word_t) * 8))
19384 ent->eps_reachable_subexps_map
19385 &= ~((bitset_word_t) 1 << subexp_idx);
19387 while (ent++->more);
19391 case OP_OPEN_SUBEXP:
19392 if ((boundaries & 1) && subexp_idx == dfa->nodes[node].opr.idx)
19396 case OP_CLOSE_SUBEXP:
19397 if ((boundaries & 2) && subexp_idx == dfa->nodes[node].opr.idx)
19406 return (boundaries & 2) ? 1 : 0;
19411 check_dst_limits_calc_pos (const re_match_context_t *mctx, int limit,
19412 int subexp_idx, int from_node, int str_idx,
19415 struct re_backref_cache_entry *lim = mctx->bkref_ents + limit;
19419 if (str_idx < lim->subexp_from)
19422 if (lim->subexp_to < str_idx)
19426 boundaries = (str_idx == lim->subexp_from);
19427 boundaries |= (str_idx == lim->subexp_to) << 1;
19428 if (boundaries == 0)
19432 return check_dst_limits_calc_pos_1 (mctx, boundaries, subexp_idx,
19433 from_node, bkref_idx);
19439 static reg_errcode_t
19441 check_subexp_limits (const re_dfa_t *dfa, re_node_set *dest_nodes,
19442 const re_node_set *candidates, re_node_set *limits,
19443 struct re_backref_cache_entry *bkref_ents, int str_idx)
19446 int node_idx, lim_idx;
19448 for (lim_idx = 0; lim_idx < limits->nelem; ++lim_idx)
19451 struct re_backref_cache_entry *ent;
19452 ent = bkref_ents + limits->elems[lim_idx];
19454 if (str_idx <= ent->subexp_from || ent->str_idx < str_idx)
19457 subexp_idx = dfa->nodes[ent->node].opr.idx;
19458 if (ent->subexp_to == str_idx)
19462 for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx)
19464 int node = dest_nodes->elems[node_idx];
19465 re_token_type_t type = dfa->nodes[node].type;
19466 if (type == OP_OPEN_SUBEXP
19467 && subexp_idx == dfa->nodes[node].opr.idx)
19469 else if (type == OP_CLOSE_SUBEXP
19470 && subexp_idx == dfa->nodes[node].opr.idx)
19478 err = sub_epsilon_src_nodes (dfa, ops_node, dest_nodes,
19480 if (__builtin_expect (err != REG_NOERROR, 0))
19486 for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx)
19488 int node = dest_nodes->elems[node_idx];
19489 if (!re_node_set_contains (dfa->inveclosures + node,
19491 && !re_node_set_contains (dfa->eclosures + node,
19496 err = sub_epsilon_src_nodes (dfa, node, dest_nodes,
19498 if (__builtin_expect (err != REG_NOERROR, 0))
19506 for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx)
19508 int node = dest_nodes->elems[node_idx];
19509 re_token_type_t type = dfa->nodes[node].type;
19510 if (type == OP_CLOSE_SUBEXP || type == OP_OPEN_SUBEXP)
19512 if (subexp_idx != dfa->nodes[node].opr.idx)
19516 err = sub_epsilon_src_nodes (dfa, node, dest_nodes,
19518 if (__builtin_expect (err != REG_NOERROR, 0))
19524 return REG_NOERROR;
19527 static reg_errcode_t
19529 sift_states_bkref (const re_match_context_t *mctx, re_sift_context_t *sctx,
19530 int str_idx, const re_node_set *candidates)
19532 const re_dfa_t *const dfa = mctx->dfa;
19534 int node_idx, node;
19535 re_sift_context_t local_sctx;
19536 int first_idx = search_cur_bkref_entry (mctx, str_idx);
19538 if (first_idx == -1)
19539 return REG_NOERROR;
19541 local_sctx.sifted_states = ((void *)0);
19543 for (node_idx = 0; node_idx < candidates->nelem; ++node_idx)
19546 re_token_type_t type;
19547 struct re_backref_cache_entry *entry;
19548 node = candidates->elems[node_idx];
19549 type = dfa->nodes[node].type;
19551 if (node == sctx->last_node && str_idx == sctx->last_str_idx)
19553 if (type != OP_BACK_REF)
19556 entry = mctx->bkref_ents + first_idx;
19557 enabled_idx = first_idx;
19564 re_dfastate_t *cur_state;
19566 if (entry->node != node)
19568 subexp_len = entry->subexp_to - entry->subexp_from;
19569 to_idx = str_idx + subexp_len;
19570 dst_node = (subexp_len ? dfa->nexts[node]
19571 : dfa->edests[node].elems[0]);
19573 if (to_idx > sctx->last_str_idx
19574 || sctx->sifted_states[to_idx] == ((void *)0)
19575 || !((sctx->sifted_states[to_idx]) != ((void *)0) && re_node_set_contains (&(sctx->sifted_states[to_idx])->nodes, dst_node))
19576 || check_dst_limits (mctx, &sctx->limits, node,
19577 str_idx, dst_node, to_idx))
19580 if (local_sctx.sifted_states == ((void *)0))
19582 local_sctx = *sctx;
19583 err = re_node_set_init_copy (&local_sctx.limits, &sctx->limits);
19584 if (__builtin_expect (err != REG_NOERROR, 0))
19587 local_sctx.last_node = node;
19588 local_sctx.last_str_idx = str_idx;
19589 ret = re_node_set_insert (&local_sctx.limits, enabled_idx);
19590 if (__builtin_expect (ret < 0, 0))
19595 cur_state = local_sctx.sifted_states[str_idx];
19596 err = sift_states_backward (mctx, &local_sctx);
19597 if (__builtin_expect (err != REG_NOERROR, 0))
19599 if (sctx->limited_states != ((void *)0))
19601 err = merge_state_array (dfa, sctx->limited_states,
19602 local_sctx.sifted_states,
19604 if (__builtin_expect (err != REG_NOERROR, 0))
19607 local_sctx.sifted_states[str_idx] = cur_state;
19608 (re_node_set_remove_at (&local_sctx.limits, re_node_set_contains (&local_sctx.limits, enabled_idx) - 1));
19611 entry = mctx->bkref_ents + enabled_idx;
19613 while (enabled_idx++, entry++->more);
19617 if (local_sctx.sifted_states != ((void *)0))
19619 free ((&local_sctx.limits)->elems);
19629 sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx,
19630 int node_idx, int str_idx, int max_str_idx)
19632 const re_dfa_t *const dfa = mctx->dfa;
19635 naccepted = check_node_accept_bytes (dfa, node_idx, &mctx->input, str_idx);
19636 if (naccepted > 0 && str_idx + naccepted <= max_str_idx &&
19637 !((sctx->sifted_states[str_idx + naccepted]) != ((void *)0) && re_node_set_contains (&(sctx->sifted_states[str_idx + naccepted])->nodes, dfa->nexts[node_idx])))
19648 static re_dfastate_t *
19650 transit_state (reg_errcode_t *err, re_match_context_t *mctx,
19651 re_dfastate_t *state)
19653 re_dfastate_t **trtable;
19658 if (__builtin_expect (state->accept_mb, 0))
19660 *err = transit_state_mb (mctx, state);
19661 if (__builtin_expect (*err != REG_NOERROR, 0))
19662 return ((void *)0);
19665 ch = ((&mctx->input)->mbs[(&mctx->input)->cur_idx++]);
19668 trtable = state->trtable;
19669 if (__builtin_expect (trtable != ((void *)0), 1))
19670 return trtable[ch];
19672 trtable = state->word_trtable;
19673 if (__builtin_expect (trtable != ((void *)0), 1))
19675 unsigned int context;
19677 = re_string_context_at (&mctx->input,
19678 ((&mctx->input)->cur_idx) - 1,
19680 if (((context) & 1))
19681 return trtable[ch + 256];
19683 return trtable[ch];
19686 if (!build_trtable (mctx->dfa, state))
19689 return ((void *)0);
19699 merge_state_with_log (reg_errcode_t *err, re_match_context_t *mctx,
19700 re_dfastate_t *next_state)
19702 const re_dfa_t *const dfa = mctx->dfa;
19703 int cur_idx = ((&mctx->input)->cur_idx);
19705 if (cur_idx > mctx->state_log_top)
19707 mctx->state_log[cur_idx] = next_state;
19708 mctx->state_log_top = cur_idx;
19710 else if (mctx->state_log[cur_idx] == 0)
19712 mctx->state_log[cur_idx] = next_state;
19716 re_dfastate_t *pstate;
19717 unsigned int context;
19718 re_node_set next_nodes, *log_nodes, *table_nodes = ((void *)0);
19723 pstate = mctx->state_log[cur_idx];
19724 log_nodes = pstate->entrance_nodes;
19725 if (next_state != ((void *)0))
19727 table_nodes = next_state->entrance_nodes;
19728 *err = re_node_set_init_union (&next_nodes, table_nodes,
19730 if (__builtin_expect (*err != REG_NOERROR, 0))
19731 return ((void *)0);
19734 next_nodes = *log_nodes;
19738 context = re_string_context_at (&mctx->input,
19739 ((&mctx->input)->cur_idx) - 1,
19741 next_state = mctx->state_log[cur_idx]
19742 = re_acquire_state_context (err, dfa, &next_nodes, context);
19746 if (table_nodes != ((void *)0))
19747 free ((&next_nodes)->elems);
19750 if (__builtin_expect (dfa->nbackref, 0) && next_state != ((void *)0))
19755 *err = check_subexp_matching_top (mctx, &next_state->nodes,
19757 if (__builtin_expect (*err != REG_NOERROR, 0))
19758 return ((void *)0);
19761 if (next_state->has_backref)
19763 *err = transit_state_bkref (mctx, &next_state->nodes);
19764 if (__builtin_expect (*err != REG_NOERROR, 0))
19765 return ((void *)0);
19766 next_state = mctx->state_log[cur_idx];
19778 find_recover_state (reg_errcode_t *err, re_match_context_t *mctx)
19780 re_dfastate_t *cur_state;
19783 int max = mctx->state_log_top;
19784 int cur_str_idx = ((&mctx->input)->cur_idx);
19788 if (++cur_str_idx > max)
19789 return ((void *)0);
19790 ((&mctx->input)->cur_idx += (1));
19792 while (mctx->state_log[cur_str_idx] == ((void *)0));
19794 cur_state = merge_state_with_log (err, mctx, ((void *)0));
19796 while (*err == REG_NOERROR && cur_state == ((void *)0));
19800 static reg_errcode_t
19802 check_subexp_matching_top (re_match_context_t *mctx, re_node_set *cur_nodes,
19805 const re_dfa_t *const dfa = mctx->dfa;
19814 for (node_idx = 0; node_idx < cur_nodes->nelem; ++node_idx)
19816 int node = cur_nodes->elems[node_idx];
19817 if (dfa->nodes[node].type == OP_OPEN_SUBEXP
19818 && dfa->nodes[node].opr.idx < (sizeof (bitset_word_t) * 8)
19819 && (dfa->used_bkref_map
19820 & ((bitset_word_t) 1 << dfa->nodes[node].opr.idx)))
19822 err = match_ctx_add_subtop (mctx, node, str_idx);
19823 if (__builtin_expect (err != REG_NOERROR, 0))
19827 return REG_NOERROR;
19830 static reg_errcode_t
19832 transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate)
19834 const re_dfa_t *const dfa = mctx->dfa;
19838 for (i = 0; i < pstate->nodes.nelem; ++i)
19840 re_node_set dest_nodes, *new_nodes;
19841 int cur_node_idx = pstate->nodes.elems[i];
19842 int naccepted, dest_idx;
19843 unsigned int context;
19844 re_dfastate_t *dest_state;
19846 if (!dfa->nodes[cur_node_idx].accept_mb)
19849 if (dfa->nodes[cur_node_idx].constraint)
19851 context = re_string_context_at (&mctx->input,
19852 ((&mctx->input)->cur_idx),
19854 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)))))
19860 naccepted = check_node_accept_bytes (dfa, cur_node_idx, &mctx->input,
19861 ((&mctx->input)->cur_idx));
19862 if (naccepted == 0)
19866 dest_idx = ((&mctx->input)->cur_idx) + naccepted;
19867 mctx->max_mb_elem_len = ((mctx->max_mb_elem_len < naccepted) ? naccepted
19868 : mctx->max_mb_elem_len);
19869 err = clean_state_log_if_needed (mctx, dest_idx);
19870 if (__builtin_expect (err != REG_NOERROR, 0))
19875 new_nodes = dfa->eclosures + dfa->nexts[cur_node_idx];
19877 dest_state = mctx->state_log[dest_idx];
19878 if (dest_state == ((void *)0))
19879 dest_nodes = *new_nodes;
19882 err = re_node_set_init_union (&dest_nodes,
19883 dest_state->entrance_nodes, new_nodes);
19884 if (__builtin_expect (err != REG_NOERROR, 0))
19887 context = re_string_context_at (&mctx->input, dest_idx - 1,
19889 mctx->state_log[dest_idx]
19890 = re_acquire_state_context (&err, dfa, &dest_nodes, context);
19891 if (dest_state != ((void *)0))
19892 free ((&dest_nodes)->elems);
19893 if (__builtin_expect (mctx->state_log[dest_idx] == ((void *)0) && err != REG_NOERROR, 0))
19896 return REG_NOERROR;
19900 static reg_errcode_t
19902 transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes)
19904 const re_dfa_t *const dfa = mctx->dfa;
19907 int cur_str_idx = ((&mctx->input)->cur_idx);
19909 for (i = 0; i < nodes->nelem; ++i)
19911 int dest_str_idx, prev_nelem, bkc_idx;
19912 int node_idx = nodes->elems[i];
19913 unsigned int context;
19914 const re_token_t *node = dfa->nodes + node_idx;
19915 re_node_set *new_dest_nodes;
19918 if (node->type != OP_BACK_REF)
19921 if (node->constraint)
19923 context = re_string_context_at (&mctx->input, cur_str_idx,
19925 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)))))
19931 bkc_idx = mctx->nbkref_ents;
19932 err = get_subexp (mctx, node_idx, cur_str_idx);
19933 if (__builtin_expect (err != REG_NOERROR, 0))
19941 for (; bkc_idx < mctx->nbkref_ents; ++bkc_idx)
19944 re_dfastate_t *dest_state;
19945 struct re_backref_cache_entry *bkref_ent;
19946 bkref_ent = mctx->bkref_ents + bkc_idx;
19947 if (bkref_ent->node != node_idx || bkref_ent->str_idx != cur_str_idx)
19949 subexp_len = bkref_ent->subexp_to - bkref_ent->subexp_from;
19950 new_dest_nodes = (subexp_len == 0
19951 ? dfa->eclosures + dfa->edests[node_idx].elems[0]
19952 : dfa->eclosures + dfa->nexts[node_idx]);
19953 dest_str_idx = (cur_str_idx + bkref_ent->subexp_to
19954 - bkref_ent->subexp_from);
19955 context = re_string_context_at (&mctx->input, dest_str_idx - 1,
19957 dest_state = mctx->state_log[dest_str_idx];
19958 prev_nelem = ((mctx->state_log[cur_str_idx] == ((void *)0)) ? 0
19959 : mctx->state_log[cur_str_idx]->nodes.nelem);
19961 if (dest_state == ((void *)0))
19963 mctx->state_log[dest_str_idx]
19964 = re_acquire_state_context (&err, dfa, new_dest_nodes,
19966 if (__builtin_expect (mctx->state_log[dest_str_idx] == ((void *)0) && err != REG_NOERROR, 0))
19972 re_node_set dest_nodes;
19973 err = re_node_set_init_union (&dest_nodes,
19974 dest_state->entrance_nodes,
19976 if (__builtin_expect (err != REG_NOERROR, 0))
19978 free ((&dest_nodes)->elems);
19981 mctx->state_log[dest_str_idx]
19982 = re_acquire_state_context (&err, dfa, &dest_nodes, context);
19983 free ((&dest_nodes)->elems);
19984 if (__builtin_expect (mctx->state_log[dest_str_idx] == ((void *)0) && err != REG_NOERROR, 0))
19990 if (subexp_len == 0
19991 && mctx->state_log[cur_str_idx]->nodes.nelem > prev_nelem)
19993 err = check_subexp_matching_top (mctx, new_dest_nodes,
19995 if (__builtin_expect (err != REG_NOERROR, 0))
19997 err = transit_state_bkref (mctx, new_dest_nodes);
19998 if (__builtin_expect (err != REG_NOERROR, 0))
20014 static reg_errcode_t
20016 get_subexp (re_match_context_t *mctx, int bkref_node, int bkref_str_idx)
20018 const re_dfa_t *const dfa = mctx->dfa;
20019 int subexp_num, sub_top_idx;
20020 const char *buf = (const char *) ((&mctx->input)->mbs);
20022 int cache_idx = search_cur_bkref_entry (mctx, bkref_str_idx);
20023 if (cache_idx != -1)
20025 const struct re_backref_cache_entry *entry
20026 = mctx->bkref_ents + cache_idx;
20028 if (entry->node == bkref_node)
20029 return REG_NOERROR;
20030 while (entry++->more);
20033 subexp_num = dfa->nodes[bkref_node].opr.idx;
20036 for (sub_top_idx = 0; sub_top_idx < mctx->nsub_tops; ++sub_top_idx)
20039 re_sub_match_top_t *sub_top = mctx->sub_tops[sub_top_idx];
20040 re_sub_match_last_t *sub_last;
20041 int sub_last_idx, sl_str, bkref_str_off;
20043 if (dfa->nodes[sub_top->node].opr.idx != subexp_num)
20046 sl_str = sub_top->str_idx;
20047 bkref_str_off = bkref_str_idx;
20050 for (sub_last_idx = 0; sub_last_idx < sub_top->nlasts; ++sub_last_idx)
20053 sub_last = sub_top->lasts[sub_last_idx];
20054 sl_str_diff = sub_last->str_idx - sl_str;
20057 if (sl_str_diff > 0)
20059 if (__builtin_expect (bkref_str_off + sl_str_diff > mctx->input.valid_len, 0))
20062 if (bkref_str_off + sl_str_diff > mctx->input.len)
20065 err = clean_state_log_if_needed (mctx,
20068 if (__builtin_expect (err != REG_NOERROR, 0))
20070 buf = (const char *) ((&mctx->input)->mbs);
20072 if (memcmp (buf + bkref_str_off, buf + sl_str, sl_str_diff) != 0)
20076 bkref_str_off += sl_str_diff;
20077 sl_str += sl_str_diff;
20078 err = get_subexp_sub (mctx, sub_top, sub_last, bkref_node,
20083 buf = (const char *) ((&mctx->input)->mbs);
20085 if (err == REG_NOMATCH)
20087 if (__builtin_expect (err != REG_NOERROR, 0))
20091 if (sub_last_idx < sub_top->nlasts)
20093 if (sub_last_idx > 0)
20096 for (; sl_str <= bkref_str_idx; ++sl_str)
20098 int cls_node, sl_str_off;
20099 const re_node_set *nodes;
20100 sl_str_off = sl_str - sub_top->str_idx;
20103 if (sl_str_off > 0)
20105 if (__builtin_expect (bkref_str_off >= mctx->input.valid_len, 0))
20108 if (bkref_str_off >= mctx->input.len)
20111 err = extend_buffers (mctx);
20112 if (__builtin_expect (err != REG_NOERROR, 0))
20115 buf = (const char *) ((&mctx->input)->mbs);
20117 if (buf [bkref_str_off++] != buf[sl_str - 1])
20121 if (mctx->state_log[sl_str] == ((void *)0))
20124 nodes = &mctx->state_log[sl_str]->nodes;
20125 cls_node = find_subexp_node (dfa, nodes, subexp_num,
20127 if (cls_node == -1)
20129 if (sub_top->path == ((void *)0))
20131 sub_top->path = calloc (sizeof (state_array_t),
20132 sl_str - sub_top->str_idx + 1);
20133 if (sub_top->path == ((void *)0))
20138 err = check_arrival (mctx, sub_top->path, sub_top->node,
20139 sub_top->str_idx, cls_node, sl_str,
20141 if (err == REG_NOMATCH)
20143 if (__builtin_expect (err != REG_NOERROR, 0))
20145 sub_last = match_ctx_add_sublast (sub_top, cls_node, sl_str);
20146 if (__builtin_expect (sub_last == ((void *)0), 0))
20148 err = get_subexp_sub (mctx, sub_top, sub_last, bkref_node,
20150 if (err == REG_NOMATCH)
20154 return REG_NOERROR;
20163 static reg_errcode_t
20165 get_subexp_sub (re_match_context_t *mctx, const re_sub_match_top_t *sub_top,
20166 re_sub_match_last_t *sub_last, int bkref_node, int bkref_str)
20171 err = check_arrival (mctx, &sub_last->path, sub_last->node,
20172 sub_last->str_idx, bkref_node, bkref_str,
20174 if (err != REG_NOERROR)
20176 err = match_ctx_add_entry (mctx, bkref_node, bkref_str, sub_top->str_idx,
20177 sub_last->str_idx);
20178 if (__builtin_expect (err != REG_NOERROR, 0))
20180 to_idx = bkref_str + sub_last->str_idx - sub_top->str_idx;
20181 return clean_state_log_if_needed (mctx, to_idx);
20186 find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes,
20187 int subexp_idx, int type)
20190 for (cls_idx = 0; cls_idx < nodes->nelem; ++cls_idx)
20192 int cls_node = nodes->elems[cls_idx];
20193 const re_token_t *node = dfa->nodes + cls_node;
20194 if (node->type == type
20195 && node->opr.idx == subexp_idx)
20206 static reg_errcode_t
20208 check_arrival (re_match_context_t *mctx, state_array_t *path, int top_node,
20209 int top_str, int last_node, int last_str, int type)
20211 const re_dfa_t *const dfa = mctx->dfa;
20212 reg_errcode_t err = REG_NOERROR;
20213 int subexp_num, backup_cur_idx, str_idx, null_cnt;
20214 re_dfastate_t *cur_state = ((void *)0);
20215 re_node_set *cur_nodes, next_nodes;
20216 re_dfastate_t **backup_state_log;
20217 unsigned int context;
20219 subexp_num = dfa->nodes[top_node].opr.idx;
20221 if (__builtin_expect (path->alloc < last_str + mctx->max_mb_elem_len + 1, 0))
20223 re_dfastate_t **new_array;
20224 int old_alloc = path->alloc;
20225 path->alloc += last_str + mctx->max_mb_elem_len + 1;
20226 new_array = ((re_dfastate_t * *) realloc (path->array, (path->alloc) * sizeof (re_dfastate_t *)));
20227 if (__builtin_expect (new_array == ((void *)0), 0))
20229 path->alloc = old_alloc;
20232 path->array = new_array;
20233 memset (new_array + old_alloc, '\0',
20234 sizeof (re_dfastate_t *) * (path->alloc - old_alloc));
20237 str_idx = path->next_idx ?: top_str;
20240 backup_state_log = mctx->state_log;
20241 backup_cur_idx = mctx->input.cur_idx;
20242 mctx->state_log = path->array;
20243 mctx->input.cur_idx = str_idx;
20246 context = re_string_context_at (&mctx->input, str_idx - 1, mctx->eflags);
20247 if (str_idx == top_str)
20249 err = re_node_set_init_1 (&next_nodes, top_node);
20250 if (__builtin_expect (err != REG_NOERROR, 0))
20252 err = check_arrival_expand_ecl (dfa, &next_nodes, subexp_num, type);
20253 if (__builtin_expect (err != REG_NOERROR, 0))
20255 free ((&next_nodes)->elems);
20261 cur_state = mctx->state_log[str_idx];
20262 if (cur_state && cur_state->has_backref)
20264 err = re_node_set_init_copy (&next_nodes, &cur_state->nodes);
20265 if (__builtin_expect (err != REG_NOERROR, 0))
20269 memset (&next_nodes, '\0', sizeof (re_node_set));
20271 if (str_idx == top_str || (cur_state && cur_state->has_backref))
20273 if (next_nodes.nelem)
20275 err = expand_bkref_cache (mctx, &next_nodes, str_idx,
20277 if (__builtin_expect (err != REG_NOERROR, 0))
20279 free ((&next_nodes)->elems);
20283 cur_state = re_acquire_state_context (&err, dfa, &next_nodes, context);
20284 if (__builtin_expect (cur_state == ((void *)0) && err != REG_NOERROR, 0))
20286 free ((&next_nodes)->elems);
20289 mctx->state_log[str_idx] = cur_state;
20292 for (null_cnt = 0; str_idx < last_str && null_cnt <= mctx->max_mb_elem_len;)
20294 ((&next_nodes)->nelem = 0);
20295 if (mctx->state_log[str_idx + 1])
20297 err = re_node_set_merge (&next_nodes,
20298 &mctx->state_log[str_idx + 1]->nodes);
20299 if (__builtin_expect (err != REG_NOERROR, 0))
20301 free ((&next_nodes)->elems);
20307 err = check_arrival_add_next_nodes (mctx, str_idx,
20308 &cur_state->non_eps_nodes,
20310 if (__builtin_expect (err != REG_NOERROR, 0))
20312 free ((&next_nodes)->elems);
20317 if (next_nodes.nelem)
20319 err = check_arrival_expand_ecl (dfa, &next_nodes, subexp_num, type);
20320 if (__builtin_expect (err != REG_NOERROR, 0))
20322 free ((&next_nodes)->elems);
20325 err = expand_bkref_cache (mctx, &next_nodes, str_idx,
20327 if (__builtin_expect (err != REG_NOERROR, 0))
20329 free ((&next_nodes)->elems);
20333 context = re_string_context_at (&mctx->input, str_idx - 1, mctx->eflags);
20334 cur_state = re_acquire_state_context (&err, dfa, &next_nodes, context);
20335 if (__builtin_expect (cur_state == ((void *)0) && err != REG_NOERROR, 0))
20337 free ((&next_nodes)->elems);
20340 mctx->state_log[str_idx] = cur_state;
20341 null_cnt = cur_state == ((void *)0) ? null_cnt + 1 : 0;
20343 free ((&next_nodes)->elems);
20344 cur_nodes = (mctx->state_log[last_str] == ((void *)0) ? ((void *)0)
20345 : &mctx->state_log[last_str]->nodes);
20346 path->next_idx = str_idx;
20349 mctx->state_log = backup_state_log;
20350 mctx->input.cur_idx = backup_cur_idx;
20353 if (cur_nodes != ((void *)0) && re_node_set_contains (cur_nodes, last_node))
20354 return REG_NOERROR;
20356 return REG_NOMATCH;
20359 static reg_errcode_t
20361 check_arrival_add_next_nodes (re_match_context_t *mctx, int str_idx,
20362 re_node_set *cur_nodes, re_node_set *next_nodes)
20364 const re_dfa_t *const dfa = mctx->dfa;
20367 reg_errcode_t err = REG_NOERROR;
20368 re_node_set union_set;
20369 memset (&union_set, '\0', sizeof (re_node_set));
20370 for (cur_idx = 0; cur_idx < cur_nodes->nelem; ++cur_idx)
20373 int cur_node = cur_nodes->elems[cur_idx];
20380 if (dfa->nodes[cur_node].accept_mb)
20382 naccepted = check_node_accept_bytes (dfa, cur_node, &mctx->input,
20386 re_dfastate_t *dest_state;
20387 int next_node = dfa->nexts[cur_node];
20388 int next_idx = str_idx + naccepted;
20389 dest_state = mctx->state_log[next_idx];
20390 ((&union_set)->nelem = 0);
20393 err = re_node_set_merge (&union_set, &dest_state->nodes);
20394 if (__builtin_expect (err != REG_NOERROR, 0))
20396 free ((&union_set)->elems);
20400 result = re_node_set_insert (&union_set, next_node);
20401 if (__builtin_expect (result < 0, 0))
20403 free ((&union_set)->elems);
20406 mctx->state_log[next_idx] = re_acquire_state (&err, dfa,
20408 if (__builtin_expect (mctx->state_log[next_idx] == ((void *)0) && err != REG_NOERROR, 0))
20411 free ((&union_set)->elems);
20418 || check_node_accept (mctx, dfa->nodes + cur_node, str_idx))
20420 result = re_node_set_insert (next_nodes, dfa->nexts[cur_node]);
20421 if (__builtin_expect (result < 0, 0))
20423 free ((&union_set)->elems);
20428 free ((&union_set)->elems);
20429 return REG_NOERROR;
20438 static reg_errcode_t
20440 check_arrival_expand_ecl (const re_dfa_t *dfa, re_node_set *cur_nodes,
20441 int ex_subexp, int type)
20444 int idx, outside_node;
20445 re_node_set new_nodes;
20449 err = re_node_set_alloc (&new_nodes, cur_nodes->nelem);
20450 if (__builtin_expect (err != REG_NOERROR, 0))
20455 for (idx = 0; idx < cur_nodes->nelem; ++idx)
20457 int cur_node = cur_nodes->elems[idx];
20458 const re_node_set *eclosure = dfa->eclosures + cur_node;
20459 outside_node = find_subexp_node (dfa, eclosure, ex_subexp, type);
20460 if (outside_node == -1)
20463 err = re_node_set_merge (&new_nodes, eclosure);
20464 if (__builtin_expect (err != REG_NOERROR, 0))
20466 free ((&new_nodes)->elems);
20473 err = check_arrival_expand_ecl_sub (dfa, &new_nodes, cur_node,
20475 if (__builtin_expect (err != REG_NOERROR, 0))
20477 free ((&new_nodes)->elems);
20482 free ((cur_nodes)->elems);
20483 *cur_nodes = new_nodes;
20484 return REG_NOERROR;
20491 static reg_errcode_t
20493 check_arrival_expand_ecl_sub (const re_dfa_t *dfa, re_node_set *dst_nodes,
20494 int target, int ex_subexp, int type)
20497 for (cur_node = target; !re_node_set_contains (dst_nodes, cur_node);)
20501 if (dfa->nodes[cur_node].type == type
20502 && dfa->nodes[cur_node].opr.idx == ex_subexp)
20504 if (type == OP_CLOSE_SUBEXP)
20506 err = re_node_set_insert (dst_nodes, cur_node);
20507 if (__builtin_expect (err == -1, 0))
20512 err = re_node_set_insert (dst_nodes, cur_node);
20513 if (__builtin_expect (err == -1, 0))
20515 if (dfa->edests[cur_node].nelem == 0)
20517 if (dfa->edests[cur_node].nelem == 2)
20519 err = check_arrival_expand_ecl_sub (dfa, dst_nodes,
20520 dfa->edests[cur_node].elems[1],
20522 if (__builtin_expect (err != REG_NOERROR, 0))
20525 cur_node = dfa->edests[cur_node].elems[0];
20527 return REG_NOERROR;
20535 static reg_errcode_t
20537 expand_bkref_cache (re_match_context_t *mctx, re_node_set *cur_nodes,
20538 int cur_str, int subexp_num, int type)
20540 const re_dfa_t *const dfa = mctx->dfa;
20542 int cache_idx_start = search_cur_bkref_entry (mctx, cur_str);
20543 struct re_backref_cache_entry *ent;
20545 if (cache_idx_start == -1)
20546 return REG_NOERROR;
20549 ent = mctx->bkref_ents + cache_idx_start;
20552 int to_idx, next_node;
20555 if (!re_node_set_contains (cur_nodes, ent->node))
20558 to_idx = cur_str + ent->subexp_to - ent->subexp_from;
20561 if (to_idx == cur_str)
20565 re_node_set new_dests;
20566 reg_errcode_t err2, err3;
20567 next_node = dfa->edests[ent->node].elems[0];
20568 if (re_node_set_contains (cur_nodes, next_node))
20570 err = re_node_set_init_1 (&new_dests, next_node);
20571 err2 = check_arrival_expand_ecl (dfa, &new_dests, subexp_num, type);
20572 err3 = re_node_set_merge (cur_nodes, &new_dests);
20573 free ((&new_dests)->elems);
20574 if (__builtin_expect (err != REG_NOERROR || err2 != REG_NOERROR || err3 != REG_NOERROR, 0))
20577 err = (err != REG_NOERROR ? err
20578 : (err2 != REG_NOERROR ? err2 : err3));
20586 re_node_set union_set;
20587 next_node = dfa->nexts[ent->node];
20588 if (mctx->state_log[to_idx])
20591 if (re_node_set_contains (&mctx->state_log[to_idx]->nodes,
20594 err = re_node_set_init_copy (&union_set,
20595 &mctx->state_log[to_idx]->nodes);
20596 ret = re_node_set_insert (&union_set, next_node);
20597 if (__builtin_expect (err != REG_NOERROR || ret < 0, 0))
20599 free ((&union_set)->elems);
20600 err = err != REG_NOERROR ? err : REG_ESPACE;
20606 err = re_node_set_init_1 (&union_set, next_node);
20607 if (__builtin_expect (err != REG_NOERROR, 0))
20610 mctx->state_log[to_idx] = re_acquire_state (&err, dfa, &union_set);
20611 free ((&union_set)->elems);
20612 if (__builtin_expect (mctx->state_log[to_idx] == ((void *)0) && err != REG_NOERROR, 0))
20617 while (ent++->more);
20618 return REG_NOERROR;
20626 build_trtable (const re_dfa_t *dfa, re_dfastate_t *state)
20629 int i, j, ch, need_word_trtable = 0;
20630 bitset_word_t elem, mask;
20631 _Bool dests_node_malloced = 0;
20632 _Bool dest_states_malloced = 0;
20634 re_dfastate_t **trtable;
20635 re_dfastate_t **dest_states = ((void *)0), **dest_states_word, **dest_states_nl;
20636 re_node_set follows, *dests_node;
20637 bitset_t *dests_ch;
20638 bitset_t acceptable;
20642 re_node_set dests_node[256];
20643 bitset_t dests_ch[256];
20650 if (__libc_use_alloca (sizeof (struct dests_alloc)))
20651 dests_alloc = (struct dests_alloc *) __builtin_alloca (sizeof (struct dests_alloc));
20654 dests_alloc = ((struct dests_alloc *) malloc ((1) * sizeof (struct dests_alloc)));
20655 if (__builtin_expect (dests_alloc == ((void *)0), 0))
20657 dests_node_malloced = 1;
20659 dests_node = dests_alloc->dests_node;
20660 dests_ch = dests_alloc->dests_ch;
20663 state->word_trtable = state->trtable = ((void *)0);
20667 ndests = group_nodes_into_DFAstates (dfa, state, dests_node, dests_ch);
20668 if (__builtin_expect (ndests <= 0, 0))
20670 if (dests_node_malloced)
20671 free (dests_alloc);
20675 state->trtable = (re_dfastate_t **)
20676 calloc (sizeof (re_dfastate_t *), 256);
20682 err = re_node_set_alloc (&follows, ndests + 1);
20683 if (__builtin_expect (err != REG_NOERROR, 0))
20686 if (__libc_use_alloca ((sizeof (re_node_set) + sizeof (bitset_t)) * 256
20687 + ndests * 3 * sizeof (re_dfastate_t *)))
20688 dest_states = (re_dfastate_t **)
20689 __builtin_alloca (ndests * 3 * sizeof (re_dfastate_t *));
20692 dest_states = (re_dfastate_t **)
20693 malloc (ndests * 3 * sizeof (re_dfastate_t *));
20694 if (__builtin_expect (dest_states == ((void *)0), 0))
20697 if (dest_states_malloced)
20698 free (dest_states);
20699 free ((&follows)->elems);
20700 for (i = 0; i < ndests; ++i)
20701 free ((dests_node + i)->elems);
20702 if (dests_node_malloced)
20703 free (dests_alloc);
20706 dest_states_malloced = 1;
20708 dest_states_word = dest_states + ndests;
20709 dest_states_nl = dest_states_word + ndests;
20710 memset (acceptable, '\0', sizeof (bitset_t));
20713 for (i = 0; i < ndests; ++i)
20716 ((&follows)->nelem = 0);
20718 for (j = 0; j < dests_node[i].nelem; ++j)
20720 next_node = dfa->nexts[dests_node[i].elems[j]];
20721 if (next_node != -1)
20723 err = re_node_set_merge (&follows, dfa->eclosures + next_node);
20724 if (__builtin_expect (err != REG_NOERROR, 0))
20728 dest_states[i] = re_acquire_state_context (&err, dfa, &follows, 0);
20729 if (__builtin_expect (dest_states[i] == ((void *)0) && err != REG_NOERROR, 0))
20733 if (dest_states[i]->has_constraint)
20735 dest_states_word[i] = re_acquire_state_context (&err, dfa, &follows,
20737 if (__builtin_expect (dest_states_word[i] == ((void *)0) && err != REG_NOERROR, 0))
20740 if (dest_states[i] != dest_states_word[i] && dfa->mb_cur_max > 1)
20741 need_word_trtable = 1;
20743 dest_states_nl[i] = re_acquire_state_context (&err, dfa, &follows,
20745 if (__builtin_expect (dest_states_nl[i] == ((void *)0) && err != REG_NOERROR, 0))
20750 dest_states_word[i] = dest_states[i];
20751 dest_states_nl[i] = dest_states[i];
20753 bitset_merge (acceptable, dests_ch[i]);
20756 if (!__builtin_expect (need_word_trtable, 0))
20762 trtable = state->trtable =
20763 (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), 256);
20764 if (__builtin_expect (trtable == ((void *)0), 0))
20768 for (i = 0; i < (256 / (sizeof (bitset_word_t) * 8)); ++i)
20769 for (ch = i * (sizeof (bitset_word_t) * 8), elem = acceptable[i], mask = 1;
20771 mask <<= 1, elem >>= 1, ++ch)
20772 if (__builtin_expect (elem & 1, 0))
20776 for (j = 0; (dests_ch[j][i] & mask) == 0; ++j)
20780 if (dfa->word_char[i] & mask)
20781 trtable[ch] = dest_states_word[j];
20783 trtable[ch] = dest_states[j];
20793 trtable = state->word_trtable =
20794 (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), 2 * 256);
20795 if (__builtin_expect (trtable == ((void *)0), 0))
20799 for (i = 0; i < (256 / (sizeof (bitset_word_t) * 8)); ++i)
20800 for (ch = i * (sizeof (bitset_word_t) * 8), elem = acceptable[i], mask = 1;
20802 mask <<= 1, elem >>= 1, ++ch)
20803 if (__builtin_expect (elem & 1, 0))
20807 for (j = 0; (dests_ch[j][i] & mask) == 0; ++j)
20811 trtable[ch] = dest_states[j];
20812 trtable[ch + 256] = dest_states_word[j];
20817 if ((acceptable['\n' / (sizeof (bitset_word_t) * 8)] & ((bitset_word_t) 1 << '\n' % (sizeof (bitset_word_t) * 8))))
20820 for (j = 0; j < ndests; ++j)
20821 if ((dests_ch[j]['\n' / (sizeof (bitset_word_t) * 8)] & ((bitset_word_t) 1 << '\n' % (sizeof (bitset_word_t) * 8))))
20824 trtable['\n'] = dest_states_nl[j];
20825 if (need_word_trtable)
20826 trtable['\n' + 256] = dest_states_nl[j];
20833 if (dest_states_malloced)
20834 free (dest_states);
20836 free ((&follows)->elems);
20837 for (i = 0; i < ndests; ++i)
20838 free ((dests_node + i)->elems);
20840 if (dests_node_malloced)
20841 free (dests_alloc);
20853 group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state,
20854 re_node_set *dests_node, bitset_t *dests_ch)
20861 const re_node_set *cur_nodes = &state->nodes;
20862 memset (accepts, '\0', sizeof (bitset_t));
20866 for (i = 0; i < cur_nodes->nelem; ++i)
20868 re_token_t *node = &dfa->nodes[cur_nodes->elems[i]];
20869 re_token_type_t type = node->type;
20870 unsigned int constraint = node->constraint;
20873 if (type == CHARACTER)
20874 (accepts[node->opr.c / (sizeof (bitset_word_t) * 8)] |= (bitset_word_t) 1 << node->opr.c % (sizeof (bitset_word_t) * 8));
20875 else if (type == SIMPLE_BRACKET)
20877 bitset_merge (accepts, node->opr.sbcset);
20879 else if (type == OP_PERIOD)
20882 if (dfa->mb_cur_max > 1)
20883 bitset_merge (accepts, dfa->sb_char);
20886 memset (accepts, '\xff', sizeof (bitset_t));
20887 if (!(dfa->syntax & ((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1)))
20888 (accepts['\n' / (sizeof (bitset_word_t) * 8)] &= ~((bitset_word_t) 1 << '\n' % (sizeof (bitset_word_t) * 8)));
20889 if (dfa->syntax & (((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1))
20890 (accepts['\0' / (sizeof (bitset_word_t) * 8)] &= ~((bitset_word_t) 1 << '\0' % (sizeof (bitset_word_t) * 8)));
20893 else if (type == OP_UTF8_PERIOD)
20895 memset (accepts, '\xff', sizeof (bitset_t) / 2);
20896 if (!(dfa->syntax & ((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1)))
20897 (accepts['\n' / (sizeof (bitset_word_t) * 8)] &= ~((bitset_word_t) 1 << '\n' % (sizeof (bitset_word_t) * 8)));
20898 if (dfa->syntax & (((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1))
20899 (accepts['\0' / (sizeof (bitset_word_t) * 8)] &= ~((bitset_word_t) 1 << '\0' % (sizeof (bitset_word_t) * 8)));
20909 if (constraint & 0x0020)
20911 _Bool accepts_newline = (accepts['\n' / (sizeof (bitset_word_t) * 8)] & ((bitset_word_t) 1 << '\n' % (sizeof (bitset_word_t) * 8)));
20912 memset (accepts, '\0', sizeof (bitset_t));
20913 if (accepts_newline)
20914 (accepts['\n' / (sizeof (bitset_word_t) * 8)] |= (bitset_word_t) 1 << '\n' % (sizeof (bitset_word_t) * 8));
20918 if (constraint & 0x0080)
20920 memset (accepts, '\0', sizeof (bitset_t));
20924 if (constraint & 0x0004)
20926 bitset_word_t any_set = 0;
20927 if (type == CHARACTER && !node->word_char)
20929 memset (accepts, '\0', sizeof (bitset_t));
20933 if (dfa->mb_cur_max > 1)
20934 for (j = 0; j < (256 / (sizeof (bitset_word_t) * 8)); ++j)
20935 any_set |= (accepts[j] &= (dfa->word_char[j] | ~dfa->sb_char[j]));
20938 for (j = 0; j < (256 / (sizeof (bitset_word_t) * 8)); ++j)
20939 any_set |= (accepts[j] &= dfa->word_char[j]);
20943 if (constraint & 0x0008)
20945 bitset_word_t any_set = 0;
20946 if (type == CHARACTER && node->word_char)
20948 memset (accepts, '\0', sizeof (bitset_t));
20952 if (dfa->mb_cur_max > 1)
20953 for (j = 0; j < (256 / (sizeof (bitset_word_t) * 8)); ++j)
20954 any_set |= (accepts[j] &= ~(dfa->word_char[j] & dfa->sb_char[j]));
20957 for (j = 0; j < (256 / (sizeof (bitset_word_t) * 8)); ++j)
20958 any_set |= (accepts[j] &= ~dfa->word_char[j]);
20966 for (j = 0; j < ndests; ++j)
20971 bitset_word_t has_intersec, not_subset, not_consumed;
20974 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))))
20979 for (k = 0; k < (256 / (sizeof (bitset_word_t) * 8)); ++k)
20980 has_intersec |= intersec[k] = accepts[k] & dests_ch[j][k];
20986 not_subset = not_consumed = 0;
20987 for (k = 0; k < (256 / (sizeof (bitset_word_t) * 8)); ++k)
20989 not_subset |= remains[k] = ~accepts[k] & dests_ch[j][k];
20990 not_consumed |= accepts[k] = accepts[k] & ~dests_ch[j][k];
20997 memcpy (dests_ch[ndests], remains, sizeof (bitset_t));
20998 memcpy (dests_ch[j], intersec, sizeof (bitset_t));
20999 err = re_node_set_init_copy (dests_node + ndests, &dests_node[j]);
21000 if (__builtin_expect (err != REG_NOERROR, 0))
21006 result = re_node_set_insert (&dests_node[j], cur_nodes->elems[i]);
21007 if (__builtin_expect (result < 0, 0))
21017 memcpy (dests_ch[ndests], accepts, sizeof (bitset_t));
21018 err = re_node_set_init_1 (dests_node + ndests, cur_nodes->elems[i]);
21019 if (__builtin_expect (err != REG_NOERROR, 0))
21022 memset (accepts, '\0', sizeof (bitset_t));
21027 for (j = 0; j < ndests; ++j)
21028 free ((dests_node + j)->elems);
21034 check_node_accept_bytes (const re_dfa_t *dfa, int node_idx,
21035 const re_string_t *input, int str_idx)
21037 const re_token_t *node = dfa->nodes + node_idx;
21038 int char_len, elem_len;
21041 if (__builtin_expect (node->type == OP_UTF8_PERIOD, 0))
21043 unsigned char c = ((input)->mbs[str_idx]), d;
21044 if (__builtin_expect (c < 0xc2, 1))
21047 if (str_idx + 2 > input->len)
21050 d = ((input)->mbs[str_idx + 1]);
21052 return (d < 0x80 || d > 0xbf) ? 0 : 2;
21056 if (c == 0xe0 && d < 0xa0)
21062 if (c == 0xf0 && d < 0x90)
21068 if (c == 0xf8 && d < 0x88)
21074 if (c == 0xfc && d < 0x84)
21080 if (str_idx + char_len > input->len)
21083 for (i = 1; i < char_len; ++i)
21085 d = ((input)->mbs[str_idx + i]);
21086 if (d < 0x80 || d > 0xbf)
21092 char_len = re_string_char_size_at (input, str_idx);
21093 if (node->type == OP_PERIOD)
21100 if ((!(dfa->syntax & ((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1)) &&
21101 ((input)->mbs[str_idx]) == '\n') ||
21102 ((dfa->syntax & (((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) &&
21103 ((input)->mbs[str_idx]) == '\0'))
21108 elem_len = re_string_elem_size_at (input, str_idx);
21109 if ((elem_len <= 1 && char_len <= 1) || char_len == 0)
21112 if (node->type == COMPLEX_BRACKET)
21114 const re_charset_t *cset = node->opr.mbcset;
21116 const unsigned char *pin
21117 = ((const unsigned char *) ((input)->mbs) + str_idx);
21122 wchar_t wc = ((cset->nranges || cset->nchar_classes || cset->nmbchars)
21123 ? re_string_wchar_at (input, str_idx) : 0);
21126 for (i = 0; i < cset->nmbchars; ++i)
21127 if (wc == cset->mbchars[i])
21129 match_len = char_len;
21130 goto check_node_accept_bytes_match;
21133 for (i = 0; i < cset->nchar_classes; ++i)
21135 wctype_t wt = cset->char_classes[i];
21136 if (__iswctype (wc, wt))
21138 match_len = char_len;
21139 goto check_node_accept_bytes_match;
21144 nrules = ((uint32_t) (*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_NRULES) & 0xffff)].word);
21147 unsigned int in_collseq = 0;
21148 const int32_t *table, *indirect;
21149 const unsigned char *weights, *extra;
21150 const char *collseqwc;
21153 # 1 "../locale/weight.h" 1
21154 # 21 "../locale/weight.h"
21155 auto inline int32_t
21156 __attribute__ ((always_inline))
21157 findidx (const unsigned char **cpp)
21159 int_fast32_t i = table[*(*cpp)++];
21160 const unsigned char *cp;
21161 const unsigned char *usrc;
21176 i = *((const int32_t *) cp);
21177 cp += sizeof (int32_t);
21193 for (cnt = 0; cnt < nhere; ++cnt)
21194 if (cp[cnt] != usrc[cnt])
21206 if ((1 + nhere) % __alignof__ (int32_t) != 0)
21207 cp += __alignof__ (int32_t) - (1 + nhere) % __alignof__ (int32_t);
21216 for (cnt = 0; cnt < nhere; ++cnt)
21217 if (cp[cnt] != usrc[cnt])
21222 if (cp[cnt] > usrc[cnt])
21226 if ((1 + 2 * nhere) % __alignof__ (int32_t) != 0)
21227 cp += (__alignof__ (int32_t)
21228 - (1 + 2 * nhere) % __alignof__ (int32_t));
21233 for (cnt = 0; cnt < nhere; ++cnt)
21234 if (cp[nhere + cnt] != usrc[cnt])
21237 if (cnt != nhere && cp[nhere + cnt] < usrc[cnt])
21241 if ((1 + 2 * nhere) % __alignof__ (int32_t) != 0)
21242 cp += (__alignof__ (int32_t)
21243 - (1 + 2 * nhere) % __alignof__ (int32_t));
21249 for (cnt = 0; cp[cnt] == usrc[cnt]; ++cnt);
21254 offset += usrc[cnt] - cp[cnt];
21256 while (++cnt < nhere);
21260 return indirect[-i + offset];
21267 # 3831 "regexec.c" 2
21270 if (cset->ncoll_syms)
21271 extra = (const unsigned char *)
21272 ((*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_SYMB_EXTRAMB) & 0xffff)].string);
21273 for (i = 0; i < cset->ncoll_syms; ++i)
21275 const unsigned char *coll_sym = extra + cset->coll_syms[i];
21278 if (*coll_sym != elem_len)
21281 for (j = 0; j < *coll_sym; j++)
21282 if (pin[j] != coll_sym[1 + j])
21284 if (j == *coll_sym)
21288 goto check_node_accept_bytes_match;
21294 if (elem_len <= char_len)
21296 collseqwc = ((*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_COLLSEQWC) & 0xffff)].string);
21297 in_collseq = __collseq_table_lookup (collseqwc, wc);
21300 in_collseq = find_collation_sequence_value (pin, elem_len);
21303 for (i = 0; i < cset->nranges; ++i)
21304 if (cset->range_starts[i] <= in_collseq
21305 && in_collseq <= cset->range_ends[i])
21307 match_len = elem_len;
21308 goto check_node_accept_bytes_match;
21312 if (cset->nequiv_classes)
21314 const unsigned char *cp = pin;
21315 table = (const int32_t *)
21316 ((*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_TABLEMB) & 0xffff)].string);
21317 weights = (const unsigned char *)
21318 ((*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_WEIGHTMB) & 0xffff)].string);
21319 extra = (const unsigned char *)
21320 ((*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_EXTRAMB) & 0xffff)].string);
21321 indirect = (const int32_t *)
21322 ((*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_INDIRECTMB) & 0xffff)].string);
21323 idx = findidx (&cp);
21325 for (i = 0; i < cset->nequiv_classes; ++i)
21327 int32_t equiv_class_idx = cset->equiv_classes[i];
21328 size_t weight_len = weights[idx];
21329 if (weight_len == weights[equiv_class_idx])
21332 while (cnt <= weight_len
21333 && (weights[equiv_class_idx + 1 + cnt]
21334 == weights[idx + 1 + cnt]))
21336 if (cnt > weight_len)
21338 match_len = elem_len;
21339 goto check_node_accept_bytes_match;
21350 wchar_t cmp_buf[] = {L'\0', L'\0', wc, L'\0', L'\0', L'\0'};
21355 for (i = 0; i < cset->nranges; ++i)
21357 cmp_buf[0] = cset->range_starts[i];
21358 cmp_buf[4] = cset->range_ends[i];
21359 if (wcscoll (cmp_buf, cmp_buf + 2) <= 0
21360 && wcscoll (cmp_buf + 2, cmp_buf + 4) <= 0)
21362 match_len = char_len;
21363 goto check_node_accept_bytes_match;
21367 check_node_accept_bytes_match:
21368 if (!cset->non_match)
21375 return (elem_len > char_len) ? elem_len : char_len;
21382 static unsigned int
21384 find_collation_sequence_value (const unsigned char *mbs, size_t mbs_len)
21386 uint32_t nrules = ((uint32_t) (*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_NRULES) & 0xffff)].word);
21392 const unsigned char *collseq = (const unsigned char *)
21393 ((*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_COLLSEQMB) & 0xffff)].string);
21394 return collseq[mbs[0]];
21396 return (2147483647 * 2U + 1U);
21401 const unsigned char *extra = (const unsigned char *)
21402 ((*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_SYMB_EXTRAMB) & 0xffff)].string);
21403 int32_t extrasize = (const unsigned char *)
21404 ((*_nl_current_LC_COLLATE)->values[((int) (_NL_COLLATE_SYMB_EXTRAMB + 1) & 0xffff)].string) - extra;
21406 for (idx = 0; idx < extrasize;)
21408 int mbs_cnt, found = 0;
21409 int32_t elem_mbs_len;
21411 idx = idx + extra[idx] + 1;
21412 elem_mbs_len = extra[idx++];
21413 if (mbs_len == elem_mbs_len)
21415 for (mbs_cnt = 0; mbs_cnt < elem_mbs_len; ++mbs_cnt)
21416 if (extra[idx + mbs_cnt] != mbs[mbs_cnt])
21418 if (mbs_cnt == elem_mbs_len)
21423 idx += elem_mbs_len;
21425 idx = (idx + 3) & ~3;
21427 idx += sizeof (uint32_t);
21429 idx = idx + sizeof (uint32_t) * (extra[idx] + 1);
21432 return *(uint32_t *) (extra + idx);
21434 idx += sizeof (uint32_t);
21436 return (2147483647 * 2U + 1U);
21447 check_node_accept (const re_match_context_t *mctx, const re_token_t *node,
21451 ch = ((&mctx->input)->mbs[idx]);
21452 switch (node->type)
21455 if (node->opr.c != ch)
21459 case SIMPLE_BRACKET:
21460 if (!(node->opr.sbcset[ch / (sizeof (bitset_word_t) * 8)] & ((bitset_word_t) 1 << ch % (sizeof (bitset_word_t) * 8))))
21465 case OP_UTF8_PERIOD:
21471 if ((ch == '\n' && !(mctx->dfa->syntax & ((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1)))
21472 || (ch == '\0' && (mctx->dfa->syntax & (((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1))))
21480 if (node->constraint)
21484 unsigned int context = re_string_context_at (&mctx->input, idx,
21486 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)))))
21495 static reg_errcode_t
21497 extend_buffers (re_match_context_t *mctx)
21500 re_string_t *pstr = &mctx->input;
21503 ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2);
21504 if (__builtin_expect (ret != REG_NOERROR, 0))
21507 if (mctx->state_log != ((void *)0))
21513 re_dfastate_t **new_array = ((re_dfastate_t * *) realloc (mctx->state_log, (pstr->bufs_len + 1) * sizeof (re_dfastate_t *)));
21515 if (__builtin_expect (new_array == ((void *)0), 0))
21517 mctx->state_log = new_array;
21524 if (pstr->mb_cur_max > 1)
21526 ret = build_wcs_upper_buffer (pstr);
21527 if (__builtin_expect (ret != REG_NOERROR, 0))
21532 build_upper_buffer (pstr);
21537 if (pstr->mb_cur_max > 1)
21538 build_wcs_buffer (pstr);
21542 if (pstr->trans != ((void *)0))
21543 re_string_translate_buffer (pstr);
21546 return REG_NOERROR;
21554 static reg_errcode_t
21556 match_ctx_init (re_match_context_t *mctx, int eflags, int n)
21558 mctx->eflags = eflags;
21559 mctx->match_last = -1;
21562 mctx->bkref_ents = ((struct re_backref_cache_entry *) malloc ((n) * sizeof (struct re_backref_cache_entry)));
21563 mctx->sub_tops = ((re_sub_match_top_t * *) malloc ((n) * sizeof (re_sub_match_top_t *)));
21564 if (__builtin_expect (mctx->bkref_ents == ((void *)0) || mctx->sub_tops == ((void *)0), 0))
21572 mctx->abkref_ents = n;
21573 mctx->max_mb_elem_len = 1;
21574 mctx->asub_tops = n;
21575 return REG_NOERROR;
21584 match_ctx_clean (re_match_context_t *mctx)
21587 for (st_idx = 0; st_idx < mctx->nsub_tops; ++st_idx)
21590 re_sub_match_top_t *top = mctx->sub_tops[st_idx];
21591 for (sl_idx = 0; sl_idx < top->nlasts; ++sl_idx)
21593 re_sub_match_last_t *last = top->lasts[sl_idx];
21594 free (last->path.array);
21600 free (top->path->array);
21606 mctx->nsub_tops = 0;
21607 mctx->nbkref_ents = 0;
21614 match_ctx_free (re_match_context_t *mctx)
21617 match_ctx_clean (mctx);
21618 free (mctx->sub_tops);
21619 free (mctx->bkref_ents);
21627 static reg_errcode_t
21629 match_ctx_add_entry (re_match_context_t *mctx, int node, int str_idx, int from,
21632 if (mctx->nbkref_ents >= mctx->abkref_ents)
21634 struct re_backref_cache_entry* new_entry;
21635 new_entry = ((struct re_backref_cache_entry *) realloc (mctx->bkref_ents, (mctx->abkref_ents * 2) * sizeof (struct re_backref_cache_entry)));
21637 if (__builtin_expect (new_entry == ((void *)0), 0))
21639 free (mctx->bkref_ents);
21642 mctx->bkref_ents = new_entry;
21643 memset (mctx->bkref_ents + mctx->nbkref_ents, '\0',
21644 sizeof (struct re_backref_cache_entry) * mctx->abkref_ents);
21645 mctx->abkref_ents *= 2;
21647 if (mctx->nbkref_ents > 0
21648 && mctx->bkref_ents[mctx->nbkref_ents - 1].str_idx == str_idx)
21649 mctx->bkref_ents[mctx->nbkref_ents - 1].more = 1;
21651 mctx->bkref_ents[mctx->nbkref_ents].node = node;
21652 mctx->bkref_ents[mctx->nbkref_ents].str_idx = str_idx;
21653 mctx->bkref_ents[mctx->nbkref_ents].subexp_from = from;
21654 mctx->bkref_ents[mctx->nbkref_ents].subexp_to = to;
21656 mctx->bkref_ents[mctx->nbkref_ents].eps_reachable_subexps_map
21657 = (from == to ? ~0 : 0);
21659 mctx->bkref_ents[mctx->nbkref_ents++].more = 0;
21660 if (mctx->max_mb_elem_len < to - from)
21661 mctx->max_mb_elem_len = to - from;
21662 return REG_NOERROR;
21670 search_cur_bkref_entry (const re_match_context_t *mctx, int str_idx)
21672 int left, right, mid, last;
21673 last = right = mctx->nbkref_ents;
21674 for (left = 0; left < right;)
21676 mid = (left + right) / 2;
21677 if (mctx->bkref_ents[mid].str_idx < str_idx)
21682 if (left < last && mctx->bkref_ents[left].str_idx == str_idx)
21691 static reg_errcode_t
21693 match_ctx_add_subtop (re_match_context_t *mctx, int node, int str_idx)
21699 if (__builtin_expect (mctx->nsub_tops == mctx->asub_tops, 0))
21701 int new_asub_tops = mctx->asub_tops * 2;
21702 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 *)));
21705 if (__builtin_expect (new_array == ((void *)0), 0))
21707 mctx->sub_tops = new_array;
21708 mctx->asub_tops = new_asub_tops;
21710 mctx->sub_tops[mctx->nsub_tops] = calloc (1, sizeof (re_sub_match_top_t));
21711 if (__builtin_expect (mctx->sub_tops[mctx->nsub_tops] == ((void *)0), 0))
21713 mctx->sub_tops[mctx->nsub_tops]->node = node;
21714 mctx->sub_tops[mctx->nsub_tops++]->str_idx = str_idx;
21715 return REG_NOERROR;
21721 static re_sub_match_last_t *
21723 match_ctx_add_sublast (re_sub_match_top_t *subtop, int node, int str_idx)
21725 re_sub_match_last_t *new_entry;
21726 if (__builtin_expect (subtop->nlasts == subtop->alasts, 0))
21728 int new_alasts = 2 * subtop->alasts + 1;
21729 re_sub_match_last_t **new_array = ((re_sub_match_last_t * *) realloc (subtop->lasts, (new_alasts) * sizeof (re_sub_match_last_t *)));
21732 if (__builtin_expect (new_array == ((void *)0), 0))
21733 return ((void *)0);
21734 subtop->lasts = new_array;
21735 subtop->alasts = new_alasts;
21737 new_entry = calloc (1, sizeof (re_sub_match_last_t));
21738 if (__builtin_expect (new_entry != ((void *)0), 1))
21740 subtop->lasts[subtop->nlasts] = new_entry;
21741 new_entry->node = node;
21742 new_entry->str_idx = str_idx;
21750 sift_ctx_init (re_sift_context_t *sctx, re_dfastate_t **sifted_sts,
21751 re_dfastate_t **limited_sts, int last_node, int last_str_idx)
21753 sctx->sifted_states = sifted_sts;
21754 sctx->limited_states = limited_sts;
21755 sctx->last_node = last_node;
21756 sctx->last_str_idx = last_str_idx;
21757 memset (&sctx->limits, '\0', sizeof (re_node_set));