summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarmelo Amoroso <carmelo.amoroso@st.com>2008-07-10 10:30:28 +0000
committerCarmelo Amoroso <carmelo.amoroso@st.com>2008-07-10 10:30:28 +0000
commitbb9231c8402e9ae99f98a868429e73c6340da304 (patch)
treed7ed637099fba4ab6db1cc4c009cad8485dcdb66
parenta691312d8794d5516402bb6bb0d3e90c40ba188b (diff)
Added missing tests for locale with multibyte encoding
-rw-r--r--test/locale-mbwc/Makefile29
-rw-r--r--test/locale-mbwc/dat_isw-funcs.h37
-rw-r--r--test/locale-mbwc/dat_iswalnum.c196
-rw-r--r--test/locale-mbwc/dat_iswalpha.c169
-rw-r--r--test/locale-mbwc/dat_iswcntrl.c125
-rw-r--r--test/locale-mbwc/dat_iswctype.c667
-rw-r--r--test/locale-mbwc/dat_iswdigit.c125
-rw-r--r--test/locale-mbwc/dat_iswgraph.c167
-rw-r--r--test/locale-mbwc/dat_iswlower.c96
-rw-r--r--test/locale-mbwc/dat_iswprint.c170
-rw-r--r--test/locale-mbwc/dat_iswpunct.c155
-rw-r--r--test/locale-mbwc/dat_iswspace.c129
-rw-r--r--test/locale-mbwc/dat_iswupper.c94
-rw-r--r--test/locale-mbwc/dat_iswxdigit.c125
-rw-r--r--test/locale-mbwc/dat_mblen.c137
-rw-r--r--test/locale-mbwc/dat_mbrlen.c222
-rw-r--r--test/locale-mbwc/dat_mbrtowc.c140
-rw-r--r--test/locale-mbwc/dat_mbsrtowcs.c180
-rw-r--r--test/locale-mbwc/dat_mbstowcs.c190
-rw-r--r--test/locale-mbwc/dat_mbtowc.c444
-rw-r--r--test/locale-mbwc/dat_strcoll.c209
-rw-r--r--test/locale-mbwc/dat_strfmon.c268
-rw-r--r--test/locale-mbwc/dat_strxfrm.c147
-rw-r--r--test/locale-mbwc/dat_swscanf.c185
-rw-r--r--test/locale-mbwc/dat_tow-funcs.h24
-rw-r--r--test/locale-mbwc/dat_towctrans.c97
-rw-r--r--test/locale-mbwc/dat_towlower.c47
-rw-r--r--test/locale-mbwc/dat_towupper.c47
-rw-r--r--test/locale-mbwc/dat_wcrtomb.c122
-rw-r--r--test/locale-mbwc/dat_wcscat.c116
-rw-r--r--test/locale-mbwc/dat_wcschr.c94
-rw-r--r--test/locale-mbwc/dat_wcscmp.c137
-rw-r--r--test/locale-mbwc/dat_wcscoll.c210
-rw-r--r--test/locale-mbwc/dat_wcscpy.c44
-rw-r--r--test/locale-mbwc/dat_wcscspn.c164
-rw-r--r--test/locale-mbwc/dat_wcslen.c62
-rw-r--r--test/locale-mbwc/dat_wcsncat.c158
-rw-r--r--test/locale-mbwc/dat_wcsncmp.c144
-rw-r--r--test/locale-mbwc/dat_wcsncpy.c119
-rw-r--r--test/locale-mbwc/dat_wcspbrk.c176
-rw-r--r--test/locale-mbwc/dat_wcsrtombs.c272
-rw-r--r--test/locale-mbwc/dat_wcsspn.c179
-rw-r--r--test/locale-mbwc/dat_wcsstr.c175
-rw-r--r--test/locale-mbwc/dat_wcstod.c78
-rw-r--r--test/locale-mbwc/dat_wcstok.c138
-rw-r--r--test/locale-mbwc/dat_wcstombs.c271
-rw-r--r--test/locale-mbwc/dat_wcswidth.c263
-rw-r--r--test/locale-mbwc/dat_wcsxfrm.c102
-rw-r--r--test/locale-mbwc/dat_wctob.c61
-rw-r--r--test/locale-mbwc/dat_wctomb.c168
-rw-r--r--test/locale-mbwc/dat_wctrans.c99
-rw-r--r--test/locale-mbwc/dat_wctype.c189
-rw-r--r--test/locale-mbwc/dat_wcwidth.c149
-rw-r--r--test/locale-mbwc/tgn_funcdef.h160
-rw-r--r--test/locale-mbwc/tgn_locdef.h32
-rw-r--r--test/locale-mbwc/tsp_common.c64
-rw-r--r--test/locale-mbwc/tst_funcs.h272
-rw-r--r--test/locale-mbwc/tst_iswalnum.c10
-rw-r--r--test/locale-mbwc/tst_iswalpha.c10
-rw-r--r--test/locale-mbwc/tst_iswcntrl.c10
-rw-r--r--test/locale-mbwc/tst_iswctype.c53
-rw-r--r--test/locale-mbwc/tst_iswdigit.c11
-rw-r--r--test/locale-mbwc/tst_iswgraph.c10
-rw-r--r--test/locale-mbwc/tst_iswlower.c10
-rw-r--r--test/locale-mbwc/tst_iswprint.c10
-rw-r--r--test/locale-mbwc/tst_iswpunct.c10
-rw-r--r--test/locale-mbwc/tst_iswspace.c10
-rw-r--r--test/locale-mbwc/tst_iswupper.c10
-rw-r--r--test/locale-mbwc/tst_iswxdigit.c10
-rw-r--r--test/locale-mbwc/tst_mblen.c85
-rw-r--r--test/locale-mbwc/tst_mbrlen.c82
-rw-r--r--test/locale-mbwc/tst_mbrlen.i8009
-rw-r--r--test/locale-mbwc/tst_mbrlen.s8666
-rw-r--r--test/locale-mbwc/tst_mbrtowc.c103
-rw-r--r--test/locale-mbwc/tst_mbsrtowcs.c109
-rw-r--r--test/locale-mbwc/tst_mbstowcs.c98
-rw-r--r--test/locale-mbwc/tst_mbtowc.c130
-rw-r--r--test/locale-mbwc/tst_strcoll.c87
-rw-r--r--test/locale-mbwc/tst_strfmon.c74
-rw-r--r--test/locale-mbwc/tst_strxfrm.c136
-rw-r--r--test/locale-mbwc/tst_swscanf.c137
-rw-r--r--test/locale-mbwc/tst_towctrans.c82
-rw-r--r--test/locale-mbwc/tst_towlower.c11
-rw-r--r--test/locale-mbwc/tst_towupper.c10
-rw-r--r--test/locale-mbwc/tst_types.h729
-rw-r--r--test/locale-mbwc/tst_wcrtomb.c79
-rw-r--r--test/locale-mbwc/tst_wcscat.c78
-rw-r--r--test/locale-mbwc/tst_wcschr.c70
-rw-r--r--test/locale-mbwc/tst_wcscmp.c40
-rw-r--r--test/locale-mbwc/tst_wcscoll.c76
-rw-r--r--test/locale-mbwc/tst_wcscpy.c85
-rw-r--r--test/locale-mbwc/tst_wcscspn.c38
-rw-r--r--test/locale-mbwc/tst_wcslen.c31
-rw-r--r--test/locale-mbwc/tst_wcsncat.c75
-rw-r--r--test/locale-mbwc/tst_wcsncmp.c40
-rw-r--r--test/locale-mbwc/tst_wcsncpy.c93
-rw-r--r--test/locale-mbwc/tst_wcspbrk.c80
-rw-r--r--test/locale-mbwc/tst_wcsrtombs.c127
-rw-r--r--test/locale-mbwc/tst_wcsspn.c38
-rw-r--r--test/locale-mbwc/tst_wcsstr.c86
-rw-r--r--test/locale-mbwc/tst_wcstod.c69
-rw-r--r--test/locale-mbwc/tst_wcstok.c96
-rw-r--r--test/locale-mbwc/tst_wcstombs.c115
-rw-r--r--test/locale-mbwc/tst_wcswidth.c39
-rw-r--r--test/locale-mbwc/tst_wcsxfrm.c122
-rw-r--r--test/locale-mbwc/tst_wctob.c37
-rw-r--r--test/locale-mbwc/tst_wctomb.c99
-rw-r--r--test/locale-mbwc/tst_wctrans.c52
-rw-r--r--test/locale-mbwc/tst_wctype.c48
-rw-r--r--test/locale-mbwc/tst_wcwidth.c38
110 files changed, 29302 insertions, 0 deletions
diff --git a/test/locale-mbwc/Makefile b/test/locale-mbwc/Makefile
new file mode 100644
index 000000000..8f5a2dba8
--- /dev/null
+++ b/test/locale-mbwc/Makefile
@@ -0,0 +1,29 @@
+# uClibc locale tests
+# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+# tst_mbtowc tst_strcoll tst_strfmon tst_strxfrm \
+
+TESTS := tst_iswalnum tst_iswalpha tst_iswcntrl \
+ tst_iswctype tst_iswdigit tst_iswgraph \
+ tst_iswlower tst_iswprint tst_iswpunct \
+ tst_iswspace tst_iswupper tst_iswxdigit \
+ tst_mblen tst_mbrlen tst_mbrtowc tst_mbsrtowcs \
+ tst_mbstowcs tst_mbtowc tst_strcoll tst_strxfrm \
+ tst_swscanf tst_towctrans tst_towlower \
+ tst_towupper tst_wcrtomb tst_wcscat tst_wcschr \
+ tst_wcscmp tst_wcscoll tst_wcscpy tst_wcscspn \
+ tst_wcslen tst_wcsncat tst_wcsncmp tst_wcsncpy \
+ tst_wcspbrk tst_wcsrtombs tst_wcsspn tst_wcsstr \
+ tst_wcstod tst_wcstok tst_wcstombs tst_wcswidth \
+ tst_wcsxfrm tst_wctob tst_wctomb tst_wctrans \
+ tst_wctype tst_wcwidth tst_strfmon
+
+
+# NOTE: For now disabled tst_strfmon to avoid build failure.
+TESTS_DISABLED := tst_strfmon
+
+include ../Test.mak
+
+DODIFF_rint := 1
+
+EXTRA_CFLAGS := -D__USE_GNU -fno-builtin
+
diff --git a/test/locale-mbwc/dat_isw-funcs.h b/test/locale-mbwc/dat_isw-funcs.h
new file mode 100644
index 000000000..70aecb083
--- /dev/null
+++ b/test/locale-mbwc/dat_isw-funcs.h
@@ -0,0 +1,37 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: dat_isw-funcs.h
+ *
+ * ISW*: int isw* (wint_t wc);
+ */
+
+#include <errno.h>
+#include <stdlib.h>
+#include <wctype.h>
+#include "tst_types.h"
+#include "tgn_locdef.h"
+
+#define TST_ISW_LOC(FUNC, func) \
+ TST_ISW## FUNC tst_isw## func ##_loc []
+
+#define TST_ISW_REC(locale, func) \
+ { Tisw## func, TST_LOC_## locale },
+
+/*
+ * NOTE:
+ * Set ret_flg = 1, when a return value is expected to be 0 (FALSE).
+ * Set ret_flg = 0, when a return value is expected to be non-zero (TRUE).
+ *
+ * Since the functions return *non*-zero value for TRUE, can't
+ * compare an actual return value with an expected return value.
+ * Set the ret_flg=0 for TRUE cases and the tst_isw*() will check
+ * the non-zero value.
+ *
+ * { { WEOF }, { 0,1,0 } },
+ * | |
+ * | ret_val: an expected return value
+ * ret_flg: if 1, compare an actual return value with the
+ * ret_val; if 0, the test program
+ * checks the actual return value.
+ */
diff --git a/test/locale-mbwc/dat_iswalnum.c b/test/locale-mbwc/dat_iswalnum.c
new file mode 100644
index 000000000..509370359
--- /dev/null
+++ b/test/locale-mbwc/dat_iswalnum.c
@@ -0,0 +1,196 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: dat_iswalnum.c
+ *
+ * ISW*: int iswalnum (wint_t wc);
+ */
+
+
+#include "dat_isw-funcs.h"
+
+
+TST_ISW_LOC (ALNUM, alnum) = {
+
+ { TST_ISW_REC (de, alnum)
+ {
+ { { 0x0080 }, { 0,1,0 } }, /* CTRL */
+ { { 0x009F }, { 0,1,0 } }, /* CTRL */
+ { { 0x00A0 }, { 0,1,0 } }, /* NB SPACE */
+ { { 0x00A1 }, { 0,1,0 } }, /* UD ! */
+ { { 0x00B0 }, { 0,1,0 } }, /* Degree */
+ { { 0x00B1 }, { 0,1,0 } }, /* +- sign */
+ { { 0x00B2 }, { 0,1,0 } }, /* SUP 2 */
+ { { 0x00B3 }, { 0,1,0 } }, /* SUP 3 */
+ { { 0x00B4 }, { 0,1,0 } }, /* ACUTE */
+ { { 0x00B8 }, { 0,1,0 } }, /* CEDILLA */
+ { { 0x00B9 }, { 0,1,0 } }, /* SUP 1 */
+ { { 0x00BB }, { 0,1,0 } }, /* >> */
+ { { 0x00BC }, { 0,1,0 } }, /* 1/4 */
+ { { 0x00BD }, { 0,1,0 } }, /* 1/2 */
+ { { 0x00BE }, { 0,1,0 } }, /* 3/4 */
+ { { 0x00BF }, { 0,1,0 } }, /* UD ? */
+ { { 0x00C0 }, { 0,0,0 } }, /* A Grave */
+ { { 0x00D6 }, { 0,0,0 } }, /* O dia */
+ { { 0x00D7 }, { 0,1,0 } }, /* multipl. */
+ { { 0x00D8 }, { 0,0,0 } }, /* O stroke */
+ { { 0x00DF }, { 0,0,0 } }, /* small Sh */
+ { { 0x00E0 }, { 0,0,0 } }, /* a grave */
+ { { 0x00F6 }, { 0,0,0 } }, /* o dia */
+ { { 0x00F7 }, { 0,1,0 } }, /* division */
+ { { 0x00F8 }, { 0,0,0 } }, /* o stroke */
+ { { 0x00FF }, { 0,0,0 } }, /* y dia */
+ { .is_last = 1 } /* last element */
+ }
+ },
+ { TST_ISW_REC (de_UTF8, alnum)
+ {
+ { { 0x0080 }, { 0,1,0 } }, /* CTRL */
+ { { 0x009F }, { 0,1,0 } }, /* CTRL */
+ { { 0x00A0 }, { 0,1,0 } }, /* NB SPACE */
+ { { 0x00A1 }, { 0,1,0 } }, /* UD ! */
+ { { 0x00B0 }, { 0,1,0 } }, /* Degree */
+ { { 0x00B1 }, { 0,1,0 } }, /* +- sign */
+ { { 0x00B2 }, { 0,1,0 } }, /* SUP 2 */
+ { { 0x00B3 }, { 0,1,0 } }, /* SUP 3 */
+ { { 0x00B4 }, { 0,1,0 } }, /* ACUTE */
+ { { 0x00B8 }, { 0,1,0 } }, /* CEDILLA */
+ { { 0x00B9 }, { 0,1,0 } }, /* SUP 1 */
+ { { 0x00BB }, { 0,1,0 } }, /* >> */
+ { { 0x00BC }, { 0,1,0 } }, /* 1/4 */
+ { { 0x00BD }, { 0,1,0 } }, /* 1/2 */
+ { { 0x00BE }, { 0,1,0 } }, /* 3/4 */
+ { { 0x00BF }, { 0,1,0 } }, /* UD ? */
+ { { 0x00C0 }, { 0,0,0 } }, /* A Grave */
+ { { 0x00D6 }, { 0,0,0 } }, /* O dia */
+ { { 0x00D7 }, { 0,1,0 } }, /* multipl. */
+ { { 0x00D8 }, { 0,0,0 } }, /* O stroke */
+ { { 0x00DF }, { 0,0,0 } }, /* small Sh */
+ { { 0x00E0 }, { 0,0,0 } }, /* a grave */
+ { { 0x00F6 }, { 0,0,0 } }, /* o dia */
+ { { 0x00F7 }, { 0,1,0 } }, /* division */
+ { { 0x00F8 }, { 0,0,0 } }, /* o stroke */
+ { { 0x00FF }, { 0,0,0 } }, /* y dia */
+ { .is_last = 1 } /* last element */
+ }
+ },
+ { TST_ISW_REC (enUS, alnum)
+ {
+ { { WEOF }, { 0,1,0 } },
+ { { 0x0000 }, { 0,1,0 } },
+ { { 0x001F }, { 0,1,0 } },
+ { { 0x0020 }, { 0,1,0 } },
+ { { 0x0021 }, { 0,1,0 } },
+ { { 0x002F }, { 0,1,0 } },
+ { { 0x0030 }, { 0,0,0 } },
+ { { 0x0039 }, { 0,0,0 } },
+ { { 0x003A }, { 0,1,0 } },
+ { { 0x0040 }, { 0,1,0 } },
+ { { 0x0041 }, { 0,0,0 } },
+ { { 0x005A }, { 0,0,0 } },
+ { { 0x005B }, { 0,1,0 } },
+ { { 0x0060 }, { 0,1,0 } },
+ { { 0x0061 }, { 0,0,0 } },
+ { { 0x007A }, { 0,0,0 } },
+ { { 0x007B }, { 0,1,0 } },
+ { { 0x007E }, { 0,1,0 } },
+ { { 0x007F }, { 0,1,0 } },
+ { { 0x0080 }, { 0,1,0 } },
+ { .is_last = 1 } /* last element */
+ }
+ },
+#if 0
+ { TST_ISW_REC (eucJP, alnum)
+#else
+ { TST_ISW_REC (ja_UTF8, alnum)
+#endif
+ {
+ { { 0x3000 }, { 0,1,0 } }, /* IDEO. SPACE */
+ { { 0x3020 }, { 0,1,0 } }, /* POSTAL MARK FACE */
+#ifdef SHOJI_IS_RIGHT
+ { { 0x3029 }, { 0,1,0 } }, /* Hangzhou NUM9 */
+#else
+ { { 0x3029 }, { 0,0,0 } }, /* Hangzhou NUM9 */
+#endif
+ { { 0x302F }, { 0,1,0 } }, /* Diacritics(Hangul) */
+ { { 0x3037 }, { 0,1,0 } }, /* Separator Symbol */
+ { { 0x303F }, { 0,1,0 } }, /* IDEO. HALF SPACE */
+#ifdef SHOJI_IS_RIGHT
+ { { 0x3041 }, { 0,1,0 } }, /* HIRAGANA a */
+ { { 0x3094 }, { 0,1,0 } }, /* HIRAGANA u" */
+#else
+ { { 0x3041 }, { 0,0,0 } }, /* HIRAGANA a */
+ { { 0x3094 }, { 0,0,0 } }, /* HIRAGANA u" */
+#endif
+ { { 0x3099 }, { 0,1,0 } }, /* SOUND MARK */
+#ifdef SHOJI_IS_RIGHT
+ { { 0x309E }, { 0,1,0 } }, /* ITERATION MARK */
+ { { 0x30A1 }, { 0,1,0 } }, /* KATAKANA a */
+ { { 0x30FA }, { 0,1,0 } }, /* KATAKANA wo" */
+#else
+ { { 0x309E }, { 0,0,0 } }, /* ITERATION MARK */
+ { { 0x30A1 }, { 0,0,0 } }, /* KATAKANA a */
+ { { 0x30FA }, { 0,0,0 } }, /* KATAKANA wo" */
+#endif
+ { { 0x30FB }, { 0,1,0 } }, /* KATAKANA MID.DOT */
+#ifdef SHOJI_IS_RIGHT
+ { { 0x30FE }, { 0,1,0 } }, /* KATAKANA ITERATION */
+#else
+ { { 0x30FE }, { 0,0,0 } }, /* KATAKANA ITERATION */
+#endif
+ { { 0x3191 }, { 0,1,0 } }, /* KANBUN REV.MARK */
+ { { 0x3243 }, { 0,1,0 } }, /* IDEO. MARK (reach) */
+ { { 0x32CB }, { 0,1,0 } }, /* IDEO.TEL.SYM.DEC12 */
+ { { 0x32FE }, { 0,1,0 } }, /* MARU KATAKANA wo */
+ { { 0x33FE }, { 0,1,0 } }, /* CJK IDEO.TEL.31th */
+#ifdef SHOJI_IS_RIGHT
+ { { 0x4E00 }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0x4E05 }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0x4E06 }, { 0,1,0 } }, /* CJK UNI.IDEO.NON-J */
+ { { 0x4E07 }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0x4FFF }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0x9000 }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0x9006 }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0x9007 }, { 0,1,0 } }, /* CJK UNI.IDEO.NON-J */
+ { { 0x9FA4 }, { 0,1,0 } }, /* CJK UNI.IDEO.NON-J */
+ { { 0x9FA5 }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+#else
+ { { 0x4E00 }, { 0,0,0 } }, /* CJK UNI.IDEO. */
+ { { 0x4E05 }, { 0,0,0 } }, /* CJK UNI.IDEO. */
+ { { 0x4E06 }, { 0,0,0 } }, /* CJK UNI.IDEO.NON-J */
+ { { 0x4E07 }, { 0,0,0 } }, /* CJK UNI.IDEO. */
+ { { 0x4FFF }, { 0,0,0 } }, /* CJK UNI.IDEO. */
+ { { 0x9000 }, { 0,0,0 } }, /* CJK UNI.IDEO. */
+ { { 0x9006 }, { 0,0,0 } }, /* CJK UNI.IDEO. */
+ { { 0x9007 }, { 0,0,0 } }, /* CJK UNI.IDEO.NON-J */
+ { { 0x9FA4 }, { 0,0,0 } }, /* CJK UNI.IDEO.NON-J */
+ { { 0x9FA5 }, { 0,0,0 } }, /* CJK UNI.IDEO. */
+#endif
+ { { 0xFE4F }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0xFF0F }, { 0,1,0 } }, /* FULL SLASH */
+ { { 0xFF19 }, { 0,0,0 } }, /* FULL 9 */
+ { { 0xFF20 }, { 0,1,0 } }, /* FULL @ */
+ { { 0xFF3A }, { 0,0,0 } }, /* FULL Z */
+ { { 0xFF40 }, { 0,1,0 } }, /* FULL GRAVE ACC. */
+ { { 0xFF5A }, { 0,0,0 } }, /* FULL z */
+ { { 0xFF5E }, { 0,1,0 } }, /* FULL ~ (tilde) */
+ { { 0xFF61 }, { 0,1,0 } }, /* HALF IDEO.STOP. . */
+ { { 0xFF65 }, { 0,1,0 } }, /* HALF KATA MID.DOT */
+#ifdef SHOJI_IS_RIGHT
+ { { 0xFF66 }, { 0,1,0 } }, /* HALF KATA WO */
+ { { 0xFF6F }, { 0,1,0 } }, /* HALF KATA tu */
+ { { 0xFF70 }, { 0,1,0 } }, /* HALF KATA PL - */
+ { { 0xFF71 }, { 0,1,0 } }, /* HALF KATA A */
+ { { 0xFF9E }, { 0,1,0 } }, /* HALF KATA MI */
+#else
+ { { 0xFF66 }, { 0,0,0 } }, /* HALF KATA WO */
+ { { 0xFF6F }, { 0,0,0 } }, /* HALF KATA tu */
+ { { 0xFF70 }, { 0,0,0 } }, /* HALF KATA PL - */
+ { { 0xFF71 }, { 0,0,0 } }, /* HALF KATA A */
+ { { 0xFF9E }, { 0,0,0 } }, /* HALF KATA MI */
+#endif
+ { .is_last = 1 } /* last element */
+ }
+ },
+ { TST_ISW_REC (end, alnum) }
+};
diff --git a/test/locale-mbwc/dat_iswalpha.c b/test/locale-mbwc/dat_iswalpha.c
new file mode 100644
index 000000000..c2b59fbf9
--- /dev/null
+++ b/test/locale-mbwc/dat_iswalpha.c
@@ -0,0 +1,169 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: dat_iswalpha.c
+ *
+ * ISW*: int iswalpha (wint_t wc);
+ */
+
+
+#include "dat_isw-funcs.h"
+
+
+TST_ISW_LOC (ALPHA, alpha) = {
+
+ { TST_ISW_REC (de, alpha)
+ {
+ { { 0x0080 }, { 0,1,0 } }, /* CTRL */
+ { { 0x009F }, { 0,1,0 } }, /* CTRL */
+ { { 0x00A0 }, { 0,1,0 } }, /* NB SPACE */
+ { { 0x00A1 }, { 0,1,0 } }, /* UD ! */
+ { { 0x00B0 }, { 0,1,0 } }, /* Degree */
+ { { 0x00B1 }, { 0,1,0 } }, /* +- sign */
+ { { 0x00B2 }, { 0,1,0 } }, /* SUP 2 */
+ { { 0x00B3 }, { 0,1,0 } }, /* SUP 3 */
+ { { 0x00B4 }, { 0,1,0 } }, /* ACUTE */
+ { { 0x00B8 }, { 0,1,0 } }, /* CEDILLA */
+ { { 0x00B9 }, { 0,1,0 } }, /* SUP 1 */
+ { { 0x00BB }, { 0,1,0 } }, /* >> */
+ { { 0x00BC }, { 0,1,0 } }, /* 1/4 */
+ { { 0x00BD }, { 0,1,0 } }, /* 1/2 */
+ { { 0x00BE }, { 0,1,0 } }, /* 3/4 */
+ { { 0x00BF }, { 0,1,0 } }, /* UD ? */
+ { { 0x00C0 }, { 0,0,0 } }, /* A Grave */
+ { { 0x00D6 }, { 0,0,0 } }, /* O dia */
+ { { 0x00D7 }, { 0,1,0 } }, /* multipl. */
+ { { 0x00D8 }, { 0,0,0 } }, /* O stroke */
+ { { 0x00DF }, { 0,0,0 } }, /* small Sh */
+ { { 0x00E0 }, { 0,0,0 } }, /* a grave */
+ { { 0x00F6 }, { 0,0,0 } }, /* o dia */
+ { { 0x00F7 }, { 0,1,0 } }, /* division */
+ { { 0x00F8 }, { 0,0,0 } }, /* o stroke */
+ { { 0x00FF }, { 0,0,0 } }, /* y dia */
+ { .is_last = 1 } /* last element */
+ }
+ },
+ { TST_ISW_REC (enUS, alpha)
+ {
+ { { WEOF }, { 0,1,0 } },
+ { { 0x0000 }, { 0,1,0 } },
+ { { 0x001F }, { 0,1,0 } },
+ { { 0x0020 }, { 0,1,0 } },
+ { { 0x0021 }, { 0,1,0 } },
+ { { 0x002F }, { 0,1,0 } },
+ { { 0x0030 }, { 0,1,0 } },
+ { { 0x0039 }, { 0,1,0 } },
+ { { 0x003A }, { 0,1,0 } },
+ { { 0x0040 }, { 0,1,0 } },
+ { { 0x0041 }, { 0,0,0 } },
+ { { 0x005A }, { 0,0,0 } },
+ { { 0x005B }, { 0,1,0 } },
+ { { 0x0060 }, { 0,1,0 } },
+ { { 0x0061 }, { 0,0,0 } },
+ { { 0x007A }, { 0,0,0 } },
+ { { 0x007B }, { 0,1,0 } },
+ { { 0x007E }, { 0,1,0 } },
+ { { 0x007F }, { 0,1,0 } },
+ { { 0x0080 }, { 0,1,0 } }, /* 20 */
+ { .is_last = 1 } /* last element */
+ }
+ },
+#if 0
+ { TST_ISW_REC (eucJP, alpha)
+#else
+ { TST_ISW_REC (ja_UTF8, alpha)
+#endif
+ {
+ { { 0x3000 }, { 0,1,0 } }, /* IDEO. SPACE */
+ { { 0x3020 }, { 0,1,0 } }, /* POSTAL MARK FACE */
+#ifdef SHOJI_IS_RIGHT
+ { { 0x3029 }, { 0,1,0 } }, /* Hangzhou NUM9 */
+#else
+ { { 0x3029 }, { 0,0,0 } }, /* Hangzhou NUM9 */
+#endif
+ { { 0x302F }, { 0,1,0 } }, /* Diacritics(Hangul) */
+ { { 0x3037 }, { 0,1,0 } }, /* Separator Symbol */
+ { { 0x303F }, { 0,1,0 } }, /* IDEO. HALF SPACE */
+#ifdef SHOJI_IS_RIGHT
+ { { 0x3041 }, { 0,1,0 } }, /* HIRAGANA a */
+ { { 0x3094 }, { 0,1,0 } }, /* HIRAGANA u" */
+#else
+ { { 0x3041 }, { 0,0,0 } }, /* HIRAGANA a */
+ { { 0x3094 }, { 0,0,0 } }, /* HIRAGANA u" */
+#endif
+ { { 0x3099 }, { 0,1,0 } }, /* SOUND MARK */
+#ifdef SHOJI_IS_RIGHT
+ { { 0x309E }, { 0,1,0 } }, /* ITERATION MARK */
+ { { 0x30A1 }, { 0,1,0 } }, /* KATAKANA a */
+ { { 0x30FA }, { 0,1,0 } }, /* KATAKANA wo" */
+#else
+ { { 0x309E }, { 0,0,0 } }, /* ITERATION MARK */
+ { { 0x30A1 }, { 0,0,0 } }, /* KATAKANA a */
+ { { 0x30FA }, { 0,0,0 } }, /* KATAKANA wo" */
+#endif
+ { { 0x30FB }, { 0,1,0 } }, /* KATAKANA MID.DOT */
+#ifdef SHOJI_IS_RIGHT
+ { { 0x30FE }, { 0,1,0 } }, /* KATAKANA ITERATION */
+#else
+ { { 0x30FE }, { 0,0,0 } }, /* KATAKANA ITERATION */
+#endif
+ { { 0x3191 }, { 0,1,0 } }, /* KANBUN REV.MARK */
+ { { 0x3243 }, { 0,1,0 } }, /* IDEO. MARK (reach) */
+ { { 0x32CB }, { 0,1,0 } }, /* IDEO.TEL.SYM.DEC12 */
+ { { 0x32FE }, { 0,1,0 } }, /* MARU KATAKANA wo */
+ { { 0x33FE }, { 0,1,0 } }, /* CJK IDEO.TEL.31th */
+#ifdef SHOJI_IS_RIGHT
+ { { 0x4E00 }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0x4E05 }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0x4E06 }, { 0,1,0 } }, /* CJK UNI.IDEO.NON-J */
+ { { 0x4E07 }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0x4FFF }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0x9000 }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0x9006 }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0x9007 }, { 0,1,0 } }, /* CJK UNI.IDEO.NON-J */
+ { { 0x9FA4 }, { 0,1,0 } }, /* CJK UNI.IDEO.NON-J */
+ { { 0x9FA5 }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+#else
+ { { 0x4E00 }, { 0,0,0 } }, /* CJK UNI.IDEO. */
+ { { 0x4E05 }, { 0,0,0 } }, /* CJK UNI.IDEO. */
+ { { 0x4E06 }, { 0,0,0 } }, /* CJK UNI.IDEO.NON-J */
+ { { 0x4E07 }, { 0,0,0 } }, /* CJK UNI.IDEO. */
+ { { 0x4FFF }, { 0,0,0 } }, /* CJK UNI.IDEO. */
+ { { 0x9000 }, { 0,0,0 } }, /* CJK UNI.IDEO. */
+ { { 0x9006 }, { 0,0,0 } }, /* CJK UNI.IDEO. */
+ { { 0x9007 }, { 0,0,0 } }, /* CJK UNI.IDEO.NON-J */
+ { { 0x9FA4 }, { 0,0,0 } }, /* CJK UNI.IDEO.NON-J */
+ { { 0x9FA5 }, { 0,0,0 } }, /* CJK UNI.IDEO. */
+#endif
+ { { 0xFE4F }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0xFF0F }, { 0,1,0 } }, /* FULL SLASH */
+#ifdef SHOJI_IS_RIGHT
+ { { 0xFF19 }, { 0,1,0 } }, /* FULL 9 */
+#else
+ { { 0xFF19 }, { 0,0,0 } }, /* FULL 9 */
+#endif
+ { { 0xFF20 }, { 0,1,0 } }, /* FULL @ */
+ { { 0xFF3A }, { 0,0,0 } }, /* FULL Z */
+ { { 0xFF40 }, { 0,1,0 } }, /* FULL GRAVE ACC. */
+ { { 0xFF5A }, { 0,0,0 } }, /* FULL z */
+ { { 0xFF5E }, { 0,1,0 } }, /* FULL ~ (tilde) */
+ { { 0xFF61 }, { 0,1,0 } }, /* HALF IDEO.STOP. . */
+ { { 0xFF65 }, { 0,1,0 } }, /* HALF KATA MID.DOT */
+#ifdef SHOJI_IS_RIGHT
+ { { 0xFF66 }, { 0,1,0 } }, /* HALF KATA WO */
+ { { 0xFF6F }, { 0,1,0 } }, /* HALF KATA tu */
+ { { 0xFF70 }, { 0,1,0 } }, /* HALF KATA PL - */
+ { { 0xFF71 }, { 0,1,0 } }, /* HALF KATA A */
+ { { 0xFF9E }, { 0,1,0 } }, /* HALF KATA MI */
+#else
+ { { 0xFF66 }, { 0,0,0 } }, /* HALF KATA WO */
+ { { 0xFF6F }, { 0,0,0 } }, /* HALF KATA tu */
+ { { 0xFF70 }, { 0,0,0 } }, /* HALF KATA PL - */
+ { { 0xFF71 }, { 0,0,0 } }, /* HALF KATA A */
+ { { 0xFF9E }, { 0,0,0 } }, /* HALF KATA MI */
+#endif
+ { .is_last = 1 } /* last element */
+ }
+ },
+ { TST_ISW_REC (end, alpha) }
+};
diff --git a/test/locale-mbwc/dat_iswcntrl.c b/test/locale-mbwc/dat_iswcntrl.c
new file mode 100644
index 000000000..e6ec685ed
--- /dev/null
+++ b/test/locale-mbwc/dat_iswcntrl.c
@@ -0,0 +1,125 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: dat_iswcntrl.c
+ *
+ * ISW*: int iswcntrl (wint_t wc);
+ */
+
+
+#include "dat_isw-funcs.h"
+
+
+TST_ISW_LOC (CNTRL, cntrl) = {
+
+ { TST_ISW_REC (de, cntrl)
+ {
+ { { 0x0080 }, { 0,0,0 } }, /* CTRL */
+ { { 0x009F }, { 0,0,0 } }, /* CTRL */
+ { { 0x00A0 }, { 0,1,0 } }, /* NB SPACE */
+ { { 0x00A1 }, { 0,1,0 } }, /* UD ! */
+ { { 0x00B0 }, { 0,1,0 } }, /* Degree */
+ { { 0x00B1 }, { 0,1,0 } }, /* +- sign */
+ { { 0x00B2 }, { 0,1,0 } }, /* SUP 2 */
+ { { 0x00B3 }, { 0,1,0 } }, /* SUP 3 */
+ { { 0x00B4 }, { 0,1,0 } }, /* ACUTE */
+ { { 0x00B8 }, { 0,1,0 } }, /* CEDILLA */
+ { { 0x00B9 }, { 0,1,0 } }, /* SUP 1 */
+ { { 0x00BB }, { 0,1,0 } }, /* >> */
+ { { 0x00BC }, { 0,1,0 } }, /* 1/4 */
+ { { 0x00BD }, { 0,1,0 } }, /* 1/2 */
+ { { 0x00BE }, { 0,1,0 } }, /* 3/4 */
+ { { 0x00BF }, { 0,1,0 } }, /* UD ? */
+ { { 0x00C0 }, { 0,1,0 } }, /* A Grave */
+ { { 0x00D6 }, { 0,1,0 } }, /* O dia */
+ { { 0x00D7 }, { 0,1,0 } }, /* multipl. */
+ { { 0x00D8 }, { 0,1,0 } }, /* O stroke */
+ { { 0x00DF }, { 0,1,0 } }, /* small Sh */
+ { { 0x00E0 }, { 0,1,0 } }, /* a grave */
+ { { 0x00F6 }, { 0,1,0 } }, /* o dia */
+ { { 0x00F7 }, { 0,1,0 } }, /* division */
+ { { 0x00F8 }, { 0,1,0 } }, /* o stroke */
+ { { 0x00FF }, { 0,1,0 } }, /* y dia */
+ { .is_last = 1 } /* Last element. */
+ }
+ },
+ { TST_ISW_REC (enUS, cntrl)
+ {
+ { { WEOF }, { 0,1,0 } },
+ { { 0x0000 }, { 0,0,0 } },
+ { { 0x001F }, { 0,0,0 } },
+ { { 0x0020 }, { 0,1,0 } },
+ { { 0x0021 }, { 0,1,0 } },
+ { { 0x002F }, { 0,1,0 } },
+ { { 0x0030 }, { 0,1,0 } },
+ { { 0x0039 }, { 0,1,0 } },
+ { { 0x003A }, { 0,1,0 } },
+ { { 0x0040 }, { 0,1,0 } },
+ { { 0x0041 }, { 0,1,0 } },
+ { { 0x005A }, { 0,1,0 } },
+ { { 0x005B }, { 0,1,0 } },
+ { { 0x0060 }, { 0,1,0 } },
+ { { 0x0061 }, { 0,1,0 } },
+ { { 0x007A }, { 0,1,0 } },
+ { { 0x007B }, { 0,1,0 } },
+ { { 0x007E }, { 0,1,0 } },
+ { { 0x007F }, { 0,0,0 } },
+ { { 0x0080 }, { 0,1,0 } },
+ { .is_last = 1 } /* Last element. */
+ }
+ },
+#if 0
+ { TST_ISW_REC (eucJP, cntrl)
+#else
+ { TST_ISW_REC (ja_UTF8, cntrl)
+#endif
+ {
+ { { 0x3000 }, { 0,1,0 } }, /* IDEO. SPACE */
+ { { 0x3020 }, { 0,1,0 } }, /* POSTAL MARK FACE */
+ { { 0x3029 }, { 0,1,0 } }, /* Hangzhou NUM9 */
+ { { 0x302F }, { 0,1,0 } }, /* Diacritics(Hangul) */
+ { { 0x3037 }, { 0,1,0 } }, /* Separator Symbol */
+ { { 0x303F }, { 0,1,0 } }, /* IDEO. HALF SPACE */
+ { { 0x3041 }, { 0,1,0 } }, /* HIRAGANA a */
+ { { 0x3094 }, { 0,1,0 } }, /* HIRAGANA u" */
+ { { 0x3099 }, { 0,1,0 } }, /* SOUND MARK */
+ { { 0x309E }, { 0,1,0 } }, /* ITERATION MARK */
+ { { 0x30A1 }, { 0,1,0 } }, /* KATAKANA a */
+ { { 0x30FA }, { 0,1,0 } }, /* KATAKANA wo" */
+ { { 0x30FB }, { 0,1,0 } }, /* KATAKANA MID.DOT */
+ { { 0x30FE }, { 0,1,0 } }, /* KATAKANA ITERATION */
+ { { 0x3191 }, { 0,1,0 } }, /* KANBUN REV.MARK */
+ { { 0x3243 }, { 0,1,0 } }, /* IDEO. MARK (reach) */
+ { { 0x32CB }, { 0,1,0 } }, /* IDEO.TEL.SYM.DEC12 */
+ { { 0x32FE }, { 0,1,0 } }, /* MARU KATAKANA wo */
+ { { 0x33FE }, { 0,1,0 } }, /* CJK IDEO.TEL.31th */
+ { { 0x4E00 }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0x4E05 }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0x4E06 }, { 0,1,0 } }, /* CJK UNI.IDEO.NON-J */
+ { { 0x4E07 }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0x4FFF }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0x9000 }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0x9006 }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0x9007 }, { 0,1,0 } }, /* CJK UNI.IDEO.NON-J */
+ { { 0x9FA4 }, { 0,1,0 } }, /* CJK UNI.IDEO.NON-J */
+ { { 0x9FA5 }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0xFE4F }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0xFF0F }, { 0,1,0 } }, /* FULL SLASH */
+ { { 0xFF19 }, { 0,1,0 } }, /* FULL 9 */
+ { { 0xFF20 }, { 0,1,0 } }, /* FULL @ */
+ { { 0xFF3A }, { 0,1,0 } }, /* FULL Z */
+ { { 0xFF40 }, { 0,1,0 } }, /* FULL GRAVE ACC. */
+ { { 0xFF5A }, { 0,1,0 } }, /* FULL z */
+ { { 0xFF5E }, { 0,1,0 } }, /* FULL ~ (tilde) */
+ { { 0xFF61 }, { 0,1,0 } }, /* HALF IDEO.STOP. . */
+ { { 0xFF65 }, { 0,1,0 } }, /* HALF KATA MID.DOT */
+ { { 0xFF66 }, { 0,1,0 } }, /* HALF KATA WO */
+ { { 0xFF6F }, { 0,1,0 } }, /* HALF KATA tu */
+ { { 0xFF70 }, { 0,1,0 } }, /* HALF KATA PL - */
+ { { 0xFF71 }, { 0,1,0 } }, /* HALF KATA A */
+ { { 0xFF9E }, { 0,1,0 } }, /* HALF KATA MI */
+ { .is_last = 1 } /* Last element. */
+ }
+ },
+ { TST_ISW_REC(end, cntrl) }
+};
diff --git a/test/locale-mbwc/dat_iswctype.c b/test/locale-mbwc/dat_iswctype.c
new file mode 100644
index 000000000..6448b328f
--- /dev/null
+++ b/test/locale-mbwc/dat_iswctype.c
@@ -0,0 +1,667 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: dat_iswctype.c
+ *
+ * ISWCTYPE: int iswctype( wint_t wc, wctype_t charclass );
+ */
+
+#include <errno.h>
+#include <stdlib.h>
+#include <wctype.h>
+#include "tst_types.h"
+#include "tgn_locdef.h"
+
+/*
+ * NOTE:
+ * Set ret_flg = 1, when a return value is expected to be 0 (FALSE).
+ * Set ret_flg = 0, when a return value is expected to be non-zero (TRUE).
+ *
+ * Since the functions return *non*-zero value for TRUE, can't
+ * compare an actual return value with an expected return value.
+ * Set the ret_flg=0 for TRUE cases and the tst_isw*() will check
+ * the non-zero value.
+ *
+ * { { WEOF }, { 0,1,0 } },
+ * | |
+ * | ret_val: an expected return value
+ * ret_flg: if 1, compare an actual return value with the
+ * ret_val; if 0, the test program checks
+ * the actual return value.
+ */
+
+TST_ISWCTYPE tst_iswctype_loc [] = {
+ {
+ { Tiswctype, TST_LOC_de },
+ {
+ { { 0x009F, "alnum" }, { 0,1,0 } }, /* CTRL */
+ { { 0x00A0, "alnum" }, { 0,1,0 } }, /* NB SPACE */
+ { { 0x00A1, "alnum" }, { 0,1,0 } }, /* UD ! */
+ { { 0x00B1, "alnum" }, { 0,1,0 } }, /* +- sign */
+ { { 0x00B3, "alnum" }, { 0,1,0 } }, /* SUP 3 */
+ { { 0x00B4, "alnum" }, { 0,1,0 } }, /* ACUTE */
+ { { 0x00BB, "alnum" }, { 0,1,0 } }, /* >> */
+ { { 0x00BE, "alnum" }, { 0,1,0 } }, /* 3/4 */
+ { { 0x00BF, "alnum" }, { 0,1,0 } }, /* UD ? */
+ { { 0x00C0, "alnum" }, { 0,0,0 } }, /* A Grave */
+ { { 0x00D6, "alnum" }, { 0,0,0 } }, /* O dia */
+ { { 0x00D7, "alnum" }, { 0,1,0 } }, /* multipl. */
+ { { 0x00D8, "alnum" }, { 0,0,0 } }, /* O stroke */
+ { { 0x00DF, "alnum" }, { 0,0,0 } }, /* small Sh */
+ { { 0x00E0, "alnum" }, { 0,0,0 } }, /* a grave */
+ { { 0x00F6, "alnum" }, { 0,0,0 } }, /* o dia */
+ { { 0x00F7, "alnum" }, { 0,1,0 } }, /* division */
+ { { 0x00F8, "alnum" }, { 0,0,0 } }, /* o stroke */
+ { { 0x00FF, "alnum" }, { 0,0,0 } }, /* y dia */
+ { { 0x0080, "alpha" }, { 0,1,0 } }, /* CTRL */
+ { { 0x00A0, "alpha" }, { 0,1,0 } }, /* NB SPACE */
+ { { 0x00A1, "alpha" }, { 0,1,0 } }, /* UD ! */
+ { { 0x00B1, "alpha" }, { 0,1,0 } }, /* +- sign */
+ { { 0x00B4, "alpha" }, { 0,1,0 } }, /* ACUTE */
+ { { 0x00B8, "alpha" }, { 0,1,0 } }, /* CEDILLA */
+ { { 0x00B9, "alpha" }, { 0,1,0 } }, /* SUP 1 */
+ { { 0x00BB, "alpha" }, { 0,1,0 } }, /* >> */
+ { { 0x00BE, "alpha" }, { 0,1,0 } }, /* 3/4 */
+ { { 0x00BF, "alpha" }, { 0,1,0 } }, /* UD ? */
+ { { 0x00C0, "alpha" }, { 0,0,0 } }, /* A Grave */
+ { { 0x00D6, "alpha" }, { 0,0,0 } }, /* O dia */
+ { { 0x00D7, "alpha" }, { 0,1,0 } }, /* multipl. */
+ { { 0x00D8, "alpha" }, { 0,0,0 } }, /* O stroke */
+ { { 0x00DF, "alpha" }, { 0,0,0 } }, /* small Sh */
+ { { 0x00E0, "alpha" }, { 0,0,0 } }, /* a grave */
+ { { 0x00F6, "alpha" }, { 0,0,0 } }, /* o dia */
+ { { 0x00F7, "alpha" }, { 0,1,0 } }, /* division */
+ { { 0x00F8, "alpha" }, { 0,0,0 } }, /* o stroke */
+ { { 0x00FF, "alpha" }, { 0,0,0 } }, /* y dia */
+ { { 0x0080, "cntrl" }, { 0,0,0 } }, /* CTRL */
+ { { 0x009F, "cntrl" }, { 0,0,0 } }, /* CTRL */
+ { { 0x00A0, "cntrl" }, { 0,1,0 } }, /* NB SPACE */
+ { { 0x00F6, "cntrl" }, { 0,1,0 } }, /* o dia */
+ { { 0x00FF, "cntrl" }, { 0,1,0 } }, /* y dia */
+ { { 0x00B9, "digit" }, { 0,1,0 } }, /* SUP 1 */
+ { { 0x00BE, "digit" }, { 0,1,0 } }, /* 3/4 */
+ { { 0x009F, "graph" }, { 0,1,0 } }, /* CTRL */
+#ifdef SHOJI_IS_RIGHT
+ { { 0x00A0, "graph" }, { 0,1,0 } }, /* NB SPACE */
+#else
+ { { 0x00A0, "graph" }, { 0,0,0 } }, /* NB SPACE */
+#endif
+ { { 0x00A1, "graph" }, { 0,0,0 } }, /* UD ! */
+ { { 0x00B1, "graph" }, { 0,0,0 } }, /* +- sign */
+ { { 0x00B3, "graph" }, { 0,0,0 } }, /* SUP 3 */
+ { { 0x00B4, "graph" }, { 0,0,0 } }, /* ACUTE */
+ { { 0x00BB, "graph" }, { 0,0,0 } }, /* >> */
+ { { 0x00BE, "graph" }, { 0,0,0 } }, /* 3/4 */
+ { { 0x00C0, "graph" }, { 0,0,0 } }, /* A Grave */
+ { { 0x00D6, "graph" }, { 0,0,0 } }, /* O dia */
+ { { 0x00D7, "graph" }, { 0,0,0 } }, /* multipl. */
+ { { 0x00D8, "graph" }, { 0,0,0 } }, /* O stroke */
+ { { 0x00DF, "graph" }, { 0,0,0 } }, /* small Sh */
+ { { 0x00F7, "graph" }, { 0,0,0 } }, /* division */
+ { { 0x00F8, "graph" }, { 0,0,0 } }, /* o stroke */
+ { { 0x00FF, "graph" }, { 0,0,0 } }, /* y dia */
+ { { 0x009F, "print" }, { 0,1,0 } }, /* CTRL */
+#ifdef SHOJI_IS_RIGHT
+ { { 0x00A0, "print" }, { 0,1,0 } }, /* NB SPACE */
+#else
+ { { 0x00A0, "print" }, { 0,0,0 } }, /* NB SPACE */
+#endif
+ { { 0x00A1, "print" }, { 0,0,0 } }, /* UD ! */
+ { { 0x00B1, "print" }, { 0,0,0 } }, /* +- sign */
+ { { 0x00B4, "print" }, { 0,0,0 } }, /* ACUTE */
+ { { 0x00B8, "print" }, { 0,0,0 } }, /* CEDILLA */
+ { { 0x00B9, "print" }, { 0,0,0 } }, /* SUP 1 */
+ { { 0x00BB, "print" }, { 0,0,0 } }, /* >> */
+ { { 0x00BE, "print" }, { 0,0,0 } }, /* 3/4 */
+ { { 0x00C0, "print" }, { 0,0,0 } }, /* A Grave */
+ { { 0x00DF, "print" }, { 0,0,0 } }, /* small Sh */
+ { { 0x00F6, "print" }, { 0,0,0 } }, /* o dia */
+ { { 0x00F7, "print" }, { 0,0,0 } }, /* division */
+ { { 0x00F8, "print" }, { 0,0,0 } }, /* o stroke */
+ { { 0x00FF, "print" }, { 0,0,0 } }, /* y dia */
+ { { 0x009F, "punct" }, { 0,1,0 } }, /* CTRL */
+#ifdef SHOJI_IS_RIGHT
+ { { 0x00A0, "punct" }, { 0,1,0 } }, /* NB SPACE */
+#else
+ { { 0x00A0, "punct" }, { 0,0,0 } }, /* NB SPACE */
+#endif
+ { { 0x00A1, "punct" }, { 0,0,0 } }, /* UD ! */
+ { { 0x00B0, "punct" }, { 0,0,0 } }, /* Degree */
+ { { 0x00B1, "punct" }, { 0,0,0 } }, /* +- sign */
+ { { 0x00B2, "punct" }, { 0,0,0 } }, /* SUP 2 */
+ { { 0x00B3, "punct" }, { 0,0,0 } }, /* SUP 3 */
+ { { 0x00B4, "punct" }, { 0,0,0 } }, /* ACUTE */
+ { { 0x00B8, "punct" }, { 0,0,0 } }, /* CEDILLA */
+ { { 0x00B9, "punct" }, { 0,0,0 } }, /* SUP 1 */
+ { { 0x00BB, "punct" }, { 0,0,0 } }, /* >> */
+ { { 0x00BC, "punct" }, { 0,0,0 } }, /* 1/4 */
+ { { 0x00BD, "punct" }, { 0,0,0 } }, /* 1/2 */
+ { { 0x00BE, "punct" }, { 0,0,0 } }, /* 3/4 */
+ { { 0x00BF, "punct" }, { 0,0,0 } }, /* UD ? */
+ { { 0x00C0, "punct" }, { 0,1,0 } }, /* A Grave */
+ { { 0x00D7, "punct" }, { 0,0,0 } }, /* multipl. */
+ { { 0x00DF, "punct" }, { 0,1,0 } }, /* small Sh */
+ { { 0x00F6, "punct" }, { 0,1,0 } }, /* o dia */
+ { { 0x00F7, "punct" }, { 0,0,0 } }, /* division */
+ { { 0x00FF, "punct" }, { 0,1,0 } }, /* y dia */
+ { { 0x009F, "space" }, { 0,1,0 } }, /* CTRL */
+ { { 0x00A0, "space" }, { 0,1,0 } }, /* NB SPACE */
+ { { 0x00A1, "space" }, { 0,1,0 } }, /* UD ! */
+ { { 0x00B1, "space" }, { 0,1,0 } }, /* +- sign */
+ { { 0x00F8, "space" }, { 0,1,0 } }, /* o stroke */
+ { { 0x00B3, "lower" }, { 0,1,0 } }, /* SUP 3 */
+ { { 0x00B8, "lower" }, { 0,1,0 } }, /* CEDILLA */
+ { { 0x00BE, "lower" }, { 0,1,0 } }, /* 3/4 */
+ { { 0x00C0, "lower" }, { 0,1,0 } }, /* A Grave */
+ { { 0x00D6, "lower" }, { 0,1,0 } }, /* O dia */
+ { { 0x00D8, "lower" }, { 0,1,0 } }, /* O stroke */
+ { { 0x00DF, "lower" }, { 0,0,0 } }, /* small Sh */
+ { { 0x00E0, "lower" }, { 0,0,0 } }, /* a grave */
+ { { 0x00F6, "lower" }, { 0,0,0 } }, /* o dia */
+ { { 0x00F7, "lower" }, { 0,1,0 } }, /* division */
+ { { 0x00F8, "lower" }, { 0,0,0 } }, /* o stroke */
+ { { 0x00FF, "lower" }, { 0,0,0 } }, /* y dia */
+ { { 0x00B4, "upper" }, { 0,1,0 } }, /* ACUTE */
+ { { 0x00B8, "upper" }, { 0,1,0 } }, /* CEDILLA */
+ { { 0x00B9, "upper" }, { 0,1,0 } }, /* SUP 1 */
+ { { 0x00BE, "upper" }, { 0,1,0 } }, /* 3/4 */
+ { { 0x00BF, "upper" }, { 0,1,0 } }, /* UD ? */
+ { { 0x00C0, "upper" }, { 0,0,0 } }, /* A Grave */
+ { { 0x00D6, "upper" }, { 0,0,0 } }, /* O dia */
+ { { 0x00D7, "upper" }, { 0,1,0 } }, /* multipl. */
+ { { 0x00D8, "upper" }, { 0,0,0 } }, /* O stroke */
+ { { 0x00DF, "upper" }, { 0,1,0 } }, /* small Sh */
+ { { 0x00FF, "upper" }, { 0,1,0 } }, /* y dia */
+ { { 0x00B9, "xdigit" }, { 0,1,0 } }, /* SUP 1 */
+ { { 0x00BC, "xdigit" }, { 0,1,0 } }, /* 1/4 */
+ { .is_last = 1 }
+ }
+ },
+ {
+ { Tiswctype, TST_LOC_enUS },
+ {
+ { { WEOF, "alnum" }, { 0,1,0 } },
+ { { 0x0000, "alnum" }, { 0,1,0 } },
+ { { 0x001F, "alnum" }, { 0,1,0 } },
+ { { 0x0020, "alnum" }, { 0,1,0 } },
+ { { 0x0021, "alnum" }, { 0,1,0 } },
+ { { 0x002F, "alnum" }, { 0,1,0 } },
+ { { 0x0030, "alnum" }, { 0,0,0 } },
+ { { 0x0039, "alnum" }, { 0,0,0 } },
+ { { 0x003A, "alnum" }, { 0,1,0 } },
+ { { 0x0040, "alnum" }, { 0,1,0 } },
+ { { 0x0041, "alnum" }, { 0,0,0 } },
+ { { 0x005A, "alnum" }, { 0,0,0 } },
+ { { 0x005B, "alnum" }, { 0,1,0 } },
+ { { 0x0060, "alnum" }, { 0,1,0 } },
+ { { 0x0061, "alnum" }, { 0,0,0 } },
+ { { 0x007A, "alnum" }, { 0,0,0 } },
+ { { 0x007B, "alnum" }, { 0,1,0 } },
+ { { 0x007E, "alnum" }, { 0,1,0 } },
+ { { 0x007F, "alnum" }, { 0,1,0 } },
+ { { 0x0080, "alnum" }, { 0,1,0 } },
+ { { 0x0000, "alpha" }, { 0,1,0 } },
+ { { 0x001F, "alpha" }, { 0,1,0 } },
+ { { 0x0020, "alpha" }, { 0,1,0 } },
+ { { 0x0021, "alpha" }, { 0,1,0 } },
+ { { 0x002F, "alpha" }, { 0,1,0 } },
+ { { 0x0030, "alpha" }, { 0,1,0 } },
+ { { 0x0039, "alpha" }, { 0,1,0 } },
+ { { 0x003A, "alpha" }, { 0,1,0 } },
+ { { 0x0040, "alpha" }, { 0,1,0 } },
+ { { 0x0041, "alpha" }, { 0,0,0 } },
+ { { 0x005A, "alpha" }, { 0,0,0 } },
+ { { 0x005B, "alpha" }, { 0,1,0 } },
+ { { 0x0060, "alpha" }, { 0,1,0 } },
+ { { 0x0061, "alpha" }, { 0,0,0 } },
+ { { 0x007A, "alpha" }, { 0,0,0 } },
+ { { 0x007B, "alpha" }, { 0,1,0 } },
+ { { 0x007E, "alpha" }, { 0,1,0 } },
+ { { 0x007F, "alpha" }, { 0,1,0 } },
+ { { 0x0080, "alpha" }, { 0,1,0 } },
+ { { 0x0009, "blank" }, { 0,0,0 } },
+ { { 0x000B, "blank" }, { 0,1,0 } },
+ { { 0x0020, "blank" }, { 0,0,0 } },
+ { { 0x0000, "cntrl" }, { 0,0,0 } },
+ { { 0x001F, "cntrl" }, { 0,0,0 } },
+ { { 0x0020, "cntrl" }, { 0,1,0 } },
+ { { 0x0021, "cntrl" }, { 0,1,0 } },
+ { { 0x002F, "cntrl" }, { 0,1,0 } },
+ { { 0x0030, "cntrl" }, { 0,1,0 } },
+ { { 0x0039, "cntrl" }, { 0,1,0 } },
+ { { 0x003A, "cntrl" }, { 0,1,0 } },
+ { { 0x0040, "cntrl" }, { 0,1,0 } },
+ { { 0x0041, "cntrl" }, { 0,1,0 } },
+ { { 0x005A, "cntrl" }, { 0,1,0 } },
+ { { 0x005B, "cntrl" }, { 0,1,0 } },
+ { { 0x0060, "cntrl" }, { 0,1,0 } },
+ { { 0x0061, "cntrl" }, { 0,1,0 } },
+ { { 0x007A, "cntrl" }, { 0,1,0 } },
+ { { 0x007B, "cntrl" }, { 0,1,0 } },
+ { { 0x007E, "cntrl" }, { 0,1,0 } },
+ { { 0x007F, "cntrl" }, { 0,0,0 } },
+ { { 0x0080, "cntrl" }, { 0,0,0 } },
+ { { 0x0000, "digit" }, { 0,1,0 } },
+ { { 0x001F, "digit" }, { 0,1,0 } },
+ { { 0x0020, "digit" }, { 0,1,0 } },
+ { { 0x0021, "digit" }, { 0,1,0 } },
+ { { 0x002F, "digit" }, { 0,1,0 } },
+ { { 0x0030, "digit" }, { 0,0,0 } },
+ { { 0x0039, "digit" }, { 0,0,0 } },
+ { { 0x003A, "digit" }, { 0,1,0 } },
+ { { 0x0040, "digit" }, { 0,1,0 } },
+ { { 0x0041, "digit" }, { 0,1,0 } },
+ { { 0x005A, "digit" }, { 0,1,0 } },
+ { { 0x005B, "digit" }, { 0,1,0 } },
+ { { 0x0060, "digit" }, { 0,1,0 } },
+ { { 0x0061, "digit" }, { 0,1,0 } },
+ { { 0x007A, "digit" }, { 0,1,0 } },
+ { { 0x007B, "digit" }, { 0,1,0 } },
+ { { 0x007E, "digit" }, { 0,1,0 } },
+ { { 0x007F, "digit" }, { 0,1,0 } },
+ { { 0x0080, "digit" }, { 0,1,0 } },
+ { { 0x0000, "graph" }, { 0,1,0 } },
+ { { 0x001F, "graph" }, { 0,1,0 } },
+ { { 0x0020, "graph" }, { 0,1,0 } },
+ { { 0x0021, "graph" }, { 0,0,0 } },
+ { { 0x002F, "graph" }, { 0,0,0 } },
+ { { 0x0030, "graph" }, { 0,0,0 } },
+ { { 0x0039, "graph" }, { 0,0,0 } },
+ { { 0x003A, "graph" }, { 0,0,0 } },
+ { { 0x0040, "graph" }, { 0,0,0 } },
+ { { 0x0041, "graph" }, { 0,0,0 } },
+ { { 0x005A, "graph" }, { 0,0,0 } },
+ { { 0x005B, "graph" }, { 0,0,0 } },
+ { { 0x0060, "graph" }, { 0,0,0 } },
+ { { 0x0061, "graph" }, { 0,0,0 } },
+ { { 0x007A, "graph" }, { 0,0,0 } },
+ { { 0x007B, "graph" }, { 0,0,0 } },
+ { { 0x007E, "graph" }, { 0,0,0 } },
+ { { 0x007F, "graph" }, { 0,1,0 } },
+ { { 0x0080, "graph" }, { 0,1,0 } },
+ { { 0x0000, "print" }, { 0,1,0 } },
+ { { 0x001F, "print" }, { 0,1,0 } },
+ { { 0x0020, "print" }, { 0,0,0 } },
+ { { 0x0021, "print" }, { 0,0,0 } },
+ { { 0x002F, "print" }, { 0,0,0 } },
+ { { 0x0030, "print" }, { 0,0,0 } },
+ { { 0x0039, "print" }, { 0,0,0 } },
+ { { 0x003A, "print" }, { 0,0,0 } },
+ { { 0x0040, "print" }, { 0,0,0 } },
+ { { 0x0041, "print" }, { 0,0,0 } },
+ { { 0x005A, "print" }, { 0,0,0 } },
+ { { 0x005B, "print" }, { 0,0,0 } },
+ { { 0x0060, "print" }, { 0,0,0 } },
+ { { 0x0061, "print" }, { 0,0,0 } },
+ { { 0x007A, "print" }, { 0,0,0 } },
+ { { 0x007B, "print" }, { 0,0,0 } },
+ { { 0x007E, "print" }, { 0,0,0 } },
+ { { 0x007F, "print" }, { 0,1,0 } },
+ { { 0x0080, "print" }, { 0,1,0 } },
+ { { 0x0000, "punct" }, { 0,1,0 } },
+ { { 0x001F, "punct" }, { 0,1,0 } },
+ { { 0x0020, "punct" }, { 0,1,0 } },
+ { { 0x0021, "punct" }, { 0,0,0 } },
+ { { 0x002F, "punct" }, { 0,0,0 } },
+ { { 0x0030, "punct" }, { 0,1,0 } },
+ { { 0x0039, "punct" }, { 0,1,0 } },
+ { { 0x003A, "punct" }, { 0,0,0 } },
+ { { 0x0040, "punct" }, { 0,0,0 } },
+ { { 0x0041, "punct" }, { 0,1,0 } },
+ { { 0x005A, "punct" }, { 0,1,0 } },
+ { { 0x005B, "punct" }, { 0,0,0 } },
+ { { 0x0060, "punct" }, { 0,0,0 } },
+ { { 0x0061, "punct" }, { 0,1,0 } },
+ { { 0x007A, "punct" }, { 0,1,0 } },
+ { { 0x007B, "punct" }, { 0,0,0 } },
+ { { 0x007E, "punct" }, { 0,0,0 } },
+ { { 0x007F, "punct" }, { 0,1,0 } },
+ { { 0x0080, "punct" }, { 0,1,0 } },
+ { { 0x0000, "space" }, { 0,1,0 } },
+ { { 0x001F, "space" }, { 0,1,0 } },
+ { { 0x0020, "space" }, { 0,0,0 } },
+ { { 0x0021, "space" }, { 0,1,0 } },
+ { { 0x002F, "space" }, { 0,1,0 } },
+ { { 0x007E, "space" }, { 0,1,0 } },
+ { { 0x007F, "space" }, { 0,1,0 } },
+ { { 0x0080, "space" }, { 0,1,0 } },
+ { { 0x0000, "lower" }, { 0,1,0 } },
+ { { 0x001F, "lower" }, { 0,1,0 } },
+ { { 0x0020, "lower" }, { 0,1,0 } },
+ { { 0x0021, "lower" }, { 0,1,0 } },
+ { { 0x002F, "lower" }, { 0,1,0 } },
+ { { 0x0030, "lower" }, { 0,1,0 } },
+ { { 0x0039, "lower" }, { 0,1,0 } },
+ { { 0x003A, "lower" }, { 0,1,0 } },
+ { { 0x0040, "lower" }, { 0,1,0 } },
+ { { 0x0041, "lower" }, { 0,1,0 } },
+ { { 0x005A, "lower" }, { 0,1,0 } },
+ { { 0x005B, "lower" }, { 0,1,0 } },
+ { { 0x0060, "lower" }, { 0,1,0 } },
+ { { 0x0061, "lower" }, { 0,0,0 } },
+ { { 0x007A, "lower" }, { 0,0,0 } },
+ { { 0x007B, "lower" }, { 0,1,0 } },
+ { { 0x007E, "lower" }, { 0,1,0 } },
+ { { 0x007F, "lower" }, { 0,1,0 } },
+ { { 0x0080, "lower" }, { 0,1,0 } },
+ { { 0x0000, "upper" }, { 0,1,0 } },
+ { { 0x001F, "upper" }, { 0,1,0 } },
+ { { 0x0020, "upper" }, { 0,1,0 } },
+ { { 0x0021, "upper" }, { 0,1,0 } },
+ { { 0x002F, "upper" }, { 0,1,0 } },
+ { { 0x0030, "upper" }, { 0,1,0 } },
+ { { 0x0039, "upper" }, { 0,1,0 } },
+ { { 0x003A, "upper" }, { 0,1,0 } },
+ { { 0x0040, "upper" }, { 0,1,0 } },
+ { { 0x0041, "upper" }, { 0,0,0 } },
+ { { 0x005A, "upper" }, { 0,0,0 } },
+ { { 0x005B, "upper" }, { 0,1,0 } },
+ { { 0x0060, "upper" }, { 0,1,0 } },
+ { { 0x0061, "upper" }, { 0,1,0 } },
+ { { 0x007A, "upper" }, { 0,1,0 } },
+ { { 0x007B, "upper" }, { 0,1,0 } },
+ { { 0x007E, "upper" }, { 0,1,0 } },
+ { { 0x007F, "upper" }, { 0,1,0 } },
+ { { 0x0080, "upper" }, { 0,1,0 } },
+ { { 0x0000, "xdigit" }, { 0,1,0 } },
+ { { 0x001F, "xdigit" }, { 0,1,0 } },
+ { { 0x0020, "xdigit" }, { 0,1,0 } },
+ { { 0x0021, "xdigit" }, { 0,1,0 } },
+ { { 0x002F, "xdigit" }, { 0,1,0 } },
+ { { 0x0030, "xdigit" }, { 0,0,0 } },
+ { { 0x0039, "xdigit" }, { 0,0,0 } },
+ { { 0x003A, "xdigit" }, { 0,1,0 } },
+ { { 0x0040, "xdigit" }, { 0,1,0 } },
+ { { 0x0041, "xdigit" }, { 0,0,0 } },
+ { { 0x005A, "xdigit" }, { 0,1,0 } },
+ { { 0x005B, "xdigit" }, { 0,1,0 } },
+ { { 0x0060, "xdigit" }, { 0,1,0 } },
+ { { 0x0061, "xdigit" }, { 0,0,0 } },
+ { { 0x007A, "xdigit" }, { 0,1,0 } },
+ { { 0x007B, "xdigit" }, { 0,1,0 } },
+ { { 0x007E, "xdigit" }, { 0,1,0 } },
+ { { 0x007F, "xdigit" }, { 0,1,0 } },
+ { { 0x0080, "xdigit" }, { 0,1,0 } },
+ { { 0x0061, "xxxxxx" }, { 0,1,0 } },
+ { .is_last = 1 }
+ }
+ },
+ {
+#if 0
+ { Tiswctype, TST_LOC_eucJP },
+#else
+ { Tiswctype, TST_LOC_ja_UTF8 },
+#endif
+ {
+#ifdef SHOJI_IS_RIGHT
+ { { 0x3029, "alnum" }, { 0,1,0 } }, /* Hangzhou NUM9 */
+#else
+ { { 0x3029, "alnum" }, { 0,0,0 } }, /* Hangzhou NUM9 */
+#endif
+ { { 0xFE4F, "alnum" }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0xFF19, "alnum" }, { 0,0,0 } }, /* FULL 9 */
+ { { 0xFF20, "alnum" }, { 0,1,0 } }, /* FULL @ */
+ { { 0xFF3A, "alnum" }, { 0,0,0 } }, /* FULL Z */
+ { { 0xFF40, "alnum" }, { 0,1,0 } }, /* FULL GRAVE ACC. */
+ { { 0xFF5A, "alnum" }, { 0,0,0 } }, /* FULL z */
+#ifdef SHOJI_IS_RIGHT
+ { { 0xFF71, "alnum" }, { 0,1,0 } }, /* HALF KATA A */
+#else
+ { { 0xFF71, "alnum" }, { 0,0,0 } }, /* HALF KATA A */
+#endif
+#ifdef SHOJI_IS_RIGHT
+ { { 0x3029, "alpha" }, { 0,1,0 } }, /* Hangzhou NUM9 */
+#else
+ { { 0x3029, "alpha" }, { 0,0,0 } }, /* Hangzhou NUM9 */
+#endif
+ { { 0xFE4F, "alpha" }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+#ifdef SHOJI_IS_RIGHT
+ { { 0xFF19, "alpha" }, { 0,1,0 } }, /* FULL 9 */
+#else
+ { { 0xFF19, "alpha" }, { 0,0,0 } }, /* FULL 9 */
+#endif
+ { { 0xFF20, "alpha" }, { 0,1,0 } }, /* FULL @ */
+ { { 0xFF3A, "alpha" }, { 0,0,0 } }, /* FULL Z */
+ { { 0xFF40, "alpha" }, { 0,1,0 } }, /* FULL GRAVE ACC. */
+ { { 0xFF5A, "alpha" }, { 0,0,0 } }, /* FULL z */
+#ifdef SHOJI_IS_RIGHT
+ { { 0xFF71, "alpha" }, { 0,1,0 } }, /* HALF KATA A */
+#else
+ { { 0xFF71, "alpha" }, { 0,0,0 } }, /* HALF KATA A */
+#endif
+ { { 0x0080, "cntrl" }, { 0,0,0 } }, /* CNTRL */
+ { { 0x3000, "cntrl" }, { 0,1,0 } }, /* IDEO. SPACE */
+ { { 0x3029, "digit" }, { 0,1,0 } }, /* Hangzhou NUM9 */
+ { { 0x32CB, "digit" }, { 0,1,0 } }, /* IDEO.TEL.SYM.DEC12 */
+ /* 21: */
+ { { 0x33FE, "digit" }, { 0,1,0 } }, /* CJK IDEO.TEL.31th */
+ { { 0xFF19, "digit" }, { 0,1,0 } }, /* FULL 9 */
+ { { 0x3000, "graph" }, { 0,1,0 } }, /* IDEO. SPACE */
+#ifdef SHOJI_IS_RIGHT
+ { { 0x3020, "graph" }, { 0,1,0 } }, /* POSTAL MARK FACE */
+ { { 0x3029, "graph" }, { 0,1,0 } }, /* Hangzhou NUM9 */
+ { { 0x302F, "graph" }, { 0,1,0 } }, /* Diacritics(Hangul) */
+ { { 0x3037, "graph" }, { 0,1,0 } }, /* Separator Symbol */
+ { { 0x303F, "graph" }, { 0,1,0 } }, /* IDEO. HALF SPACE */
+#else
+ { { 0x3020, "graph" }, { 0,0,0 } }, /* POSTAL MARK FACE */
+ { { 0x3029, "graph" }, { 0,0,0 } }, /* Hangzhou NUM9 */
+ { { 0x302F, "graph" }, { 0,0,0 } }, /* Diacritics(Hangul) */
+ { { 0x3037, "graph" }, { 0,0,0 } }, /* Separator Symbol */
+ { { 0x303F, "graph" }, { 0,0,0 } }, /* IDEO. HALF SPACE */
+#endif
+ /* 29: */
+ { { 0x3041, "graph" }, { 0,0,0 } }, /* HIRAGANA a */
+ /* Non jis: */
+#ifdef SHOJI_IS_RIGHT
+ { { 0x3094, "graph" }, { 0,1,0 } }, /* HIRAGANA u" */
+#else
+ { { 0x3094, "graph" }, { 0,0,0 } }, /* HIRAGANA u" */
+#endif
+ /* Non jis: */
+#ifdef SHOJI_IS_RIGHT
+ { { 0x3099, "graph" }, { 0,1,0 } }, /* SOUND MARK */
+#else
+ { { 0x3099, "graph" }, { 0,0,0 } }, /* SOUND MARK */
+#endif
+ { { 0x309E, "graph" }, { 0,0,0 } }, /* ITERATION MARK */
+ /* 33: */
+ { { 0x30A1, "graph" }, { 0,0,0 } }, /* KATAKANA a */
+ /* Non jis: */
+#ifdef SHOJI_IS_RIGHT
+ { { 0x30FA, "graph" }, { 0,1,0 } }, /* KATAKANA wo" */
+#else
+ { { 0x30FA, "graph" }, { 0,0,0 } }, /* KATAKANA wo" */
+#endif
+ { { 0x30FB, "graph" }, { 0,0,0 } }, /* KATAKANA MID.DOT */
+ { { 0x30FE, "graph" }, { 0,0,0 } }, /* KATAKANA ITERATION */
+#ifdef SHOJI_IS_RIGHT
+ { { 0x3191, "graph" }, { 0,1,0 } }, /* KANBUN REV.MARK */
+ { { 0x3243, "graph" }, { 0,1,0 } }, /* IDEO. MARK (reach) */
+ { { 0x32CB, "graph" }, { 0,1,0 } }, /* IDEO.TEL.SYM.DEC12 */
+ { { 0x32FE, "graph" }, { 0,1,0 } }, /* MARU KATAKANA wo */
+ { { 0x33FE, "graph" }, { 0,1,0 } }, /* CJK IDEO.TEL.31th */
+#else
+ { { 0x3191, "graph" }, { 0,0,0 } }, /* KANBUN REV.MARK */
+ { { 0x3243, "graph" }, { 0,0,0 } }, /* IDEO. MARK (reach) */
+ { { 0x32CB, "graph" }, { 0,0,0 } }, /* IDEO.TEL.SYM.DEC12 */
+ { { 0x32FE, "graph" }, { 0,0,0 } }, /* MARU KATAKANA wo */
+ { { 0x33FE, "graph" }, { 0,0,0 } }, /* CJK IDEO.TEL.31th */
+#endif
+ { { 0x4E00, "graph" }, { 0,0,0 } }, /* CJK UNI.IDEO. */
+ { { 0x4E05, "graph" }, { 0,0,0 } }, /* CJK UNI.IDEO. */
+#ifdef SHOJI_IS_RIGHT
+ { { 0x4E06, "graph" }, { 0,1,0 } }, /* CJK UNI.IDEO.NON-J */
+#else
+ { { 0x4E06, "graph" }, { 0,0,0 } }, /* CJK UNI.IDEO.NON-J */
+#endif
+ { { 0x4E07, "graph" }, { 0,0,0 } }, /* CJK UNI.IDEO. */
+ { { 0x4FFF, "graph" }, { 0,0,0 } }, /* CJK UNI.IDEO. */
+ { { 0x9000, "graph" }, { 0,0,0 } }, /* CJK UNI.IDEO. */
+ { { 0x9006, "graph" }, { 0,0,0 } }, /* CJK UNI.IDEO. */
+#ifdef SHOJI_IS_RIGHT
+ { { 0x9007, "graph" }, { 0,1,0 } }, /* CJK UNI.IDEO.NON-J */
+ { { 0x9FA4, "graph" }, { 0,1,0 } }, /* CJK UNI.IDEO.NON-J */
+#else
+ { { 0x9007, "graph" }, { 0,0,0 } }, /* CJK UNI.IDEO.NON-J */
+ { { 0x9FA4, "graph" }, { 0,0,0 } }, /* CJK UNI.IDEO.NON-J */
+#endif
+ /* 51 */
+ { { 0x9FA5, "graph" }, { 0,0,0 } }, /* CJK UNI.IDEO. */
+ /* Non jis: */
+#ifdef SHOJI_IS_RIGHT
+ { { 0xFE4F, "graph" }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+#else
+ { { 0xFE4F, "graph" }, { 0,0,0 } }, /* CJK UNI.IDEO. */
+#endif
+ { { 0xFF0F, "graph" }, { 0,0,0 } }, /* FULL SLASH */
+ { { 0xFF19, "graph" }, { 0,0,0 } }, /* FULL 9 */
+ { { 0xFF20, "graph" }, { 0,0,0 } }, /* FULL @ */
+ { { 0xFF3A, "graph" }, { 0,0,0 } }, /* FULL Z */
+ { { 0xFF40, "graph" }, { 0,0,0 } }, /* FULL GRAVE ACC. */
+ { { 0xFF5A, "graph" }, { 0,0,0 } }, /* FULL z */
+ { { 0xFF5E, "graph" }, { 0,0,0 } }, /* FULL ~ (tilde) */
+ { { 0xFF61, "graph" }, { 0,0,0 } }, /* HALF IDEO.STOP. . */
+ { { 0xFF65, "graph" }, { 0,0,0 } }, /* HALF KATA MID.DOT */
+ { { 0xFF66, "graph" }, { 0,0,0 } }, /* HALF KATA WO */
+ { { 0xFF6F, "graph" }, { 0,0,0 } }, /* HALF KATA tu */
+ { { 0xFF70, "graph" }, { 0,0,0 } }, /* HALF KATA PL - */
+ { { 0xFF71, "graph" }, { 0,0,0 } }, /* HALF KATA A */
+ { { 0xFF9E, "graph" }, { 0,0,0 } }, /* HALF KATA MI */
+ { { 0x3000, "print" }, { 0,0,0 } }, /* IDEO. SPACE */
+#ifdef SHOJI_IS_RIGHT
+ { { 0x3020, "print" }, { 0,1,0 } }, /* POSTAL MARK FACE */
+ { { 0x3029, "print" }, { 0,1,0 } }, /* Hangzhou NUM9 */
+ { { 0x302F, "print" }, { 0,1,0 } }, /* Diacritics(Hangul) */
+ { { 0x3037, "print" }, { 0,1,0 } }, /* Separator Symbol */
+#else
+ { { 0x3020, "print" }, { 0,0,0 } }, /* POSTAL MARK FACE */
+ { { 0x3029, "print" }, { 0,0,0 } }, /* Hangzhou NUM9 */
+ { { 0x302F, "print" }, { 0,0,0 } }, /* Diacritics(Hangul) */
+ { { 0x3037, "print" }, { 0,0,0 } }, /* Separator Symbol */
+#endif
+ { { 0x4E00, "print" }, { 0,0,0 } }, /* CJK UNI.IDEO. */
+ { { 0x4E05, "print" }, { 0,0,0 } }, /* CJK UNI.IDEO. */
+#ifdef SHOJI_IS_RIGHT
+ { { 0x4E06, "print" }, { 0,1,0 } }, /* CJK UNI.IDEO.NON-J */
+#else
+ { { 0x4E06, "print" }, { 0,0,0 } }, /* CJK UNI.IDEO.NON-J */
+#endif
+ { { 0x4E07, "print" }, { 0,0,0 } }, /* CJK UNI.IDEO. */
+ { { 0x4FFF, "print" }, { 0,0,0 } }, /* CJK UNI.IDEO. */
+ { { 0x9000, "print" }, { 0,0,0 } }, /* CJK UNI.IDEO. */
+ { { 0x9006, "print" }, { 0,0,0 } }, /* CJK UNI.IDEO. */
+#ifdef SHOJI_IS_RIGHT
+ { { 0x9007, "print" }, { 0,1,0 } }, /* CJK UNI.IDEO.NON-J */
+ { { 0x9FA4, "print" }, { 0,1,0 } }, /* CJK UNI.IDEO.NON-J */
+#else
+ { { 0x9007, "print" }, { 0,0,0 } }, /* CJK UNI.IDEO.NON-J */
+ { { 0x9FA4, "print" }, { 0,0,0 } }, /* CJK UNI.IDEO.NON-J */
+#endif
+ /* 81: */
+ { { 0x9FA5, "print" }, { 0,0,0 } }, /* CJK UNI.IDEO. */
+ /* Non jis: */
+#ifdef SHOJI_IS_RIGHT
+ { { 0xFE4F, "print" }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+#else
+ { { 0xFE4F, "print" }, { 0,0,0 } }, /* CJK UNI.IDEO. */
+#endif
+ { { 0x3000, "punct" }, { 0,1,0 } }, /* IDEO. SPACE */
+#ifdef SHOJI_IS_RIGHT
+ { { 0x3020, "punct" }, { 0,1,0 } }, /* POSTAL MARK FACE */
+ { { 0x302F, "punct" }, { 0,1,0 } }, /* Diacritics(Hangul) */
+ { { 0x3037, "punct" }, { 0,1,0 } }, /* FEED Separator */
+ { { 0x303F, "punct" }, { 0,1,0 } }, /* IDEO. HALF SPACE */
+#else
+ { { 0x3020, "punct" }, { 0,0,0 } }, /* POSTAL MARK FACE */
+ { { 0x302F, "punct" }, { 0,0,0 } }, /* Diacritics(Hangul) */
+ { { 0x3037, "punct" }, { 0,0,0 } }, /* FEED Separator */
+ { { 0x303F, "punct" }, { 0,0,0 } }, /* IDEO. HALF SPACE */
+#endif
+ { { 0x3041, "punct" }, { 0,1,0 } }, /* HIRAGANA a */
+ { { 0x3094, "punct" }, { 0,1,0 } }, /* HIRAGANA u" */
+ /* 90: */
+#ifdef SHOJI_IS_RIGHT
+ { { 0x3099, "punct" }, { 0,1,0 } }, /* SOUND MARK */
+#else
+ { { 0x3099, "punct" }, { 0,0,0 } }, /* SOUND MARK */
+#endif
+ { { 0x309E, "punct" }, { 0,1,0 } }, /* ITERATION MARK */
+ { { 0x30A1, "punct" }, { 0,1,0 } }, /* KATAKANA a */
+ { { 0x30FA, "punct" }, { 0,1,0 } }, /* KATAKANA wo" */
+ { { 0x30FB, "punct" }, { 0,0,0 } }, /* KATAKANA MID.DOT */
+ /* 95: */
+ { { 0x30FE, "punct" }, { 0,1,0 } }, /* KATAKANA ITERATION */
+#ifdef SHOJI_IS_RIGHT
+ { { 0x3191, "punct" }, { 0,1,0 } }, /* KANBUN REV.MARK */
+ { { 0x3243, "punct" }, { 0,1,0 } }, /* IDEO. MARK (reach) */
+ { { 0x32CB, "punct" }, { 0,1,0 } }, /* IDEO.TEL.SYM.DEC12 */
+ { { 0x32FE, "punct" }, { 0,1,0 } }, /* MARU KATAKANA wo */
+ { { 0x33FE, "punct" }, { 0,1,0 } }, /* CJK IDEO.TEL.31th */
+#else
+ { { 0x3191, "punct" }, { 0,0,0 } }, /* KANBUN REV.MARK */
+ { { 0x3243, "punct" }, { 0,0,0 } }, /* IDEO. MARK (reach) */
+ { { 0x32CB, "punct" }, { 0,0,0 } }, /* IDEO.TEL.SYM.DEC12 */
+ { { 0x32FE, "punct" }, { 0,0,0 } }, /* MARU KATAKANA wo */
+ { { 0x33FE, "punct" }, { 0,0,0 } }, /* CJK IDEO.TEL.31th */
+#endif
+ { { 0x9007, "punct" }, { 0,1,0 } }, /* CJK UNI.IDEO.NON-J */
+ { { 0x9FA4, "punct" }, { 0,1,0 } }, /* CJK UNI.IDEO.NON-J */
+ { { 0x9FA5, "punct" }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0xFF0F, "punct" }, { 0,0,0 } }, /* FULL SLASH */
+ /* 105: */
+ { { 0xFF19, "punct" }, { 0,1,0 } }, /* FULL 9 */
+ { { 0xFF20, "punct" }, { 0,0,0 } }, /* FULL @ */
+ { { 0xFF3A, "punct" }, { 0,1,0 } }, /* FULL Z */
+ { { 0xFF40, "punct" }, { 0,0,0 } }, /* FULL GRAVE ACC. */
+ { { 0xFF5A, "punct" }, { 0,1,0 } }, /* FULL z */
+ { { 0xFF5E, "punct" }, { 0,0,0 } }, /* FULL ~ (tilde) */
+ { { 0xFF61, "punct" }, { 0,0,0 } }, /* HALF IDEO.STOP. . */
+ { { 0xFF65, "punct" }, { 0,0,0 } }, /* HALF KATA MID.DOT */
+ { { 0xFF70, "punct" }, { 0,1,0 } }, /* HALF KATA PL - */
+ { { 0xFF9E, "punct" }, { 0,1,0 } }, /* HALF KATA MI */
+ /* 115: */
+ { { 0x3000, "space" }, { 0,0,0 } }, /* IDEO. SPACE */
+ { { 0x303F, "space" }, { 0,1,0 } }, /* IDEO. HALF SPACE */
+ { { 0x3041, "lower" }, { 0,1,0 } }, /* HIRAGANA a */
+ { { 0x3094, "lower" }, { 0,1,0 } }, /* HIRAGANA u" */
+ { { 0x30A1, "lower" }, { 0,1,0 } }, /* KATAKANA a */
+ { { 0x30FA, "lower" }, { 0,1,0 } }, /* KATAKANA wo" */
+ { { 0xFF66, "lower" }, { 0,1,0 } }, /* HALF KATA WO */
+ { { 0xFF6F, "lower" }, { 0,1,0 } }, /* HALF KATA tu */
+ { { 0xFF70, "lower" }, { 0,1,0 } }, /* HALF KATA PL - */
+ /* 124: */
+ { { 0xFF71, "lower" }, { 0,1,0 } }, /* HALF KATA A */
+ { { 0xFF9E, "lower" }, { 0,1,0 } }, /* HALF KATA MI */
+ { { 0xFF71, "upper" }, { 0,1,0 } }, /* HALF KATA A */
+ { { 0xFF19, "xdigit" }, { 0,1,0 } }, /* FULL 9 */
+ { { 0x3000, "jspace" }, { 0,0,0 } }, /* IDEO. SPACE */
+ /* Non jis? */
+ { { 0x303F, "jspace" }, { 0,1,0 } }, /* IDEO.HALF SPACE */
+ { { 0xFF19, "jdigit" }, { 0,0,0 } }, /* FULL 9 */
+ { { 0x3041, "jhira" }, { 0,0,0 } }, /* HIRAGANA a */
+ { { 0x3094, "jhira" }, { 0,1,0 } }, /* HIRAGANA u" */
+ { { 0x30A1, "jkata" }, { 0,0,0 } }, /* KATAKANA a */
+ /* Non jis: */
+ { { 0x30FA, "jkata" }, { 0,1,0 } }, /* KATAKANA wo" */
+ { { 0xFF66, "jkata" }, { 0,0,0 } }, /* HALF KATA WO */
+ { { 0xFF6F, "jkata" }, { 0,0,0 } }, /* HALF KATA tu */
+ { { 0x4E05, "jkanji" }, { 0,0,0 } }, /* CJK UNI.IDEO. */
+#ifdef SHOJI_IS_RIGHT
+ /* <NO_WAIVER>: */
+ { { 0x4E06, "jkanji" }, { 0,1,1 } }, /* CJK UNI.IDEO.NON-J */
+#else
+ /* XXX This character does not exist in EUC-JP. */
+ { { 0x4E06, "jkanji" }, { 0,1,0 } }, /* CJK UNI.IDEO.NON-J */
+#endif
+ { { 0x4E07, "jkanji" }, { 0,0,0 } }, /* CJK UNI.IDEO. */
+ { .is_last = 1 }
+ }
+ },
+ {
+ { Tiswctype, TST_LOC_end }
+ }
+};
+
+
+/* dat_isw-funcs.c */
diff --git a/test/locale-mbwc/dat_iswdigit.c b/test/locale-mbwc/dat_iswdigit.c
new file mode 100644
index 000000000..70ca54479
--- /dev/null
+++ b/test/locale-mbwc/dat_iswdigit.c
@@ -0,0 +1,125 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: dat_iswdigit.c
+ *
+ * ISW*: int iswdigit (wint_t wc);
+ */
+
+
+#include "dat_isw-funcs.h"
+
+
+TST_ISW_LOC (DIGIT, digit) = {
+
+ { TST_ISW_REC (de, digit)
+ {
+ { { 0x0080 }, { 0,1,0 } }, /* CTRL */
+ { { 0x009F }, { 0,1,0 } }, /* CTRL */
+ { { 0x00A0 }, { 0,1,0 } }, /* NB SPACE */
+ { { 0x00A1 }, { 0,1,0 } }, /* UD ! */
+ { { 0x00B0 }, { 0,1,0 } }, /* Degree */
+ { { 0x00B1 }, { 0,1,0 } }, /* +- sign */
+ { { 0x00B2 }, { 0,1,0 } }, /* SUP 2 */
+ { { 0x00B3 }, { 0,1,0 } }, /* SUP 3 */
+ { { 0x00B4 }, { 0,1,0 } }, /* ACUTE */
+ { { 0x00B8 }, { 0,1,0 } }, /* CEDILLA */
+ { { 0x00B9 }, { 0,1,0 } }, /* SUP 1 */
+ { { 0x00BB }, { 0,1,0 } }, /* >> */
+ { { 0x00BC }, { 0,1,0 } }, /* 1/4 */
+ { { 0x00BD }, { 0,1,0 } }, /* 1/2 */
+ { { 0x00BE }, { 0,1,0 } }, /* 3/4 */
+ { { 0x00BF }, { 0,1,0 } }, /* UD ? */
+ { { 0x00C0 }, { 0,1,0 } }, /* A Grave */
+ { { 0x00D6 }, { 0,1,0 } }, /* O dia */
+ { { 0x00D7 }, { 0,1,0 } }, /* multipl. */
+ { { 0x00D8 }, { 0,1,0 } }, /* O stroke */
+ { { 0x00DF }, { 0,1,0 } }, /* small Sh */
+ { { 0x00E0 }, { 0,1,0 } }, /* a grave */
+ { { 0x00F6 }, { 0,1,0 } }, /* o dia */
+ { { 0x00F7 }, { 0,1,0 } }, /* division */
+ { { 0x00F8 }, { 0,1,0 } }, /* o stroke */
+ { { 0x00FF }, { 0,1,0 } }, /* y dia */
+ { .is_last = 1 } /* Last element. */
+ }
+ },
+ { TST_ISW_REC (enUS, digit)
+ {
+ { { WEOF }, { 0,1,0 } },
+ { { 0x0000 }, { 0,1,0 } },
+ { { 0x001F }, { 0,1,0 } },
+ { { 0x0020 }, { 0,1,0 } },
+ { { 0x0021 }, { 0,1,0 } },
+ { { 0x002F }, { 0,1,0 } },
+ { { 0x0030 }, { 0,0,0 } },
+ { { 0x0039 }, { 0,0,0 } },
+ { { 0x003A }, { 0,1,0 } },
+ { { 0x0040 }, { 0,1,0 } },
+ { { 0x0041 }, { 0,1,0 } },
+ { { 0x005A }, { 0,1,0 } },
+ { { 0x005B }, { 0,1,0 } },
+ { { 0x0060 }, { 0,1,0 } },
+ { { 0x0061 }, { 0,1,0 } },
+ { { 0x007A }, { 0,1,0 } },
+ { { 0x007B }, { 0,1,0 } },
+ { { 0x007E }, { 0,1,0 } },
+ { { 0x007F }, { 0,1,0 } },
+ { { 0x0080 }, { 0,1,0 } },
+ { .is_last = 1 } /* Last element. */
+ }
+ },
+#if 0
+ { TST_ISW_REC (eucJP, digit)
+#else
+ { TST_ISW_REC (ja_UTF8, digit)
+#endif
+ {
+ { { 0x3000 }, { 0,1,0 } }, /* IDEO. SPACE */
+ { { 0x3020 }, { 0,1,0 } }, /* POSTAL MARK FACE */
+ { { 0x3029 }, { 0,1,0 } }, /* Hangzhou NUM9 */
+ { { 0x302F }, { 0,1,0 } }, /* Diacritics(Hangul) */
+ { { 0x3037 }, { 0,1,0 } }, /* Separator Symbol */
+ { { 0x303F }, { 0,1,0 } }, /* IDEO. HALF SPACE */
+ { { 0x3041 }, { 0,1,0 } }, /* HIRAGANA a */
+ { { 0x3094 }, { 0,1,0 } }, /* HIRAGANA u" */
+ { { 0x3099 }, { 0,1,0 } }, /* SOUND MARK */
+ { { 0x309E }, { 0,1,0 } }, /* ITERATION MARK */
+ { { 0x30A1 }, { 0,1,0 } }, /* KATAKANA a */
+ { { 0x30FA }, { 0,1,0 } }, /* KATAKANA wo" */
+ { { 0x30FB }, { 0,1,0 } }, /* KATAKANA MID.DOT */
+ { { 0x30FE }, { 0,1,0 } }, /* KATAKANA ITERATION */
+ { { 0x3191 }, { 0,1,0 } }, /* KANBUN REV.MARK */
+ { { 0x3243 }, { 0,1,0 } }, /* IDEO. MARK (reach) */
+ { { 0x32CB }, { 0,1,0 } }, /* IDEO.TEL.SYM.DEC12 */
+ { { 0x32FE }, { 0,1,0 } }, /* MARU KATAKANA wo */
+ { { 0x33FE }, { 0,1,0 } }, /* CJK IDEO.TEL.31th */
+ { { 0x4E00 }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0x4E05 }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0x4E06 }, { 0,1,0 } }, /* CJK UNI.IDEO.NON-J */
+ { { 0x4E07 }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0x4FFF }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0x9000 }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0x9006 }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0x9007 }, { 0,1,0 } }, /* CJK UNI.IDEO.NON-J */
+ { { 0x9FA4 }, { 0,1,0 } }, /* CJK UNI.IDEO.NON-J */
+ { { 0x9FA5 }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0xFE4F }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0xFF0F }, { 0,1,0 } }, /* FULL SLASH */
+ { { 0xFF19 }, { 0,1,0 } }, /* FULL 9 */
+ { { 0xFF20 }, { 0,1,0 } }, /* FULL @ */
+ { { 0xFF3A }, { 0,1,0 } }, /* FULL Z */
+ { { 0xFF40 }, { 0,1,0 } }, /* FULL GRAVE ACC. */
+ { { 0xFF5A }, { 0,1,0 } }, /* FULL z */
+ { { 0xFF5E }, { 0,1,0 } }, /* FULL ~ (tilde) */
+ { { 0xFF61 }, { 0,1,0 } }, /* HALF IDEO.STOP. . */
+ { { 0xFF65 }, { 0,1,0 } }, /* HALF KATA MID.DOT */
+ { { 0xFF66 }, { 0,1,0 } }, /* HALF KATA WO */
+ { { 0xFF6F }, { 0,1,0 } }, /* HALF KATA tu */
+ { { 0xFF70 }, { 0,1,0 } }, /* HALF KATA PL - */
+ { { 0xFF71 }, { 0,1,0 } }, /* HALF KATA A */
+ { { 0xFF9E }, { 0,1,0 } }, /* HALF KATA MI */
+ { .is_last = 1 } /* Last element. */
+ }
+ },
+ { TST_ISW_REC (end, digit) }
+};
diff --git a/test/locale-mbwc/dat_iswgraph.c b/test/locale-mbwc/dat_iswgraph.c
new file mode 100644
index 000000000..80cacb2a3
--- /dev/null
+++ b/test/locale-mbwc/dat_iswgraph.c
@@ -0,0 +1,167 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: dat_iswgraph.c
+ *
+ * ISW*: int iswgraph (wint_t wc);
+ */
+
+
+#include "dat_isw-funcs.h"
+
+
+TST_ISW_LOC (GRAPH, graph) = {
+
+ { TST_ISW_REC (de, graph)
+ {
+ { { 0x0080 }, { 0,1,0 } }, /* CTRL */
+ { { 0x009F }, { 0,1,0 } }, /* CTRL */
+#ifdef SHOJI_IS_RIGHT
+ { { 0x00A0 }, { 0,1,0 } }, /* NB SPACE */
+#else
+ { { 0x00A0 }, { 0,0,0 } }, /* NB SPACE */
+#endif
+ { { 0x00A1 }, { 0,0,0 } }, /* UD ! */
+ { { 0x00B0 }, { 0,0,0 } }, /* Degree */
+ { { 0x00B1 }, { 0,0,0 } }, /* +- sign */
+ { { 0x00B2 }, { 0,0,0 } }, /* SUP 2 */
+ { { 0x00B3 }, { 0,0,0 } }, /* SUP 3 */
+ { { 0x00B4 }, { 0,0,0 } }, /* ACUTE */
+ { { 0x00B8 }, { 0,0,0 } }, /* CEDILLA */
+ { { 0x00B9 }, { 0,0,0 } }, /* SUP 1 */
+ { { 0x00BB }, { 0,0,0 } }, /* >> */
+ { { 0x00BC }, { 0,0,0 } }, /* 1/4 */
+ { { 0x00BD }, { 0,0,0 } }, /* 1/2 */
+ { { 0x00BE }, { 0,0,0 } }, /* 3/4 */
+ { { 0x00BF }, { 0,0,0 } }, /* UD ? */
+ { { 0x00C0 }, { 0,0,0 } }, /* A Grave */
+ { { 0x00D6 }, { 0,0,0 } }, /* O dia */
+ { { 0x00D7 }, { 0,0,0 } }, /* multipl. */
+ { { 0x00D8 }, { 0,0,0 } }, /* O stroke */
+ { { 0x00DF }, { 0,0,0 } }, /* small Sh */
+ { { 0x00E0 }, { 0,0,0 } }, /* a grave */
+ { { 0x00F6 }, { 0,0,0 } }, /* o dia */
+ { { 0x00F7 }, { 0,0,0 } }, /* division */
+ { { 0x00F8 }, { 0,0,0 } }, /* o stroke */
+ { { 0x00FF }, { 0,0,0 } }, /* y dia */
+ { .is_last = 1 } /* Last element. */
+ }
+ },
+ { TST_ISW_REC (enUS, graph)
+ {
+ { { WEOF }, { 0,1,0 } },
+ { { 0x0000 }, { 0,1,0 } },
+ { { 0x001F }, { 0,1,0 } },
+ { { 0x0020 }, { 0,1,0 } },
+ { { 0x0021 }, { 0,0,0 } },
+ { { 0x002F }, { 0,0,0 } },
+ { { 0x0030 }, { 0,0,0 } },
+ { { 0x0039 }, { 0,0,0 } },
+ { { 0x003A }, { 0,0,0 } },
+ { { 0x0040 }, { 0,0,0 } },
+ { { 0x0041 }, { 0,0,0 } },
+ { { 0x005A }, { 0,0,0 } },
+ { { 0x005B }, { 0,0,0 } },
+ { { 0x0060 }, { 0,0,0 } },
+ { { 0x0061 }, { 0,0,0 } },
+ { { 0x007A }, { 0,0,0 } },
+ { { 0x007B }, { 0,0,0 } },
+ { { 0x007E }, { 0,0,0 } },
+ { { 0x007F }, { 0,1,0 } },
+ { { 0x0080 }, { 0,1,0 } }, /* 20 */
+ { .is_last = 1 } /* Last element. */
+ }
+ },
+#if 0
+ { TST_ISW_REC( eucJP, graph )
+#else
+ { TST_ISW_REC( ja_UTF8, graph )
+#endif
+ {
+ { { 0x3000 }, { 0,1,0 } }, /* IDEO. SPACE */
+#ifdef SHOJI_IS_RIGHT
+ { { 0x3020 }, { 0,1,0 } }, /* POSTAL MARK FACE */
+ { { 0x3029 }, { 0,1,0 } }, /* Hangzhou NUM9 */
+ { { 0x302F }, { 0,1,0 } }, /* Diacritics(Hangul) */
+ { { 0x3037 }, { 0,1,0 } }, /* Separator Symbol */
+ { { 0x303F }, { 0,1,0 } }, /* IDEO. HALF SPACE */
+#else
+ { { 0x3020 }, { 0,0,0 } }, /* POSTAL MARK FACE */
+ { { 0x3029 }, { 0,0,0 } }, /* Hangzhou NUM9 */
+ { { 0x302F }, { 0,0,0 } }, /* Diacritics(Hangul) */
+ { { 0x3037 }, { 0,0,0 } }, /* Separator Symbol */
+ { { 0x303F }, { 0,0,0 } }, /* IDEO. HALF SPACE */
+#endif
+ { { 0x3041 }, { 0,0,0 } }, /* HIRAGANA a */
+#ifdef SHOJI_IS_RIGHT
+ { { 0x3094 }, { 0,1,0 } }, /* HIRAGANA u" */ /* non jis */
+ { { 0x3099 }, { 0,1,0 } }, /* SOUND MARK */
+#else
+ { { 0x3094 }, { 0,0,0 } }, /* HIRAGANA u" */ /* non jis */
+ { { 0x3099 }, { 0,0,0 } }, /* SOUND MARK */
+#endif
+ { { 0x309E }, { 0,0,0 } }, /* ITERATION MARK */ /* 10 */
+ { { 0x30A1 }, { 0,0,0 } }, /* KATAKANA a */
+#ifdef SHOJI_IS_RIGHT
+ { { 0x30FA }, { 0,1,0 } }, /* KATAKANA wo" */ /* non jis */
+#else
+ { { 0x30FA }, { 0,0,0 } }, /* KATAKANA wo" */ /* non jis */
+#endif
+ { { 0x30FB }, { 0,0,0 } }, /* KATAKANA MID.DOT */
+ { { 0x30FE }, { 0,0,0 } }, /* KATAKANA ITERATION */
+#ifdef SHOJI_IS_RIGHT
+ { { 0x3191 }, { 0,1,0 } }, /* KANBUN REV.MARK */
+ { { 0x3243 }, { 0,1,0 } }, /* IDEO. MARK (reach) */
+ { { 0x32CB }, { 0,1,0 } }, /* IDEO.TEL.SYM.DEC12 */
+ { { 0x32FE }, { 0,1,0 } }, /* MARU KATAKANA wo */
+ { { 0x33FE }, { 0,1,0 } }, /* CJK IDEO.TEL.31th */
+#else
+ { { 0x3191 }, { 0,0,0 } }, /* KANBUN REV.MARK */
+ { { 0x3243 }, { 0,0,0 } }, /* IDEO. MARK (reach) */
+ { { 0x32CB }, { 0,0,0 } }, /* IDEO.TEL.SYM.DEC12 */
+ { { 0x32FE }, { 0,0,0 } }, /* MARU KATAKANA wo */
+ { { 0x33FE }, { 0,0,0 } }, /* CJK IDEO.TEL.31th */
+#endif
+ { { 0x4E00 }, { 0,0,0 } }, /* CJK UNI.IDEO. */ /* 20 */
+ { { 0x4E05 }, { 0,0,0 } }, /* CJK UNI.IDEO. */
+#ifdef SHOJI_IS_RIGHT
+ { { 0x4E06 }, { 0,1,0 } }, /* CJK UNI.IDEO.NON-J */
+#else
+ { { 0x4E06 }, { 0,0,0 } }, /* CJK UNI.IDEO.NON-J */
+#endif
+ { { 0x4E07 }, { 0,0,0 } }, /* CJK UNI.IDEO. */
+ { { 0x4FFF }, { 0,0,0 } }, /* CJK UNI.IDEO. */
+ { { 0x9000 }, { 0,0,0 } }, /* CJK UNI.IDEO. */
+ { { 0x9006 }, { 0,0,0 } }, /* CJK UNI.IDEO. */
+#ifdef SHOJI_IS_RIGHT
+ { { 0x9007 }, { 0,1,0 } }, /* CJK UNI.IDEO.NON-J */
+ { { 0x9FA4 }, { 0,1,0 } }, /* CJK UNI.IDEO.NON-J */
+#else
+ { { 0x9007 }, { 0,0,0 } }, /* CJK UNI.IDEO.NON-J */
+ { { 0x9FA4 }, { 0,0,0 } }, /* CJK UNI.IDEO.NON-J */
+#endif
+ { { 0x9FA5 }, { 0,0,0 } }, /* CJK UNI.IDEO. */
+#ifdef SHOJI_IS_RIGHT
+ { { 0xFE4F }, { 0,1,0 } }, /* CJK Wave Low Line */ /* 30 */
+#else
+ { { 0xFE4F }, { 0,0,0 } }, /* CJK Wave Low Line */ /* 30 */
+#endif
+ { { 0xFF0F }, { 0,0,0 } }, /* FULL SLASH */
+ { { 0xFF19 }, { 0,0,0 } }, /* FULL 9 */
+ { { 0xFF20 }, { 0,0,0 } }, /* FULL @ */
+ { { 0xFF3A }, { 0,0,0 } }, /* FULL Z */
+ { { 0xFF40 }, { 0,0,0 } }, /* FULL GRAVE ACC. */
+ { { 0xFF5A }, { 0,0,0 } }, /* FULL z */
+ { { 0xFF5E }, { 0,0,0 } }, /* FULL ~ (tilde) */
+ { { 0xFF61 }, { 0,0,0 } }, /* HALF IDEO.STOP. . */
+ { { 0xFF65 }, { 0,0,0 } }, /* HALF KATA MID.DOT */
+ { { 0xFF66 }, { 0,0,0 } }, /* HALF KATA WO */
+ { { 0xFF6F }, { 0,0,0 } }, /* HALF KATA tu */
+ { { 0xFF70 }, { 0,0,0 } }, /* HALF KATA PL - */
+ { { 0xFF71 }, { 0,0,0 } }, /* HALF KATA A */
+ { { 0xFF9E }, { 0,0,0 } }, /* HALF KATA MI */
+ { .is_last = 1 } /* Last element. */
+ }
+ },
+ { TST_ISW_REC (end, graph) }
+};
diff --git a/test/locale-mbwc/dat_iswlower.c b/test/locale-mbwc/dat_iswlower.c
new file mode 100644
index 000000000..58ec08ed4
--- /dev/null
+++ b/test/locale-mbwc/dat_iswlower.c
@@ -0,0 +1,96 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: dat_iswlower.c
+ *
+ * ISW*: int iswlower (wint_t wc);
+ */
+
+
+#include "dat_isw-funcs.h"
+
+
+TST_ISW_LOC (LOWER, lower) = {
+
+ { TST_ISW_REC (de, lower)
+ {
+ { { 0x0080 }, { 0,1,0 } }, /* CTRL */
+ { { 0x009F }, { 0,1,0 } }, /* CTRL */
+ { { 0x00A0 }, { 0,1,0 } }, /* NB SPACE */
+ { { 0x00A1 }, { 0,1,0 } }, /* UD ! */
+ { { 0x00B0 }, { 0,1,0 } }, /* Degree */
+ { { 0x00B1 }, { 0,1,0 } }, /* +- sign */
+ { { 0x00B2 }, { 0,1,0 } }, /* SUP 2 */
+ { { 0x00B3 }, { 0,1,0 } }, /* SUP 3 */
+ { { 0x00B4 }, { 0,1,0 } }, /* ACUTE */
+ { { 0x00B8 }, { 0,1,0 } }, /* CEDILLA */
+ { { 0x00B9 }, { 0,1,0 } }, /* SUP 1 */
+ { { 0x00BB }, { 0,1,0 } }, /* >> */
+ { { 0x00BC }, { 0,1,0 } }, /* 1/4 */
+ { { 0x00BD }, { 0,1,0 } }, /* 1/2 */
+ { { 0x00BE }, { 0,1,0 } }, /* 3/4 */
+ { { 0x00BF }, { 0,1,0 } }, /* UD ? */
+ { { 0x00C0 }, { 0,1,0 } }, /* A Grave */
+ { { 0x00D6 }, { 0,1,0 } }, /* O dia */
+ { { 0x00D7 }, { 0,1,0 } }, /* multipl. */
+ { { 0x00D8 }, { 0,1,0 } }, /* O stroke */
+ { { 0x00DF }, { 0,0,0 } }, /* small Sh */
+ { { 0x00E0 }, { 0,0,0 } }, /* a grave */
+ { { 0x00F6 }, { 0,0,0 } }, /* o dia */
+ { { 0x00F7 }, { 0,1,0 } }, /* division */
+ { { 0x00F8 }, { 0,0,0 } }, /* o stroke */
+ { { 0x00FF }, { 0,0,0 } }, /* y dia */
+ { .is_last = 1 } /* Last element. */
+ }
+ },
+ { TST_ISW_REC (enUS, lower)
+ {
+ { { WEOF }, { 0,1,0 } },
+ { { 0x0000 }, { 0,1,0 } },
+ { { 0x001F }, { 0,1,0 } },
+ { { 0x0020 }, { 0,1,0 } },
+ { { 0x0021 }, { 0,1,0 } },
+ { { 0x002F }, { 0,1,0 } },
+ { { 0x0030 }, { 0,1,0 } },
+ { { 0x0039 }, { 0,1,0 } },
+ { { 0x003A }, { 0,1,0 } },
+ { { 0x0040 }, { 0,1,0 } },
+ { { 0x0041 }, { 0,1,0 } },
+ { { 0x005A }, { 0,1,0 } },
+ { { 0x005B }, { 0,1,0 } },
+ { { 0x0060 }, { 0,1,0 } },
+ { { 0x0061 }, { 0,0,0 } },
+ { { 0x007A }, { 0,0,0 } },
+ { { 0x007B }, { 0,1,0 } },
+ { { 0x007E }, { 0,1,0 } },
+ { { 0x007F }, { 0,1,0 } },
+ { { 0x0080 }, { 0,1,0 } },
+ { .is_last = 1 } /* Last element. */
+ }
+ },
+#if 0
+ { TST_ISW_REC (eucJP, lower)
+#else
+ { TST_ISW_REC (ja_UTF8, lower)
+#endif
+ {
+ { { 0x3000 }, { 0,1,0 } }, /* IDEO. SPACE */
+ { { 0x303F }, { 0,1,0 } }, /* IDEO. HALF SPACE */
+ { { 0x3041 }, { 0,1,0 } }, /* HIRAGANA a */
+ { { 0x3094 }, { 0,1,0 } }, /* HIRAGANA u" */
+ { { 0x3099 }, { 0,1,0 } }, /* SOUND MARK */
+ { { 0x309E }, { 0,1,0 } }, /* ITERATION MARK */
+ { { 0x30A1 }, { 0,1,0 } }, /* KATAKANA a */
+ { { 0x30FA }, { 0,1,0 } }, /* KATAKANA wo" */
+ { { 0xFF3A }, { 0,1,0 } }, /* FULL Z */
+ { { 0xFF40 }, { 0,1,0 } }, /* FULL GRAVE ACC. */
+ { { 0xFF5A }, { 0,0,0 } }, /* FULL z */
+ { { 0xFF6F }, { 0,1,0 } }, /* HALF KATA tu */
+ { { 0xFF71 }, { 0,1,0 } }, /* HALF KATA A */
+ { { 0xFF9E }, { 0,1,0 } }, /* HALF KATA MI */
+ { .is_last = 1 } /* Last element. */
+ }
+ },
+ { TST_ISW_REC (end, lower) }
+
+};
diff --git a/test/locale-mbwc/dat_iswprint.c b/test/locale-mbwc/dat_iswprint.c
new file mode 100644
index 000000000..bcd96d059
--- /dev/null
+++ b/test/locale-mbwc/dat_iswprint.c
@@ -0,0 +1,170 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: dat_iswprint.c
+ *
+ * ISW*: int iswprint (wint_t wc);
+ */
+
+
+#include "dat_isw-funcs.h"
+
+
+TST_ISW_LOC (PRINT, print) = {
+
+ { TST_ISW_REC (de, print)
+ {
+ { { 0x0080 }, { 0,1,0 } }, /* CTRL */
+ { { 0x009F }, { 0,1,0 } }, /* CTRL */
+#ifdef SHOJI_IS_RIGHT
+ { { 0x00A0 }, { 0,1,0 } }, /* NB SPACE */
+#else
+ { { 0x00A0 }, { 0,0,0 } }, /* NB SPACE */
+#endif
+ { { 0x00A1 }, { 0,0,0 } }, /* UD ! */
+ { { 0x00B0 }, { 0,0,0 } }, /* Degree */
+ { { 0x00B1 }, { 0,0,0 } }, /* +- sign */
+ { { 0x00B2 }, { 0,0,0 } }, /* SUP 2 */
+ { { 0x00B3 }, { 0,0,0 } }, /* SUP 3 */
+ { { 0x00B4 }, { 0,0,0 } }, /* ACUTE */
+ { { 0x00B8 }, { 0,0,0 } }, /* CEDILLA */
+ { { 0x00B9 }, { 0,0,0 } }, /* SUP 1 */
+ { { 0x00BB }, { 0,0,0 } }, /* >> */
+ { { 0x00BC }, { 0,0,0 } }, /* 1/4 */
+ { { 0x00BD }, { 0,0,0 } }, /* 1/2 */
+ { { 0x00BE }, { 0,0,0 } }, /* 3/4 */
+ { { 0x00BF }, { 0,0,0 } }, /* UD ? */
+ { { 0x00C0 }, { 0,0,0 } }, /* A Grave */
+ { { 0x00D6 }, { 0,0,0 } }, /* O dia */
+ { { 0x00D7 }, { 0,0,0 } }, /* multipl. */
+ { { 0x00D8 }, { 0,0,0 } }, /* O stroke */
+ { { 0x00DF }, { 0,0,0 } }, /* small Sh */
+ { { 0x00E0 }, { 0,0,0 } }, /* a grave */
+ { { 0x00F6 }, { 0,0,0 } }, /* o dia */
+ { { 0x00F7 }, { 0,0,0 } }, /* division */
+ { { 0x00F8 }, { 0,0,0 } }, /* o stroke */
+ { { 0x00FF }, { 0,0,0 } }, /* y dia */
+ { .is_last = 1 } /* Last element. */
+ }
+ },
+ { TST_ISW_REC (enUS, print)
+ {
+ { { WEOF }, { 0,1,0 } }, /* 01 */
+ { { 0x0000 }, { 0,1,0 } },
+ { { 0x001F }, { 0,1,0 } },
+ { { 0x0020 }, { 0,0,0 } },
+ { { 0x0021 }, { 0,0,0 } },
+ { { 0x002F }, { 0,0,0 } },
+ { { 0x0030 }, { 0,0,0 } },
+ { { 0x0039 }, { 0,0,0 } },
+ { { 0x003A }, { 0,0,0 } },
+ { { 0x0040 }, { 0,0,0 } },
+ { { 0x0041 }, { 0,0,0 } },
+ { { 0x005A }, { 0,0,0 } },
+ { { 0x005B }, { 0,0,0 } },
+ { { 0x0060 }, { 0,0,0 } },
+ { { 0x0061 }, { 0,0,0 } },
+ { { 0x007A }, { 0,0,0 } },
+ { { 0x007B }, { 0,0,0 } },
+ { { 0x007E }, { 0,0,0 } },
+ { { 0x007F }, { 0,1,0 } },
+ { { 0x0080 }, { 0,1,0 } }, /* 20 */
+#ifdef NO_WAIVER
+ { { 0x3042 }, { 0,1,0 } }, /* <WAIVER> */
+#endif
+ { .is_last = 1 } /* Last element. */
+ }
+ },
+#if 0
+ { TST_ISW_REC (eucJP, print)
+#else
+ { TST_ISW_REC (ja_UTF8, print)
+#endif
+ {
+ { { 0x3000 }, { 0,0,0 } }, /* IDEO. SPACE */
+#ifdef SHOJI_IS_RIGHT
+ { { 0x3020 }, { 0,1,0 } }, /* POSTAL MARK FACE */
+ { { 0x3029 }, { 0,1,0 } }, /* Hangzhou NUM9 */
+ { { 0x302F }, { 0,1,0 } }, /* Diacritics(Hangul) */
+ { { 0x3037 }, { 0,1,0 } }, /* Separator Symbol */
+ { { 0x303F }, { 0,1,0 } }, /* IDEO. HALF SPACE */
+#else
+ { { 0x3020 }, { 0,0,0 } }, /* POSTAL MARK FACE */
+ { { 0x3029 }, { 0,0,0 } }, /* Hangzhou NUM9 */
+ { { 0x302F }, { 0,0,0 } }, /* Diacritics(Hangul) */
+ { { 0x3037 }, { 0,0,0 } }, /* Separator Symbol */
+ { { 0x303F }, { 0,0,0 } }, /* IDEO. HALF SPACE */
+#endif
+ { { 0x3041 }, { 0,0,0 } }, /* HIRAGANA a */
+#ifdef SHOJI_IS_RIGHT
+ { { 0x3094 }, { 0,1,0 } }, /* HIRAGANA u" */ /* non jis */
+ { { 0x3099 }, { 0,1,0 } }, /* SOUND MARK */
+#else
+ { { 0x3094 }, { 0,0,0 } }, /* HIRAGANA u" */ /* non jis */
+ { { 0x3099 }, { 0,0,0 } }, /* SOUND MARK */
+#endif
+ { { 0x309E }, { 0,0,0 } }, /* ITERATION MARK */ /* 10 */
+ { { 0x30A1 }, { 0,0,0 } }, /* KATAKANA a */
+#ifdef SHOJI_IS_RIGHT
+ { { 0x30FA }, { 0,1,0 } }, /* KATAKANA wo" */ /* non jis */
+#else
+ { { 0x30FA }, { 0,0,0 } }, /* KATAKANA wo" */ /* non jis */
+#endif
+ { { 0x30FB }, { 0,0,0 } }, /* KATAKANA MID.DOT */
+ { { 0x30FE }, { 0,0,0 } }, /* KATAKANA ITERATION */
+#ifdef SHOJI_IS_RIGHT
+ { { 0x3191 }, { 0,1,0 } }, /* KANBUN REV.MARK */
+ { { 0x3243 }, { 0,1,0 } }, /* IDEO. MARK (reach) */
+ { { 0x32CB }, { 0,1,0 } }, /* IDEO.TEL.SYM.DEC12 */
+ { { 0x32FE }, { 0,1,0 } }, /* MARU KATAKANA wo */
+ { { 0x33FE }, { 0,1,0 } }, /* CJK IDEO.TEL.31th */
+#else
+ { { 0x3191 }, { 0,0,0 } }, /* KANBUN REV.MARK */
+ { { 0x3243 }, { 0,0,0 } }, /* IDEO. MARK (reach) */
+ { { 0x32CB }, { 0,0,0 } }, /* IDEO.TEL.SYM.DEC12 */
+ { { 0x32FE }, { 0,0,0 } }, /* MARU KATAKANA wo */
+ { { 0x33FE }, { 0,0,0 } }, /* CJK IDEO.TEL.31th */
+#endif
+ { { 0x4E00 }, { 0,0,0 } }, /* CJK UNI.IDEO. */ /* 20 */
+ { { 0x4E05 }, { 0,0,0 } }, /* CJK UNI.IDEO. */
+#ifdef SHOJI_IS_RIGHT
+ { { 0x4E06 }, { 0,1,0 } }, /* CJK UNI.IDEO.NON-J */
+#else
+ { { 0x4E06 }, { 0,0,0 } }, /* CJK UNI.IDEO.NON-J */
+#endif
+ { { 0x4E07 }, { 0,0,0 } }, /* CJK UNI.IDEO. */
+ { { 0x4FFF }, { 0,0,0 } }, /* CJK UNI.IDEO. */
+ { { 0x9000 }, { 0,0,0 } }, /* CJK UNI.IDEO. */
+ { { 0x9006 }, { 0,0,0 } }, /* CJK UNI.IDEO. */
+#ifdef SHOJI_IS_RIGHT
+ { { 0x9007 }, { 0,1,0 } }, /* CJK UNI.IDEO.NON-J */
+ { { 0x9FA4 }, { 0,1,0 } }, /* CJK UNI.IDEO.NON-J */
+#else
+ { { 0x9007 }, { 0,0,0 } }, /* CJK UNI.IDEO.NON-J */
+ { { 0x9FA4 }, { 0,0,0 } }, /* CJK UNI.IDEO.NON-J */
+#endif
+ { { 0x9FA5 }, { 0,0,0 } }, /* CJK UNI.IDEO. */
+#ifdef SHOJI_IS_RIGHT
+ { { 0xFE4F }, { 0,1,0 } }, /* WAVE LOW LINE */ /* 30 */
+#else
+ { { 0xFE4F }, { 0,0,0 } }, /* WAVE LOW LINE */ /* 30 */
+#endif
+ { { 0xFF0F }, { 0,0,0 } }, /* FULL SLASH */
+ { { 0xFF19 }, { 0,0,0 } }, /* FULL 9 */
+ { { 0xFF20 }, { 0,0,0 } }, /* FULL @ */
+ { { 0xFF3A }, { 0,0,0 } }, /* FULL Z */
+ { { 0xFF40 }, { 0,0,0 } }, /* FULL GRAVE ACC. */
+ { { 0xFF5A }, { 0,0,0 } }, /* FULL z */
+ { { 0xFF5E }, { 0,0,0 } }, /* FULL ~ (tilde) */
+ { { 0xFF61 }, { 0,0,0 } }, /* HALF IDEO.STOP. . */
+ { { 0xFF65 }, { 0,0,0 } }, /* HALF KATA MID.DOT */
+ { { 0xFF66 }, { 0,0,0 } }, /* HALF KATA WO */ /* 40 */
+ { { 0xFF6F }, { 0,0,0 } }, /* HALF KATA tu */
+ { { 0xFF70 }, { 0,0,0 } }, /* HALF KATA PL - */
+ { { 0xFF71 }, { 0,0,0 } }, /* HALF KATA A */
+ { { 0xFF9E }, { 0,0,0 } }, /* HALF KATA MI */
+ { .is_last = 1 } /* Last element. */
+ }
+ },
+ { TST_ISW_REC (end, print) }
+};
diff --git a/test/locale-mbwc/dat_iswpunct.c b/test/locale-mbwc/dat_iswpunct.c
new file mode 100644
index 000000000..2b3612ff8
--- /dev/null
+++ b/test/locale-mbwc/dat_iswpunct.c
@@ -0,0 +1,155 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: dat_iswpunct.c
+ *
+ * ISW*: int iswpunct (wint_t wc);
+ */
+
+
+#include "dat_isw-funcs.h"
+
+
+TST_ISW_LOC (PUNCT, punct) = {
+
+ { TST_ISW_REC (de, punct)
+ {
+ { { 0x0080 }, { 0,1,0 } }, /* CTRL */
+ { { 0x009F }, { 0,1,0 } }, /* CTRL */
+#ifdef SHOJI_IS_RIGHT
+ { { 0x00A0 }, { 0,1,0 } }, /* NB SPACE */
+#else
+ { { 0x00A0 }, { 0,0,0 } }, /* NB SPACE */
+#endif
+ { { 0x00A1 }, { 0,0,0 } }, /* UD ! */
+ { { 0x00B0 }, { 0,0,0 } }, /* Degree */
+ { { 0x00B1 }, { 0,0,0 } }, /* +- sign */
+ { { 0x00B2 }, { 0,0,0 } }, /* SUP 2 */
+ { { 0x00B3 }, { 0,0,0 } }, /* SUP 3 */
+ { { 0x00B4 }, { 0,0,0 } }, /* ACUTE */
+ { { 0x00B8 }, { 0,0,0 } }, /* CEDILLA */
+ { { 0x00B9 }, { 0,0,0 } }, /* SUP 1 */
+ { { 0x00BB }, { 0,0,0 } }, /* >> */
+ { { 0x00BC }, { 0,0,0 } }, /* 1/4 */
+ { { 0x00BD }, { 0,0,0 } }, /* 1/2 */
+ { { 0x00BE }, { 0,0,0 } }, /* 3/4 */
+ { { 0x00BF }, { 0,0,0 } }, /* UD ? */
+ { { 0x00C0 }, { 0,1,0 } }, /* A Grave */
+ { { 0x00D6 }, { 0,1,0 } }, /* O dia */
+ { { 0x00D7 }, { 0,0,0 } }, /* multipl. */
+ { { 0x00D8 }, { 0,1,0 } }, /* O stroke */
+ { { 0x00DF }, { 0,1,0 } }, /* small Sh */
+ { { 0x00E0 }, { 0,1,0 } }, /* a grave */
+ { { 0x00F6 }, { 0,1,0 } }, /* o dia */
+ { { 0x00F7 }, { 0,0,0 } }, /* division */
+ { { 0x00F8 }, { 0,1,0 } }, /* o stroke */
+ { { 0x00FF }, { 0,1,0 } }, /* y dia */
+ { .is_last = 1 } /* Last element. */
+ }
+ },
+ { TST_ISW_REC (enUS, punct)
+ {
+ { { WEOF }, { 0,1,0 } }, /* 01 */
+ { { 0x0000 }, { 0,1,0 } },
+ { { 0x001F }, { 0,1,0 } },
+ { { 0x0020 }, { 0,1,0 } },
+ { { 0x0021 }, { 0,0,0 } },
+ { { 0x002F }, { 0,0,0 } },
+ { { 0x0030 }, { 0,1,0 } },
+ { { 0x0039 }, { 0,1,0 } },
+ { { 0x003A }, { 0,0,0 } },
+ { { 0x0040 }, { 0,0,0 } },
+ { { 0x0041 }, { 0,1,0 } },
+ { { 0x005A }, { 0,1,0 } },
+ { { 0x005B }, { 0,0,0 } },
+ { { 0x0060 }, { 0,0,0 } },
+ { { 0x0061 }, { 0,1,0 } },
+ { { 0x007A }, { 0,1,0 } },
+ { { 0x007B }, { 0,0,0 } },
+ { { 0x007E }, { 0,0,0 } },
+ { { 0x007F }, { 0,1,0 } },
+ { { 0x0080 }, { 0,1,0 } }, /* 20 */
+ { .is_last = 1 } /* Last element. */
+ }
+ },
+#if 0
+ { TST_ISW_REC (eucJP, punct)
+#else
+ { TST_ISW_REC (ja_UTF8, punct)
+#endif
+ {
+ { { 0x3000 }, { 0,1,0 } }, /* IDEO. SPACE */
+#ifdef SHOJI_IS_RIGHT
+ { { 0x3020 }, { 0,1,0 } }, /* POSTAL MARK FACE */
+#else
+ { { 0x3020 }, { 0,0,0 } }, /* POSTAL MARK FACE */
+#endif
+ { { 0x3029 }, { 0,1,0 } }, /* Hangzhou NUM9 */
+#ifdef SHOJI_IS_RIGHT
+ { { 0x302F }, { 0,1,0 } }, /* Diacritics(Hangul) */
+ { { 0x3037 }, { 0,1,0 } }, /* Separator Symbol */
+ { { 0x303F }, { 0,1,0 } }, /* IDEO. HALF SPACE */
+#else
+ { { 0x302F }, { 0,0,0 } }, /* Diacritics(Hangul) */
+ { { 0x3037 }, { 0,0,0 } }, /* Separator Symbol */
+ { { 0x303F }, { 0,0,0 } }, /* IDEO. HALF SPACE */
+#endif
+ { { 0x3041 }, { 0,1,0 } }, /* HIRAGANA a */
+ { { 0x3094 }, { 0,1,0 } }, /* HIRAGANA u" */
+#ifdef SHOJI_IS_RIGHT
+ { { 0x3099 }, { 0,1,0 } }, /* SOUND MARK */
+#else
+ { { 0x3099 }, { 0,0,0 } }, /* SOUND MARK */
+#endif
+ { { 0x309E }, { 0,1,0 } }, /* ITERATION MARK */ /* 10 */
+ { { 0x30A1 }, { 0,1,0 } }, /* KATAKANA a */
+ { { 0x30FA }, { 0,1,0 } }, /* KATAKANA wo" */
+ { { 0x30FB }, { 0,0,0 } }, /* KATAKANA MID.DOT */
+ { { 0x30FE }, { 0,1,0 } }, /* KATAKANA ITERATION */
+#ifdef SHOJI_IS_RIGHT
+ { { 0x3191 }, { 0,1,0 } }, /* KANBUN REV.MARK */
+ { { 0x3243 }, { 0,1,0 } }, /* IDEO. MARK (reach) */
+ { { 0x32CB }, { 0,1,0 } }, /* IDEO.TEL.SYM.DEC12 */
+ { { 0x32FE }, { 0,1,0 } }, /* MARU KATAKANA wo */
+ { { 0x33FE }, { 0,1,0 } }, /* CJK IDEO.TEL.31th */
+#else
+ { { 0x3191 }, { 0,0,0 } }, /* KANBUN REV.MARK */
+ { { 0x3243 }, { 0,0,0 } }, /* IDEO. MARK (reach) */
+ { { 0x32CB }, { 0,0,0 } }, /* IDEO.TEL.SYM.DEC12 */
+ { { 0x32FE }, { 0,0,0 } }, /* MARU KATAKANA wo */
+ { { 0x33FE }, { 0,0,0 } }, /* CJK IDEO.TEL.31th */
+#endif
+ { { 0x4E00 }, { 0,1,0 } }, /* CJK UNI.IDEO. */ /* 20 */
+ { { 0x4E05 }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0x4E06 }, { 0,1,0 } }, /* CJK UNI.IDEO.NON-J */
+ { { 0x4E07 }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0x4FFF }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0x9000 }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0x9006 }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0x9007 }, { 0,1,0 } }, /* CJK UNI.IDEO.NON-J */
+ { { 0x9FA4 }, { 0,1,0 } }, /* CJK UNI.IDEO.NON-J */
+ { { 0x9FA5 }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+#ifdef SHOJI_IS_RIGHT
+ { { 0xFE4F }, { 0,1,0 } }, /* CJK UNI.IDEO. */ /* 30 */
+#else
+ { { 0xFE4F }, { 0,0,0 } }, /* CJK UNI.IDEO. */ /* 30 */
+#endif
+ { { 0xFF0F }, { 0,0,0 } }, /* FULL SLASH */
+ { { 0xFF19 }, { 0,1,0 } }, /* FULL 9 */
+ { { 0xFF20 }, { 0,0,0 } }, /* FULL @ */
+ { { 0xFF3A }, { 0,1,0 } }, /* FULL Z */
+ { { 0xFF40 }, { 0,0,0 } }, /* FULL GRAVE ACC. */
+ { { 0xFF5A }, { 0,1,0 } }, /* FULL z */
+ { { 0xFF5E }, { 0,0,0 } }, /* FULL ~ (tilde) */
+ { { 0xFF61 }, { 0,0,0 } }, /* HALF IDEO.STOP. . */
+ { { 0xFF65 }, { 0,0,0 } }, /* HALF KATA MID.DOT */
+ { { 0xFF66 }, { 0,1,0 } }, /* HALF KATA WO */ /* 40 */
+ { { 0xFF6F }, { 0,1,0 } }, /* HALF KATA tu */
+ { { 0xFF70 }, { 0,1,0 } }, /* HALF KATA PL - */
+ { { 0xFF71 }, { 0,1,0 } }, /* HALF KATA A */
+ { { 0xFF9E }, { 0,1,0 } }, /* HALF KATA MI */
+ { .is_last = 1 } /* Last element. */
+ }
+ },
+ { TST_ISW_REC (end, punct) }
+};
diff --git a/test/locale-mbwc/dat_iswspace.c b/test/locale-mbwc/dat_iswspace.c
new file mode 100644
index 000000000..2131b87ae
--- /dev/null
+++ b/test/locale-mbwc/dat_iswspace.c
@@ -0,0 +1,129 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: dat_iswspace.c
+ *
+ * ISW*: int iswspace (wint_t wc);
+ */
+
+
+#include "dat_isw-funcs.h"
+
+
+TST_ISW_LOC (SPACE, space) = {
+
+ { TST_ISW_REC (de, space)
+ {
+ { { 0x0080 }, { 0,1,0 } }, /* CTRL */
+ { { 0x009F }, { 0,1,0 } }, /* CTRL */
+ { { 0x00A0 }, { 0,1,0 } }, /* NB SPACE */
+ { { 0x00A1 }, { 0,1,0 } }, /* UD ! */
+ { { 0x00B0 }, { 0,1,0 } }, /* Degree */
+ { { 0x00B1 }, { 0,1,0 } }, /* +- sign */
+ { { 0x00B2 }, { 0,1,0 } }, /* SUP 2 */
+ { { 0x00B3 }, { 0,1,0 } }, /* SUP 3 */
+ { { 0x00B4 }, { 0,1,0 } }, /* ACUTE */
+ { { 0x00B8 }, { 0,1,0 } }, /* CEDILLA */
+ { { 0x00B9 }, { 0,1,0 } }, /* SUP 1 */
+ { { 0x00BB }, { 0,1,0 } }, /* >> */
+ { { 0x00BC }, { 0,1,0 } }, /* 1/4 */
+ { { 0x00BD }, { 0,1,0 } }, /* 1/2 */
+ { { 0x00BE }, { 0,1,0 } }, /* 3/4 */
+ { { 0x00BF }, { 0,1,0 } }, /* UD ? */
+ { { 0x00C0 }, { 0,1,0 } }, /* A Grave */
+ { { 0x00D6 }, { 0,1,0 } }, /* O dia */
+ { { 0x00D7 }, { 0,1,0 } }, /* multipl. */
+ { { 0x00D8 }, { 0,1,0 } }, /* O stroke */
+ { { 0x00DF }, { 0,1,0 } }, /* small Sh */
+ { { 0x00E0 }, { 0,1,0 } }, /* a grave */
+ { { 0x00F6 }, { 0,1,0 } }, /* o dia */
+ { { 0x00F7 }, { 0,1,0 } }, /* division */
+ { { 0x00F8 }, { 0,1,0 } }, /* o stroke */
+ { { 0x00FF }, { 0,1,0 } }, /* y dia */
+ { .is_last = 1 } /* Last element. */
+ }
+ },
+ { TST_ISW_REC (enUS, space)
+ {
+ { { WEOF }, { 0,1,0 } },
+ { { 0x0000 }, { 0,1,0 } },
+ { { 0x0008 }, { 0,1,0 } },
+ { { 0x0009 }, { 0,0,0 } },
+ { { 0x000D }, { 0,0,0 } },
+ { { 0x000E }, { 0,1,0 } },
+ { { 0x001F }, { 0,1,0 } },
+ { { 0x0020 }, { 0,0,0 } },
+ { { 0x0021 }, { 0,1,0 } },
+ { { 0x002F }, { 0,1,0 } },
+ { { 0x0030 }, { 0,1,0 } },
+ { { 0x0039 }, { 0,1,0 } },
+ { { 0x003A }, { 0,1,0 } },
+ { { 0x0040 }, { 0,1,0 } },
+ { { 0x0041 }, { 0,1,0 } },
+ { { 0x005A }, { 0,1,0 } },
+ { { 0x005B }, { 0,1,0 } },
+ { { 0x0060 }, { 0,1,0 } },
+ { { 0x0061 }, { 0,1,0 } },
+ { { 0x007A }, { 0,1,0 } }, /* 20 */
+ { { 0x007B }, { 0,1,0 } },
+ { { 0x007E }, { 0,1,0 } },
+ { { 0x007F }, { 0,1,0 } },
+ { { 0x0080 }, { 0,1,0 } },
+ { .is_last = 1 } /* Last element. */
+ }
+ },
+#if 0
+ { TST_ISW_REC (eucJP, space)
+#else
+ { TST_ISW_REC (ja_UTF8, space)
+#endif
+ {
+ { { 0x3000 }, { 0,0,0 } }, /* IDEO. SPACE */
+ { { 0x3020 }, { 0,1,0 } }, /* POSTAL MARK FACE */
+ { { 0x3029 }, { 0,1,0 } }, /* Hangzhou NUM9 */
+ { { 0x302F }, { 0,1,0 } }, /* Diacritics(Hangul) */
+ { { 0x3037 }, { 0,1,0 } }, /* Separator Symbol */
+ { { 0x303F }, { 0,1,0 } }, /* IDEO. HALF SPACE */ /* No JIS */
+ { { 0x3041 }, { 0,1,0 } }, /* HIRAGANA a */
+ { { 0x3094 }, { 0,1,0 } }, /* HIRAGANA u" */
+ { { 0x3099 }, { 0,1,0 } }, /* SOUND MARK */
+ { { 0x309E }, { 0,1,0 } }, /* ITERATION MARK */
+ { { 0x30A1 }, { 0,1,0 } }, /* KATAKANA a */
+ { { 0x30FA }, { 0,1,0 } }, /* KATAKANA wo" */
+ { { 0x30FB }, { 0,1,0 } }, /* KATAKANA MID.DOT */
+ { { 0x30FE }, { 0,1,0 } }, /* KATAKANA ITERATION */
+ { { 0x3191 }, { 0,1,0 } }, /* KANBUN REV.MARK */
+ { { 0x3243 }, { 0,1,0 } }, /* IDEO. MARK (reach) */
+ { { 0x32CB }, { 0,1,0 } }, /* IDEO.TEL.SYM.DEC12 */
+ { { 0x32FE }, { 0,1,0 } }, /* MARU KATAKANA wo */
+ { { 0x33FE }, { 0,1,0 } }, /* CJK IDEO.TEL.31th */
+ { { 0x4E00 }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0x4E05 }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0x4E06 }, { 0,1,0 } }, /* CJK UNI.IDEO.NON-J */
+ { { 0x4E07 }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0x4FFF }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0x9000 }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0x9006 }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0x9007 }, { 0,1,0 } }, /* CJK UNI.IDEO.NON-J */
+ { { 0x9FA4 }, { 0,1,0 } }, /* CJK UNI.IDEO.NON-J */
+ { { 0x9FA5 }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0xFE4F }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0xFF0F }, { 0,1,0 } }, /* FULL SLASH */
+ { { 0xFF19 }, { 0,1,0 } }, /* FULL 9 */
+ { { 0xFF20 }, { 0,1,0 } }, /* FULL @ */
+ { { 0xFF3A }, { 0,1,0 } }, /* FULL Z */
+ { { 0xFF40 }, { 0,1,0 } }, /* FULL GRAVE ACC. */
+ { { 0xFF5A }, { 0,1,0 } }, /* FULL z */
+ { { 0xFF5E }, { 0,1,0 } }, /* FULL ~ (tilde) */
+ { { 0xFF61 }, { 0,1,0 } }, /* HALF IDEO.STOP. . */
+ { { 0xFF65 }, { 0,1,0 } }, /* HALF KATA MID.DOT */
+ { { 0xFF66 }, { 0,1,0 } }, /* HALF KATA WO */
+ { { 0xFF6F }, { 0,1,0 } }, /* HALF KATA tu */
+ { { 0xFF70 }, { 0,1,0 } }, /* HALF KATA PL - */
+ { { 0xFF71 }, { 0,1,0 } }, /* HALF KATA A */
+ { { 0xFF9E }, { 0,1,0 } }, /* HALF KATA MI */
+ { .is_last = 1 } /* Last element. */
+ }
+ },
+ { TST_ISW_REC (end, space) }
+};
diff --git a/test/locale-mbwc/dat_iswupper.c b/test/locale-mbwc/dat_iswupper.c
new file mode 100644
index 000000000..865f42fe5
--- /dev/null
+++ b/test/locale-mbwc/dat_iswupper.c
@@ -0,0 +1,94 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: dat_iswupper.c
+ *
+ * ISW*: int iswupper (wint_t wc);
+ */
+
+
+#include "dat_isw-funcs.h"
+
+
+TST_ISW_LOC (UPPER, upper) = {
+
+ { TST_ISW_REC (de, upper)
+ {
+ { { 0x0080 }, { 0,1,0 } }, /* CTRL */
+ { { 0x009F }, { 0,1,0 } }, /* CTRL */
+ { { 0x00A0 }, { 0,1,0 } }, /* NB SPACE */
+ { { 0x00A1 }, { 0,1,0 } }, /* UD ! */
+ { { 0x00B0 }, { 0,1,0 } }, /* Degree */
+ { { 0x00B1 }, { 0,1,0 } }, /* +- sign */
+ { { 0x00B2 }, { 0,1,0 } }, /* SUP 2 */
+ { { 0x00B3 }, { 0,1,0 } }, /* SUP 3 */
+ { { 0x00B4 }, { 0,1,0 } }, /* ACUTE */
+ { { 0x00B8 }, { 0,1,0 } }, /* CEDILLA */
+ { { 0x00B9 }, { 0,1,0 } }, /* SUP 1 */
+ { { 0x00BB }, { 0,1,0 } }, /* >> */
+ { { 0x00BC }, { 0,1,0 } }, /* 1/4 */
+ { { 0x00BD }, { 0,1,0 } }, /* 1/2 */
+ { { 0x00BE }, { 0,1,0 } }, /* 3/4 */
+ { { 0x00BF }, { 0,1,0 } }, /* UD ? */
+ { { 0x00C0 }, { 0,0,0 } }, /* A Grave */
+ { { 0x00D6 }, { 0,0,0 } }, /* O dia */
+ { { 0x00D7 }, { 0,1,0 } }, /* multipl. */
+ { { 0x00D8 }, { 0,0,0 } }, /* O stroke */
+ { { 0x00DF }, { 0,1,0 } }, /* small Sh */
+ { { 0x00E0 }, { 0,1,0 } }, /* a grave */
+ { { 0x00F6 }, { 0,1,0 } }, /* o dia */
+ { { 0x00F7 }, { 0,1,0 } }, /* division */
+ { { 0x00F8 }, { 0,1,0 } }, /* o stroke */
+ { { 0x00FF }, { 0,1,0 } }, /* y dia */
+ { .is_last = 1 } /* Last entry. */
+ }
+ },
+ { TST_ISW_REC (enUS, upper)
+ {
+ { { WEOF }, { 0,1,0 } },
+ { { 0x0000 }, { 0,1,0 } },
+ { { 0x001F }, { 0,1,0 } },
+ { { 0x0020 }, { 0,1,0 } },
+ { { 0x0021 }, { 0,1,0 } },
+ { { 0x002F }, { 0,1,0 } },
+ { { 0x0030 }, { 0,1,0 } },
+ { { 0x0039 }, { 0,1,0 } },
+ { { 0x003A }, { 0,1,0 } },
+ { { 0x0040 }, { 0,1,0 } },
+ { { 0x0041 }, { 0,0,0 } },
+ { { 0x005A }, { 0,0,0 } },
+ { { 0x005B }, { 0,1,0 } },
+ { { 0x0060 }, { 0,1,0 } },
+ { { 0x0061 }, { 0,1,0 } },
+ { { 0x007A }, { 0,1,0 } },
+ { { 0x007B }, { 0,1,0 } },
+ { { 0x007E }, { 0,1,0 } },
+ { { 0x007F }, { 0,1,0 } },
+ { { 0x0080 }, { 0,1,0 } },
+ { .is_last = 1 } /* Last entry. */
+ }
+ },
+#if 0
+ { TST_ISW_REC (eucJP, upper)
+#else
+ { TST_ISW_REC (ja_UTF8, upper)
+#endif
+ {
+ { { 0x3041 }, { 0,1,0 } }, /* HIRAGANA a */
+ { { 0x3094 }, { 0,1,0 } }, /* HIRAGANA u" */
+ { { 0x30A1 }, { 0,1,0 } }, /* KATAKANA a */
+ { { 0x30FA }, { 0,1,0 } }, /* KATAKANA wo" */
+ { { 0xFF19 }, { 0,1,0 } }, /* FULL 9 */
+ { { 0xFF20 }, { 0,1,0 } }, /* FULL @ */
+ { { 0xFF3A }, { 0,0,0 } }, /* FULL Z */
+ { { 0xFF40 }, { 0,1,0 } }, /* FULL GRAVE ACC. */
+ { { 0xFF5A }, { 0,1,0 } }, /* FULL z */
+ { { 0xFF66 }, { 0,1,0 } }, /* HALF KATA WO */
+ { { 0xFF6F }, { 0,1,0 } }, /* HALF KATA tu */
+ { { 0xFF71 }, { 0,1,0 } }, /* HALF KATA A */
+ { { 0xFF9E }, { 0,1,0 } }, /* HALF KATA MI */
+ { .is_last = 1 } /* Last entry. */
+ }
+ },
+ { TST_ISW_REC (end, upper) }
+};
diff --git a/test/locale-mbwc/dat_iswxdigit.c b/test/locale-mbwc/dat_iswxdigit.c
new file mode 100644
index 000000000..5d6c652f5
--- /dev/null
+++ b/test/locale-mbwc/dat_iswxdigit.c
@@ -0,0 +1,125 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: dat_iswxdigit.c
+ *
+ * ISW*: int iswxdigit (wint_t wc);
+ */
+
+
+#include "dat_isw-funcs.h"
+
+
+TST_ISW_LOC (XDIGIT, xdigit) = {
+
+ { TST_ISW_REC (de, xdigit)
+ {
+ { { 0x0080 }, { 0,1,0 } }, /* CTRL */
+ { { 0x009F }, { 0,1,0 } }, /* CTRL */
+ { { 0x00A0 }, { 0,1,0 } }, /* NB SPACE */
+ { { 0x00A1 }, { 0,1,0 } }, /* UD ! */
+ { { 0x00B0 }, { 0,1,0 } }, /* Degree */
+ { { 0x00B1 }, { 0,1,0 } }, /* +- sign */
+ { { 0x00B2 }, { 0,1,0 } }, /* SUP 2 */
+ { { 0x00B3 }, { 0,1,0 } }, /* SUP 3 */
+ { { 0x00B4 }, { 0,1,0 } }, /* ACUTE */
+ { { 0x00B8 }, { 0,1,0 } }, /* CEDILLA */
+ { { 0x00B9 }, { 0,1,0 } }, /* SUP 1 */
+ { { 0x00BB }, { 0,1,0 } }, /* >> */
+ { { 0x00BC }, { 0,1,0 } }, /* 1/4 */
+ { { 0x00BD }, { 0,1,0 } }, /* 1/2 */
+ { { 0x00BE }, { 0,1,0 } }, /* 3/4 */
+ { { 0x00BF }, { 0,1,0 } }, /* UD ? */
+ { { 0x00C0 }, { 0,1,0 } }, /* A Grave */
+ { { 0x00D6 }, { 0,1,0 } }, /* O dia */
+ { { 0x00D7 }, { 0,1,0 } }, /* multipl. */
+ { { 0x00D8 }, { 0,1,0 } }, /* O stroke */
+ { { 0x00DF }, { 0,1,0 } }, /* small Sh */
+ { { 0x00E0 }, { 0,1,0 } }, /* a grave */
+ { { 0x00F6 }, { 0,1,0 } }, /* o dia */
+ { { 0x00F7 }, { 0,1,0 } }, /* division */
+ { { 0x00F8 }, { 0,1,0 } }, /* o stroke */
+ { { 0x00FF }, { 0,1,0 } }, /* y dia */
+ { .is_last = 1 } /* Last element. */
+ }
+ },
+ { TST_ISW_REC( enUS, xdigit )
+ {
+ { { WEOF }, { 0,1,0 } },
+ { { 0x0000 }, { 0,1,0 } },
+ { { 0x001F }, { 0,1,0 } },
+ { { 0x0020 }, { 0,1,0 } },
+ { { 0x0021 }, { 0,1,0 } },
+ { { 0x002F }, { 0,1,0 } },
+ { { 0x0030 }, { 0,0,0 } },
+ { { 0x0039 }, { 0,0,0 } },
+ { { 0x003A }, { 0,1,0 } },
+ { { 0x0040 }, { 0,1,0 } },
+ { { 0x0041 }, { 0,0,0 } },
+ { { 0x005A }, { 0,1,0 } },
+ { { 0x005B }, { 0,1,0 } },
+ { { 0x0060 }, { 0,1,0 } },
+ { { 0x0061 }, { 0,0,0 } },
+ { { 0x007A }, { 0,1,0 } },
+ { { 0x007B }, { 0,1,0 } },
+ { { 0x007E }, { 0,1,0 } },
+ { { 0x007F }, { 0,1,0 } },
+ { { 0x0080 }, { 0,1,0 } },
+ { .is_last = 1 } /* Last element. */
+ }
+ },
+#if 0
+ { TST_ISW_REC( eucJP, xdigit )
+#else
+ { TST_ISW_REC( ja_UTF8, xdigit )
+#endif
+ {
+ { { 0x3000 }, { 0,1,0 } }, /* IDEO. SPACE */
+ { { 0x3020 }, { 0,1,0 } }, /* POSTAL MARK FACE */
+ { { 0x3029 }, { 0,1,0 } }, /* Hangzhou NUM9 */
+ { { 0x302F }, { 0,1,0 } }, /* Diacritics(Hangul) */
+ { { 0x3037 }, { 0,1,0 } }, /* Separator Symbol */
+ { { 0x303F }, { 0,1,0 } }, /* IDEO. HALF SPACE */
+ { { 0x3041 }, { 0,1,0 } }, /* HIRAGANA a */
+ { { 0x3094 }, { 0,1,0 } }, /* HIRAGANA u" */
+ { { 0x3099 }, { 0,1,0 } }, /* SOUND MARK */
+ { { 0x309E }, { 0,1,0 } }, /* ITERATION MARK */
+ { { 0x30A1 }, { 0,1,0 } }, /* KATAKANA a */
+ { { 0x30FA }, { 0,1,0 } }, /* KATAKANA wo" */
+ { { 0x30FB }, { 0,1,0 } }, /* KATAKANA MID.DOT */
+ { { 0x30FE }, { 0,1,0 } }, /* KATAKANA ITERATION */
+ { { 0x3191 }, { 0,1,0 } }, /* KANBUN REV.MARK */
+ { { 0x3243 }, { 0,1,0 } }, /* IDEO. MARK (reach) */
+ { { 0x32CB }, { 0,1,0 } }, /* IDEO.TEL.SYM.DEC12 */
+ { { 0x32FE }, { 0,1,0 } }, /* MARU KATAKANA wo */
+ { { 0x33FE }, { 0,1,0 } }, /* CJK IDEO.TEL.31th */
+ { { 0x4E00 }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0x4E05 }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0x4E06 }, { 0,1,0 } }, /* CJK UNI.IDEO.NON-J */
+ { { 0x4E07 }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0x4FFF }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0x9000 }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0x9006 }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0x9007 }, { 0,1,0 } }, /* CJK UNI.IDEO.NON-J */
+ { { 0x9FA4 }, { 0,1,0 } }, /* CJK UNI.IDEO.NON-J */
+ { { 0x9FA5 }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0xFE4F }, { 0,1,0 } }, /* CJK UNI.IDEO. */
+ { { 0xFF0F }, { 0,1,0 } }, /* FULL SLASH */
+ { { 0xFF19 }, { 0,1,0 } }, /* FULL 9 */
+ { { 0xFF20 }, { 0,1,0 } }, /* FULL @ */
+ { { 0xFF3A }, { 0,1,0 } }, /* FULL Z */
+ { { 0xFF40 }, { 0,1,0 } }, /* FULL GRAVE ACC. */
+ { { 0xFF5A }, { 0,1,0 } }, /* FULL z */
+ { { 0xFF5E }, { 0,1,0 } }, /* FULL ~ (tilde) */
+ { { 0xFF61 }, { 0,1,0 } }, /* HALF IDEO.STOP. . */
+ { { 0xFF65 }, { 0,1,0 } }, /* HALF KATA MID.DOT */
+ { { 0xFF66 }, { 0,1,0 } }, /* HALF KATA WO */
+ { { 0xFF6F }, { 0,1,0 } }, /* HALF KATA tu */
+ { { 0xFF70 }, { 0,1,0 } }, /* HALF KATA PL - */
+ { { 0xFF71 }, { 0,1,0 } }, /* HALF KATA A */
+ { { 0xFF9E }, { 0,1,0 } }, /* HALF KATA MI */
+ { .is_last = 1 } /* Last element. */
+ }
+ },
+ { TST_ISW_REC (end, xdigit) }
+};
diff --git a/test/locale-mbwc/dat_mblen.c b/test/locale-mbwc/dat_mblen.c
new file mode 100644
index 000000000..8da038c75
--- /dev/null
+++ b/test/locale-mbwc/dat_mblen.c
@@ -0,0 +1,137 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: dat_mblen.c
+ *
+ * MBLEN: int mblen (char *s, size_t n);
+ */
+
+
+/*
+ * NOTE:
+ * int mblen (char *s, size_t n);
+ *
+ * where n: a maximum number of bytes
+ *
+ * return - the number of bytes
+ *
+ * CAUTION:
+ *
+ * o When you feed a null pointer for a string (s) to the function,
+ * set s_flg=0 instead of putting just a 'NULL' there.
+ * Even if you set a 'NULL', it doens't mean a NULL pointer.
+ *
+ * o When s is a null pointer, the function checks state dependency.
+ *
+ * state-dependent encoding - return NON-zero
+ * state-independent encoding - return 0
+ *
+ * If state-dependent encoding is expected, set
+ *
+ * s_flg = 0, ret_flg = 0, ret_val = +1
+ *
+ * If state-independent encoding is expected, set
+ *
+ * s_flg = 0, ret_flg = 0, ret_val = 0
+ *
+ *
+ * When you set ret_flg=1, the test program simply compares an
+ * actual return value with an expected value. You can check
+ * state-independent case (return value is 0) in that way, but
+ * you can not check state-dependent case. So when you check
+ * state- dependency in this test function: tst_mblen(), set
+ * ret_flg=0 always. It's a special case, and the test
+ * function takes care of it.
+ *
+ * s_flg=0 ret_flg=0
+ * | |
+ * { 0, 0 }, { 0, 0, 0, x }
+ * | |
+ * not used ret_val: 0/+1
+ * (expected val) */
+
+
+TST_MBLEN tst_mblen_loc [] = {
+ {
+ { Tmblen, TST_LOC_de },
+ {
+ /* 01: a character. */
+ { { 1, "\300", USE_MBCURMAX }, { 0, 1, 1 } },
+ /* 02: a character. */
+ { { 1, "\309", USE_MBCURMAX }, { 0, 1, 1 } },
+ /* 03: a character + an invalid byte. */
+ { { 1, "Z\204", USE_MBCURMAX }, { 0, 1, +1 } },
+ /* 04: control/invalid characters. */
+ { { 1, "\177\000", USE_MBCURMAX }, { 0, 1, +1 } },
+ /* 05: a null string. */
+ { { 1, "", USE_MBCURMAX }, { 0, 1, 0 } },
+ /* 06: a null pointer. */
+ { { 0, "", USE_MBCURMAX }, { 0, 0, 0 } },
+ /* Last element. */
+ { .is_last = 1 }
+ }
+ },
+ {
+ { Tmblen, TST_LOC_enUS },
+ {
+ /* 01: a character. */
+ { { 1, "A", USE_MBCURMAX }, { 0, 1, 1 } },
+ /* 02: a character. */
+ { { 1, "a", USE_MBCURMAX }, { 0, 1, 1 } },
+ /* 03: a character + an invalid byte. */
+ { { 1, "Z\204", USE_MBCURMAX }, { 0, 1, +1 } },
+ /* 04: control/invalid characters. */
+ { { 1, "\177\000", USE_MBCURMAX }, { 0, 1, +1 } },
+ /* 05: a null string. */
+ { { 1, "", USE_MBCURMAX }, { 0, 1, 0 } },
+ /* 06: a null pointer. */
+ { { 0, "", USE_MBCURMAX }, { 0, 0, 0 } },
+ /* Last element. */
+ { .is_last = 1 }
+ }
+ },
+#if 0
+ {
+ { Tmblen, TST_LOC_eucJP },
+ {
+ /* 01: a character. */
+ { { 1, "\264\301", USE_MBCURMAX }, { 0, 1, 2 } },
+ /* 02: a character. */
+ { { 1, "\216\261", USE_MBCURMAX }, { 0, 1, 2 } },
+ /* 03: a character + an invalid byte. */
+ { { 1, "\260\241\200", USE_MBCURMAX }, { 0, 1, 2 } },
+ /* 04: control/invalid characters. */
+ { { 1, "\377\202", USE_MBCURMAX }, { EILSEQ, 1, -1 } },
+ /* 05: a null string. */
+ { { 1, "", USE_MBCURMAX }, { 0, 1, 0 } },
+ /* 06: a null pointer. */
+ { { 0, "", USE_MBCURMAX }, { 0, 0, 0 } },
+ /* Last element. */
+ { .is_last = 1 }
+ }
+ },
+#else
+ {
+ { Tmblen, TST_LOC_ja_UTF8 },
+ {
+ /* 01: a character. */
+ { { 1, "\346\274\242", USE_MBCURMAX }, { 0, 1, 3 } },
+ /* 02: a character. */
+ { { 1, "\357\275\261", USE_MBCURMAX }, { 0, 1, 3 } },
+ /* 03: a character + an invalid byte. */
+ { { 1, "\345\272\234\200", USE_MBCURMAX }, { 0, 1, 3 } },
+ /* 04: control/invalid characters. */
+ { { 1, "\377\202", USE_MBCURMAX }, { EILSEQ, 1, -1 } },
+ /* 05: a null string. */
+ { { 1, "", USE_MBCURMAX }, { 0, 1, 0 } },
+ /* 06: a null pointer. */
+ { { 0, "", USE_MBCURMAX }, { 0, 0, 0 } },
+ /* Last element. */
+ { .is_last = 1 }
+ }
+ },
+#endif
+ {
+ { Tmblen, TST_LOC_end}
+ }
+};
diff --git a/test/locale-mbwc/dat_mbrlen.c b/test/locale-mbwc/dat_mbrlen.c
new file mode 100644
index 000000000..63ae19fb2
--- /dev/null
+++ b/test/locale-mbwc/dat_mbrlen.c
@@ -0,0 +1,222 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: dat_mbrlen.c
+ *
+ * MBRLEN: size_t mbrlen (const char *s, size_t n, mbstate_t *ps);
+ */
+
+/*
+ * NOTE:
+ * (1) A mbstate object is initialized for
+ * every new data record by the test program.
+ *
+ * (2) USE_MBCURMAX is defined as a value of 99.
+ *
+ */
+
+
+TST_MBRLEN tst_mbrlen_loc [] = {
+ {
+ { Tmbrlen, TST_LOC_de },
+ {
+ { /*----------------- #01 -----------------*/
+ {
+ {
+ { 1, "", 0, 0, 0 },
+ { 1, "", 1, 0, 0 },
+ { 1, "\300", USE_MBCURMAX, 0, 0 },
+ }
+ },
+ {
+ {
+ { 0, 1, 0, },
+ { 0, 1, 0, },
+ { 0, 1, 1, },
+ }
+ }
+ },
+ { /*----------------- #02 -----------------*/
+ {
+ {
+ { 1, "\300\001", 0, 0, 0 },
+ { 1, "\300\001", 1, 0, 0 },
+ { 1, "\317\001", USE_MBCURMAX, 0, 0 },
+ }
+ },
+ {
+ {
+ { 0, 1, 0, },
+ { 0, 1, 1, },
+ { 0, 1, 1, },
+ }
+ }
+ },
+ { .is_last = 1 }
+ }
+ },
+ {
+ { Tmbrlen, TST_LOC_enUS },
+ {
+ { /*----------------- #01 -----------------*/
+ {
+ {
+ { 1, "A", 0, 0, 0 },
+ { 1, "A", 1, 0, 0 },
+ { 1, "A", USE_MBCURMAX, 0, 0 },
+ }
+ },
+ {
+ {
+ { 0, 1, 0, },
+ { 0, 1, 1, },
+ { 0, 1, 1, },
+ }
+ }
+ },
+ { /*----------------- #02 -----------------*/
+ {
+ {
+ { 1, "\317\001", 0, 1, 0 },
+ { 1, "\317\001", 1, 1, 0 },
+ { 1, "\317\001", USE_MBCURMAX, 1, 0 },
+ }
+ },
+ {
+ {
+ { 0, 1, 0, },
+ { EILSEQ, 1, -1, },
+ { EILSEQ, 1, -1, },
+ }
+ }
+ },
+ { .is_last = 1 }
+ }
+ },
+#if 0
+ {
+ { Tmbrlen, TST_LOC_eucJP },
+ {
+ { /*----------------- #01 -----------------*/
+ {
+ {
+ { 1, "\317\302", 1, 1, 1 },
+ { 0, "", 0, 1, 0 },
+ { 1, "\317\302", USE_MBCURMAX, 1, 1 },
+ }
+ },
+ {
+ {
+ { 0, 1, -2, },
+ { 0, 1, -1, },
+ { 0, 1, 2, },
+ }
+ }
+ },
+ { /*----------------- #02 -----------------*/
+ {
+ {
+ { 1, "\317", 1, 1, 0 },
+ { 1, "\302", 1, 1, 0 },
+ { 1, "\317\302", USE_MBCURMAX, 0, 0 },
+ }
+ },
+ {
+ {
+ { 0, 1, -2, },
+#ifdef SHOJI_IS_RIGHT
+ { 0, 1, +2, },
+#else
+ /* XXX ISO C explicitly says that the return value does not
+ XXX reflect the bytes contained in the state. */
+ { 0, 1, +1, },
+#endif
+ { 0, 1, 2, },
+ }
+ }
+ },
+ { /*----------------- #03 -----------------*/
+ {
+ {
+ { 1, "\216\217", 0, 0, 0 },
+ { 1, "\216\217", 1, 0, 0 },
+ { 1, "\216\217", USE_MBCURMAX, 0, 0 },
+ }
+ },
+ {
+ {
+ { 0, 1, 0, },
+ { 0, 1, -2, },
+ { EILSEQ, 1, -1, },
+ }
+ }
+ },
+ { .is_last = 1 }
+ }
+ },
+#else
+ {
+ { Tmbrlen, TST_LOC_ja_UTF8 },
+ {
+ { /*----------------- #01 -----------------*/
+ {
+ {
+ { 1, "\345\222\214", 1, 1, 1 },
+ { 0, "", 0, 1, 0 },
+ { 1, "\345\222\214", USE_MBCURMAX, 1, 1 },
+ }
+ },
+ {
+ {
+ { 0, 1, -2, },
+ { 0, 1, -1, },
+ { 0, 1, 3, },
+ }
+ }
+ },
+ { /*----------------- #02 -----------------*/
+ {
+ {
+ { 1, "\317", 1, 1, 0 },
+ { 1, "\266", 1, 1, 0 },
+ { 1, "\345\222\214", USE_MBCURMAX, 0, 0 },
+ }
+ },
+ {
+ {
+ { 0, 1, -2, },
+#ifdef SHOJI_IS_RIGHT
+ { 0, 1, +2, },
+#else
+ /* XXX ISO C explicitly says that the return value does not
+ XXX reflect the bytes contained in the state. */
+ { 0, 1, +1, },
+#endif
+ { 0, 1, 3, },
+ }
+ }
+ },
+ { /*----------------- #03 -----------------*/
+ {
+ {
+ { 1, "\302\303", 0, 0, 0 },
+ { 1, "\302\303", 1, 0, 0 },
+ { 1, "\302\303", USE_MBCURMAX, 0, 0 },
+ }
+ },
+ {
+ {
+ { 0, 1, 0, },
+ { 0, 1, -2, },
+ { EILSEQ, 1, -1, },
+ }
+ }
+ },
+ { .is_last = 1 }
+ }
+ },
+#endif
+ {
+ { Tmbrlen, TST_LOC_end }
+ }
+};
diff --git a/test/locale-mbwc/dat_mbrtowc.c b/test/locale-mbwc/dat_mbrtowc.c
new file mode 100644
index 000000000..b8eb3dd21
--- /dev/null
+++ b/test/locale-mbwc/dat_mbrtowc.c
@@ -0,0 +1,140 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: dat_mbrtowc.c
+ *
+ * MBTOWC: size_t mbrtowc (wchar_t *pwc, char *s, size_t n,
+ * mbstate_t *ps);
+ */
+
+#include <limits.h>
+
+/* Note:
+ assumes en_US = en_US.ascii
+*/
+
+
+
+
+TST_MBRTOWC tst_mbrtowc_loc [] = {
+ {
+ { Tmbrtowc, TST_LOC_de },
+ {
+ { /*----------------- #01 -----------------*/
+ {
+ {
+ { 1, 1, "ÄÖÜ", 1, 0, 0 },
+ { 1, 1, "ÄÖÜ", 2, 0, 0 },
+ { 1, 1, "ÄÖÜ", USE_MBCURMAX, 0, 0 },
+ }
+ },
+ {
+ {
+ { 0, 1, 1, 0x00C4 },
+ { 0, 1, 1, 0x00C4 },
+ { 0, 1, 1, 0x00C4 },
+ }
+ }
+ },
+ { /*----------------- #02 -----------------*/
+ {
+ {
+ { 1, 1, "ÄÖÜ", 1, 0, 0 },
+ { 1, 1, "ÄÖÜ", 2, 0, 0 },
+ { 1, 1, "ÄÖÜ", USE_MBCURMAX, 0, 0 },
+ }
+ },
+ {
+ {
+ { 0, 1, 1, 0x00C4 },
+ { 0, 1, 1, 0x00C4 },
+ { 0, 1, 1, 0x00C4 },
+ }
+ }
+ },
+ { .is_last = 1 }
+ }
+ },
+#if 0
+ /* XXX: These tests don't make sense to me. */
+ {
+ { Tmbrtowc, TST_LOC_enUS },
+ {
+ { /*----------------- #01 -----------------*/
+ {
+ {
+ { 1, 1, "ÄÖÜ", 1, 0, 0 },
+ { 1, 1, "ÄÖÜ", 2, 0, 0 },
+ { 1, 1, "ÄÖÜ", USE_MBCURMAX, 0, 0 },
+ }
+ },
+ {
+ {
+ { 0, 1, 1, 0x00C4 },
+ { 0, 1, 1, 0x00C4 },
+ { 0, 1, 1, 0x00C4 },
+ }
+ }
+ },
+ { /*----------------- #02 -----------------*/
+ {
+ {
+ { 1, 1, "ÄÖÜ", 1, 0, 0 },
+ { 1, 1, "ÄÖÜ", 2, 0, 0 },
+ { 1, 1, "ÄÖÜ", USE_MBCURMAX, 0, 0 },
+ }
+ },
+ {
+ {
+ { 0, 1, 1, 0x00C4 },
+ { 0, 1, 1, 0x00C4 },
+ { 0, 1, 1, 0x00C4 },
+ }
+ }
+ },
+ { .is_last = 1 }
+ }
+ },
+ {
+ { Tmbrtowc, TST_LOC_eucJP },
+ {
+ { /*----------------- #01 -----------------*/
+ {
+ {
+ { 1, 1, "ÄÖÜ", 1, 0, 0 },
+ { 1, 1, "ÄÖÜ", 2, 0, 0 },
+ { 1, 1, "ÄÖÜ", USE_MBCURMAX, 0, 0 },
+ }
+ },
+ {
+ {
+ { 0, 1, 1, 0x00C4 },
+ { 0, 1, 1, 0x00C4 },
+ { 0, 1, 1, 0x00C4 },
+ }
+ }
+ },
+ { /*----------------- #02 -----------------*/
+ {
+ {
+ { 1, 1, "ÄÖÜ", 1, 0, 0 },
+ { 1, 1, "ÄÖÜ", 2, 0, 0 },
+ { 1, 1, "ÄÖÜ", USE_MBCURMAX, 0, 0 },
+ }
+ },
+ {
+ {
+ { 0, 1, 1, 0x00C4 },
+ { 0, 1, 1, 0x00C4 },
+ { 0, 1, 1, 0x00C4 },
+ }
+ }
+ },
+ { .is_last = 1 }
+ }
+ },
+#endif
+ {
+ { Tmbrtowc, TST_LOC_end }
+ }
+};
diff --git a/test/locale-mbwc/dat_mbsrtowcs.c b/test/locale-mbwc/dat_mbsrtowcs.c
new file mode 100644
index 000000000..30a0a6c02
--- /dev/null
+++ b/test/locale-mbwc/dat_mbsrtowcs.c
@@ -0,0 +1,180 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: dat_mbsrtowcs.c
+ *
+ * MBSRTOWCS: size_t mbsrtowcs (wchar_t *ws, char **s, size_t n,
+ * mbstate_t *ps);
+ */
+
+
+TST_MBSRTOWCS tst_mbsrtowcs_loc [] = {
+ {
+ { Tmbsrtowcs, TST_LOC_de },
+ {
+ { /*----------------- #01 -----------------*/
+ {
+ {
+ { 1, "üäö", 4, 0,0 },
+ { 1, "üäö", 3, 0,0 },
+ { 1, "üäö", 2, 0,0 },
+ }
+ },
+ {
+ {
+ { 0,1,3, { 0x00FC,0x00E4,0x00F6,0x0000 } },
+ { 0,1,3, { 0x00FC,0x00E4,0x00F6,0x0000 } },
+ { 0,1,2, { 0x00FC,0x00E4,0x00F6,0x0000 } },
+ }
+ }
+ },
+ { /*----------------- #02 -----------------*/
+ {
+ {
+ { 1, "üäö", 4, 0,0 },
+ { 1, "", 1, 0,0 },
+ { 0, "üäö", 4, 0,0 },
+ }
+ },
+ {
+ {
+ { 0,1,3, { 0x00FC,0x00E4,0x00F6,0x0000 } },
+ { 0,1,0, { 0x0000 } },
+ { 0,1,3, { 0x0000 } },
+ }
+ }
+ },
+ { /*----------------- END -----------------*/
+ .is_last = 1
+ }
+ }
+ },
+
+ {
+ { Tmbsrtowcs, TST_LOC_enUS },
+ {
+ { /*----------------- #01 -----------------*/
+ {
+ {
+ { 1, "ABC", 4, 0,0 },
+ { 1, "ABC", 3, 0,0 },
+ { 1, "ABC", 2, 0,0 },
+ }
+ },
+ {
+ {
+ { 0,1,3, { 0x0041,0x0042,0x0043,0x0000 } },
+ { 0,1,3, { 0x0041,0x0042,0x0043,0x0000 } },
+ { 0,1,2, { 0x0041,0x0042,0x0043,0x0000 } },
+ }
+ }
+ },
+ { /*----------------- #02 -----------------*/
+ {
+ {
+ { 1, "ABC", 4, 0,0 },
+ { 1, "", 1, 0,0 },
+ { 0, "ABC", 4, 0,0 },
+ }
+ },
+ {
+ {
+ { 0,1,3, { 0x0041,0x0042,0x0043,0x0000 } },
+ { 0,1,0, { 0x0000 } },
+ { 0,1,3, { 0x0000 } },
+ }
+ }
+ },
+ { /*----------------- END -----------------*/
+ .is_last = 1
+ }
+ }
+ },
+
+#if 0
+ {
+ { Tmbsrtowcs, TST_LOC_eucJP },
+ {
+ { /*----------------- #01 -----------------*/
+ {
+ {
+ { 1, "\244\242\244\244\244\246ABC", 7, 0,0 },
+ { 1, "\244\242\244\244\244\246ABC", 6, 0,0 },
+ { 1, "\244\242\244\244\244\246ABC", 4, 0,0 },
+ }
+ },
+ {
+ {
+ { 0,1,6, { 0x3042,0x3044,0x3046,0x0041,0x0042,0x0043,0x0000 }},
+ { 0,1,6, { 0x3042,0x3044,0x3046,0x0041,0x0042,0x0043,0x0000 }},
+ { 0,1,4, { 0x3042,0x3044,0x3046,0x0041,0x0000 } },
+ }
+ }
+ },
+ { /*----------------- #02 -----------------*/
+ {
+ {
+ { 1, "\244\242\244\244\244\246ABC", 7, 0,0 },
+ { 1, "", 1, 0,0 },
+ { 0, "\244\242\244\244\244\246ABC", 7, 0,0 },
+ }
+ },
+ {
+ {
+ { 0,1,6, { 0x3042,0x3044,0x3046,0x0041,0x0042,0x0043,0x0000 }},
+ { 0,1,0, { 0x0000 } },
+ { 0,1,6, { 0x0000 } },
+ }
+ }
+ },
+ { /*----------------- END -----------------*/
+ .is_last = 1
+ }
+ }
+ },
+#else
+ {
+ { Tmbsrtowcs, TST_LOC_ja_UTF8 },
+ {
+ { /*----------------- #01 -----------------*/
+ {
+ {
+ { 1, "\343\201\202\343\201\204\343\201\206ABC", 7, 0,0 },
+ { 1, "\343\201\202\343\201\204\343\201\206ABC", 6, 0,0 },
+ { 1, "\343\201\202\343\201\204\343\201\206ABC", 4, 0,0 },
+ }
+ },
+ {
+ {
+ { 0,1,6, { 0x3042,0x3044,0x3046,0x0041,0x0042,0x0043,0x0000 }},
+ { 0,1,6, { 0x3042,0x3044,0x3046,0x0041,0x0042,0x0043,0x0000 }},
+ { 0,1,4, { 0x3042,0x3044,0x3046,0x0041,0x0000 } },
+ }
+ }
+ },
+ { /*----------------- #02 -----------------*/
+ {
+ {
+ { 1, "\343\201\202\343\201\204\343\201\206ABC", 7, 0,0 },
+ { 1, "", 1, 0,0 },
+ { 0, "\343\201\202\343\201\204\343\201\206ABC", 7, 0,0 },
+ }
+ },
+ {
+ {
+ { 0,1,6, { 0x3042,0x3044,0x3046,0x0041,0x0042,0x0043,0x0000 }},
+ { 0,1,0, { 0x0000 } },
+ { 0,1,6, { 0x0000 } },
+ }
+ }
+ },
+ { /*----------------- END -----------------*/
+ .is_last = 1
+ }
+ }
+ },
+#endif
+ {
+ { Tmbsrtowcs, TST_LOC_end }
+ }
+};
diff --git a/test/locale-mbwc/dat_mbstowcs.c b/test/locale-mbwc/dat_mbstowcs.c
new file mode 100644
index 000000000..3b8ce65dd
--- /dev/null
+++ b/test/locale-mbwc/dat_mbstowcs.c
@@ -0,0 +1,190 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: dat_mbstowcs.c
+ *
+ * MBSTOWCS: size_t mbstowcs (wchar_t *ws, char *s, size_t n);
+ */
+
+#include <limits.h>
+
+TST_MBSTOWCS tst_mbstowcs_loc [] = {
+ {
+ { Tmbstowcs, TST_LOC_de },
+ {
+ { /*----------------- #01 -----------------*/
+ {
+ {
+ { 1, 1, "ABC", 4 },
+ { 1, 1, "ABC", 3 },
+ { 1, 1, "ABC", 2 },
+ }
+ },
+ {
+ {
+ { 0,1,3, { 0x0041,0x0042,0x0043,0x0000 } },
+ { 0,1,3, { 0x0041,0x0042,0x0043,0x0000 } },
+ { 0,1,2, { 0x0041,0x0042,0x0043,0x0000 } },
+ }
+ }
+ },
+ { /*----------------- #02 -----------------*/
+ {
+ {
+ { 1, 1, "ABC", 4 },
+ { 1, 1, "", 1 },
+ { 0, 1, "ABC", 4 },
+ }
+ },
+ {
+ {
+ { 0,1,3, { 0x0041,0x0042,0x0043,0x0000 } },
+ { 0,1,0, { 0x0000 } },
+ { 0,1,3, { 0x0000 } },
+ }
+ }
+ },
+ { .is_last = 1 }
+ }
+ },
+ {
+ { Tmbstowcs, TST_LOC_enUS },
+ {
+ { /*----------------- #01 -----------------*/
+ {
+ {
+ { 1, 1, "ABC", 4 },
+ { 1, 1, "ABC", 3 },
+ { 1, 1, "ABC", 2 },
+ }
+ },
+ {
+ {
+ { 0,1,3, { 0x0041,0x0042,0x0043,0x0000 } },
+ { 0,1,3, { 0x0041,0x0042,0x0043,0x0000 } },
+ { 0,1,2, { 0x0041,0x0042,0x0043,0x0000 } },
+ }
+ }
+ },
+ { /*----------------- #02 -----------------*/
+ {
+ {
+ { 1, 1, "ABC", 4 },
+ { 1, 1, "", 1 },
+ { 0, 1, "ABC", 4 },
+ }
+ },
+ {
+ {
+ { 0,1,3, { 0x0041,0x0042,0x0043,0x0000 } },
+ { 0,1,0, { 0x0000 } },
+ { 0,1,3, { 0x0000 } },
+ }
+ }
+ },
+ { .is_last = 1 }
+ }
+ },
+#if 0
+ {
+ { Tmbstowcs, TST_LOC_eucJP },
+ {
+ { /*----------------- #01 -----------------*/
+ {
+ {
+ { 1, 1, "\244\242\244\244\244\246ABC", 7 },
+ { 1, 1, "\244\242\244\244\244\246ABC", 6 },
+ { 1, 1, "\244\242\244\244\244\246ABC", 4 },
+ }
+ },
+ {
+ {
+ { 0,1,6, { 0x3042,0x3044,0x3046,0x0041,0x0042,0x0043,0x0000 }},
+ { 0,1,6, { 0x3042,0x3044,0x3046,0x0041,0x0042,0x0043,0x0000 }},
+ { 0,1,4, { 0x3042,0x3044,0x3046,0x0041,0x0000 } },
+ }
+ }
+ },
+ { /*----------------- #02 -----------------*/
+ {
+ {
+#ifdef SHOJI_IS_RIGHT
+ /* XXX I really don't understand the first and third line.
+ the result of the first line is the same as the first
+ in the last test (i.e., returns 6). Also, the third
+ test will simply convert everything. */
+ { 1, 1, "\244\242\244\244\244\246ABC", 7 },
+ { 1, 1, "", 1 },
+ { 0, 1, "\244\242\244\244\244\246ABC", 7 },
+#else
+ { 1, 1, "\244\242\244\244\244\246ABC", 4 },
+ { 1, 1, "", 1 },
+ { 0, 1, "\244\242\244\244\244\246ABC", 0 },
+#endif
+ }
+ },
+ {
+ {
+ { 0,1,4, { 0x3042,0x3044,0x3046,0x0041,0x0000 } },
+ { 0,1,0, { 0x0000 } },
+ { 0,1,6, { 0x0000 } },
+ }
+ }
+ },
+ { .is_last = 1 }
+ }
+ },
+#else
+ {
+ { Tmbstowcs, TST_LOC_ja_UTF8 },
+ {
+ { /*----------------- #01 -----------------*/
+ {
+ {
+ { 1, 1, "\343\201\202\343\201\204\343\201\206ABC", 7 },
+ { 1, 1, "\343\201\202\343\201\204\343\201\206ABC", 6 },
+ { 1, 1, "\343\201\202\343\201\204\343\201\206ABC", 4 },
+ }
+ },
+ {
+ {
+ { 0,1,6, { 0x3042,0x3044,0x3046,0x0041,0x0042,0x0043,0x0000 }},
+ { 0,1,6, { 0x3042,0x3044,0x3046,0x0041,0x0042,0x0043,0x0000 }},
+ { 0,1,4, { 0x3042,0x3044,0x3046,0x0041,0x0000 } },
+ }
+ }
+ },
+ { /*----------------- #02 -----------------*/
+ {
+ {
+#ifdef SHOJI_IS_RIGHT
+ /* XXX I really don't understand the first and third line.
+ the result of the first line is the same as the first
+ in the last test (i.e., returns 6). Also, the third
+ test will simply convert everything. */
+ { 1, 1, "\244\242\244\244\244\246ABC", 7 },
+ { 1, 1, "", 1 },
+ { 0, 1, "\244\242\244\244\244\246ABC", 7 },
+#else
+ { 1, 1, "\343\201\202\343\201\204\343\201\206ABC", 4 },
+ { 1, 1, "", 1 },
+ { 0, 1, "\343\201\202\343\201\204\343\201\206ABC", 7 },
+#endif
+ }
+ },
+ {
+ {
+ { 0,1,4, { 0x3042,0x3044,0x3046,0x0041,0x0000 } },
+ { 0,1,0, { 0x0000 } },
+ { 0,1,6, { 0x0000 } },
+ }
+ }
+ },
+ { .is_last = 1 }
+ }
+ },
+#endif
+ {
+ { Tmbstowcs, TST_LOC_end }
+ }
+};
diff --git a/test/locale-mbwc/dat_mbtowc.c b/test/locale-mbwc/dat_mbtowc.c
new file mode 100644
index 000000000..6527dfc2e
--- /dev/null
+++ b/test/locale-mbwc/dat_mbtowc.c
@@ -0,0 +1,444 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: dat_mbtowc.c
+ *
+ * MBTOWC: int mbtowc (wchar_t *wp, char *s, size_t n);
+ */
+
+/* NOTE:
+ *
+ * int mbtowc (wchar_t *wp, char *s, size_t n);
+ *
+ * where n: a maximum number of bytes
+ * return: the number of bytes
+ *
+ *
+ * o When you feed a null pointer for a string (s) to the function,
+ * set s_flg=0 instead of putting just a 'NULL' there.
+ * Even if you put a 'NULL', it means a null string as well as "".
+ *
+ * o When s is a null pointer, the function checks state dependency.
+ *
+ * state-dependent encoding - return NON-zero
+ * state-independent encoding - return 0
+ *
+ * If state-dependent encoding is expected, set
+ *
+ * s_flg = 0, ret_flg = 0, ret_val = +1
+ *
+ * If state-independent encoding is expected, set
+ *
+ * s_flg = 0, ret_flg = 0, ret_val = 0
+ *
+ *
+ * When you set ret_flg=1, the test program simply compares
+ * an actual return value with an expected value. You can
+ * check state-independent case (return value is 0) in that
+ * way, but you can not check state-dependent case. So when
+ * you check state- dependency in this test function:
+ * tst_mbtowc(), set ret_flg=0 always. It's a special case
+ * and the test function takes care of it.
+ *
+ * w_flg
+ * | s: (a null string; can't be (char *)NULL)
+ * | |
+ * input. { 1, 0, (char)NULL, MB_LEN_MAX },
+ * |
+ * s_flg=0: makes _s_ a null pointer.
+ *
+ * expect { 0,0,0,x, 0x0000 },
+ * | |
+ * | ret_val: 0/+1
+ * ret_flg=0
+ *
+ *
+ * Test data for State dependent encodings:
+ *
+ * mbtowc( NULL, NULL, 0 ); ... first data
+ * mbtowc( &wc, s1, n1 ); ... second data
+ * mbtowc( &wc, s2, n2 ); ... third data
+ * */
+
+#include <limits.h>
+
+TST_MBTOWC tst_mbtowc_loc [] = {
+ {
+ { Tmbtowc, TST_LOC_de },
+ {
+ { /*----------------- #01 -----------------*/
+ {
+ {
+ { 1, 1, "\xfc\xe4\xf6", 1 },
+ { 1, 1, "\xfc\xe4\xf6", 2 },
+ { 1, 1, "\xfc\xe4\xf6", MB_LEN_MAX },
+ }
+ },
+ {
+ {
+ { 0, 1, 1, 0x00FC },
+ { 0, 1, 1, 0x00FC },
+ { 0, 1, 1, 0x00FC },
+ }
+ }
+ },
+ { /*----------------- #02 -----------------*/
+ {
+ {
+ { 1, 1, "\177", MB_LEN_MAX },
+ { 1, 1, "\200", MB_LEN_MAX },
+ { 1, 1, "\201", MB_LEN_MAX },
+ }
+ },
+ {
+ {
+ { 0, 1, 1, 0x007F },
+ { 0, 1, 1, 0x0080 },
+ { 0, 1, 1, 0x0081 },
+ }
+ }
+ },
+ { /*----------------- #03 -----------------*/
+ {
+ {
+ { 1, 1, "", MB_LEN_MAX },
+ { 0, 1, "\xfc\xe4\xf6", 1 },
+ { 0, 1, "\xfc\xe4\xf6", 2 },
+ }
+ },
+ {
+ {
+ { 0, 1, 0, 0x0000 },
+ { 0, 1, 1, 0x0000 },
+ { 0, 1, 1, 0x0000 },
+ }
+ }
+ },
+ { /*----------------- #04 -----------------*/
+ {
+ {
+ { 0, 1, "\xfc\xe4\xf6", MB_LEN_MAX },
+ { 0, 1, "\177", MB_LEN_MAX },
+ { 0, 1, "", MB_LEN_MAX },
+ }
+ },
+ {
+ {
+ { 0, 1, 1, 0x0000 },
+ { 0, 1, 1, 0x0000 },
+ { 0, 1, 0, 0x0000 },
+ }
+ }
+ },
+ { /*----------------- #05 -----------------*/
+ {
+ {
+ { 0, 1, "\xfc\xe4\xf6", MB_LEN_MAX },
+ { 0, 1, "\177", MB_LEN_MAX },
+ { 0, 0, (char)NULL, MB_LEN_MAX },
+ }
+ },
+ {
+ {
+ { 0, 1, 1, 0x0000 },
+ { 0, 1, 1, 0x0000 },
+ { 0, 0, 0, 0x0000 },
+ }
+ }
+ },
+ { .is_last = 1 }
+ }
+ },
+ {
+ { Tmbtowc, TST_LOC_enUS },
+ {
+ { /*----------------- #01 -----------------*/
+ {
+ {
+ { 1, 1, "ABC", 1 },
+ { 1, 1, "ABC", 2 },
+ { 1, 1, "ABC", MB_LEN_MAX },
+ }
+ },
+ {
+ {
+ { 0, 1, 1, 0x0041 },
+ { 0, 1, 1, 0x0041 },
+ { 0, 1, 1, 0x0041 },
+ }
+ }
+ },
+ { /*----------------- #02 -----------------*/
+ {
+ {
+ { 1, 1, "\177", MB_LEN_MAX },
+ { 1, 1, "\200", MB_LEN_MAX },
+ { 1, 1, "\201", MB_LEN_MAX },
+ }
+ },
+ {
+ {
+ { 0, 1, 1, 0x007F },
+ { EILSEQ, 1, -1, 0x0000 },
+ { EILSEQ, 1, -1, 0x0000 },
+ }
+ }
+ },
+ { /*----------------- #03 -----------------*/
+ {
+ {
+ { 1, 1, "", MB_LEN_MAX },
+ { 0, 1, "ABC", 1 },
+ { 0, 1, "ABC", 2 },
+ }
+ },
+ {
+ {
+ { 0, 1, 0, 0x0000 },
+ { 0, 1, 1, 0x0000 },
+ { 0, 1, 1, 0x0000 },
+ }
+ }
+ },
+ { /*----------------- #04 -----------------*/
+ {
+ {
+ { 0, 1, "ABC", MB_LEN_MAX },
+ { 0, 1, "\177", MB_LEN_MAX },
+ { 0, 1, "", MB_LEN_MAX },
+ }
+ },
+ {
+ {
+ { 0, 1, 1, 0x0000 },
+ { 0, 1, 1, 0x0000 },
+ { 0, 1, 0, 0x0000 },
+ }
+ }
+ },
+ { /*----------------- #05 -----------------*/
+ {
+ {
+ { 0, 1, "ABC", MB_LEN_MAX },
+ { 0, 1, "\177", MB_LEN_MAX },
+ { 0, 0, (char)NULL, MB_LEN_MAX },
+ }
+ },
+ {
+ {
+ { 0, 1, 1, 0x0000 },
+ { 0, 1, 1, 0x0000 },
+ { 0, 0, 0, 0x0000 },
+ }
+ }
+ },
+ { .is_last = 1 }
+ }
+ },
+#if 0
+ {
+ { Tmbtowc, TST_LOC_eucJP },
+ {
+ { /*----------------- #01 -----------------*/
+ {
+ {
+ { 1, 1, "\244\242A", 1 },
+ { 1, 1, "\244\242A", 2 },
+ { 1, 1, "\244\242A", MB_LEN_MAX },
+ }
+ },
+ {
+ {
+#ifdef SHOJI_IS_RIGHT
+ { EILSEQ, 1, -1, 0x0000 },
+#else
+ /* XXX EILSEQ was introduced in ISO C99. */
+ { 0, 1, -1, 0x0000 },
+#endif
+ { 0, 1, 2, 0x3042 },
+ { 0, 1, 2, 0x3042 },
+ }
+ }
+ },
+ { /*----------------- #02 -----------------*/
+ {
+ {
+ { 1, 1, "\177\244\242", MB_LEN_MAX },
+ { 1, 1, "\377\244\242", MB_LEN_MAX },
+ { 1, 1, "\201\244\242", MB_LEN_MAX },
+ }
+ },
+ {
+ {
+ { 0, 1, +1, 0x007F },
+#ifdef SHOJI_IS_RIGHT
+ { EILSEQ, 1, -1, 0x0000 },
+#else
+ { 0, 1, -1, 0x0000 },
+#endif
+ { 0, 1, +1, 0x0081 },
+ }
+ }
+ },
+ { /*----------------- #03 -----------------*/
+ {
+ {
+ { 1, 1, "", MB_LEN_MAX },
+ { 0, 1, "\244\242A", 1 },
+ { 0, 1, "\244\242A", 2 },
+ }
+ },
+ {
+ {
+ { 0, 1, 0, 0x0000 },
+#ifdef SHOJI_IS_RIGHT
+ { EILSEQ, 1, -1, 0x0000 },
+#else
+ /* XXX EILSEQ was introduced in ISO C99. */
+ { 0, 1, -1, 0x0000 },
+#endif
+ { 0, 1, 2, 0x0000 },
+ }
+ }
+ },
+ { /*----------------- #04 -----------------*/
+ {
+ {
+ { 0, 1, "\244\242A", MB_LEN_MAX },
+ { 0, 1, "\177\244\242", MB_LEN_MAX },
+ { 0, 1, "", MB_LEN_MAX },
+ }
+ },
+ {
+ {
+ { 0, 1, 2, 0x0000 },
+ { 0, 1, +1, 0x0000 },
+ { 0, 1, 0, 0x0000 },
+ }
+ }
+ },
+ { /*----------------- #05 -----------------*/
+ {
+ {
+ { 0, 1, "\244\242A", MB_LEN_MAX },
+ { 0, 1, "\177\244\242", MB_LEN_MAX },
+ { 0, 0, (char)NULL, MB_LEN_MAX },
+ }
+ },
+ {
+ {
+ { 0, 1, 2, 0x0000 },
+ { 0, 1, +1, 0x0000 },
+ { 0, 0, 0, 0x0000 },
+ }
+ }
+ },
+ { .is_last = 1 }
+ }
+ },
+#else
+ {
+ { Tmbtowc, TST_LOC_ja_UTF8 },
+ {
+ { /*----------------- #01 -----------------*/
+ {
+ {
+ { 1, 1, "\343\201\202A", 1 },
+ { 1, 1, "\343\201\202A", 3 },
+ { 1, 1, "\343\201\202A", MB_LEN_MAX },
+ }
+ },
+ {
+ {
+#ifdef SHOJI_IS_RIGHT
+ { EILSEQ, 1, -1, 0x0000 },
+#else
+ /* XXX EILSEQ was introduced in ISO C99. */
+ { 0, 1, -1, 0x0000 },
+#endif
+ { 0, 1, 3, 0x3042 },
+ { 0, 1, 3, 0x3042 },
+ }
+ }
+ },
+ { /*----------------- #02 -----------------*/
+ {
+ {
+ { 1, 1, "\177\343\201\202", MB_LEN_MAX },
+ { 1, 1, "\377\343\201\202", MB_LEN_MAX },
+ { 1, 1, "\302\201\343\201\202", MB_LEN_MAX },
+ }
+ },
+ {
+ {
+ { 0, 1, +1, 0x007F },
+#ifdef SHOJI_IS_RIGHT
+ { EILSEQ, 1, -1, 0x0000 },
+#else
+ { 0, 1, -1, 0x0000 },
+#endif
+ { 0, 1, +2, 0x0081 },
+ }
+ }
+ },
+ { /*----------------- #03 -----------------*/
+ {
+ {
+ { 1, 1, "", MB_LEN_MAX },
+ { 0, 1, "\343\201\202A", 1 },
+ { 0, 1, "\343\201\202A", 3 },
+ }
+ },
+ {
+ {
+ { 0, 1, 0, 0x0000 },
+#ifdef SHOJI_IS_RIGHT
+ { EILSEQ, 1, -1, 0x0000 },
+#else
+ /* XXX EILSEQ was introduced in ISO C99. */
+ { 0, 1, -1, 0x0000 },
+#endif
+ { 0, 1, 3, 0x0000 },
+ }
+ }
+ },
+ { /*----------------- #04 -----------------*/
+ {
+ {
+ { 0, 1, "\343\201\202A", MB_LEN_MAX },
+ { 0, 1, "\177\343\201\202", MB_LEN_MAX },
+ { 0, 1, "", MB_LEN_MAX },
+ }
+ },
+ {
+ {
+ { 0, 1, 3, 0x0000 },
+ { 0, 1, +1, 0x0000 },
+ { 0, 1, 0, 0x0000 },
+ }
+ }
+ },
+ { /*----------------- #05 -----------------*/
+ {
+ {
+ { 0, 1, "\343\201\202A", MB_LEN_MAX },
+ { 0, 1, "\177\343\201\202", MB_LEN_MAX },
+ { 0, 0, (char)NULL, MB_LEN_MAX },
+ }
+ },
+ {
+ {
+ { 0, 1, 3, 0x0000 },
+ { 0, 1, +1, 0x0000 },
+ { 0, 0, 0, 0x0000 },
+ }
+ }
+ },
+ { .is_last = 1 }
+ }
+ },
+#endif
+ {
+ { Tmbtowc, TST_LOC_end }
+ }
+};
diff --git a/test/locale-mbwc/dat_strcoll.c b/test/locale-mbwc/dat_strcoll.c
new file mode 100644
index 000000000..e12037ca0
--- /dev/null
+++ b/test/locale-mbwc/dat_strcoll.c
@@ -0,0 +1,209 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: dat_strcoll.c
+ *
+ * STRCOLL: int strcoll (const char *s1, const char *s2);
+ */
+
+/*
+ NOTE:
+
+ If a return value is expected to be 0, set ret_flg=1 and the
+ expected value = 0. If a return value is expected to be a
+ positive/negative value, set ret_flg=0, and set the expected value
+ = +1/-1.
+ There is inconsistensy between tst_strcoll() and tst_wcscoll()(it
+ has cmp_flg) for input data. I'll fix it.
+
+ Assuming en_US to be en_US.ascii. (maybe, should be iso8859-1).
+
+
+
+ ASCII CODE : A,B,C, ... , a, b, c, ... B,a:-1 a,B:+1
+ DICTIONARY : A,a,B,b,C,c,.... a,B:-1 B,a:+1 */
+
+TST_STRCOLL tst_strcoll_loc [] = {
+ {
+ { Tstrcoll, TST_LOC_de },
+ {
+ { /*input.*/ { "ÄBCDEFG", "ÄBCDEFG" }, /* #1 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { "XX Ä XX", "XX B XX" }, /* #2 */
+ /*expect*/ { 0,0,-1, },
+ },
+ { /*input.*/ { "XX B XX", "XX Ä XX" }, /* #3 */
+ /*expect*/ { 0,0,+1, },
+ },
+ { /*input.*/ { "B", "a" }, /* #4 */
+ /*expect*/ { 0,0,+1, },
+ },
+ { /*input.*/ { "a", "B" }, /* #5 */
+ /*expect*/ { 0,0,-1, },
+ },
+ { /*input.*/ { "b", "A" }, /* #6 */
+ /*expect*/ { 0,0,+1, },
+ },
+ { /*input.*/ { "A", "b" }, /* #7 */
+ /*expect*/ { 0,0,-1, },
+ },
+ { /*input.*/ { "ä", "B" }, /* #8 */
+ /*expect*/ { 0,0,-1, },
+ },
+ { /*input.*/ { "B", "ä" }, /* #9 */
+ /*expect*/ { 0,0,+1, },
+ },
+ { .is_last = 1 } /* Last element. */
+ }
+ },
+ {
+ { Tstrcoll, TST_LOC_en },
+ {
+ { /*input.*/ { "ABCDEFG", "ABCDEFG" }, /* #1 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { "XX a XX", "XX B XX" }, /* #2 */
+ /*expect*/ { 0,0,-1, },
+ },
+ { /*input.*/ { "XX B XX", "XX a XX" }, /* #3 */
+ /*expect*/ { 0,0,+1, },
+ },
+ {
+ /* <WAIVER> */
+ /*input.*/ { "B", "a" }, /* #4 */
+#ifdef SHOJI_IS_RIGHT
+ /*expect*/ { 0,0,-1, },
+#else
+ /* XXX We are not testing the C locale. */
+ /*expect*/ { 0,0,+1, },
+#endif
+ },
+ {
+ /* <WAIVER> */
+ /*input.*/ { "a", "B" }, /* #5 */
+#ifdef SHOJI_IS_RIGHT
+ /*expect*/ { 0,0,+1, },
+#else
+ /* XXX We are not testing the C locale. */
+ /*expect*/ { 0,0,-1, },
+#endif
+ },
+ { /*input.*/ { "b", "A" }, /* #6 */
+ /*expect*/ { 0,0,+1, },
+ },
+ { /*input.*/ { "A", "b" }, /* #7 */
+ /*expect*/ { 0,0,-1, },
+ },
+#ifdef NO_WAIVER
+ /* XXX I do not yet know whether strcoll really should reject
+ characters outside the multibyte character range. */
+ {
+ /* #8 */ /* <WAIVER> */
+ /*input.*/ { "\244\242\244\244\244\246\244\250\244\252", "ABCDEFG" },
+ /*expect*/ { EINVAL,0,0, },
+ },
+ {
+ /* #9 */ /* <WAIVER> */
+ /*input.*/ { "ABCZEFG", "\244\242\244\244\244\246\244\250\244\252" },
+ /*expect*/ { EINVAL,0,0, },
+ },
+#endif
+ { .is_last = 1 } /* Last element. */
+ }
+ },
+#if 0
+ {
+ { Tstrcoll, TST_LOC_eucJP },
+ {
+ { /*input.*/ { "\244\242\244\244\244\246\244\250\244\252",
+ "\244\242\244\244\244\246\244\250\244\252" }, /* #1 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { "\244\242\244\244\244\246\244\250\244\252",
+ "\244\242\244\244\244\363\244\250\244\252" }, /* #2 */
+ /*expect*/ { 0,0,-1, },
+ },
+ { /*input.*/ { "\244\242\244\244\244\363\244\250\244\252",
+ "\244\242\244\244\244\246\244\250\244\252" }, /* #3 */
+ /*expect*/ { 0,0,+1, },
+ },
+ { /*input.*/ { "B", "a" }, /* #4 */
+ /*expect*/ { 0,0,-1, },
+ },
+ { /*input.*/ { "a", "B" }, /* #5 */
+ /*expect*/ { 0,0,+1, },
+ },
+ { /*input.*/ { "b", "A" }, /* #6 */
+ /*expect*/ { 0,0,+1, },
+ },
+ { /*input.*/ { "A", "b" }, /* #7 */
+ /*expect*/ { 0,0,-1, },
+ },
+#ifdef NO_WAIVER
+ /* XXX I do not yet know whether strcoll really should reject
+ characters outside the multibyte character range. */
+ {
+ /* <WAIVER> */
+ /*input.*/ { "\200\216\217", "ABCDEFG" }, /* #8 */
+ /*expect*/ { EINVAL,0,0, },
+ },
+ {
+ /* <WAIVER> */
+ /*input.*/ { "ABCZEFG", "\200\216\217" }, /* #9 */
+ /*expect*/ { EINVAL,0,0, },
+ },
+#endif
+ { .is_last = 1 } /* Last element. */
+ }
+ },
+#else
+ {
+ { Tstrcoll, TST_LOC_ja_UTF8 },
+ {
+ { /*input.*/ { "\343\201\202\343\201\204\343\201\206\343\201\210\343\201\212",
+ "\343\201\202\343\201\204\343\201\206\343\201\210\343\201\212" }, /* #1 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { "\343\201\202\343\201\204\343\201\206\343\201\210\343\201\212",
+ "\343\201\202\343\201\204\343\202\223\343\201\210\343\201\212" }, /* #2 */
+ /*expect*/ { 0,0,-1, },
+ },
+ { /*input.*/ { "\343\201\202\343\201\204\343\202\223\343\201\210\343\201\212",
+ "\343\201\202\343\201\204\343\201\206\343\201\210\343\201\212" }, /* #3 */
+ /*expect*/ { 0,0,+1, },
+ },
+ { /*input.*/ { "B", "a" }, /* #4 */
+ /*expect*/ { 0,0,-1, },
+ },
+ { /*input.*/ { "a", "B" }, /* #5 */
+ /*expect*/ { 0,0,+1, },
+ },
+ { /*input.*/ { "b", "A" }, /* #6 */
+ /*expect*/ { 0,0,+1, },
+ },
+ { /*input.*/ { "A", "b" }, /* #7 */
+ /*expect*/ { 0,0,-1, },
+ },
+#ifdef NO_WAIVER
+ /* XXX I do not yet know whether strcoll really should reject
+ characters outside the multibyte character range. */
+ {
+ /* <WAIVER> */
+ /*input.*/ { "\200\216\217", "ABCDEFG" }, /* #8 */
+ /*expect*/ { EINVAL,0,0, },
+ },
+ {
+ /* <WAIVER> */
+ /*input.*/ { "ABCZEFG", "\200\216\217" }, /* #9 */
+ /*expect*/ { EINVAL,0,0, },
+ },
+#endif
+ { .is_last = 1 } /* Last element. */
+ }
+ },
+#endif
+ {
+ { Tstrcoll, TST_LOC_end }
+ }
+};
diff --git a/test/locale-mbwc/dat_strfmon.c b/test/locale-mbwc/dat_strfmon.c
new file mode 100644
index 000000000..8c28bba52
--- /dev/null
+++ b/test/locale-mbwc/dat_strfmon.c
@@ -0,0 +1,268 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN CLIBRARY
+ *
+ * FILE: dat_strfmon.c
+ *
+ * STRFMON: size_t strfmon (char *buf, size_t nbyte, char *fmt, ... );
+ */
+
+/*
+ * NOTE:
+ *
+ * The buffer size should be enough to contain a string including a
+ * null char.
+ * Returns the number of bytes of the string (NOT including a null char).
+ */
+
+TST_STRFMON tst_strfmon_loc [] = {
+ {
+ { Tstrfmon, TST_LOC_de },
+ {
+ {
+ /* #01 */
+ /*inp*/ { 24, "%n %% %i", 123.00 },
+ /*exp*/ { 0,1,23, "123,00 EUR % 123,00 EUR" },
+ },
+ {
+ /* #02 */
+ /*inp*/ { 24, "%n %% %i", 123.00 },
+ /*exp*/ { 0,1,23, "123,00 EUR % 123,00 EUR" },
+ },
+ {
+ /* #03 */
+ /*inp*/ { 23, "%n %% %i", 123.00 },
+ /*exp*/ { E2BIG,1,-1, "" },
+ },
+ {
+ /* #04 */
+ /*inp*/ { 31, "%n|%i", 1234.561 },
+ /*exp*/ { 0,1,25, "1.234,56 EUR|1.234,56 EUR"},
+ },
+ {
+ /* #05 */
+ /*inp*/ { 33, "%n|%i", -1234.561 },
+ /*exp*/ { 0,1,27, "-1.234,56 EUR|-1.234,56 EUR"},
+ },
+ {
+ /* #06 */
+ /*inp*/ { 33, "%13n|%12i", 1234.561 },
+ /*exp*/ { 0,1,26, " 1.234,56 EUR|1.234,56 EUR"},
+ },
+ {
+ /* #07 */
+ /*inp*/ { 33, "%12n|%12i", -1234.561 },
+ /*exp*/ { 0,1,27, "-1.234,56 EUR|-1.234,56 EUR"},
+ },
+ {
+ /* #08 */
+ /*inp*/ { 33, "%#5n|%#5i", 1234.561 },
+ /*exp*/ { 0,1,29, " 1.234,56 EUR| 1.234,56 EUR"},
+ },
+ {
+ /* #09 */
+ /*inp*/ { 33, "%#5n|%#5i", -1234.561 },
+ /*exp*/ { 0,1,29, "- 1.234,56 EUR|- 1.234,56 EUR"},
+ },
+ {
+ /* #10 */
+ /*inp*/ { 33, "%=*#5n|%=*#5i", 1234.561 },
+ /*exp*/ { 0,1,29, " *1.234,56 EUR| *1.234,56 EUR"},
+ },
+ {
+ /* #11 */
+ /*inp*/ { 33, "%=0#5n|%=0#5i", -1234.561 },
+ /*exp*/ { 0,1,29, "-01.234,56 EUR|-01.234,56 EUR"},
+ },
+ {
+ /* #12 */
+ /*inp*/ { 33, "%^#5n|%^#5i", -1234.561 },
+ /*exp*/ { 0,1,27, "- 1234,56 EUR|- 1234,56 EUR"},
+ },
+ {
+ /* #13 */
+ /*inp*/ { 33, "%#5.0n|%#5.0i", 1234.444 },
+ /*exp*/ { 0,1,23, " 1.234 EUR| 1.234 EUR" },
+ },
+ {
+ /* #14 */
+ /*inp*/ { 33, "%#5.0n|%#5.4i", -1234.555 },
+ /*exp*/ { 0,1,28, "- 1.235 EUR|- 1.234,5550 EUR"},
+ },
+ {
+ /* #15 */
+ /*inp*/ { 33, "%(#5n|%!(#5i", -1234.561 },
+ /*exp*/ { 0,1,27, "( 1.234,56 EUR)|( 1.234,56)"},
+ },
+ { .is_last = 1 }
+ }
+ },
+ {
+ { Tstrfmon, TST_LOC_enUS },
+ {
+ {
+ /* #01 */
+ /*inp*/ { 22, "%n %% %i", 123.00 },
+ /*exp*/ { 0,1,20, "$123.00 % USD 123.00" },
+ },
+ {
+ /* #02 */
+ /*inp*/ { 21, "%n %% %i", 123.00 },
+ /*exp*/ { 0,1,20, "$123.00 % USD 123.00" },
+ },
+ {
+ /* #03 */
+ /*inp*/ { 20, "%n %% %i", 123.00 },
+ /*exp*/ { E2BIG,1,-1, "" },
+ },
+ {
+ /* #04 */
+ /*inp*/ { 30, "%n|%i", 1234.561 },
+ /*exp*/ { 0,1,22, "$1,234.56|USD 1,234.56" },
+ },
+ {
+ /* #05 */
+ /*inp*/ { 32, "%n|%i", -1234.561 },
+ /*exp*/ { 0,1,24, "-$1,234.56|-USD 1,234.56" },
+ },
+ {
+ /* #06 */
+ /*inp*/ { 30, "%12n|%12i", 1234.561 },
+ /*exp*/ { 0,1,25, " $1,234.56|USD 1,234.56"},
+ },
+ {
+ /* #07 */
+ /*inp*/ { 32, "%12n|%12i", -1234.561 },
+ /*exp*/ { 0,1,26, " -$1,234.56|-USD 1,234.56"},
+ },
+ {
+ /* #08 */
+ /*inp*/ { 32, "%#5n|%#5i", 1234.561 },
+ /*exp*/ { 0,1,26, " $ 1,234.56| USD 1,234.56"},
+ },
+ {
+ /* #09 */
+ /*inp*/ { 32, "%#5n|%#5i", -1234.561 },
+ /*exp*/ { 0,1,26, "-$ 1,234.56|-USD 1,234.56"},
+ },
+ {
+ /* #10 */
+ /*inp*/ { 32, "%=*#5n|%=*#5i", 1234.561 },
+ /*exp*/ { 0,1,26, " $*1,234.56| USD *1,234.56"},
+ },
+ {
+ /* #11 */
+ /*inp*/ { 32, "%=0#5n|%=0#5i", -1234.561 },
+ /*exp*/ { 0,1,26, "-$01,234.56|-USD 01,234.56"},
+ },
+ {
+ /* #12 */
+ /*inp*/ { 32, "%^#5n|%^#5i", -1234.561 },
+ /*exp*/ { 0,1,24, "-$ 1234.56|-USD 1234.56" },
+ },
+ {
+ /* #13 */
+ /*inp*/ { 32, "%#5.0n|%#5.0i", 1234.444 },
+ /*exp*/ { 0,1,20, " $ 1,234| USD 1,234" },
+ },
+ {
+ /* #14 */
+ /*inp*/ { 32, "%#5.0n|%#5.4i", -1234.555 },
+ /*exp*/ { 0,1,25, "-$ 1,235|-USD 1,234.5550"},
+ },
+ {
+ /* #15 */
+ /*inp*/ { 32, "%(#5n|%!(#5i", -1234.561 },
+ /*exp*/ { 0,1,24, "($ 1,234.56)|( 1,234.56)" },
+ },
+ { .is_last = 1 }
+ }
+ },
+ {
+#if 0
+ { Tstrfmon, TST_LOC_eucJP },
+#else
+ { Tstrfmon, TST_LOC_ja_UTF8 },
+#endif
+ {
+ {
+ /* #01 */
+ /*inp*/ { 17, "%n %% %i", 123.00 },
+ /*exp*/ { 0,1,15, "\241\357123 % JPY 123" },
+ },
+ {
+ /* #02 */
+ /*inp*/ { 16, "%n %% %i", 123.00 },
+ /*exp*/ { 0,1,15, "\241\357123 % JPY 123" },
+ },
+ {
+ /* #03 */
+ /*inp*/ { 15, "%n %% %i", 123.00 },
+ /*exp*/ { E2BIG,1,-1, "" },
+ },
+ {
+ /* #04 */
+ /*inp*/ { 30, "%n|%i", 1234.561 },
+ /*exp*/ { 0,1,17, "\241\3571,235|JPY 1,235" },
+ },
+ {
+ /* #05 */
+ /*inp*/ { 32, "%n|%i", -1234.561 },
+ /*exp*/ { 0,1,19, "\241\357-1,235|JPY -1,235" },
+ },
+ {
+ /* #06 */
+ /*inp*/ { 32, "%12n|%12i", 1234.561 },
+ /*exp*/ { 0,1,25, " \241\3571,235| JPY 1,235" },
+ },
+ {
+ /* #07 */
+ /*inp*/ { 32, "%12n|%12i", -1234.561 },
+ /*exp*/ { 0,1,25, " \241\357-1,235| JPY -1,235" },
+ },
+ {
+ /* #08 */
+ /*inp*/ { 32, "%#5n|%#5i", 1234.561 },
+ /*exp*/ { 0,1,21, " \241\357 1,235| JPY 1,235" },
+ },
+ {
+ /* #09 */
+ /*inp*/ { 32, "%#5n|%#5i", -1234.561 },
+ /*exp*/ { 0,1,21, "\241\357- 1,235|JPY - 1,235" },
+ },
+ {
+ /* #10 */
+ /*inp*/ { 32, "%=*#5n|%=*#5i", 1234.561 },
+ /*exp*/ { 0,1,21, " \241\357*1,235| JPY *1,235" },
+ },
+ {
+ /* #11 */
+ /*inp*/ { 32, "%=0#5n|%=0#5i", -1234.561 },
+ /*exp*/ { 0,1,21, "\241\357-01,235|JPY -01,235" },
+ },
+ {
+ /* #12 */
+ /*inp*/ { 32, "%^#5n|%^#5i", -1234.561 },
+ /*exp*/ { 0,1,19, "\241\357- 1235|JPY - 1235" },
+ },
+ {
+ /* #13 */
+ /*inp*/ { 32, "%#5.0n|%#5.0i", 1234.444 },
+ /*exp*/ { 0,1,21, " \241\357 1,234| JPY 1,234" },
+ },
+ {
+ /* #14 */
+ /*inp*/ { 32, "%#5.0n|%#5.4i", -1234.555 },
+ /*exp*/ { 0,1,26, "\241\357- 1,235|JPY - 1,234.5550"},
+ },
+ {
+ /* #15 */
+ /*inp*/ { 32, "%(#5n|%!(#5i", -1234.561 },
+ /*exp*/ { 0,1,19, "(\241\357 1,235)|( 1,235)" },
+ },
+ { .is_last = 1 }
+ }
+ },
+ {
+ { Tstrfmon, TST_LOC_end }
+ }
+};
diff --git a/test/locale-mbwc/dat_strxfrm.c b/test/locale-mbwc/dat_strxfrm.c
new file mode 100644
index 000000000..0c672d3d7
--- /dev/null
+++ b/test/locale-mbwc/dat_strxfrm.c
@@ -0,0 +1,147 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN CLIBRARY
+ *
+ * FILE: dat_strxfrm.c
+ *
+ * STRXFRM: size_t strxfrm (char *s1, const char s2, size_t n);
+ */
+
+
+/*
+ * NOTE:
+ *
+ * Return value and errno value are checked only for 2nd string:
+ * org2[]; n1 and n2 don't mean bytes to be translated.
+ * It means a buffer size including a null character.
+ * Results of this test depens on results of strcoll().
+ * If you got errors, check both test results.
+ *
+ * The buffer size should be enough to contain a string including a
+ * null char. Returns the number of bytes of the string (NOT
+ * including a null char).
+ */
+
+
+
+TST_STRXFRM tst_strxfrm_loc [] = {
+ {
+ { Tstrxfrm, TST_LOC_de },
+ {
+ { /*inp*/ { "\xf6\xc4\xe4\xfc", "\xf6\xc4\xe4\xfc", 17, 17 }, /* #01 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "aA", "Aa", 10, 10 }, /* #02 */
+ /*exp*/ { 0,0,0 , },
+ },
+ { /*inp*/ { "Aa", "aA", 10, 10 }, /* #03 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "abc", "", 13, 13 }, /* #04 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "a", "B", 7, 7 }, /* #05 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "B", "a", 7, 7 }, /* #06 */
+ /*exp*/ { 0,0,0, },
+ },
+ {
+ /* hiragana == latin1 */
+ /*inp*/ { "abc", "\244\241\244\242", 13, 9 }, /* #07 */
+ /*exp*/ { 0,0,0, },
+ },
+ { .is_last = 1 }
+ }
+ },
+ {
+ { Tstrxfrm, TST_LOC_enUS },
+ {
+ { /*inp*/ { "abcd", "abcd", 17, 17 }, /* #01 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "aA", "Aa", 10, 10 }, /* #02 */
+ /*exp*/ { 0,0,0 , },
+ },
+ { /*inp*/ { "Aa", "aA", 10, 10 }, /* #03 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "abc", "", 13, 13 }, /* #04 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "a", "B", 7, 7 }, /* #05 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "B", "a", 7, 7 }, /* #06 */
+ /*exp*/ { 0,0,0, },
+ },
+#ifdef NO_WAIVER
+ {
+ /* <WAIVER> */
+ /*inp*/ { "abc", "\244\241\244\242", 13, 9 }, /* #07 */
+ /*exp*/ { EINVAL,0,0, },
+ },
+#endif
+ { .is_last = 1 }
+ }
+ },
+#if 0
+ {
+ { Tstrxfrm, TST_LOC_eucJP }, /* ??? */
+ {
+ {
+ /* #01 */
+ /*inp*/ { "\244\242\244\241", "\244\241\244\242", 5, 5 },
+ /*exp*/ { 0,0,0, },
+ },
+ {
+ /* #02 */
+ /*inp*/ { "\244\241\244\242", "\244\242\244\241", 5, 5 },
+ /*exp*/ { 0,0,0, },
+ },
+ {
+ /* #03 */
+ /*inp*/ { "\244\242\216\261", "\216\261\244\242", 5, 5 },
+ /*exp*/ { 0,0,0, },
+ },
+#ifdef NO_WAIVER
+ {
+ /*inp*/ { "AAA", "\216\217", 5, 5 }, /* #04 */ /* <WAIVER> */
+ /*exp*/ { EINVAL,0,0, },
+ },
+#endif
+ { .is_last = 1 }
+ }
+ },
+#else
+ {
+ { Tstrxfrm, TST_LOC_ja_UTF8 }, /* ??? */
+ {
+ {
+ /* #01 */
+ /*inp*/ { "\343\201\202\343\201\201", "\343\201\201\343\201\202", 7, 7 },
+ /*exp*/ { 0,0,0, },
+ },
+ {
+ /* #02 */
+ /*inp*/ { "\343\201\201\343\201\202", "\343\201\202\343\201\201", 7, 7 },
+ /*exp*/ { 0,0,0, },
+ },
+ {
+ /* #03 */
+ /*inp*/ { "\343\201\202\357\275\261", "\357\275\261343\201\202", 7, 7 },
+ /*exp*/ { 0,0,0, },
+ },
+#ifdef NO_WAIVER
+ {
+ /*inp*/ { "AAA", "\340\277\220", 5, 5 }, /* #04 */ /* <WAIVER> */
+ /*exp*/ { EINVAL,0,0, },
+ },
+#endif
+ { .is_last = 1 }
+ }
+ },
+#endif
+ {
+ { Tstrxfrm, TST_LOC_end }
+ }
+};
diff --git a/test/locale-mbwc/dat_swscanf.c b/test/locale-mbwc/dat_swscanf.c
new file mode 100644
index 000000000..088f165f7
--- /dev/null
+++ b/test/locale-mbwc/dat_swscanf.c
@@ -0,0 +1,185 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN CLIBRARY
+ *
+ * FILE: dat_swscanf.c
+ *
+ * SWSCANF: int swscanf (const wchar_t *s, const wchar_t *fmt, ...);
+ */
+
+
+#include <errno.h>
+#include <stdlib.h>
+#include "tst_types.h"
+#include "tgn_locdef.h"
+
+
+TST_SWSCANF tst_swscanf_loc [] =
+{
+ {
+ { Tswscanf, TST_LOC_de },
+ {
+ /*------------------------ 01 -----------------------*/
+ { { {
+ 0x002D, 0x0031, 0x003A, /* %d: -1 */
+ 0x0032, 0x003A, /* %u: 2 */
+ 0x0033, 0x002C, 0x0033, 0x003A, /* %f: 3.3 */
+ 0x00E4, 0x003A, /* %c: 'ä' */
+ 0x00C4, 0x00DC, 0x0000, 0x0000, /* %s: "ÄÜ" */
+ },
+ L"%d:%u:%f:%c:%s", 0
+ },
+ { /* The fields are: err_val, ret_flag, ret_val,
+ val_int, val_uns, val_flt, val_c, val_s, val_S. */
+ 0,1,5,
+ -1, 2, 3.3, 'ä', "ÄÜ", { 0x0000, },
+ },
+ },
+ /*------------------------ 02 -----------------------*/
+ { { {
+ 0x00E4, 0x00C4, 0x0000 /* "äÄ" */
+ },
+ L"%lc", 'C'
+ },
+ { 0,1,1,
+ 0,0,0,0,"", { 0x00E4, 0x0000 },
+ },
+ },
+ /*------------------------ 03 -----------------------*/
+ { { {
+ 0x00E4, 0x00C4, 0x0000 /* "äÄ" */
+ },
+ L"%ls", 'S'
+ },
+ { 0,1,1,
+ 0,0,0,0,"", { 0x00E4, 0x00C4, 0x0000 },
+ },
+ },
+ /*------------------------ 04 -----------------------*/
+ /* <NO_WAIVER> x 2 */
+ { { {
+ 0x00E4, 0x00C4, 0x0000 /* "äÄ" */
+ },
+ L"1%d:2%d:3%d:4%d:5%d:6%d:7%d:8%d:9%d", 0
+ },
+#ifdef SHOJI_IS_RIGHT
+ { 1,EINVAL,1,WEOF,
+ 0,0,0,0,"", { 0x0000 },
+#else
+ { 0,1,0,
+ 0,0,0,0,"", { 0x0000 },
+#endif
+ },
+ },
+ /*---------------------------------------------------*/
+ { .is_last = 1} /* Last element. */
+ }
+ },
+ {
+ { Tswscanf, TST_LOC_enUS },
+ {
+ /*------------------------ 01 -----------------------*/
+ { { { 0x002D, 0x0031, 0x003A,
+ 0x0032, 0x003A,
+ 0x0035, 0x0034, 0x002E, 0x0033, 0x0045, 0x002D, 0x0031, 0x003A,
+ 0x0041, 0x003A,
+ 0x0061, 0x0062, 0x0000, 0x0000,
+ },
+ L"%d:%u:%f:%c:%s", 0
+ },
+ { 0,1,5,
+ -1, 2, 5.43, 'A', "ab", { 0x0000 },
+ },
+ },
+ /*------------------------ 02 -----------------------*/
+ /* <NO_WAIVER> x 2 */
+ { { {
+ 0x0063, 0x0064, 0x0000
+ },
+ L"%C", 'C'
+ },
+ { 0,1,1,
+ 0,0,0,0,"", { 0x0063, 0x0000 },
+ },
+ },
+ /*------------------------ 03 -----------------------*/
+ { { {
+ 0x0063, 0x0064, 0x0000
+ },
+ L"%S", 'S'
+ },
+ { 0,1,1,
+ 0,0,0,0,"", { 0x0063, 0x0064, 0x0000 },
+ },
+ },
+ /*---------------------------------------------------*/
+ { .is_last = 1} /* Last element. */
+ }
+ },
+ {
+#if 0
+ { Tswscanf, TST_LOC_eucJP },
+#else
+ { Tswscanf, TST_LOC_ja_UTF8 },
+#endif
+ {
+ /*------------------------ 01 -----------------------*/
+ { { { 0x002D, 0x0031, 0x003A,
+ 0x0032, 0x003A,
+ 0x0033, 0x002E, 0x0033, 0x003A,
+ 0x0062, 0x003A,
+ 0x0061, 0x0062, 0x0000, 0x0000,
+ },
+ L"%d:%u:%f:%c:%s", 0
+ },
+ { 0,1,5,
+ -1, 2, 3.3, 'b', "ab", { 0x0000 }
+ },
+ },
+ /*------------------------ 02 -----------------------*/
+ { { {
+ 0x30A2, 0x30A4, 0x0000
+ },
+ L"%ls", 'S'
+ },
+ { 0,1,1,
+ 0,0,0,0,"", { 0x30A2, 0x30A4, 0x0000 }
+ },
+ },
+ /*------------------------ 03 -----------------------*/
+ { { {
+ 0x0031, 0x003A,
+ 0x0030, 0x003A,
+ 0x0033, 0x002E, 0x0039, 0x003A,
+ 0x0061, 0x003A,
+ 0x0063, 0x0064, 0x0000, 0x0000,
+ },
+ L"%2$d:%1$u:%3$f:%4$c:%5$s", 0
+ },
+ { 0,1,5,
+ 0, 1, 3.9, 'a', "cd", { 0x0000 }
+ },
+ },
+#ifdef SHOJI_IS_RIGHT
+ /* XXX This test does not make sense. The format string is
+ L"\x1\x2\x25\x53" and it is supposed to match the words
+ 0x30A2, 0x30A4, 0x0001. */
+ /*------------------------ 04 -----------------------*/
+ /* <NO_WAIVER> x 2 */
+ { { {
+ 0x30A2, 0x30A4, 0x0001, 0x0000
+ },
+ { 0x0001,0x0002,0x0025,0x0053,0x0000 }, 'S'
+ },
+ { EILSEQ,1,EOF,
+ 0,0,0,0,"", { 0x0000 }
+ },
+ },
+#endif
+ /*---------------------------------------------------*/
+ { .is_last = 1} /* Last element. */
+ }
+ },
+ {
+ { Tswscanf, TST_LOC_end }
+ }
+};
diff --git a/test/locale-mbwc/dat_tow-funcs.h b/test/locale-mbwc/dat_tow-funcs.h
new file mode 100644
index 000000000..44564374c
--- /dev/null
+++ b/test/locale-mbwc/dat_tow-funcs.h
@@ -0,0 +1,24 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: dat_tow-funcs.h
+ *
+ * ISW*: int tow*( wint_t wc );
+ */
+
+#include <errno.h>
+#include <stdlib.h>
+#include <wctype.h>
+#include "tst_types.h"
+#include "tgn_locdef.h"
+
+#define TST_TOW_LOC(FUNC, func) \
+ TST_TOW## FUNC tst_tow## func ##_loc[]
+
+#define TST_TOW_REC(locale, func) \
+ { Ttow## func, TST_LOC_## locale },
+
+/*
+ * NOTE:
+ * need more test data!
+ */
diff --git a/test/locale-mbwc/dat_towctrans.c b/test/locale-mbwc/dat_towctrans.c
new file mode 100644
index 000000000..cf3712a21
--- /dev/null
+++ b/test/locale-mbwc/dat_towctrans.c
@@ -0,0 +1,97 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: dat_towctrans.c
+ *
+ * TOWCTRANS: wint_t towctrans (wint_t wc, wctrans_t charclass);
+ */
+
+#include <errno.h>
+#include <stdlib.h>
+#include <wctype.h>
+#include "tst_types.h"
+#include "tgn_locdef.h"
+
+/*
+ * NOTE:
+ * Set ret_flg = 1, when a return value is expected to be 0 (FALSE).
+ * Set ret_flg = 0, when a return value is expected to be non-zero (TRUE).
+ *
+ * Since the functions return *non*-zero value for TRUE, can't
+ * compare an actual return value with an expected return value.
+ * Set the ret_flg=0 for TRUE cases and the tst_isw*() will check
+ * the non-zero value.
+ *
+ * { { WEOF }, { 0,0,1,0 } },
+ * | |
+ * | ret_val: an expected return value
+ * ret_flg: if 1, compare an actual return value with the
+ * ret_val; if 0, the test program checks
+ * the actual return value.
+ *
+ * CAUTION: if a charclass is invalid, the test function gives
+ * towctrans() an invalid wctrans object instead of a return value
+ * from wctrans() which is supposed to be 0.
+ */
+
+TST_TOWCTRANS tst_towctrans_loc [] = {
+ {
+ { Ttowctrans, TST_LOC_C },
+ {
+#ifdef SHOJI_IS_RIGHT
+ { { 0x0010, "xxxxxxx" }, { EINVAL,1,0x0010 } },
+#else
+ { { 0x0010, "xxxxxxx" }, { 0, 1,0x0010 } },
+#endif
+ { { 0x007F, "tolower" }, { 0, 1,0x007F } },
+ { { 0x0061, "toupper" }, { 0, 1,0x0041 } },
+ { { 0x0041, "tolower" }, { 0, 1,0x0061 } },
+ { .is_last = 1 }
+ }
+ },
+ {
+ { Ttowctrans, TST_LOC_de },
+ {
+#ifdef SHOJI_IS_RIGHT
+ { { 0x0010, "tojkata" }, { EINVAL,1,0x0010 } },
+#else
+ { { 0x0010, "tojkata" }, { 0, 1,0x0010 } },
+#endif
+ { { 0x0080, "tolower" }, { 0, 1,0x0080 } },
+ { { 0x00EC, "toupper" }, { 0, 1,0x00CC } },
+ { { 0x00CC, "tolower" }, { 0, 1,0x00EC } },
+ { .is_last = 1 }
+ }
+ },
+ {
+ { Ttowctrans, TST_LOC_enUS },
+ {
+#ifdef SHOJI_IS_RIGHT
+ { { 0x0010, "xxxxxxx" }, { EINVAL,1,0x0010 } },
+#else
+ { { 0x0010, "xxxxxxx" }, { 0, 1,0x0010 } },
+#endif
+ { { 0x007F, "tolower" }, { 0, 1,0x007F } },
+ { { 0x0061, "toupper" }, { 0, 1,0x0041 } },
+ { { 0x0041, "tolower" }, { 0, 1,0x0061 } },
+ { .is_last = 1 }
+ }
+ },
+ {
+#if 0
+ { Ttowctrans, TST_LOC_eucJP },
+#else
+ { Ttowctrans, TST_LOC_ja_UTF8 },
+#endif
+ {
+ { { 0xFF21, "tolower" }, { 0, 1,0xFF41 } },
+ { { 0xFF41, "toupper" }, { 0, 1,0xFF21 } },
+ { { 0x30A1, "tojhira" }, { 0, 1,0x3041 } },
+ { { 0x3041, "tojkata" }, { 0, 1,0x30A1 } },
+ { .is_last = 1 }
+ }
+ },
+ {
+ { Ttowctrans, TST_LOC_end }
+ }
+};
diff --git a/test/locale-mbwc/dat_towlower.c b/test/locale-mbwc/dat_towlower.c
new file mode 100644
index 000000000..b6dd275fd
--- /dev/null
+++ b/test/locale-mbwc/dat_towlower.c
@@ -0,0 +1,47 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: dat_towlower.c
+ *
+ * ISW*: int towlower (wint_t wc);
+ */
+
+
+#include "dat_tow-funcs.h"
+
+
+TST_TOW_LOC (LOWER, lower) = {
+
+ { TST_TOW_REC (de, lower)
+ {
+ { { WEOF }, { 0, 1, (wint_t)-1 } },
+ { { 0x0080 }, { 0, 1, 0x0080 } },
+ { { 0x00CC }, { 0, 1, 0x00EC } },
+ { { 0x00EC }, { 0, 1, 0x00EC } },
+ { .is_last = 1 } /* Last element. */
+ }
+ },
+ { TST_TOW_REC (enUS, lower)
+ {
+ { { WEOF }, { 0, 1, (wint_t)-1 } },
+ { { 0x007F }, { 0, 1, 0x007F } },
+ { { 0x0041 }, { 0, 1, 0x0061 } },
+ { { 0x0061 }, { 0, 1, 0x0061 } },
+ { .is_last = 1 } /* Last element. */
+ }
+ },
+#if 0
+ { TST_TOW_REC (eucJP, lower)
+#else
+ { TST_TOW_REC (ja_UTF8, lower)
+#endif
+ {
+ { { 0x007F }, { 0, 1, 0x007F } },
+ { { 0x0080 }, { 0, 1, 0x0080 } },
+ { { 0xFF21 }, { 0, 1, 0xFF41 } },
+ { { 0xFF41 }, { 0, 1, 0xFF41 } },
+ { .is_last = 1 } /* Last element. */
+ }
+ },
+ { TST_TOW_REC (end, lower) }
+};
diff --git a/test/locale-mbwc/dat_towupper.c b/test/locale-mbwc/dat_towupper.c
new file mode 100644
index 000000000..704ad44a6
--- /dev/null
+++ b/test/locale-mbwc/dat_towupper.c
@@ -0,0 +1,47 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: dat_towupper.c
+ *
+ * ISW*: int towupper (wint_t wc);
+ */
+
+
+#include "dat_tow-funcs.h"
+
+
+TST_TOW_LOC (UPPER, upper) = {
+
+ { TST_TOW_REC (de, upper)
+ {
+ { { WEOF }, { 0, 1, (wint_t)-1 } },
+ { { 0x0080 }, { 0, 1, 0x0080 } },
+ { { 0x00EC }, { 0, 1, 0x00CC } },
+ { { 0x00CC }, { 0, 1, 0x00CC } },
+ { .is_last = 1 } /* Last element. */
+ }
+ },
+ { TST_TOW_REC (enUS, upper)
+ {
+ { { WEOF }, { 0, 1, (wint_t)-1 } },
+ { { 0x0080 }, { 0, 1, 0x0080 } },
+ { { 0x0041 }, { 0, 1, 0x0041 } },
+ { { 0x0061 }, { 0, 1, 0x0041 } },
+ { .is_last = 1 } /* Last element. */
+ }
+ },
+#if 0
+ { TST_TOW_REC (eucJP, upper)
+#else
+ { TST_TOW_REC (ja_UTF8, upper)
+#endif
+ {
+ { { WEOF }, { 0, 1, (wint_t)-1 } },
+ { { 0x007F }, { 0, 1, 0x007F } },
+ { { 0xFF41 }, { 0, 1, 0xFF21 } },
+ { { 0xFF21 }, { 0, 1, 0xFF21 } },
+ { .is_last = 1 } /* Last element. */
+ }
+ },
+ { TST_TOW_REC (end, upper) }
+};
diff --git a/test/locale-mbwc/dat_wcrtomb.c b/test/locale-mbwc/dat_wcrtomb.c
new file mode 100644
index 000000000..055f7b08c
--- /dev/null
+++ b/test/locale-mbwc/dat_wcrtomb.c
@@ -0,0 +1,122 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: dat_wcrtomb.c
+ *
+ * WCRTOMB: intwcrtomb (char *s, wchar_t wc, mbstate_t *ps);
+ *
+ */
+
+TST_WCRTOMB tst_wcrtomb_loc [] = {
+ {
+ { Twcrtomb, TST_LOC_de },
+ {
+ /* #01 : normal case */
+ { /*input.*/ { 1, 0x00FC, 0,0 },
+ /*expect*/ { 0, 1,1, "ü" },
+ },
+ /* #02 : normal case */
+ { /*input.*/ { 1, 0x00D6, 0,0 },
+ /*expect*/ { 0, 1,1, "Ö" },
+ },
+ /* #03 : error case */
+ { /*input.*/ { 1, 0xFFA1, 0,0 },
+ /*expect*/ { EILSEQ,1,-1, "" },
+ },
+ /* #04 : */
+ { /*input.*/ { 0, 0x0041, 0,0 },
+ /*expect*/ { 0, 1,1, "" },
+ },
+ /* #05 : */
+ { /*input.*/ { 0, 0x0092, 0,0 },
+ /*expect*/ { 0, 1,1, "" },
+ },
+ { .is_last = 1 }
+ }
+ },
+ {
+ { Twcrtomb, TST_LOC_enUS },
+ {
+ /* #01 : normal case */
+ { /*input.*/ { 1, 0x0041, 0,0 },
+ /*expect*/ { 0, 1,1, "A" },
+ },
+ /* #02 : normal case */
+ { /*input.*/ { 1, 0x0042, 0,0 },
+ /*expect*/ { 0, 1,1, "B" },
+ },
+ /* #03 : error case */
+ /* <WAIVER> x 2 */
+ { /*input.*/ { 1, 0x0092, 0,0 }, /* assume ascii */
+ /*expect*/ { EILSEQ,1,-1, "" },
+ },
+ /* #04 : */
+ { /*input.*/ { 0, 0x0041, 0,0 },
+ /*expect*/ { 0, 1,1, "" },
+ },
+ /* #05 : */
+ { /*input.*/ { 0, 0x0092, 0,0 },
+ /*expect*/ { 0, 1,1, "" },
+ },
+ { .is_last = 1 }
+ }
+ },
+#if 0
+ {
+ { Twcrtomb, TST_LOC_eucJP },
+ {
+ /* #01 : normal case */
+ { /*input.*/ { 1, 0x3042, 0,0 },
+ /*expect*/ { 0, 1,2, "\244\242" },
+ },
+ /* #02 : normal case */
+ { /*input.*/ { 1, 0x3044, 0,0 },
+ /*expect*/ { 0, 1,2, "\244\244" },
+ },
+ /* #03 : normal case */
+ { /*input.*/ { 1, 0x008E, 0,0 },
+ /*expect*/ { EILSEQ, 1,-1, "" },
+ },
+ /* #04 : */
+ { /*input.*/ { 0, 0x3042, 0,0 },
+ /*expect*/ { 0, 0,0, "" },
+ },
+ /* #05 : */
+ { /*input.*/ { 0, 0x008E, 0,0 },
+ /*expect*/ { 0, 0,0, "" },
+ },
+ { .is_last = 1 }
+ }
+ },
+#else
+ {
+ { Twcrtomb, TST_LOC_ja_UTF8 },
+ {
+ /* #01 : normal case */
+ { /*input.*/ { 1, 0x3042, 0,0 },
+ /*expect*/ { 0, 1,3, "\343\201\202" },
+ },
+ /* #02 : normal case */
+ { /*input.*/ { 1, 0x3044, 0,0 },
+ /*expect*/ { 0, 1,3, "\343\201\204" },
+ },
+ /* #03 : normal case */
+ { /*input.*/ { 1, 0x008E, 0,0 },
+ /*expect*/ { EILSEQ, 1,-1, "" },
+ },
+ /* #04 : */
+ { /*input.*/ { 0, 0x3042, 0,0 },
+ /*expect*/ { 0, 0,0, "" },
+ },
+ /* #05 : */
+ { /*input.*/ { 0, 0x008E, 0,0 },
+ /*expect*/ { 0, 0,0, "" },
+ },
+ { .is_last = 1 }
+ }
+ },
+#endif
+ {
+ { Twcrtomb, TST_LOC_end }
+ }
+};
diff --git a/test/locale-mbwc/dat_wcscat.c b/test/locale-mbwc/dat_wcscat.c
new file mode 100644
index 000000000..f54e72de3
--- /dev/null
+++ b/test/locale-mbwc/dat_wcscat.c
@@ -0,0 +1,116 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: dat_wcscat.c
+ *
+ * WCSCAT: wchar_t *wcscat (wchar_t *ws1, wchar_t *ws2)
+ */
+
+/* NOTE:
+ Since this is not a locale sensitive function,
+ it doesn't make sense to test the function on some
+ locales. Better make different test cases for each locale ...
+ (Also some wc* functions are not locale sensitive.)
+*/
+
+
+TST_WCSCAT tst_wcscat_loc [] = {
+
+ {
+ {Twcscat, TST_LOC_de},
+ {
+ /* 1 */
+ {{{ 0x00C1,0x00C2,0x0000 },
+ { 0x00C3,0x00C4,0x0000 }, },
+ { 0, 0, 0,
+ { 0x00C1,0x00C2,0x00C3,0x00C4,0x0000 } },
+ },
+ /* 2 */
+ {{{ 0x0001,0x0002,0x0000 },
+ { 0x0003,0x0004,0x0000 }, },
+ { 0, 0, 0,
+ { 0x0001,0x0002,0x0003,0x0004,0x0000 } },
+ },
+ /* 3 */
+ {{{ 0x0000 },
+ { 0x00C3,0x00C4,0x0000 }, },
+ { 0, 0, 0,
+ { 0x00C3,0x00C4,0x0000 } },
+ },
+ /* 4 */
+ {{{ 0x0001,0xFFFF,0x0000 },
+ { 0x0080,0x0090,0x0000 }, },
+ { 0, 0, 0,
+ { 0x0001,0xFFFF,0x0080,0x0090,0x0000 } },
+ },
+ {.is_last = 1}
+ }
+ },
+ {
+ {Twcscat, TST_LOC_enUS},
+ {
+ /* 1 */
+ {{{ 0x0041,0x0042,0x0000 },
+ { 0x0043,0x0044,0x0000 }, },
+ { 0, 0, 0,
+ { 0x0041,0x0042,0x0043,0x0044,0x0000 } },
+ },
+ /* 2 */
+ {{{ 0x0001,0x0002,0x0000 },
+ { 0x0003,0x0004,0x0000 }, },
+ { 0, 0, 0,
+ { 0x0001,0x0002,0x0003,0x0004,0x0000 } },
+ },
+ /* 3 */
+ {{{ 0x0000 },
+ { 0x0043,0x0044,0x0000 }, },
+ { 0, 0, 0,
+ { 0x0043,0x0044,0x0000 } },
+ },
+ /* 4 */
+ {{{ 0x0001,0xFFFF,0x0000 },
+ { 0x0080,0x0090,0x0000 }, },
+ { 0, 0, 0,
+ { 0x0001,0xFFFF,0x0080,0x0090,0x0000 } },
+ },
+ {.is_last = 1}
+ }
+ },
+ {
+#if 0
+ {Twcscat, TST_LOC_eucJP},
+#else
+ {Twcscat, TST_LOC_ja_UTF8},
+#endif
+ {
+ /* 1 */
+ {{{ 0x30A2,0x74E0,0x0000 },
+ { 0xFF71,0x0041,0x0000 }, },
+ { 0, 0, 0,
+ { 0x30A2,0x74E0,0xFF71,0x0041,0x0000 } },
+ },
+ /* 2 */
+ {{{ 0x0001,0x0002,0x0000 },
+ { 0x0003,0x0004,0x0000 }, },
+ { 0, 0, 0,
+ { 0x0001,0x0002,0x0003,0x0004,0x0000 } },
+ },
+ /* 3 */
+ {{{ 0x30A2,0xFF71,0x0000 },
+ { 0x0000 }, },
+ { 0, 0, 0,
+ { 0x30A2,0xFF71,0x0000 } },
+ },
+ /* 4 */
+ {{{ 0x0001,0xFFFF,0x0000 },
+ { 0x0080,0x0090,0x0000 }, },
+ { 0, 0, 0,
+ { 0x0001,0xFFFF,0x0080,0x0090,0x0000 } },
+ },
+ {.is_last = 1}
+ }
+ },
+ {
+ {Twcscat, TST_LOC_end}
+ }
+};
diff --git a/test/locale-mbwc/dat_wcschr.c b/test/locale-mbwc/dat_wcschr.c
new file mode 100644
index 000000000..aa355e98e
--- /dev/null
+++ b/test/locale-mbwc/dat_wcschr.c
@@ -0,0 +1,94 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: dat_wcschr.c
+ *
+ * WCSCHR: wchar_t *wcschr (const wchar_t *ws, wchar_t wc);
+ */
+
+TST_WCSCHR tst_wcschr_loc [] = {
+
+ { { Twcschr, TST_LOC_de },
+ {
+ { /*input.*/ { { 0x00C1,0x00C2,0x00C3,0x0000 }, 0x00C0 }, /* #1 */
+ /*expect*/ { 0,1,(wchar_t *)NULL },
+ },
+ { /*input.*/ { { 0x00C1,0x00C2,0x00C3,0x0000 }, 0x00C1 }, /* #2 */
+ /*expect*/ { 0,0,0 },
+ },
+ { /*input.*/ { { 0x00C1,0x00C2,0x00C3,0x0000 }, 0x00C2 }, /* #3 */
+ /*expect*/ { 0,0,0 },
+ },
+ { /*input.*/ { { 0x00C1,0x00C2,0x00C3,0x0000 }, 0x00C3 }, /* #4 */
+ /*expect*/ { 0,0,0 },
+ },
+ { /*input.*/ { { 0x00C1,0x00C2,0x00C3,0x0000 }, 0x0000 }, /* #5 */
+ /*expect*/ { 0,0,0 },
+ },
+ { /*input.*/ { { 0x0000,0x00C2,0x00C3,0x0000 }, 0x00C1 }, /* #6 */
+ /*expect*/ { 0,1,(wchar_t *)NULL },
+ },
+ { /*input.*/ { { 0x0000,0x00C2,0x00C3,0x0000 }, 0x0000 }, /* #7 */
+ /*expect*/ { 0,0,0 },
+ },
+ { .is_last = 1 }
+ }
+ },
+ { { Twcschr, TST_LOC_enUS },
+ {
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 }, 0x0040 }, /* #1 */
+ /*expect*/ { 0,1,(wchar_t *)NULL },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 }, 0x0041 }, /* #2 */
+ /*expect*/ { 0,0,0 },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 }, 0x0042 }, /* #3 */
+ /*expect*/ { 0,0,0 },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 }, 0x0043 }, /* #4 */
+ /*expect*/ { 0,0,0 },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 }, 0x0000 }, /* #5 */
+ /*expect*/ { 0,0,0 },
+ },
+ { /*input.*/ { { 0x0000,0x0042,0x0043,0x0000 }, 0x0041 }, /* #6 */
+ /*expect*/ { 0,1,(wchar_t *)NULL },
+ },
+ { /*input.*/ { { 0x0000,0x0042,0x0043,0x0000 }, 0x0000 }, /* #7 */
+ /*expect*/ { 0,0,0 },
+ },
+ { .is_last = 1 }
+ }
+ },
+#if 0
+ { { Twcschr, TST_LOC_eucJP },
+#else
+ { { Twcschr, TST_LOC_ja_UTF8 },
+#endif
+ {
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 }, 0x3040 }, /* #1 */
+ /*expect*/ { 0,1,(wchar_t *)NULL },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 }, 0x3041 }, /* #2 */
+ /*expect*/ { 0,0,0 },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 }, 0x3042 }, /* #3 */
+ /*expect*/ { 0,0,0 },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 }, 0x3043 }, /* #4 */
+ /*expect*/ { 0,0,0 },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 }, 0x0000 }, /* #5 */
+ /*expect*/ { 0,0,0 },
+ },
+ { /*input.*/ { { 0x0000,0x3042,0x3043,0x0000 }, 0x3041 }, /* #6 */
+ /*expect*/ { 0,1,(wchar_t *)NULL },
+ },
+ { /*input.*/ { { 0x0000,0x3042,0x3043,0x0000 }, 0x0000 }, /* #7 */
+ /*expect*/ { 0,0,0 },
+ },
+ { .is_last = 1 }
+ }
+ },
+ { { Twcschr, TST_LOC_end } }
+};
diff --git a/test/locale-mbwc/dat_wcscmp.c b/test/locale-mbwc/dat_wcscmp.c
new file mode 100644
index 000000000..a2da5519b
--- /dev/null
+++ b/test/locale-mbwc/dat_wcscmp.c
@@ -0,0 +1,137 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: dat_wcscmp.c
+ *
+ * WCSCMP: int wcscmp (const wchar_t *ws1, const wchar_t *ws2);
+ */
+
+/* NOTE:
+ This is not a locale sensitive function and
+ it may not make sence testing it for each locale ...
+*/
+
+
+TST_WCSCMP tst_wcscmp_loc [] = {
+ {
+ { Twcscmp, TST_LOC_de },
+ {
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
+ { 0x00D1,0x00D2,0x00D3,0x0000 }, }, /* #1 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x0000,0x00D1,0x00D3,0x0000 },
+ { 0x0000,0x00D2,0x00D3,0x0000 }, }, /* #2 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x00D1,0x00D1,0x00D3,0x0000 },
+ { 0x0000,0x00D2,0x00D3,0x0000 }, }, /* #3 */
+ /*expect*/ { 0,1,1, },
+ },
+ { /*input.*/ { { 0x0000,0x00D2,0x00D3,0x0000 },
+ { 0x00D1,0x00D1,0x00D3,0x0000 }, }, /* #4 */
+ /*expect*/ { 0,1,-1, },
+ },
+ { /*input.*/ { { 0x00D1,0x00D5,0x00D3,0x0000 },
+ { 0x00D1,0x00D2,0x00D3,0x0000 }, }, /* #5 */
+ /*expect*/ { 0,1,1, },
+ },
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
+ { 0x00D1,0x00D2,0x00D9,0x0000 }, }, /* #6 */
+ /*expect*/ { 0,1,-1, },
+ },
+ { /*input.*/ { { 0x00D1,0x00D2,0x0000 },
+ { 0x00D1,0x00D2,0x00D9,0x0000 }, }, /* #7 */
+ /*expect*/ { 0,1,-1, },
+ },
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D9,0x0000 },
+ { 0x00D1,0x00D2,0x0000 }, }, /* #8 */
+ /*expect*/ { 0,1,1, },
+ },
+ { .is_last = 1 }
+ }
+ },
+ {
+ { Twcscmp, TST_LOC_enUS },
+ {
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0041,0x0042,0x0043,0x0000 }, }, /* #1 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x0000,0x0041,0x0043,0x0000 },
+ { 0x0000,0x0042,0x0043,0x0000 }, }, /* #2 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x0041,0x0041,0x0043,0x0000 },
+ { 0x0000,0x0042,0x0043,0x0000 }, }, /* #3 */
+ /*expect*/ { 0,1,1, },
+ },
+ { /*input.*/ { { 0x0000,0x0042,0x0043,0x0000 },
+ { 0x0041,0x0041,0x0043,0x0000 }, }, /* #4 */
+ /*expect*/ { 0,1,-1, },
+ },
+ { /*input.*/ { { 0x0041,0x0045,0x0043,0x0000 },
+ { 0x0041,0x0042,0x0043,0x0000 }, }, /* #5 */
+ /*expect*/ { 0,1,1, },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0041,0x0042,0x0049,0x0000 }, }, /* #6 */
+ /*expect*/ { 0,1,-1, },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0000 },
+ { 0x0041,0x0042,0x0049,0x0000 }, }, /* #7 */
+ /*expect*/ { 0,1,-1, },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0049,0x0000 },
+ { 0x0041,0x0042,0x0000 }, }, /* #8 */
+ /*expect*/ { 0,1,1, },
+ },
+ { .is_last = 1 }
+ }
+ },
+ {
+#if 0
+ { Twcscmp, TST_LOC_eucJP},
+#else
+ { Twcscmp, TST_LOC_ja_UTF8},
+#endif
+ {
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
+ { 0x3041,0x3042,0x3043,0x0000 }, }, /* #1 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x0000,0x3041,0x3043,0x0000 },
+ { 0x0000,0x3042,0x3043,0x0000 }, }, /* #2 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x3041,0x3041,0x3043,0x0000 },
+ { 0x0000,0x3042,0x3043,0x0000 }, }, /* #3 */
+ /*expect*/ { 0,1,1, },
+ },
+ { /*input.*/ { { 0x0000,0x3042,0x3043,0x0000 },
+ { 0x3041,0x3041,0x3043,0x0000 }, }, /* #4 */
+ /*expect*/ { 0,1,-1, },
+ },
+ { /*input.*/ { { 0x3041,0x3045,0x3043,0x0000 },
+ { 0x3041,0x3042,0x3043,0x0000 }, }, /* #5 */
+ /*expect*/ { 0,1,1, },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
+ { 0x3041,0x3042,0x3049,0x0000 }, }, /* #6 */
+ /*expect*/ { 0,1,-1, },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x0000 },
+ { 0x3041,0x3042,0x3049,0x0000 }, }, /* #7 */
+ /*expect*/ { 0,1,-1, },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3049,0x0000 },
+ { 0x3041,0x3042,0x0000 }, }, /* #8 */
+ /*expect*/ { 0,1,1, },
+ },
+ { .is_last = 1 }
+ }
+ },
+ {
+ { Twcschr, TST_LOC_end}
+ }
+};
diff --git a/test/locale-mbwc/dat_wcscoll.c b/test/locale-mbwc/dat_wcscoll.c
new file mode 100644
index 000000000..a9733ad8b
--- /dev/null
+++ b/test/locale-mbwc/dat_wcscoll.c
@@ -0,0 +1,210 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: dat_wcscoll.c
+ *
+ * WCSCOLL: int wcscoll (const wchar_t *ws1, const wchar_t *ws2);
+ */
+
+/*
+ * CAUTION:
+ * When LC_COLLATE (or LC_ALL) is set for ja_JP.EUC,
+ * wcscoll() core-dumps for big values such as 0x3041
+ * (0x0041 is okay) in glibc 2.1.2.
+ *
+ * NOTE:
+ * a) When 0 is expected as a return value, set ret_flg=1.
+ * - the return value is compared with an expected value: ret_val.
+ * b) When a positive value is expected as a return value,
+ * set ret_flg=0 and set cmp_flg=+1.
+ * - the return value is not compared with the expected value
+ * (can not be compared); instead, the test program checks
+ * if the return value is positive when cmp_flg=+1.
+ * c) When a negative value is expected as a return value,
+ * ......
+ * d) When data contains invalid values, set err_val to the expected errno.
+ * Set ret_flg=0 and cmp_flg=0 so that it doesn't compare
+ * the return value with an expected value or doesn't check
+ * the sign of the return value.
+ *
+ *
+ * -------------------------------------------
+ * CASE err_val ret_flg ret_val cmp_flg
+ * -------------------------------------------
+ * a) 0 1 0 0
+ * b) 0 0 0 +1
+ * c) 0 0 0 -1
+ * d) EINVAL 0 0 0
+ * -------------------------------------------
+ */
+
+
+TST_WCSCOLL tst_wcscoll_loc [] = {
+
+ { { Twcscoll, TST_LOC_de },
+ {
+ { /*input.*/ { { 0x00E1,0x00E2,0x00E3,0x0000 },
+ { 0x00E1,0x00E2,0x00E3,0x0000 }, }, /* #1 */
+ /*expect*/ { 0,1,0, 0, },
+ },
+ { /*input.*/ { { 0x0000,0x00E1,0x00E3,0x0000 },
+ { 0x0000,0x00E2,0x00E3,0x0000 }, }, /* #2 */
+ /*expect*/ { 0,1,0, 0, },
+ },
+ { /*input.*/ { { 0x00E1,0x00E1,0x00E3,0x0000 },
+ { 0x0000,0x00E2,0x00E3,0x0000 }, }, /* #3 */
+ /*expect*/ { 0,0,0, +1, },
+ },
+ { /*input.*/ { { 0x0000,0x00E2,0x00E3,0x0000 },
+ { 0x00E1,0x00E1,0x00E3,0x0000 }, }, /* #4 */
+ /*expect*/ { 0,0,0, -1, },
+ },
+ { /*input.*/ { { 0x00E1,0x0042,0x00E3,0x0000 },
+ { 0x00E1,0x0061,0x00E3,0x0000 }, }, /* #5 */
+ /*expect*/ { 0,0,0, +1, },
+ },
+ { /*input.*/ { { 0x00E1,0x0061,0x00E3,0x0000 },
+ { 0x00E1,0x0042,0x00E3,0x0000 }, }, /* #6 */
+ /*expect*/ { 0,0,0, -1, },
+ },
+ { /*input.*/ { { 0x00E1,0x00E2,0x0000 },
+ { 0x00E1,0x00E2,0x00E9,0x0000 }, }, /* #7 */
+ /*expect*/ { 0,0,0, -1, },
+ },
+ { /*input.*/ { { 0x00E1,0x00E2,0x00E9,0x0000 },
+ { 0x00E1,0x00E2,0x0000 }, }, /* #8 */
+ /*expect*/ { 0,0,0, +1, },
+ },
+ { /*input.*/ { { 0x00E1,0x0092,0x00E9,0x0000 },
+ { 0x00E1,0x008E,0x00E9,0x0000 }, }, /* #9 */
+ /*expect*/ { 0,0,0, +1, },
+ },
+ { /*input.*/ { { 0x00E1,0x008E,0x00E9,0x0000 },
+ { 0x00E1,0x0092,0x00E9,0x0000 }, }, /* #10 */
+ /*expect*/ { 0,0,0, -1, },
+ },
+ { .is_last = 1 }
+ }
+ },
+ { { Twcscoll, TST_LOC_en },
+ {
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0041,0x0042,0x0043,0x0000 }, }, /* #1 */
+ /*expect*/ { 0,1,0, 0, },
+ },
+ { /*input.*/ { { 0x0000,0x0041,0x0043,0x0000 },
+ { 0x0000,0x0042,0x0043,0x0000 }, }, /* #2 */
+ /*expect*/ { 0,1,0, 0, },
+ },
+ { /*input.*/ { { 0x0041,0x0041,0x0043,0x0000 },
+ { 0x0000,0x0042,0x0043,0x0000 }, }, /* #3 */
+ /*expect*/ { 0,0,0, +1, },
+ },
+ { /*input.*/ { { 0x0000,0x0042,0x0043,0x0000 },
+ { 0x0041,0x0041,0x0043,0x0000 }, }, /* #4 */
+ /*expect*/ { 0,0,0, -1, },
+ },
+#ifdef SHOJI_IS_RIGHT
+ /* <WAIVER> */ /* assume ascii */
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0041,0x0061,0x0043,0x0000 }, }, /* #5 */
+ /*expect*/ { 0,0,0, -1, },
+ },
+ /* <WAIVER> */ /* assume ascii */
+ { /*input.*/ { { 0x0041,0x0061,0x0043,0x0000 },
+ { 0x0041,0x0042,0x0043,0x0000 }, }, /* #6 */
+ /*expect*/ { 0,0,0, +1, },
+ },
+#else
+ /* XXX Correct order is lowercase before uppercase. */
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0041,0x0061,0x0043,0x0000 }, }, /* #5 */
+ /*expect*/ { 0,0,0, +1, },
+ },
+ { /*input.*/ { { 0x0041,0x0061,0x0043,0x0000 },
+ { 0x0041,0x0042,0x0043,0x0000 }, }, /* #6 */
+ /*expect*/ { 0,0,0, -1, },
+ },
+#endif
+ { /*input.*/ { { 0x0041,0x0042,0x0000 },
+ { 0x0041,0x0042,0x0049,0x0000 }, }, /* #7 */
+ /*expect*/ { 0,0,0, -1, },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0049,0x0000 },
+ { 0x0041,0x0042,0x0000 }, }, /* #8 */
+ /*expect*/ { 0,0,0, +1, },
+ },
+#ifdef SHOJI_IS_RIGHT
+ { /*input.*/ { { 0x0041,0x0092,0x0049,0x0000 },
+ { 0x0041,0x008E,0x0049,0x0000 }, }, /* #9 */
+ /*expect*/ { 0,0,0, +1, },
+ },
+ { /*input.*/ { { 0x0041,0x008E,0x0049,0x0000 },
+ { 0x0041,0x0092,0x0049,0x0000 }, }, /* #10 */
+ /*expect*/ { 0,0,0, -1, },
+ },
+#else
+ /* Do not assume position of character out of range. */
+ { /*input.*/ { { 0x0041,0x0092,0x0049,0x0000 },
+ { 0x0041,0x008E,0x0049,0x0000 }, }, /* #9 */
+ /*expect*/ { 0,0,0, 0, },
+ },
+ { /*input.*/ { { 0x0041,0x008E,0x0049,0x0000 },
+ { 0x0041,0x0092,0x0049,0x0000 }, }, /* #10 */
+ /*expect*/ { 0,0,0, 0, },
+ },
+#endif
+ { .is_last = 1 }
+ }
+ },
+#if 0
+ { { Twcscoll, TST_LOC_eucJP },
+#else
+ { { Twcscoll, TST_LOC_ja_UTF8 },
+#endif
+ {
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
+ { 0x3041,0x3042,0x3043,0x0000 }, }, /* #1 */
+ /*expect*/ { 0,1,0, 0, },
+ },
+ { /*input.*/ { { 0x0000,0x3041,0x3043,0x0000 },
+ { 0x0000,0x3042,0x3043,0x0000 }, }, /* #2 */
+ /*expect*/ { 0,1,0, 0, },
+ },
+ { /*input.*/ { { 0x3041,0x3041,0x3043,0x0000 },
+ { 0x0000,0x3042,0x3043,0x0000 }, }, /* #3 */
+ /*expect*/ { 0,0,0, +1, },
+ },
+ { /*input.*/ { { 0x0000,0x3042,0x3043,0x0000 },
+ { 0x3041,0x3041,0x3043,0x0000 }, }, /* #4 */
+ /*expect*/ { 0,0,0, -1, },
+ },
+ { /*input.*/ { { 0x3041,0x0042,0x3043,0x0000 },
+ { 0x3041,0x0061,0x3043,0x0000 }, }, /* #5 */
+ /*expect*/ { 0,0,0, -1, },
+ },
+ { /*input.*/ { { 0x3041,0x0061,0x3043,0x0000 },
+ { 0x3041,0x0042,0x3043,0x0000 }, }, /* #6 */
+ /*expect*/ { 0,0,0, +1, },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0xFF71,0x0000 },
+ { 0x3041,0x3042,0x30A2,0x0000 }, }, /* #7 */
+ /*expect*/ { 0,0,0, -1, },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x30A2,0x0000 },
+ { 0x3041,0x3042,0xFF71,0x0000 }, }, /* #8 */
+ /*expect*/ { 0,0,0, +1, },
+ },
+ { /*input.*/ { { 0x30FF,0x3092,0x3049,0x0000 },
+ { 0x3041,0x308E,0x3049,0x0000 }, }, /* #9 */
+ /*expect*/ { 0,0,0, -1, },
+ },
+ { /*input.*/ { { 0x3041,0x308E,0x3049,0x0000 },
+ { 0x30FF,0x3092,0x3049,0x0000 }, }, /* #10 */
+ /*expect*/ { 0,0,0, +1, },
+ },
+ { .is_last = 1 }
+ }
+ },
+ { { Twcscoll, TST_LOC_end } }
+};
diff --git a/test/locale-mbwc/dat_wcscpy.c b/test/locale-mbwc/dat_wcscpy.c
new file mode 100644
index 000000000..b376bfc5c
--- /dev/null
+++ b/test/locale-mbwc/dat_wcscpy.c
@@ -0,0 +1,44 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: dat_wcscpy.c
+ *
+ * WCSCPY: wchar_t *wcscpy (wchar_t *ws1, const wchar_t *ws2);
+ */
+
+TST_WCSCPY tst_wcscpy_loc [] = {
+
+ { { Twcscpy, TST_LOC_de },
+ {
+ { { { 0x00F1,0x00F2,0x00F3,0x0000 }, }, /* 1 */
+ { 0,0,0, { 0x00F1,0x00F2,0x00F3,0x0000, } }, },
+ { { { 0x0000,0x00F2,0x00F3,0x0000 }, }, /* 2 */
+ { 0,0,0, { 0x0000, } }, },
+ { .is_last = 1 }
+ }
+ },
+ { { Twcscpy, TST_LOC_enUS },
+ {
+ { { { 0x0041,0x0082,0x0043,0x0000 }, }, /* 1 */
+ { 0,0,0, { 0x0041,0x0082,0x0043,0x0000, } }, },
+ { { { 0x0000,0x0082,0x0043,0x0000 }, }, /* 2 */
+ { 0,0,0, { 0x0000, } }, },
+ { .is_last = 1 }
+ }
+ },
+#if 0
+ { { Twcscpy, TST_LOC_eucJP },
+#else
+ { { Twcscpy, TST_LOC_ja_UTF8 },
+#endif
+ {
+ { { { 0x3041,0x0092,0x3043,0x0000 }, }, /* 1 */
+ { 0,0,0, { 0x3041,0x0092,0x3043,0x0000, } }, },
+ { { { 0x0000,0x0092,0x3043,0x0000 }, }, /* 2 */
+ { 0,0,0, { 0x0000, } }, },
+ { .is_last = 1 }
+ }
+ },
+ { { Twcscpy, TST_LOC_end }}
+
+};
diff --git a/test/locale-mbwc/dat_wcscspn.c b/test/locale-mbwc/dat_wcscspn.c
new file mode 100644
index 000000000..f6eb0c3bb
--- /dev/null
+++ b/test/locale-mbwc/dat_wcscspn.c
@@ -0,0 +1,164 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: dat_wcscspn.c
+ *
+ * WCSCSPN: size_t wcscspn (const wchar_t *ws1, const wchar_t *ws2);
+ */
+
+
+TST_WCSCSPN tst_wcscspn_loc [] = {
+
+ { { Twcscspn, TST_LOC_de },
+ {
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
+ { 0x00D1,0x0000 }, }, /* #1 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
+ { 0x00D2,0x0000 }, }, /* #2 */
+ /*expect*/ { 0,1,1, },
+ },
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
+ { 0x00D3,0x0000 }, }, /* #3 */
+ /*expect*/ { 0,1,2, },
+ },
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
+ { 0x00D2,0x00D3,0x0000 }, }, /* #4 */
+ /*expect*/ { 0,1,1, },
+ },
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
+ { 0x00D2,0x00D3,0x00D4,0x0000 }, }, /* #5 */
+ /*expect*/ { 0,1,1, },
+ },
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
+ { 0x00D3,0x00D4,0x00D5,0x0000 }, }, /* #6 */
+ /*expect*/ { 0,1,2, },
+ },
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
+ { 0x00D1,0x00D2,0x00D3,0x0000 }, }, /* #7 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x0000,0x00D2,0x00D3,0x0000 },
+ { 0x00D2,0x000 }, }, /* #8 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
+ { 0x0000,0x00D2,0x00D3,0x0000 }, }, /* #9 */
+ /*expect*/ { 0,1,3, },
+ },
+ { /*input.*/ { { 0x00D1,0x00D2,0x0000 },
+ { 0x00D1,0x00D2,0x00D3,0x0000 }, }, /* #10 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x00D1,0x00D2,0x0000 },
+ { 0x00D1,0x00D3,0x00D4,0x0000 }, }, /* #11 */
+ /*expect*/ { 0,1,0, },
+ },
+ { .is_last = 1 }
+ }
+ },
+ { { Twcscspn, TST_LOC_enUS },
+ {
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0041,0x0000 }, }, /* #1 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0042,0x0000 }, }, /* #2 */
+ /*expect*/ { 0,1,1, },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0043,0x0000 }, }, /* #3 */
+ /*expect*/ { 0,1,2, },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0042,0x0043,0x0000 }, }, /* #4 */
+ /*expect*/ { 0,1,1, },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0042,0x0043,0x0044,0x0000 }, }, /* #5 */
+ /*expect*/ { 0,1,1, },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0043,0x0044,0x0045,0x0000 }, }, /* #6 */
+ /*expect*/ { 0,1,2, },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0041,0x0042,0x0043,0x0000 }, }, /* #7 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x0000,0x0042,0x0043,0x0000 },
+ { 0x0042,0x000 }, }, /* #8 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0000,0x0042,0x0043,0x0000 }, }, /* #9 */
+ /*expect*/ { 0,1,3, },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0000 },
+ { 0x0041,0x0042,0x0043,0x0000 }, }, /* #10 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0000 },
+ { 0x0041,0x0043,0x0044,0x0000 }, }, /* #11 */
+ /*expect*/ { 0,1,0, },
+ },
+ { .is_last = 1 }
+ }
+ },
+#if 0
+ { { Twcscspn, TST_LOC_eucJP },
+#else
+ { { Twcscspn, TST_LOC_ja_UTF8 },
+#endif
+ {
+ { /*input.*/ { { 0x3041,0x3042,0x0043,0x0000 },
+ { 0x3041,0x0000 }, }, /* #1 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x0043,0x0000 },
+ { 0x3042,0x0000 }, }, /* #2 */
+ /*expect*/ { 0,1,1, },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
+ { 0x3043,0x0000 }, }, /* #3 */
+ /*expect*/ { 0,1,2, },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
+ { 0x3042,0x3043,0x0000 }, }, /* #4 */
+ /*expect*/ { 0,1,1, },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
+ { 0x3042,0x3043,0x3044,0x0000 }, }, /* #5 */
+ /*expect*/ { 0,1,1, },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
+ { 0x3043,0x3044,0x3045,0x0000 }, }, /* #6 */
+ /*expect*/ { 0,1,2, },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
+ { 0x3041,0x3042,0x3043,0x0000 }, }, /* #7 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x0000,0x3042,0x3043,0x0000 },
+ { 0x3042,0x0000 }, }, /* #8 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
+ { 0x0000,0x3042,0x3043,0x0000 }, }, /* #9 */
+ /*expect*/ { 0,1,3, },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x0000 },
+ { 0x3041,0x3042,0x3043,0x0000 }, }, /* #10 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x0000 },
+ { 0x3041,0x3043,0x3044,0x0000 }, }, /* #11 */
+ /*expect*/ { 0,1,0, },
+ },
+ { .is_last = 1 }
+ }
+ },
+ { { Twcscspn, TST_LOC_end }}
+};
diff --git a/test/locale-mbwc/dat_wcslen.c b/test/locale-mbwc/dat_wcslen.c
new file mode 100644
index 000000000..7bb2c892b
--- /dev/null
+++ b/test/locale-mbwc/dat_wcslen.c
@@ -0,0 +1,62 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN CLIBRARY
+ *
+ * FILE: dat_wcslen.c
+ *
+ * WCSLEN: size_t wcslen (const wchar_t *ws);
+ */
+
+
+/*
+ * NOTE:
+ *
+ * a header in each expected data:
+ *
+ * int err_val; ... expected value for errno
+ * <typ> ret_flg; ... set ret_flg=1 to compare an expected
+ * value with an actual value
+ * <typ> ret_val; ... expected value for return
+ */
+
+
+TST_WCSLEN tst_wcslen_loc [] = {
+
+ { { Twcslen, TST_LOC_de },
+ {
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 } }, /* #01 */
+ /*expect*/ { 0,1,3, },
+ },
+ { /*input.*/ { { 0x0000 } }, /* #02 */
+ /*expect*/ { 0,1,0, },
+ },
+ { .is_last = 1 }
+ }
+ },
+ { { Twcslen, TST_LOC_enUS },
+ {
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 } }, /* #01 */
+ /*expect*/ { 0,1,3, },
+ },
+ { /*input.*/ { { 0x0000 } }, /* #02 */
+ /*expect*/ { 0,1,0, },
+ },
+ { .is_last = 1 }
+ }
+ },
+#if 0
+ { { Twcslen, TST_LOC_eucJP },
+#else
+ { { Twcslen, TST_LOC_ja_UTF8 },
+#endif
+ {
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 } }, /* #01 */
+ /*expect*/ { 0,1,3, },
+ },
+ { /*input.*/ { { 0x0000 } }, /* #02 */
+ /*expect*/ { 0,1,0, },
+ },
+ { .is_last = 1 }
+ }
+ },
+ { { Twcslen, TST_LOC_end }}
+};
diff --git a/test/locale-mbwc/dat_wcsncat.c b/test/locale-mbwc/dat_wcsncat.c
new file mode 100644
index 000000000..9d1e46b99
--- /dev/null
+++ b/test/locale-mbwc/dat_wcsncat.c
@@ -0,0 +1,158 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: dat_wcsncat.c
+ *
+ * WCSNCAT: wchar_t *wcsncat (wchar_t *ws1, wchar_t *ws2, size_t n);
+ */
+
+
+/*
+ * Note:
+ * A terminating null wide chararacter is always appended to
+ * the result: ws1.
+ *
+ */
+
+
+TST_WCSNCAT tst_wcsncat_loc [] = {
+ {
+ {Twcsncat, TST_LOC_de},
+ {
+ /* 1 */
+ {
+ /* Input: */
+ {{ 0x00D1,0x00D2,0x0000 },
+ { 0x00D3,0x00D4,0x0000 }, 3 },
+ /* Expect: */
+ { 0, 0, 0,
+ { 0x00D1,0x00D2,0x00D3,0x00D4,0x0000 } },
+ },
+ /* 2 */
+ {{{ 0x00D1,0x00D2,0x0000 },
+ { 0x00D3,0x00D4,0x0000 }, 2 },
+ { 0, 0, 0,
+ { 0x00D1,0x00D2,0x00D3,0x00D4,0x0000 } },
+ },
+ /* 3 */
+ {{{ 0x00E1,0x00E2,0x0000 },
+ { 0x00E3,0x00E4,0x0000 }, 1 },
+ { 0, 0, 0,
+ { 0x00E1,0x00E2,0x00E3,0x0000 } },
+ },
+ /* 4 */
+ {{{ 0x00E1,0x00E2,0x0000 },
+ { 0x00E3,0x00E4,0x0000 }, 0 },
+ { 0, 0, 0,
+ { 0x00E1,0x00E2,0x0000 } },
+ },
+ /* 5 */
+ {{{ 0x0000 },
+ { 0x00D3,0x00D4,0x0000 }, 3 },
+ { 0, 0, 0,
+ { 0x00D3,0x00D4,0x0000 } },
+ },
+ /* 6 */
+ {{{ 0x00E1,0x00E2,0x0000 },
+ { 0x0000 }, 3 },
+ { 0, 0, 0,
+ { 0x00E1,0x00E2,0x0000 } },
+ },
+ {.is_last = 1}
+ }
+ },
+ {
+ {Twcsncat, TST_LOC_enUS},
+ {
+ /* 1 */
+ {
+ /* Input: */
+ {{ 0x0041,0x0042,0x0000 },
+ { 0x0043,0x0044,0x0000 }, 3 },
+ /* Expect: */
+ { 0, 0, 0,
+ { 0x0041,0x0042,0x0043,0x0044,0x0000 } },
+ },
+ /* 2 */
+ {{{ 0x0041,0x0042,0x0000 },
+ { 0x0043,0x0044,0x0000 }, 2 },
+ { 0, 0, 0,
+ { 0x0041,0x0042,0x0043,0x0044,0x0000 } },
+ },
+ /* 3 */
+ {{{ 0x0051,0x0052,0x0000 },
+ { 0x0053,0x0054,0x0000 }, 1 },
+ { 0, 0, 0,
+ { 0x0051,0x0052,0x0053,0x0000 } },
+ },
+ /* 4 */
+ {{{ 0x0051,0x0052,0x0000 },
+ { 0x0053,0x0054,0x0000 }, 0 },
+ { 0, 0, 0,
+ { 0x0051,0x0052,0x0000 } },
+ },
+ /* 5 */
+ {{{ 0x0000 },
+ { 0x0043,0x0044,0x0000 }, 3 },
+ { 0, 0, 0,
+ { 0x0043,0x0044,0x0000 } },
+ },
+ /* 6 */
+ {{{ 0x0051,0x0052,0x0000 },
+ { 0x0000 }, 3 },
+ { 0, 0, 0,
+ { 0x0051,0x0052,0x0000 } },
+ },
+ {.is_last = 1}
+ }
+ },
+ {
+#if 0
+ {Twcsncat, TST_LOC_eucJP},
+#else
+ {Twcsncat, TST_LOC_ja_UTF8},
+#endif
+ {
+ /* 1 */
+ {{{ 0x3041,0x3042,0x0000 },
+ { 0x3043,0x3044,0x0000 }, 3 },
+ { 0, 0, 0,
+ { 0x3041,0x3042,0x3043,0x3044,0x0000 } },
+ },
+ /* 2 */
+ {{{ 0x30A2,0x30A3,0x0000 },
+ { 0xFF71,0xFF72,0x0000 }, 2 },
+ { 0, 0, 0,
+ { 0x30A2,0x30A3,0xFF71,0xFF72,0x0000 } },
+ },
+ /* 3 */
+ {{{ 0x3051,0x3052,0x0000 },
+ { 0x3053,0x3054,0x0000 }, 1 },
+ { 0, 0, 0,
+ { 0x3051,0x3052,0x3053,0x0000 } },
+ },
+ /* 4 */
+ {{{ 0x3051,0x3052,0x0000 },
+ { 0x3053,0x3054,0x0000 }, 0 },
+ { 0, 0, 0,
+ { 0x3051,0x3052,0x0000 } },
+ },
+ /* 5 */
+ {{{ 0x0000 },
+ { 0x3043,0x3044,0x0000 }, 3 },
+ { 0, 0, 0,
+ { 0x3043,0x3044,0x0000 } },
+ },
+ /* 6 */
+ {{{ 0x3051,0x3052,0x0000 },
+ { 0x0000 }, 3 },
+ { 0, 0, 0,
+ { 0x3051,0x3052,0x0000 } },
+ },
+ {.is_last = 1}
+ }
+ },
+ {
+ {Twcsncat, TST_LOC_end}
+ }
+};
diff --git a/test/locale-mbwc/dat_wcsncmp.c b/test/locale-mbwc/dat_wcsncmp.c
new file mode 100644
index 000000000..5c5963167
--- /dev/null
+++ b/test/locale-mbwc/dat_wcsncmp.c
@@ -0,0 +1,144 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: dat_wcsncmp.c
+ *
+ * WCSNCMP: int wcsncmp (const wchar_t *ws1, const wchar_t *ws2,
+ * size_t n);
+ */
+
+TST_WCSNCMP tst_wcsncmp_loc [] = {
+ {
+ { Twcsncmp, TST_LOC_de },
+ {
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
+ { 0x00D1,0x00D2,0x00D3,0x0000 }, 4 }, /* #01 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
+ { 0x00D1,0x00D2,0x00D3,0x0000 }, 3 }, /* #02 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D1,0x0000 },
+ { 0x00D1,0x00D2,0x00D3,0x0000 }, 2 }, /* #03 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
+ { 0x00D0,0x00D2,0x00D3,0x0000 }, 0 }, /* #04 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x0000,0x00D2,0x00D3,0x0000 },
+ { 0x0000,0x00D2,0x00D1,0x0000 }, 3 }, /* #05 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
+ { 0x0000,0x00D2,0x00D3,0x0000 }, 3 }, /* #06 */
+ /*expect*/ { 0,1,0x00D1, },
+ },
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
+ { 0x00D1,0x00D2,0x00D9,0x0000 }, 2 }, /* #07 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
+ { 0x00D1,0x00D2,0x00D9,0x0000 }, 3 }, /* #08 */
+ /*expect*/ { 0,1,-0x0006, },
+ },
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
+ { 0x00D1,0x00D2,0x0000 }, 4 }, /* #09 */
+ /*expect*/ { 0,1,0x00D3, },
+ },
+ { .is_last = 1 }
+ }
+ },
+ {
+ { Twcsncmp, TST_LOC_enUS },
+ {
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0041,0x0042,0x0043,0x0000 }, 4 }, /* #01 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0041,0x0042,0x0043,0x0000 }, 3 }, /* #02 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0041,0x0000 },
+ { 0x0041,0x0042,0x0043,0x0000 }, 2 }, /* #03 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0040,0x0042,0x0043,0x0000 }, 0 }, /* #04 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x0000,0x0042,0x0043,0x0000 },
+ { 0x0000,0x0042,0x0041,0x0000 }, 3 }, /* #05 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0000,0x0042,0x0043,0x0000 }, 3 }, /* #06 */
+ /*expect*/ { 0,1,0x0041, },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0041,0x0042,0x0049,0x0000 }, 2 }, /* #07 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0041,0x0042,0x0049,0x0000 }, 3 }, /* #08 */
+ /*expect*/ { 0,1,-0x0006, },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0041,0x0042,0x0000 }, 4 }, /* #09 */
+ /*expect*/ { 0,1,0x0043, },
+ },
+ { .is_last = 1 }
+ }
+ },
+ {
+#if 0
+ { Twcsncmp, TST_LOC_eucJP },
+#else
+ { Twcsncmp, TST_LOC_ja_UTF8 },
+#endif
+ {
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
+ { 0x3041,0x3042,0x3043,0x0000 }, 4 }, /* #01 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
+ { 0x3041,0x3042,0x3043,0x0000 }, 3 }, /* #02 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3041,0x0000 },
+ { 0x3041,0x3042,0x3043,0x0000 }, 2 }, /* #03 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
+ { 0x3040,0x3042,0x3043,0x0000 }, 0 }, /* #04 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x0000,0x3042,0x3043,0x0000 },
+ { 0x0000,0x3042,0x3041,0x0000 }, 3 }, /* #05 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
+ { 0x0000,0x3042,0x3043,0x0000 }, 3 }, /* #06 */
+ /*expect*/ { 0,1,0x3041, },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
+ { 0x3041,0x3042,0x3049,0x0000 }, 2 }, /* #07 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
+ { 0x3041,0x3042,0x3049,0x0000 }, 3 }, /* #08 */
+ /*expect*/ { 0,1,-0x0006, },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
+ { 0x3041,0x3042,0x0000 }, 4 }, /* #09 */
+ /*expect*/ { 0,1,0x3043, },
+ },
+ { .is_last = 1 }
+ }
+ },
+ {
+ { Twcsncmp, TST_LOC_end }
+ }
+};
diff --git a/test/locale-mbwc/dat_wcsncpy.c b/test/locale-mbwc/dat_wcsncpy.c
new file mode 100644
index 000000000..7a657838b
--- /dev/null
+++ b/test/locale-mbwc/dat_wcsncpy.c
@@ -0,0 +1,119 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: dat_wcsncpy.c
+ *
+ * WCSNCPY: wchar_t *wcsncpy (wchar_t *ws1, const wchar_t *ws2,
+ * size_t n);
+ */
+
+
+/* Note:
+ *
+ * An initial value of ws1 in the test program is defined as:
+ *
+ * #define WCSNUM_NCPY 7
+ * wchar_t ws1 [WCSSIZE] = { 0x9999, 0x9999, 0x9999, 0x9999,
+ * 0x9999, 0x9999, 0x0000 };
+ * */
+
+
+TST_WCSNCPY tst_wcsncpy_loc [] = {
+ {
+ {Twcsncpy, TST_LOC_de},
+ {
+ /* 1 */
+ {{ { 0x00D1,0x00D2,0x00D3,0x0000 }, 6 },
+ { 0,0,0, { 0x00D1,0x00D2,0x00D3,0x0000,0x0000,0x0000,0x0000 } },
+ },
+ /* 2 */
+ {{ { 0x00D1,0x00D2,0x00D3,0x0000 }, 5 },
+ { 0,0,0, { 0x00D1,0x00D2,0x00D3,0x0000,0x0000,0x9999,0x0000 } },
+ },
+ /* 3 */
+ {{ { 0x00D1,0x00D2,0x00D3,0x0000 }, 3 },
+ { 0,0,0, { 0x00D1,0x00D2,0x00D3,0x9999,0x9999,0x9999,0x0000 } },
+ },
+ /* 4 */
+ {{ { 0x00D1,0x00D2,0x00D3,0x0000 }, 2 },
+ { 0,0,0, { 0x00D1,0x00D2,0x9999,0x9999,0x9999,0x9999,0x0000 } },
+ },
+ /* 5 */
+ {{ { 0x00D1,0x00D2,0x00D3,0x0000 }, 0 },
+ { 0,0,0, { 0x9999,0x9999,0x9999,0x9999,0x9999,0x9999,0x0000 } },
+ },
+ /* 6 */
+ {{ { 0x0000,0x00D2,0x00D3,0x0000 }, 3 },
+ { 0,0,0, { 0x0000,0x0000,0x0000,0x9999,0x9999,0x9999,0x0000 } },
+ },
+ {.is_last = 1}
+ }
+ },
+ {
+ {Twcsncpy, TST_LOC_enUS},
+ {
+ /* 1 */
+ {{ { 0x0041,0x0042,0x0043,0x0000 }, 6 },
+ { 0,0,0, { 0x0041,0x0042,0x0043,0x0000,0x0000,0x0000,0x0000 } },
+ },
+ /* 2 */
+ {{ { 0x0041,0x0042,0x0043,0x0000 }, 5 },
+ { 0,0,0, { 0x0041,0x0042,0x0043,0x0000,0x0000,0x9999,0x0000 } },
+ },
+ /* 3 */
+ {{ { 0x0041,0x0042,0x0043,0x0000 }, 3 },
+ { 0,0,0, { 0x0041,0x0042,0x0043,0x9999,0x9999,0x9999,0x0000 } },
+ },
+ /* 4 */
+ {{ { 0x0041,0x0042,0x0043,0x0000 }, 2 },
+ { 0,0,0, { 0x0041,0x0042,0x9999,0x9999,0x9999,0x9999,0x0000 } },
+ },
+ /* 5 */
+ {{ { 0x0041,0x0042,0x0043,0x0000 }, 0 },
+ { 0,0,0, { 0x9999,0x9999,0x9999,0x9999,0x9999,0x9999,0x0000 } },
+ },
+ /* 6 */
+ {{ { 0x0000,0x0042,0x0043,0x0000 }, 3 },
+ { 0,0,0, { 0x0000,0x0000,0x0000,0x9999,0x9999,0x9999,0x0000 } },
+ },
+ {.is_last = 1}
+ }
+ },
+ {
+#if 0
+ {Twcsncpy, TST_LOC_eucJP},
+#else
+ {Twcsncpy, TST_LOC_ja_UTF8},
+#endif
+ {
+ /* 1 */
+ {{ { 0x3041,0x3042,0x3043,0x0000 }, 6 },
+ { 0,0,0, { 0x3041,0x3042,0x3043,0x0000,0x0000,0x0000,0x0000 } },
+ },
+ /* 2 */
+ {{ { 0x3041,0x3042,0x3043,0x0000 }, 5 },
+ { 0,0,0, { 0x3041,0x3042,0x3043,0x0000,0x0000,0x9999,0x0000 } },
+ },
+ /* 3 */
+ {{ { 0x3041,0x3042,0x3043,0x0000 }, 3 },
+ { 0,0,0, { 0x3041,0x3042,0x3043,0x9999,0x9999,0x9999,0x0000 } },
+ },
+ /* 4 */
+ {{ { 0x3041,0x3042,0x3043,0x0000 }, 2 },
+ { 0,0,0, { 0x3041,0x3042,0x9999,0x9999,0x9999,0x9999,0x0000 } },
+ },
+ /* 5 */
+ {{ { 0x3041,0x3042,0x3043,0x0000 }, 0 },
+ { 0,0,0, { 0x9999,0x9999,0x9999,0x9999,0x9999,0x9999,0x0000 } },
+ },
+ /* 6 */
+ {{ { 0x0000,0x3042,0x3043,0x0000 }, 3 },
+ { 0,0,0, { 0x0000,0x0000,0x0000,0x9999,0x9999,0x9999,0x0000 } },
+ },
+ {.is_last = 1}
+ }
+ },
+ {
+ {Twcsncpy, TST_LOC_end}
+ }
+};
diff --git a/test/locale-mbwc/dat_wcspbrk.c b/test/locale-mbwc/dat_wcspbrk.c
new file mode 100644
index 000000000..471515eb7
--- /dev/null
+++ b/test/locale-mbwc/dat_wcspbrk.c
@@ -0,0 +1,176 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: dat_wcspbrk.c
+ *
+ * WCSSTR: wchar_t *wcspbrk (const wchar_t *ws1, const wchar_t *ws2);
+ */
+
+
+/*
+ * NOTE:
+ * This is not a locale sensitive function.
+ * So those data in each locale doesn't make sense
+ * ... (redundant test cases)
+ */
+
+
+TST_WCSPBRK tst_wcspbrk_loc [] = {
+ {
+ { Twcspbrk, TST_LOC_de },
+ {
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
+ { 0x00D1,0x0000 }, }, /* #01 */
+ /*expect*/ { 0,0,0, 0x00D1 },
+ },
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
+ { 0x00D2,0x0000 }, }, /* #02 */
+ /*expect*/ { 0,0,0, 0x00D2 },
+ },
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
+ { 0x00D3,0x0000 }, }, /* #03 */
+ /*expect*/ { 0,0,0, 0x00D3 },
+ },
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
+ { 0x00D1,0x00D2,0x0000 }, }, /* #04 */
+ /*expect*/ { 0,0,0, 0x00D1 },
+ },
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
+ { 0x00D2,0x00D3,0x0000 }, }, /* #05 */
+ /*expect*/ { 0,0,0, 0x00D2 },
+ },
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
+ { 0x00D1,0x00D2,0x00D3,0x0000 }, }, /* #06 */
+ /*expect*/ { 0,0,0, 0x00D1 },
+ },
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
+ { 0x00D0,0x00D4,0x00D5,0x0000 }, }, /* #07 */
+ /*expect*/ { 0,1,(wchar_t *)NULL, 0x0000 },
+ },
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
+ { 0x00D5,0x00D0,0x00D4,0x0000 }, }, /* #08 */
+ /*expect*/ { 0,1,(wchar_t *)NULL, 0x0000 },
+ },
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
+ { 0x0000 }, }, /* #09 */
+ /*expect*/ { 0,1,(wchar_t *)NULL, 0x0000 },
+ },
+ { /*input.*/ { { 0x0000,0x00D2,0x00D3,0x0000 },
+ { 0x00D1,0x0000 }, }, /* #10 */
+ /*expect*/ { 0,1,(wchar_t *)NULL, 0x0000 },
+ },
+ { /*input.*/ { { 0x0000,0x00D2,0x00D3,0x0000 },
+ { 0x0000 }, }, /* #11 */
+ /*expect*/ { 0,1,(wchar_t *)NULL, 0x0000 },
+ },
+ { .is_last = 1 }
+ }
+ },
+ {
+ { Twcspbrk, TST_LOC_enUS },
+ {
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0041,0x0000 }, }, /* #01 */
+ /*expect*/ { 0,0,0, 0x0041 },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0042,0x0000 }, }, /* #02 */
+ /*expect*/ { 0,0,0, 0x0042 },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0043,0x0000 }, }, /* #03 */
+ /*expect*/ { 0,0,0, 0x0043 },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0041,0x0042,0x0000 }, }, /* #04 */
+ /*expect*/ { 0,0,0, 0x0041 },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0042,0x0043,0x0000 }, }, /* #05 */
+ /*expect*/ { 0,0,0, 0x0042 },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0041,0x0042,0x0043,0x0000 }, }, /* #06 */
+ /*expect*/ { 0,0,0, 0x0041 },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0040,0x0044,0x0045,0x0000 }, }, /* #07 */
+ /*expect*/ { 0,1,(wchar_t *)NULL, 0x0000 },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0045,0x0040,0x0044,0x0000 }, }, /* #08 */
+ /*expect*/ { 0,1,(wchar_t *)NULL, 0x0000 },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0000 }, }, /* #09 */
+ /*expect*/ { 0,1,(wchar_t *)NULL, 0x0000 },
+ },
+ { /*input.*/ { { 0x0000,0x0042,0x0043,0x0000 },
+ { 0x0041,0x0000 }, }, /* #10 */
+ /*expect*/ { 0,1,(wchar_t *)NULL, 0x0000 },
+ },
+ { /*input.*/ { { 0x0000,0x0042,0x0043,0x0000 },
+ { 0x0000 }, }, /* #11 */
+ /*expect*/ { 0,1,(wchar_t *)NULL, 0x0000 },
+ },
+ { .is_last = 1 }
+ }
+ },
+ {
+#if 0
+ { Twcspbrk, TST_LOC_eucJP },
+#else
+ { Twcspbrk, TST_LOC_ja_UTF8 },
+#endif
+ {
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
+ { 0x3041,0x0000 }, }, /* #01 */
+ /*expect*/ { 0,0,0, 0x3041 },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
+ { 0x3042,0x0000 }, }, /* #02 */
+ /*expect*/ { 0,0,0, 0x3042 },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
+ { 0x3043,0x0000 }, }, /* #03 */
+ /*expect*/ { 0,0,0, 0x3043 },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
+ { 0x3041,0x3042,0x0000 }, }, /* #04 */
+ /*expect*/ { 0,0,0, 0x3041 },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
+ { 0x3042,0x3043,0x0000 }, }, /* #05 */
+ /*expect*/ { 0,0,0, 0x3042 },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
+ { 0x3041,0x3042,0x3043,0x0000 }, }, /* #06 */
+ /*expect*/ { 0,0,0, 0x3041 },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
+ { 0x3042,0x3043,0x3044,0x0000 }, }, /* #07 */
+ /*expect*/ { 0,0,0, 0x3042 },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
+ { 0x3040,0x3041,0x3042,0x0000 }, }, /* #08 */
+ /*expect*/ { 0,0,0, 0x3041 },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
+ { 0x0000 }, }, /* #09 */
+ /*expect*/ { 0,1,(wchar_t *)NULL, 0x0000 },
+ },
+ { /*input.*/ { { 0x0000,0x3042,0x3043,0x0000 },
+ { 0x3041,0x0000 }, }, /* #10 */
+ /*expect*/ { 0,1,(wchar_t *)NULL, 0x0000 },
+ },
+ { /*input.*/ { { 0x0000,0x3042,0x3043,0x0000 },
+ { 0x0000 }, }, /* #11 */
+ /*expect*/ { 0,1,(wchar_t *)NULL, 0x0000 },
+ },
+ { .is_last = 1 }
+ }
+ },
+ {
+ { Twcspbrk, TST_LOC_end }
+ }
+};
diff --git a/test/locale-mbwc/dat_wcsrtombs.c b/test/locale-mbwc/dat_wcsrtombs.c
new file mode 100644
index 000000000..f8adc6cfd
--- /dev/null
+++ b/test/locale-mbwc/dat_wcsrtombs.c
@@ -0,0 +1,272 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: dat_wcsrtombs.c
+ *
+ * WCSTOMBS: size_t wcsrtombs (char *s, const wchar_t **ws,
+ * size_t n, mbstate *ps)
+ */
+
+
+/*
+ * CAUTION:
+ * Do not use a value 0x01 for string data. The test program
+ * uses it.
+ *
+ */
+
+
+TST_WCSRTOMBS tst_wcsrtombs_loc [] = {
+ {
+ { Twcsrtombs, TST_LOC_de },
+ {
+ /* #01 : Any chars including a null char should not be stored in s. */
+ { /*input.*/ { 1,1, { 0x00C4,0x00D6,0x00DC,0x0000 }, 0, 0, 0},
+ /*expect*/ { 0,1,0, "" },
+ },
+ /* #02 : Only one chars should be stored in s. No null termination. */
+ { /*input.*/ { 1,1, { 0x00C4,0x00D6,0x00DC,0x0000 }, 1, 0, 0 },
+ /*expect*/ { 0,1,1, "Ä" },
+ },
+ /* #03 : Only two chars should be stored in s. No null termination. */
+ { /*input.*/ { 1,1, { 0x00C4,0x00D6,0x00DC,0x0000 }, 2, 0, 0 },
+ /*expect*/ { 0,1,2, "ÄÖ" },
+ },
+ /* #04 : Only three chars should be stored in s. No null
+ termination. */
+ { /*input.*/ { 1,1, { 0x00C4,0x00D6,0x00DC,0x0000 }, 3, 0, 0 },
+ /*expect*/ { 0,1,3, "ÄÖÜ" },
+ },
+ /* #05 : Only three chars should be stored in s with a null
+ termination. */
+ { /*input.*/ { 1,1, { 0x00C4,0x00D6,0x00DC,0x0000 }, 4, 0, 0 },
+ /*expect*/ { 0,1,3, "ÄÖÜ" },
+ },
+ /* #06 : Only three chars should be stored in s with a null
+ termination. */
+ { /*input.*/ { 1,1, { 0x00C4,0x00D6,0x00DC,0x0000 }, 5, 0, 0 },
+ /*expect*/ { 0,1,3, "ÄÖÜ" },
+ },
+ /* #07 : Invalid mb sequence. No chars should be stored in s. */
+ { /*input.*/ { 1,1, { 0x0201,0x0221,0x0000,0x0000 }, 2, 0, 0 },
+ /*expect*/ { EILSEQ,1,(size_t)-1, "" },
+ },
+ /* #08 : s is a null pointer, no chars should be stored in s. */
+ { /*input.*/ { 0,1, { 0x00C4,0x00D6,0x00DC,0x0000 }, 0, 0, 0 },
+ /*expect*/ { 0,1,3, "" },
+ },
+ /* #09 : s is a null pointer, no chars should be stored in s. */
+ { /*input.*/ { 0,1, { 0x00C4,0x00D6,0x00DC,0x0000 }, 1, 0, 0 },
+ /*expect*/ { 0,1,3, "" },
+ },
+ /* #10 : s is a null pointer, no chars should be stored in s. */
+ { /*input.*/ { 0,1, { 0x00C4,0x00D6,0x00DC,0x0000 }, 5, 0, 0 },
+ /*expect*/ { 0,1,3, "" },
+ },
+ /* #11 : s is a null pointer. No chars should be stored in s. */
+ { /*input.*/ { 0,1, { 0x0201,0x0221,0x0000,0x0000 }, 5, 0, 0 },
+ /*expect*/ { EILSEQ,1,(size_t)-1, "" },
+ },
+ /* #12 : ws is a null wc string, no chars should be stored in s. */
+ { /*input.*/ { 1,1, { 0x0000 }, 5, 0, 0 },
+ /*expect*/ { 0,1,0, "" },
+ },
+ /* #13 : s is a null pointer, no chars should be stored in s. */
+ { /*input.*/ { 0,1, { 0x0000 }, 5, 0, 0 },
+ /*expect*/ { 0,1,0, "" },
+ },
+ { .is_last = 1 }
+ }
+ },
+ {
+ { Twcsrtombs, TST_LOC_enUS },
+ {
+ /* #01 : Any chars including a null char should not be stored in s. */
+ { /*input.*/ { 1,1, { 0x0041,0x0042,0x0043,0x0000 }, 0, 0, 0 },
+ /*expect*/ { 0,1,0, "" },
+ },
+ /* #02 : Only one chars should be stored in s. No null termination. */
+ { /*input.*/ { 1,1, { 0x0041,0x0042,0x0043,0x0000 }, 1, 0, 0 },
+ /*expect*/ { 0,1,1, "A" },
+ },
+ /* #03 : Only two chars should be stored in s. No null termination. */
+ { /*input.*/ { 1,1, { 0x0041,0x0042,0x0043,0x0000 }, 2, 0, 0 },
+ /*expect*/ { 0,1,2, "AB" },
+ },
+ /* #04 : Only three chars should be stored in s. No null
+ termination. */
+ { /*input.*/ { 1,1, { 0x0041,0x0042,0x0043,0x0000 }, 3, 0, 0 },
+ /*expect*/ { 0,1,3, "ABC" },
+ },
+ /* #05 : Only three chars should be stored in s with a null
+ termination. */
+ { /*input.*/ { 1,1, { 0x0041,0x0042,0x0043,0x0000 }, 4, 0, 0 },
+ /*expect*/ { 0,1,3, "ABC" },
+ },
+ /* #06 : Only three chars should be stored in s with a null
+ termination. */
+ { /*input.*/ { 1,1, { 0x0041,0x0042,0x0043,0x0000 }, 5, 0, 0 },
+ /*expect*/ { 0,1,3, "ABC" },
+ },
+ /* #07 : Invalid mb sequence. No chars should be stored in s. */
+ { /*input.*/ { 1,1, { 0x0201,0x0221,0x0000,0x0000 }, 2, 0, 0 },
+ /*expect*/ { EILSEQ,1,(size_t)-1, "" },
+ },
+ /* #08 : s is a null pointer, no chars should be stored in s. */
+ { /*input.*/ { 0,1, { 0x0041,0x0042,0x0043,0x0000 }, 0, 0, 0 },
+ /*expect*/ { 0,1,3, "" },
+ },
+ /* #09 : s is a null pointer, no chars should be stored in s. */
+ { /*input.*/ { 0,1, { 0x0041,0x0042,0x0043,0x0000 }, 1, 0, 0 },
+ /*expect*/ { 0,1,3, "" },
+ },
+ /* #10 : s is a null pointer, no chars should be stored in s. */
+ { /*input.*/ { 0,1, { 0x0041,0x0042,0x0043,0x0000 }, 5, 0, 0 },
+ /*expect*/ { 0,1,3, "" },
+ },
+ /* #11 : s is a null pointer. No chars should be stored in s. */
+ { /*input.*/ { 0,1, { 0x0201,0x0221,0x0000,0x0000 }, 5, 0, 0 },
+ /*expect*/ { EILSEQ,1,(size_t)-1, "" },
+ },
+ /* #12 : ws is a null wc string, no chars should be stored in s. */
+ { /*input.*/ { 1,1, { 0x0000 }, 5, 0, 0 },
+ /*expect*/ { 0,1,0, "" },
+ },
+ /* #13 : s is a null pointer, no chars should be stored in s. */
+ { /*input.*/ { 0,1, { 0x0000 }, 5, 0, 0 },
+ /*expect*/ { 0,1,0, "" },
+ },
+ { .is_last = 1 }
+ }
+ },
+#if 0
+ {
+ { Twcsrtombs, TST_LOC_eucJP },
+ {
+
+ /* #01 : Any chars including a null char should not be stored in s. */
+ { /*input.*/ { 1,1, { 0x3042,0x3044,0xFF73,0x0000 }, 0, 0, 0 },
+ /*expect*/ { 0,1,0, "" },
+ },
+ /* #02 : Only one chars should be stored in s. No null termination. */
+ { /*input.*/ { 1,1, { 0x3042,0x3044,0xFF73,0x0000 }, 2, 0, 0 },
+ /*expect*/ { 0,1,2, "\244\242" },
+ },
+ /* #03 : Only two chars should be stored in s. No null termination. */
+ { /*input.*/ { 1,1, { 0x3042,0x3044,0xFF73,0x0000 }, 4, 0, 0 },
+ /*expect*/ { 0,1,4, "\244\242\244\244" },
+ },
+ /* #04 : Only three chars should be stored in s. No null
+ termination. */
+ { /*input.*/ { 1,1, { 0x3042,0x3044,0xFF73,0x0000 }, 6, 0, 0 },
+ /*expect*/ { 0,1,6, "\244\242\244\244\216\263" },
+ },
+ /* #05 : Only three chars should be stored in s with a null
+ termination. */
+ { /*input.*/ { 1,1, { 0x3042,0x3044,0xFF73,0x0000 }, 7, 0, 0 },
+ /*expect*/ { 0,1,6, "\244\242\244\244\216\263" },
+ },
+ /* #06 : Only three chars should be stored in s with a null
+ termination. */
+ { /*input.*/ { 1,1, { 0x3042,0x3044,0xFF73,0x0000 }, 8, 0, 0 },
+ /*expect*/ { 0,1,6, "\244\242\244\244\216\263" },
+ },
+ /* #07 : Invalid mb sequence. No chars should be stored in s. */
+ { /*input.*/ { 1,1, { 0x0201,0x0221,0x0000,0x0000 }, 2, 0, 0 },
+ /*expect*/ { EILSEQ,1,-1, "" },
+ },
+ /* #08 : s is a null pointer, no chars should be stored in s. */
+ { /*input.*/ { 0,1, { 0x3042,0x3044,0xFF73,0x0000 }, 0, 0, 0 },
+ /*expect*/ { 0,1,6, "" },
+ },
+ /* #09 : s is a null pointer, no chars should be stored in s. */
+ { /*input.*/ { 0,1, { 0x3042,0x3044,0xFF73,0x0000 }, 1, 0, 0 },
+ /*expect*/ { 0,1,6, "" },
+ },
+ /* #10 : s is a null pointer, no chars should be stored in s. */
+ { /*input.*/ { 0,1, { 0x3042,0x3044,0xFF73,0x0000 }, 8, 0, 0 },
+ /*expect*/ { 0,1,6, "" },
+ },
+ /* #11 : s is a null pointer. No chars should be stored in s. */
+ { /*input.*/ { 0,1, { 0x0201,0x0221,0x0000,0x0000 }, 5, 0, 0 },
+ /*expect*/ { EILSEQ,1,(size_t)-1, "" },
+ },
+ /* #12 : ws is a null wc string, no chars should be stored in s. */
+ { /*input.*/ { 1,1, { 0x0000 }, 5, 0, 0 },
+ /*expect*/ { 0,1,0, "" },
+ },
+ /* #13 : s is a null pointer, no chars should be stored in s. */
+ { /*input.*/ { 0,1, { 0x0000 }, 5, 0, 0 },
+ /*expect*/ { 0,1,0, "" },
+ },
+ { .is_last = 1 }
+ }
+ },
+#else
+ {
+ { Twcsrtombs, TST_LOC_ja_UTF8 },
+ {
+
+ /* #01 : Any chars including a null char should not be stored in s. */
+ { /*input.*/ { 1,1, { 0x3042,0x3044,0xFF73,0x0000 }, 0, 0, 0 },
+ /*expect*/ { 0,1,0, "" },
+ },
+ /* #02 : Only one chars should be stored in s. No null termination. */
+ { /*input.*/ { 1,1, { 0x3042,0x3044,0xFF73,0x0000 }, 3, 0, 0 },
+ /*expect*/ { 0,1,3, "\343\201\202" },
+ },
+ /* #03 : Only two chars should be stored in s. No null termination. */
+ { /*input.*/ { 1,1, { 0x3042,0x3044,0xFF73,0x0000 }, 6, 0, 0 },
+ /*expect*/ { 0,1,6, "\343\201\202\343\201\204" },
+ },
+ /* #04 : Only three chars should be stored in s. No null
+ termination. */
+ { /*input.*/ { 1,1, { 0x3042,0x3044,0xFF73,0x0000 }, 9, 0, 0 },
+ /*expect*/ { 0,1,9, "\343\201\202\343\201\204\357\275\263" },
+ },
+ /* #05 : Only three chars should be stored in s with a null
+ termination. */
+ { /*input.*/ { 1,1, { 0x3042,0x3044,0xFF73,0x0000 }, 10, 0, 0 },
+ /*expect*/ { 0,1,9, "\343\201\202\343\201\204\357\275\263" },
+ },
+ /* #06 : Only three chars should be stored in s with a null
+ termination. */
+ { /*input.*/ { 1,1, { 0x3042,0x3044,0xFF73,0x0000 }, 11, 0, 0 },
+ /*expect*/ { 0,1,9, "\343\201\202\343\201\204\357\275\263" },
+ },
+ /* #07 : Invalid mb sequence. No chars should be stored in s. */
+ { /*input.*/ { 1,1, { 0x0201,0x0221,0x0000,0x0000 }, 2, 0, 0 },
+ /*expect*/ { EILSEQ,1,-1, "" },
+ },
+ /* #08 : s is a null pointer, no chars should be stored in s. */
+ { /*input.*/ { 0,1, { 0x3042,0x3044,0xFF73,0x0000 }, 0, 0, 0 },
+ /*expect*/ { 0,1,9, "" },
+ },
+ /* #09 : s is a null pointer, no chars should be stored in s. */
+ { /*input.*/ { 0,1, { 0x3042,0x3044,0xFF73,0x0000 }, 1, 0, 0 },
+ /*expect*/ { 0,1,9, "" },
+ },
+ /* #10 : s is a null pointer, no chars should be stored in s. */
+ { /*input.*/ { 0,1, { 0x3042,0x3044,0xFF73,0x0000 }, 8, 0, 0 },
+ /*expect*/ { 0,1,9, "" },
+ },
+ /* #11 : s is a null pointer. No chars should be stored in s. */
+ { /*input.*/ { 0,1, { 0x0201,0x0221,0x0000,0x0000 }, 5, 0, 0 },
+ /*expect*/ { EILSEQ,1,(size_t)-1, "" },
+ },
+ /* #12 : ws is a null wc string, no chars should be stored in s. */
+ { /*input.*/ { 1,1, { 0x0000 }, 5, 0, 0 },
+ /*expect*/ { 0,1,0, "" },
+ },
+ /* #13 : s is a null pointer, no chars should be stored in s. */
+ { /*input.*/ { 0,1, { 0x0000 }, 5, 0, 0 },
+ /*expect*/ { 0,1,0, "" },
+ },
+ { .is_last = 1 }
+ }
+ },
+#endif
+ {
+ { Twcsrtombs, TST_LOC_end }
+ }
+};
diff --git a/test/locale-mbwc/dat_wcsspn.c b/test/locale-mbwc/dat_wcsspn.c
new file mode 100644
index 000000000..06af2d6a9
--- /dev/null
+++ b/test/locale-mbwc/dat_wcsspn.c
@@ -0,0 +1,179 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: dat_wcsspn.c
+ *
+ * WCSSPN: size_t wcsspn (const wchar_t *ws1, const wchar_t *ws2);
+ */
+
+TST_WCSSPN tst_wcsspn_loc [] = {
+ {
+ { Twcsspn, TST_LOC_de },
+ {
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
+ { 0x00D1,0x0000 }, }, /* #01 */
+ /*expect*/ { 0,1,1, },
+ },
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
+ { 0x00D2,0x0000 }, }, /* #02 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
+ { 0x00D3,0x0000 }, }, /* #03 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
+ { 0x00D4,0x0000 }, }, /* #04 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
+ { 0x00D2,0x00D3,0x0000 }, }, /* #05 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
+ { 0x00D3,0x00D4,0x0000 }, }, /* #06 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
+ { 0x00D1,0x00D2,0x00D3,0x0000 }, }, /* #07 */
+ /*expect*/ { 0,1,3, },
+ },
+ { /*input.*/ { { 0x00D1,0x00D2,0x0000 },
+ { 0x00D1,0x00D2,0x00D3,0x0000 }, }, /* #08 */
+ /*expect*/ { 0,1,2, },
+ },
+ { /*input.*/ { { 0x0000,0x00D2,0x00D3,0x0000 },
+ { 0x00D2,0x0000 }, }, /* #09 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
+ { 0x0000,0x00D2,0x0000 }, }, /* #10 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x0000,0x00D2,0x00D3,0x0000 },
+ { 0x0000,0x00D2,0x0000 }, }, /* #11 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
+ { 0x00D2,0x00D1,0x0000 }, }, /* #12 */
+ /*expect*/ { 0,1,2, },
+ },
+ { .is_last = 1 }
+ }
+ },
+ {
+ { Twcsspn, TST_LOC_enUS },
+ {
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0041,0x0000 }, }, /* #01 */
+ /*expect*/ { 0,1,1, },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0042,0x0000 }, }, /* #02 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0043,0x0000 }, }, /* #03 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0044,0x0000 }, }, /* #04 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0042,0x0043,0x0000 }, }, /* #05 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0043,0x0044,0x0000 }, }, /* #06 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0041,0x0042,0x0043,0x0000 }, }, /* #07 */
+ /*expect*/ { 0,1,3, },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0000 },
+ { 0x0041,0x0042,0x0043,0x0000 }, }, /* #08 */
+ /*expect*/ { 0,1,2, },
+ },
+ { /*input.*/ { { 0x0000,0x0042,0x0043,0x0000 },
+ { 0x0042,0x0000 }, }, /* #09 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0000,0x0042,0x0000 }, }, /* #10 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x0000,0x0042,0x0043,0x0000 },
+ { 0x0000,0x0042,0x0000 }, }, /* #11 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0042,0x0041,0x0000 }, }, /* #12 */
+ /*expect*/ { 0,1,2, },
+ },
+ { .is_last = 1 }
+ }
+ },
+ {
+#if 0
+ { Twcsspn, TST_LOC_eucJP },
+#else
+ { Twcsspn, TST_LOC_ja_UTF8 },
+#endif
+ {
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
+ { 0x3041,0x0000 }, }, /* #1 */
+ /*expect*/ { 0,1,1, },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
+ { 0x3042,0x0000 }, }, /* #2 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
+ { 0x3043,0x0000 }, }, /* #3 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
+ { 0x3044,0x0000 }, }, /* #4 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
+ { 0x3042,0x3043,0x0000 }, }, /* #5 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
+ { 0x3043,0x3044,0x0000 }, }, /* #6 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
+ { 0x3041,0x3042,0x3043,0x0000 }, }, /* #7 */
+ /*expect*/ { 0,1,3, },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x0000 },
+ { 0x3041,0x3042,0x3043,0x0000 }, }, /* #8 */
+ /*expect*/ { 0,1,2, },
+ },
+ { /*input.*/ { { 0x0000,0x3042,0x3043,0x0000 },
+ { 0x3042,0x0000 }, }, /* #9 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
+ { 0x0000,0x3042,0x0000 }, }, /* #10 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x0000,0x3042,0x3043,0x0000 },
+ { 0x0000,0x3042,0x0000 }, }, /* #11 */
+ /*expect*/ { 0,1,0, },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
+ { 0x3042,0x3041,0x0000 }, }, /* #12 */
+ /*expect*/ { 0,1,2, },
+ },
+ { .is_last = 1 }
+ }
+ },
+ {
+ { Twcsspn, TST_LOC_end }
+ }
+};
diff --git a/test/locale-mbwc/dat_wcsstr.c b/test/locale-mbwc/dat_wcsstr.c
new file mode 100644
index 000000000..f999dc5c6
--- /dev/null
+++ b/test/locale-mbwc/dat_wcsstr.c
@@ -0,0 +1,175 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: dat_wcsstr.c
+ *
+ * WCSSTR: wchar_t *wcsstr (const wchar_t *ws1, const wchar_t *ws2);
+ */
+
+/*
+ * NOTE:
+ * This is not a locale sensitive function.
+ * So those data in each locale doesn't make sense ...
+ * (redundant test cases)
+ */
+
+
+TST_WCSSTR tst_wcsstr_loc [] = {
+ {
+ { Twcsstr, TST_LOC_de },
+ {
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
+ { 0x00D1,0x0000 }, }, /* #01 */
+ /*expect*/ { 0,0,0, },
+ },
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
+ { 0x00D2,0x0000 }, }, /* #02 */
+ /*expect*/ { 0,0,0, },
+ },
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
+ { 0x00D3,0x0000 }, }, /* #03 */
+ /*expect*/ { 0,0,0, },
+ },
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
+ { 0x00D1,0x00D2,0x0000 }, }, /* #04 */
+ /*expect*/ { 0,0,0, },
+ },
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
+ { 0x00D2,0x00D3,0x0000 }, }, /* #05 */
+ /*expect*/ { 0,0,0, },
+ },
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
+ { 0x00D1,0x00D2,0x00D3,0x0000 }, }, /* #06 */
+ /*expect*/ { 0,0,0, },
+ },
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
+ { 0x00D2,0x00D3,0x00D4,0x0000 }, }, /* #07 */
+ /*expect*/ { 0,1,(wchar_t *)NULL, },
+ },
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
+ { 0x00D0,0x00D1,0x00D2,0x0000 }, }, /* #08 */
+ /*expect*/ { 0,1,(wchar_t *)NULL, },
+ },
+ { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
+ { 0x0000 }, }, /* #09 */
+ /*expect*/ { 0,0,0, },
+ },
+ { /*input.*/ { { 0x0000,0x00D2,0x00D3,0x0000 },
+ { 0x00D1,0x0000 }, }, /* #10 */
+ /*expect*/ { 0,1,(wchar_t *)NULL, },
+ },
+ { /*input.*/ { { 0x0000,0x00D2,0x00D3,0x0000 },
+ { 0x0000 }, }, /* #11 */
+ /*expect*/ { 0,0,0, },
+ },
+ { .is_last = 1 }
+ }
+ },
+ {
+ { Twcsstr, TST_LOC_enUS },
+ {
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0041,0x0000 }, }, /* #01 */
+ /*expect*/ { 0,0,0, },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0042,0x0000 }, }, /* #02 */
+ /*expect*/ { 0,0,0, },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0043,0x0000 }, }, /* #03 */
+ /*expect*/ { 0,0,0, },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0041,0x0042,0x0000 }, }, /* #04 */
+ /*expect*/ { 0,0,0, },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0042,0x0043,0x0000 }, }, /* #05 */
+ /*expect*/ { 0,0,0, },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0041,0x0042,0x0043,0x0000 }, }, /* #06 */
+ /*expect*/ { 0,0,0, },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0042,0x0043,0x0044,0x0000 }, }, /* #07 */
+ /*expect*/ { 0,1,(wchar_t *)NULL, },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0040,0x0041,0x0042,0x0000 }, }, /* #08 */
+ /*expect*/ { 0,1,(wchar_t *)NULL, },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
+ { 0x0000 }, }, /* #09 */
+ /*expect*/ { 0,0,0, },
+ },
+ { /*input.*/ { { 0x0000,0x0042,0x0043,0x0000 },
+ { 0x0041,0x0000 }, }, /* #10 */
+ /*expect*/ { 0,1,(wchar_t *)NULL, },
+ },
+ { /*input.*/ { { 0x0000,0x0042,0x0043,0x0000 },
+ { 0x0000 }, }, /* #11 */
+ /*expect*/ { 0,0,0, },
+ },
+ { .is_last = 1 }
+ }
+ },
+ {
+#if 0
+ { Twcsstr, TST_LOC_eucJP },
+#else
+ { Twcsstr, TST_LOC_ja_UTF8 },
+#endif
+ {
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
+ { 0x3041,0x0000 }, }, /* #01 */
+ /*expect*/ { 0,0,0, },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
+ { 0x3042,0x0000 }, }, /* #02 */
+ /*expect*/ { 0,0,0, },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
+ { 0x3043,0x0000 }, }, /* #03 */
+ /*expect*/ { 0,0,0, },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
+ { 0x3041,0x3042,0x0000 }, }, /* #04 */
+ /*expect*/ { 0,0,0, },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
+ { 0x3042,0x3043,0x0000 }, }, /* #05 */
+ /*expect*/ { 0,0,0, },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
+ { 0x3041,0x3042,0x3043,0x0000 }, }, /* #06 */
+ /*expect*/ { 0,0,0, },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
+ { 0x3042,0x3043,0x3044,0x0000 }, }, /* #07 */
+ /*expect*/ { 0,1,(wchar_t *)NULL, },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
+ { 0x3040,0x3041,0x3042,0x0000 }, }, /* #08 */
+ /*expect*/ { 0,1,(wchar_t *)NULL, },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
+ { 0x0000 }, }, /* #09 */
+ /*expect*/ { 0,0,0, },
+ },
+ { /*input.*/ { { 0x0000,0x3042,0x3043,0x0000 },
+ { 0x3041,0x0000 }, }, /* #10 */
+ /*expect*/ { 0,1,(wchar_t *)NULL, },
+ },
+ { /*input.*/ { { 0x0000,0x3042,0x3043,0x0000 },
+ { 0x0000 }, }, /* #11 */
+ /*expect*/ { 0,0,0, },
+ },
+ { .is_last = 1 }
+ }
+ },
+ {
+ { Twcsstr, TST_LOC_end }
+ }
+};
diff --git a/test/locale-mbwc/dat_wcstod.c b/test/locale-mbwc/dat_wcstod.c
new file mode 100644
index 000000000..c7b401847
--- /dev/null
+++ b/test/locale-mbwc/dat_wcstod.c
@@ -0,0 +1,78 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN CLIBRARY
+ *
+ * FILE: dat_wcstod.c
+ *
+ * WCSTOD: double wcstod (const wchar_t *np, wchar_t **endp);
+ */
+
+
+/*
+ * NOTE:
+ * need more test data!
+ *
+ */
+
+
+TST_WCSTOD tst_wcstod_loc [] = {
+ {
+ { Twcstod, TST_LOC_de },
+ {
+ {
+ /*01*/
+ /*I*/
+ {{ 0x0030,0x0030,0x0030,0x002C,0x0030,0x0030,0x0030,0x0030,0x0000 }},
+ /*E*/
+ { 0,1,0.0, 0.0, 0x0000 }
+ },
+ {
+ /*02*/
+ /*I*/
+ {{ 0x0031,0x0032,0x0033,0x002C,0x0034,0x0035,0x0036,0x0040,0x0000 }},
+ /*E*/
+ { 0,1,123.456, 123.456, 0x0040 }
+ },
+ { .is_last = 1 }
+ }
+ },
+ {
+ { Twcstod, TST_LOC_enUS },
+ {
+ {
+ /*01*/
+ /*I*/
+ {{ 0x0030,0x0030,0x0030,0x002E,0x0030,0x0030,0x0030,0x0030,0x0000 }},
+ /*E*/
+ { 0,1,0.0, 0.0, 0x0000 }
+ },
+ {
+ /*02*/
+ /*I*/
+ {{ 0x0031,0x0032,0x0033,0x002E,0x0034,0x0035,0x0036,0x0040,0x0000 }},
+ /*E*/
+ { 0,1,123.456, 123.456, 0x0040 }
+ },
+ { .is_last = 1 }
+ }
+ },
+ {
+#if 0
+ { Twcstod, TST_LOC_eucJP },
+#else
+ { Twcstod, TST_LOC_ja_UTF8 },
+#endif
+ {
+ {
+ /*01*/
+ /*I*/
+ {{ 0x0031,0x0032,0x0033,0x002E,0x0034,0x0035,0x0036,0x0040,0x0000 }},
+ /*E*/
+ { 0,1,123.456, 123.456, 0x0040 }
+ },
+ { .is_last = 1 }
+ }
+ },
+ {
+ { Twcstod, TST_LOC_end }
+ }
+};
diff --git a/test/locale-mbwc/dat_wcstok.c b/test/locale-mbwc/dat_wcstok.c
new file mode 100644
index 000000000..559b40187
--- /dev/null
+++ b/test/locale-mbwc/dat_wcstok.c
@@ -0,0 +1,138 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN CLIBRARY
+ *
+ * FILE: dat_wcstok.c
+ *
+ * WCSTOK: wchar_t *wcstok (wchar_t *ws, const wchar_t *dlm,
+ * wchar_t **pt);
+ */
+
+/*
+ * NOTE:
+ * need more test data!
+ * locale insensitive function...
+ */
+
+
+
+
+TST_WCSTOK tst_wcstok_loc [] = {
+ {
+ { Twcstok, TST_LOC_de },
+ {
+ {
+ {
+ {
+ { 1, { 0x00D1,0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0x00D7,0x00D8,
+ 0x00D9,0x0000 },
+ { 0x00D3,0x00D2, 0x00D5 }
+ },
+ { 0, { 0x00D1,0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0x00D7,0x00D8,
+ 0x00D9,0x0000 },
+ { 0x00D3,0x00D2, 0x00D5 }
+ },
+ { 0, { 0x00D1,0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0x00D7,0x00D8,
+ 0x00D9,0x0000 },
+ { 0x00D3,0x00D2, 0x00D5 }
+ },
+ }
+ },
+ {
+ {
+ { 0, 0,0,
+ { 0x00D1,0x0000 }
+ },
+ { 0, 0,0,
+ { 0x00D4,0x0000 }
+ },
+ { 0, 0,0,
+ { 0x00D6,0x00D7,0x00D8,0x00D9,0x0000 }
+ },
+ }
+ }
+ },
+ { .is_last = 1 }
+ }
+ },
+ {
+ { Twcstok, TST_LOC_enUS },
+ {
+ {
+ {
+ {
+ { 1, { 0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,
+ 0x0049,0x0000 },
+ { 0x0043,0x0042, 0x0045 }
+ },
+ { 0, { 0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,
+ 0x0049,0x0000 },
+ { 0x0043,0x0042, 0x0045 }
+ },
+ { 0, { 0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,
+ 0x0049,0x0000 },
+ { 0x0043,0x0042, 0x0045 }
+ },
+ }
+ },
+ {
+ {
+ { 0, 0,0,
+ { 0x0041,0x0000 }
+ },
+ { 0, 0,0,
+ { 0x0044,0x0000 }
+ },
+ { 0, 0,0,
+ { 0x0046,0x0047,0x0048,0x0049,0x0000 }
+ },
+ }
+ }
+ },
+ { .is_last = 1 }
+ }
+ },
+ {
+#if 0
+ { Twcstok, TST_LOC_eucJP },
+#else
+ { Twcstok, TST_LOC_ja_UTF8 },
+#endif
+ {
+ {
+ {
+ {
+ { 1, { 0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,
+ 0x0049,0x0000 },
+ { 0x0043,0x0042, 0x0045 }
+ },
+ { 0, { 0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,
+ 0x0049,0x0000 },
+ { 0x0043,0x0042, 0x0045 }
+ },
+ { 0, { 0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,
+ 0x0049,0x0000 },
+ { 0x0043,0x0042, 0x0045 }
+ },
+ }
+ },
+ {
+ {
+ { 0, 0,0,
+ { 0x0041,0x0000 }
+ },
+ { 0, 0,0,
+ { 0x0044,0x0000 }
+ },
+ { 0, 0,0,
+ { 0x0046,0x0047,0x0048,0x0049,0x0000 }
+ },
+ }
+ }
+ },
+ { .is_last = 1 }
+ }
+ },
+ {
+ { Twcstok, TST_LOC_end }
+ }
+};
diff --git a/test/locale-mbwc/dat_wcstombs.c b/test/locale-mbwc/dat_wcstombs.c
new file mode 100644
index 000000000..ffeb0ef80
--- /dev/null
+++ b/test/locale-mbwc/dat_wcstombs.c
@@ -0,0 +1,271 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: dat_wcstombs.c
+ *
+ * WCSTOMBS: size_t wcstombs (char *s, const wchar_t *ws, size_t n)
+ */
+
+
+/*
+ * CAUTION:
+ * Do not use a value 0x01 for string data. The test program
+ * uses it.
+ *
+ */
+
+
+TST_WCSTOMBS tst_wcstombs_loc [] = {
+ {
+ { Twcstombs, TST_LOC_de },
+ {
+ /* #01 : Any chars including a null char should not be stored in s. */
+ { /*input.*/ { 1,1, { 0x00C4,0x00D6,0x00DC,0x0000 }, 0 },
+ /*expect*/ { 0,1,0, "" },
+ },
+ /* #02 : Only one chars should be stored in s. No null termination. */
+ { /*input.*/ { 1,1, { 0x00C4,0x00D6,0x00DC,0x0000 }, 1 },
+ /*expect*/ { 0,1,1, "Ä" },
+ },
+ /* #03 : Only two chars should be stored in s. No null termination. */
+ { /*input.*/ { 1,1, { 0x00C4,0x00D6,0x00DC,0x0000 }, 2 },
+ /*expect*/ { 0,1,2, "ÄÖ" },
+ },
+ /* #04 : Only three chars should be stored in s. No null
+ termination. */
+ { /*input.*/ { 1,1, { 0x00C4,0x00D6,0x00DC,0x0000 }, 3 },
+ /*expect*/ { 0,1,3, "ÄÖÜ" },
+ },
+ /* #05 : Only three chars should be stored in s with a null
+ termination. */
+ { /*input.*/ { 1,1, { 0x00C4,0x00D6,0x00DC,0x0000 }, 4 },
+ /*expect*/ { 0,1,3, "ÄÖÜ" },
+ },
+ /* #06 : Only three chars should be stored in s with a null
+ termination. */
+ { /*input.*/ { 1,1, { 0x00C4,0x00D6,0x00DC,0x0000 }, 5 },
+ /*expect*/ { 0,1,3, "ÄÖÜ" },
+ },
+ /* #07 : Invalid mb sequence. No chars should be stored in s. */
+ { /*input.*/ { 1,1, { 0x0201,0x0221,0x0000,0x0000 }, 2 },
+ /*expect*/ { EILSEQ,1,(size_t)-1, "" },
+ },
+ /* #08 : s is a null pointer, no chars should be stored in s. */
+ { /*input.*/ { 0,1, { 0x00C4,0x00D6,0x00DC,0x0000 }, 0 },
+ /*expect*/ { 0,1,3, "" },
+ },
+ /* #09 : s is a null pointer, no chars should be stored in s. */
+ { /*input.*/ { 0,1, { 0x00C4,0x00D6,0x00DC,0x0000 }, 1 },
+ /*expect*/ { 0,1,3, "" },
+ },
+ /* #10 : s is a null pointer, no chars should be stored in s. */
+ { /*input.*/ { 0,1, { 0x00C4,0x00D6,0x00DC,0x0000 }, 5 },
+ /*expect*/ { 0,1,3, "" },
+ },
+ /* #11 : s is a null pointer. No chars should be stored in s. */
+ { /*input.*/ { 0,1, { 0x0201,0x0221,0x0000,0x0000 }, 5 },
+ /*expect*/ { EILSEQ,1,(size_t)-1, "" },
+ },
+ /* #12 : ws is a null wc string, no chars should be stored in s. */
+ { /*input.*/ { 1,1, { 0x0000 }, 5 },
+ /*expect*/ { 0,1,0, "" },
+ },
+ /* #13 : s is a null pointer, no chars should be stored in s. */
+ { /*input.*/ { 0,1, { 0x0000 }, 5 },
+ /*expect*/ { 0,1,0, "" },
+ },
+ { .is_last = 1 }
+ }
+ },
+ {
+ { Twcstombs, TST_LOC_enUS },
+ {
+ /* #01 : Any chars including a null char should not be stored in s. */
+ { /*input.*/ { 1,1, { 0x00C4,0x0042,0x0043,0x0000 }, 0 },
+ /*expect*/ { 0,1,0, "" },
+ },
+ /* #02 : Only one chars should be stored in s. No null termination. */
+ { /*input.*/ { 1,1, { 0x0041,0x0042,0x0043,0x0000 }, 1 },
+ /*expect*/ { 0,1,1, "A" },
+ },
+ /* #03 : Only two chars should be stored in s. No null termination. */
+ { /*input.*/ { 1,1, { 0x0041,0x0042,0x0043,0x0000 }, 2 },
+ /*expect*/ { 0,1,2, "AB" },
+ },
+ /* #04 : Only three chars should be stored in s. No null
+ termination. */
+ { /*input.*/ { 1,1, { 0x0041,0x0042,0x0043,0x0000 }, 3 },
+ /*expect*/ { 0,1,3, "ABC" },
+ },
+ /* #05 : Only three chars should be stored in s with a null
+ termination. */
+ { /*input.*/ { 1,1, { 0x0041,0x0042,0x0043,0x0000 }, 4 },
+ /*expect*/ { 0,1,3, "ABC" },
+ },
+ /* #06 : Only three chars should be stored in s with a null
+ termination. */
+ { /*input.*/ { 1,1, { 0x0041,0x0042,0x0043,0x0000 }, 5 },
+ /*expect*/ { 0,1,3, "ABC" },
+ },
+ /* #07 : Invalid mb sequence. No chars should be stored in s. */
+ { /*input.*/ { 1,1, { 0x0201,0x0221,0x0000,0x0000 }, 2 },
+ /*expect*/ { EILSEQ,1,(size_t)-1, "" },
+ },
+ /* #08 : s is a null pointer, no chars should be stored in s. */
+ { /*input.*/ { 0,1, { 0x0041,0x0042,0x0043,0x0000 }, 0 },
+ /*expect*/ { 0,1,3, "" },
+ },
+ /* #09 : s is a null pointer, no chars should be stored in s. */
+ { /*input.*/ { 0,1, { 0x0041,0x0042,0x0043,0x0000 }, 1 },
+ /*expect*/ { 0,1,3, "" },
+ },
+ /* #10 : s is a null pointer, no chars should be stored in s. */
+ { /*input.*/ { 0,1, { 0x0041,0x0042,0x0043,0x0000 }, 5 },
+ /*expect*/ { 0,1,3, "" },
+ },
+ /* #11 : s is a null pointer. No chars should be stored in s. */
+ { /*input.*/ { 0,1, { 0x0201,0x0221,0x0000,0x0000 }, 5 },
+ /*expect*/ { EILSEQ,1,(size_t)-1, "" },
+ },
+ /* #12 : ws is a null wc string, no chars should be stored in s. */
+ { /*input.*/ { 1,1, { 0x0000 }, 5, },
+ /*expect*/ { 0,1,0, "" },
+ },
+ /* #13 : s is a null pointer, no chars should be stored in s. */
+ { /*input.*/ { 0,1, { 0x0000 }, 5 },
+ /*expect*/ { 0,1,0, "" },
+ },
+ { .is_last = 1 }
+ }
+ },
+#if 0
+ {
+ { Twcstombs, TST_LOC_eucJP },
+ {
+
+ /* #01 : Any chars including a null char should not be stored in s. */
+ { /*input.*/ { 1,1, { 0x3042,0x3044,0xFF73,0x0000 }, 0 },
+ /*expect*/ { 0,1,0, "" },
+ },
+ /* #02 : Only one chars should be stored in s. No null termination. */
+ { /*input.*/ { 1,1, { 0x3042,0x3044,0xFF73,0x0000 }, 2 },
+ /*expect*/ { 0,1,2, "\244\242" },
+ },
+ /* #03 : Only two chars should be stored in s. No null termination. */
+ { /*input.*/ { 1,1, { 0x3042,0x3044,0xFF73,0x0000 }, 4 },
+ /*expect*/ { 0,1,4, "\244\242\244\244" },
+ },
+ /* #04 : Only three chars should be stored in s. No null
+ termination. */
+ { /*input.*/ { 1,1, { 0x3042,0x3044,0xFF73,0x0000 }, 6 },
+ /*expect*/ { 0,1,6, "\244\242\244\244\216\263" },
+ },
+ /* #05 : Only three chars should be stored in s with a null
+ termination. */
+ { /*input.*/ { 1,1, { 0x3042,0x3044,0xFF73,0x0000 }, 7 },
+ /*expect*/ { 0,1,6, "\244\242\244\244\216\263" },
+ },
+ /* #06 : Only three chars should be stored in s with a null
+ termination. */
+ { /*input.*/ { 1,1, { 0x3042,0x3044,0xFF73,0x0000 }, 8 },
+ /*expect*/ { 0,1,6, "\244\242\244\244\216\263" },
+ },
+ /* #07 : Invalid mb sequence. No chars should be stored in s. */
+ { /*input.*/ { 1,1, { 0x0201,0x0221,0x0000,0x0000 }, 2 },
+ /*expect*/ { EILSEQ,1,-1, "" },
+ },
+ /* #08 : s is a null pointer, no chars should be stored in s. */
+ { /*input.*/ { 0,1, { 0x3042,0x3044,0xFF73,0x0000 }, 0 },
+ /*expect*/ { 0,1,6, "" },
+ },
+ /* #09 : s is a null pointer, no chars should be stored in s. */
+ { /*input.*/ { 0,1, { 0x3042,0x3044,0xFF73,0x0000 }, 1 },
+ /*expect*/ { 0,1,6, "" },
+ },
+ /* #10 : s is a null pointer, no chars should be stored in s. */
+ { /*input.*/ { 0,1, { 0x3042,0x3044,0xFF73,0x0000 }, 8 },
+ /*expect*/ { 0,1,6, "" },
+ },
+ /* #11 : s is a null pointer. No chars should be stored in s. */
+ { /*input.*/ { 0,1, { 0x0201,0x0221,0x0000,0x0000 }, 5 },
+ /*expect*/ { EILSEQ,1,(size_t)-1, "" },
+ },
+ /* #12 : ws is a null wc string, no chars should be stored in s. */
+ { /*input.*/ { 1,1, { 0x0000 }, 5 },
+ /*expect*/ { 0,1,0, "" },
+ },
+ /* #13 : s is a null pointer, no chars should be stored in s. */
+ { /*input.*/ { 0,1, { 0x0000 }, 5 },
+ /*expect*/ { 0,1,0, "" },
+ },
+ { .is_last = 1 }
+ }
+ },
+#else
+ {
+ { Twcstombs, TST_LOC_ja_UTF8 },
+ {
+
+ /* #01 : Any chars including a null char should not be stored in s. */
+ { /*input.*/ { 1,1, { 0x3042,0x3044,0xFF73,0x0000 }, 0 },
+ /*expect*/ { 0,1,0, "" },
+ },
+ /* #02 : Only one chars should be stored in s. No null termination. */
+ { /*input.*/ { 1,1, { 0x3042,0x3044,0xFF73,0x0000 }, 3 },
+ /*expect*/ { 0,1,3, "\343\201\202" },
+ },
+ /* #03 : Only two chars should be stored in s. No null termination. */
+ { /*input.*/ { 1,1, { 0x3042,0x3044,0xFF73,0x0000 }, 6 },
+ /*expect*/ { 0,1,6, "\343\201\202\343\201\204" },
+ },
+ /* #04 : Only three chars should be stored in s. No null
+ termination. */
+ { /*input.*/ { 1,1, { 0x3042,0x3044,0xFF73,0x0000 }, 9 },
+ /*expect*/ { 0,1,9, "\343\201\202\343\201\204\357\275\263" },
+ },
+ /* #05 : Only three chars should be stored in s with a null
+ termination. */
+ { /*input.*/ { 1,1, { 0x3042,0x3044,0xFF73,0x0000 }, 10 },
+ /*expect*/ { 0,1,9, "\343\201\202\343\201\204\357\275\263" },
+ },
+ /* #06 : Only three chars should be stored in s with a null
+ termination. */
+ { /*input.*/ { 1,1, { 0x3042,0x3044,0xFF73,0x0000 }, 11 },
+ /*expect*/ { 0,1,9, "\343\201\202\343\201\204\357\275\263" },
+ },
+ /* #07 : Invalid mb sequence. No chars should be stored in s. */
+ { /*input.*/ { 1,1, { 0x0201,0x0221,0x0000,0x0000 }, 2 },
+ /*expect*/ { EILSEQ,1,-1, "" },
+ },
+ /* #08 : s is a null pointer, no chars should be stored in s. */
+ { /*input.*/ { 0,1, { 0x3042,0x3044,0xFF73,0x0000 }, 0 },
+ /*expect*/ { 0,1,9, "" },
+ },
+ /* #09 : s is a null pointer, no chars should be stored in s. */
+ { /*input.*/ { 0,1, { 0x3042,0x3044,0xFF73,0x0000 }, 1 },
+ /*expect*/ { 0,1,9, "" },
+ },
+ /* #10 : s is a null pointer, no chars should be stored in s. */
+ { /*input.*/ { 0,1, { 0x3042,0x3044,0xFF73,0x0000 }, 8 },
+ /*expect*/ { 0,1,9, "" },
+ },
+ /* #11 : s is a null pointer. No chars should be stored in s. */
+ { /*input.*/ { 0,1, { 0x0201,0x0221,0x0000,0x0000 }, 5 },
+ /*expect*/ { EILSEQ,1,(size_t)-1, "" },
+ },
+ /* #12 : ws is a null wc string, no chars should be stored in s. */
+ { /*input.*/ { 1,1, { 0x0000 }, 5 },
+ /*expect*/ { 0,1,0, "" },
+ },
+ /* #13 : s is a null pointer, no chars should be stored in s. */
+ { /*input.*/ { 0,1, { 0x0000 }, 5 },
+ /*expect*/ { 0,1,0, "" },
+ },
+ { .is_last = 1 }
+ }
+ },
+#endif
+ {
+ { Twcstombs, TST_LOC_end }
+ }
+};
diff --git a/test/locale-mbwc/dat_wcswidth.c b/test/locale-mbwc/dat_wcswidth.c
new file mode 100644
index 000000000..6d2f98e17
--- /dev/null
+++ b/test/locale-mbwc/dat_wcswidth.c
@@ -0,0 +1,263 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: dat_wcswidth.c
+ *
+ * WCSWIDTH: int wcswidth (const wchar_t *ws, size_t n);
+ */
+
+TST_WCSWIDTH tst_wcswidth_loc [] = {
+ {
+ { Twcswidth, TST_LOC_de },
+ {
+ { /*input.*/ { { 0x00C1,0x00C2,0x00C3,0x0000 }, 0 }, /* 01 */
+ /*expect*/ { 0,1,0 },
+ },
+ { /*input.*/ { { 0x00C1,0x00C2,0x00C3,0x0000 }, 1 }, /* 02 */
+ /*expect*/ { 0,1,1 },
+ },
+ { /*input.*/ { { 0x00C1,0x00C2,0x00C3,0x0000 }, 2 }, /* 03 */
+ /*expect*/ { 0,1,2 },
+ },
+ { /*input.*/ { { 0x00C1,0x00C2,0x00C3,0x0000 }, 3 }, /* 04 */
+ /*expect*/ { 0,1,3 },
+ },
+ { /*input.*/ { { 0x00C1,0x00C2,0x00C3,0x0000 }, 4 }, /* 05 */
+ /*expect*/ { 0,1,3 },
+ },
+ { /*input.*/ { { 0x0000 }, 1 }, /* 06 */
+ /*expect*/ { 0,1,0 },
+ },
+ { /*input.*/ { { 0x00C1,0x0001,0x0000 }, 2 }, /* 07 */
+ /*expect*/ { 0,1,-1 },
+ },
+ { /*input.*/ { { 0x00C1,0x0001,0x0000 }, 1 }, /* 08 */
+ /*expect*/ { 0,1,1 },
+ },
+ { /*input.*/ { { 0x00C1,0x0001,0x0000 }, 2 }, /* 09 */
+ /*expect*/ { 0,1,-1 },
+ },
+ { /*input.*/ { { 0x00C1,0x0092,0x0000 }, 2 }, /* 10 */
+ /*expect*/ { 0,1,-1 },
+ },
+ { /*input.*/ { { 0x00C1,0x0020,0x0000 }, 2 }, /* 11 */
+ /*expect*/ { 0,1,2 },
+ },
+ { /*input.*/ { { 0x00C1,0x0021,0x0000 }, 2 }, /* 12 */
+ /*expect*/ { 0,1,2 },
+ },
+ { /*input.*/ { { 0x00C1,0x007E,0x0000 }, 2 }, /* 13 */
+ /*expect*/ { 0,1,2 },
+ },
+ { /*input.*/ { { 0x00C1,0x007F,0x0000 }, 2 }, /* 14 */
+ /*expect*/ { 0,1,-1 },
+ },
+ { /*input.*/ { { 0x00C1,0x0080,0x0000 }, 2 }, /* 15 */
+ /*expect*/ { 0,1,-1 },
+ },
+ { /*input.*/ { { 0x00C1,0x00A0,0x0000 }, 2 }, /* 16 */
+#ifdef SHOJI_IS_RIGHT
+ /*expect*/ { 0,1,-1 },
+#else
+ /*expect*/ { 0,1,2 },
+#endif
+ },
+ { /*input.*/ { { 0x00C1,0x00A1,0x0000 }, 2 }, /* 17 */
+ /*expect*/ { 0,1,2 },
+ },
+ { /*input.*/ { { 0x00C1,0x00FF,0x0000 }, 2 }, /* 18 */
+ /*expect*/ { 0,1,2 },
+ },
+ { /*input.*/ { { 0x00C1,0x3042,0x0000 }, 2 }, /* 19 */
+ /*expect*/ { 0,1,-1 },
+ },
+ { /*input.*/ { { 0x00C1,0x3044,0x0000 }, 2 }, /* 20 */
+ /*expect*/ { 0,1,-1 },
+ },
+ { .is_last = 1 }
+ }
+ },
+ {
+ { Twcswidth, TST_LOC_enUS },
+ {
+ { /*input.*/ { { 0x0041,0x0042,0x00C3,0x0000 }, 0 }, /* 01 */
+ /*expect*/ { 0,1,0 },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x00C3,0x0000 }, 1 }, /* 02 */
+ /*expect*/ { 0,1,1 },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x00C3,0x0000 }, 2 }, /* 03 */
+ /*expect*/ { 0,1,2 },
+ },
+#ifdef SHOJI_IS_RIGHT
+ { /*input.*/ { { 0x0041,0x0042,0x00C3,0x0000 }, 3 }, /* 04 */
+ /*expect*/ { 0,1,3 },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x00C3,0x0000 }, 4 }, /* 05 */
+ /*expect*/ { 0,1,3 },
+ },
+#else
+ { /*input.*/ { { 0x0041,0x0042,0x00C3,0x0000 }, 3 }, /* 04 */
+ /*expect*/ { 0,1,-1 },
+ },
+ { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 }, 4 }, /* 05 */
+ /*expect*/ { 0,1,3 },
+ },
+#endif
+ { /*input.*/ { { 0x0000 }, 1 }, /* 06 */
+ /*expect*/ { 0,1,0 },
+ },
+ { /*input.*/ { { 0x0041,0x0001,0x0000 }, 2 }, /* 07 */
+ /*expect*/ { 0,1,-1 },
+ },
+ { /*input.*/ { { 0x0041,0x0001,0x0000 }, 1 }, /* 08 */
+ /*expect*/ { 0,1,1 },
+ },
+ { /*input.*/ { { 0x0041,0x0001,0x0000 }, 2 }, /* 09 */
+ /*expect*/ { 0,1,-1 },
+ },
+ { /*input.*/ { { 0x0041,0x0092,0x0000 }, 2 }, /* 10 */
+ /*expect*/ { 0,1,-1 },
+ },
+ { /*input.*/ { { 0x0041,0x0020,0x0000 }, 2 }, /* 11 */
+ /*expect*/ { 0,1,2 },
+ },
+ { /*input.*/ { { 0x0041,0x0021,0x0000 }, 2 }, /* 12 */
+ /*expect*/ { 0,1,2 },
+ },
+ { /*input.*/ { { 0x0041,0x007E,0x0000 }, 2 }, /* 13 */
+ /*expect*/ { 0,1,2 },
+ },
+ { /*input.*/ { { 0x0041,0x007F,0x0000 }, 2 }, /* 14 */
+ /*expect*/ { 0,1,-1 },
+ },
+ { /*input.*/ { { 0x0041,0x0080,0x0000 }, 2 }, /* 15 */
+ /*expect*/ { 0,1,-1 },
+ },
+ { /*input.*/ { { 0x0041,0x00A0,0x0000 }, 2 }, /* 16 */
+ /*expect*/ { 0,1,-1 },
+ },
+#ifdef SHOJI_IS_RIGHT
+ { /*input.*/ { { 0x0041,0x00A1,0x0000 }, 2 }, /* 17 */
+ /*expect*/ { 0,1,2 },
+ },
+ { /*input.*/ { { 0x0041,0x00FF,0x0000 }, 2 }, /* 18 */
+ /*expect*/ { 0,1,2 },
+ },
+#else
+ { /*input.*/ { { 0x0041,0x007E,0x0000 }, 2 }, /* 17 */
+ /*expect*/ { 0,1,2 },
+ },
+ { /*input.*/ { { 0x0041,0x0020,0x0000 }, 2 }, /* 18 */
+ /*expect*/ { 0,1,2 },
+ },
+#endif
+ { /*input.*/ { { 0x0041,0x3042,0x0000 }, 2 }, /* 19 */
+ /*expect*/ { 0,1,-1 },
+ },
+ { /*input.*/ { { 0x0041,0x3044,0x0000 }, 2 }, /* 20 */
+ /*expect*/ { 0,1,-1 },
+ },
+ { .is_last = 1 }
+ }
+ },
+ {
+#if 0
+ { Twcswidth, TST_LOC_eucJP },
+#else
+ { Twcswidth, TST_LOC_ja_UTF8 },
+#endif
+ {
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 }, 0 }, /* 01 */
+ /*expect*/ { 0,1,0 },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 }, 1 }, /* 02 */
+ /*expect*/ { 0,1,2 },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 }, 2 }, /* 03 */
+ /*expect*/ { 0,1,4 },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 }, 3 }, /* 04 */
+ /*expect*/ { 0,1,6 },
+ },
+ { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 }, 4 }, /* 05 */
+ /*expect*/ { 0,1,6 },
+ },
+ { /*input.*/ { { 0x0000 }, 1 }, /* 06 */
+ /*expect*/ { 0,1,0 },
+ },
+ { /*input.*/ { { 0x008E,0x0001,0x0000 }, 2 }, /* 07 */
+ /*expect*/ { 0,1,-1 },
+ },
+ { /*input.*/ { { 0x3041,0x008E,0x0000 }, 1 }, /* 08 */
+ /*expect*/ { 0,1,2 },
+ },
+ { /*input.*/ { { 0x3041,0x008E,0x0000 }, 2 }, /* 09 */
+ /*expect*/ { 0,1,-1 },
+ },
+ { /*input.*/ { { 0x3041,0x0001,0x0000 }, 2 }, /* 10 */
+ /*expect*/ { 0,1,-1 },
+ },
+ { /*input.*/ { { 0x3041,0x3000,0x0000 }, 2 }, /* 11 */
+ /*expect*/ { 0,1,4 },
+ },
+ { /*input.*/ { { 0x0041,0x0021,0x0000 }, 2 }, /* 12 */
+ /*expect*/ { 0,1,2 },
+ },
+ { /*input.*/ { { 0x0041,0x007E,0x0000 }, 2 }, /* 13 */
+ /*expect*/ { 0,1,2 },
+ },
+ { /*input.*/ { { 0x0041,0x007F,0x0000 }, 2 }, /* 14 */
+ /*expect*/ { 0,1,-1 },
+ },
+ { /*input.*/ { { 0x0041,0x0080,0x0000 }, 2 }, /* 15 */
+ /*expect*/ { 0,1,-1 },
+ },
+#if 0
+ { /*input.*/ { { 0x0041,0x00A0,0x0000 }, 2 }, /* 16 */
+ /*expect*/ { 0,1,-1 },
+ },
+#ifdef NO_WAIVER
+ /* <NO_WAIVER> */ /* returns 3 */
+ { /*input.*/ { { 0x0041,0x00A1,0x0000 }, 2 }, /* 17 */
+ /*expect*/ { 0,1,-1 },
+ },
+#else
+ /* XXX U00A1 is valid -> /x8f/xa2/xc4 in JIS X 0212 */
+ { /*input.*/ { { 0x0041,0x00A1,0x0000 }, 2 }, /* 17 */
+ /*expect*/ { 0,1,3 },
+ },
+#endif
+#else
+ /* XXX U00A0 i UTF8 is valid -> /xc2/xa0 */
+ { /*input.*/ { { 0x0041,0x00A0,0x0000 }, 2 }, /* 16 */
+ /*expect*/ { 0,1,2 },
+ },
+#ifdef NO_WAIVER
+ /* <NO_WAIVER> */ /* returns 3 */
+ { /*input.*/ { { 0x0041,0x00A1,0x0000 }, 2 }, /* 17 */
+ /*expect*/ { 0,1,-1 },
+ },
+#else
+ /* XXX U00A1 in UTF-8 is valid -> /xc2/xa1 */
+ { /*input.*/ { { 0x0041,0x00A1,0x0000 }, 2 }, /* 17 */
+ /*expect*/ { 0,1,2 },
+ },
+#endif
+#endif
+ { /*input.*/ { { 0x0041,0xFF71,0x0000 }, 2 }, /* 18 */
+ /*expect*/ { 0,1,2 },
+ },
+ { /*input.*/ { { 0x0041,0x3042,0x0000 }, 2 }, /* 19 */
+ /*expect*/ { 0,1,3 },
+ },
+ { /*input.*/ { { 0x0041,0x3044,0x0000 }, 2 }, /* 20 */
+ /*expect*/ { 0,1,3 },
+ },
+ { .is_last = 1 }
+ }
+ },
+ {
+ { Twcswidth, TST_LOC_end }
+ }
+};
diff --git a/test/locale-mbwc/dat_wcsxfrm.c b/test/locale-mbwc/dat_wcsxfrm.c
new file mode 100644
index 000000000..acb6727a8
--- /dev/null
+++ b/test/locale-mbwc/dat_wcsxfrm.c
@@ -0,0 +1,102 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN CLIBRARY
+ *
+ * FILE: dat_wcsxfrm.c
+ *
+ * WCSXFRM: size_t wcsxfrm (char *s1, const char s2, size_t n);
+ */
+
+/*
+ * NOTE:
+ *
+ * Return value and errno value are checked only for 2nd string:
+ * org2[]; n1 and n2 don't mean bytes to be translated.
+ * It means a buffer size including a null character.
+ * Results of this test depens on results of wcscoll().
+ * If you got errors, check both test results.
+ */
+
+
+TST_WCSXFRM tst_wcsxfrm_loc [] = {
+
+ {
+ { Twcsxfrm, TST_LOC_de },
+ {
+ { /*inp*/ { { 0x00C1,0x0000 }, { 0x00C1,0x0000 }, 7, 7 }, /* #01 */
+ /*exp*/ { 0, 0,0, },
+ },
+ { /*inp*/ { { 0x0042,0x0000 }, { 0x0061,0x0000 }, 7, 7 }, /* #02 */
+ /*exp*/ { 0, 0,0, },
+ },
+ { /*inp*/ { { 0x0061,0x0000 }, { 0x0042,0x0000 }, 7, 7 }, /* #03 */
+ /*exp*/ { 0, 0,0, },
+ },
+ { /*inp*/ { { 0x00E4,0x0000 }, { 0x00DC,0x0000 }, 7, 7 }, /* #04 */
+ /*exp*/ { 0, 0,0, },
+ },
+ { /*inp*/ { { 0x00DC,0x0000 }, { 0x00E4,0x0000 }, 7, 7 }, /* #05 */
+ /*exp*/ { 0, 0,0, },
+ },
+ { .is_last = 1 }
+ }
+ },
+ {
+ { Twcsxfrm, TST_LOC_enUS },
+ {
+ { /*inp*/ { { 0x0041,0x0000 }, { 0x0041,0x0000 }, 7, 7 }, /* #01 */
+ /*exp*/ { 0, 0,0, },
+ },
+ { /*inp*/ { { 0x0042,0x0000 }, { 0x0061,0x0000 }, 7, 7 }, /* #02 */
+ /*exp*/ { 0, 0,0, },
+ },
+ { /*inp*/ { { 0x0061,0x0000 }, { 0x0042,0x0000 }, 7, 7 }, /* #03 */
+ /*exp*/ { 0, 0,0, },
+ },
+ { /*inp*/ { { 0x0000,0x0000 }, { 0x0000,0x0000 }, 7, 7 }, /* #04 */
+ /*exp*/ { 0, 0,0, },
+ },
+#ifdef NO_WAIVER
+ { /* <WAIVER> x 2 */
+ /*inp*/ { { 0x3061,0x0000 }, { 0xFF42,0x0000 }, 7, 7 }, /* #05 */
+ /* <WAIVER> */
+ /*exp*/ { EINVAL, 1,(size_t)-1, },
+ },
+#endif
+ { .is_last = 1 }
+ }
+ },
+ {
+#if 0
+ { Twcsxfrm, TST_LOC_eucJP }, /* need more test data ! */
+#else
+ { Twcsxfrm, TST_LOC_ja_UTF8 }, /* need more test data ! */
+#endif
+ {
+ { /*inp*/ { { 0x3041,0x0000 }, { 0x3041,0x0000 }, 7, 7 }, /* #01 */
+ /*exp*/ { 0, 0,0, },
+ },
+ { /*inp*/ { { 0x0042,0x0000 }, { 0x0061,0x0000 }, 7, 7 }, /* #02 */
+ /*exp*/ { 0, 0,0, },
+ },
+ { /*inp*/ { { 0x0061,0x0000 }, { 0x0042,0x0000 }, 7, 7 }, /* #03 */
+ /*exp*/ { 0, 0,0, },
+ },
+ { /*inp*/ { { 0x30A2,0x0000 }, { 0xFF71,0x0000 }, 7, 7 }, /* #04 */
+ /*exp*/ { 0, 0,0, },
+ },
+ { /*inp*/ { { 0xFF71,0x0000 }, { 0x30A2,0x0000 }, 7, 7 }, /* #05 */
+ /*exp*/ { 0, 0,0, },
+ },
+#ifdef NO_WAIVER
+ /* <WAIVER> x 2 */
+ { /*inp*/ { { 0x008E,0x0000 }, { 0x008F,0x0000 }, 7, 7 }, /* #06 */
+ /*exp*/ { EINVAL, 1,(size_t)-1, },
+ },
+#endif
+ { .is_last = 1 }
+ }
+ },
+ {
+ { Twcsxfrm, TST_LOC_end }
+ }
+};
diff --git a/test/locale-mbwc/dat_wctob.c b/test/locale-mbwc/dat_wctob.c
new file mode 100644
index 000000000..dfd344eb8
--- /dev/null
+++ b/test/locale-mbwc/dat_wctob.c
@@ -0,0 +1,61 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: dat_wctob.c
+ *
+ * ISW*: int wctob( wint_t wc );
+ */
+
+
+TST_WCTOB tst_wctob_loc [] = {
+
+ { { Twctob, TST_LOC_de },
+ {
+ { { WEOF }, { 0, 1, EOF } },
+ { { 0x0020 }, { 0, 1, 0x20 } },
+ { { 0x0061 }, { 0, 1, 0x61 } },
+ { { 0x0080 }, { 0, 1, 0x80 } },
+ { { 0x00C4 }, { 0, 1, 0xC4 } },
+ { { 0x30C4 }, { 0, 1, EOF } },
+ { .is_last = 1 } /* Last element. */
+ }
+ },
+ { { Twctob, TST_LOC_enUS },
+ {
+ { { WEOF }, { 0, 1, EOF } },
+ { { 0x0020 }, { 0, 1, 0x20 } },
+ { { 0x0061 }, { 0, 1, 0x61 } },
+#ifdef SHOJI_IS_RIGHT
+ { { 0x0080 }, { 0, 1, 0x80 } },
+ { { 0x00C4 }, { 0, 1, 0xC4 } },
+#else
+ /* XXX These are no valid characters. */
+ { { 0x0080 }, { 0, 1, EOF } },
+ { { 0x00C4 }, { 0, 1, EOF } },
+#endif
+ { { 0x30C4 }, { 0, 1, EOF } },
+ { .is_last = 1 } /* Last element. */
+ }
+ },
+#if 0
+ { { Twctob, TST_LOC_eucJP },
+#else
+ { { Twctob, TST_LOC_ja_UTF8 },
+#endif
+ {
+ { { WEOF }, { 0, 1, EOF } },
+ { { 0x0020 }, { 0, 1, 0x20 } },
+ { { 0x0061 }, { 0, 1, 0x61 } },
+#if 0
+ { { 0x0080 }, { 0, 1, 0x80 } },
+#else
+ { { 0x0080 }, { 0, 1, EOF } },
+#endif
+ { { 0x00FF }, { 0, 1, EOF } },
+ { { 0x00C4 }, { 0, 1, EOF } },
+ { { 0x30C4 }, { 0, 1, EOF } },
+ { .is_last = 1 } /* Last element. */
+ }
+ },
+ { { Twctob, TST_LOC_end } }
+};
diff --git a/test/locale-mbwc/dat_wctomb.c b/test/locale-mbwc/dat_wctomb.c
new file mode 100644
index 000000000..0ec3a9c0d
--- /dev/null
+++ b/test/locale-mbwc/dat_wctomb.c
@@ -0,0 +1,168 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: dat_wctomb.c
+ *
+ * WCTOMB: int wctomb (char *s, wchar_t wc)
+ */
+
+
+/*
+ * FUNCTION:
+ *
+ * int wctomb (char *s, wchar_t wc);
+ *
+ * return: the number of bytes
+ *
+ * NOTE:
+ *
+ * o When you feed a null pointer for a string (s) to the function,
+ * set s_flg=0 instead of putting just a 'NULL' there.
+ * Even if you put a 'NULL', it means a null string as well as "".
+ *
+ * o When s is a null pointer, the function checks state dependency.
+ *
+ * state-dependent encoding - return NON-zero
+ * state-independent encoding - return 0
+ *
+ * If state-dependent encoding is expected, set
+ *
+ * s_flg = 0, ret_flg = 0, ret_val = +1
+ *
+ * If state-independent encoding is expected, set
+ *
+ * s_flg = 0, ret_flg = 0, ret_val = 0
+ *
+ *
+ * When you set ret_flg=1, the test program simply compares an
+ * actual return value with an expected value. You can check
+ * state-independent case (return value is 0) in that way, but
+ * you can not check state-dependent case. So when you check
+ * state- dependency in this test function: tst_wctomb(), set
+ * ret_flg=0 always. It's a special case, and the test
+ * function takes care of it.
+ *
+ * Input Expect
+ *
+ * s_flg=0 ret_flg=0
+ * | |
+ * { 0, 0 }, { 0, 0, 0, x, "" }
+ * | |
+ * not used ret_val: 0/+1
+ * (expected val)
+ */
+
+
+TST_WCTOMB tst_wctomb_loc [] = {
+ {
+ { Twctomb, TST_LOC_de },
+ {
+ /* #01 : normal case */
+ { /*input.*/ { 1, 0x00C4 },
+ /*expect*/ { 0,1,1, "Ä" },
+ },
+ /* #02 : normal case */
+ { /*input.*/ { 1, 0x00DC },
+ /*expect*/ { 0,1,1, "Ü" },
+ },
+ /* #03 : normal case */
+ { /*input.*/ { 1, 0x0092 },
+ /*expect*/ { 0,1,1, "\222" },
+ },
+ /* #04 : error case */
+ { /*input.*/ { 1, 0x3041 },
+ /*expect*/ { 0,1,-1, "" },
+ },
+ /* #05 : state dependency */
+ { /*input.*/ { 0, 0x0000 },
+ /*expect*/ { 0,0,0, "" },
+ },
+ { .is_last = 1 }
+ }
+ },
+ {
+ { Twctomb, TST_LOC_enUS },
+ {
+ /* #01 : normal case */
+ { /*input.*/ { 1, 0x0041 },
+ /*expect*/ { 0,1,1, "A" },
+ },
+ /* #02 : normal case */
+ { /*input.*/ { 1, 0x0042 },
+ /*expect*/ { 0,1,1, "B" },
+ },
+ /* #03 : error case */
+ /* <WAIVER> */
+ { /*input.*/ { 1, 0x00C4 },
+ /*expect*/ { 0,1,-1, "" },
+ },
+ /* #04 : error case */
+ { /*input.*/ { 1, 0x30A4 },
+ /*expect*/ { 0,1,-1, "" },
+ },
+ /* #05 : state dependency */
+ { /*input.*/ { 0, 0x0000 },
+ /*expect*/ { 0,0,0, "" },
+ },
+ { .is_last = 1 }
+ }
+ },
+#if 0
+ {
+ { Twctomb, TST_LOC_eucJP },
+ {
+ /* #01 : normal case */
+ { /*input.*/ { 1, 0x3042 },
+ /*expect*/ { 0,1,2, "\244\242" },
+ },
+ /* #02 : normal case */
+ { /*input.*/ { 1, 0x3044 },
+ /*expect*/ { 0,1,2, "\244\244" },
+ },
+ /* #03 : normal case */
+ { /*input.*/ { 1, 0x008E },
+ /*expect*/ { 0,1,-1, "" },
+ },
+ /* #04 : jisX0212 */
+ { /*input.*/ { 1, 0x00C4 },
+ /*expect*/ { 0,1,3, "\217\252\243" }, /* jisx0210 returns 3 */
+ },
+ /* #05 : state dependency */
+ { /*input.*/ { 0, 0x008E },
+ /*expect*/ { 0,0,0, "" },
+ },
+ { .is_last = 1 }
+ }
+ },
+#else
+ {
+ { Twctomb, TST_LOC_ja_UTF8 },
+ {
+ /* #01 : normal case */
+ { /*input.*/ { 1, 0x3042 },
+ /*expect*/ { 0,1,3, "\343\201\202" },
+ },
+ /* #02 : normal case */
+ { /*input.*/ { 1, 0x3044 },
+ /*expect*/ { 0,1,3, "\343\201\204" },
+ },
+ /* #03 : normal case */
+ { /*input.*/ { 1, 0x008E },
+ /*expect*/ { 0,1,2, "\302\216" },
+ },
+ /* #04 : jisX0212 */
+ { /*input.*/ { 1, 0x00C4 },
+ /*expect*/ { 0,1,2, "\303\204" }, /* jisx0210 returns 3 */
+ },
+ /* #05 : state dependency */
+ { /*input.*/ { 0, 0x008E },
+ /*expect*/ { 0,0,0, "" },
+ },
+ { .is_last = 1 }
+ }
+ },
+#endif
+ {
+ { Twctomb, TST_LOC_end }
+ }
+};
diff --git a/test/locale-mbwc/dat_wctrans.c b/test/locale-mbwc/dat_wctrans.c
new file mode 100644
index 000000000..df4d3ad61
--- /dev/null
+++ b/test/locale-mbwc/dat_wctrans.c
@@ -0,0 +1,99 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN CLIBRARY
+ *
+ * FILE: dat_wctrans.c
+ *
+ * WCTRANS: wctrans_t wctrans( const char *charclass );
+ */
+
+/*
+ * NOTE:
+ * When a return value is expected to be 0 (false),
+ * set ret_flg=1 and set ret_val=0.
+ * Otherwise just set ret_flg=0.
+ */
+
+
+TST_WCTRANS tst_wctrans_loc [] = {
+
+ { { Twctrans, TST_LOC_de },
+ {
+ { /*inp*/ { "" }, /* #1 */
+ /*exp*/ { 0,1,0, },
+ },
+ { /*inp*/ { "upper" }, /* #2 */
+ /*exp*/ { 0,1,0, },
+ },
+ { /*inp*/ { "lower" }, /* #3 */
+ /*exp*/ { 0,1,0, },
+ },
+ { /*inp*/ { "toupper" }, /* #4 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "tolower" }, /* #5 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "xxxxx" }, /* #6 */
+ /*exp*/ { 0,1,0, },
+ },
+ { .is_last = 1 }
+ }
+ },
+ { { Twctrans, TST_LOC_enUS },
+ {
+ { /*inp*/ { "" }, /* #1 */
+ /*exp*/ { 0,1,0, },
+ },
+ { /*inp*/ { "upper" }, /* #2 */
+ /*exp*/ { 0,1,0, },
+ },
+ { /*inp*/ { "lower" }, /* #3 */
+ /*exp*/ { 0,1,0, },
+ },
+ { /*inp*/ { "toupper" }, /* #4 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "tolower" }, /* #5 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "xxxxx" }, /* #6 */
+ /*exp*/ { 0,1,0, },
+ },
+ { .is_last = 1 }
+ }
+ },
+#if 0
+ { { Twctrans, TST_LOC_eucJP },
+#else
+ { { Twctrans, TST_LOC_ja_UTF8 },
+#endif
+ {
+ { /*inp*/ { "" }, /* #1 */
+ /*exp*/ { 0,1,0, },
+ },
+ { /*inp*/ { "upper" }, /* #2 */
+ /*exp*/ { 0,1,0, },
+ },
+ { /*inp*/ { "lower" }, /* #3 */
+ /*exp*/ { 0,1,0, },
+ },
+ { /*inp*/ { "toupper" }, /* #4 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "tolower" }, /* #5 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "xxxxx" }, /* #6 */
+ /*exp*/ { 0,1,0, },
+ },
+ { /*inp*/ { "tojhira" }, /* #7 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "tojkata" }, /* #8 */
+ /*exp*/ { 0,0,0, },
+ },
+ { .is_last = 1 }
+ }
+ },
+ { { Twctrans, TST_LOC_end }}
+};
diff --git a/test/locale-mbwc/dat_wctype.c b/test/locale-mbwc/dat_wctype.c
new file mode 100644
index 000000000..db3bf33e9
--- /dev/null
+++ b/test/locale-mbwc/dat_wctype.c
@@ -0,0 +1,189 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN CLIBRARY
+ *
+ * FILE: dat_wctype.c
+ *
+ * WCTYPE: wctype_t wctype( const char *class );
+ */
+
+/*
+ * NOTE:
+ * When a return value is expected to be 0 (false),
+ * set ret_flg=1 and set ret_val=0.
+ * Otherwise just set ret_flg=0.
+ */
+
+
+TST_WCTYPE tst_wctype_loc [] = {
+
+ { { Twctype, TST_LOC_de },
+ {
+ { /*inp*/ { "alnum" }, /* #01 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "alpha" }, /* #02 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "cntrl" }, /* #03 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "digit" }, /* #04 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "graph" }, /* #05 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "lower" }, /* #06 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "print" }, /* #07 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "punct" }, /* #08 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "space" }, /* #09 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "upper" }, /* #10 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "xdigit" }, /* #11 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "" }, /* #12 */
+ /*exp*/ { 0,1,0, },
+ },
+ { /*inp*/ { "ideograph" }, /* #13 */
+ /*exp*/ { 0,1,0, },
+ },
+ { /*inp*/ { "english" }, /* #14 */
+ /*exp*/ { 0,1,0, },
+ },
+ { /*inp*/ { "ascii" }, /* #15 */
+ /*exp*/ { 0,1,0, },
+ },
+ { /*inp*/ { "special" }, /* #16 */
+ /*exp*/ { 0,1,0, },
+ },
+ { .is_last = 1 }
+ }
+ },
+ { { Twctype, TST_LOC_enUS },
+ {
+ { /*inp*/ { "alnum" }, /* #01 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "alpha" }, /* #02 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "cntrl" }, /* #03 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "digit" }, /* #04 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "graph" }, /* #05 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "lower" }, /* #06 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "print" }, /* #07 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "punct" }, /* #08 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "space" }, /* #09 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "upper" }, /* #10 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "xdigit" }, /* #11 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "" }, /* #12 */
+ /*exp*/ { 0,1,0, },
+ },
+ { /*inp*/ { "ideograph" }, /* #13 */
+ /*exp*/ { 0,1,0, },
+ },
+ { /*inp*/ { "english" }, /* #14 */
+ /*exp*/ { 0,1,0, },
+ },
+ { /*inp*/ { "ascii" }, /* #15 */
+ /*exp*/ { 0,1,0, },
+ },
+ { /*inp*/ { "special" }, /* #16 */
+ /*exp*/ { 0,1,0, },
+ },
+ { .is_last = 1 }
+ }
+ },
+#if 0
+ { { Twctype, TST_LOC_eucJP },
+#else
+ { { Twctype, TST_LOC_ja_UTF8 },
+#endif
+ {
+ { /*inp*/ { "alnum" }, /* #01 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "alpha" }, /* #02 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "cntrl" }, /* #03 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "digit" }, /* #04 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "graph" }, /* #05 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "lower" }, /* #06 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "print" }, /* #07 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "punct" }, /* #08 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "space" }, /* #09 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "upper" }, /* #10 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "xdigit" }, /* #11 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "ideogram" }, /* #12 */
+ /*exp*/ { 0,1,0, },
+ },
+ { /*inp*/ { "phonogram" }, /* #13 */
+ /*exp*/ { 0,1,0, },
+ },
+ { /*inp*/ { "jspace" }, /* #14 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "jhira" }, /* #15 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "jkata" }, /* #16 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "jkanji" }, /* #17 */
+ /*exp*/ { 0,0,0, },
+ },
+ { /*inp*/ { "jdigit" }, /* #18 */
+ /*exp*/ { 0,0,0, },
+ },
+ { .is_last = 1 }
+ }
+ },
+ { { Twctype, TST_LOC_end }}
+};
diff --git a/test/locale-mbwc/dat_wcwidth.c b/test/locale-mbwc/dat_wcwidth.c
new file mode 100644
index 000000000..b6b7c2974
--- /dev/null
+++ b/test/locale-mbwc/dat_wcwidth.c
@@ -0,0 +1,149 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: dat_wcwidth.c
+ *
+ * WCWIDTH: int wcwidth (wchar_t wc);
+ */
+
+TST_WCWIDTH tst_wcwidth_loc [] = {
+ {
+ { Twcwidth, TST_LOC_de },
+ {
+ { /*inp*/ { 0x0000 }, /* #01 */
+ /*exp*/ { 0, 1,0, },
+ },
+ { /*inp*/ { 0x0020 }, /* #02 */
+ /*exp*/ { 0, 1,1, },
+ },
+ { /*inp*/ { 0x007F }, /* #03 */
+ /*exp*/ { 0, 1,-1, },
+ },
+ { /*inp*/ { 0x0080 }, /* #04 */
+ /*exp*/ { 0, 1,-1, },
+ },
+ { /*inp*/ { 0x00A1 }, /* #05 */
+ /*exp*/ { 0, 1,1, },
+ },
+ { /*inp*/ { 0x00C1 }, /* #06 */
+ /*exp*/ { 0, 1,1, },
+ },
+#ifdef SHOJI_IS_RIGHT
+ /* <WAIVER> */ /* CHECK : wint_t */
+ { /*inp*/ { 0x3041 }, /* #07 */
+ /*exp*/ { 0, 1,0, },
+ },
+#else
+ { /*inp*/ { 0x3041 }, /* #07 */
+ /*exp*/ { 0, 1,EOF, },
+ },
+#endif
+ { .is_last = 1 }
+ }
+ },
+ {
+ { Twcwidth, TST_LOC_enUS },
+ {
+ { /*inp*/ { 0x0000 }, /* #01 */
+ /*exp*/ { 0, 1,0, },
+ },
+ { /*inp*/ { 0x0020 }, /* #02 */
+ /*exp*/ { 0, 1,1, },
+ },
+ { /*inp*/ { 0x007F }, /* #03 */
+ /*exp*/ { 0, 1,-1, },
+ },
+ { /*inp*/ { 0x0080 }, /* #04 */
+ /*exp*/ { 0, 1,-1, },
+ },
+ { /*inp*/ { 0x00A1 }, /* #05 */
+ /*exp*/ { 0, 1,-1, },
+ },
+ { /*inp*/ { 0x00C1 }, /* #06 */
+ /*exp*/ { 0, 1,-1, },
+ },
+ { /*inp*/ { 0x3041 }, /* #07 */
+ /*exp*/ { 0, 1,-1, },
+ },
+ { .is_last = 1 }
+ }
+ },
+#if 0
+ {
+ { Twcwidth, TST_LOC_eucJP },
+ {
+ { /*inp*/ { 0x0000 }, /* #01 */
+ /*exp*/ { 0, 1,0, },
+ },
+ { /*inp*/ { 0x0020 }, /* #02 */
+ /*exp*/ { 0, 1,1, },
+ },
+ { /*inp*/ { 0x007F }, /* #03 */
+ /*exp*/ { 0, 1,-1, },
+ },
+ { /*inp*/ { 0x0080 }, /* #04 */
+ /*exp*/ { 0, 1,-1, },
+ },
+#ifdef SHOJI_IS_RIGHT
+ /* <NO_WAIVER> */
+ { /*inp*/ { 0x00A1 }, /* #05 */
+ /*exp*/ { 0, 1,0, },
+ },
+#else
+ /* XXX U00A1 is a valid character in EUC-JP. */
+ { /*inp*/ { 0x00A1 }, /* #05 */
+ /*exp*/ { 0, 1,2, },
+ },
+#endif
+ /* jisx0212 */
+ { /*inp*/ { 0x00C1 }, /* #06 */
+ /*exp*/ { 0, 1,2, },
+ },
+ { /*inp*/ { 0x3041 }, /* #07 */
+ /*exp*/ { 0, 1,2, },
+ },
+ { .is_last = 1 }
+ }
+ },
+#else
+ {
+ { Twcwidth, TST_LOC_ja_UTF8 },
+ {
+ { /*inp*/ { 0x0000 }, /* #01 */
+ /*exp*/ { 0, 1,0, },
+ },
+ { /*inp*/ { 0x0020 }, /* #02 */
+ /*exp*/ { 0, 1,1, },
+ },
+ { /*inp*/ { 0x007F }, /* #03 */
+ /*exp*/ { 0, 1,-1, },
+ },
+ { /*inp*/ { 0x0080 }, /* #04 */
+ /*exp*/ { 0, 1,-1, },
+ },
+#ifdef SHOJI_IS_RIGHT
+ /* <NO_WAIVER> */
+ { /*inp*/ { 0x00A1 }, /* #05 */
+ /*exp*/ { 0, 1,0, },
+ },
+#else
+ /* XXX U00A1 is a valid character in EUC-JP.UTF-8. */
+ { /*inp*/ { 0x00A1 }, /* #05 */
+ /*exp*/ { 0, 1,1, },
+ },
+#endif
+ /* jisx0212 */
+ { /*inp*/ { 0x00C1 }, /* #06 */
+ /*exp*/ { 0, 1,1, },
+ },
+ { /*inp*/ { 0x3041 }, /* #07 */
+ /*exp*/ { 0, 1,2, },
+ },
+ { .is_last = 1 }
+ }
+ },
+#endif
+ {
+ { Twcwidth, TST_LOC_end }
+ }
+};
diff --git a/test/locale-mbwc/tgn_funcdef.h b/test/locale-mbwc/tgn_funcdef.h
new file mode 100644
index 000000000..ec247926f
--- /dev/null
+++ b/test/locale-mbwc/tgn_funcdef.h
@@ -0,0 +1,160 @@
+#ifndef TGN_FUNCDEF_H
+#define TGN_FUNCDEF_H
+
+/* Unique number for each test. */
+#define Tiswalnum 1
+#define Tiswalpha 2
+#define Tiswcntrl 3
+#define Tiswctype 4
+#define Tiswdigit 5
+#define Tiswgraph 6
+#define Tiswlower 7
+#define Tiswprint 8
+#define Tiswpunct 9
+#define Tiswspace 10
+#define Tiswupper 11
+#define Tiswxdigit 12
+#define Tmblen 13
+#define Tmbrlen 14
+#define Tmbrtowc 15
+#define Tmbsrtowcs 16
+#define Tmbstowcs 17
+#define Tmbtowc 18
+#define Tstrcoll 19
+#define Tstrfmon 20
+#define Tstrxfrm 21
+#define Tswscanf 22
+#define Ttowctrans 23
+#define Ttowlower 24
+#define Ttowupper 25
+#define Twcrtomb 26
+#define Twcscat 27
+#define Twcschr 28
+#define Twcscmp 29
+#define Twcscoll 30
+#define Twcscpy 31
+#define Twcscspn 32
+#define Twcslen 33
+#define Twcsncat 34
+#define Twcsncmp 35
+#define Twcsncpy 36
+#define Twcspbrk 37
+#define Twcsrtombs 38
+#define Twcsspn 39
+#define Twcsstr 40
+#define Twcstod 41
+#define Twcstok 42
+#define Twcstombs 43
+#define Twcswidth 44
+#define Twcsxfrm 45
+#define Twctob 46
+#define Twctomb 47
+#define Twctrans 48
+#define Twctype 49
+#define Twcwidth 50
+
+/* Name of each test. */
+#define S_ISWALNUM "iswalnum"
+#define S_ISWALPHA "iswalpha"
+#define S_ISWCNTRL "iswcntrl"
+#define S_ISWCTYPE "iswctype"
+#define S_ISWDIGIT "iswdigit"
+#define S_ISWGRAPH "iswgraph"
+#define S_ISWLOWER "iswlower"
+#define S_ISWPRINT "iswprint"
+#define S_ISWPUNCT "iswpunct"
+#define S_ISWSPACE "iswspace"
+#define S_ISWUPPER "iswupper"
+#define S_ISWXDIGIT "iswxdigit"
+#define S_MBLEN "mblen"
+#define S_MBRLEN "mbrlen"
+#define S_MBRTOWC "mbrtowc"
+#define S_MBSRTOWCS "mbsrtowcs"
+#define S_MBSTOWCS "mbstowcs"
+#define S_MBTOWC "mbtowc"
+#define S_STRCOLL "strcoll"
+#define S_STRFMON "strfmon"
+#define S_STRXFRM "strxfrm"
+#define S_SWSCANF "swscanf"
+#define S_TOWCTRANS "towctrans"
+#define S_TOWLOWER "towlower"
+#define S_TOWUPPER "towupper"
+#define S_WCRTOMB "wcrtomb"
+#define S_WCSCAT "wcscat"
+#define S_WCSCHR "wcschr"
+#define S_WCSCMP "wcscmp"
+#define S_WCSCOLL "wcscoll"
+#define S_WCSCPY "wcscpy"
+#define S_WCSCSPN "wcscspn"
+#define S_WCSLEN "wcslen"
+#define S_WCSNCAT "wcsncat"
+#define S_WCSNCMP "wcsncmp"
+#define S_WCSNCPY "wcsncpy"
+#define S_WCSPBRK "wcspbrk"
+#define S_WCSRTOMBS "wcsrtombs"
+#define S_WCSSPN "wcsspn"
+#define S_WCSSTR "wcsstr"
+#define S_WCSTOD "wcstod"
+#define S_WCSTOK "wcstok"
+#define S_WCSTOMBS "wcstombs"
+#define S_WCSWIDTH "wcswidth"
+#define S_WCSXFRM "wcsxfrm"
+#define S_WCTOB "wctob"
+#define S_WCTOMB "wctomb"
+#define S_WCTRANS "wctrans"
+#define S_WCTYPE "wctype"
+#define S_WCWIDTH "wcwidth"
+
+/* Prototypes for test functions. */
+extern int tst_iswalnum (FILE *, int);
+extern int tst_iswalpha (FILE *, int);
+extern int tst_iswcntrl (FILE *, int);
+extern int tst_iswctype (FILE *, int);
+extern int tst_iswdigit (FILE *, int);
+extern int tst_iswgraph (FILE *, int);
+extern int tst_iswlower (FILE *, int);
+extern int tst_iswprint (FILE *, int);
+extern int tst_iswpunct (FILE *, int);
+extern int tst_iswspace (FILE *, int);
+extern int tst_iswupper (FILE *, int);
+extern int tst_iswxdigit (FILE *, int);
+extern int tst_mblen (FILE *, int);
+extern int tst_mbrlen (FILE *, int);
+extern int tst_mbrtowc (FILE *, int);
+extern int tst_mbsrtowcs (FILE *, int);
+extern int tst_mbstowcs (FILE *, int);
+extern int tst_mbtowc (FILE *, int);
+extern int tst_strcoll (FILE *, int);
+extern int tst_strfmon (FILE *, int);
+extern int tst_strxfrm (FILE *, int);
+extern int tst_swscanf (FILE *, int);
+extern int tst_towctrans (FILE *, int);
+extern int tst_towlower (FILE *, int);
+extern int tst_towupper (FILE *, int);
+extern int tst_wcrtomb (FILE *, int);
+extern int tst_wcscat (FILE *, int);
+extern int tst_wcschr (FILE *, int);
+extern int tst_wcscmp (FILE *, int);
+extern int tst_wcscoll (FILE *, int);
+extern int tst_wcscpy (FILE *, int);
+extern int tst_wcscspn (FILE *, int);
+extern int tst_wcslen (FILE *, int);
+extern int tst_wcsncat (FILE *, int);
+extern int tst_wcsncmp (FILE *, int);
+extern int tst_wcsncpy (FILE *, int);
+extern int tst_wcspbrk (FILE *, int);
+extern int tst_wcsrtombs (FILE *, int);
+extern int tst_wcsspn (FILE *, int);
+extern int tst_wcsstr (FILE *, int);
+extern int tst_wcstod (FILE *, int);
+extern int tst_wcstok (FILE *, int);
+extern int tst_wcstombs (FILE *, int);
+extern int tst_wcswidth (FILE *, int);
+extern int tst_wcsxfrm (FILE *, int);
+extern int tst_wctob (FILE *, int);
+extern int tst_wctomb (FILE *, int);
+extern int tst_wctrans (FILE *, int);
+extern int tst_wctype (FILE *, int);
+extern int tst_wcwidth (FILE *, int);
+
+#endif /* TGN_FUNCDEF_H */
diff --git a/test/locale-mbwc/tgn_locdef.h b/test/locale-mbwc/tgn_locdef.h
new file mode 100644
index 000000000..89146a714
--- /dev/null
+++ b/test/locale-mbwc/tgn_locdef.h
@@ -0,0 +1,32 @@
+#ifndef TGN_LOCDEF_H
+#define TGN_LOCDEF_H
+
+/* Defines for all locales used in the suite. */
+
+/* POSIX C locale. */
+#define TST_LOC_C "C"
+
+/* German locale with ISO-8859-1. */
+#define TST_LOC_de "de_DE.ISO-8859-1"
+
+/* For US we use ANSI_X3.4-1968 (ASCII). Changed in en_US.ISO-8859-1 */
+#define TST_LOC_en "en_US.ISO-8859-1"
+#define TST_LOC_enUS TST_LOC_C
+
+/* NOTE: ja_JP.EUC-JP locale isn't supported into the uClibc!
+ UTF-8 is the only multibyte codeset supported. */
+/* Japanese locale with EUC-JP. */
+#if 0
+#define TST_LOC_eucJP "ja_JP.EUC-JP"
+#endif
+
+/* Japanese locale with UTF-8. */
+#define TST_LOC_ja_UTF8 "ja_JP.UTF-8"
+
+/* German locale with UTF-8. */
+#define TST_LOC_de_UTF8 "de_DE.UTF-8"
+
+/* End marker - must appear in each table as last entry. */
+#define TST_LOC_end "lastEntry"
+
+#endif /* TGN_LOCDEF_H */
diff --git a/test/locale-mbwc/tsp_common.c b/test/locale-mbwc/tsp_common.c
new file mode 100644
index 000000000..cd88274c5
--- /dev/null
+++ b/test/locale-mbwc/tsp_common.c
@@ -0,0 +1,64 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ * Main driver
+ */
+
+
+#define TST_FUNCTION_CALL(func) _TST_FUNCTION_CALL(func)
+#define _TST_FUNCTION_CALL(func) tst ##_## func
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <locale.h>
+#include <errno.h>
+#include <signal.h>
+
+#include "tst_types.h"
+#include "tgn_locdef.h"
+
+
+int
+main (int argc, char *argv[])
+{
+ int ret;
+ int debug;
+
+ debug = argc > 1 ? atoi (argv[1]) : 0;
+
+ if (debug)
+ {
+ fprintf (stdout, "\nTST_MBWC ===> %s ...\n", argv[0]);
+ }
+ ret = TST_FUNCTION_CALL (TST_FUNCTION) (stdout, debug);
+
+ return (ret != 0);
+}
+
+#define MAX_RESULT_REC 132
+char result_rec[MAX_RESULT_REC];
+
+
+int
+result (FILE * fp, char res, const char *func, const char *loc, int rec_no,
+ int seq_no, int case_no, const char *msg)
+{
+ if (fp == NULL
+ || strlen (func) + strlen (loc) + strlen (msg) + 32 > MAX_RESULT_REC)
+ {
+ fprintf (stderr,
+ "Warning: result(): can't write the result: %s:%s:%d:%d:%s\n",
+ func, loc, rec_no, case_no, msg);
+ return 0;
+ }
+
+ sprintf (result_rec, "%s:%s:%d:%d:%d:%c:%s\n", func, loc, rec_no, seq_no,
+ case_no, res, msg);
+
+ if (fputs (result_rec, fp) == EOF)
+ {
+ return 0;
+ }
+
+ return 1;
+}
diff --git a/test/locale-mbwc/tst_funcs.h b/test/locale-mbwc/tst_funcs.h
new file mode 100644
index 000000000..552bed2f9
--- /dev/null
+++ b/test/locale-mbwc/tst_funcs.h
@@ -0,0 +1,272 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: tst_funcs.h
+ *
+ * Definitions of macros
+ */
+
+
+#ifndef TST_FUNCS_H
+#define TST_FUNCS_H
+
+#define C_SUCCESS 'S' /* test case test passed */
+#define C_FAILURE 'F' /* test case failed */
+#define C_IGNORED 'I' /* test case/result ignored (not tested) */
+#define C_INVALID 'D' /* test data may be wrong */
+#define C_LOCALES 'L' /* can't set locale (skip) */
+
+
+extern int result (FILE * fp, char res, const char *func, const char *loc,
+ int rec_no, int seq_num, int case_no, const char *msg);
+
+#define Result(C, S, E, M) \
+ result (fp, (C), (S), locale, rec+1, seq_num+1, (E), (M))
+
+#define CASE_0 0
+#define CASE_1 1
+#define CASE_2 2
+#define CASE_3 3
+#define CASE_4 4
+#define CASE_5 5
+#define CASE_6 6
+#define CASE_7 7
+#define CASE_8 8
+#define CASE_9 9
+
+#define MS_PASSED "PASSED"
+#define MS_SPACE " "
+#define MS_FAILED " "
+#define MS_NOTEST "NOTEST"
+#define MS_ABORTU "ABEND0"
+#define MS_ABORT "ABEND1"
+
+#define MK_PASSED 0x00
+#define MK_SPACE 0x01
+#define MK_NOTEST 0x02
+#define MK_ABORTU 0x04
+#define MK_ABORT 0x08
+
+
+
+/* ------------------ COMMON MACROS ------------------ */
+
+#define TST_ABS(x) (((x) > 0) ? (x) : -(x))
+
+#define TMD_ERRET(_type_) int err_val; \
+ int ret_flg; \
+ _type_ ret_val
+
+#define TMD_RECHEAD(_FUNC_) \
+ \
+ typedef struct { \
+ TIN_##_FUNC_##_REC input; \
+ TEX_##_FUNC_##_REC expect; \
+ int is_last; \
+ } TST_##_FUNC_##_REC; \
+ typedef struct { \
+ TST_HEAD hd; \
+ TST_##_FUNC_##_REC rec[ MAX_LOC_TEST ]; \
+ } TST_##_FUNC_
+
+#define TST_FTYP(func) tst_##func##_loc
+#define TST_HEAD(func) tst_##func##_loc[ loc ].hd
+#define TST_INPUT(func) tst_##func##_loc[ loc ].rec[ rec ].input
+#define TST_EXPECT(func) tst_##func##_loc[ loc ].rec[ rec ].expect
+#define TST_INPUT_SEQ(func) \
+ tst_##func##_loc[ loc ].rec[ rec ].input.seq[ seq_num ]
+#define TST_EXPECT_SEQ(func) \
+ tst_##func##_loc[ loc ].rec[ rec ].expect.seq[ seq_num ]
+#define TST_IS_LAST(func) \
+ tst_##func##_loc[ loc ].rec[ rec ].is_last
+
+
+#define TST_DECL_VARS(_type_) \
+ int loc, rec, err_count = 0; \
+ int warn_count __attribute__ ((unused)); \
+ int func_id, seq_num = 0; \
+ const char *locale; \
+ int err_exp, ret_flg; \
+ int errno_save = 0; \
+ _type_ ret_exp; \
+ _type_ ret
+
+#define TST_DO_TEST(o_func) \
+ for (loc = 0; strcmp (TST_HEAD (o_func).locale, TST_LOC_end); ++loc)
+
+
+#define TST_HEAD_LOCALE(ofunc, s_func) \
+ func_id = TST_HEAD (ofunc).func_id; \
+ locale = TST_HEAD (ofunc).locale; \
+ if (setlocale (LC_ALL, locale) == NULL) \
+ { \
+ fprintf (stderr, "Warning : can't set locale: %s\nskipping ...\n", \
+ locale); \
+ result (fp, C_LOCALES, s_func, locale, 0, 0, 0, "can't set locale"); \
+ ++err_count; \
+ continue; \
+ }
+
+#define TST_DO_REC(ofunc) \
+ for (rec=0; !TST_IS_LAST (ofunc); ++rec)
+
+#define TST_DO_SEQ(_count_) \
+ for (seq_num=0; seq_num < _count_; seq_num++)
+
+#define TST_GET_ERRET(_ofunc_) \
+ err_exp = TST_EXPECT (_ofunc_).err_val; \
+ ret_flg = TST_EXPECT (_ofunc_).ret_flg; \
+ ret_exp = TST_EXPECT (_ofunc_).ret_val
+
+#define TST_GET_ERRET_SEQ(_ofunc_) \
+ err_exp = TST_EXPECT_SEQ (_ofunc_).err_val; \
+ ret_flg = TST_EXPECT_SEQ (_ofunc_).ret_flg; \
+ ret_exp = TST_EXPECT_SEQ (_ofunc_).ret_val
+
+#define TST_CLEAR_ERRNO \
+ errno = 0
+
+#define TST_SAVE_ERRNO \
+ errno_save = errno
+
+/* Test value of ret and of errno if it should have a value. */
+#define TST_IF_RETURN(_s_func_) \
+ if (err_exp != 0) \
+ { \
+ if (errno_save == err_exp) \
+ { \
+ result (fp, C_SUCCESS, _s_func_, locale, rec+1, seq_num+1, 1, \
+ MS_PASSED); \
+ } \
+ else \
+ { \
+ err_count++; \
+ result (fp, C_FAILURE, _s_func_, locale, rec+1, seq_num+1, 1, \
+ "the value of errno is different from an expected value"); \
+ } \
+ } \
+ \
+ if (ret_flg == 1) \
+ { \
+ if (ret == ret_exp) \
+ { \
+ result (fp, C_SUCCESS, _s_func_, locale, rec+1, seq_num+1, 2, \
+ MS_PASSED); \
+ } \
+ else \
+ { \
+ err_count++; \
+ result (fp, C_FAILURE, _s_func_, locale, rec+1, seq_num+1, 2, \
+ "the return value is different from an expected value"); \
+ } \
+ } \
+ else
+
+#define TEX_ERRET_REC(_type_) \
+ struct { \
+ TMD_ERRET (_type_); \
+ }
+
+#define TEX_ERRET_REC_SEQ(_type_, _count_) \
+ struct { \
+ struct { \
+ TMD_ERRET (_type_); \
+ } seq[ _count_ ]; \
+ }
+
+
+
+/* ------------------ FUNCTION: ISW*() ------------------- */
+
+#define TST_ISW_STRUCT(_FUNC_, _func_) \
+ typedef \
+ struct { \
+ wint_t wc; \
+ } TIN_ISW##_FUNC_##_REC; \
+ typedef \
+ TEX_ERRET_REC (int) TEX_ISW##_FUNC_##_REC; \
+ TMD_RECHEAD (ISW##_FUNC_)
+
+#define TST_FUNC_ISW(_FUNC_, _func_) \
+int \
+tst_isw##_func_ (FILE *fp, int debug_flg) \
+{ \
+ TST_DECL_VARS(int); \
+ wint_t wc; \
+ TST_DO_TEST (isw##_func_) \
+ { \
+ TST_HEAD_LOCALE (isw##_func_, S_ISW##_FUNC_); \
+ TST_DO_REC(isw##_func_) \
+ { \
+ TST_GET_ERRET (isw##_func_); \
+ wc = TST_INPUT (isw##_func_).wc; \
+ ret = isw##_func_ (wc); \
+ if (debug_flg) \
+ { \
+ fprintf (stdout, "isw*() [ %s : %d ] ret = %d\n", locale, \
+ rec+1, ret); \
+ } \
+ \
+ TST_IF_RETURN (S_ISW##_FUNC_) \
+ { \
+ if (ret != 0) \
+ { \
+ result (fp, C_SUCCESS, S_ISW##_FUNC_, locale, rec+1, \
+ seq_num+1, 3, MS_PASSED); \
+ } \
+ else \
+ { \
+ err_count++; \
+ result (fp, C_FAILURE, S_ISW##_FUNC_, locale, rec+1, \
+ seq_num+1, 3, \
+ "the function returned 0, but should be non-zero"); \
+ } \
+ } \
+ } \
+ } \
+ \
+ return err_count; \
+}
+
+
+
+/* ------------------ FUNCTION: TOW*() ------------------ */
+
+#define TST_TOW_STRUCT(_FUNC_, _func_) \
+ typedef \
+ struct { \
+ wint_t wc; \
+ } TIN_TOW##_FUNC_##_REC; \
+ typedef \
+ TEX_ERRET_REC (wint_t) TEX_TOW##_FUNC_##_REC; \
+ TMD_RECHEAD (TOW##_FUNC_)
+
+#define TST_FUNC_TOW(_FUNC_, _func_) \
+int \
+tst_tow##_func_ (FILE *fp, int debug_flg) \
+{ \
+ TST_DECL_VARS (wint_t); \
+ wint_t wc; \
+ TST_DO_TEST (tow##_func_) \
+ { \
+ TST_HEAD_LOCALE (tow##_func_, S_TOW##_FUNC_); \
+ TST_DO_REC (tow##_func_) \
+ { \
+ TST_GET_ERRET (tow##_func_); \
+ wc = TST_INPUT (tow##_func_).wc; \
+ ret = tow##_func_ (wc); \
+ if (debug_flg) \
+ { \
+ fprintf (stdout, "tow*() [ %s : %d ] ret = 0x%x\n", \
+ locale, rec+1, ret); \
+ } \
+ \
+ TST_IF_RETURN (S_TOW##_FUNC_) { }; \
+ } \
+ } \
+ \
+ return err_count; \
+}
+
+
+#endif /* TST_FUNCS_H */
diff --git a/test/locale-mbwc/tst_iswalnum.c b/test/locale-mbwc/tst_iswalnum.c
new file mode 100644
index 000000000..95ba863f9
--- /dev/null
+++ b/test/locale-mbwc/tst_iswalnum.c
@@ -0,0 +1,10 @@
+/*
+ ISWALNUM: int iswalnum (wint_t wc)
+*/
+
+#define TST_FUNCTION iswalnum
+
+#include "tsp_common.c"
+#include "dat_iswalnum.c"
+
+TST_FUNC_ISW (ALNUM, alnum);
diff --git a/test/locale-mbwc/tst_iswalpha.c b/test/locale-mbwc/tst_iswalpha.c
new file mode 100644
index 000000000..8eff2cc11
--- /dev/null
+++ b/test/locale-mbwc/tst_iswalpha.c
@@ -0,0 +1,10 @@
+/*
+ ISWALPHA: int iswalpha (wint_t wc);
+*/
+
+#define TST_FUNCTION iswalpha
+
+#include "tsp_common.c"
+#include "dat_iswalpha.c"
+
+TST_FUNC_ISW (ALPHA, alpha);
diff --git a/test/locale-mbwc/tst_iswcntrl.c b/test/locale-mbwc/tst_iswcntrl.c
new file mode 100644
index 000000000..4e1baa8dc
--- /dev/null
+++ b/test/locale-mbwc/tst_iswcntrl.c
@@ -0,0 +1,10 @@
+/*
+ ISWCNTRL: int iswcntrl (wint_t wc);
+*/
+
+#define TST_FUNCTION iswcntrl
+
+#include "tsp_common.c"
+#include "dat_iswcntrl.c"
+
+TST_FUNC_ISW (CNTRL, cntrl);
diff --git a/test/locale-mbwc/tst_iswctype.c b/test/locale-mbwc/tst_iswctype.c
new file mode 100644
index 000000000..3e79e092d
--- /dev/null
+++ b/test/locale-mbwc/tst_iswctype.c
@@ -0,0 +1,53 @@
+/*
+ ISWCTYPE: int iswctype (wint_t wc, wctype_t desc);
+*/
+
+#define TST_FUNCTION iswctype
+
+#include "tsp_common.c"
+#include "dat_iswctype.c"
+
+
+int
+tst_iswctype (FILE *fp, int debug_flg)
+{
+ TST_DECL_VARS (int);
+ wint_t wc;
+ const char *ts;
+
+ TST_DO_TEST (iswctype)
+ {
+ TST_HEAD_LOCALE (iswctype, S_ISWCTYPE);
+ TST_DO_REC (iswctype)
+ {
+ TST_GET_ERRET (iswctype);
+ wc = TST_INPUT (iswctype).wc;
+ ts = TST_INPUT (iswctype).ts;
+ ret = iswctype (wc, wctype (ts));
+ TST_SAVE_ERRNO;
+ if (debug_flg)
+ {
+ fprintf (stdout, "iswctype() [ %s : %d ] ret = %d\n",
+ locale, rec+1, ret);
+ }
+
+ TST_IF_RETURN (S_ISWCTYPE)
+ {
+ if (ret != 0)
+ {
+ result (fp, C_SUCCESS, S_ISWCTYPE, locale, rec+1,
+ seq_num+1, 3, MS_PASSED);
+ }
+ else
+ {
+ err_count++;
+ result (fp, C_FAILURE, S_ISWCTYPE, locale, rec+1,
+ seq_num+1, 3,
+ "the function returned 0, but should be non-zero");
+ }
+ }
+ }
+ }
+
+ return err_count;
+}
diff --git a/test/locale-mbwc/tst_iswdigit.c b/test/locale-mbwc/tst_iswdigit.c
new file mode 100644
index 000000000..5429ed07d
--- /dev/null
+++ b/test/locale-mbwc/tst_iswdigit.c
@@ -0,0 +1,11 @@
+/*
+ ISWDIGIT: int iswdigit (wint_t wc);
+*/
+
+
+#define TST_FUNCTION iswdigit
+
+#include "tsp_common.c"
+#include "dat_iswdigit.c"
+
+TST_FUNC_ISW (DIGIT, digit);
diff --git a/test/locale-mbwc/tst_iswgraph.c b/test/locale-mbwc/tst_iswgraph.c
new file mode 100644
index 000000000..91a70e2d3
--- /dev/null
+++ b/test/locale-mbwc/tst_iswgraph.c
@@ -0,0 +1,10 @@
+/*
+ ISWGRAPH: int iswgraph (wint_t wc);
+*/
+
+#define TST_FUNCTION iswgraph
+
+#include "tsp_common.c"
+#include "dat_iswgraph.c"
+
+TST_FUNC_ISW (GRAPH, graph);
diff --git a/test/locale-mbwc/tst_iswlower.c b/test/locale-mbwc/tst_iswlower.c
new file mode 100644
index 000000000..e0911001d
--- /dev/null
+++ b/test/locale-mbwc/tst_iswlower.c
@@ -0,0 +1,10 @@
+/*
+ ISWLOWER: int iswlower (wint_t wc);
+*/
+
+#define TST_FUNCTION iswlower
+
+#include "tsp_common.c"
+#include "dat_iswlower.c"
+
+TST_FUNC_ISW (LOWER, lower);
diff --git a/test/locale-mbwc/tst_iswprint.c b/test/locale-mbwc/tst_iswprint.c
new file mode 100644
index 000000000..8d5bde51f
--- /dev/null
+++ b/test/locale-mbwc/tst_iswprint.c
@@ -0,0 +1,10 @@
+/*
+ ISWPRINT: int iswprint (wint_t wc);
+*/
+
+#define TST_FUNCTION iswprint
+
+#include "tsp_common.c"
+#include "dat_iswprint.c"
+
+TST_FUNC_ISW (PRINT, print);
diff --git a/test/locale-mbwc/tst_iswpunct.c b/test/locale-mbwc/tst_iswpunct.c
new file mode 100644
index 000000000..4749d61e3
--- /dev/null
+++ b/test/locale-mbwc/tst_iswpunct.c
@@ -0,0 +1,10 @@
+/*
+ ISWPUNCT: int iswpunct (wint_t wc);
+*/
+
+#define TST_FUNCTION iswpunct
+
+#include "tsp_common.c"
+#include "dat_iswpunct.c"
+
+TST_FUNC_ISW (PUNCT, punct);
diff --git a/test/locale-mbwc/tst_iswspace.c b/test/locale-mbwc/tst_iswspace.c
new file mode 100644
index 000000000..6c26d5ff6
--- /dev/null
+++ b/test/locale-mbwc/tst_iswspace.c
@@ -0,0 +1,10 @@
+/*
+ ISWSPACE: int iswspace (wint_t wc);
+*/
+
+#define TST_FUNCTION iswspace
+
+#include "tsp_common.c"
+#include "dat_iswspace.c"
+
+TST_FUNC_ISW (SPACE, space);
diff --git a/test/locale-mbwc/tst_iswupper.c b/test/locale-mbwc/tst_iswupper.c
new file mode 100644
index 000000000..dfe5a5b35
--- /dev/null
+++ b/test/locale-mbwc/tst_iswupper.c
@@ -0,0 +1,10 @@
+/*
+ ISWUPPER: int iswupper (wint_t wc);
+*/
+
+#define TST_FUNCTION iswupper
+
+#include "tsp_common.c"
+#include "dat_iswupper.c"
+
+TST_FUNC_ISW (UPPER, upper);
diff --git a/test/locale-mbwc/tst_iswxdigit.c b/test/locale-mbwc/tst_iswxdigit.c
new file mode 100644
index 000000000..5f9c0c5d5
--- /dev/null
+++ b/test/locale-mbwc/tst_iswxdigit.c
@@ -0,0 +1,10 @@
+/*
+ ISWXDIGIT: int iswxdigit (wint_t wc);
+*/
+
+#define TST_FUNCTION iswxdigit
+
+#include "tsp_common.c"
+#include "dat_iswxdigit.c"
+
+TST_FUNC_ISW (XDIGIT, xdigit);
diff --git a/test/locale-mbwc/tst_mblen.c b/test/locale-mbwc/tst_mblen.c
new file mode 100644
index 000000000..35ccf6c1a
--- /dev/null
+++ b/test/locale-mbwc/tst_mblen.c
@@ -0,0 +1,85 @@
+/*
+ MBLEN: int mblen (char *s, size_t n)
+*/
+
+#define TST_FUNCTION mblen
+
+#include "tsp_common.c"
+#include "dat_mblen.c"
+
+int
+tst_mblen (FILE * fp, int debug_flg)
+{
+ TST_DECL_VARS (int);
+ char s_flg;
+ const char *s_in;
+ size_t n;
+
+ TST_DO_TEST (mblen)
+ {
+ TST_HEAD_LOCALE (mblen, S_MBLEN);
+ TST_DO_REC (mblen)
+ {
+ TST_GET_ERRET (mblen);
+ s_flg = TST_INPUT (mblen).s_flg;
+ s_in = TST_INPUT (mblen).s;
+ n = TST_INPUT (mblen).n;
+
+ if (s_flg == 0)
+ {
+ s_in = NULL;
+ }
+
+ if (n == USE_MBCURMAX)
+ {
+ n = MB_CUR_MAX;
+ }
+
+ TST_CLEAR_ERRNO;
+ ret = mblen (s_in, n);
+ TST_SAVE_ERRNO;
+
+ TST_IF_RETURN (S_MBLEN)
+ {
+ if (s_in == NULL)
+ { /* state dependency */
+ if (ret_exp == +1)
+ { /* state-dependent */
+ if (ret != 0)
+ {
+ /* non-zero: state-dependent encoding */
+ Result (C_SUCCESS, S_MBLEN, CASE_3, MS_PASSED);
+ }
+ else
+ {
+ err_count++;
+ Result (C_FAILURE, S_MBLEN, CASE_3,
+ "should be state-dependent encoding, "
+ "but the return value shows it is"
+ " state-independent");
+ }
+ }
+
+ if (ret_exp == 0)
+ { /* state-independent */
+ if (ret == 0)
+ {
+ /* non-zero: state-dependent encoding */
+ Result (C_SUCCESS, S_MBLEN, CASE_3, MS_PASSED);
+ }
+ else
+ {
+ err_count++;
+ Result (C_FAILURE, S_MBLEN, CASE_3,
+ "should be state-independent encoding, "
+ "but the return value shows it is"
+ " state-dependent");
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return err_count;
+}
diff --git a/test/locale-mbwc/tst_mbrlen.c b/test/locale-mbwc/tst_mbrlen.c
new file mode 100644
index 000000000..b8681b721
--- /dev/null
+++ b/test/locale-mbwc/tst_mbrlen.c
@@ -0,0 +1,82 @@
+/*
+ MBRLEN: size_t mbrlen (char *s, size_t n, mbstate_t *ps)
+*/
+
+#define TST_FUNCTION mbrlen
+
+#include "tsp_common.c"
+#include "dat_mbrlen.c"
+
+
+int
+tst_mbrlen (FILE * fp, int debug_flg)
+{
+ TST_DECL_VARS (size_t);
+ char s_flg;
+ const char *s_in;
+ size_t n;
+ char t_flg;
+ char t_ini;
+ static mbstate_t s = { 0 };
+ mbstate_t *ps;
+
+ TST_DO_TEST (mbrlen)
+ {
+ TST_HEAD_LOCALE (mbrlen, S_MBRLEN);
+ TST_DO_REC (mbrlen)
+ {
+ if (mbrlen (NULL, 0, &s) != 0)
+ {
+ err_count++;
+ Result (C_FAILURE, S_MBRLEN, CASE_3,
+ "Initialization (external mbstate object) failed "
+ "- skipped this test case.");
+ continue;
+ }
+
+ TST_DO_SEQ (MBRLEN_SEQNUM)
+ {
+ TST_GET_ERRET_SEQ (mbrlen);
+ s_flg = TST_INPUT_SEQ (mbrlen).s_flg;
+ s_in = TST_INPUT_SEQ (mbrlen).s;
+ n = TST_INPUT_SEQ (mbrlen).n;
+ t_flg = TST_INPUT_SEQ (mbrlen).t_flg;
+ t_ini = TST_INPUT_SEQ (mbrlen).t_init;
+ if (s_flg == 0)
+ {
+ s_in = NULL;
+ }
+
+ if (n == USE_MBCURMAX) /* rewrite tst_mblen() like this */
+ {
+ n = MB_CUR_MAX;
+ }
+
+ ps = (t_flg == 0) ? NULL : &s;
+
+ if (t_ini != 0)
+ {
+ memset (&s, 0, sizeof (s));
+ mbrlen (NULL, 0, NULL);
+ }
+
+ TST_CLEAR_ERRNO;
+ ret = mbrlen (s_in, n, ps);
+ TST_SAVE_ERRNO;
+
+ if (debug_flg)
+ {
+ fprintf (stdout, "mbrlen() [ %s : %d : %d ] ret = %zd\n",
+ locale, rec + 1, seq_num + 1, ret);
+ fprintf (stdout, " errno = %d\n", errno_save);
+ }
+
+ TST_IF_RETURN (S_MBRLEN)
+ {
+ };
+ }
+ }
+ }
+
+ return err_count;
+}
diff --git a/test/locale-mbwc/tst_mbrlen.i b/test/locale-mbwc/tst_mbrlen.i
new file mode 100644
index 000000000..95a00f8be
--- /dev/null
+++ b/test/locale-mbwc/tst_mbrlen.i
@@ -0,0 +1,8009 @@
+# 1 "tst_mbrlen.c"
+# 1 "/vob/stsca_uClibc-nptl/uClibc-nptl/test/locale-mbwc//"
+# 1 "<built-in>"
+#define __STDC__ 1
+# 1 "<built-in>"
+#define __STDC_HOSTED__ 1
+# 1 "<built-in>"
+#define __GNUC__ 4
+# 1 "<built-in>"
+#define __GNUC_MINOR__ 1
+# 1 "<built-in>"
+#define __GNUC_PATCHLEVEL__ 1
+# 1 "<built-in>"
+#define __SIZE_TYPE__ unsigned int
+# 1 "<built-in>"
+#define __PTRDIFF_TYPE__ int
+# 1 "<built-in>"
+#define __WCHAR_TYPE__ long int
+# 1 "<built-in>"
+#define __WINT_TYPE__ unsigned int
+# 1 "<built-in>"
+#define __INTMAX_TYPE__ long long int
+# 1 "<built-in>"
+#define __UINTMAX_TYPE__ long long unsigned int
+# 1 "<built-in>"
+#define __GXX_ABI_VERSION 1002
+# 1 "<built-in>"
+#define __SCHAR_MAX__ 127
+# 1 "<built-in>"
+#define __SHRT_MAX__ 32767
+# 1 "<built-in>"
+#define __INT_MAX__ 2147483647
+# 1 "<built-in>"
+#define __LONG_MAX__ 2147483647L
+# 1 "<built-in>"
+#define __LONG_LONG_MAX__ 9223372036854775807LL
+# 1 "<built-in>"
+#define __WCHAR_MAX__ 2147483647
+# 1 "<built-in>"
+#define __CHAR_BIT__ 8
+# 1 "<built-in>"
+#define __INTMAX_MAX__ 9223372036854775807LL
+# 1 "<built-in>"
+#define __FLT_EVAL_METHOD__ 0
+# 1 "<built-in>"
+#define __FLT_RADIX__ 2
+# 1 "<built-in>"
+#define __FLT_MANT_DIG__ 24
+# 1 "<built-in>"
+#define __FLT_DIG__ 6
+# 1 "<built-in>"
+#define __FLT_MIN_EXP__ (-125)
+# 1 "<built-in>"
+#define __FLT_MIN_10_EXP__ (-37)
+# 1 "<built-in>"
+#define __FLT_MAX_EXP__ 128
+# 1 "<built-in>"
+#define __FLT_MAX_10_EXP__ 38
+# 1 "<built-in>"
+#define __FLT_MAX__ 3.40282347e+38F
+# 1 "<built-in>"
+#define __FLT_MIN__ 1.17549435e-38F
+# 1 "<built-in>"
+#define __FLT_EPSILON__ 1.19209290e-7F
+# 1 "<built-in>"
+#define __FLT_DENORM_MIN__ 1.40129846e-45F
+# 1 "<built-in>"
+#define __FLT_HAS_INFINITY__ 1
+# 1 "<built-in>"
+#define __FLT_HAS_QUIET_NAN__ 1
+# 1 "<built-in>"
+#define __DBL_MANT_DIG__ 53
+# 1 "<built-in>"
+#define __DBL_DIG__ 15
+# 1 "<built-in>"
+#define __DBL_MIN_EXP__ (-1021)
+# 1 "<built-in>"
+#define __DBL_MIN_10_EXP__ (-307)
+# 1 "<built-in>"
+#define __DBL_MAX_EXP__ 1024
+# 1 "<built-in>"
+#define __DBL_MAX_10_EXP__ 308
+# 1 "<built-in>"
+#define __DBL_MAX__ 1.7976931348623157e+308
+# 1 "<built-in>"
+#define __DBL_MIN__ 2.2250738585072014e-308
+# 1 "<built-in>"
+#define __DBL_EPSILON__ 2.2204460492503131e-16
+# 1 "<built-in>"
+#define __DBL_DENORM_MIN__ 4.9406564584124654e-324
+# 1 "<built-in>"
+#define __DBL_HAS_INFINITY__ 1
+# 1 "<built-in>"
+#define __DBL_HAS_QUIET_NAN__ 1
+# 1 "<built-in>"
+#define __LDBL_MANT_DIG__ 53
+# 1 "<built-in>"
+#define __LDBL_DIG__ 15
+# 1 "<built-in>"
+#define __LDBL_MIN_EXP__ (-1021)
+# 1 "<built-in>"
+#define __LDBL_MIN_10_EXP__ (-307)
+# 1 "<built-in>"
+#define __LDBL_MAX_EXP__ 1024
+# 1 "<built-in>"
+#define __LDBL_MAX_10_EXP__ 308
+# 1 "<built-in>"
+#define __DECIMAL_DIG__ 17
+# 1 "<built-in>"
+#define __LDBL_MAX__ 1.7976931348623157e+308L
+# 1 "<built-in>"
+#define __LDBL_MIN__ 2.2250738585072014e-308L
+# 1 "<built-in>"
+#define __LDBL_EPSILON__ 2.2204460492503131e-16L
+# 1 "<built-in>"
+#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324L
+# 1 "<built-in>"
+#define __LDBL_HAS_INFINITY__ 1
+# 1 "<built-in>"
+#define __LDBL_HAS_QUIET_NAN__ 1
+# 1 "<built-in>"
+#define __REGISTER_PREFIX__
+# 1 "<built-in>"
+#define __USER_LABEL_PREFIX__
+# 1 "<built-in>"
+#define __VERSION__ "4.1.1 (STMicroelectronics Special) [build Jun 26 2007]"
+# 1 "<built-in>"
+#define __NO_INLINE__ 1
+# 1 "<built-in>"
+#define __FINITE_MATH_ONLY__ 1
+# 1 "<built-in>"
+#define __sh__ 1
+# 1 "<built-in>"
+#define __SH4__ 1
+# 1 "<built-in>"
+#define __SH_FPU_ANY__ 1
+# 1 "<built-in>"
+#define __SH_FPU_DOUBLE__ 1
+# 1 "<built-in>"
+#define __LITTLE_ENDIAN__ 1
+# 1 "<built-in>"
+#define __gnu_linux__ 1
+# 1 "<built-in>"
+#define __linux 1
+# 1 "<built-in>"
+#define __linux__ 1
+# 1 "<built-in>"
+#define linux 1
+# 1 "<built-in>"
+#define __unix 1
+# 1 "<built-in>"
+#define __unix__ 1
+# 1 "<built-in>"
+#define unix 1
+# 1 "<built-in>"
+#define __ELF__ 1
+# 1 "<command line>"
+#define DEBUG 1
+# 1 "<command line>"
+#define _GNU_SOURCE 1
+# 1 "<command line>"
+#define __USE_GNU 1
+# 1 "<command line>"
+# 1 "./../../include/libc-symbols.h" 1
+# 23 "./../../include/libc-symbols.h"
+#define _LIBC_SYMBOLS_H 1
+# 41 "./../../include/libc-symbols.h"
+# 1 "../../include/bits/uClibc_arch_features.h" 1
+
+
+
+
+
+#define _BITS_UCLIBC_ARCH_FEATURES_H
+
+
+
+
+
+#define __UCLIBC_ABORT_INSTRUCTION__ "trapa #0xff"
+
+
+
+#define __UCLIBC_MMAP_HAS_6_ARGS__
+
+
+#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
+
+
+#undef __UCLIBC_BROKEN_CREATE_MODULE__
+
+
+#undef __UCLIBC_HANDLE_OLDER_RLIMIT__
+
+
+#define __UCLIBC_NO_UNDERSCORES__
+
+
+#define __UCLIBC_HAVE_ASM_SET_DIRECTIVE__
+
+
+#undef __UCLIBC_ASM_GLOBAL_DIRECTIVE__
+
+
+#define __UCLIBC_HAVE_ASM_WEAK_DIRECTIVE__
+
+
+#undef __UCLIBC_HAVE_ASM_WEAKEXT_DIRECTIVE__
+
+
+#undef __UCLIBC_HAVE_ASM_GLOBAL_DOT_NAME__
+
+
+#define __UCLIBC_HAVE_SIGNED_ZERO__
+# 42 "./../../include/libc-symbols.h" 2
+# 51 "./../../include/libc-symbols.h"
+#define _LIBC 1
+
+
+#define _GNU_SOURCE 1
+
+
+
+
+
+
+#define likely(x) __builtin_expect((!!(x)),1)
+
+
+#define unlikely(x) __builtin_expect((!!(x)),0)
+
+
+#define __LINUX_COMPILER_H
+
+
+#define __cast__(_to)
+
+
+#define attribute_unused __attribute__ ((unused))
+
+
+#define attribute_noreturn __attribute__ ((__noreturn__))
+
+
+
+
+
+#define IS_IN_libc 1
+
+
+
+#define NO_UNDERSCORES
+
+
+
+
+
+#define HAVE_ASM_SET_DIRECTIVE
+
+
+
+
+
+
+
+#define ASM_GLOBAL_DIRECTIVE .global
+
+
+
+#define HAVE_ASM_WEAK_DIRECTIVE
+
+
+
+
+
+
+
+#undef HAVE_ASM_WEAKEXT_DIRECTIVE
+
+
+
+
+
+#undef HAVE_ASM_GLOBAL_DOT_NAME
+
+
+
+#define HAVE_WEAK_SYMBOLS
+
+
+#undef C_SYMBOL_NAME
+
+
+#define C_SYMBOL_NAME(name) name
+
+
+
+
+
+
+#define ASM_LINE_SEP ;
+# 154 "./../../include/libc-symbols.h"
+#define strong_alias(name,aliasname) _strong_alias(name, aliasname)
+#define _strong_alias(name,aliasname) extern __typeof (name) aliasname __attribute__ ((alias (#name)));
+
+
+
+
+#define weak_function __attribute__ ((weak))
+#define weak_const_function __attribute__ ((weak, __const__))
+
+
+
+
+
+#define weak_alias(name,aliasname) _weak_alias (name, aliasname)
+#define _weak_alias(name,aliasname) extern __typeof (name) aliasname __attribute__ ((weak, alias (#name)));
+
+
+
+#define weak_extern(symbol) _weak_extern (weak symbol)
+#define _weak_extern(expr) _Pragma (#expr)
+# 278 "./../../include/libc-symbols.h"
+#define internal_function
+
+
+
+#define __make_section_unallocated(section_string) __asm__ (".section " section_string "\n\t.previous");
+
+
+
+
+
+
+
+#define __sec_comment "\n\t#"
+
+
+
+
+
+
+
+#define link_warning(symbol,msg) __make_section_unallocated (".gnu.warning." #symbol) static const char __evoke_link_warning_ ##symbol[] __attribute__ ((used, section (".gnu.warning." #symbol __sec_comment))) = msg;
+# 323 "./../../include/libc-symbols.h"
+#define INTUSE(name) name
+#define INTDEF(name)
+#define INTVARDEF(name)
+#define INTDEF2(name,newname)
+#define INTVARDEF2(name,newname)
+# 419 "./../../include/libc-symbols.h"
+#define attribute_hidden __attribute__ ((visibility ("hidden")))
+#define __hidden_proto_hiddenattr(attrs...) __attribute__ ((visibility ("hidden"), ##attrs))
+
+
+
+
+
+
+
+#define hidden_proto(name,attrs...) __hidden_proto (name, __GI_ ##name, ##attrs)
+#define __hidden_proto(name,internal,attrs...) extern __typeof (name) name __asm__ (__hidden_asmname (#internal)) __hidden_proto_hiddenattr (attrs);
+
+
+#define __hidden_asmname(name) __hidden_asmname1 (__USER_LABEL_PREFIX__, name)
+#define __hidden_asmname1(prefix,name) __hidden_asmname2(prefix, name)
+#define __hidden_asmname2(prefix,name) #prefix name
+#define __hidden_ver1(local,internal,name) extern __typeof (name) __EI_ ##name __asm__(__hidden_asmname (#internal)); extern __typeof (name) __EI_ ##name __attribute__((alias (__hidden_asmname1 (,#local))))
+
+
+#define hidden_def(name) __hidden_ver1(__GI_ ##name, name, name);
+#define hidden_data_def(name) hidden_def(name)
+#define hidden_weak(name) __hidden_ver1(__GI_ ##name, name, name) __attribute__((weak));
+#define hidden_data_weak(name) hidden_weak(name)
+# 515 "./../../include/libc-symbols.h"
+#define versioned_symbol(lib,local,symbol,version)
+#define hidden_ver(local,name)
+#define hidden_data_ver(local,name)
+
+
+#define libc_hidden_proto(name,attrs...) hidden_proto (name, ##attrs)
+#define libc_hidden_def(name) hidden_def (name)
+#define libc_hidden_weak(name) hidden_weak (name)
+#define libc_hidden_ver(local,name) hidden_ver (local, name)
+#define libc_hidden_data_def(name) hidden_data_def (name)
+#define libc_hidden_data_weak(name) hidden_data_weak (name)
+#define libc_hidden_data_ver(local,name) hidden_data_ver (local, name)
+# 546 "./../../include/libc-symbols.h"
+#define rtld_hidden_proto(name,attrs...)
+#define rtld_hidden_def(name)
+#define rtld_hidden_weak(name)
+#define rtld_hidden_ver(local,name)
+#define rtld_hidden_data_def(name)
+#define rtld_hidden_data_weak(name)
+#define rtld_hidden_data_ver(local,name)
+# 564 "./../../include/libc-symbols.h"
+#define libm_hidden_proto(name,attrs...)
+#define libm_hidden_def(name)
+#define libm_hidden_weak(name)
+#define libm_hidden_ver(local,name)
+#define libm_hidden_data_def(name)
+#define libm_hidden_data_weak(name)
+#define libm_hidden_data_ver(local,name)
+# 582 "./../../include/libc-symbols.h"
+#define libresolv_hidden_proto(name,attrs...)
+#define libresolv_hidden_def(name)
+#define libresolv_hidden_weak(name)
+#define libresolv_hidden_ver(local,name)
+#define libresolv_hidden_data_def(name)
+#define libresolv_hidden_data_weak(name)
+#define libresolv_hidden_data_ver(local,name)
+# 600 "./../../include/libc-symbols.h"
+#define librt_hidden_proto(name,attrs...)
+#define librt_hidden_def(name)
+#define librt_hidden_weak(name)
+#define librt_hidden_ver(local,name)
+#define librt_hidden_data_def(name)
+#define librt_hidden_data_weak(name)
+#define librt_hidden_data_ver(local,name)
+# 618 "./../../include/libc-symbols.h"
+#define libdl_hidden_proto(name,attrs...)
+#define libdl_hidden_def(name)
+#define libdl_hidden_weak(name)
+#define libdl_hidden_ver(local,name)
+#define libdl_hidden_data_def(name)
+#define libdl_hidden_data_weak(name)
+#define libdl_hidden_data_ver(local,name)
+# 636 "./../../include/libc-symbols.h"
+#define libintl_hidden_proto(name,attrs...)
+#define libintl_hidden_def(name)
+#define libintl_hidden_weak(name)
+#define libintl_hidden_ver(local,name)
+#define libintl_hidden_data_def(name)
+#define libintl_hidden_data_weak(name)
+#define libintl_hidden_data_ver(local,name)
+# 654 "./../../include/libc-symbols.h"
+#define libnsl_hidden_proto(name,attrs...)
+#define libnsl_hidden_def(name)
+#define libnsl_hidden_weak(name)
+#define libnsl_hidden_ver(local,name)
+#define libnsl_hidden_data_def(name)
+#define libnsl_hidden_data_weak(name)
+#define libnsl_hidden_data_ver(local,name)
+# 672 "./../../include/libc-symbols.h"
+#define libutil_hidden_proto(name,attrs...)
+#define libutil_hidden_def(name)
+#define libutil_hidden_weak(name)
+#define libutil_hidden_ver(local,name)
+#define libutil_hidden_data_def(name)
+#define libutil_hidden_data_weak(name)
+#define libutil_hidden_data_ver(local,name)
+# 690 "./../../include/libc-symbols.h"
+#define libcrypt_hidden_proto(name,attrs...)
+#define libcrypt_hidden_def(name)
+#define libcrypt_hidden_weak(name)
+#define libcrypt_hidden_ver(local,name)
+#define libcrypt_hidden_data_def(name)
+#define libcrypt_hidden_data_weak(name)
+#define libcrypt_hidden_data_ver(local,name)
+# 708 "./../../include/libc-symbols.h"
+#define libpthread_hidden_proto(name,attrs...)
+#define libpthread_hidden_def(name)
+#define libpthread_hidden_weak(name)
+#define libpthread_hidden_ver(local,name)
+#define libpthread_hidden_data_def(name)
+#define libpthread_hidden_data_weak(name)
+#define libpthread_hidden_data_ver(local,name)
+# 1 "<command line>" 2
+# 1 "tst_mbrlen.c"
+
+
+
+
+#define TST_FUNCTION mbrlen
+
+# 1 "tsp_common.c" 1
+
+
+
+
+
+
+#define TST_FUNCTION_CALL(func) _TST_FUNCTION_CALL(func)
+#define _TST_FUNCTION_CALL(func) tst ##_ ## func
+
+# 1 "../../include/stdio.h" 1
+# 27 "../../include/stdio.h"
+#define _STDIO_H 1
+# 1 "../../include/features.h" 1
+# 20 "../../include/features.h"
+#define _FEATURES_H 1
+
+
+
+
+#define __UCLIBC__ 1
+# 34 "../../include/features.h"
+#define __need_uClibc_config_h
+# 1 "../../include/bits/uClibc_config.h" 1
+# 12 "../../include/bits/uClibc_config.h"
+#define __UCLIBC_MAJOR__ 0
+#define __UCLIBC_MINOR__ 9
+#define __UCLIBC_SUBLEVEL__ 29
+#undef __TARGET_alpha__
+#undef __TARGET_arm__
+#undef __TARGET_bfin__
+#undef __TARGET_cris__
+#undef __TARGET_e1__
+#undef __TARGET_frv__
+#undef __TARGET_h8300__
+#undef __TARGET_hppa__
+#undef __TARGET_i386__
+#undef __TARGET_i960__
+#undef __TARGET_ia64__
+#undef __TARGET_m68k__
+#undef __TARGET_microblaze__
+#undef __TARGET_mips__
+#undef __TARGET_nios__
+#undef __TARGET_nios2__
+#undef __TARGET_powerpc__
+#define __TARGET_sh__ 1
+#undef __TARGET_sh64__
+#undef __TARGET_sparc__
+#undef __TARGET_v850__
+#undef __TARGET_vax__
+#undef __TARGET_x86_64__
+
+
+
+
+#define __TARGET_ARCH__ "sh"
+#define __FORCE_OPTIONS_FOR_ARCH__ 1
+#undef __CONFIG_SH2A__
+#undef __CONFIG_SH2__
+#undef __CONFIG_SH3__
+#define __CONFIG_SH4__ 1
+#define __ARCH_HAS_BWD_MEMCPY__ 1
+#define __TARGET_SUBARCH__ "sh4"
+
+
+
+
+#define __ARCH_ANY_ENDIAN__ 1
+#define __ARCH_LITTLE_ENDIAN__ 1
+#undef __ARCH_WANTS_BIG_ENDIAN__
+#define __ARCH_WANTS_LITTLE_ENDIAN__ 1
+#define __ARCH_HAS_MMU__ 1
+#define __ARCH_USE_MMU__ 1
+#define __UCLIBC_HAS_FLOATS__ 1
+#define __UCLIBC_HAS_FPU__ 1
+#define __DO_C99_MATH__ 1
+#define __KERNEL_HEADERS__ "/opt/STM/STLinux-2.3ear/devkit/sh4/uclibc_target/usr/include"
+#define __HAVE_DOT_CONFIG__ 1
+
+
+
+
+#undef __HAVE_NO_PIC__
+#undef __DOPIC__
+#undef __HAVE_NO_SHARED__
+#undef __ARCH_HAS_NO_LDSO__
+#define __HAVE_SHARED__ 1
+#define __FORCE_SHAREABLE_TEXT_SEGMENTS__ 1
+#define __LDSO_LDD_SUPPORT__ 1
+#define __LDSO_CACHE_SUPPORT__ 1
+#undef __LDSO_PRELOAD_FILE_SUPPORT__
+#define __LDSO_BASE_FILENAME__ "ld.so"
+#undef __UCLIBC_STATIC_LDCONFIG__
+#define __LDSO_RUNPATH__ 1
+#define __UCLIBC_CTOR_DTOR__ 1
+#define __LDSO_GNU_HASH_SUPPORT__ 1
+#undef __HAS_NO_THREADS__
+#define __UCLIBC_HAS_THREADS__ 1
+#define __UCLIBC_HAS_THREADS_NATIVE__ 1
+#define __PTHREADS_DEBUG_SUPPORT__ 1
+#undef __LINUXTHREADS_OLD__
+#define __UCLIBC_HAS_LFS__ 1
+#undef __MALLOC__
+#undef __MALLOC_SIMPLE__
+#define __MALLOC_STANDARD__ 1
+#undef __MALLOC_GLIBC_COMPAT__
+#undef __UCLIBC_DYNAMIC_ATEXIT__
+#define __COMPAT_ATEXIT__ 1
+#define __UCLIBC_SUSV3_LEGACY__ 1
+#undef __UCLIBC_SUSV3_LEGACY_MACROS__
+#define __UCLIBC_HAS_SHADOW__ 1
+#undef __UCLIBC_HAS_PROGRAM_INVOCATION_NAME__
+#define __UCLIBC_HAS___PROGNAME__ 1
+#define __UNIX98PTY_ONLY__ 1
+#define __ASSUME_DEVPTS__ 1
+#define __UCLIBC_HAS_TM_EXTENSIONS__ 1
+#define __UCLIBC_HAS_TZ_CACHING__ 1
+#define __UCLIBC_HAS_TZ_FILE__ 1
+#define __UCLIBC_HAS_TZ_FILE_READ_MANY__ 1
+#define __UCLIBC_TZ_FILE_PATH__ "/etc/TZ"
+
+
+
+
+#define __UCLIBC_HAS_IPV6__ 1
+#define __UCLIBC_HAS_RPC__ 1
+#define __UCLIBC_HAS_FULL_RPC__ 1
+#define __UCLIBC_HAS_REENTRANT_RPC__ 1
+#undef __UCLIBC_USE_NETLINK__
+
+
+
+
+#define __UCLIBC_HAS_STRING_GENERIC_OPT__ 1
+#define __UCLIBC_HAS_STRING_ARCH_OPT__ 1
+#define __UCLIBC_HAS_CTYPE_TABLES__ 1
+#define __UCLIBC_HAS_CTYPE_SIGNED__ 1
+#define __UCLIBC_HAS_CTYPE_UNSAFE__ 1
+#undef __UCLIBC_HAS_CTYPE_CHECKED__
+#undef __UCLIBC_HAS_CTYPE_ENFORCED__
+#define __UCLIBC_HAS_WCHAR__ 1
+#define __UCLIBC_HAS_LOCALE__ 1
+#undef __UCLIBC_PREGENERATED_LOCALE_DATA__
+#undef __UCLIBC_HAS_XLOCALE__
+#undef __UCLIBC_HAS_HEXADECIMAL_FLOATS__
+#undef __UCLIBC_HAS_GLIBC_DIGIT_GROUPING__
+#undef __UCLIBC_HAS_GLIBC_CUSTOM_PRINTF__
+#define __UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS__ 9
+#undef __UCLIBC_HAS_SCANF_GLIBC_A_FLAG__
+#undef __UCLIBC_HAS_STDIO_BUFSIZ_NONE__
+#undef __UCLIBC_HAS_STDIO_BUFSIZ_256__
+#undef __UCLIBC_HAS_STDIO_BUFSIZ_512__
+#undef __UCLIBC_HAS_STDIO_BUFSIZ_1024__
+#undef __UCLIBC_HAS_STDIO_BUFSIZ_2048__
+#define __UCLIBC_HAS_STDIO_BUFSIZ_4096__ 1
+#undef __UCLIBC_HAS_STDIO_BUFSIZ_8192__
+#define __UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE__ 1
+#undef __UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4__
+#undef __UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8__
+#undef __UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT__
+#define __UCLIBC_HAS_STDIO_GETC_MACRO__ 1
+#define __UCLIBC_HAS_STDIO_PUTC_MACRO__ 1
+#define __UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION__ 1
+#undef __UCLIBC_HAS_FOPEN_LARGEFILE_MODE__
+#undef __UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE__
+#undef __UCLIBC_HAS_GLIBC_CUSTOM_STREAMS__
+#define __UCLIBC_HAS_PRINTF_M_SPEC__ 1
+#define __UCLIBC_HAS_ERRNO_MESSAGES__ 1
+#define __UCLIBC_HAS_SYS_ERRLIST__ 1
+#define __UCLIBC_HAS_SIGNUM_MESSAGES__ 1
+#undef __UCLIBC_HAS_SYS_SIGLIST__
+#undef __UCLIBC_HAS_GETTEXT_AWARENESS__
+#define __UCLIBC_HAS_GNU_GETOPT__ 1
+#define __UCLIBC_HAS_STDIO_FUTEXES__ 1
+#define __UCLIBC_HAS_GNU_GETSUBOPT__ 1
+
+
+
+
+#define __UCLIBC_HAS_REGEX__ 1
+#undef __UCLIBC_HAS_REGEX_OLD__
+#define __UCLIBC_HAS_FNMATCH__ 1
+#define __UCLIBC_HAS_FNMATCH_OLD__ 1
+#undef __UCLIBC_HAS_WORDEXP__
+#undef __UCLIBC_HAS_FTW__
+#define __UCLIBC_HAS_GLOB__ 1
+#define __UCLIBC_HAS_GNU_GLOB__ 1
+
+
+
+
+#define __SHARED_LIB_LOADER_PREFIX__ "/lib"
+#define __RUNTIME_PREFIX__ "/"
+#define __DEVEL_PREFIX__ "/usr"
+
+
+
+
+#undef __UCLIBC_HAS_ARC4RANDOM__
+#undef __HAVE_NO_SSP__
+#undef __UCLIBC_HAS_SSP__
+#define __UCLIBC_BUILD_RELRO__ 1
+#undef __UCLIBC_BUILD_NOW__
+#define __UCLIBC_BUILD_NOEXECSTACK__ 1
+
+
+
+
+#define __CROSS_COMPILER_PREFIX__ "sh4-linux-uclibc-"
+#define __UCLIBC_EXTRA_CFLAGS__ ""
+#define __DODEBUG__ 1
+#define __DOASSERTS__ 1
+#define __SUPPORT_LD_DEBUG__ 1
+#define __SUPPORT_LD_DEBUG_EARLY__ 1
+#undef __UCLIBC_MALLOC_DEBUGGING__
+#define __WARNINGS__ "-Wall"
+#define __EXTRA_WARNINGS__ 1
+#undef __DOMULTI__
+#define __UCLIBC_MJN3_ONLY__ 1
+# 36 "../../include/features.h" 2
+#undef __need_uClibc_config_h
+
+
+
+
+#define __OPTIMIZE_SIZE__ 1
+# 113 "../../include/features.h"
+#undef __USE_ISOC99
+#undef __USE_POSIX
+#undef __USE_POSIX2
+#undef __USE_POSIX199309
+#undef __USE_POSIX199506
+#undef __USE_XOPEN
+#undef __USE_XOPEN_EXTENDED
+#undef __USE_UNIX98
+#undef __USE_XOPEN2K
+#undef __USE_LARGEFILE
+#undef __USE_LARGEFILE64
+#undef __USE_FILE_OFFSET64
+#undef __USE_BSD
+#undef __USE_SVID
+#undef __USE_MISC
+#undef __USE_ATFILE
+#undef __USE_GNU
+#undef __USE_REENTRANT
+#undef __USE_FORTIFY_LEVEL
+#undef __FAVOR_BSD
+#undef __KERNEL_STRICT_NAMES
+
+
+
+
+#define __KERNEL_STRICT_NAMES
+
+
+
+#define __USE_ANSI 1
+# 152 "../../include/features.h"
+#define __GNUC_PREREQ(maj,min) ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
+# 169 "../../include/features.h"
+#undef _ISOC99_SOURCE
+#define _ISOC99_SOURCE 1
+#undef _POSIX_SOURCE
+#define _POSIX_SOURCE 1
+#undef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE 199506L
+#undef _XOPEN_SOURCE
+#define _XOPEN_SOURCE 600
+#undef _XOPEN_SOURCE_EXTENDED
+#define _XOPEN_SOURCE_EXTENDED 1
+
+#undef _LARGEFILE64_SOURCE
+#define _LARGEFILE64_SOURCE 1
+
+#undef _BSD_SOURCE
+#define _BSD_SOURCE 1
+#undef _SVID_SOURCE
+#define _SVID_SOURCE 1
+#undef _ATFILE_SOURCE
+#define _ATFILE_SOURCE 1
+# 207 "../../include/features.h"
+#define __USE_ISOC99 1
+# 223 "../../include/features.h"
+#define __USE_POSIX 1
+
+
+
+#define __USE_POSIX2 1
+
+
+
+#define __USE_POSIX199309 1
+
+
+
+#define __USE_POSIX199506 1
+
+
+
+
+
+
+
+#define __USE_XOPEN 1
+
+#define __USE_XOPEN_EXTENDED 1
+#define __USE_UNIX98 1
+#undef _LARGEFILE_SOURCE
+#define _LARGEFILE_SOURCE 1
+
+#define __USE_XOPEN2K 1
+#undef __USE_ISOC99
+#define __USE_ISOC99 1
+# 262 "../../include/features.h"
+#define __USE_LARGEFILE 1
+
+
+
+#define __USE_LARGEFILE64 1
+
+
+
+
+
+
+
+#define __USE_MISC 1
+
+
+
+#define __USE_BSD 1
+
+
+
+#define __USE_SVID 1
+
+
+
+#define __USE_ATFILE 1
+
+
+
+#define __USE_GNU 1
+
+
+
+
+
+
+
+#undef _FORTIFY_SOURCE
+# 307 "../../include/features.h"
+#define __USE_FORTIFY_LEVEL 0
+
+
+
+#define __STDC_IEC_559__ 1
+#define __STDC_IEC_559_COMPLEX__ 1
+
+
+
+#define __STDC_ISO_10646__ 200009L
+# 340 "../../include/features.h"
+#define __GLIBC_PREREQ(maj,min) ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))
+# 356 "../../include/features.h"
+# 1 "../../include/sys/cdefs.h" 1
+# 20 "../../include/sys/cdefs.h"
+#define _SYS_CDEFS_H 1
+# 35 "../../include/sys/cdefs.h"
+#undef __P
+#undef __PMT
+# 46 "../../include/sys/cdefs.h"
+#define __THROW __attribute__ ((__nothrow__))
+#define __NTH(fct) __attribute__ ((__nothrow__)) fct
+# 73 "../../include/sys/cdefs.h"
+#define __P(args) args
+#define __PMT(args) args
+
+
+
+
+#define __CONCAT(x,y) x ## y
+#define __STRING(x) #x
+
+
+#define __ptr_t void *
+#define __long_double_t long double
+
+
+
+
+
+
+
+#define __BEGIN_DECLS
+#define __END_DECLS
+# 113 "../../include/sys/cdefs.h"
+#define __BEGIN_NAMESPACE_STD
+#define __END_NAMESPACE_STD
+#define __USING_NAMESPACE_STD(name)
+#define __BEGIN_NAMESPACE_C99
+#define __END_NAMESPACE_C99
+#define __USING_NAMESPACE_C99(name)
+
+
+
+
+
+#define __bounded
+#define __unbounded
+#define __ptrvalue
+
+
+
+
+#define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1)
+#define __bos0(ptr) __builtin_object_size (ptr, 0)
+#define __warndecl(name,msg) extern void name (void)
+
+
+
+
+
+#define __flexarr []
+# 166 "../../include/sys/cdefs.h"
+#define __REDIRECT(name,proto,alias) name proto __asm__ (__ASMNAME (#alias))
+
+
+
+
+#define __REDIRECT_NTH(name,proto,alias) name proto __asm__ (__ASMNAME (#alias)) __THROW
+
+
+#define __ASMNAME(cname) __ASMNAME2 (__USER_LABEL_PREFIX__, cname)
+#define __ASMNAME2(prefix,cname) __STRING (prefix) cname
+# 196 "../../include/sys/cdefs.h"
+#define __attribute_malloc__ __attribute__ ((__malloc__))
+# 205 "../../include/sys/cdefs.h"
+#define __attribute_pure__ __attribute__ ((__pure__))
+# 214 "../../include/sys/cdefs.h"
+#define __attribute_used__ __attribute__ ((__used__))
+#define __attribute_noinline__ __attribute__ ((__noinline__))
+
+
+
+
+
+
+
+#define __attribute_deprecated__ __attribute__ ((__deprecated__))
+# 235 "../../include/sys/cdefs.h"
+#define __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x)))
+# 245 "../../include/sys/cdefs.h"
+#define __attribute_format_strfmon__(a,b) __attribute__ ((__format__ (__strfmon__, a, b)))
+# 254 "../../include/sys/cdefs.h"
+#define __nonnull(params) __attribute__ ((__nonnull__ params))
+
+
+
+
+
+
+
+#define __attribute_warn_unused_result__ __attribute__ ((__warn_unused_result__))
+# 271 "../../include/sys/cdefs.h"
+#define __wur
+
+
+
+
+#define __always_inline __inline __attribute__ ((__always_inline__))
+# 298 "../../include/sys/cdefs.h"
+#define __restrict_arr __restrict
+# 357 "../../include/features.h" 2
+# 396 "../../include/features.h"
+#undef _LARGEFILE_SOURCE
+#undef _LARGEFILE64_SOURCE
+#undef _FILE_OFFSET_BITS
+#undef __USE_LARGEFILE
+#undef __USE_LARGEFILE64
+#undef __USE_FILE_OFFSET64
+#define _LARGEFILE_SOURCE 1
+#define _LARGEFILE64_SOURCE 1
+#define __USE_LARGEFILE 1
+#define __USE_LARGEFILE64 1
+
+
+
+#undef _ATFILE_SOURCE
+#undef __USE_ATFILE
+
+
+# 1 "../../include/libc-internal.h" 1
+# 20 "../../include/libc-internal.h"
+#define _LIBC_INTERNAL_H 1
+
+# 1 "../../include/features.h" 1
+# 23 "../../include/libc-internal.h" 2
+
+
+#define attribute_relro __attribute__ ((section (".data.rel.ro")))
+
+
+
+
+
+#define attribute_tls_model_ie __attribute__ ((tls_model ("initial-exec")))
+# 43 "../../include/libc-internal.h"
+#define __need_size_t
+# 1 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 1 3 4
+# 189 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 3 4
+#define __size_t__
+#define __SIZE_T__
+#define _SIZE_T
+#define _SYS_SIZE_T_H
+#define _T_SIZE_
+#define _T_SIZE
+#define __SIZE_T
+#define _SIZE_T_
+#define _BSD_SIZE_T_
+#define _SIZE_T_DEFINED_
+#define _SIZE_T_DEFINED
+#define _BSD_SIZE_T_DEFINED_
+#define _SIZE_T_DECLARED
+#define ___int_size_t_h
+#define _GCC_SIZE_T
+#define _SIZET_
+
+
+
+#define __size_t
+
+
+
+
+
+typedef unsigned int size_t;
+# 236 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 3 4
+#undef __need_size_t
+# 409 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 3 4
+#undef __need_NULL
+# 45 "../../include/libc-internal.h" 2
+
+
+
+extern int __xpg_strerror_r (int __errnum, char *__buf, size_t __buflen);
+# 64 "../../include/libc-internal.h"
+extern const char *__uclibc_progname __attribute__ ((visibility ("hidden")));
+
+
+
+
+# 1 "../../include/bits/stackinfo.h" 1
+# 23 "../../include/bits/stackinfo.h"
+#define _STACKINFO_H 1
+
+
+#define _STACK_GROWS_DOWN 1
+# 70 "../../include/libc-internal.h" 2
+
+#define extend_alloca(buf,len,newlen) (__typeof (buf)) ({ size_t __newlen = (newlen); char *__newbuf = alloca (__newlen); if (__newbuf + __newlen == (char *) buf) len += __newlen; else len = __newlen; __newbuf; })
+# 414 "../../include/features.h" 2
+# 422 "../../include/features.h"
+#define __user
+# 29 "../../include/stdio.h" 2
+
+
+
+#define __need_size_t
+#define __need_NULL
+# 1 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 1 3 4
+# 236 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 3 4
+#undef __need_size_t
+# 398 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 3 4
+#undef NULL
+
+
+
+
+#define NULL ((void *)0)
+
+
+
+
+
+#undef __need_NULL
+# 35 "../../include/stdio.h" 2
+
+# 1 "../../include/bits/types.h" 1
+# 25 "../../include/bits/types.h"
+#define _BITS_TYPES_H 1
+
+
+# 1 "../../include/bits/wordsize.h" 1
+# 19 "../../include/bits/wordsize.h"
+#define __WORDSIZE 32
+# 29 "../../include/bits/types.h" 2
+
+#define __need_size_t
+# 1 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 1 3 4
+# 236 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 3 4
+#undef __need_size_t
+# 409 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 3 4
+#undef __need_NULL
+# 32 "../../include/bits/types.h" 2
+# 1 "../../include/bits/kernel_types.h" 1
+
+
+
+
+
+
+
+#define __ASM_SH_POSIX_TYPES_H
+
+typedef unsigned short __kernel_dev_t;
+typedef unsigned long __kernel_ino_t;
+typedef unsigned short __kernel_mode_t;
+typedef unsigned short __kernel_nlink_t;
+typedef long __kernel_off_t;
+typedef int __kernel_pid_t;
+typedef unsigned short __kernel_ipc_pid_t;
+typedef unsigned short __kernel_uid_t;
+typedef unsigned short __kernel_gid_t;
+typedef unsigned int __kernel_size_t;
+typedef int __kernel_ssize_t;
+typedef int __kernel_ptrdiff_t;
+typedef long __kernel_time_t;
+typedef long __kernel_suseconds_t;
+typedef long __kernel_clock_t;
+typedef int __kernel_daddr_t;
+typedef char * __kernel_caddr_t;
+typedef unsigned short __kernel_uid16_t;
+typedef unsigned short __kernel_gid16_t;
+typedef unsigned int __kernel_uid32_t;
+typedef unsigned int __kernel_gid32_t;
+typedef unsigned short __kernel_old_uid_t;
+typedef unsigned short __kernel_old_gid_t;
+typedef __kernel_dev_t __kernel_old_dev_t;
+typedef long long __kernel_loff_t;
+
+typedef struct {
+
+
+
+ int __val[2];
+
+} __kernel_fsid_t;
+# 33 "../../include/bits/types.h" 2
+
+
+typedef unsigned char __u_char;
+typedef unsigned short int __u_short;
+typedef unsigned int __u_int;
+typedef unsigned long int __u_long;
+
+
+typedef signed char __int8_t;
+typedef unsigned char __uint8_t;
+typedef signed short int __int16_t;
+typedef unsigned short int __uint16_t;
+typedef signed int __int32_t;
+typedef unsigned int __uint32_t;
+
+
+
+
+__extension__ typedef signed long long int __int64_t;
+__extension__ typedef unsigned long long int __uint64_t;
+
+
+
+
+
+
+
+__extension__ typedef long long int __quad_t;
+__extension__ typedef unsigned long long int __u_quad_t;
+# 103 "../../include/bits/types.h"
+#define __S16_TYPE short int
+#define __U16_TYPE unsigned short int
+#define __S32_TYPE int
+#define __U32_TYPE unsigned int
+#define __SLONGWORD_TYPE long int
+#define __ULONGWORD_TYPE unsigned long int
+
+#define __SQUAD_TYPE __quad_t
+#define __UQUAD_TYPE __u_quad_t
+#define __SWORD_TYPE int
+#define __UWORD_TYPE unsigned int
+#define __SLONG32_TYPE long int
+#define __ULONG32_TYPE unsigned long int
+#define __S64_TYPE __quad_t
+#define __U64_TYPE __u_quad_t
+
+
+#define __STD_TYPE __extension__ typedef
+# 135 "../../include/bits/types.h"
+# 1 "../../include/bits/typesizes.h" 1
+# 25 "../../include/bits/typesizes.h"
+#define _BITS_TYPESIZES_H 1
+
+
+
+
+#define __DEV_T_TYPE __UQUAD_TYPE
+#define __UID_T_TYPE __U32_TYPE
+#define __GID_T_TYPE __U32_TYPE
+#define __INO_T_TYPE __ULONGWORD_TYPE
+#define __INO64_T_TYPE __UQUAD_TYPE
+#define __MODE_T_TYPE __U32_TYPE
+#define __NLINK_T_TYPE __UWORD_TYPE
+#define __OFF_T_TYPE __SLONGWORD_TYPE
+#define __OFF64_T_TYPE __SQUAD_TYPE
+#define __PID_T_TYPE __S32_TYPE
+#define __RLIM_T_TYPE __ULONGWORD_TYPE
+#define __RLIM64_T_TYPE __UQUAD_TYPE
+#define __BLKCNT_T_TYPE __SLONGWORD_TYPE
+#define __BLKCNT64_T_TYPE __SQUAD_TYPE
+#define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE
+#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE
+#define __FSFILCNT_T_TYPE __ULONGWORD_TYPE
+#define __FSFILCNT64_T_TYPE __UQUAD_TYPE
+#define __ID_T_TYPE __U32_TYPE
+#define __CLOCK_T_TYPE __SLONGWORD_TYPE
+#define __TIME_T_TYPE __SLONGWORD_TYPE
+#define __USECONDS_T_TYPE __U32_TYPE
+#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE
+#define __DADDR_T_TYPE __S32_TYPE
+#define __SWBLK_T_TYPE __SLONGWORD_TYPE
+#define __KEY_T_TYPE __S32_TYPE
+#define __CLOCKID_T_TYPE __S32_TYPE
+#define __TIMER_T_TYPE void *
+#define __BLKSIZE_T_TYPE __SLONGWORD_TYPE
+#define __FSID_T_TYPE struct { int __val[2]; }
+#define __SSIZE_T_TYPE __SWORD_TYPE
+
+
+#define __FD_SETSIZE 1024
+# 136 "../../include/bits/types.h" 2
+
+
+__extension__ typedef __u_quad_t __dev_t;
+__extension__ typedef unsigned int __uid_t;
+__extension__ typedef unsigned int __gid_t;
+__extension__ typedef unsigned long int __ino_t;
+__extension__ typedef __u_quad_t __ino64_t;
+__extension__ typedef unsigned int __mode_t;
+__extension__ typedef unsigned int __nlink_t;
+__extension__ typedef long int __off_t;
+__extension__ typedef __quad_t __off64_t;
+__extension__ typedef int __pid_t;
+__extension__ typedef struct { int __val[2]; } __fsid_t;
+__extension__ typedef long int __clock_t;
+__extension__ typedef unsigned long int __rlim_t;
+__extension__ typedef __u_quad_t __rlim64_t;
+__extension__ typedef unsigned int __id_t;
+__extension__ typedef long int __time_t;
+__extension__ typedef unsigned int __useconds_t;
+__extension__ typedef long int __suseconds_t;
+
+__extension__ typedef int __daddr_t;
+__extension__ typedef long int __swblk_t;
+__extension__ typedef int __key_t;
+
+
+__extension__ typedef int __clockid_t;
+
+
+__extension__ typedef void * __timer_t;
+
+
+__extension__ typedef long int __blksize_t;
+
+
+
+
+__extension__ typedef long int __blkcnt_t;
+__extension__ typedef __quad_t __blkcnt64_t;
+
+
+__extension__ typedef unsigned long int __fsblkcnt_t;
+__extension__ typedef __u_quad_t __fsblkcnt64_t;
+
+
+__extension__ typedef unsigned long int __fsfilcnt_t;
+__extension__ typedef __u_quad_t __fsfilcnt64_t;
+
+__extension__ typedef int __ssize_t;
+
+
+
+typedef __off64_t __loff_t;
+typedef __quad_t *__qaddr_t;
+typedef char *__caddr_t;
+
+
+__extension__ typedef int __intptr_t;
+
+
+__extension__ typedef unsigned int __socklen_t;
+
+
+#undef __STD_TYPE
+
+
+typedef __kernel_ipc_pid_t __ipc_pid_t;
+
+
+
+# 1 "../../include/bits/pthreadtypes.h" 1
+# 21 "../../include/bits/pthreadtypes.h"
+#define _BITS_PTHREADTYPES_H 1
+
+#define __SIZEOF_PTHREAD_ATTR_T 36
+#define __SIZEOF_PTHREAD_MUTEX_T 24
+#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
+#define __SIZEOF_PTHREAD_COND_T 48
+#define __SIZEOF_PTHREAD_COND_COMPAT_T 12
+#define __SIZEOF_PTHREAD_CONDATTR_T 4
+#define __SIZEOF_PTHREAD_RWLOCK_T 32
+#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
+#define __SIZEOF_PTHREAD_BARRIER_T 20
+#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
+
+
+
+
+typedef unsigned long int pthread_t;
+
+
+typedef union
+{
+ char __size[36];
+ long int __align;
+} pthread_attr_t;
+
+
+
+
+typedef union
+{
+ struct
+ {
+ int __lock;
+ unsigned int __count;
+ int __owner;
+
+
+ int __kind;
+ unsigned int __nusers;
+ int __spins;
+ } __data;
+ char __size[24];
+ long int __align;
+} pthread_mutex_t;
+
+typedef union
+{
+ char __size[4];
+ long int __align;
+} pthread_mutexattr_t;
+
+
+
+
+typedef union
+{
+ struct
+ {
+ int __lock;
+ unsigned int __futex;
+ __extension__ unsigned long long int __total_seq;
+ __extension__ unsigned long long int __wakeup_seq;
+ __extension__ unsigned long long int __woken_seq;
+ void *__mutex;
+ unsigned int __nwaiters;
+ unsigned int __broadcast_seq;
+ } __data;
+ char __size[48];
+ __extension__ long long int __align;
+} pthread_cond_t;
+
+typedef union
+{
+ char __size[4];
+ long int __align;
+} pthread_condattr_t;
+
+
+
+typedef unsigned int pthread_key_t;
+
+
+
+typedef int pthread_once_t;
+
+
+
+
+
+typedef union
+{
+ struct
+ {
+ int __lock;
+ unsigned int __nr_readers;
+ unsigned int __readers_wakeup;
+ unsigned int __writer_wakeup;
+ unsigned int __nr_readers_queued;
+ unsigned int __nr_writers_queued;
+
+
+ unsigned int __flags;
+ pthread_t __writer;
+ } __data;
+ char __size[32];
+ long int __align;
+} pthread_rwlock_t;
+
+typedef union
+{
+ char __size[8];
+ long int __align;
+} pthread_rwlockattr_t;
+
+
+
+
+
+typedef volatile int pthread_spinlock_t;
+
+
+
+
+typedef union
+{
+ char __size[20];
+ long int __align;
+} pthread_barrier_t;
+
+typedef union
+{
+ char __size[4];
+ int __align;
+} pthread_barrierattr_t;
+# 207 "../../include/bits/types.h" 2
+# 37 "../../include/stdio.h" 2
+#define __need_FILE
+#define __need___FILE
+
+
+
+
+
+
+
+typedef struct __STDIO_FILE_STRUCT FILE;
+
+
+
+
+
+
+
+#define __FILE_defined 1
+
+#undef __need_FILE
+
+
+
+
+
+typedef struct __STDIO_FILE_STRUCT __FILE;
+
+#define ____FILE_defined 1
+
+#undef __need___FILE
+
+
+
+#undef _STDIO_USES_IOSTREAM
+
+# 1 "../../include/bits/uClibc_stdio.h" 1
+# 14 "../../include/bits/uClibc_stdio.h"
+#define __STDIO_BUFFERS
+# 29 "../../include/bits/uClibc_stdio.h"
+#define __STDIO_BUFSIZ 4096
+# 40 "../../include/bits/uClibc_stdio.h"
+#define __STDIO_BUILTIN_BUF_SIZE 0
+# 51 "../../include/bits/uClibc_stdio.h"
+#define __STDIO_HAS_OPENLIST 1
+# 61 "../../include/bits/uClibc_stdio.h"
+#undef __USE_LARGEFILE
+#undef __USE_LARGEFILE64
+#undef __USE_FILE_OFFSET64
+
+#define __USE_LARGEFILE64 1
+# 80 "../../include/bits/uClibc_stdio.h"
+#define __need_wchar_t
+# 1 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 1 3 4
+# 265 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 3 4
+#define __wchar_t__
+#define __WCHAR_T__
+#define _WCHAR_T
+#define _T_WCHAR_
+#define _T_WCHAR
+#define __WCHAR_T
+#define _WCHAR_T_
+#define _BSD_WCHAR_T_
+#define _WCHAR_T_DEFINED_
+#define _WCHAR_T_DEFINED
+#define _WCHAR_T_H
+#define ___int_wchar_t_h
+#define __INT_WCHAR_T_H
+#define _GCC_WCHAR_T
+#define _WCHAR_T_DECLARED
+# 292 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 3 4
+#undef _BSD_WCHAR_T_
+# 326 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 3 4
+typedef long int wchar_t;
+# 345 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 3 4
+#undef __need_wchar_t
+# 409 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 3 4
+#undef __need_NULL
+# 82 "../../include/bits/uClibc_stdio.h" 2
+
+
+
+#define __STDIO_MBSTATE
+#define __need_mbstate_t
+# 1 "../../include/wchar.h" 1
+# 51 "../../include/wchar.h"
+#define __need_wint_t
+# 1 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 1 3 4
+# 350 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 3 4
+#define _WINT_T
+
+
+
+
+typedef unsigned int wint_t;
+
+#undef __need_wint_t
+# 409 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 3 4
+#undef __need_NULL
+# 53 "../../include/wchar.h" 2
+
+# 1 "../../include/bits/wchar.h" 1
+# 21 "../../include/bits/wchar.h"
+#define _BITS_WCHAR_H 1
+
+#define __WCHAR_MIN (-2147483647 - 1)
+#define __WCHAR_MAX (2147483647)
+# 55 "../../include/wchar.h" 2
+# 78 "../../include/wchar.h"
+#define __mbstate_t_defined 1
+
+
+typedef struct
+{
+ wchar_t __mask;
+ wchar_t __wc;
+} __mbstate_t;
+# 98 "../../include/wchar.h"
+#undef __need_mbstate_t
+# 88 "../../include/bits/uClibc_stdio.h" 2
+
+
+
+
+
+
+
+#define __STDIO_GETC_MACRO
+
+
+
+#define __STDIO_PUTC_MACRO
+# 138 "../../include/bits/uClibc_stdio.h"
+#define __STDIO_AUTO_THREADLOCK_VAR int __infunc_user_locking
+# 165 "../../include/bits/uClibc_stdio.h"
+#define __STDIO_AUTO_THREADLOCK(__stream) if ((__infunc_user_locking = (__stream)->__user_locking) == 0) { __pthread_mutex_lock(&(__stream)->__lock); }
+
+
+
+
+#define __STDIO_AUTO_THREADUNLOCK(__stream) if (__infunc_user_locking == 0) { __pthread_mutex_unlock(&(__stream)->__lock); }
+
+
+
+
+#define __STDIO_SET_USER_LOCKING(__stream) ((__stream)->__user_locking = 1)
+
+#define __STDIO_ALWAYS_THREADLOCK(__stream) __pthread_mutex_lock(&(__stream)->__lock)
+
+
+#define __STDIO_ALWAYS_THREADTRYLOCK(__stream) __pthread_mutex_trylock(&(__stream)->__lock)
+
+
+#define __STDIO_ALWAYS_THREADUNLOCK(__stream) __pthread_mutex_unlock(&(__stream)->__lock)
+# 204 "../../include/bits/uClibc_stdio.h"
+#define __STDIO_IOFBF 0
+#define __STDIO_IOLBF 1
+#define __STDIO_IONBF 2
+
+typedef struct {
+ __off_t __pos;
+
+ __mbstate_t __mbstate;
+
+
+ int __mblen_pending;
+
+} __STDIO_fpos_t;
+
+
+typedef struct {
+ __off64_t __pos;
+
+ __mbstate_t __mbstate;
+
+
+ int __mblen_pending;
+
+} __STDIO_fpos64_t;
+
+
+
+
+typedef __off64_t __offmax_t;
+# 271 "../../include/bits/uClibc_stdio.h"
+struct __STDIO_FILE_STRUCT {
+ unsigned short __modeflags;
+
+
+ unsigned char __ungot_width[2];
+
+
+
+
+
+
+ int __filedes;
+
+ unsigned char *__bufstart;
+ unsigned char *__bufend;
+ unsigned char *__bufpos;
+ unsigned char *__bufread;
+
+
+ unsigned char *__bufgetc_u;
+
+
+ unsigned char *__bufputc_u;
+
+
+
+
+
+ struct __STDIO_FILE_STRUCT *__nextopen;
+
+
+
+
+
+
+ wchar_t __ungot[2];
+
+
+ __mbstate_t __state;
+
+
+
+
+
+ int __user_locking;
+
+
+
+ pthread_mutex_t __lock;
+
+
+
+
+
+
+};
+# 347 "../../include/bits/uClibc_stdio.h"
+#define __MASK_READING 0x0003U
+#define __FLAG_READING 0x0001U
+#define __FLAG_UNGOT 0x0002U
+#define __FLAG_EOF 0x0004U
+#define __FLAG_ERROR 0x0008U
+#define __FLAG_WRITEONLY 0x0010U
+#define __FLAG_READONLY 0x0020U
+#define __FLAG_WRITING 0x0040U
+#define __FLAG_NARROW 0x0080U
+
+#define __FLAG_FBF 0x0000U
+#define __FLAG_LBF 0x0100U
+#define __FLAG_NBF 0x0200U
+#define __MASK_BUFMODE 0x0300U
+#define __FLAG_APPEND 0x0400U
+#define __FLAG_WIDE 0x0800U
+
+#define __FLAG_FREEFILE 0x2000U
+#define __FLAG_FREEBUF 0x4000U
+#define __FLAG_LARGEFILE 0x8000U
+#define __FLAG_FAILED_FREOPEN __FLAG_LARGEFILE
+# 388 "../../include/bits/uClibc_stdio.h"
+extern void _stdio_init(void) __attribute__ ((visibility ("hidden")));
+extern void _stdio_term(void) __attribute__ ((visibility ("hidden")));
+
+
+
+extern struct __STDIO_FILE_STRUCT *_stdio_openlist;
+
+
+
+
+
+extern pthread_mutex_t _stdio_openlist_lock;
+
+extern int _stdio_openlist_delflag;
+extern int _stdio_user_locking;
+
+extern void __stdio_init_mutex(pthread_mutex_t *m) __attribute__ ((visibility ("hidden")));
+# 413 "../../include/bits/uClibc_stdio.h"
+#define __CLEARERR_UNLOCKED(__stream) ((void)((__stream)->__modeflags &= ~(__FLAG_EOF|__FLAG_ERROR)))
+
+#define __FEOF_UNLOCKED(__stream) ((__stream)->__modeflags & __FLAG_EOF)
+#define __FERROR_UNLOCKED(__stream) ((__stream)->__modeflags & __FLAG_ERROR)
+
+
+#define __CLEARERR(__stream) (clearerr)(__stream)
+#define __FERROR(__stream) (ferror)(__stream)
+#define __FEOF(__stream) (feof)(__stream)
+
+
+
+
+
+
+extern int __fgetc_unlocked(FILE *__stream);
+extern int __fputc_unlocked(int __c, FILE *__stream);
+
+
+#define __FGETC_UNLOCKED(__stream) (__fgetc_unlocked)((__stream))
+#define __FGETC(__stream) (fgetc)((__stream))
+#define __GETC_UNLOCKED_MACRO(__stream) (__fgetc_unlocked)((__stream))
+#define __GETC_UNLOCKED(__stream) (__fgetc_unlocked)((__stream))
+#define __GETC(__stream) (fgetc)((__stream))
+
+#define __FPUTC_UNLOCKED(__c,__stream) (__fputc_unlocked)((__c),(__stream))
+#define __FPUTC(__c,__stream) (fputc)((__c),(__stream))
+#define __PUTC_UNLOCKED_MACRO(__c,__stream) (__fputc_unlocked)((__c),(__stream))
+#define __PUTC_UNLOCKED(__c,__stream) (__fputc_unlocked)((__c),(__stream))
+#define __PUTC(__c,__stream) (fputc)((__c),(__stream))
+
+
+
+
+extern FILE *__stdin;
+
+#undef __GETC_UNLOCKED_MACRO
+#define __GETC_UNLOCKED_MACRO(__stream) ( ((__stream)->__bufpos < (__stream)->__bufgetc_u) ? (*(__stream)->__bufpos++) : __fgetc_unlocked(__stream) )
+# 466 "../../include/bits/uClibc_stdio.h"
+#undef __FGETC_UNLOCKED
+#define __FGETC_UNLOCKED(__stream) (__extension__ ({ FILE *__S = (__stream); __GETC_UNLOCKED_MACRO(__S); }) )
+
+
+
+
+
+#undef __GETC_UNLOCKED
+#define __GETC_UNLOCKED(__stream) __FGETC_UNLOCKED((__stream))
+
+
+#undef __FGETC
+#define __FGETC(__stream) (__extension__ ({ FILE *__S = (__stream); ((__S->__user_locking ) ? __GETC_UNLOCKED_MACRO(__S) : (fgetc)(__S)); }) )
+
+
+
+
+
+
+
+#undef __GETC
+#define __GETC(__stream) __FGETC((__stream))
+# 506 "../../include/bits/uClibc_stdio.h"
+extern FILE *__stdout;
+
+#undef __PUTC_UNLOCKED_MACRO
+#define __PUTC_UNLOCKED_MACRO(__c,__stream) ( ((__stream)->__bufpos < (__stream)->__bufputc_u) ? (*(__stream)->__bufpos++) = (__c) : __fputc_unlocked((__c),(__stream)) )
+# 527 "../../include/bits/uClibc_stdio.h"
+#undef __FPUTC_UNLOCKED
+#define __FPUTC_UNLOCKED(__c,__stream) (__extension__ ({ FILE *__S = (__stream); __PUTC_UNLOCKED_MACRO((__c),__S); }) )
+
+
+
+
+
+#undef __PUTC_UNLOCKED
+#define __PUTC_UNLOCKED(__c,__stream) __FPUTC_UNLOCKED((__c), (__stream))
+
+
+#undef __FPUTC
+#define __FPUTC(__c,__stream) (__extension__ ({ FILE *__S = (__stream); ((__S->__user_locking) ? __PUTC_UNLOCKED_MACRO((__c),__S) : (fputc)((__c),__S)); }) )
+
+
+
+
+
+
+
+#undef __PUTC
+#define __PUTC(__c,__stream) __FPUTC((__c), (__stream))
+# 73 "../../include/stdio.h" 2
+
+
+#define __need___va_list
+# 1 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stdarg.h" 1 3 4
+# 37 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stdarg.h" 3 4
+#undef __need___va_list
+
+
+
+
+#define __GNUC_VA_LIST
+typedef __builtin_va_list __gnuc_va_list;
+# 77 "../../include/stdio.h" 2
+
+
+
+
+typedef __STDIO_fpos_t fpos_t;
+
+
+
+
+
+typedef __STDIO_fpos64_t fpos64_t;
+
+
+
+#define _IOFBF __STDIO_IOFBF
+#define _IOLBF __STDIO_IOLBF
+#define _IONBF __STDIO_IONBF
+
+
+
+
+#define BUFSIZ __STDIO_BUFSIZ
+
+
+
+
+
+
+#define EOF (-1)
+
+
+
+
+
+#define SEEK_SET 0
+#define SEEK_CUR 1
+#define SEEK_END 2
+
+
+
+
+#define P_tmpdir "/tmp"
+# 131 "../../include/stdio.h"
+# 1 "../../include/bits/stdio_lim.h" 1
+# 24 "../../include/bits/stdio_lim.h"
+#define L_tmpnam 20
+#define TMP_MAX 238328
+#define FILENAME_MAX 4095
+
+
+#define L_ctermid 9
+#define L_cuserid 9
+
+
+
+
+#undef FOPEN_MAX
+#define FOPEN_MAX 16
+# 132 "../../include/stdio.h" 2
+
+
+
+extern FILE *stdin;
+extern FILE *stdout;
+extern FILE *stderr;
+
+#define stdin stdin
+#define stdout stdout
+#define stderr stderr
+
+
+
+extern int remove (__const char *__filename) __attribute__ ((__nothrow__));
+
+extern int rename (__const char *__old, __const char *__new) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+
+
+
+extern FILE *tmpfile (void);
+# 167 "../../include/stdio.h"
+extern FILE *tmpfile64 (void);
+
+
+
+extern char *tmpnam (char *__s) __attribute__ ((__nothrow__));
+
+
+
+
+
+extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__));
+# 189 "../../include/stdio.h"
+extern char *tempnam (__const char *__dir, __const char *__pfx)
+ __attribute__ ((__nothrow__)) __attribute__ ((__malloc__));
+
+
+
+
+
+
+
+
+extern int fclose (FILE *__stream);
+
+
+
+
+extern int fflush (FILE *__stream);
+
+# 214 "../../include/stdio.h"
+extern int fflush_unlocked (FILE *__stream);
+# 224 "../../include/stdio.h"
+extern int fcloseall (void);
+
+
+
+
+
+
+
+
+
+extern FILE *fopen (__const char *__restrict __filename,
+ __const char *__restrict __modes);
+
+
+
+
+extern FILE *freopen (__const char *__restrict __filename,
+ __const char *__restrict __modes,
+ FILE *__restrict __stream);
+# 255 "../../include/stdio.h"
+
+
+extern FILE *fopen64 (__const char *__restrict __filename,
+ __const char *__restrict __modes);
+extern FILE *freopen64 (__const char *__restrict __filename,
+ __const char *__restrict __modes,
+ FILE *__restrict __stream);
+
+
+
+
+extern FILE *fdopen (int __fd, __const char *__modes) __attribute__ ((__nothrow__));
+# 289 "../../include/stdio.h"
+
+
+
+extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__));
+
+
+
+extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
+ int __modes, size_t __n) __attribute__ ((__nothrow__));
+
+
+
+
+
+extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
+ size_t __size) __attribute__ ((__nothrow__));
+
+
+extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+
+
+extern int fprintf (FILE *__restrict __stream,
+ __const char *__restrict __format, ...);
+
+
+
+
+extern int printf (__const char *__restrict __format, ...);
+
+extern int sprintf (char *__restrict __s,
+ __const char *__restrict __format, ...) __attribute__ ((__nothrow__));
+
+
+
+
+
+extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format,
+ __gnuc_va_list __arg);
+
+
+
+
+extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg);
+
+extern int vsprintf (char *__restrict __s, __const char *__restrict __format,
+ __gnuc_va_list __arg) __attribute__ ((__nothrow__));
+
+
+
+
+
+extern int snprintf (char *__restrict __s, size_t __maxlen,
+ __const char *__restrict __format, ...)
+ __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4)));
+
+extern int vsnprintf (char *__restrict __s, size_t __maxlen,
+ __const char *__restrict __format, __gnuc_va_list __arg)
+ __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0)));
+
+
+
+
+
+
+extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f,
+ __gnuc_va_list __arg)
+ __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0)));
+
+
+
+
+
+extern int asprintf (char **__restrict __ptr,
+ __const char *__restrict __fmt, ...)
+ __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3)));
+
+
+
+
+
+
+
+extern int vdprintf (int __fd, __const char *__restrict __fmt,
+ __gnuc_va_list __arg)
+ __attribute__ ((__format__ (__printf__, 2, 0)));
+extern int dprintf (int __fd, __const char *__restrict __fmt, ...)
+ __attribute__ ((__format__ (__printf__, 2, 3)));
+
+
+
+
+
+
+
+
+extern int fscanf (FILE *__restrict __stream,
+ __const char *__restrict __format, ...);
+
+
+
+
+extern int scanf (__const char *__restrict __format, ...);
+
+extern int sscanf (__const char *__restrict __s,
+ __const char *__restrict __format, ...) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+
+
+extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format,
+ __gnuc_va_list __arg)
+ __attribute__ ((__format__ (__scanf__, 2, 0)));
+
+
+
+
+
+extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg)
+ __attribute__ ((__format__ (__scanf__, 1, 0)));
+
+
+extern int vsscanf (__const char *__restrict __s,
+ __const char *__restrict __format, __gnuc_va_list __arg)
+ __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__scanf__, 2, 0)));
+
+
+
+
+
+
+
+
+
+extern int fgetc (FILE *__stream);
+extern int getc (FILE *__stream);
+
+
+
+
+
+extern int getchar (void);
+
+
+
+
+#define getc(_fp) __GETC(_fp)
+
+
+
+
+
+
+extern int getc_unlocked (FILE *__stream);
+extern int getchar_unlocked (void);
+
+
+#define getc_unlocked(_fp) __GETC_UNLOCKED(_fp)
+# 465 "../../include/stdio.h"
+extern int fgetc_unlocked (FILE *__stream);
+
+
+
+
+
+
+
+
+
+
+
+extern int fputc (int __c, FILE *__stream);
+extern int putc (int __c, FILE *__stream);
+
+
+
+
+
+extern int putchar (int __c);
+
+
+
+
+#define putc(_ch,_fp) __PUTC(_ch, _fp)
+# 498 "../../include/stdio.h"
+extern int fputc_unlocked (int __c, FILE *__stream);
+
+
+
+
+
+
+
+extern int putc_unlocked (int __c, FILE *__stream);
+extern int putchar_unlocked (int __c);
+
+
+#define putc_unlocked(_ch,_fp) __PUTC_UNLOCKED(_ch, _fp)
+
+
+
+
+
+
+extern int getw (FILE *__stream);
+
+
+extern int putw (int __w, FILE *__stream);
+
+
+
+
+
+
+
+
+extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream);
+
+
+
+
+
+
+extern char *gets (char *__s);
+
+# 546 "../../include/stdio.h"
+extern char *fgets_unlocked (char *__restrict __s, int __n,
+ FILE *__restrict __stream);
+# 567 "../../include/stdio.h"
+extern __ssize_t getdelim (char **__restrict __lineptr,
+ size_t *__restrict __n, int __delimiter,
+ FILE *__restrict __stream);
+
+
+
+
+
+
+
+extern __ssize_t getline (char **__restrict __lineptr,
+ size_t *__restrict __n,
+ FILE *__restrict __stream);
+
+
+
+
+
+
+
+
+extern int fputs (__const char *__restrict __s, FILE *__restrict __stream);
+
+
+
+
+
+extern int puts (__const char *__s);
+
+
+
+
+
+
+extern int ungetc (int __c, FILE *__stream);
+
+
+
+
+
+
+extern size_t fread (void *__restrict __ptr, size_t __size,
+ size_t __n, FILE *__restrict __stream);
+
+
+
+
+extern size_t fwrite (__const void *__restrict __ptr, size_t __size,
+ size_t __n, FILE *__restrict __s);
+
+# 625 "../../include/stdio.h"
+extern int fputs_unlocked (__const char *__restrict __s,
+ FILE *__restrict __stream);
+# 636 "../../include/stdio.h"
+extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
+ size_t __n, FILE *__restrict __stream);
+extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size,
+ size_t __n, FILE *__restrict __stream);
+
+
+
+
+
+
+
+
+extern int fseek (FILE *__stream, long int __off, int __whence);
+
+
+
+
+extern long int ftell (FILE *__stream);
+
+
+
+
+extern void rewind (FILE *__stream);
+
+# 672 "../../include/stdio.h"
+extern int fseeko (FILE *__stream, __off_t __off, int __whence);
+
+
+
+
+extern __off_t ftello (FILE *__stream);
+# 691 "../../include/stdio.h"
+
+
+
+
+
+
+extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos);
+
+
+
+
+extern int fsetpos (FILE *__stream, __const fpos_t *__pos);
+# 714 "../../include/stdio.h"
+
+
+
+extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence);
+extern __off64_t ftello64 (FILE *__stream);
+extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos);
+extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos);
+
+
+
+
+extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__));
+
+extern int feof (FILE *__stream) __attribute__ ((__nothrow__));
+
+extern int ferror (FILE *__stream) __attribute__ ((__nothrow__));
+
+
+
+
+extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__));
+extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__));
+extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+
+
+extern void perror (__const char *__s);
+
+
+
+
+
+
+extern int sys_nerr;
+extern __const char *__const sys_errlist[];
+
+
+
+
+
+
+extern int fileno (FILE *__stream) __attribute__ ((__nothrow__));
+
+
+
+
+extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__));
+# 775 "../../include/stdio.h"
+extern FILE *popen (__const char *__command, __const char *__modes);
+
+
+
+
+
+extern int pclose (FILE *__stream);
+
+
+
+
+
+extern char *ctermid (char *__s) __attribute__ ((__nothrow__));
+
+
+
+
+
+extern char *cuserid (char *__s);
+# 815 "../../include/stdio.h"
+extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__));
+
+
+
+extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__));
+
+
+extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__));
+# 835 "../../include/stdio.h"
+#define fgetc(_fp) __FGETC(_fp)
+#define fputc(_ch,_fp) __FPUTC(_ch, _fp)
+
+
+#define fgetc_unlocked(_fp) __FGETC_UNLOCKED(_fp)
+#define fputc_unlocked(_ch,_fp) __FPUTC_UNLOCKED(_ch, _fp)
+
+
+
+
+
+#define getchar() __GETC(__stdin)
+
+
+
+
+#define putchar(_ch) __PUTC((_ch), __stdout)
+
+
+#define getchar_unlocked() __GETC_UNLOCKED(__stdin)
+#define putchar_unlocked(_ch) __PUTC_UNLOCKED((_ch), __stdout)
+
+
+
+#define clearerr(_fp) __CLEARERR(_fp)
+#define feof(_fp) __FEOF(_fp)
+#define ferror(_fp) __FERROR(_fp)
+
+
+#define clearerr_unlocked(_fp) __CLEARERR_UNLOCKED(_fp)
+#define feof_unlocked(_fp) __FEOF_UNLOCKED(_fp)
+#define ferror_unlocked(_fp) __FERROR_UNLOCKED(_fp)
+
+
+
+# 11 "tsp_common.c" 2
+# 1 "../../include/stdlib.h" 1
+# 28 "../../include/stdlib.h"
+#define __need_size_t
+
+
+#define __need_wchar_t
+
+#define __need_NULL
+
+# 1 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 1 3 4
+# 236 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 3 4
+#undef __need_size_t
+# 345 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 3 4
+#undef __need_wchar_t
+# 398 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 3 4
+#undef NULL
+
+
+
+
+#define NULL ((void *)0)
+
+
+
+
+
+#undef __need_NULL
+# 36 "../../include/stdlib.h" 2
+
+
+
+
+#define _STDLIB_H 1
+
+
+
+# 1 "../../include/bits/waitflags.h" 1
+# 26 "../../include/bits/waitflags.h"
+#define WNOHANG 1
+#define WUNTRACED 2
+
+
+#define WSTOPPED 2
+#define WEXITED 4
+#define WCONTINUED 8
+#define WNOWAIT 0x01000000
+
+#define __WNOTHREAD 0x20000000
+
+#define __WALL 0x40000000
+#define __WCLONE 0x80000000
+# 45 "../../include/stdlib.h" 2
+# 1 "../../include/bits/waitstatus.h" 1
+# 29 "../../include/bits/waitstatus.h"
+#define __WEXITSTATUS(status) (((status) & 0xff00) >> 8)
+
+
+#define __WTERMSIG(status) ((status) & 0x7f)
+
+
+#define __WSTOPSIG(status) __WEXITSTATUS(status)
+
+
+#define __WIFEXITED(status) (__WTERMSIG(status) == 0)
+
+
+
+#define __WIFSIGNALED(status) (__extension__ ({ int __status = (status); !__WIFSTOPPED(__status) && !__WIFEXITED(__status); }))
+
+
+
+
+
+
+
+#define __WIFSTOPPED(status) (((status) & 0xff) == 0x7f)
+
+
+#define __WCOREDUMP(status) ((status) & __WCOREFLAG)
+
+
+#define __W_EXITCODE(ret,sig) ((ret) << 8 | (sig))
+#define __W_STOPCODE(sig) ((sig) << 8 | 0x7f)
+#define __WCOREFLAG 0x80
+
+
+
+
+# 1 "../../include/endian.h" 1
+# 20 "../../include/endian.h"
+#define _ENDIAN_H 1
+# 32 "../../include/endian.h"
+#define __LITTLE_ENDIAN 1234
+#define __BIG_ENDIAN 4321
+#define __PDP_ENDIAN 3412
+
+
+# 1 "../../include/bits/endian.h" 1
+
+
+
+
+
+
+
+#define __BYTE_ORDER __LITTLE_ENDIAN
+#define __FLOAT_WORD_ORDER __LITTLE_ENDIAN
+# 38 "../../include/endian.h" 2
+# 46 "../../include/endian.h"
+#define LITTLE_ENDIAN __LITTLE_ENDIAN
+#define BIG_ENDIAN __BIG_ENDIAN
+#define PDP_ENDIAN __PDP_ENDIAN
+#define BYTE_ORDER __BYTE_ORDER
+
+
+
+#define __LONG_LONG_PAIR(HI,LO) LO, HI
+# 64 "../../include/bits/waitstatus.h" 2
+
+union wait
+ {
+ int w_status;
+ struct
+ {
+
+ unsigned int __w_termsig:7;
+ unsigned int __w_coredump:1;
+ unsigned int __w_retcode:8;
+ unsigned int:16;
+
+
+
+
+
+
+
+ } __wait_terminated;
+ struct
+ {
+
+ unsigned int __w_stopval:8;
+ unsigned int __w_stopsig:8;
+ unsigned int:16;
+
+
+
+
+
+
+ } __wait_stopped;
+ };
+
+#define w_termsig __wait_terminated.__w_termsig
+#define w_coredump __wait_terminated.__w_coredump
+#define w_retcode __wait_terminated.__w_retcode
+#define w_stopsig __wait_stopped.__w_stopsig
+#define w_stopval __wait_stopped.__w_stopval
+# 46 "../../include/stdlib.h" 2
+
+
+
+
+
+
+
+#define __WAIT_INT(status) (__extension__ ({ union { __typeof(status) __in; int __i; } __u; __u.__in = (status); __u.__i; }))
+# 70 "../../include/stdlib.h"
+typedef union
+ {
+ union wait *__uptr;
+ int *__iptr;
+ } __WAIT_STATUS __attribute__ ((__transparent_union__));
+#define __WAIT_STATUS_DEFN int *
+# 87 "../../include/stdlib.h"
+#define WEXITSTATUS(status) __WEXITSTATUS(__WAIT_INT(status))
+#define WTERMSIG(status) __WTERMSIG(__WAIT_INT(status))
+#define WSTOPSIG(status) __WSTOPSIG(__WAIT_INT(status))
+#define WIFEXITED(status) __WIFEXITED(__WAIT_INT(status))
+#define WIFSIGNALED(status) __WIFSIGNALED(__WAIT_INT(status))
+#define WIFSTOPPED(status) __WIFSTOPPED(__WAIT_INT(status))
+
+
+
+
+
+
+
+typedef struct
+ {
+ int quot;
+ int rem;
+ } div_t;
+
+
+
+typedef struct
+ {
+ long int quot;
+ long int rem;
+ } ldiv_t;
+#define __ldiv_t_defined 1
+
+
+
+
+
+
+__extension__ typedef struct
+ {
+ long long int quot;
+ long long int rem;
+ } lldiv_t;
+#define __lldiv_t_defined 1
+
+
+
+
+
+#define RAND_MAX 2147483647
+
+
+
+
+#define EXIT_FAILURE 1
+#define EXIT_SUCCESS 0
+# 146 "../../include/stdlib.h"
+#define MB_CUR_MAX (_stdlib_mb_cur_max ())
+extern size_t _stdlib_mb_cur_max (void) __attribute__ ((__nothrow__)) ;
+
+
+
+
+
+
+extern double atof (__const char *__nptr)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
+
+
+extern int atoi (__const char *__nptr)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
+
+extern long int atol (__const char *__nptr)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
+
+
+
+
+
+__extension__ extern long long int atoll (__const char *__nptr)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
+
+
+
+
+
+
+extern double strtod (__const char *__restrict __nptr,
+ char **__restrict __endptr)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
+
+
+
+
+
+extern float strtof (__const char *__restrict __nptr,
+ char **__restrict __endptr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
+
+extern long double strtold (__const char *__restrict __nptr,
+ char **__restrict __endptr)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
+
+
+
+
+
+
+extern long int strtol (__const char *__restrict __nptr,
+ char **__restrict __endptr, int __base)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
+
+extern unsigned long int strtoul (__const char *__restrict __nptr,
+ char **__restrict __endptr, int __base)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
+
+
+
+
+__extension__
+extern long long int strtoq (__const char *__restrict __nptr,
+ char **__restrict __endptr, int __base)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
+
+__extension__
+extern unsigned long long int strtouq (__const char *__restrict __nptr,
+ char **__restrict __endptr, int __base)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
+
+
+
+
+
+__extension__
+extern long long int strtoll (__const char *__restrict __nptr,
+ char **__restrict __endptr, int __base)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
+
+__extension__
+extern unsigned long long int strtoull (__const char *__restrict __nptr,
+ char **__restrict __endptr, int __base)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
+
+# 297 "../../include/stdlib.h"
+extern char *l64a (long int __n) __attribute__ ((__nothrow__)) ;
+
+
+extern long int a64l (__const char *__s)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
+
+
+
+
+# 1 "../../include/sys/types.h" 1
+# 25 "../../include/sys/types.h"
+#define _SYS_TYPES_H 1
+
+
+
+
+
+
+
+
+
+typedef __u_char u_char;
+typedef __u_short u_short;
+typedef __u_int u_int;
+typedef __u_long u_long;
+typedef __quad_t quad_t;
+typedef __u_quad_t u_quad_t;
+typedef __fsid_t fsid_t;
+#define __u_char_defined
+
+
+
+typedef __loff_t loff_t;
+
+
+
+typedef __ino_t ino_t;
+
+
+
+#define __ino_t_defined
+
+
+typedef __ino64_t ino64_t;
+#define __ino64_t_defined
+
+
+
+typedef __dev_t dev_t;
+#define __dev_t_defined
+
+
+
+typedef __gid_t gid_t;
+#define __gid_t_defined
+
+
+
+typedef __mode_t mode_t;
+#define __mode_t_defined
+
+
+
+typedef __nlink_t nlink_t;
+#define __nlink_t_defined
+
+
+
+typedef __uid_t uid_t;
+#define __uid_t_defined
+
+
+
+
+typedef __off_t off_t;
+
+
+
+#define __off_t_defined
+
+
+typedef __off64_t off64_t;
+#define __off64_t_defined
+
+
+
+typedef __pid_t pid_t;
+#define __pid_t_defined
+
+
+
+typedef __id_t id_t;
+#define __id_t_defined
+
+
+
+typedef __ssize_t ssize_t;
+#define __ssize_t_defined
+
+
+
+
+typedef __daddr_t daddr_t;
+typedef __caddr_t caddr_t;
+#define __daddr_t_defined
+
+
+
+
+typedef __key_t key_t;
+#define __key_t_defined
+
+
+
+#define __need_clock_t
+
+#define __need_time_t
+#define __need_timer_t
+#define __need_clockid_t
+# 1 "../../include/time.h" 1
+# 55 "../../include/time.h"
+#define __clock_t_defined 1
+
+
+
+
+
+typedef __clock_t clock_t;
+
+
+
+
+
+
+#undef __need_clock_t
+
+
+#define __time_t_defined 1
+
+
+
+
+
+typedef __time_t time_t;
+
+
+
+
+
+
+#undef __need_time_t
+
+
+
+#define __clockid_t_defined 1
+
+
+
+
+typedef __clockid_t clockid_t;
+
+
+#undef __clockid_time_t
+
+
+
+#define __timer_t_defined 1
+
+
+
+
+typedef __timer_t timer_t;
+
+
+#undef __need_timer_t
+# 128 "../../include/time.h"
+#undef __need_timespec
+# 134 "../../include/sys/types.h" 2
+
+
+
+typedef __useconds_t useconds_t;
+#define __useconds_t_defined
+
+
+typedef __suseconds_t suseconds_t;
+#define __suseconds_t_defined
+
+
+
+#define __need_size_t
+# 1 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 1 3 4
+# 236 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 3 4
+#undef __need_size_t
+# 409 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 3 4
+#undef __need_NULL
+# 148 "../../include/sys/types.h" 2
+
+
+
+typedef unsigned long int ulong;
+typedef unsigned short int ushort;
+typedef unsigned int uint;
+# 184 "../../include/sys/types.h"
+#define __intN_t(N,MODE) typedef int int ##N ##_t __attribute__ ((__mode__ (MODE)))
+
+#define __u_intN_t(N,MODE) typedef unsigned int u_int ##N ##_t __attribute__ ((__mode__ (MODE)))
+
+
+
+#define __int8_t_defined
+typedef int int8_t __attribute__ ((__mode__ (__QI__)));
+typedef int int16_t __attribute__ ((__mode__ (__HI__)));
+typedef int int32_t __attribute__ ((__mode__ (__SI__)));
+typedef int int64_t __attribute__ ((__mode__ (__DI__)));
+
+
+typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));
+typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));
+typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));
+typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));
+
+typedef int register_t __attribute__ ((__mode__ (__word__)));
+
+
+
+
+
+#define __BIT_TYPES_DEFINED__ 1
+
+
+
+
+
+
+
+# 1 "../../include/sys/select.h" 1
+# 23 "../../include/sys/select.h"
+#define _SYS_SELECT_H 1
+
+
+
+
+
+
+
+# 1 "../../include/bits/select.h" 1
+# 26 "../../include/bits/select.h"
+#define __FD_ZERO(s) do { unsigned int __i; fd_set *__arr = (s); for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) __FDS_BITS (__arr)[__i] = 0; } while (0)
+
+
+
+
+
+
+#define __FD_SET(d,s) (__FDS_BITS (s)[__FDELT(d)] |= __FDMASK(d))
+#define __FD_CLR(d,s) (__FDS_BITS (s)[__FDELT(d)] &= ~__FDMASK(d))
+#define __FD_ISSET(d,s) ((__FDS_BITS (s)[__FDELT(d)] & __FDMASK(d)) != 0)
+# 32 "../../include/sys/select.h" 2
+
+
+# 1 "../../include/bits/sigset.h" 1
+# 21 "../../include/bits/sigset.h"
+#define _SIGSET_H_types 1
+
+typedef int __sig_atomic_t;
+
+
+
+#define _SIGSET_NWORDS (1024 / (8 * sizeof (unsigned long int)))
+typedef struct
+ {
+ unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
+ } __sigset_t;
+# 35 "../../include/sys/select.h" 2
+
+
+#define __sigset_t_defined
+typedef __sigset_t sigset_t;
+
+
+
+#define __need_time_t
+#define __need_timespec
+# 1 "../../include/time.h" 1
+# 68 "../../include/time.h"
+#undef __need_clock_t
+# 84 "../../include/time.h"
+#undef __need_time_t
+# 96 "../../include/time.h"
+#undef __clockid_time_t
+# 108 "../../include/time.h"
+#undef __need_timer_t
+
+
+
+
+
+
+#define __timespec_defined 1
+
+
+
+
+
+struct timespec
+ {
+ __time_t tv_sec;
+ long int tv_nsec;
+ };
+
+
+#undef __need_timespec
+# 45 "../../include/sys/select.h" 2
+#define __need_timeval
+# 1 "../../include/bits/time.h" 1
+# 66 "../../include/bits/time.h"
+#undef __need_timeval
+
+#define _STRUCT_TIMEVAL 1
+
+
+
+
+struct timeval
+ {
+ __time_t tv_sec;
+ __suseconds_t tv_usec;
+ };
+# 47 "../../include/sys/select.h" 2
+# 55 "../../include/sys/select.h"
+typedef long int __fd_mask;
+
+
+#undef __NFDBITS
+#undef __FDELT
+#undef __FDMASK
+
+#define __NFDBITS (8 * sizeof (__fd_mask))
+#define __FDELT(d) ((d) / __NFDBITS)
+#define __FDMASK(d) ((__fd_mask) 1 << ((d) % __NFDBITS))
+
+
+typedef struct
+ {
+
+
+
+ __fd_mask fds_bits[1024 / (8 * sizeof (__fd_mask))];
+#define __FDS_BITS(set) ((set)->fds_bits)
+
+
+
+
+ } fd_set;
+
+
+#define FD_SETSIZE __FD_SETSIZE
+
+
+
+typedef __fd_mask fd_mask;
+
+
+#define NFDBITS __NFDBITS
+
+
+
+
+#define FD_SET(fd,fdsetp) __FD_SET (fd, fdsetp)
+#define FD_CLR(fd,fdsetp) __FD_CLR (fd, fdsetp)
+#define FD_ISSET(fd,fdsetp) __FD_ISSET (fd, fdsetp)
+#define FD_ZERO(fdsetp) __FD_ZERO (fdsetp)
+
+
+
+# 109 "../../include/sys/select.h"
+extern int select (int __nfds, fd_set *__restrict __readfds,
+ fd_set *__restrict __writefds,
+ fd_set *__restrict __exceptfds,
+ struct timeval *__restrict __timeout);
+# 121 "../../include/sys/select.h"
+extern int pselect (int __nfds, fd_set *__restrict __readfds,
+ fd_set *__restrict __writefds,
+ fd_set *__restrict __exceptfds,
+ const struct timespec *__restrict __timeout,
+ const __sigset_t *__restrict __sigmask);
+
+
+
+# 217 "../../include/sys/types.h" 2
+
+
+# 1 "../../include/sys/sysmacros.h" 1
+# 21 "../../include/sys/sysmacros.h"
+#define _SYS_SYSMACROS_H 1
+
+
+
+
+
+
+
+__extension__
+static __inline unsigned int gnu_dev_major (unsigned long long int __dev)
+ __attribute__ ((__nothrow__));
+__extension__
+static __inline unsigned int gnu_dev_minor (unsigned long long int __dev)
+ __attribute__ ((__nothrow__));
+__extension__
+static __inline unsigned long long int gnu_dev_makedev (unsigned int __major,
+ unsigned int __minor)
+ __attribute__ ((__nothrow__));
+
+
+__extension__ static __inline unsigned int
+__attribute__ ((__nothrow__)) gnu_dev_major (unsigned long long int __dev)
+{
+ return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff);
+}
+
+__extension__ static __inline unsigned int
+__attribute__ ((__nothrow__)) gnu_dev_minor (unsigned long long int __dev)
+{
+ return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff);
+}
+
+__extension__ static __inline unsigned long long int
+__attribute__ ((__nothrow__)) gnu_dev_makedev (unsigned int __major, unsigned int __minor)
+{
+ return ((__minor & 0xff) | ((__major & 0xfff) << 8)
+ | (((unsigned long long int) (__minor & ~0xff)) << 12)
+ | (((unsigned long long int) (__major & ~0xfff)) << 32));
+}
+
+
+
+
+#define major(dev) gnu_dev_major (dev)
+#define minor(dev) gnu_dev_minor (dev)
+#define makedev(maj,min) gnu_dev_makedev (maj, min)
+# 220 "../../include/sys/types.h" 2
+
+
+
+
+typedef __blksize_t blksize_t;
+#define __blksize_t_defined
+
+
+
+
+
+typedef __blkcnt_t blkcnt_t;
+#define __blkcnt_t_defined
+
+
+typedef __fsblkcnt_t fsblkcnt_t;
+#define __fsblkcnt_t_defined
+
+
+typedef __fsfilcnt_t fsfilcnt_t;
+#define __fsfilcnt_t_defined
+# 258 "../../include/sys/types.h"
+typedef __blkcnt64_t blkcnt64_t;
+typedef __fsblkcnt64_t fsblkcnt64_t;
+typedef __fsfilcnt64_t fsfilcnt64_t;
+# 269 "../../include/sys/types.h"
+
+# 307 "../../include/stdlib.h" 2
+
+
+
+
+
+
+extern long int random (void) __attribute__ ((__nothrow__));
+
+
+extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__));
+
+
+
+
+
+extern char *initstate (unsigned int __seed, char *__statebuf,
+ size_t __statelen) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
+
+
+
+extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+
+
+struct random_data
+ {
+ int32_t *fptr;
+ int32_t *rptr;
+ int32_t *state;
+ int rand_type;
+ int rand_deg;
+ int rand_sep;
+ int32_t *end_ptr;
+ };
+
+extern int random_r (struct random_data *__restrict __buf,
+ int32_t *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+extern int srandom_r (unsigned int __seed, struct random_data *__buf)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
+
+extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
+ size_t __statelen,
+ struct random_data *__restrict __buf)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4)));
+
+extern int setstate_r (char *__restrict __statebuf,
+ struct random_data *__restrict __buf)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+
+
+
+extern int rand (void) __attribute__ ((__nothrow__));
+
+extern void srand (unsigned int __seed) __attribute__ ((__nothrow__));
+
+
+
+
+extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__));
+# 382 "../../include/stdlib.h"
+extern double drand48 (void) __attribute__ ((__nothrow__));
+extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+extern long int lrand48 (void) __attribute__ ((__nothrow__));
+extern long int nrand48 (unsigned short int __xsubi[3])
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern long int mrand48 (void) __attribute__ ((__nothrow__));
+extern long int jrand48 (unsigned short int __xsubi[3])
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern void srand48 (long int __seedval) __attribute__ ((__nothrow__));
+extern unsigned short int *seed48 (unsigned short int __seed16v[3])
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+struct drand48_data
+ {
+ unsigned short int __x[3];
+ unsigned short int __old_x[3];
+ unsigned short int __c;
+ unsigned short int __init;
+ unsigned long long int __a;
+ };
+
+
+
+extern int drand48_r (struct drand48_data *__restrict __buffer,
+ double *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+extern int erand48_r (unsigned short int __xsubi[3],
+ struct drand48_data *__restrict __buffer,
+ double *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+extern int lrand48_r (struct drand48_data *__restrict __buffer,
+ long int *__restrict __result)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+extern int nrand48_r (unsigned short int __xsubi[3],
+ struct drand48_data *__restrict __buffer,
+ long int *__restrict __result)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern int mrand48_r (struct drand48_data *__restrict __buffer,
+ long int *__restrict __result)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+extern int jrand48_r (unsigned short int __xsubi[3],
+ struct drand48_data *__restrict __buffer,
+ long int *__restrict __result)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern int srand48_r (long int __seedval, struct drand48_data *__buffer)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
+
+extern int seed48_r (unsigned short int __seed16v[3],
+ struct drand48_data *__buffer) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+extern int lcong48_r (unsigned short int __param[7],
+ struct drand48_data *__buffer)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+
+
+
+#define __malloc_and_calloc_defined
+
+
+extern void *malloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ;
+
+extern void *calloc (size_t __nmemb, size_t __size)
+ __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ;
+
+
+
+
+
+
+
+extern void *realloc (void *__ptr, size_t __size)
+ __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__));
+
+extern void free (void *__ptr) __attribute__ ((__nothrow__));
+
+
+
+
+extern void cfree (void *__ptr) __attribute__ ((__nothrow__));
+
+
+
+# 1 "../../include/alloca.h" 1
+# 20 "../../include/alloca.h"
+#define _ALLOCA_H 1
+
+
+
+#define __need_size_t
+# 1 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 1 3 4
+# 236 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 3 4
+#undef __need_size_t
+# 409 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 3 4
+#undef __need_NULL
+# 26 "../../include/alloca.h" 2
+
+
+
+
+#undef alloca
+
+
+extern void *alloca (size_t __size) __attribute__ ((__nothrow__));
+
+
+#define alloca(size) __builtin_alloca (size)
+
+
+#define __MAX_ALLOCA_CUTOFF 65536
+
+
+# 485 "../../include/stdlib.h" 2
+
+
+
+
+extern void *valloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ;
+
+
+
+
+extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
+
+
+
+
+extern void abort (void) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
+
+
+
+extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+
+extern void exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
+
+
+
+
+
+
+extern void _Exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
+
+
+
+
+
+
+extern char *getenv (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
+
+
+
+
+extern char *__secure_getenv (__const char *__name)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
+
+
+
+
+
+extern int putenv (char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+extern int setenv (__const char *__name, __const char *__value, int __replace)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
+
+
+extern int unsetenv (__const char *__name) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+
+#define __UCLIBC_MAX_ATEXIT 20
+
+
+
+
+
+
+
+extern int clearenv (void) __attribute__ ((__nothrow__));
+# 579 "../../include/stdlib.h"
+extern char *mktemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
+# 590 "../../include/stdlib.h"
+extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) ;
+# 600 "../../include/stdlib.h"
+extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) ;
+# 610 "../../include/stdlib.h"
+extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
+
+
+
+
+
+
+
+
+extern int system (__const char *__command) ;
+
+# 638 "../../include/stdlib.h"
+extern char *realpath (__const char *__restrict __name,
+ char *__restrict __resolved) __attribute__ ((__nothrow__)) ;
+
+
+
+
+
+#define __COMPAR_FN_T
+typedef int (*__compar_fn_t) (__const void *, __const void *);
+
+
+typedef __compar_fn_t comparison_fn_t;
+
+
+
+
+
+
+extern void *bsearch (__const void *__key, __const void *__base,
+ size_t __nmemb, size_t __size, __compar_fn_t __compar)
+ __attribute__ ((__nonnull__ (1, 2, 5))) ;
+
+
+
+extern void qsort (void *__base, size_t __nmemb, size_t __size,
+ __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4)));
+
+
+
+extern int abs (int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ;
+extern long int labs (long int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ;
+
+
+
+__extension__ extern long long int llabs (long long int __x)
+ __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ;
+
+
+
+
+
+
+
+extern div_t div (int __numer, int __denom)
+ __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ;
+extern ldiv_t ldiv (long int __numer, long int __denom)
+ __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ;
+
+
+
+
+__extension__ extern lldiv_t lldiv (long long int __numer,
+ long long int __denom)
+ __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ;
+
+# 719 "../../include/stdlib.h"
+extern char *gcvt (double __value, int __ndigit, char *__buf)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))) ;
+# 756 "../../include/stdlib.h"
+
+
+
+extern int mblen (__const char *__s, size_t __n) __attribute__ ((__nothrow__)) ;
+
+
+extern int mbtowc (wchar_t *__restrict __pwc,
+ __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__)) ;
+
+
+extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__)) ;
+
+
+
+extern size_t mbstowcs (wchar_t *__restrict __pwcs,
+ __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__));
+
+extern size_t wcstombs (char *__restrict __s,
+ __const wchar_t *__restrict __pwcs, size_t __n)
+ __attribute__ ((__nothrow__));
+
+# 785 "../../include/stdlib.h"
+extern int rpmatch (__const char *__response) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
+# 796 "../../include/stdlib.h"
+extern int getsubopt (char **__restrict __optionp,
+ char *__const *__restrict __tokens,
+ char **__restrict __valuep)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2, 3))) ;
+
+
+
+
+
+extern void setkey (__const char *__key) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+
+
+extern int posix_openpt (int __oflag) ;
+
+
+
+
+
+
+
+extern int grantpt (int __fd) __attribute__ ((__nothrow__));
+
+
+
+extern int unlockpt (int __fd) __attribute__ ((__nothrow__));
+
+
+
+
+extern char *ptsname (int __fd) __attribute__ ((__nothrow__)) ;
+
+
+
+
+
+
+extern int ptsname_r (int __fd, char *__buf, size_t __buflen)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
+
+
+extern int getpt (void);
+# 860 "../../include/stdlib.h"
+#undef __need_malloc_and_calloc
+
+
+# 12 "tsp_common.c" 2
+# 1 "../../include/string.h" 1
+# 24 "../../include/string.h"
+#define _STRING_H 1
+
+
+
+
+
+
+#define __need_size_t
+#define __need_NULL
+# 1 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 1 3 4
+# 236 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 3 4
+#undef __need_size_t
+# 398 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 3 4
+#undef NULL
+
+
+
+
+#define NULL ((void *)0)
+
+
+
+
+
+#undef __need_NULL
+# 34 "../../include/string.h" 2
+
+
+
+
+extern void *memcpy (void *__restrict __dest,
+ __const void *__restrict __src, size_t __n)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern void *memmove (void *__dest, __const void *__src, size_t __n)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+
+
+
+extern void *memccpy (void *__restrict __dest, __const void *__restrict __src,
+ int __c, size_t __n)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+
+
+extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int memcmp (__const void *__s1, __const void *__s2, size_t __n)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern void *memchr (__const void *__s, int __c, size_t __n)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+extern void *rawmemchr (__const void *__s, int __c)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern void *memrchr (__const void *__s, int __c, size_t __n)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+extern char *strcpy (char *__restrict __dest, __const char *__restrict __src)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+extern char *strncpy (char *__restrict __dest,
+ __const char *__restrict __src, size_t __n)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern char *strcat (char *__restrict __dest, __const char *__restrict __src)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+extern char *strncat (char *__restrict __dest, __const char *__restrict __src,
+ size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern int strcmp (__const char *__s1, __const char *__s2)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+
+extern int strncmp (__const char *__s1, __const char *__s2, size_t __n)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern int strcoll (__const char *__s1, __const char *__s2)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+
+extern size_t strxfrm (char *__restrict __dest,
+ __const char *__restrict __src, size_t __n)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
+
+# 130 "../../include/string.h"
+extern char *strdup (__const char *__s)
+ __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+
+extern char *strndup (__const char *__string, size_t __n)
+ __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+#define strdupa(s) (__extension__ ({ __const char *__old = (s); size_t __len = strlen (__old) + 1; char *__new = (char *) __builtin_alloca (__len); (char *) memcpy (__new, __old, __len); }))
+# 154 "../../include/string.h"
+#define strndupa(s,n) (__extension__ ({ __const char *__old = (s); size_t __len = strnlen (__old, (n)); char *__new = (char *) __builtin_alloca (__len + 1); __new[__len] = '\0'; (char *) memcpy (__new, __old, __len); }))
+# 165 "../../include/string.h"
+
+
+extern char *strchr (__const char *__s, int __c)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
+
+extern char *strrchr (__const char *__s, int __c)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+extern char *strchrnul (__const char *__s, int __c)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+extern size_t strcspn (__const char *__s, __const char *__reject)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern size_t strspn (__const char *__s, __const char *__accept)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+
+extern char *strpbrk (__const char *__s, __const char *__accept)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+
+extern char *strstr (__const char *__haystack, __const char *__needle)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+extern char *strtok (char *__restrict __s, __const char *__restrict __delim)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
+
+# 212 "../../include/string.h"
+extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim,
+ char **__restrict __save_ptr)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));
+
+
+
+
+extern char *strcasestr (__const char *__haystack, __const char *__needle)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+
+
+
+extern void *memmem (__const void *__haystack, size_t __haystacklen,
+ __const void *__needle, size_t __needlelen)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3)));
+# 238 "../../include/string.h"
+extern void *mempcpy (void *__restrict __dest,
+ __const void *__restrict __src, size_t __n)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+
+
+extern size_t strlen (__const char *__s)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+extern size_t strnlen (__const char *__string, size_t __maxlen)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+extern char *strerror (int __errnum) __attribute__ ((__nothrow__));
+
+# 285 "../../include/string.h"
+extern char *__glibc_strerror_r (int __errnum, char *__buf, size_t __buflen)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
+
+extern char * strerror_r (int __errnum, char *__buf, size_t __buflen) __asm__ ("" "__glibc_strerror_r") __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
+# 306 "../../include/string.h"
+extern void bcopy (__const void *__src, void *__dest, size_t __n)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int bcmp (__const void *__s1, __const void *__s2, size_t __n)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern char *index (__const char *__s, int __c)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern char *rindex (__const char *__s, int __c)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
+# 339 "../../include/string.h"
+extern int ffs (int __i) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+# 352 "../../include/string.h"
+extern int strcasecmp (__const char *__s1, __const char *__s2)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+# 375 "../../include/string.h"
+extern char *strsep (char **__restrict __stringp,
+ __const char *__restrict __delim)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+# 388 "../../include/string.h"
+extern char *strsignal (int __sig) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+# 405 "../../include/string.h"
+extern char *stpncpy (char *__restrict __dest,
+ __const char *__restrict __src, size_t __n)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+# 422 "../../include/string.h"
+extern char *basename (__const char *__filename) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+
+extern size_t strlcat(char *__restrict dst, const char *__restrict src,
+ size_t n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+extern size_t strlcpy(char *__restrict dst, const char *__restrict src,
+ size_t n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+# 13 "tsp_common.c" 2
+# 1 "../../include/locale.h" 1
+# 24 "../../include/locale.h"
+#define _LOCALE_H 1
+
+
+
+#define __need_NULL
+# 1 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 1 3 4
+# 398 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 3 4
+#undef NULL
+
+
+
+
+#define NULL ((void *)0)
+
+
+
+
+
+#undef __need_NULL
+# 30 "../../include/locale.h" 2
+# 1 "../../include/bits/uClibc_locale.h" 1
+# 31 "../../include/bits/uClibc_locale.h"
+#define _UCLIBC_LOCALE_H
+
+
+
+
+
+
+#undef __LOCALE_C_ONLY
+# 52 "../../include/bits/uClibc_locale.h"
+#define __NL_ITEM_CATEGORY_SHIFT (8)
+#define __NL_ITEM_INDEX_MASK (0xff)
+
+
+
+#define __LC_CTYPE 0
+#define __LC_NUMERIC 1
+#define __LC_MONETARY 2
+#define __LC_TIME 3
+#define __LC_COLLATE 4
+#define __LC_MESSAGES 5
+#define __LC_ALL 6
+
+
+
+
+
+# 1 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 1 3 4
+# 43 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 3 4
+#define _STDDEF_H
+#define _STDDEF_H_
+
+#define _ANSI_STDDEF_H
+
+#define __STDDEF_H__
+# 141 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 3 4
+#define _PTRDIFF_T
+#define _T_PTRDIFF_
+#define _T_PTRDIFF
+#define __PTRDIFF_T
+#define _PTRDIFF_T_
+#define _BSD_PTRDIFF_T_
+#define ___int_ptrdiff_t_h
+#define _GCC_PTRDIFF_T
+
+
+
+typedef int ptrdiff_t;
+# 163 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 3 4
+#undef __need_ptrdiff_t
+# 236 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 3 4
+#undef __need_size_t
+# 345 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 3 4
+#undef __need_wchar_t
+# 398 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 3 4
+#undef NULL
+
+
+
+
+#define NULL ((void *)0)
+
+
+
+
+
+#undef __need_NULL
+
+
+
+
+#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
+# 70 "../../include/bits/uClibc_locale.h" 2
+# 1 "../../include/stdint.h" 1
+# 24 "../../include/stdint.h"
+#define _STDINT_H 1
+
+
+
+
+
+# 1 "../../include/bits/wordsize.h" 1
+# 19 "../../include/bits/wordsize.h"
+#define __WORDSIZE 32
+# 31 "../../include/stdint.h" 2
+# 51 "../../include/stdint.h"
+typedef unsigned char uint8_t;
+typedef unsigned short int uint16_t;
+
+typedef unsigned int uint32_t;
+#define __uint32_t_defined
+
+
+
+
+__extension__
+typedef unsigned long long int uint64_t;
+
+
+
+
+
+
+typedef signed char int_least8_t;
+typedef short int int_least16_t;
+typedef int int_least32_t;
+
+
+
+__extension__
+typedef long long int int_least64_t;
+
+
+
+typedef unsigned char uint_least8_t;
+typedef unsigned short int uint_least16_t;
+typedef unsigned int uint_least32_t;
+
+
+
+__extension__
+typedef unsigned long long int uint_least64_t;
+
+
+
+
+
+
+typedef signed char int_fast8_t;
+
+
+
+
+
+typedef int int_fast16_t;
+typedef int int_fast32_t;
+__extension__
+typedef long long int int_fast64_t;
+
+
+
+typedef unsigned char uint_fast8_t;
+
+
+
+
+
+typedef unsigned int uint_fast16_t;
+typedef unsigned int uint_fast32_t;
+__extension__
+typedef unsigned long long int uint_fast64_t;
+# 128 "../../include/stdint.h"
+typedef int intptr_t;
+#define __intptr_t_defined
+
+typedef unsigned int uintptr_t;
+# 140 "../../include/stdint.h"
+__extension__
+typedef long long int intmax_t;
+__extension__
+typedef unsigned long long int uintmax_t;
+# 155 "../../include/stdint.h"
+#define __INT64_C(c) c ## LL
+#define __UINT64_C(c) c ## ULL
+
+
+
+
+
+#define INT8_MIN (-128)
+#define INT16_MIN (-32767-1)
+#define INT32_MIN (-2147483647-1)
+#define INT64_MIN (-__INT64_C(9223372036854775807)-1)
+
+#define INT8_MAX (127)
+#define INT16_MAX (32767)
+#define INT32_MAX (2147483647)
+#define INT64_MAX (__INT64_C(9223372036854775807))
+
+
+#define UINT8_MAX (255)
+#define UINT16_MAX (65535)
+#define UINT32_MAX (4294967295U)
+#define UINT64_MAX (__UINT64_C(18446744073709551615))
+
+
+
+#define INT_LEAST8_MIN (-128)
+#define INT_LEAST16_MIN (-32767-1)
+#define INT_LEAST32_MIN (-2147483647-1)
+#define INT_LEAST64_MIN (-__INT64_C(9223372036854775807)-1)
+
+#define INT_LEAST8_MAX (127)
+#define INT_LEAST16_MAX (32767)
+#define INT_LEAST32_MAX (2147483647)
+#define INT_LEAST64_MAX (__INT64_C(9223372036854775807))
+
+
+#define UINT_LEAST8_MAX (255)
+#define UINT_LEAST16_MAX (65535)
+#define UINT_LEAST32_MAX (4294967295U)
+#define UINT_LEAST64_MAX (__UINT64_C(18446744073709551615))
+
+
+
+#define INT_FAST8_MIN (-128)
+
+
+
+
+#define INT_FAST16_MIN (-2147483647-1)
+#define INT_FAST32_MIN (-2147483647-1)
+
+#define INT_FAST64_MIN (-__INT64_C(9223372036854775807)-1)
+
+#define INT_FAST8_MAX (127)
+
+
+
+
+#define INT_FAST16_MAX (2147483647)
+#define INT_FAST32_MAX (2147483647)
+
+#define INT_FAST64_MAX (__INT64_C(9223372036854775807))
+
+
+#define UINT_FAST8_MAX (255)
+
+
+
+
+#define UINT_FAST16_MAX (4294967295U)
+#define UINT_FAST32_MAX (4294967295U)
+
+#define UINT_FAST64_MAX (__UINT64_C(18446744073709551615))
+# 236 "../../include/stdint.h"
+#define INTPTR_MIN (-2147483647-1)
+#define INTPTR_MAX (2147483647)
+#define UINTPTR_MAX (4294967295U)
+
+
+
+
+#define INTMAX_MIN (-__INT64_C(9223372036854775807)-1)
+
+#define INTMAX_MAX (__INT64_C(9223372036854775807))
+
+
+#define UINTMAX_MAX (__UINT64_C(18446744073709551615))
+# 266 "../../include/stdint.h"
+#define PTRDIFF_MIN (-2147483647-1)
+#define PTRDIFF_MAX (2147483647)
+
+
+
+#define SIG_ATOMIC_MIN (-2147483647-1)
+#define SIG_ATOMIC_MAX (2147483647)
+
+
+
+
+
+#define SIZE_MAX (4294967295U)
+
+
+
+
+
+
+#define WCHAR_MIN __WCHAR_MIN
+#define WCHAR_MAX __WCHAR_MAX
+
+
+
+#define WINT_MIN (0u)
+#define WINT_MAX (4294967295u)
+# 302 "../../include/stdint.h"
+#define INT8_C(c) c
+#define INT16_C(c) c
+#define INT32_C(c) c
+
+
+
+#define INT64_C(c) c ## LL
+
+
+
+#define UINT8_C(c) c ## U
+#define UINT16_C(c) c ## U
+#define UINT32_C(c) c ## U
+
+
+
+#define UINT64_C(c) c ## ULL
+
+
+
+
+
+
+
+#define INTMAX_C(c) c ## LL
+#define UINTMAX_C(c) c ## ULL
+# 71 "../../include/bits/uClibc_locale.h" 2
+# 1 "../../include/bits/uClibc_touplow.h" 1
+# 31 "../../include/bits/uClibc_touplow.h"
+#define _UCLIBC_TOUPLOW_H
+
+
+
+
+
+
+typedef __uint16_t __ctype_mask_t;
+
+
+
+typedef __int16_t __ctype_touplow_t;
+#define __UCLIBC_CTYPE_B_TBL_OFFSET 128
+#define __UCLIBC_CTYPE_TO_TBL_OFFSET 128
+# 72 "../../include/bits/uClibc_locale.h" 2
+
+
+# 1 "../../include/bits/uClibc_locale_data.h" 1
+#define __lc_time_data_LEN 25900
+#define __lc_time_rows_LEN 7650
+#define __lc_time_item_offsets_LEN 50
+#define __lc_time_item_idx_LEN 3190
+#define __lc_numeric_data_LEN 22
+#define __lc_numeric_rows_LEN 42
+#define __lc_numeric_item_offsets_LEN 3
+#define __lc_numeric_item_idx_LEN 13
+#define __lc_monetary_data_LEN 1578
+#define __lc_monetary_rows_LEN 3652
+#define __lc_monetary_item_offsets_LEN 22
+#define __lc_monetary_item_idx_LEN 391
+#define __lc_messages_data_LEN 1583
+#define __lc_messages_rows_LEN 312
+#define __lc_messages_item_offsets_LEN 4
+#define __lc_messages_item_idx_LEN 170
+#define __lc_ctype_data_LEN 51
+#define __lc_ctype_rows_LEN 20
+#define __lc_ctype_item_offsets_LEN 10
+#define __lc_ctype_item_idx_LEN 20
+#define __CTYPE_HAS_UTF_8_LOCALES 1
+#define __LOCALE_DATA_CATEGORIES 6
+#define __LOCALE_DATA_WIDTH_LOCALES 9
+#define __LOCALE_DATA_NUM_LOCALES 315
+#define __LOCALE_DATA_NUM_LOCALE_NAMES 167
+#define __LOCALE_DATA_AT_MODIFIERS_LENGTH 18
+#define __lc_names_LEN 69
+#define __lc_collate_data_LEN 91141
+#define __CTYPE_HAS_8_BIT_LOCALES 1
+
+#define __LOCALE_DATA_Cctype_IDX_SHIFT 3
+#define __LOCALE_DATA_Cctype_IDX_LEN 16
+#define __LOCALE_DATA_Cctype_ROW_LEN 4
+#define __LOCALE_DATA_Cctype_PACKED 1
+
+#define __LOCALE_DATA_Cuplow_IDX_SHIFT 3
+#define __LOCALE_DATA_Cuplow_IDX_LEN 16
+#define __LOCALE_DATA_Cuplow_ROW_LEN 8
+
+#define __LOCALE_DATA_Cc2wc_IDX_LEN 16
+#define __LOCALE_DATA_Cc2wc_IDX_SHIFT 3
+#define __LOCALE_DATA_Cc2wc_ROW_LEN 8
+
+typedef struct {
+ unsigned char idx8ctype[16];
+ unsigned char idx8uplow[16];
+ unsigned char idx8c2wc[16];
+ unsigned char idx8wc2c[38];
+} __codeset_8_bit_t;
+
+
+#define __LOCALE_DATA_Cwc2c_DOMAIN_MAX 0x25ff
+#define __LOCALE_DATA_Cwc2c_TI_SHIFT 4
+#define __LOCALE_DATA_Cwc2c_TT_SHIFT 4
+#define __LOCALE_DATA_Cwc2c_II_LEN 38
+#define __LOCALE_DATA_Cwc2c_TI_LEN 1072
+#define __LOCALE_DATA_Cwc2c_TT_LEN 3456
+
+
+#define __LOCALE_DATA_Cwc2c_TBL_LEN 4528
+
+#define __LOCALE_DATA_Cuplow_TBL_LEN 504
+
+
+#define __LOCALE_DATA_Cctype_TBL_LEN 420
+
+
+#define __LOCALE_DATA_Cc2wc_TBL_LEN 1760
+
+
+
+#define __LOCALE_DATA_NUM_CODESETS 23
+#define __LOCALE_DATA_CODESET_LIST "\x18\x22\x31\x38\x3f\x4b\x56\x62" "\x6e\x7a\x86\x92\x9d\xa8\xb3\xbe" "\xc9\xd4\xdf\xea\xf1\xf8\xff" "\0" "ARMSCII-8\0" "ANSI_X3.4-1968\0" "CP1251\0" "CP1255\0" "GEORGIAN-PS\0" "ISO-8859-1\0" "ISO-8859-10\0" "ISO-8859-13\0" "ISO-8859-14\0" "ISO-8859-15\0" "ISO-8859-16\0" "ISO-8859-2\0" "ISO-8859-3\0" "ISO-8859-4\0" "ISO-8859-5\0" "ISO-8859-6\0" "ISO-8859-7\0" "ISO-8859-8\0" "ISO-8859-9\0" "KOI8-R\0" "KOI8-T\0" "KOI8-U\0" "TIS-620\0"
+# 102 "../../include/bits/uClibc_locale_data.h"
+#define __CTYPE_HAS_CODESET_ARMSCII_8
+#define __CTYPE_HAS_CODESET_ANSI_X3 .4_1968
+#define __CTYPE_HAS_CODESET_CP1251
+#define __CTYPE_HAS_CODESET_CP1255
+#define __CTYPE_HAS_CODESET_GEORGIAN_PS
+#define __CTYPE_HAS_CODESET_ISO_8859_1
+#define __CTYPE_HAS_CODESET_ISO_8859_10
+#define __CTYPE_HAS_CODESET_ISO_8859_13
+#define __CTYPE_HAS_CODESET_ISO_8859_14
+#define __CTYPE_HAS_CODESET_ISO_8859_15
+#define __CTYPE_HAS_CODESET_ISO_8859_16
+#define __CTYPE_HAS_CODESET_ISO_8859_2
+#define __CTYPE_HAS_CODESET_ISO_8859_3
+#define __CTYPE_HAS_CODESET_ISO_8859_4
+#define __CTYPE_HAS_CODESET_ISO_8859_5
+#define __CTYPE_HAS_CODESET_ISO_8859_6
+#define __CTYPE_HAS_CODESET_ISO_8859_7
+#define __CTYPE_HAS_CODESET_ISO_8859_8
+#define __CTYPE_HAS_CODESET_ISO_8859_9
+#define __CTYPE_HAS_CODESET_KOI8_R
+#define __CTYPE_HAS_CODESET_KOI8_T
+#define __CTYPE_HAS_CODESET_KOI8_U
+#define __CTYPE_HAS_CODESET_TIS_620
+#define __CTYPE_HAS_CODESET_UTF_8
+#define __LOCALE_DATA_WC_TABLE_DOMAIN_MAX 0x2ffff
+
+#define __LOCALE_DATA_WCctype_II_LEN 768
+#define __LOCALE_DATA_WCctype_TI_LEN 1888
+#define __LOCALE_DATA_WCctype_UT_LEN 948
+#define __LOCALE_DATA_WCctype_II_SHIFT 5
+#define __LOCALE_DATA_WCctype_TI_SHIFT 3
+
+
+#define __LOCALE_DATA_WCuplow_II_LEN 384
+#define __LOCALE_DATA_WCuplow_TI_LEN 576
+#define __LOCALE_DATA_WCuplow_UT_LEN 720
+#define __LOCALE_DATA_WCuplow_II_SHIFT 6
+#define __LOCALE_DATA_WCuplow_TI_SHIFT 3
+
+
+#define __LOCALE_DATA_WCuplow_diffs 98
+
+
+
+
+
+
+
+#define __WCHAR_ENABLED
+
+
+
+
+#define __LOCALE_DATA_WCctype_TBL_LEN (__LOCALE_DATA_WCctype_II_LEN + __LOCALE_DATA_WCctype_TI_LEN + __LOCALE_DATA_WCctype_UT_LEN)
+#define __LOCALE_DATA_WCuplow_TBL_LEN (__LOCALE_DATA_WCuplow_II_LEN + __LOCALE_DATA_WCuplow_TI_LEN + __LOCALE_DATA_WCuplow_UT_LEN)
+#define __LOCALE_DATA_WCuplow_diff_TBL_LEN (2 * __LOCALE_DATA_WCuplow_diffs)
+
+
+
+#undef __PASTE2
+#define __PASTE2(A,B) A ## B
+#undef __PASTE3
+#define __PASTE3(A,B,C) A ## B ## C
+
+#define __LOCALE_DATA_COMMON_MMAP(X) unsigned char __PASTE3(lc_,X,_data)[__PASTE3(__lc_,X,_data_LEN)];
+
+
+#define __LOCALE_DATA_COMMON_MMIDX(X) unsigned char __PASTE3(lc_,X,_rows)[__PASTE3(__lc_,X,_rows_LEN)]; uint16_t __PASTE3(lc_,X,_item_offsets)[__PASTE3(__lc_,X,_item_offsets_LEN)]; uint16_t __PASTE3(lc_,X,_item_idx)[__PASTE3(__lc_,X,_item_idx_LEN)];
+
+
+
+
+
+typedef struct {
+
+
+
+
+
+ const unsigned char tbl8ctype[420];
+ const unsigned char tbl8uplow[504];
+
+ const uint16_t tbl8c2wc[1760];
+ const unsigned char tbl8wc2c[4528];
+
+
+
+
+ const unsigned char tblwctype[(768 + 1888 + 948)];
+ const unsigned char tblwuplow[(384 + 576 + 720)];
+ const int16_t tblwuplow_diff[(2 * 98)];
+
+
+
+
+ unsigned char lc_ctype_data[51];;
+ unsigned char lc_numeric_data[22];;
+ unsigned char lc_monetary_data[1578];;
+ unsigned char lc_time_data[25900];;
+
+ unsigned char lc_messages_data[1583];;
+
+
+
+ const __codeset_8_bit_t codeset_8_bit[23];
+
+
+ unsigned char lc_ctype_rows[20]; uint16_t lc_ctype_item_offsets[10]; uint16_t lc_ctype_item_idx[20];;
+ unsigned char lc_numeric_rows[42]; uint16_t lc_numeric_item_offsets[3]; uint16_t lc_numeric_item_idx[13];;
+ unsigned char lc_monetary_rows[3652]; uint16_t lc_monetary_item_offsets[22]; uint16_t lc_monetary_item_idx[391];;
+ unsigned char lc_time_rows[7650]; uint16_t lc_time_item_offsets[50]; uint16_t lc_time_item_idx[3190];;
+
+ unsigned char lc_messages_rows[312]; uint16_t lc_messages_item_offsets[4]; uint16_t lc_messages_item_idx[170];;
+
+ const uint16_t collate_data[91141];
+
+ unsigned char lc_common_item_offsets_LEN[6];
+ size_t lc_common_tbl_offsets[6 * 4];
+
+
+
+
+ unsigned char locales[315 * 9];
+ unsigned char locale_names5[5*167];
+ unsigned char locale_at_modifiers[18];
+
+
+ unsigned char lc_names[69];
+
+ unsigned char codeset_list[sizeof("\x18\x22\x31\x38\x3f\x4b\x56\x62" "\x6e\x7a\x86\x92\x9d\xa8\xb3\xbe" "\xc9\xd4\xdf\xea\xf1\xf8\xff" "\0" "ARMSCII-8\0" "ANSI_X3.4-1968\0" "CP1251\0" "CP1255\0" "GEORGIAN-PS\0" "ISO-8859-1\0" "ISO-8859-10\0" "ISO-8859-13\0" "ISO-8859-14\0" "ISO-8859-15\0" "ISO-8859-16\0" "ISO-8859-2\0" "ISO-8859-3\0" "ISO-8859-4\0" "ISO-8859-5\0" "ISO-8859-6\0" "ISO-8859-7\0" "ISO-8859-8\0" "ISO-8859-9\0" "KOI8-R\0" "KOI8-T\0" "KOI8-U\0" "TIS-620\0")];
+
+
+
+} __locale_mmap_t;
+
+extern const __locale_mmap_t *__locale_mmap;
+# 75 "../../include/bits/uClibc_locale.h" 2
+
+
+
+
+
+
+enum {
+ __ctype_encoding_7_bit,
+ __ctype_encoding_utf8,
+ __ctype_encoding_8_bit
+};
+
+#define LOCALE_STRING_SIZE (2 * __LC_ALL + 2)
+# 102 "../../include/bits/uClibc_locale.h"
+typedef struct {
+ uint16_t num_weights;
+ uint16_t num_starters;
+ uint16_t ii_shift;
+ uint16_t ti_shift;
+ uint16_t ii_len;
+ uint16_t ti_len;
+ uint16_t max_weight;
+ uint16_t num_col_base;
+ uint16_t max_col_index;
+ uint16_t undefined_idx;
+ uint16_t range_low;
+ uint16_t range_count;
+ uint16_t range_base_weight;
+ uint16_t range_rule_offset;
+
+ uint16_t ii_mask;
+ uint16_t ti_mask;
+
+ const uint16_t *index2weight_tbl;
+ const uint16_t *index2ruleidx_tbl;
+ const uint16_t *multistart_tbl;
+
+
+ const uint16_t *wcs2colidt_tbl;
+
+
+ const uint16_t *overrides_tbl;
+
+
+ const uint16_t *weightstr;
+ const uint16_t *ruletable;
+
+
+ uint16_t *index2weight;
+ uint16_t *index2ruleidx;
+
+ uint16_t MAX_WEIGHTS;
+} __collate_t;
+
+
+
+
+typedef struct __uclibc_locale_struct {
+
+
+
+
+
+
+
+ __ctype_mask_t __ctype_b_data[256 + 128];
+ __ctype_touplow_t __ctype_tolower_data[256 + 128];
+ __ctype_touplow_t __ctype_toupper_data[256 + 128];
+
+
+
+ unsigned char cur_locale[(2 * 6 + 2)];
+
+
+
+
+
+ uint16_t category_offsets[6];
+ unsigned char category_item_count[6];
+
+
+ unsigned char encoding;
+ unsigned char mb_cur_max;
+ const unsigned char outdigit_length[10];
+
+
+ const unsigned char *idx8ctype;
+ const unsigned char *tbl8ctype;
+ const unsigned char *idx8uplow;
+ const unsigned char *tbl8uplow;
+
+ const unsigned char *idx8c2wc;
+ const uint16_t *tbl8c2wc;
+ const unsigned char *idx8wc2c;
+ const unsigned char *tbl8wc2c;
+
+
+
+
+
+ const uint16_t *code2flag;
+
+ const unsigned char *tblwctype;
+ const unsigned char *tblwuplow;
+
+ const int16_t *tblwuplow_diff;
+
+
+ wchar_t decimal_point_wc;
+ wchar_t thousands_sep_wc;
+ int decimal_point_len;
+ int thousands_sep_len;
+
+
+
+
+ const char *outdigit0_mb;
+ const char *outdigit1_mb;
+ const char *outdigit2_mb;
+ const char *outdigit3_mb;
+ const char *outdigit4_mb;
+ const char *outdigit5_mb;
+ const char *outdigit6_mb;
+ const char *outdigit7_mb;
+ const char *outdigit8_mb;
+ const char *outdigit9_mb;
+ const char *codeset;
+
+
+ const char *decimal_point;
+ const char *thousands_sep;
+ const char *grouping;
+
+
+ const char *int_curr_symbol;
+ const char *currency_symbol;
+ const char *mon_decimal_point;
+ const char *mon_thousands_sep;
+ const char *mon_grouping;
+ const char *positive_sign;
+ const char *negative_sign;
+ const char *int_frac_digits;
+ const char *frac_digits;
+ const char *p_cs_precedes;
+ const char *p_sep_by_space;
+ const char *n_cs_precedes;
+ const char *n_sep_by_space;
+ const char *p_sign_posn;
+ const char *n_sign_posn;
+ const char *int_p_cs_precedes;
+ const char *int_p_sep_by_space;
+ const char *int_n_cs_precedes;
+ const char *int_n_sep_by_space;
+ const char *int_p_sign_posn;
+ const char *int_n_sign_posn;
+
+ const char *crncystr;
+
+
+ const char *abday_1;
+ const char *abday_2;
+ const char *abday_3;
+ const char *abday_4;
+ const char *abday_5;
+ const char *abday_6;
+ const char *abday_7;
+
+ const char *day_1;
+ const char *day_2;
+ const char *day_3;
+ const char *day_4;
+ const char *day_5;
+ const char *day_6;
+ const char *day_7;
+
+ const char *abmon_1;
+ const char *abmon_2;
+ const char *abmon_3;
+ const char *abmon_4;
+ const char *abmon_5;
+ const char *abmon_6;
+ const char *abmon_7;
+ const char *abmon_8;
+ const char *abmon_9;
+ const char *abmon_10;
+ const char *abmon_11;
+ const char *abmon_12;
+
+ const char *mon_1;
+ const char *mon_2;
+ const char *mon_3;
+ const char *mon_4;
+ const char *mon_5;
+ const char *mon_6;
+ const char *mon_7;
+ const char *mon_8;
+ const char *mon_9;
+ const char *mon_10;
+ const char *mon_11;
+ const char *mon_12;
+
+ const char *am_str;
+ const char *pm_str;
+
+ const char *d_t_fmt;
+ const char *d_fmt;
+ const char *t_fmt;
+ const char *t_fmt_ampm;
+ const char *era;
+
+ const char *era_year;
+ const char *era_d_fmt;
+ const char *alt_digits;
+ const char *era_d_t_fmt;
+ const char *era_t_fmt;
+
+
+
+
+ const char *yesexpr;
+ const char *noexpr;
+ const char *yesstr;
+ const char *nostr;
+
+
+ __collate_t collate;
+
+} __uclibc_locale_t;
+
+extern __uclibc_locale_t __global_locale_data;
+extern struct __uclibc_locale_struct * __global_locale;
+
+
+typedef struct __uclibc_locale_struct *__locale_t;
+
+
+
+extern int __locale_mbrtowc_l(wchar_t *__restrict dst,
+ const char *__restrict src,
+ __locale_t loc ) __attribute__ ((visibility ("hidden")));
+# 355 "../../include/bits/uClibc_locale.h"
+#define __UCLIBC_CURLOCALE (__global_locale)
+#define __UCLIBC_CURLOCALE_DATA (*__global_locale)
+# 369 "../../include/bits/uClibc_locale.h"
+#define __XL_NPP(N) N
+#define __LOCALE_PARAM
+#define __LOCALE_ARG
+#define __LOCALE_PTR __UCLIBC_CURLOCALE
+# 31 "../../include/locale.h" 2
+
+
+
+
+
+#define LC_CTYPE __LC_CTYPE
+#define LC_NUMERIC __LC_NUMERIC
+#define LC_TIME __LC_TIME
+#define LC_COLLATE __LC_COLLATE
+#define LC_MONETARY __LC_MONETARY
+#define LC_MESSAGES __LC_MESSAGES
+# 50 "../../include/locale.h"
+#define LC_ALL __LC_ALL
+
+
+
+struct lconv
+{
+
+
+ char *decimal_point;
+ char *thousands_sep;
+
+
+
+
+
+ char *grouping;
+
+
+
+
+
+ char *int_curr_symbol;
+ char *currency_symbol;
+ char *mon_decimal_point;
+ char *mon_thousands_sep;
+ char *mon_grouping;
+ char *positive_sign;
+ char *negative_sign;
+ char int_frac_digits;
+ char frac_digits;
+
+ char p_cs_precedes;
+
+ char p_sep_by_space;
+
+ char n_cs_precedes;
+
+ char n_sep_by_space;
+
+
+
+
+
+
+ char p_sign_posn;
+ char n_sign_posn;
+
+
+ char int_p_cs_precedes;
+
+ char int_p_sep_by_space;
+
+ char int_n_cs_precedes;
+
+ char int_n_sep_by_space;
+
+
+
+
+
+
+ char int_p_sign_posn;
+ char int_n_sign_posn;
+# 121 "../../include/locale.h"
+};
+
+
+
+
+
+extern char *setlocale (int __category, __const char *__locale) __attribute__ ((__nothrow__));
+
+
+extern struct lconv *localeconv (void) __attribute__ ((__nothrow__));
+
+
+# 152 "../../include/locale.h"
+typedef __locale_t locale_t;
+
+
+
+
+
+extern __locale_t newlocale (int __category_mask, __const char *__locale,
+ __locale_t __base) __attribute__ ((__nothrow__));
+
+
+
+
+
+#define LC_CTYPE_MASK (1 << __LC_CTYPE)
+#define LC_NUMERIC_MASK (1 << __LC_NUMERIC)
+#define LC_TIME_MASK (1 << __LC_TIME)
+#define LC_COLLATE_MASK (1 << __LC_COLLATE)
+#define LC_MONETARY_MASK (1 << __LC_MONETARY)
+#define LC_MESSAGES_MASK (1 << __LC_MESSAGES)
+# 195 "../../include/locale.h"
+#define LC_ALL_MASK (LC_CTYPE_MASK | LC_NUMERIC_MASK | LC_TIME_MASK | LC_COLLATE_MASK | LC_MONETARY_MASK | LC_MESSAGES_MASK )
+# 206 "../../include/locale.h"
+extern __locale_t duplocale (__locale_t __dataset) __attribute__ ((__nothrow__));
+
+
+
+extern void freelocale (__locale_t __dataset) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern __locale_t uselocale (__locale_t __dataset) __attribute__ ((__nothrow__));
+
+
+
+#define LC_GLOBAL_LOCALE ((__locale_t) -1L)
+
+
+
+
+# 14 "tsp_common.c" 2
+# 1 "../../include/errno.h" 1
+# 28 "../../include/errno.h"
+#define _ERRNO_H 1
+
+
+
+
+
+
+
+# 1 "../../include/bits/errno.h" 1
+# 22 "../../include/bits/errno.h"
+# 1 "../../include/bits/errno_values.h" 1
+
+#define _BITS_ERRNO_VALUES_H
+# 12 "../../include/bits/errno_values.h"
+#define EPERM 1
+#define ENOENT 2
+#define ESRCH 3
+#define EINTR 4
+#define EIO 5
+#define ENXIO 6
+#define E2BIG 7
+#define ENOEXEC 8
+#define EBADF 9
+#define ECHILD 10
+#define EAGAIN 11
+#define ENOMEM 12
+#define EACCES 13
+#define EFAULT 14
+#define ENOTBLK 15
+#define EBUSY 16
+#define EEXIST 17
+#define EXDEV 18
+#define ENODEV 19
+#define ENOTDIR 20
+#define EISDIR 21
+#define EINVAL 22
+#define ENFILE 23
+#define EMFILE 24
+#define ENOTTY 25
+#define ETXTBSY 26
+#define EFBIG 27
+#define ENOSPC 28
+#define ESPIPE 29
+#define EROFS 30
+#define EMLINK 31
+#define EPIPE 32
+#define EDOM 33
+#define ERANGE 34
+#define EDEADLK 35
+#define ENAMETOOLONG 36
+#define ENOLCK 37
+#define ENOSYS 38
+#define ENOTEMPTY 39
+#define ELOOP 40
+#define EWOULDBLOCK EAGAIN
+#define ENOMSG 42
+#define EIDRM 43
+#define ECHRNG 44
+#define EL2NSYNC 45
+#define EL3HLT 46
+#define EL3RST 47
+#define ELNRNG 48
+#define EUNATCH 49
+#define ENOCSI 50
+#define EL2HLT 51
+#define EBADE 52
+#define EBADR 53
+#define EXFULL 54
+#define ENOANO 55
+#define EBADRQC 56
+#define EBADSLT 57
+#define EDEADLOCK EDEADLK
+#define EBFONT 59
+#define ENOSTR 60
+#define ENODATA 61
+#define ETIME 62
+#define ENOSR 63
+#define ENONET 64
+#define ENOPKG 65
+#define EREMOTE 66
+#define ENOLINK 67
+#define EADV 68
+#define ESRMNT 69
+#define ECOMM 70
+#define EPROTO 71
+#define EMULTIHOP 72
+#define EDOTDOT 73
+#define EBADMSG 74
+#define EOVERFLOW 75
+#define ENOTUNIQ 76
+#define EBADFD 77
+#define EREMCHG 78
+#define ELIBACC 79
+#define ELIBBAD 80
+#define ELIBSCN 81
+#define ELIBMAX 82
+#define ELIBEXEC 83
+#define EILSEQ 84
+#define ERESTART 85
+#define ESTRPIPE 86
+#define EUSERS 87
+#define ENOTSOCK 88
+#define EDESTADDRREQ 89
+#define EMSGSIZE 90
+#define EPROTOTYPE 91
+#define ENOPROTOOPT 92
+#define EPROTONOSUPPORT 93
+#define ESOCKTNOSUPPORT 94
+#define EOPNOTSUPP 95
+#define EPFNOSUPPORT 96
+#define EAFNOSUPPORT 97
+#define EADDRINUSE 98
+#define EADDRNOTAVAIL 99
+#define ENETDOWN 100
+#define ENETUNREACH 101
+#define ENETRESET 102
+#define ECONNABORTED 103
+#define ECONNRESET 104
+#define ENOBUFS 105
+#define EISCONN 106
+#define ENOTCONN 107
+#define ESHUTDOWN 108
+#define ETOOMANYREFS 109
+#define ETIMEDOUT 110
+#define ECONNREFUSED 111
+#define EHOSTDOWN 112
+#define EHOSTUNREACH 113
+#define EALREADY 114
+#define EINPROGRESS 115
+#define ESTALE 116
+#define EUCLEAN 117
+#define ENOTNAM 118
+#define ENAVAIL 119
+#define EISNAM 120
+#define EREMOTEIO 121
+#define EDQUOT 122
+#define ENOMEDIUM 123
+#define EMEDIUMTYPE 124
+# 23 "../../include/bits/errno.h" 2
+
+
+#define ENOTSUP EOPNOTSUPP
+
+
+
+#define ECANCELED 125
+
+
+
+
+
+extern int *__errno_location (void) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+
+#define errno (*__errno_location ())
+# 37 "../../include/errno.h" 2
+#undef __need_Emath
+# 59 "../../include/errno.h"
+
+
+
+
+#undef errno
+
+#define errno __libc_errno
+
+
+
+extern __thread int __libc_errno __attribute__ ((tls_model ("initial-exec")));
+
+
+
+
+#define __set_errno(val) (errno = (val))
+
+
+
+extern int *__errno_location (void) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+# 89 "../../include/errno.h"
+typedef int error_t;
+#define __error_t_defined 1
+
+#undef __need_error_t
+# 15 "tsp_common.c" 2
+# 1 "../../include/signal.h" 1
+# 26 "../../include/signal.h"
+#define _SIGNAL_H
+
+
+
+
+
+
+# 1 "../../include/bits/sigset.h" 1
+# 43 "../../include/bits/sigset.h"
+#define _SIGSET_H_fns 1
+
+
+#define _EXTERN_INLINE extern __inline
+
+
+
+#define __sigmask(sig) (((unsigned long int) 1) << (((sig) - 1) % (8 * sizeof (unsigned long int))))
+
+
+
+#define __sigword(sig) (((sig) - 1) / (8 * sizeof (unsigned long int)))
+
+
+#define __sigemptyset(set) (__extension__ ({ int __cnt = _SIGSET_NWORDS; sigset_t *__set = (set); while (--__cnt >= 0) __set->__val[__cnt] = 0; 0; }))
+
+
+
+
+#define __sigfillset(set) (__extension__ ({ int __cnt = _SIGSET_NWORDS; sigset_t *__set = (set); while (--__cnt >= 0) __set->__val[__cnt] = ~0UL; 0; }))
+# 72 "../../include/bits/sigset.h"
+#define __sigisemptyset(set) (__extension__ ({ int __cnt = _SIGSET_NWORDS; const sigset_t *__set = (set); int __ret = __set->__val[--__cnt]; while (!__ret && --__cnt >= 0) __ret = __set->__val[__cnt]; __ret == 0; }))
+
+
+
+
+
+
+#define __sigandset(dest,left,right) (__extension__ ({ int __cnt = _SIGSET_NWORDS; sigset_t *__dest = (dest); const sigset_t *__left = (left); const sigset_t *__right = (right); while (--__cnt >= 0) __dest->__val[__cnt] = (__left->__val[__cnt] & __right->__val[__cnt]); 0; }))
+# 88 "../../include/bits/sigset.h"
+#define __sigorset(dest,left,right) (__extension__ ({ int __cnt = _SIGSET_NWORDS; sigset_t *__dest = (dest); const sigset_t *__left = (left); const sigset_t *__right = (right); while (--__cnt >= 0) __dest->__val[__cnt] = (__left->__val[__cnt] | __right->__val[__cnt]); 0; }))
+# 103 "../../include/bits/sigset.h"
+extern int __sigismember (__const __sigset_t *, int);
+extern int __sigaddset (__sigset_t *, int);
+extern int __sigdelset (__sigset_t *, int);
+# 34 "../../include/signal.h" 2
+
+
+
+
+
+#define __sig_atomic_t_defined
+
+typedef __sig_atomic_t sig_atomic_t;
+
+
+#undef __need_sig_atomic_t
+
+
+
+
+
+
+
+#undef __need_sigset_t
+
+
+
+
+
+# 1 "../../include/bits/signum.h" 1
+# 23 "../../include/bits/signum.h"
+#define SIG_ERR ((__sighandler_t) -1)
+#define SIG_DFL ((__sighandler_t) 0)
+#define SIG_IGN ((__sighandler_t) 1)
+
+
+#define SIG_HOLD ((__sighandler_t) 2)
+
+
+
+
+#define SIGHUP 1
+#define SIGINT 2
+#define SIGQUIT 3
+#define SIGILL 4
+#define SIGTRAP 5
+#define SIGABRT 6
+#define SIGIOT 6
+#define SIGBUS 7
+#define SIGFPE 8
+#define SIGKILL 9
+#define SIGUSR1 10
+#define SIGSEGV 11
+#define SIGUSR2 12
+#define SIGPIPE 13
+#define SIGALRM 14
+#define SIGTERM 15
+#define SIGSTKFLT 16
+#define SIGCLD SIGCHLD
+#define SIGCHLD 17
+#define SIGCONT 18
+#define SIGSTOP 19
+#define SIGTSTP 20
+#define SIGTTIN 21
+#define SIGTTOU 22
+#define SIGURG 23
+#define SIGXCPU 24
+#define SIGXFSZ 25
+#define SIGVTALRM 26
+#define SIGPROF 27
+#define SIGWINCH 28
+#define SIGPOLL SIGIO
+#define SIGIO 29
+#define SIGPWR 30
+#define SIGSYS 31
+#define SIGUNUSED 31
+
+#define _NSIG 64
+
+
+#define SIGRTMIN (__libc_current_sigrtmin ())
+#define SIGRTMAX (__libc_current_sigrtmax ())
+
+
+
+#define __SIGRTMIN 32
+#define __SIGRTMAX (_NSIG - 1)
+# 59 "../../include/signal.h" 2
+# 75 "../../include/signal.h"
+typedef void (*__sighandler_t) (int);
+
+
+
+
+extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler)
+ __attribute__ ((__nothrow__));
+
+extern __sighandler_t sysv_signal (int __sig, __sighandler_t __handler)
+ __attribute__ ((__nothrow__));
+
+
+
+
+
+
+
+extern __sighandler_t signal (int __sig, __sighandler_t __handler)
+ __attribute__ ((__nothrow__));
+# 104 "../../include/signal.h"
+
+
+
+
+
+extern __sighandler_t bsd_signal (int __sig, __sighandler_t __handler)
+ __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern int kill (__pid_t __pid, int __sig) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern int killpg (__pid_t __pgrp, int __sig) __attribute__ ((__nothrow__));
+
+
+
+
+extern int raise (int __sig) __attribute__ ((__nothrow__));
+
+
+
+
+extern __sighandler_t ssignal (int __sig, __sighandler_t __handler)
+ __attribute__ ((__nothrow__));
+extern int gsignal (int __sig) __attribute__ ((__nothrow__));
+
+
+
+
+extern void psignal (int __sig, __const char *__s);
+# 153 "../../include/signal.h"
+extern int __sigpause (int __sig_or_mask, int __is_sig);
+# 163 "../../include/signal.h"
+#define sigpause(sig) __sigpause ((sig), 1)
+# 175 "../../include/signal.h"
+#define sigmask(sig) __sigmask(sig)
+
+
+extern int sigblock (int __mask) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__));
+
+
+extern int sigsetmask (int __mask) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__));
+
+
+extern int siggetmask (void) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__));
+
+
+
+
+#define NSIG _NSIG
+
+
+
+typedef __sighandler_t sighandler_t;
+
+
+
+
+typedef __sighandler_t sig_t;
+
+
+
+
+
+
+#define __need_timespec
+# 1 "../../include/time.h" 1
+# 68 "../../include/time.h"
+#undef __need_clock_t
+# 84 "../../include/time.h"
+#undef __need_time_t
+# 96 "../../include/time.h"
+#undef __clockid_time_t
+# 108 "../../include/time.h"
+#undef __need_timer_t
+# 128 "../../include/time.h"
+#undef __need_timespec
+# 207 "../../include/signal.h" 2
+
+
+# 1 "../../include/bits/siginfo.h" 1
+# 25 "../../include/bits/siginfo.h"
+# 1 "../../include/bits/wordsize.h" 1
+# 19 "../../include/bits/wordsize.h"
+#define __WORDSIZE 32
+# 26 "../../include/bits/siginfo.h" 2
+
+
+
+
+#define __have_sigval_t 1
+
+
+typedef union sigval
+ {
+ int sival_int;
+ void *sival_ptr;
+ } sigval_t;
+
+
+
+
+#define __have_siginfo_t 1
+
+#define __SI_MAX_SIZE 128
+
+
+
+#define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3)
+
+
+typedef struct siginfo
+ {
+ int si_signo;
+ int si_errno;
+
+ int si_code;
+
+ union
+ {
+ int _pad[((128 / sizeof (int)) - 3)];
+
+
+ struct
+ {
+ __pid_t si_pid;
+ __uid_t si_uid;
+ } _kill;
+
+
+ struct
+ {
+ unsigned int _timer1;
+ unsigned int _timer2;
+ } _timer;
+
+
+ struct
+ {
+ __pid_t si_pid;
+ __uid_t si_uid;
+ sigval_t si_sigval;
+ } _rt;
+
+
+ struct
+ {
+ __pid_t si_pid;
+ __uid_t si_uid;
+ int si_status;
+ __clock_t si_utime;
+ __clock_t si_stime;
+ } _sigchld;
+
+
+ struct
+ {
+ void *si_addr;
+ } _sigfault;
+
+
+ struct
+ {
+ long int si_band;
+ int si_fd;
+ } _sigpoll;
+ } _sifields;
+ } siginfo_t;
+
+
+
+#define si_pid _sifields._kill.si_pid
+#define si_uid _sifields._kill.si_uid
+#define si_timer1 _sifields._timer._timer1
+#define si_timer2 _sifields._timer._timer2
+#define si_status _sifields._sigchld.si_status
+#define si_utime _sifields._sigchld.si_utime
+#define si_stime _sifields._sigchld.si_stime
+#define si_value _sifields._rt.si_sigval
+#define si_int _sifields._rt.si_sigval.sival_int
+#define si_ptr _sifields._rt.si_sigval.sival_ptr
+#define si_addr _sifields._sigfault.si_addr
+#define si_band _sifields._sigpoll.si_band
+#define si_fd _sifields._sigpoll.si_fd
+
+
+
+
+enum
+{
+ SI_ASYNCNL = -60,
+#define SI_ASYNCNL SI_ASYNCNL
+ SI_TKILL = -6,
+#define SI_TKILL SI_TKILL
+ SI_SIGIO,
+#define SI_SIGIO SI_SIGIO
+ SI_ASYNCIO,
+#define SI_ASYNCIO SI_ASYNCIO
+ SI_MESGQ,
+#define SI_MESGQ SI_MESGQ
+ SI_TIMER,
+#define SI_TIMER SI_TIMER
+ SI_QUEUE,
+#define SI_QUEUE SI_QUEUE
+ SI_USER,
+#define SI_USER SI_USER
+ SI_KERNEL = 0x80
+#define SI_KERNEL SI_KERNEL
+};
+
+
+
+enum
+{
+ ILL_ILLOPC = 1,
+#define ILL_ILLOPC ILL_ILLOPC
+ ILL_ILLOPN,
+#define ILL_ILLOPN ILL_ILLOPN
+ ILL_ILLADR,
+#define ILL_ILLADR ILL_ILLADR
+ ILL_ILLTRP,
+#define ILL_ILLTRP ILL_ILLTRP
+ ILL_PRVOPC,
+#define ILL_PRVOPC ILL_PRVOPC
+ ILL_PRVREG,
+#define ILL_PRVREG ILL_PRVREG
+ ILL_COPROC,
+#define ILL_COPROC ILL_COPROC
+ ILL_BADSTK
+#define ILL_BADSTK ILL_BADSTK
+};
+
+
+enum
+{
+ FPE_INTDIV = 1,
+#define FPE_INTDIV FPE_INTDIV
+ FPE_INTOVF,
+#define FPE_INTOVF FPE_INTOVF
+ FPE_FLTDIV,
+#define FPE_FLTDIV FPE_FLTDIV
+ FPE_FLTOVF,
+#define FPE_FLTOVF FPE_FLTOVF
+ FPE_FLTUND,
+#define FPE_FLTUND FPE_FLTUND
+ FPE_FLTRES,
+#define FPE_FLTRES FPE_FLTRES
+ FPE_FLTINV,
+#define FPE_FLTINV FPE_FLTINV
+ FPE_FLTSUB
+#define FPE_FLTSUB FPE_FLTSUB
+};
+
+
+enum
+{
+ SEGV_MAPERR = 1,
+#define SEGV_MAPERR SEGV_MAPERR
+ SEGV_ACCERR
+#define SEGV_ACCERR SEGV_ACCERR
+};
+
+
+enum
+{
+ BUS_ADRALN = 1,
+#define BUS_ADRALN BUS_ADRALN
+ BUS_ADRERR,
+#define BUS_ADRERR BUS_ADRERR
+ BUS_OBJERR
+#define BUS_OBJERR BUS_OBJERR
+};
+
+
+enum
+{
+ TRAP_BRKPT = 1,
+#define TRAP_BRKPT TRAP_BRKPT
+ TRAP_TRACE
+#define TRAP_TRACE TRAP_TRACE
+};
+
+
+enum
+{
+ CLD_EXITED = 1,
+#define CLD_EXITED CLD_EXITED
+ CLD_KILLED,
+#define CLD_KILLED CLD_KILLED
+ CLD_DUMPED,
+#define CLD_DUMPED CLD_DUMPED
+ CLD_TRAPPED,
+#define CLD_TRAPPED CLD_TRAPPED
+ CLD_STOPPED,
+#define CLD_STOPPED CLD_STOPPED
+ CLD_CONTINUED
+#define CLD_CONTINUED CLD_CONTINUED
+};
+
+
+enum
+{
+ POLL_IN = 1,
+#define POLL_IN POLL_IN
+ POLL_OUT,
+#define POLL_OUT POLL_OUT
+ POLL_MSG,
+#define POLL_MSG POLL_MSG
+ POLL_ERR,
+#define POLL_ERR POLL_ERR
+ POLL_PRI,
+#define POLL_PRI POLL_PRI
+ POLL_HUP
+#define POLL_HUP POLL_HUP
+};
+
+#undef __need_siginfo_t
+
+
+
+
+
+#define __have_sigevent_t 1
+
+
+#define __SIGEV_MAX_SIZE 64
+
+
+
+#define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3)
+
+
+
+struct __pthread_attr_s;
+
+typedef struct sigevent
+ {
+ sigval_t sigev_value;
+ int sigev_signo;
+ int sigev_notify;
+
+ union
+ {
+ int _pad[((64 / sizeof (int)) - 3)];
+
+ struct
+ {
+ void (*_function) (sigval_t);
+ struct __pthread_attr_s *_attribute;
+ } _sigev_thread;
+ } _sigev_un;
+ } sigevent_t;
+
+
+#define sigev_notify_function _sigev_un._sigev_thread._function
+#define sigev_notify_attributes _sigev_un._sigev_thread._attribute
+
+
+enum
+{
+ SIGEV_SIGNAL = 0,
+#define SIGEV_SIGNAL SIGEV_SIGNAL
+ SIGEV_NONE,
+#define SIGEV_NONE SIGEV_NONE
+ SIGEV_THREAD,
+#define SIGEV_THREAD SIGEV_THREAD
+
+ SIGEV_THREAD_ID = 4
+#define SIGEV_THREAD_ID SIGEV_THREAD_ID
+};
+# 210 "../../include/signal.h" 2
+
+
+
+extern int sigemptyset (sigset_t *__set) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int sigfillset (sigset_t *__set) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int sigaddset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int sigdelset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int sigismember (__const sigset_t *__set, int __signo)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+extern int sigisemptyset (__const sigset_t *__set) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int sigandset (sigset_t *__set, __const sigset_t *__left,
+ __const sigset_t *__right) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2, 3)));
+
+
+extern int sigorset (sigset_t *__set, __const sigset_t *__left,
+ __const sigset_t *__right) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2, 3)));
+
+
+
+
+# 1 "../../include/bits/sigaction.h" 1
+# 25 "../../include/bits/sigaction.h"
+struct sigaction
+ {
+
+
+ union
+ {
+
+ __sighandler_t sa_handler;
+
+ void (*sa_sigaction) (int, siginfo_t *, void *);
+ }
+ __sigaction_handler;
+#define sa_handler __sigaction_handler.sa_handler
+#define sa_sigaction __sigaction_handler.sa_sigaction
+
+
+
+
+
+ __sigset_t sa_mask;
+
+
+ int sa_flags;
+
+
+ void (*sa_restorer) (void);
+ };
+
+
+#define SA_NOCLDSTOP 1
+#define SA_NOCLDWAIT 2
+#define SA_SIGINFO 4
+
+
+#define SA_ONSTACK 0x08000000
+#define SA_RESTART 0x10000000
+#define SA_NODEFER 0x40000000
+
+#define SA_RESETHAND 0x80000000
+
+
+#define SA_INTERRUPT 0x20000000
+
+
+#define SA_NOMASK SA_NODEFER
+#define SA_ONESHOT SA_RESETHAND
+#define SA_STACK SA_ONSTACK
+
+
+
+#define SIG_BLOCK 0
+#define SIG_UNBLOCK 1
+#define SIG_SETMASK 2
+# 244 "../../include/signal.h" 2
+
+
+extern int sigprocmask (int __how, __const sigset_t *__restrict __set,
+ sigset_t *__restrict __oset) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern int sigsuspend (__const sigset_t *__set) __attribute__ ((__nonnull__ (1)));
+
+
+extern int sigaction (int __sig, __const struct sigaction *__restrict __act,
+ struct sigaction *__restrict __oact) __attribute__ ((__nothrow__));
+
+
+extern int sigpending (sigset_t *__set) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+
+extern int sigwait (__const sigset_t *__restrict __set, int *__restrict __sig)
+ __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+
+
+
+extern int sigwaitinfo (__const sigset_t *__restrict __set,
+ siginfo_t *__restrict __info) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+
+extern int sigtimedwait (__const sigset_t *__restrict __set,
+ siginfo_t *__restrict __info,
+ __const struct timespec *__restrict __timeout)
+ __attribute__ ((__nonnull__ (1)));
+
+
+
+extern int sigqueue (__pid_t __pid, int __sig, __const union sigval __val)
+ __attribute__ ((__nothrow__));
+# 307 "../../include/signal.h"
+struct sigvec
+ {
+ __sighandler_t sv_handler;
+ int sv_mask;
+
+ int sv_flags;
+#define sv_onstack sv_flags
+ };
+
+
+#define SV_ONSTACK (1 << 0)
+#define SV_INTERRUPT (1 << 1)
+#define SV_RESETHAND (1 << 2)
+
+
+
+
+
+
+
+extern int sigvec (int __sig, __const struct sigvec *__vec,
+ struct sigvec *__ovec) __attribute__ ((__nothrow__));
+
+
+
+# 1 "../../include/bits/sigcontext.h" 1
+# 26 "../../include/bits/sigcontext.h"
+#define sigcontext_struct sigcontext
+
+# 1 "/opt/STM/STLinux-2.3ear/devkit/sh4/uclibc_target/usr/include/asm/sigcontext.h" 1
+
+#define __ASM_SH_SIGCONTEXT_H
+
+struct sigcontext {
+ unsigned long oldmask;
+
+
+ unsigned long sc_regs[16];
+ unsigned long sc_pc;
+ unsigned long sc_pr;
+ unsigned long sc_sr;
+ unsigned long sc_gbr;
+ unsigned long sc_mach;
+ unsigned long sc_macl;
+
+
+
+ unsigned long sc_fpregs[16];
+ unsigned long sc_xfpregs[16];
+ unsigned int sc_fpscr;
+ unsigned int sc_fpul;
+ unsigned int sc_ownedfp;
+
+};
+# 29 "../../include/bits/sigcontext.h" 2
+# 333 "../../include/signal.h" 2
+
+
+extern int sigreturn (struct sigcontext *__scp) __attribute__ ((__nothrow__));
+# 345 "../../include/signal.h"
+extern int siginterrupt (int __sig, int __interrupt) __attribute__ ((__nothrow__));
+
+# 1 "../../include/bits/sigstack.h" 1
+# 26 "../../include/bits/sigstack.h"
+struct sigstack
+ {
+ void *ss_sp;
+ int ss_onstack;
+ };
+
+
+
+enum
+{
+ SS_ONSTACK = 1,
+#define SS_ONSTACK SS_ONSTACK
+ SS_DISABLE
+#define SS_DISABLE SS_DISABLE
+};
+
+
+#define MINSIGSTKSZ 2048
+
+
+#define SIGSTKSZ 8192
+
+
+
+typedef struct sigaltstack
+ {
+ void *ss_sp;
+ int ss_flags;
+ size_t ss_size;
+ } stack_t;
+# 348 "../../include/signal.h" 2
+
+
+# 1 "../../include/ucontext.h" 1
+# 20 "../../include/ucontext.h"
+#define _UCONTEXT_H 1
+
+
+
+
+# 1 "../../include/sys/ucontext.h" 1
+# 22 "../../include/sys/ucontext.h"
+#define _SYS_UCONTEXT_H 1
+
+
+# 1 "../../include/signal.h" 1
+# 26 "../../include/sys/ucontext.h" 2
+
+
+
+# 1 "../../include/bits/sigcontext.h" 1
+# 30 "../../include/sys/ucontext.h" 2
+
+
+typedef int greg_t;
+
+
+#define NFPREG 16
+
+
+typedef greg_t gregset_t[16];
+
+
+
+enum
+{
+ R0 = 0,
+#define R0 R0
+ R1 = 1,
+#define R1 R1
+ R2 = 2,
+#define R2 R2
+ R3 = 3,
+#define R3 R3
+ R4 = 4,
+#define R4 R4
+ R5 = 5,
+#define R5 R5
+ R6 = 6,
+#define R6 R6
+ R7 = 7,
+#define R7 R7
+ R8 = 8,
+#define R8 R8
+ R9 = 9,
+#define R9 R9
+ R10 = 10,
+#define R10 R10
+ R11 = 11,
+#define R11 R11
+ R12 = 12,
+#define R12 R12
+ R13 = 13,
+#define R13 R13
+ R14 = 14,
+#define R14 R14
+ R15 = 15,
+#define R15 R15
+};
+
+
+typedef int freg_t;
+
+
+#define NFPREG 16
+
+
+typedef freg_t fpregset_t[16];
+
+
+typedef struct
+ {
+ unsigned int oldmask;
+
+
+ gregset_t gregs;
+ unsigned int pc;
+ unsigned int pr;
+ unsigned int sr;
+ unsigned int gbr;
+ unsigned int mach;
+ unsigned int macl;
+
+
+
+ fpregset_t fpregs;
+ fpregset_t xfpregs;
+ unsigned int fpscr;
+ unsigned int fpul;
+ unsigned int ownedfp;
+
+ } mcontext_t;
+
+
+typedef struct ucontext
+ {
+ unsigned long int uc_flags;
+ struct ucontext *uc_link;
+ stack_t uc_stack;
+ mcontext_t uc_mcontext;
+ __sigset_t uc_sigmask;
+ } ucontext_t;
+# 26 "../../include/ucontext.h" 2
+# 351 "../../include/signal.h" 2
+
+
+
+
+
+extern int sigstack (struct sigstack *__ss, struct sigstack *__oss)
+ __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__));
+
+
+
+extern int sigaltstack (__const struct sigaltstack *__restrict __ss,
+ struct sigaltstack *__restrict __oss) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+
+extern int sighold (int __sig) __attribute__ ((__nothrow__));
+
+
+extern int sigrelse (int __sig) __attribute__ ((__nothrow__));
+
+
+extern int sigignore (int __sig) __attribute__ ((__nothrow__));
+
+
+extern __sighandler_t sigset (int __sig, __sighandler_t __disp) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+# 1 "../../include/bits/sigthread.h" 1
+# 21 "../../include/bits/sigthread.h"
+#define _BITS_SIGTHREAD_H 1
+# 31 "../../include/bits/sigthread.h"
+extern int pthread_sigmask (int __how,
+ __const __sigset_t *__restrict __newmask,
+ __sigset_t *__restrict __oldmask)__attribute__ ((__nothrow__));
+
+
+extern int pthread_kill (pthread_t __thread_id, int __signo) __attribute__ ((__nothrow__));
+# 387 "../../include/signal.h" 2
+
+
+
+
+
+
+extern int __libc_current_sigrtmin (void) __attribute__ ((__nothrow__));
+
+extern int __libc_current_sigrtmax (void) __attribute__ ((__nothrow__));
+
+
+
+
+# 16 "tsp_common.c" 2
+
+# 1 "tst_types.h" 1
+# 11 "tst_types.h"
+#define TST_TYPES_H
+
+
+# 1 "../../include/wchar.h" 1
+# 27 "../../include/wchar.h"
+#define _WCHAR_H 1
+# 37 "../../include/wchar.h"
+#define __need___FILE
+
+#define __need_FILE
+
+
+
+#define __need___va_list
+# 1 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stdarg.h" 1 3 4
+# 37 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stdarg.h" 3 4
+#undef __need___va_list
+# 45 "../../include/wchar.h" 2
+
+
+#define __need_size_t
+#define __need_wchar_t
+#define __need_NULL
+
+#define __need_wint_t
+# 1 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 1 3 4
+# 163 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 3 4
+#undef __need_ptrdiff_t
+# 236 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 3 4
+#undef __need_size_t
+# 345 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 3 4
+#undef __need_wchar_t
+# 357 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 3 4
+#undef __need_wint_t
+# 398 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 3 4
+#undef NULL
+
+
+
+
+#define NULL ((void *)0)
+
+
+
+
+
+#undef __need_NULL
+
+
+
+
+#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
+# 53 "../../include/wchar.h" 2
+# 98 "../../include/wchar.h"
+#undef __need_mbstate_t
+
+
+
+
+
+
+
+
+typedef __mbstate_t mbstate_t;
+
+
+
+# 120 "../../include/wchar.h"
+#define WEOF (0xffffffffu)
+# 130 "../../include/wchar.h"
+
+
+
+
+
+struct tm;
+
+
+
+
+
+
+
+
+
+extern wchar_t *wcscpy (wchar_t *__restrict __dest,
+ __const wchar_t *__restrict __src) __attribute__ ((__nothrow__));
+
+extern wchar_t *wcsncpy (wchar_t *__restrict __dest,
+ __const wchar_t *__restrict __src, size_t __n)
+ __attribute__ ((__nothrow__));
+
+
+extern wchar_t *wcscat (wchar_t *__restrict __dest,
+ __const wchar_t *__restrict __src) __attribute__ ((__nothrow__));
+
+extern wchar_t *wcsncat (wchar_t *__restrict __dest,
+ __const wchar_t *__restrict __src, size_t __n)
+ __attribute__ ((__nothrow__));
+
+
+extern int wcscmp (__const wchar_t *__s1, __const wchar_t *__s2)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__));
+
+extern int wcsncmp (__const wchar_t *__s1, __const wchar_t *__s2, size_t __n)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__));
+
+
+
+
+extern int wcscasecmp (__const wchar_t *__s1, __const wchar_t *__s2) __attribute__ ((__nothrow__));
+
+
+extern int wcsncasecmp (__const wchar_t *__s1, __const wchar_t *__s2,
+ size_t __n) __attribute__ ((__nothrow__));
+# 189 "../../include/wchar.h"
+
+
+
+extern int wcscoll (__const wchar_t *__s1, __const wchar_t *__s2) __attribute__ ((__nothrow__));
+
+
+
+extern size_t wcsxfrm (wchar_t *__restrict __s1,
+ __const wchar_t *__restrict __s2, size_t __n) __attribute__ ((__nothrow__));
+
+# 219 "../../include/wchar.h"
+extern wchar_t *wcsdup (__const wchar_t *__s) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__));
+
+
+
+
+extern wchar_t *wcschr (__const wchar_t *__wcs, wchar_t __wc)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__));
+
+extern wchar_t *wcsrchr (__const wchar_t *__wcs, wchar_t __wc)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__));
+
+
+
+
+
+extern wchar_t *wcschrnul (__const wchar_t *__s, wchar_t __wc)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__));
+
+
+
+
+
+extern size_t wcscspn (__const wchar_t *__wcs, __const wchar_t *__reject)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__));
+
+
+extern size_t wcsspn (__const wchar_t *__wcs, __const wchar_t *__accept)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__));
+
+extern wchar_t *wcspbrk (__const wchar_t *__wcs, __const wchar_t *__accept)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__));
+
+extern wchar_t *wcsstr (__const wchar_t *__haystack, __const wchar_t *__needle)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__));
+
+
+extern wchar_t *wcstok (wchar_t *__restrict __s,
+ __const wchar_t *__restrict __delim,
+ wchar_t **__restrict __ptr) __attribute__ ((__nothrow__));
+
+
+extern size_t wcslen (__const wchar_t *__s) __attribute__ ((__nothrow__)) __attribute__ ((__pure__));
+
+
+
+
+extern wchar_t *wcswcs (__const wchar_t *__haystack, __const wchar_t *__needle)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__));
+
+
+
+
+extern size_t wcsnlen (__const wchar_t *__s, size_t __maxlen)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__));
+
+
+
+
+
+extern wchar_t *wmemchr (__const wchar_t *__s, wchar_t __c, size_t __n)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__));
+
+
+extern int wmemcmp (__const wchar_t *__restrict __s1,
+ __const wchar_t *__restrict __s2, size_t __n)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__));
+
+
+extern wchar_t *wmemcpy (wchar_t *__restrict __s1,
+ __const wchar_t *__restrict __s2, size_t __n) __attribute__ ((__nothrow__));
+
+
+
+extern wchar_t *wmemmove (wchar_t *__s1, __const wchar_t *__s2, size_t __n)
+ __attribute__ ((__nothrow__));
+
+
+extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __attribute__ ((__nothrow__));
+
+
+
+
+
+extern wchar_t *wmempcpy (wchar_t *__restrict __s1,
+ __const wchar_t *__restrict __s2, size_t __n)
+ __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern wint_t btowc (int __c) __attribute__ ((__nothrow__));
+
+
+
+extern int wctob (wint_t __c) __attribute__ ((__nothrow__));
+
+
+
+extern int mbsinit (__const mbstate_t *__ps) __attribute__ ((__nothrow__)) __attribute__ ((__pure__));
+
+
+
+extern size_t mbrtowc (wchar_t *__restrict __pwc,
+ __const char *__restrict __s, size_t __n,
+ mbstate_t *__p) __attribute__ ((__nothrow__));
+
+
+extern size_t wcrtomb (char *__restrict __s, wchar_t __wc,
+ mbstate_t *__restrict __ps) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern size_t mbrlen (__const char *__restrict __s, size_t __n,
+ mbstate_t *__restrict __ps) __attribute__ ((__nothrow__));
+
+
+
+extern size_t mbsrtowcs (wchar_t *__restrict __dst,
+ __const char **__restrict __src, size_t __len,
+ mbstate_t *__restrict __ps) __attribute__ ((__nothrow__));
+
+
+
+extern size_t wcsrtombs (char *__restrict __dst,
+ __const wchar_t **__restrict __src, size_t __len,
+ mbstate_t *__restrict __ps) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern size_t mbsnrtowcs (wchar_t *__restrict __dst,
+ __const char **__restrict __src, size_t __nmc,
+ size_t __len, mbstate_t *__restrict __ps) __attribute__ ((__nothrow__));
+
+
+
+extern size_t wcsnrtombs (char *__restrict __dst,
+ __const wchar_t **__restrict __src,
+ size_t __nwc, size_t __len,
+ mbstate_t *__restrict __ps) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern int wcwidth (wchar_t __c) __attribute__ ((__nothrow__));
+
+
+
+extern int wcswidth (__const wchar_t *__s, size_t __n) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+
+extern double wcstod (__const wchar_t *__restrict __nptr,
+ wchar_t **__restrict __endptr) __attribute__ ((__nothrow__));
+
+
+
+extern float wcstof (__const wchar_t *__restrict __nptr,
+ wchar_t **__restrict __endptr) __attribute__ ((__nothrow__));
+extern long double wcstold (__const wchar_t *__restrict __nptr,
+ wchar_t **__restrict __endptr) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern long int wcstol (__const wchar_t *__restrict __nptr,
+ wchar_t **__restrict __endptr, int __base) __attribute__ ((__nothrow__));
+
+
+
+extern unsigned long int wcstoul (__const wchar_t *__restrict __nptr,
+ wchar_t **__restrict __endptr, int __base)
+ __attribute__ ((__nothrow__));
+
+
+
+
+__extension__
+extern long long int wcstoll (__const wchar_t *__restrict __nptr,
+ wchar_t **__restrict __endptr, int __base)
+ __attribute__ ((__nothrow__));
+
+
+
+__extension__
+extern unsigned long long int wcstoull (__const wchar_t *__restrict __nptr,
+ wchar_t **__restrict __endptr,
+ int __base) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+__extension__
+extern long long int wcstoq (__const wchar_t *__restrict __nptr,
+ wchar_t **__restrict __endptr, int __base)
+ __attribute__ ((__nothrow__));
+
+
+
+__extension__
+extern unsigned long long int wcstouq (__const wchar_t *__restrict __nptr,
+ wchar_t **__restrict __endptr,
+ int __base) __attribute__ ((__nothrow__));
+# 499 "../../include/wchar.h"
+extern wchar_t *wcpcpy (wchar_t *__dest, __const wchar_t *__src) __attribute__ ((__nothrow__));
+
+
+
+extern wchar_t *wcpncpy (wchar_t *__dest, __const wchar_t *__src, size_t __n)
+ __attribute__ ((__nothrow__));
+
+
+
+
+
+
+
+
+extern int fwide (__FILE *__fp, int __mode) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern int fwprintf (__FILE *__restrict __stream,
+ __const wchar_t *__restrict __format, ...)
+ ;
+
+
+
+
+extern int wprintf (__const wchar_t *__restrict __format, ...)
+ ;
+
+extern int swprintf (wchar_t *__restrict __s, size_t __n,
+ __const wchar_t *__restrict __format, ...)
+ __attribute__ ((__nothrow__)) ;
+
+
+
+
+
+extern int vfwprintf (__FILE *__restrict __s,
+ __const wchar_t *__restrict __format,
+ __gnuc_va_list __arg)
+ ;
+
+
+
+
+extern int vwprintf (__const wchar_t *__restrict __format,
+ __gnuc_va_list __arg)
+ ;
+
+
+extern int vswprintf (wchar_t *__restrict __s, size_t __n,
+ __const wchar_t *__restrict __format,
+ __gnuc_va_list __arg)
+ __attribute__ ((__nothrow__)) ;
+
+
+
+
+
+
+extern int fwscanf (__FILE *__restrict __stream,
+ __const wchar_t *__restrict __format, ...)
+ ;
+
+
+
+
+extern int wscanf (__const wchar_t *__restrict __format, ...)
+ ;
+
+extern int swscanf (__const wchar_t *__restrict __s,
+ __const wchar_t *__restrict __format, ...)
+ __attribute__ ((__nothrow__)) ;
+
+
+
+
+
+
+
+
+
+
+
+extern int vfwscanf (__FILE *__restrict __s,
+ __const wchar_t *__restrict __format,
+ __gnuc_va_list __arg)
+ ;
+
+
+
+
+extern int vwscanf (__const wchar_t *__restrict __format,
+ __gnuc_va_list __arg)
+ ;
+
+extern int vswscanf (__const wchar_t *__restrict __s,
+ __const wchar_t *__restrict __format,
+ __gnuc_va_list __arg)
+ __attribute__ ((__nothrow__)) ;
+
+
+
+
+
+
+
+
+
+
+extern wint_t fgetwc (__FILE *__stream);
+extern wint_t getwc (__FILE *__stream);
+
+
+
+
+
+extern wint_t getwchar (void);
+
+
+
+
+
+
+extern wint_t fputwc (wchar_t __wc, __FILE *__stream);
+extern wint_t putwc (wchar_t __wc, __FILE *__stream);
+
+
+
+
+
+extern wint_t putwchar (wchar_t __wc);
+
+
+
+
+
+
+
+extern wchar_t *fgetws (wchar_t *__restrict __ws, int __n,
+ __FILE *__restrict __stream);
+
+
+
+
+
+extern int fputws (__const wchar_t *__restrict __ws,
+ __FILE *__restrict __stream);
+
+
+
+
+
+
+extern wint_t ungetwc (wint_t __wc, __FILE *__stream);
+
+# 667 "../../include/wchar.h"
+extern wint_t getwc_unlocked (__FILE *__stream);
+extern wint_t getwchar_unlocked (void);
+
+
+
+
+
+
+
+extern wint_t fgetwc_unlocked (__FILE *__stream);
+
+
+
+
+
+
+
+extern wint_t fputwc_unlocked (wchar_t __wc, __FILE *__stream);
+# 693 "../../include/wchar.h"
+extern wint_t putwc_unlocked (wchar_t __wc, __FILE *__stream);
+extern wint_t putwchar_unlocked (wchar_t __wc);
+# 703 "../../include/wchar.h"
+extern wchar_t *fgetws_unlocked (wchar_t *__restrict __ws, int __n,
+ __FILE *__restrict __stream);
+
+
+
+
+
+
+
+extern int fputws_unlocked (__const wchar_t *__restrict __ws,
+ __FILE *__restrict __stream);
+
+
+
+
+
+
+
+extern size_t wcsftime (wchar_t *__restrict __s, size_t __maxsize,
+ __const wchar_t *__restrict __format,
+ __const struct tm *__restrict __tp) __attribute__ ((__nothrow__));
+
+# 748 "../../include/wchar.h"
+
+# 15 "tst_types.h" 2
+# 1 "../../include/wctype.h" 1
+# 34 "../../include/wctype.h"
+#define _WCTYPE_H 1
+
+
+
+#define __need_wint_t
+# 1 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 1 3 4
+# 163 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 3 4
+#undef __need_ptrdiff_t
+# 236 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 3 4
+#undef __need_size_t
+# 345 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 3 4
+#undef __need_wchar_t
+# 357 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 3 4
+#undef __need_wint_t
+# 398 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h" 3 4
+#undef NULL
+
+
+
+
+#define NULL ((void *)0)
+
+
+
+
+
+#undef __need_NULL
+
+
+
+
+#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
+# 40 "../../include/wctype.h" 2
+# 49 "../../include/wctype.h"
+
+# 59 "../../include/wctype.h"
+#undef __need_iswxxx
+
+
+
+
+
+#define __iswxxx_defined 1
+
+
+
+
+
+typedef unsigned int wctype_t;
+
+
+
+#define _ISwbit(bit) (1 << (bit))
+
+enum
+{
+ __ISwupper = 0,
+ __ISwlower = 1,
+ __ISwalpha = 2,
+ __ISwdigit = 3,
+ __ISwxdigit = 4,
+ __ISwspace = 5,
+ __ISwprint = 6,
+ __ISwgraph = 7,
+ __ISwblank = 8,
+ __ISwcntrl = 9,
+ __ISwpunct = 10,
+ __ISwalnum = 11,
+
+ _ISwupper = (1 << (__ISwupper)),
+ _ISwlower = (1 << (__ISwlower)),
+ _ISwalpha = (1 << (__ISwalpha)),
+ _ISwdigit = (1 << (__ISwdigit)),
+ _ISwxdigit = (1 << (__ISwxdigit)),
+ _ISwspace = (1 << (__ISwspace)),
+ _ISwprint = (1 << (__ISwprint)),
+ _ISwgraph = (1 << (__ISwgraph)),
+ _ISwblank = (1 << (__ISwblank)),
+ _ISwcntrl = (1 << (__ISwcntrl)),
+ _ISwpunct = (1 << (__ISwpunct)),
+ _ISwalnum = (1 << (__ISwalnum))
+};
+# 113 "../../include/wctype.h"
+
+
+
+
+
+
+
+
+
+extern int iswalnum (wint_t __wc) __attribute__ ((__nothrow__));
+
+
+
+
+
+extern int iswalpha (wint_t __wc) __attribute__ ((__nothrow__));
+
+
+extern int iswcntrl (wint_t __wc) __attribute__ ((__nothrow__));
+
+
+
+extern int iswdigit (wint_t __wc) __attribute__ ((__nothrow__));
+
+
+
+extern int iswgraph (wint_t __wc) __attribute__ ((__nothrow__));
+
+
+
+
+extern int iswlower (wint_t __wc) __attribute__ ((__nothrow__));
+
+
+extern int iswprint (wint_t __wc) __attribute__ ((__nothrow__));
+
+
+
+
+extern int iswpunct (wint_t __wc) __attribute__ ((__nothrow__));
+
+
+
+
+extern int iswspace (wint_t __wc) __attribute__ ((__nothrow__));
+
+
+
+
+extern int iswupper (wint_t __wc) __attribute__ ((__nothrow__));
+
+
+
+
+extern int iswxdigit (wint_t __wc) __attribute__ ((__nothrow__));
+
+
+
+
+
+extern int iswblank (wint_t __wc) __attribute__ ((__nothrow__));
+# 182 "../../include/wctype.h"
+extern wctype_t wctype (__const char *__property) __attribute__ ((__nothrow__));
+
+
+
+extern int iswctype (wint_t __wc, wctype_t __desc) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+
+
+
+
+
+typedef unsigned int wctrans_t;
+
+
+
+
+
+
+
+extern wint_t towlower (wint_t __wc) __attribute__ ((__nothrow__));
+
+
+extern wint_t towupper (wint_t __wc) __attribute__ ((__nothrow__));
+
+
+
+# 225 "../../include/wctype.h"
+
+
+
+
+
+extern wctrans_t wctrans (__const char *__property) __attribute__ ((__nothrow__));
+
+
+extern wint_t towctrans (wint_t __wc, wctrans_t __desc) __attribute__ ((__nothrow__));
+
+# 326 "../../include/wctype.h"
+
+# 16 "tst_types.h" 2
+# 1 "tst_funcs.h" 1
+# 11 "tst_funcs.h"
+#define TST_FUNCS_H
+
+#define C_SUCCESS 'S'
+#define C_FAILURE 'F'
+#define C_IGNORED 'I'
+#define C_INVALID 'D'
+#define C_LOCALES 'L'
+
+
+extern int result (FILE * fp, char res, const char *func, const char *loc,
+ int rec_no, int seq_num, int case_no, const char *msg);
+
+#define Result(C,S,E,M) result (fp, (C), (S), locale, rec+1, seq_num+1, (E), (M))
+
+
+#define CASE_0 0
+#define CASE_1 1
+#define CASE_2 2
+#define CASE_3 3
+#define CASE_4 4
+#define CASE_5 5
+#define CASE_6 6
+#define CASE_7 7
+#define CASE_8 8
+#define CASE_9 9
+
+#define MS_PASSED "PASSED"
+#define MS_SPACE " "
+#define MS_FAILED " "
+#define MS_NOTEST "NOTEST"
+#define MS_ABORTU "ABEND0"
+#define MS_ABORT "ABEND1"
+
+#define MK_PASSED 0x00
+#define MK_SPACE 0x01
+#define MK_NOTEST 0x02
+#define MK_ABORTU 0x04
+#define MK_ABORT 0x08
+
+
+
+
+
+#define TST_ABS(x) (((x) > 0) ? (x) : -(x))
+
+#define TMD_ERRET(_type_) int err_val; int ret_flg; _type_ ret_val
+
+
+
+#define TMD_RECHEAD(_FUNC_) typedef struct { TIN_ ##_FUNC_ ##_REC input; TEX_ ##_FUNC_ ##_REC expect; int is_last; } TST_ ##_FUNC_ ##_REC; typedef struct { TST_HEAD hd; TST_ ##_FUNC_ ##_REC rec[ MAX_LOC_TEST ]; } TST_ ##_FUNC_
+# 72 "tst_funcs.h"
+#define TST_FTYP(func) tst_ ##func ##_loc
+#define TST_HEAD(func) tst_ ##func ##_loc[ loc ].hd
+#define TST_INPUT(func) tst_ ##func ##_loc[ loc ].rec[ rec ].input
+#define TST_EXPECT(func) tst_ ##func ##_loc[ loc ].rec[ rec ].expect
+#define TST_INPUT_SEQ(func) tst_ ##func ##_loc[ loc ].rec[ rec ].input.seq[ seq_num ]
+
+#define TST_EXPECT_SEQ(func) tst_ ##func ##_loc[ loc ].rec[ rec ].expect.seq[ seq_num ]
+
+#define TST_IS_LAST(func) tst_ ##func ##_loc[ loc ].rec[ rec ].is_last
+
+
+
+#define TST_DECL_VARS(_type_) int loc, rec, err_count = 0; int warn_count __attribute__ ((unused)); int func_id, seq_num = 0; const char *locale; int err_exp, ret_flg; int errno_save = 0; _type_ ret_exp; _type_ ret
+# 94 "tst_funcs.h"
+#define TST_DO_TEST(o_func) for (loc = 0; strcmp (TST_HEAD (o_func).locale, TST_LOC_end); ++loc)
+
+
+
+#define TST_HEAD_LOCALE(ofunc,s_func) func_id = TST_HEAD (ofunc).func_id; locale = TST_HEAD (ofunc).locale; if (setlocale (LC_ALL, locale) == NULL) { fprintf (stderr, "Warning : can't set locale: %s\nskipping ...\n", locale); result (fp, C_LOCALES, s_func, locale, 0, 0, 0, "can't set locale"); ++err_count; continue; }
+# 110 "tst_funcs.h"
+#define TST_DO_REC(ofunc) for (rec=0; !TST_IS_LAST (ofunc); ++rec)
+
+
+#define TST_DO_SEQ(_count_) for (seq_num=0; seq_num < _count_; seq_num++)
+
+
+#define TST_GET_ERRET(_ofunc_) err_exp = TST_EXPECT (_ofunc_).err_val; ret_flg = TST_EXPECT (_ofunc_).ret_flg; ret_exp = TST_EXPECT (_ofunc_).ret_val
+
+
+
+
+#define TST_GET_ERRET_SEQ(_ofunc_) err_exp = TST_EXPECT_SEQ (_ofunc_).err_val; ret_flg = TST_EXPECT_SEQ (_ofunc_).ret_flg; ret_exp = TST_EXPECT_SEQ (_ofunc_).ret_val
+
+
+
+
+#define TST_CLEAR_ERRNO errno = 0
+
+
+#define TST_SAVE_ERRNO errno_save = errno
+
+
+
+#define TST_IF_RETURN(_s_func_) if (err_exp != 0) { if (errno_save == err_exp) { result (fp, C_SUCCESS, _s_func_, locale, rec+1, seq_num+1, 1, MS_PASSED); } else { err_count++; result (fp, C_FAILURE, _s_func_, locale, rec+1, seq_num+1, 1, "the value of errno is different from an expected value"); } } if (ret_flg == 1) { if (ret == ret_exp) { result (fp, C_SUCCESS, _s_func_, locale, rec+1, seq_num+1, 2, MS_PASSED); } else { err_count++; result (fp, C_FAILURE, _s_func_, locale, rec+1, seq_num+1, 2, "the return value is different from an expected value"); } } else
+# 165 "tst_funcs.h"
+#define TEX_ERRET_REC(_type_) struct { TMD_ERRET (_type_); }
+
+
+
+
+#define TEX_ERRET_REC_SEQ(_type_,_count_) struct { struct { TMD_ERRET (_type_); } seq[ _count_ ]; }
+# 181 "tst_funcs.h"
+#define TST_ISW_STRUCT(_FUNC_,_func_) typedef struct { wint_t wc; } TIN_ISW ##_FUNC_ ##_REC; typedef TEX_ERRET_REC (int) TEX_ISW ##_FUNC_ ##_REC; TMD_RECHEAD (ISW ##_FUNC_)
+# 190 "tst_funcs.h"
+#define TST_FUNC_ISW(_FUNC_,_func_) int tst_isw ##_func_ (FILE *fp, int debug_flg) { TST_DECL_VARS(int); wint_t wc; TST_DO_TEST (isw ##_func_) { TST_HEAD_LOCALE (isw ##_func_, S_ISW ##_FUNC_); TST_DO_REC(isw ##_func_) { TST_GET_ERRET (isw ##_func_); wc = TST_INPUT (isw ##_func_).wc; ret = isw ##_func_ (wc); if (debug_flg) { fprintf (stdout, "isw*() [ %s : %d ] ret = %d\n", locale, rec+1, ret); } TST_IF_RETURN (S_ISW ##_FUNC_) { if (ret != 0) { result (fp, C_SUCCESS, S_ISW ##_FUNC_, locale, rec+1, seq_num+1, 3, MS_PASSED); } else { err_count++; result (fp, C_FAILURE, S_ISW ##_FUNC_, locale, rec+1, seq_num+1, 3, "the function returned 0, but should be non-zero"); } } } } return err_count; }
+# 235 "tst_funcs.h"
+#define TST_TOW_STRUCT(_FUNC_,_func_) typedef struct { wint_t wc; } TIN_TOW ##_FUNC_ ##_REC; typedef TEX_ERRET_REC (wint_t) TEX_TOW ##_FUNC_ ##_REC; TMD_RECHEAD (TOW ##_FUNC_)
+# 244 "tst_funcs.h"
+#define TST_FUNC_TOW(_FUNC_,_func_) int tst_tow ##_func_ (FILE *fp, int debug_flg) { TST_DECL_VARS (wint_t); wint_t wc; TST_DO_TEST (tow ##_func_) { TST_HEAD_LOCALE (tow ##_func_, S_TOW ##_FUNC_); TST_DO_REC (tow ##_func_) { TST_GET_ERRET (tow ##_func_); wc = TST_INPUT (tow ##_func_).wc; ret = tow ##_func_ (wc); if (debug_flg) { fprintf (stdout, "tow*() [ %s : %d ] ret = 0x%x\n", locale, rec+1, ret); } TST_IF_RETURN (S_TOW ##_FUNC_) { }; } } return err_count; }
+# 17 "tst_types.h" 2
+# 1 "tgn_funcdef.h" 1
+
+#define TGN_FUNCDEF_H
+
+
+#define Tiswalnum 1
+#define Tiswalpha 2
+#define Tiswcntrl 3
+#define Tiswctype 4
+#define Tiswdigit 5
+#define Tiswgraph 6
+#define Tiswlower 7
+#define Tiswprint 8
+#define Tiswpunct 9
+#define Tiswspace 10
+#define Tiswupper 11
+#define Tiswxdigit 12
+#define Tmblen 13
+#define Tmbrlen 14
+#define Tmbrtowc 15
+#define Tmbsrtowcs 16
+#define Tmbstowcs 17
+#define Tmbtowc 18
+#define Tstrcoll 19
+#define Tstrfmon 20
+#define Tstrxfrm 21
+#define Tswscanf 22
+#define Ttowctrans 23
+#define Ttowlower 24
+#define Ttowupper 25
+#define Twcrtomb 26
+#define Twcscat 27
+#define Twcschr 28
+#define Twcscmp 29
+#define Twcscoll 30
+#define Twcscpy 31
+#define Twcscspn 32
+#define Twcslen 33
+#define Twcsncat 34
+#define Twcsncmp 35
+#define Twcsncpy 36
+#define Twcspbrk 37
+#define Twcsrtombs 38
+#define Twcsspn 39
+#define Twcsstr 40
+#define Twcstod 41
+#define Twcstok 42
+#define Twcstombs 43
+#define Twcswidth 44
+#define Twcsxfrm 45
+#define Twctob 46
+#define Twctomb 47
+#define Twctrans 48
+#define Twctype 49
+#define Twcwidth 50
+
+
+#define S_ISWALNUM "iswalnum"
+#define S_ISWALPHA "iswalpha"
+#define S_ISWCNTRL "iswcntrl"
+#define S_ISWCTYPE "iswctype"
+#define S_ISWDIGIT "iswdigit"
+#define S_ISWGRAPH "iswgraph"
+#define S_ISWLOWER "iswlower"
+#define S_ISWPRINT "iswprint"
+#define S_ISWPUNCT "iswpunct"
+#define S_ISWSPACE "iswspace"
+#define S_ISWUPPER "iswupper"
+#define S_ISWXDIGIT "iswxdigit"
+#define S_MBLEN "mblen"
+#define S_MBRLEN "mbrlen"
+#define S_MBRTOWC "mbrtowc"
+#define S_MBSRTOWCS "mbsrtowcs"
+#define S_MBSTOWCS "mbstowcs"
+#define S_MBTOWC "mbtowc"
+#define S_STRCOLL "strcoll"
+#define S_STRFMON "strfmon"
+#define S_STRXFRM "strxfrm"
+#define S_SWSCANF "swscanf"
+#define S_TOWCTRANS "towctrans"
+#define S_TOWLOWER "towlower"
+#define S_TOWUPPER "towupper"
+#define S_WCRTOMB "wcrtomb"
+#define S_WCSCAT "wcscat"
+#define S_WCSCHR "wcschr"
+#define S_WCSCMP "wcscmp"
+#define S_WCSCOLL "wcscoll"
+#define S_WCSCPY "wcscpy"
+#define S_WCSCSPN "wcscspn"
+#define S_WCSLEN "wcslen"
+#define S_WCSNCAT "wcsncat"
+#define S_WCSNCMP "wcsncmp"
+#define S_WCSNCPY "wcsncpy"
+#define S_WCSPBRK "wcspbrk"
+#define S_WCSRTOMBS "wcsrtombs"
+#define S_WCSSPN "wcsspn"
+#define S_WCSSTR "wcsstr"
+#define S_WCSTOD "wcstod"
+#define S_WCSTOK "wcstok"
+#define S_WCSTOMBS "wcstombs"
+#define S_WCSWIDTH "wcswidth"
+#define S_WCSXFRM "wcsxfrm"
+#define S_WCTOB "wctob"
+#define S_WCTOMB "wctomb"
+#define S_WCTRANS "wctrans"
+#define S_WCTYPE "wctype"
+#define S_WCWIDTH "wcwidth"
+
+
+extern int tst_iswalnum (FILE *, int);
+extern int tst_iswalpha (FILE *, int);
+extern int tst_iswcntrl (FILE *, int);
+extern int tst_iswctype (FILE *, int);
+extern int tst_iswdigit (FILE *, int);
+extern int tst_iswgraph (FILE *, int);
+extern int tst_iswlower (FILE *, int);
+extern int tst_iswprint (FILE *, int);
+extern int tst_iswpunct (FILE *, int);
+extern int tst_iswspace (FILE *, int);
+extern int tst_iswupper (FILE *, int);
+extern int tst_iswxdigit (FILE *, int);
+extern int tst_mblen (FILE *, int);
+extern int tst_mbrlen (FILE *, int);
+extern int tst_mbrtowc (FILE *, int);
+extern int tst_mbsrtowcs (FILE *, int);
+extern int tst_mbstowcs (FILE *, int);
+extern int tst_mbtowc (FILE *, int);
+extern int tst_strcoll (FILE *, int);
+extern int tst_strfmon (FILE *, int);
+extern int tst_strxfrm (FILE *, int);
+extern int tst_swscanf (FILE *, int);
+extern int tst_towctrans (FILE *, int);
+extern int tst_towlower (FILE *, int);
+extern int tst_towupper (FILE *, int);
+extern int tst_wcrtomb (FILE *, int);
+extern int tst_wcscat (FILE *, int);
+extern int tst_wcschr (FILE *, int);
+extern int tst_wcscmp (FILE *, int);
+extern int tst_wcscoll (FILE *, int);
+extern int tst_wcscpy (FILE *, int);
+extern int tst_wcscspn (FILE *, int);
+extern int tst_wcslen (FILE *, int);
+extern int tst_wcsncat (FILE *, int);
+extern int tst_wcsncmp (FILE *, int);
+extern int tst_wcsncpy (FILE *, int);
+extern int tst_wcspbrk (FILE *, int);
+extern int tst_wcsrtombs (FILE *, int);
+extern int tst_wcsspn (FILE *, int);
+extern int tst_wcsstr (FILE *, int);
+extern int tst_wcstod (FILE *, int);
+extern int tst_wcstok (FILE *, int);
+extern int tst_wcstombs (FILE *, int);
+extern int tst_wcswidth (FILE *, int);
+extern int tst_wcsxfrm (FILE *, int);
+extern int tst_wctob (FILE *, int);
+extern int tst_wctomb (FILE *, int);
+extern int tst_wctrans (FILE *, int);
+extern int tst_wctype (FILE *, int);
+extern int tst_wcwidth (FILE *, int);
+# 18 "tst_types.h" 2
+
+#define MBSSIZE 24
+#define WCSSIZE 12
+#define MONFMTSIZE 16
+#define MONSIZE 64
+#define USE_MBCURMAX 99
+#define TST_DBL_EPS 2.22153e-16
+#define WCSTOK_SEQNUM 3
+#define MBLEN_SEQNUM 3
+#define MBTOWC_SEQNUM 3
+#define MBSTOWCS_SEQNUM 3
+#define WCTOMB_SEQNUM 3
+#define WCSTOMBS_SEQNUM 3
+#define MBRLEN_SEQNUM 3
+#define MBRTOWC_SEQNUM 3
+#define MBSRTOWCS_SEQNUM 3
+#define WCRTOMB_SEQNUM 3
+#define WCSRTOMBS_SEQNUM 3
+
+
+#define MAX_LOC_TEST 300
+
+
+
+
+
+
+typedef struct
+{
+ char *func_str;
+ int func_id;
+}
+TST_FID;
+
+typedef struct
+{
+ int func_id;
+ const char *locale;
+}
+TST_HEAD;
+
+typedef struct
+{
+ TST_HEAD *head;
+}
+TST_FUNCS;
+
+
+
+
+
+
+typedef struct { wint_t wc; } TIN_ISWALNUM_REC; typedef struct { int err_val; int ret_flg; int ret_val; } TEX_ISWALNUM_REC; typedef struct { TIN_ISWALNUM_REC input; TEX_ISWALNUM_REC expect; int is_last; } TST_ISWALNUM_REC; typedef struct { TST_HEAD hd; TST_ISWALNUM_REC rec[ 300 ]; } TST_ISWALNUM;
+typedef struct { wint_t wc; } TIN_ISWALPHA_REC; typedef struct { int err_val; int ret_flg; int ret_val; } TEX_ISWALPHA_REC; typedef struct { TIN_ISWALPHA_REC input; TEX_ISWALPHA_REC expect; int is_last; } TST_ISWALPHA_REC; typedef struct { TST_HEAD hd; TST_ISWALPHA_REC rec[ 300 ]; } TST_ISWALPHA;
+typedef struct { wint_t wc; } TIN_ISWCNTRL_REC; typedef struct { int err_val; int ret_flg; int ret_val; } TEX_ISWCNTRL_REC; typedef struct { TIN_ISWCNTRL_REC input; TEX_ISWCNTRL_REC expect; int is_last; } TST_ISWCNTRL_REC; typedef struct { TST_HEAD hd; TST_ISWCNTRL_REC rec[ 300 ]; } TST_ISWCNTRL;
+typedef struct { wint_t wc; } TIN_ISWDIGIT_REC; typedef struct { int err_val; int ret_flg; int ret_val; } TEX_ISWDIGIT_REC; typedef struct { TIN_ISWDIGIT_REC input; TEX_ISWDIGIT_REC expect; int is_last; } TST_ISWDIGIT_REC; typedef struct { TST_HEAD hd; TST_ISWDIGIT_REC rec[ 300 ]; } TST_ISWDIGIT;
+typedef struct { wint_t wc; } TIN_ISWGRAPH_REC; typedef struct { int err_val; int ret_flg; int ret_val; } TEX_ISWGRAPH_REC; typedef struct { TIN_ISWGRAPH_REC input; TEX_ISWGRAPH_REC expect; int is_last; } TST_ISWGRAPH_REC; typedef struct { TST_HEAD hd; TST_ISWGRAPH_REC rec[ 300 ]; } TST_ISWGRAPH;
+typedef struct { wint_t wc; } TIN_ISWLOWER_REC; typedef struct { int err_val; int ret_flg; int ret_val; } TEX_ISWLOWER_REC; typedef struct { TIN_ISWLOWER_REC input; TEX_ISWLOWER_REC expect; int is_last; } TST_ISWLOWER_REC; typedef struct { TST_HEAD hd; TST_ISWLOWER_REC rec[ 300 ]; } TST_ISWLOWER;
+typedef struct { wint_t wc; } TIN_ISWPRINT_REC; typedef struct { int err_val; int ret_flg; int ret_val; } TEX_ISWPRINT_REC; typedef struct { TIN_ISWPRINT_REC input; TEX_ISWPRINT_REC expect; int is_last; } TST_ISWPRINT_REC; typedef struct { TST_HEAD hd; TST_ISWPRINT_REC rec[ 300 ]; } TST_ISWPRINT;
+typedef struct { wint_t wc; } TIN_ISWPUNCT_REC; typedef struct { int err_val; int ret_flg; int ret_val; } TEX_ISWPUNCT_REC; typedef struct { TIN_ISWPUNCT_REC input; TEX_ISWPUNCT_REC expect; int is_last; } TST_ISWPUNCT_REC; typedef struct { TST_HEAD hd; TST_ISWPUNCT_REC rec[ 300 ]; } TST_ISWPUNCT;
+typedef struct { wint_t wc; } TIN_ISWSPACE_REC; typedef struct { int err_val; int ret_flg; int ret_val; } TEX_ISWSPACE_REC; typedef struct { TIN_ISWSPACE_REC input; TEX_ISWSPACE_REC expect; int is_last; } TST_ISWSPACE_REC; typedef struct { TST_HEAD hd; TST_ISWSPACE_REC rec[ 300 ]; } TST_ISWSPACE;
+typedef struct { wint_t wc; } TIN_ISWUPPER_REC; typedef struct { int err_val; int ret_flg; int ret_val; } TEX_ISWUPPER_REC; typedef struct { TIN_ISWUPPER_REC input; TEX_ISWUPPER_REC expect; int is_last; } TST_ISWUPPER_REC; typedef struct { TST_HEAD hd; TST_ISWUPPER_REC rec[ 300 ]; } TST_ISWUPPER;
+typedef struct { wint_t wc; } TIN_ISWXDIGIT_REC; typedef struct { int err_val; int ret_flg; int ret_val; } TEX_ISWXDIGIT_REC; typedef struct { TIN_ISWXDIGIT_REC input; TEX_ISWXDIGIT_REC expect; int is_last; } TST_ISWXDIGIT_REC; typedef struct { TST_HEAD hd; TST_ISWXDIGIT_REC rec[ 300 ]; } TST_ISWXDIGIT;
+
+typedef struct
+{
+ wint_t wc;
+ const char *ts;
+}
+TIN_ISWCTYPE_REC;
+
+typedef
+struct { int err_val; int ret_flg; int ret_val; }
+ TEX_ISWCTYPE_REC;
+typedef struct { TIN_ISWCTYPE_REC input; TEX_ISWCTYPE_REC expect; int is_last; } TST_ISWCTYPE_REC; typedef struct { TST_HEAD hd; TST_ISWCTYPE_REC rec[ 300 ]; } TST_ISWCTYPE;
+
+
+
+
+
+
+typedef struct
+{
+ char s_flg;
+ char s[24];
+ size_t n;
+}
+TIN_MBLEN_REC;
+
+typedef struct { int err_val; int ret_flg; int ret_val; } TEX_MBLEN_REC;
+typedef struct { TIN_MBLEN_REC input; TEX_MBLEN_REC expect; int is_last; } TST_MBLEN_REC; typedef struct { TST_HEAD hd; TST_MBLEN_REC rec[ 300 ]; } TST_MBLEN;
+
+
+
+
+
+
+typedef struct
+{
+ struct
+ {
+ int s_flg;
+ char s[24];
+ size_t n;
+ int t_flg;
+ int t_init;
+ }
+ seq[3];
+}
+TIN_MBRLEN_REC;
+
+typedef struct { struct { int err_val; int ret_flg; size_t ret_val; } seq[ 3 ]; } TEX_MBRLEN_REC;
+typedef struct { TIN_MBRLEN_REC input; TEX_MBRLEN_REC expect; int is_last; } TST_MBRLEN_REC; typedef struct { TST_HEAD hd; TST_MBRLEN_REC rec[ 300 ]; } TST_MBRLEN;
+
+
+
+
+
+
+
+typedef struct
+{
+ struct
+ {
+ int w_flg;
+ int s_flg;
+ char s[24];
+ size_t n;
+ int t_flg;
+ int t_init;
+ }
+ seq[3];
+}
+TIN_MBRTOWC_REC;
+
+typedef struct
+{
+ struct
+ {
+ int err_val; int ret_flg; size_t ret_val;
+ wchar_t wc;
+ }
+ seq[3];
+}
+TEX_MBRTOWC_REC;
+
+typedef struct { TIN_MBRTOWC_REC input; TEX_MBRTOWC_REC expect; int is_last; } TST_MBRTOWC_REC; typedef struct { TST_HEAD hd; TST_MBRTOWC_REC rec[ 300 ]; } TST_MBRTOWC;
+
+
+
+
+
+
+
+typedef struct
+{
+ struct
+ {
+ int w_flg;
+ char s[24];
+ size_t n;
+ int t_flg;
+ int t_init;
+ }
+ seq[3];
+}
+TIN_MBSRTOWCS_REC;
+
+typedef struct
+{
+ struct
+ {
+ int err_val; int ret_flg; size_t ret_val;
+ wchar_t ws[12];
+ }
+ seq[3];
+}
+TEX_MBSRTOWCS_REC;
+
+typedef struct { TIN_MBSRTOWCS_REC input; TEX_MBSRTOWCS_REC expect; int is_last; } TST_MBSRTOWCS_REC; typedef struct { TST_HEAD hd; TST_MBSRTOWCS_REC rec[ 300 ]; } TST_MBSRTOWCS;
+
+
+
+
+
+
+typedef struct
+{
+ struct
+ {
+ int w_flg;
+ int s_flg;
+ const char *s;
+ size_t n;
+ }
+ seq[3];
+}
+TIN_MBSTOWCS_REC;
+
+typedef TEX_MBSRTOWCS_REC TEX_MBSTOWCS_REC;
+
+typedef struct { TIN_MBSTOWCS_REC input; TEX_MBSTOWCS_REC expect; int is_last; } TST_MBSTOWCS_REC; typedef struct { TST_HEAD hd; TST_MBSTOWCS_REC rec[ 300 ]; } TST_MBSTOWCS;
+
+
+
+
+
+
+typedef TIN_MBSTOWCS_REC TIN_MBTOWC_REC;
+
+
+typedef struct
+{
+ struct
+ {
+ int err_val; int ret_flg; int ret_val;
+ wchar_t wc;
+ }
+ seq[3];
+}
+TEX_MBTOWC_REC;
+
+typedef struct { TIN_MBTOWC_REC input; TEX_MBTOWC_REC expect; int is_last; } TST_MBTOWC_REC; typedef struct { TST_HEAD hd; TST_MBTOWC_REC rec[ 300 ]; } TST_MBTOWC;
+
+
+
+
+
+
+typedef struct
+{
+ char s1[24];
+ char s2[24];
+}
+TIN_STRCOLL_REC;
+
+typedef struct { int err_val; int ret_flg; int ret_val; } TEX_STRCOLL_REC;
+typedef struct { TIN_STRCOLL_REC input; TEX_STRCOLL_REC expect; int is_last; } TST_STRCOLL_REC; typedef struct { TST_HEAD hd; TST_STRCOLL_REC rec[ 300 ]; } TST_STRCOLL;
+
+
+
+
+
+
+
+typedef struct
+{
+ int nbytes;
+ char fmt[16];
+ double val;
+}
+TIN_STRFMON_REC;
+
+typedef struct
+{
+ int err_val; int ret_flg; size_t ret_val;
+ char mon[64];
+}
+TEX_STRFMON_REC;
+
+typedef struct { TIN_STRFMON_REC input; TEX_STRFMON_REC expect; int is_last; } TST_STRFMON_REC; typedef struct { TST_HEAD hd; TST_STRFMON_REC rec[ 300 ]; } TST_STRFMON;
+
+
+
+
+
+
+typedef struct
+{
+ char org1[24];
+ char org2[24];
+ size_t n1, n2;
+}
+TIN_STRXFRM_REC;
+
+typedef struct { int err_val; int ret_flg; size_t ret_val; } TEX_STRXFRM_REC;
+typedef struct { TIN_STRXFRM_REC input; TEX_STRXFRM_REC expect; int is_last; } TST_STRXFRM_REC; typedef struct { TST_HEAD hd; TST_STRXFRM_REC rec[ 300 ]; } TST_STRXFRM;
+
+
+
+
+
+
+typedef struct
+{
+ wchar_t ws[12 * 3];
+ wchar_t fmt[12 * 3];
+ int wch;
+}
+TIN_SWSCANF_REC;
+
+typedef struct
+{
+ int err_val; int ret_flg; int ret_val;
+ int val_int;
+ unsigned val_uns;
+ float val_flt;
+ int val_c;
+ char val_s[24 * 2];
+ wchar_t val_S[12 * 2];
+}
+TEX_SWSCANF_REC;
+
+typedef struct { TIN_SWSCANF_REC input; TEX_SWSCANF_REC expect; int is_last; } TST_SWSCANF_REC; typedef struct { TST_HEAD hd; TST_SWSCANF_REC rec[ 300 ]; } TST_SWSCANF;
+
+
+
+
+
+
+typedef TIN_ISWCTYPE_REC TIN_TOWCTRANS_REC;
+typedef struct { int err_val; int ret_flg; wint_t ret_val; } TEX_TOWCTRANS_REC;
+typedef struct { TIN_TOWCTRANS_REC input; TEX_TOWCTRANS_REC expect; int is_last; } TST_TOWCTRANS_REC; typedef struct { TST_HEAD hd; TST_TOWCTRANS_REC rec[ 300 ]; } TST_TOWCTRANS;
+
+
+
+
+
+
+typedef struct { wint_t wc; } TIN_TOWLOWER_REC; typedef struct { int err_val; int ret_flg; wint_t ret_val; } TEX_TOWLOWER_REC; typedef struct { TIN_TOWLOWER_REC input; TEX_TOWLOWER_REC expect; int is_last; } TST_TOWLOWER_REC; typedef struct { TST_HEAD hd; TST_TOWLOWER_REC rec[ 300 ]; } TST_TOWLOWER;
+typedef struct { wint_t wc; } TIN_TOWUPPER_REC; typedef struct { int err_val; int ret_flg; wint_t ret_val; } TEX_TOWUPPER_REC; typedef struct { TIN_TOWUPPER_REC input; TEX_TOWUPPER_REC expect; int is_last; } TST_TOWUPPER_REC; typedef struct { TST_HEAD hd; TST_TOWUPPER_REC rec[ 300 ]; } TST_TOWUPPER;
+
+
+
+
+
+
+typedef struct
+{
+ int s_flg;
+ wchar_t wc;
+ int t_flg;
+ int t_init;
+}
+TIN_WCRTOMB_REC;
+
+typedef struct
+{
+ int err_val; int ret_flg; wchar_t ret_val;
+ char s[24];
+}
+TEX_WCRTOMB_REC;
+
+typedef struct { TIN_WCRTOMB_REC input; TEX_WCRTOMB_REC expect; int is_last; } TST_WCRTOMB_REC; typedef struct { TST_HEAD hd; TST_WCRTOMB_REC rec[ 300 ]; } TST_WCRTOMB;
+
+
+
+
+
+
+typedef struct
+{
+ wchar_t ws1[12];
+ wchar_t ws2[12];
+}
+TIN_WCSCAT_REC;
+
+typedef struct
+{
+ int err_val; int ret_flg; wchar_t * ret_val;
+ wchar_t ws[12];
+}
+TEX_WCSCAT_REC;
+
+typedef struct { TIN_WCSCAT_REC input; TEX_WCSCAT_REC expect; int is_last; } TST_WCSCAT_REC; typedef struct { TST_HEAD hd; TST_WCSCAT_REC rec[ 300 ]; } TST_WCSCAT;
+
+
+
+
+
+
+typedef struct
+{
+ wchar_t ws[12];
+ wchar_t wc;
+}
+TIN_WCSCHR_REC;
+
+typedef struct { int err_val; int ret_flg; wchar_t * ret_val; } TEX_WCSCHR_REC;
+typedef struct { TIN_WCSCHR_REC input; TEX_WCSCHR_REC expect; int is_last; } TST_WCSCHR_REC; typedef struct { TST_HEAD hd; TST_WCSCHR_REC rec[ 300 ]; } TST_WCSCHR;
+
+
+
+
+
+
+typedef TIN_WCSCAT_REC TIN_WCSCMP_REC;
+typedef struct { int err_val; int ret_flg; int ret_val; } TEX_WCSCMP_REC;
+typedef struct { TIN_WCSCMP_REC input; TEX_WCSCMP_REC expect; int is_last; } TST_WCSCMP_REC; typedef struct { TST_HEAD hd; TST_WCSCMP_REC rec[ 300 ]; } TST_WCSCMP;
+
+
+
+
+
+
+typedef TIN_WCSCMP_REC TIN_WCSCOLL_REC;
+typedef struct
+{
+ int err_val; int ret_flg; int ret_val;
+ int cmp_flg;
+}
+TEX_WCSCOLL_REC;
+typedef struct { TIN_WCSCOLL_REC input; TEX_WCSCOLL_REC expect; int is_last; } TST_WCSCOLL_REC; typedef struct { TST_HEAD hd; TST_WCSCOLL_REC rec[ 300 ]; } TST_WCSCOLL;
+
+
+
+
+
+
+typedef struct
+{
+ wchar_t ws[12];
+}
+TIN_WCSCPY_REC;
+
+typedef TEX_WCSCAT_REC TEX_WCSCPY_REC;
+typedef struct { TIN_WCSCPY_REC input; TEX_WCSCPY_REC expect; int is_last; } TST_WCSCPY_REC; typedef struct { TST_HEAD hd; TST_WCSCPY_REC rec[ 300 ]; } TST_WCSCPY;
+
+
+
+
+
+
+typedef TIN_WCSCAT_REC TIN_WCSCSPN_REC;
+typedef struct { int err_val; int ret_flg; size_t ret_val; } TEX_WCSCSPN_REC;
+typedef struct { TIN_WCSCSPN_REC input; TEX_WCSCSPN_REC expect; int is_last; } TST_WCSCSPN_REC; typedef struct { TST_HEAD hd; TST_WCSCSPN_REC rec[ 300 ]; } TST_WCSCSPN;
+
+
+
+
+
+
+typedef TIN_WCSCPY_REC TIN_WCSLEN_REC;
+typedef struct { int err_val; int ret_flg; size_t ret_val; } TEX_WCSLEN_REC;
+typedef struct { TIN_WCSLEN_REC input; TEX_WCSLEN_REC expect; int is_last; } TST_WCSLEN_REC; typedef struct { TST_HEAD hd; TST_WCSLEN_REC rec[ 300 ]; } TST_WCSLEN;
+
+
+
+
+
+
+
+typedef struct
+{
+ wchar_t ws1[12];
+ wchar_t ws2[12];
+ size_t n;
+}
+TIN_WCSNCAT_REC;
+
+typedef TEX_WCSCAT_REC TEX_WCSNCAT_REC;
+typedef struct { TIN_WCSNCAT_REC input; TEX_WCSNCAT_REC expect; int is_last; } TST_WCSNCAT_REC; typedef struct { TST_HEAD hd; TST_WCSNCAT_REC rec[ 300 ]; } TST_WCSNCAT;
+
+
+
+
+
+
+
+typedef TIN_WCSNCAT_REC TIN_WCSNCMP_REC;
+typedef struct { int err_val; int ret_flg; int ret_val; } TEX_WCSNCMP_REC;
+typedef struct { TIN_WCSNCMP_REC input; TEX_WCSNCMP_REC expect; int is_last; } TST_WCSNCMP_REC; typedef struct { TST_HEAD hd; TST_WCSNCMP_REC rec[ 300 ]; } TST_WCSNCMP;
+
+
+
+
+
+
+
+typedef struct
+{
+ wchar_t ws[12];
+ size_t n;
+}
+TIN_WCSNCPY_REC;
+
+typedef TEX_WCSCPY_REC TEX_WCSNCPY_REC;
+typedef struct { TIN_WCSNCPY_REC input; TEX_WCSNCPY_REC expect; int is_last; } TST_WCSNCPY_REC; typedef struct { TST_HEAD hd; TST_WCSNCPY_REC rec[ 300 ]; } TST_WCSNCPY;
+
+
+
+
+
+
+typedef TIN_WCSCSPN_REC TIN_WCSPBRK_REC;
+
+typedef struct
+{
+ int err_val; int ret_flg; wchar_t * ret_val;
+ wchar_t wc;
+}
+TEX_WCSPBRK_REC;
+
+typedef struct { TIN_WCSPBRK_REC input; TEX_WCSPBRK_REC expect; int is_last; } TST_WCSPBRK_REC; typedef struct { TST_HEAD hd; TST_WCSPBRK_REC rec[ 300 ]; } TST_WCSPBRK;
+
+
+
+
+
+
+
+typedef struct
+{
+ int s_flg;
+ int w_flg;
+ wchar_t ws[12];
+ size_t n;
+ int t_flg;
+ int t_init;
+}
+TIN_WCSRTOMBS_REC;
+
+typedef struct
+{
+ int err_val; int ret_flg; size_t ret_val;
+ char s[24];
+}
+TEX_WCSRTOMBS_REC;
+
+typedef struct { TIN_WCSRTOMBS_REC input; TEX_WCSRTOMBS_REC expect; int is_last; } TST_WCSRTOMBS_REC; typedef struct { TST_HEAD hd; TST_WCSRTOMBS_REC rec[ 300 ]; } TST_WCSRTOMBS;
+
+
+
+
+
+
+typedef TIN_WCSCSPN_REC TIN_WCSSPN_REC;
+typedef TEX_WCSCSPN_REC TEX_WCSSPN_REC;
+typedef struct { TIN_WCSSPN_REC input; TEX_WCSSPN_REC expect; int is_last; } TST_WCSSPN_REC; typedef struct { TST_HEAD hd; TST_WCSSPN_REC rec[ 300 ]; } TST_WCSSPN;
+
+
+
+
+
+
+typedef TIN_WCSCSPN_REC TIN_WCSSTR_REC;
+typedef struct { int err_val; int ret_flg; wchar_t * ret_val; } TEX_WCSSTR_REC;
+typedef struct { TIN_WCSSTR_REC input; TEX_WCSSTR_REC expect; int is_last; } TST_WCSSTR_REC; typedef struct { TST_HEAD hd; TST_WCSSTR_REC rec[ 300 ]; } TST_WCSSTR;
+
+
+
+
+
+
+typedef struct
+{
+ wchar_t np[12];
+}
+TIN_WCSTOD_REC;
+
+typedef struct
+{
+ int err_val; int ret_flg; double ret_val;
+ double val;
+ wchar_t fwc;
+}
+TEX_WCSTOD_REC;
+
+typedef struct { TIN_WCSTOD_REC input; TEX_WCSTOD_REC expect; int is_last; } TST_WCSTOD_REC; typedef struct { TST_HEAD hd; TST_WCSTOD_REC rec[ 300 ]; } TST_WCSTOD;
+
+
+
+
+
+
+
+typedef struct
+{
+ struct
+ {
+ int w_flg;
+ wchar_t ws[12];
+ wchar_t dt[12];
+ }
+ seq[3];
+}
+TIN_WCSTOK_REC;
+
+typedef struct
+{
+ struct
+ {
+ int err_val; int ret_flg; wchar_t * ret_val;
+ wchar_t ws[12];
+ }
+ seq[3];
+}
+TEX_WCSTOK_REC;
+
+typedef struct { TIN_WCSTOK_REC input; TEX_WCSTOK_REC expect; int is_last; } TST_WCSTOK_REC; typedef struct { TST_HEAD hd; TST_WCSTOK_REC rec[ 300 ]; } TST_WCSTOK;
+
+
+
+
+
+
+typedef struct
+{
+ int s_flg;
+ int w_flg;
+ wchar_t ws[12];
+ size_t n;
+}
+TIN_WCSTOMBS_REC;
+
+typedef struct
+{
+ int err_val; int ret_flg; size_t ret_val;
+ char s[24];
+}
+TEX_WCSTOMBS_REC;
+
+typedef struct { TIN_WCSTOMBS_REC input; TEX_WCSTOMBS_REC expect; int is_last; } TST_WCSTOMBS_REC; typedef struct { TST_HEAD hd; TST_WCSTOMBS_REC rec[ 300 ]; } TST_WCSTOMBS;
+
+
+
+
+
+
+typedef TIN_WCSNCPY_REC TIN_WCSWIDTH_REC;
+typedef struct { int err_val; int ret_flg; int ret_val; } TEX_WCSWIDTH_REC;
+typedef struct { TIN_WCSWIDTH_REC input; TEX_WCSWIDTH_REC expect; int is_last; } TST_WCSWIDTH_REC; typedef struct { TST_HEAD hd; TST_WCSWIDTH_REC rec[ 300 ]; } TST_WCSWIDTH;
+
+
+
+
+
+
+typedef struct
+{
+ wchar_t org1[12];
+ wchar_t org2[12];
+ int n1, n2;
+}
+TIN_WCSXFRM_REC;
+
+typedef struct { int err_val; int ret_flg; size_t ret_val; } TEX_WCSXFRM_REC;
+typedef struct { TIN_WCSXFRM_REC input; TEX_WCSXFRM_REC expect; int is_last; } TST_WCSXFRM_REC; typedef struct { TST_HEAD hd; TST_WCSXFRM_REC rec[ 300 ]; } TST_WCSXFRM;
+
+
+
+
+
+
+typedef struct
+{
+ wint_t wc;
+}
+TIN_WCTOB_REC;
+
+typedef struct { int err_val; int ret_flg; int ret_val; } TEX_WCTOB_REC;
+typedef struct { TIN_WCTOB_REC input; TEX_WCTOB_REC expect; int is_last; } TST_WCTOB_REC; typedef struct { TST_HEAD hd; TST_WCTOB_REC rec[ 300 ]; } TST_WCTOB;
+
+
+
+
+
+
+typedef struct
+{
+ int s_flg;
+ wchar_t wc;
+}
+TIN_WCTOMB_REC;
+
+typedef struct
+{
+ int err_val; int ret_flg; int ret_val;
+ char s[24];
+}
+TEX_WCTOMB_REC;
+
+typedef struct { TIN_WCTOMB_REC input; TEX_WCTOMB_REC expect; int is_last; } TST_WCTOMB_REC; typedef struct { TST_HEAD hd; TST_WCTOMB_REC rec[ 300 ]; } TST_WCTOMB;
+
+
+
+
+
+
+typedef struct
+{
+ char class[24];
+}
+TIN_WCTRANS_REC;
+
+typedef struct { int err_val; int ret_flg; wctrans_t ret_val; } TEX_WCTRANS_REC;
+typedef struct { TIN_WCTRANS_REC input; TEX_WCTRANS_REC expect; int is_last; } TST_WCTRANS_REC; typedef struct { TST_HEAD hd; TST_WCTRANS_REC rec[ 300 ]; } TST_WCTRANS;
+
+
+
+
+
+
+typedef TIN_WCTRANS_REC TIN_WCTYPE_REC;
+typedef struct { int err_val; int ret_flg; wctype_t ret_val; } TEX_WCTYPE_REC;
+typedef struct { TIN_WCTYPE_REC input; TEX_WCTYPE_REC expect; int is_last; } TST_WCTYPE_REC; typedef struct { TST_HEAD hd; TST_WCTYPE_REC rec[ 300 ]; } TST_WCTYPE;
+
+
+
+
+
+
+typedef struct
+{
+ wchar_t wc;
+}
+TIN_WCWIDTH_REC;
+
+typedef struct { int err_val; int ret_flg; int ret_val; } TEX_WCWIDTH_REC;
+typedef struct { TIN_WCWIDTH_REC input; TEX_WCWIDTH_REC expect; int is_last; } TST_WCWIDTH_REC; typedef struct { TST_HEAD hd; TST_WCWIDTH_REC rec[ 300 ]; } TST_WCWIDTH;
+# 18 "tsp_common.c" 2
+# 1 "tgn_locdef.h" 1
+
+#define TGN_LOCDEF_H
+
+
+
+
+#define TST_LOC_C "C"
+
+
+#define TST_LOC_de "de_DE.ISO-8859-1"
+
+
+
+#define TST_LOC_enUS "en_US.ANSI_X3.4-1968"
+
+
+
+
+
+
+#define TST_LOC_eucJP "ja_JP.EUC-JP"
+
+
+
+
+
+
+#define TST_LOC_de_UTF8 "de_DE.UTF-8"
+
+
+#define TST_LOC_end "lastEntry"
+# 19 "tsp_common.c" 2
+
+
+int
+main (int argc, char *argv[])
+{
+ int ret;
+ int debug;
+
+ debug = argc > 1 ? atoi (argv[1]) : 0;
+
+ if (debug)
+ {
+ fprintf (stdout, "\nTST_MBWC ===> %s ...\n", argv[0]);
+ }
+ ret = tst_mbrlen (stdout, debug);
+
+ return (ret != 0);
+}
+
+#define MAX_RESULT_REC 132
+char result_rec[132];
+
+
+int
+result (FILE * fp, char res, const char *func, const char *loc, int rec_no,
+ int seq_no, int case_no, const char *msg)
+{
+ if (fp == ((void *)0)
+ || strlen (func) + strlen (loc) + strlen (msg) + 32 > 132)
+ {
+ fprintf (stderr,
+ "Warning: result(): can't write the result: %s:%s:%d:%d:%s\n",
+ func, loc, rec_no, case_no, msg);
+ return 0;
+ }
+
+ sprintf (result_rec, "%s:%s:%d:%d:%d:%c:%s\n", func, loc, rec_no, seq_no,
+ case_no, res, msg);
+
+ if (fputs (result_rec, fp) == (-1))
+ {
+ return 0;
+ }
+
+ return 1;
+}
+# 8 "tst_mbrlen.c" 2
+# 1 "dat_mbrlen.c" 1
+# 19 "dat_mbrlen.c"
+TST_MBRLEN tst_mbrlen_loc [] = {
+ {
+ { 14, "de_DE.ISO-8859-1" },
+ {
+ {
+ {
+ {
+ { 1, "", 0, 0, 0 },
+ { 1, "", 1, 0, 0 },
+ { 1, "\300", 99, 0, 0 },
+ }
+ },
+ {
+ {
+ { 0, 1, 0, },
+ { 0, 1, 0, },
+ { 0, 1, 1, },
+ }
+ }
+ },
+ {
+ {
+ {
+ { 1, "\300\001", 0, 0, 0 },
+ { 1, "\300\001", 1, 0, 0 },
+ { 1, "\317\001", 99, 0, 0 },
+ }
+ },
+ {
+ {
+ { 0, 1, 0, },
+ { 0, 1, 1, },
+ { 0, 1, 1, },
+ }
+ }
+ },
+ { .is_last = 1 }
+ }
+ },
+ {
+ { 14, "en_US.ANSI_X3.4-1968" },
+ {
+ {
+ {
+ {
+ { 1, "A", 0, 0, 0 },
+ { 1, "A", 1, 0, 0 },
+ { 1, "A", 99, 0, 0 },
+ }
+ },
+ {
+ {
+ { 0, 1, 0, },
+ { 0, 1, 1, },
+ { 0, 1, 1, },
+ }
+ }
+ },
+ {
+ {
+ {
+ { 1, "\317\001", 0, 1, 0 },
+ { 1, "\317\001", 1, 1, 0 },
+ { 1, "\317\001", 99, 1, 0 },
+ }
+ },
+ {
+ {
+ { 0, 1, 0, },
+ { 84, 1, -1, },
+ { 84, 1, -1, },
+ }
+ }
+ },
+ { .is_last = 1 }
+ }
+ },
+ {
+ { 14, "ja_JP.EUC-JP" },
+ {
+ {
+ {
+ {
+ { 1, "\317\302", 1, 1, 1 },
+ { 0, "", 0, 1, 0 },
+ { 1, "\317\302", 99, 1, 1 },
+ }
+ },
+ {
+ {
+ { 0, 1, -2, },
+ { 0, 1, -1, },
+ { 0, 1, 2, },
+ }
+ }
+ },
+ {
+ {
+ {
+ { 1, "\317", 1, 1, 0 },
+ { 1, "\302", 1, 1, 0 },
+ { 1, "\317\302", 99, 0, 0 },
+ }
+ },
+ {
+ {
+ { 0, 1, -2, },
+
+
+
+
+
+ { 0, 1, +1, },
+
+ { 0, 1, 2, },
+ }
+ }
+ },
+ {
+ {
+ {
+ { 1, "\216\217", 0, 0, 0 },
+ { 1, "\216\217", 1, 0, 0 },
+ { 1, "\216\217", 99, 0, 0 },
+ }
+ },
+ {
+ {
+ { 0, 1, 0, },
+ { 0, 1, -2, },
+ { 84, 1, -1, },
+ }
+ }
+ },
+ { .is_last = 1 }
+ }
+ },
+ {
+ { 14, "lastEntry" }
+ }
+};
+# 9 "tst_mbrlen.c" 2
+
+
+int
+tst_mbrlen (FILE * fp, int debug_flg)
+{
+ int loc, rec, err_count = 0; int warn_count __attribute__ ((unused)); int func_id, seq_num = 0; const char *locale; int err_exp, ret_flg; int errno_save = 0; size_t ret_exp; size_t ret;
+ char s_flg;
+ const char *s_in;
+ size_t n;
+ char t_flg;
+ char t_ini;
+ static mbstate_t s = { 0 };
+ mbstate_t *ps;
+
+ for (loc = 0; strcmp (tst_mbrlen_loc[ loc ].hd.locale, "lastEntry"); ++loc)
+ {
+ func_id = tst_mbrlen_loc[ loc ].hd.func_id; locale = tst_mbrlen_loc[ loc ].hd.locale; if (setlocale (6, locale) == ((void *)0)) { fprintf (stderr, "Warning : can't set locale: %s\nskipping ...\n", locale); result (fp, 'L', "mbrlen", locale, 0, 0, 0, "can't set locale"); ++err_count; continue; };
+ for (rec=0; !tst_mbrlen_loc[ loc ].rec[ rec ].is_last; ++rec)
+ {
+ if (mbrlen (((void *)0), 0, &s) != 0)
+ {
+ err_count++;
+ result (fp, ('F'), ("mbrlen"), locale, rec+1, seq_num+1, (3), ("Initialization (external mbstate object) failed " "- skipped this test case."));
+
+
+ continue;
+ }
+
+ for (seq_num=0; seq_num < 3; seq_num++)
+ {
+ err_exp = tst_mbrlen_loc[ loc ].rec[ rec ].expect.seq[ seq_num ].err_val; ret_flg = tst_mbrlen_loc[ loc ].rec[ rec ].expect.seq[ seq_num ].ret_flg; ret_exp = tst_mbrlen_loc[ loc ].rec[ rec ].expect.seq[ seq_num ].ret_val;
+ s_flg = tst_mbrlen_loc[ loc ].rec[ rec ].input.seq[ seq_num ].s_flg;
+ s_in = tst_mbrlen_loc[ loc ].rec[ rec ].input.seq[ seq_num ].s;
+ n = tst_mbrlen_loc[ loc ].rec[ rec ].input.seq[ seq_num ].n;
+ t_flg = tst_mbrlen_loc[ loc ].rec[ rec ].input.seq[ seq_num ].t_flg;
+ t_ini = tst_mbrlen_loc[ loc ].rec[ rec ].input.seq[ seq_num ].t_init;
+ if (s_flg == 0)
+ {
+ s_in = ((void *)0);
+ }
+
+
+ fprintf(stdout, "n = %d.\n", n);
+
+ if (n == 99)
+ {
+ n = (_stdlib_mb_cur_max ());
+ }
+
+ ps = (t_flg == 0) ? ((void *)0) : &s;
+
+ if (t_ini != 0)
+ {
+ memset (&s, 0, sizeof (s));
+ mbrlen (((void *)0), 0, ((void *)0));
+ }
+
+ __libc_errno = 0;
+ ret = mbrlen (s_in, n, ps);
+ errno_save = __libc_errno;
+
+
+ fprintf(stdout, "s_in = %c, n = %d, t_ini = %d, s_flg = %d, t_flg = %d, MB_CUR_MAX = %d.\n",
+
+ s_in, n, t_ini, s_flg, t_flg, (_stdlib_mb_cur_max ()));
+
+ if (debug_flg)
+ {
+ fprintf (stdout, "mbrlen() [ %s : %d : %d ] ret = %zd\n",
+ locale, rec + 1, seq_num + 1, ret);
+ fprintf (stdout, " errno = %d\n", errno_save);
+ }
+
+ if (err_exp != 0) { if (errno_save == err_exp) { result (fp, 'S', "mbrlen", locale, rec+1, seq_num+1, 1, "PASSED"); } else { err_count++; result (fp, 'F', "mbrlen", locale, rec+1, seq_num+1, 1, "the value of errno is different from an expected value"); } } if (ret_flg == 1) { if (ret == ret_exp) { result (fp, 'S', "mbrlen", locale, rec+1, seq_num+1, 2, "PASSED"); } else { err_count++; result (fp, 'F', "mbrlen", locale, rec+1, seq_num+1, 2, "the return value is different from an expected value"); } } else
+ {
+ };
+ }
+ }
+ }
+
+ return err_count;
+}
diff --git a/test/locale-mbwc/tst_mbrlen.s b/test/locale-mbwc/tst_mbrlen.s
new file mode 100644
index 000000000..1d5ec1c1a
--- /dev/null
+++ b/test/locale-mbwc/tst_mbrlen.s
@@ -0,0 +1,8666 @@
+ .file "tst_mbrlen.c"
+ .text
+ .little
+ .section .debug_abbrev,"",@progbits
+.Ldebug_abbrev0:
+ .section .debug_info,"",@progbits
+.Ldebug_info0:
+ .section .debug_line,"",@progbits
+.Ldebug_line0:
+ .section .debug_macinfo,"",@progbits
+.Ldebug_macinfo0:
+ .text
+.Ltext0:
+ .section .debug_macinfo
+ .byte 0x3
+ .uleb128 0x0
+ .file 1 "tst_mbrlen.c"
+ .uleb128 0x1
+ .byte 0x1
+ .uleb128 0x1
+ .string "__STDC__ 1"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__STDC_HOSTED__ 1"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__GNUC__ 4"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__GNUC_MINOR__ 1"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__GNUC_PATCHLEVEL__ 1"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__SIZE_TYPE__ unsigned int"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__PTRDIFF_TYPE__ int"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__WCHAR_TYPE__ long int"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__WINT_TYPE__ unsigned int"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__INTMAX_TYPE__ long long int"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__UINTMAX_TYPE__ long long unsigned int"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__GXX_ABI_VERSION 1002"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__SCHAR_MAX__ 127"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__SHRT_MAX__ 32767"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__INT_MAX__ 2147483647"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__LONG_MAX__ 2147483647L"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__LONG_LONG_MAX__ 9223372036854775807LL"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__WCHAR_MAX__ 2147483647"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__CHAR_BIT__ 8"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__INTMAX_MAX__ 9223372036854775807LL"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__FLT_EVAL_METHOD__ 0"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__FLT_RADIX__ 2"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__FLT_MANT_DIG__ 24"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__FLT_DIG__ 6"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__FLT_MIN_EXP__ (-125)"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__FLT_MIN_10_EXP__ (-37)"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__FLT_MAX_EXP__ 128"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__FLT_MAX_10_EXP__ 38"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__FLT_MAX__ 3.40282347e+38F"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__FLT_MIN__ 1.17549435e-38F"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__FLT_EPSILON__ 1.19209290e-7F"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__FLT_DENORM_MIN__ 1.40129846e-45F"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__FLT_HAS_INFINITY__ 1"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__FLT_HAS_QUIET_NAN__ 1"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__DBL_MANT_DIG__ 53"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__DBL_DIG__ 15"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__DBL_MIN_EXP__ (-1021)"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__DBL_MIN_10_EXP__ (-307)"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__DBL_MAX_EXP__ 1024"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__DBL_MAX_10_EXP__ 308"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__DBL_MAX__ 1.7976931348623157e+308"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__DBL_MIN__ 2.2250738585072014e-308"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__DBL_EPSILON__ 2.2204460492503131e-16"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__DBL_DENORM_MIN__ 4.9406564584124654e-324"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__DBL_HAS_INFINITY__ 1"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__DBL_HAS_QUIET_NAN__ 1"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__LDBL_MANT_DIG__ 53"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__LDBL_DIG__ 15"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__LDBL_MIN_EXP__ (-1021)"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__LDBL_MIN_10_EXP__ (-307)"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__LDBL_MAX_EXP__ 1024"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__LDBL_MAX_10_EXP__ 308"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__DECIMAL_DIG__ 17"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__LDBL_MAX__ 1.7976931348623157e+308L"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__LDBL_MIN__ 2.2250738585072014e-308L"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__LDBL_EPSILON__ 2.2204460492503131e-16L"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__LDBL_DENORM_MIN__ 4.9406564584124654e-324L"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__LDBL_HAS_INFINITY__ 1"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__LDBL_HAS_QUIET_NAN__ 1"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__REGISTER_PREFIX__ "
+ .byte 0x1
+ .uleb128 0x1
+ .string "__USER_LABEL_PREFIX__ "
+ .byte 0x1
+ .uleb128 0x1
+ .string "__VERSION__ \"4.1.1 (STMicroelectronics Special) [build Jun 26 2007]\""
+ .byte 0x1
+ .uleb128 0x1
+ .string "__NO_INLINE__ 1"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__FINITE_MATH_ONLY__ 1"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__sh__ 1"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__SH4__ 1"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__SH_FPU_ANY__ 1"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__SH_FPU_DOUBLE__ 1"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__LITTLE_ENDIAN__ 1"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__gnu_linux__ 1"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__linux 1"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__linux__ 1"
+ .byte 0x1
+ .uleb128 0x1
+ .string "linux 1"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__unix 1"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__unix__ 1"
+ .byte 0x1
+ .uleb128 0x1
+ .string "unix 1"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__ELF__ 1"
+ .byte 0x1
+ .uleb128 0x1
+ .string "DEBUG 1"
+ .byte 0x1
+ .uleb128 0x1
+ .string "_GNU_SOURCE 1"
+ .byte 0x1
+ .uleb128 0x1
+ .string "__USE_GNU 1"
+ .byte 0x3
+ .uleb128 0x2
+ .file 2 "./../../include/libc-symbols.h"
+ .uleb128 0x2
+ .byte 0x1
+ .uleb128 0x17
+ .string "_LIBC_SYMBOLS_H 1"
+ .byte 0x3
+ .uleb128 0x2a
+ .file 3 "../../include/bits/uClibc_arch_features.h"
+ .uleb128 0x3
+ .byte 0x1
+ .uleb128 0x6
+ .string "_BITS_UCLIBC_ARCH_FEATURES_H "
+ .byte 0x1
+ .uleb128 0xc
+ .string "__UCLIBC_ABORT_INSTRUCTION__ \"trapa #0xff\""
+ .byte 0x1
+ .uleb128 0x10
+ .string "__UCLIBC_MMAP_HAS_6_ARGS__ "
+ .byte 0x2
+ .uleb128 0x13
+ .string "__UCLIBC_TRUNCATE64_HAS_4_ARGS__"
+ .byte 0x2
+ .uleb128 0x16
+ .string "__UCLIBC_BROKEN_CREATE_MODULE__"
+ .byte 0x2
+ .uleb128 0x19
+ .string "__UCLIBC_HANDLE_OLDER_RLIMIT__"
+ .byte 0x1
+ .uleb128 0x1c
+ .string "__UCLIBC_NO_UNDERSCORES__ "
+ .byte 0x1
+ .uleb128 0x1f
+ .string "__UCLIBC_HAVE_ASM_SET_DIRECTIVE__ "
+ .byte 0x2
+ .uleb128 0x22
+ .string "__UCLIBC_ASM_GLOBAL_DIRECTIVE__"
+ .byte 0x1
+ .uleb128 0x25
+ .string "__UCLIBC_HAVE_ASM_WEAK_DIRECTIVE__ "
+ .byte 0x2
+ .uleb128 0x28
+ .string "__UCLIBC_HAVE_ASM_WEAKEXT_DIRECTIVE__"
+ .byte 0x2
+ .uleb128 0x2b
+ .string "__UCLIBC_HAVE_ASM_GLOBAL_DOT_NAME__"
+ .byte 0x1
+ .uleb128 0x2e
+ .string "__UCLIBC_HAVE_SIGNED_ZERO__ "
+ .byte 0x4
+ .byte 0x1
+ .uleb128 0x33
+ .string "_LIBC 1"
+ .byte 0x1
+ .uleb128 0x36
+ .string "_GNU_SOURCE 1"
+ .byte 0x1
+ .uleb128 0x3d
+ .string "likely(x) __builtin_expect((!!(x)),1)"
+ .byte 0x1
+ .uleb128 0x40
+ .string "unlikely(x) __builtin_expect((!!(x)),0)"
+ .byte 0x1
+ .uleb128 0x43
+ .string "__LINUX_COMPILER_H "
+ .byte 0x1
+ .uleb128 0x46
+ .string "__cast__(_to) "
+ .byte 0x1
+ .uleb128 0x49
+ .string "attribute_unused __attribute__ ((unused))"
+ .byte 0x1
+ .uleb128 0x4c
+ .string "attribute_noreturn __attribute__ ((__noreturn__))"
+ .byte 0x1
+ .uleb128 0x52
+ .string "IS_IN_libc 1"
+ .byte 0x1
+ .uleb128 0x56
+ .string "NO_UNDERSCORES "
+ .byte 0x1
+ .uleb128 0x5c
+ .string "HAVE_ASM_SET_DIRECTIVE "
+ .byte 0x1
+ .uleb128 0x64
+ .string "ASM_GLOBAL_DIRECTIVE .global"
+ .byte 0x1
+ .uleb128 0x68
+ .string "HAVE_ASM_WEAK_DIRECTIVE "
+ .byte 0x2
+ .uleb128 0x70
+ .string "HAVE_ASM_WEAKEXT_DIRECTIVE"
+ .byte 0x2
+ .uleb128 0x76
+ .string "HAVE_ASM_GLOBAL_DOT_NAME"
+ .byte 0x1
+ .uleb128 0x7a
+ .string "HAVE_WEAK_SYMBOLS "
+ .byte 0x2
+ .uleb128 0x7d
+ .string "C_SYMBOL_NAME"
+ .byte 0x1
+ .uleb128 0x80
+ .string "C_SYMBOL_NAME(name) name"
+ .byte 0x1
+ .uleb128 0x87
+ .string "ASM_LINE_SEP ;"
+ .byte 0x1
+ .uleb128 0x9a
+ .string "strong_alias(name,aliasname) _strong_alias(name, aliasname)"
+ .byte 0x1
+ .uleb128 0x9b
+ .string "_strong_alias(name,aliasname) extern __typeof (name) aliasname __attribute__ ((alias (#name)));"
+ .byte 0x1
+ .uleb128 0xa0
+ .string "weak_function __attribute__ ((weak))"
+ .byte 0x1
+ .uleb128 0xa1
+ .string "weak_const_function __attribute__ ((weak, __const__))"
+ .byte 0x1
+ .uleb128 0xa7
+ .string "weak_alias(name,aliasname) _weak_alias (name, aliasname)"
+ .byte 0x1
+ .uleb128 0xa8
+ .string "_weak_alias(name,aliasname) extern __typeof (name) aliasname __attribute__ ((weak, alias (#name)));"
+ .byte 0x1
+ .uleb128 0xac
+ .string "weak_extern(symbol) _weak_extern (weak symbol)"
+ .byte 0x1
+ .uleb128 0xad
+ .string "_weak_extern(expr) _Pragma (#expr)"
+ .byte 0x1
+ .uleb128 0x116
+ .string "internal_function "
+ .byte 0x1
+ .uleb128 0x11a
+ .string "__make_section_unallocated(section_string) __asm__ (\".section \" section_string \"\\n\\t.previous\");"
+ .byte 0x1
+ .uleb128 0x122
+ .string "__sec_comment \"\\n\\t#\""
+ .byte 0x1
+ .uleb128 0x12a
+ .string "link_warning(symbol,msg) __make_section_unallocated (\".gnu.warning.\" #symbol) static const char __evoke_link_warning_ ##symbol[] __attribute__ ((used, section (\".gnu.warning.\" #symbol __sec_comment))) = msg;"
+ .byte 0x1
+ .uleb128 0x143
+ .string "INTUSE(name) name"
+ .byte 0x1
+ .uleb128 0x144
+ .string "INTDEF(name) "
+ .byte 0x1
+ .uleb128 0x145
+ .string "INTVARDEF(name) "
+ .byte 0x1
+ .uleb128 0x146
+ .string "INTDEF2(name,newname) "
+ .byte 0x1
+ .uleb128 0x147
+ .string "INTVARDEF2(name,newname) "
+ .byte 0x1
+ .uleb128 0x1a3
+ .string "attribute_hidden __attribute__ ((visibility (\"hidden\")))"
+ .byte 0x1
+ .uleb128 0x1a4
+ .string "__hidden_proto_hiddenattr(attrs...) __attribute__ ((visibility (\"hidden\"), ##attrs))"
+ .byte 0x1
+ .uleb128 0x1ac
+ .string "hidden_proto(name,attrs...) __hidden_proto (name, __GI_ ##name, ##attrs)"
+ .byte 0x1
+ .uleb128 0x1ad
+ .string "__hidden_proto(name,internal,attrs...) extern __typeof (name) name __asm__ (__hidden_asmname (#internal)) __hidden_proto_hiddenattr (attrs);"
+ .byte 0x1
+ .uleb128 0x1b0
+ .string "__hidden_asmname(name) __hidden_asmname1 (__USER_LABEL_PREFIX__, name)"
+ .byte 0x1
+ .uleb128 0x1b1
+ .string "__hidden_asmname1(prefix,name) __hidden_asmname2(prefix, name)"
+ .byte 0x1
+ .uleb128 0x1b2
+ .string "__hidden_asmname2(prefix,name) #prefix name"
+ .byte 0x1
+ .uleb128 0x1b3
+ .string "__hidden_ver1(local,internal,name) extern __typeof (name) __EI_ ##name __asm__(__hidden_asmname (#internal)); extern __typeof (name) __EI_ ##name __attribute__((alias (__hidden_asmname1 (,#local))))"
+ .byte 0x1
+ .uleb128 0x1b6
+ .string "hidden_def(name) __hidden_ver1(__GI_ ##name, name, name);"
+ .byte 0x1
+ .uleb128 0x1b7
+ .string "hidden_data_def(name) hidden_def(name)"
+ .byte 0x1
+ .uleb128 0x1b8
+ .string "hidden_weak(name) __hidden_ver1(__GI_ ##name, name, name) __attribute__((weak));"
+ .byte 0x1
+ .uleb128 0x1b9
+ .string "hidden_data_weak(name) hidden_weak(name)"
+ .byte 0x1
+ .uleb128 0x203
+ .string "versioned_symbol(lib,local,symbol,version) "
+ .byte 0x1
+ .uleb128 0x204
+ .string "hidden_ver(local,name) "
+ .byte 0x1
+ .uleb128 0x205
+ .string "hidden_data_ver(local,name) "
+ .byte 0x1
+ .uleb128 0x208
+ .string "libc_hidden_proto(name,attrs...) hidden_proto (name, ##attrs)"
+ .byte 0x1
+ .uleb128 0x209
+ .string "libc_hidden_def(name) hidden_def (name)"
+ .byte 0x1
+ .uleb128 0x20a
+ .string "libc_hidden_weak(name) hidden_weak (name)"
+ .byte 0x1
+ .uleb128 0x20b
+ .string "libc_hidden_ver(local,name) hidden_ver (local, name)"
+ .byte 0x1
+ .uleb128 0x20c
+ .string "libc_hidden_data_def(name) hidden_data_def (name)"
+ .byte 0x1
+ .uleb128 0x20d
+ .string "libc_hidden_data_weak(name) hidden_data_weak (name)"
+ .byte 0x1
+ .uleb128 0x20e
+ .string "libc_hidden_data_ver(local,name) hidden_data_ver (local, name)"
+ .byte 0x1
+ .uleb128 0x222
+ .string "rtld_hidden_proto(name,attrs...) "
+ .byte 0x1
+ .uleb128 0x223
+ .string "rtld_hidden_def(name) "
+ .byte 0x1
+ .uleb128 0x224
+ .string "rtld_hidden_weak(name) "
+ .byte 0x1
+ .uleb128 0x225
+ .string "rtld_hidden_ver(local,name) "
+ .byte 0x1
+ .uleb128 0x226
+ .string "rtld_hidden_data_def(name) "
+ .byte 0x1
+ .uleb128 0x227
+ .string "rtld_hidden_data_weak(name) "
+ .byte 0x1
+ .uleb128 0x228
+ .string "rtld_hidden_data_ver(local,name) "
+ .byte 0x1
+ .uleb128 0x234
+ .string "libm_hidden_proto(name,attrs...) "
+ .byte 0x1
+ .uleb128 0x235
+ .string "libm_hidden_def(name) "
+ .byte 0x1
+ .uleb128 0x236
+ .string "libm_hidden_weak(name) "
+ .byte 0x1
+ .uleb128 0x237
+ .string "libm_hidden_ver(local,name) "
+ .byte 0x1
+ .uleb128 0x238
+ .string "libm_hidden_data_def(name) "
+ .byte 0x1
+ .uleb128 0x239
+ .string "libm_hidden_data_weak(name) "
+ .byte 0x1
+ .uleb128 0x23a
+ .string "libm_hidden_data_ver(local,name) "
+ .byte 0x1
+ .uleb128 0x246
+ .string "libresolv_hidden_proto(name,attrs...) "
+ .byte 0x1
+ .uleb128 0x247
+ .string "libresolv_hidden_def(name) "
+ .byte 0x1
+ .uleb128 0x248
+ .string "libresolv_hidden_weak(name) "
+ .byte 0x1
+ .uleb128 0x249
+ .string "libresolv_hidden_ver(local,name) "
+ .byte 0x1
+ .uleb128 0x24a
+ .string "libresolv_hidden_data_def(name) "
+ .byte 0x1
+ .uleb128 0x24b
+ .string "libresolv_hidden_data_weak(name) "
+ .byte 0x1
+ .uleb128 0x24c
+ .string "libresolv_hidden_data_ver(local,name) "
+ .byte 0x1
+ .uleb128 0x258
+ .string "librt_hidden_proto(name,attrs...) "
+ .byte 0x1
+ .uleb128 0x259
+ .string "librt_hidden_def(name) "
+ .byte 0x1
+ .uleb128 0x25a
+ .string "librt_hidden_weak(name) "
+ .byte 0x1
+ .uleb128 0x25b
+ .string "librt_hidden_ver(local,name) "
+ .byte 0x1
+ .uleb128 0x25c
+ .string "librt_hidden_data_def(name) "
+ .byte 0x1
+ .uleb128 0x25d
+ .string "librt_hidden_data_weak(name) "
+ .byte 0x1
+ .uleb128 0x25e
+ .string "librt_hidden_data_ver(local,name) "
+ .byte 0x1
+ .uleb128 0x26a
+ .string "libdl_hidden_proto(name,attrs...) "
+ .byte 0x1
+ .uleb128 0x26b
+ .string "libdl_hidden_def(name) "
+ .byte 0x1
+ .uleb128 0x26c
+ .string "libdl_hidden_weak(name) "
+ .byte 0x1
+ .uleb128 0x26d
+ .string "libdl_hidden_ver(local,name) "
+ .byte 0x1
+ .uleb128 0x26e
+ .string "libdl_hidden_data_def(name) "
+ .byte 0x1
+ .uleb128 0x26f
+ .string "libdl_hidden_data_weak(name) "
+ .byte 0x1
+ .uleb128 0x270
+ .string "libdl_hidden_data_ver(local,name) "
+ .byte 0x1
+ .uleb128 0x27c
+ .string "libintl_hidden_proto(name,attrs...) "
+ .byte 0x1
+ .uleb128 0x27d
+ .string "libintl_hidden_def(name) "
+ .byte 0x1
+ .uleb128 0x27e
+ .string "libintl_hidden_weak(name) "
+ .byte 0x1
+ .uleb128 0x27f
+ .string "libintl_hidden_ver(local,name) "
+ .byte 0x1
+ .uleb128 0x280
+ .string "libintl_hidden_data_def(name) "
+ .byte 0x1
+ .uleb128 0x281
+ .string "libintl_hidden_data_weak(name) "
+ .byte 0x1
+ .uleb128 0x282
+ .string "libintl_hidden_data_ver(local,name) "
+ .byte 0x1
+ .uleb128 0x28e
+ .string "libnsl_hidden_proto(name,attrs...) "
+ .byte 0x1
+ .uleb128 0x28f
+ .string "libnsl_hidden_def(name) "
+ .byte 0x1
+ .uleb128 0x290
+ .string "libnsl_hidden_weak(name) "
+ .byte 0x1
+ .uleb128 0x291
+ .string "libnsl_hidden_ver(local,name) "
+ .byte 0x1
+ .uleb128 0x292
+ .string "libnsl_hidden_data_def(name) "
+ .byte 0x1
+ .uleb128 0x293
+ .string "libnsl_hidden_data_weak(name) "
+ .byte 0x1
+ .uleb128 0x294
+ .string "libnsl_hidden_data_ver(local,name) "
+ .byte 0x1
+ .uleb128 0x2a0
+ .string "libutil_hidden_proto(name,attrs...) "
+ .byte 0x1
+ .uleb128 0x2a1
+ .string "libutil_hidden_def(name) "
+ .byte 0x1
+ .uleb128 0x2a2
+ .string "libutil_hidden_weak(name) "
+ .byte 0x1
+ .uleb128 0x2a3
+ .string "libutil_hidden_ver(local,name) "
+ .byte 0x1
+ .uleb128 0x2a4
+ .string "libutil_hidden_data_def(name) "
+ .byte 0x1
+ .uleb128 0x2a5
+ .string "libutil_hidden_data_weak(name) "
+ .byte 0x1
+ .uleb128 0x2a6
+ .string "libutil_hidden_data_ver(local,name) "
+ .byte 0x1
+ .uleb128 0x2b2
+ .string "libcrypt_hidden_proto(name,attrs...) "
+ .byte 0x1
+ .uleb128 0x2b3
+ .string "libcrypt_hidden_def(name) "
+ .byte 0x1
+ .uleb128 0x2b4
+ .string "libcrypt_hidden_weak(name) "
+ .byte 0x1
+ .uleb128 0x2b5
+ .string "libcrypt_hidden_ver(local,name) "
+ .byte 0x1
+ .uleb128 0x2b6
+ .string "libcrypt_hidden_data_def(name) "
+ .byte 0x1
+ .uleb128 0x2b7
+ .string "libcrypt_hidden_data_weak(name) "
+ .byte 0x1
+ .uleb128 0x2b8
+ .string "libcrypt_hidden_data_ver(local,name) "
+ .byte 0x1
+ .uleb128 0x2c4
+ .string "libpthread_hidden_proto(name,attrs...) "
+ .byte 0x1
+ .uleb128 0x2c5
+ .string "libpthread_hidden_def(name) "
+ .byte 0x1
+ .uleb128 0x2c6
+ .string "libpthread_hidden_weak(name) "
+ .byte 0x1
+ .uleb128 0x2c7
+ .string "libpthread_hidden_ver(local,name) "
+ .byte 0x1
+ .uleb128 0x2c8
+ .string "libpthread_hidden_data_def(name) "
+ .byte 0x1
+ .uleb128 0x2c9
+ .string "libpthread_hidden_data_weak(name) "
+ .byte 0x1
+ .uleb128 0x2ca
+ .string "libpthread_hidden_data_ver(local,name) "
+ .byte 0x4
+ .byte 0x1
+ .uleb128 0x5
+ .string "TST_FUNCTION mbrlen"
+ .byte 0x3
+ .uleb128 0x8
+ .file 4 "tsp_common.c"
+ .uleb128 0x4
+ .byte 0x1
+ .uleb128 0x7
+ .string "TST_FUNCTION_CALL(func) _TST_FUNCTION_CALL(func)"
+ .byte 0x1
+ .uleb128 0x8
+ .string "_TST_FUNCTION_CALL(func) tst ##_ ## func"
+ .byte 0x3
+ .uleb128 0xb
+ .file 5 "../../include/stdio.h"
+ .uleb128 0x5
+ .byte 0x1
+ .uleb128 0x1b
+ .string "_STDIO_H 1"
+ .byte 0x3
+ .uleb128 0x1d
+ .file 6 "../../include/features.h"
+ .uleb128 0x6
+ .byte 0x1
+ .uleb128 0x14
+ .string "_FEATURES_H 1"
+ .byte 0x1
+ .uleb128 0x19
+ .string "__UCLIBC__ 1"
+ .byte 0x1
+ .uleb128 0x22
+ .string "__need_uClibc_config_h "
+ .byte 0x3
+ .uleb128 0x24
+ .file 7 "../../include/bits/uClibc_config.h"
+ .uleb128 0x7
+ .byte 0x1
+ .uleb128 0xc
+ .string "__UCLIBC_MAJOR__ 0"
+ .byte 0x1
+ .uleb128 0xd
+ .string "__UCLIBC_MINOR__ 9"
+ .byte 0x1
+ .uleb128 0xe
+ .string "__UCLIBC_SUBLEVEL__ 29"
+ .byte 0x2
+ .uleb128 0xf
+ .string "__TARGET_alpha__"
+ .byte 0x2
+ .uleb128 0x10
+ .string "__TARGET_arm__"
+ .byte 0x2
+ .uleb128 0x11
+ .string "__TARGET_bfin__"
+ .byte 0x2
+ .uleb128 0x12
+ .string "__TARGET_cris__"
+ .byte 0x2
+ .uleb128 0x13
+ .string "__TARGET_e1__"
+ .byte 0x2
+ .uleb128 0x14
+ .string "__TARGET_frv__"
+ .byte 0x2
+ .uleb128 0x15
+ .string "__TARGET_h8300__"
+ .byte 0x2
+ .uleb128 0x16
+ .string "__TARGET_hppa__"
+ .byte 0x2
+ .uleb128 0x17
+ .string "__TARGET_i386__"
+ .byte 0x2
+ .uleb128 0x18
+ .string "__TARGET_i960__"
+ .byte 0x2
+ .uleb128 0x19
+ .string "__TARGET_ia64__"
+ .byte 0x2
+ .uleb128 0x1a
+ .string "__TARGET_m68k__"
+ .byte 0x2
+ .uleb128 0x1b
+ .string "__TARGET_microblaze__"
+ .byte 0x2
+ .uleb128 0x1c
+ .string "__TARGET_mips__"
+ .byte 0x2
+ .uleb128 0x1d
+ .string "__TARGET_nios__"
+ .byte 0x2
+ .uleb128 0x1e
+ .string "__TARGET_nios2__"
+ .byte 0x2
+ .uleb128 0x1f
+ .string "__TARGET_powerpc__"
+ .byte 0x1
+ .uleb128 0x20
+ .string "__TARGET_sh__ 1"
+ .byte 0x2
+ .uleb128 0x21
+ .string "__TARGET_sh64__"
+ .byte 0x2
+ .uleb128 0x22
+ .string "__TARGET_sparc__"
+ .byte 0x2
+ .uleb128 0x23
+ .string "__TARGET_v850__"
+ .byte 0x2
+ .uleb128 0x24
+ .string "__TARGET_vax__"
+ .byte 0x2
+ .uleb128 0x25
+ .string "__TARGET_x86_64__"
+ .byte 0x1
+ .uleb128 0x2a
+ .string "__TARGET_ARCH__ \"sh\""
+ .byte 0x1
+ .uleb128 0x2b
+ .string "__FORCE_OPTIONS_FOR_ARCH__ 1"
+ .byte 0x2
+ .uleb128 0x2c
+ .string "__CONFIG_SH2A__"
+ .byte 0x2
+ .uleb128 0x2d
+ .string "__CONFIG_SH2__"
+ .byte 0x2
+ .uleb128 0x2e
+ .string "__CONFIG_SH3__"
+ .byte 0x1
+ .uleb128 0x2f
+ .string "__CONFIG_SH4__ 1"
+ .byte 0x1
+ .uleb128 0x30
+ .string "__ARCH_HAS_BWD_MEMCPY__ 1"
+ .byte 0x1
+ .uleb128 0x31
+ .string "__TARGET_SUBARCH__ \"sh4\""
+ .byte 0x1
+ .uleb128 0x36
+ .string "__ARCH_ANY_ENDIAN__ 1"
+ .byte 0x1
+ .uleb128 0x37
+ .string "__ARCH_LITTLE_ENDIAN__ 1"
+ .byte 0x2
+ .uleb128 0x38
+ .string "__ARCH_WANTS_BIG_ENDIAN__"
+ .byte 0x1
+ .uleb128 0x39
+ .string "__ARCH_WANTS_LITTLE_ENDIAN__ 1"
+ .byte 0x1
+ .uleb128 0x3a
+ .string "__ARCH_HAS_MMU__ 1"
+ .byte 0x1
+ .uleb128 0x3b
+ .string "__ARCH_USE_MMU__ 1"
+ .byte 0x1
+ .uleb128 0x3c
+ .string "__UCLIBC_HAS_FLOATS__ 1"
+ .byte 0x1
+ .uleb128 0x3d
+ .string "__UCLIBC_HAS_FPU__ 1"
+ .byte 0x1
+ .uleb128 0x3e
+ .string "__DO_C99_MATH__ 1"
+ .byte 0x1
+ .uleb128 0x3f
+ .string "__KERNEL_HEADERS__ \"/opt/STM/STLinux-2.3ear/devkit/sh4/uclibc_target/usr/include\""
+ .byte 0x1
+ .uleb128 0x40
+ .string "__HAVE_DOT_CONFIG__ 1"
+ .byte 0x2
+ .uleb128 0x45
+ .string "__HAVE_NO_PIC__"
+ .byte 0x2
+ .uleb128 0x46
+ .string "__DOPIC__"
+ .byte 0x2
+ .uleb128 0x47
+ .string "__HAVE_NO_SHARED__"
+ .byte 0x2
+ .uleb128 0x48
+ .string "__ARCH_HAS_NO_LDSO__"
+ .byte 0x1
+ .uleb128 0x49
+ .string "__HAVE_SHARED__ 1"
+ .byte 0x1
+ .uleb128 0x4a
+ .string "__FORCE_SHAREABLE_TEXT_SEGMENTS__ 1"
+ .byte 0x1
+ .uleb128 0x4b
+ .string "__LDSO_LDD_SUPPORT__ 1"
+ .byte 0x1
+ .uleb128 0x4c
+ .string "__LDSO_CACHE_SUPPORT__ 1"
+ .byte 0x2
+ .uleb128 0x4d
+ .string "__LDSO_PRELOAD_FILE_SUPPORT__"
+ .byte 0x1
+ .uleb128 0x4e
+ .string "__LDSO_BASE_FILENAME__ \"ld.so\""
+ .byte 0x2
+ .uleb128 0x4f
+ .string "__UCLIBC_STATIC_LDCONFIG__"
+ .byte 0x1
+ .uleb128 0x50
+ .string "__LDSO_RUNPATH__ 1"
+ .byte 0x1
+ .uleb128 0x51
+ .string "__UCLIBC_CTOR_DTOR__ 1"
+ .byte 0x1
+ .uleb128 0x52
+ .string "__LDSO_GNU_HASH_SUPPORT__ 1"
+ .byte 0x2
+ .uleb128 0x53
+ .string "__HAS_NO_THREADS__"
+ .byte 0x1
+ .uleb128 0x54
+ .string "__UCLIBC_HAS_THREADS__ 1"
+ .byte 0x1
+ .uleb128 0x55
+ .string "__UCLIBC_HAS_THREADS_NATIVE__ 1"
+ .byte 0x1
+ .uleb128 0x56
+ .string "__PTHREADS_DEBUG_SUPPORT__ 1"
+ .byte 0x2
+ .uleb128 0x57
+ .string "__LINUXTHREADS_OLD__"
+ .byte 0x1
+ .uleb128 0x58
+ .string "__UCLIBC_HAS_LFS__ 1"
+ .byte 0x2
+ .uleb128 0x59
+ .string "__MALLOC__"
+ .byte 0x2
+ .uleb128 0x5a
+ .string "__MALLOC_SIMPLE__"
+ .byte 0x1
+ .uleb128 0x5b
+ .string "__MALLOC_STANDARD__ 1"
+ .byte 0x2
+ .uleb128 0x5c
+ .string "__MALLOC_GLIBC_COMPAT__"
+ .byte 0x2
+ .uleb128 0x5d
+ .string "__UCLIBC_DYNAMIC_ATEXIT__"
+ .byte 0x1
+ .uleb128 0x5e
+ .string "__COMPAT_ATEXIT__ 1"
+ .byte 0x1
+ .uleb128 0x5f
+ .string "__UCLIBC_SUSV3_LEGACY__ 1"
+ .byte 0x2
+ .uleb128 0x60
+ .string "__UCLIBC_SUSV3_LEGACY_MACROS__"
+ .byte 0x1
+ .uleb128 0x61
+ .string "__UCLIBC_HAS_SHADOW__ 1"
+ .byte 0x2
+ .uleb128 0x62
+ .string "__UCLIBC_HAS_PROGRAM_INVOCATION_NAME__"
+ .byte 0x1
+ .uleb128 0x63
+ .string "__UCLIBC_HAS___PROGNAME__ 1"
+ .byte 0x1
+ .uleb128 0x64
+ .string "__UNIX98PTY_ONLY__ 1"
+ .byte 0x1
+ .uleb128 0x65
+ .string "__ASSUME_DEVPTS__ 1"
+ .byte 0x1
+ .uleb128 0x66
+ .string "__UCLIBC_HAS_TM_EXTENSIONS__ 1"
+ .byte 0x1
+ .uleb128 0x67
+ .string "__UCLIBC_HAS_TZ_CACHING__ 1"
+ .byte 0x1
+ .uleb128 0x68
+ .string "__UCLIBC_HAS_TZ_FILE__ 1"
+ .byte 0x1
+ .uleb128 0x69
+ .string "__UCLIBC_HAS_TZ_FILE_READ_MANY__ 1"
+ .byte 0x1
+ .uleb128 0x6a
+ .string "__UCLIBC_TZ_FILE_PATH__ \"/etc/TZ\""
+ .byte 0x1
+ .uleb128 0x6f
+ .string "__UCLIBC_HAS_IPV6__ 1"
+ .byte 0x1
+ .uleb128 0x70
+ .string "__UCLIBC_HAS_RPC__ 1"
+ .byte 0x1
+ .uleb128 0x71
+ .string "__UCLIBC_HAS_FULL_RPC__ 1"
+ .byte 0x1
+ .uleb128 0x72
+ .string "__UCLIBC_HAS_REENTRANT_RPC__ 1"
+ .byte 0x2
+ .uleb128 0x73
+ .string "__UCLIBC_USE_NETLINK__"
+ .byte 0x1
+ .uleb128 0x78
+ .string "__UCLIBC_HAS_STRING_GENERIC_OPT__ 1"
+ .byte 0x1
+ .uleb128 0x79
+ .string "__UCLIBC_HAS_STRING_ARCH_OPT__ 1"
+ .byte 0x1
+ .uleb128 0x7a
+ .string "__UCLIBC_HAS_CTYPE_TABLES__ 1"
+ .byte 0x1
+ .uleb128 0x7b
+ .string "__UCLIBC_HAS_CTYPE_SIGNED__ 1"
+ .byte 0x1
+ .uleb128 0x7c
+ .string "__UCLIBC_HAS_CTYPE_UNSAFE__ 1"
+ .byte 0x2
+ .uleb128 0x7d
+ .string "__UCLIBC_HAS_CTYPE_CHECKED__"
+ .byte 0x2
+ .uleb128 0x7e
+ .string "__UCLIBC_HAS_CTYPE_ENFORCED__"
+ .byte 0x1
+ .uleb128 0x7f
+ .string "__UCLIBC_HAS_WCHAR__ 1"
+ .byte 0x1
+ .uleb128 0x80
+ .string "__UCLIBC_HAS_LOCALE__ 1"
+ .byte 0x2
+ .uleb128 0x81
+ .string "__UCLIBC_PREGENERATED_LOCALE_DATA__"
+ .byte 0x2
+ .uleb128 0x82
+ .string "__UCLIBC_HAS_XLOCALE__"
+ .byte 0x2
+ .uleb128 0x83
+ .string "__UCLIBC_HAS_HEXADECIMAL_FLOATS__"
+ .byte 0x2
+ .uleb128 0x84
+ .string "__UCLIBC_HAS_GLIBC_DIGIT_GROUPING__"
+ .byte 0x2
+ .uleb128 0x85
+ .string "__UCLIBC_HAS_GLIBC_CUSTOM_PRINTF__"
+ .byte 0x1
+ .uleb128 0x86
+ .string "__UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS__ 9"
+ .byte 0x2
+ .uleb128 0x87
+ .string "__UCLIBC_HAS_SCANF_GLIBC_A_FLAG__"
+ .byte 0x2
+ .uleb128 0x88
+ .string "__UCLIBC_HAS_STDIO_BUFSIZ_NONE__"
+ .byte 0x2
+ .uleb128 0x89
+ .string "__UCLIBC_HAS_STDIO_BUFSIZ_256__"
+ .byte 0x2
+ .uleb128 0x8a
+ .string "__UCLIBC_HAS_STDIO_BUFSIZ_512__"
+ .byte 0x2
+ .uleb128 0x8b
+ .string "__UCLIBC_HAS_STDIO_BUFSIZ_1024__"
+ .byte 0x2
+ .uleb128 0x8c
+ .string "__UCLIBC_HAS_STDIO_BUFSIZ_2048__"
+ .byte 0x1
+ .uleb128 0x8d
+ .string "__UCLIBC_HAS_STDIO_BUFSIZ_4096__ 1"
+ .byte 0x2
+ .uleb128 0x8e
+ .string "__UCLIBC_HAS_STDIO_BUFSIZ_8192__"
+ .byte 0x1
+ .uleb128 0x8f
+ .string "__UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE__ 1"
+ .byte 0x2
+ .uleb128 0x90
+ .string "__UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4__"
+ .byte 0x2
+ .uleb128 0x91
+ .string "__UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8__"
+ .byte 0x2
+ .uleb128 0x92
+ .string "__UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT__"
+ .byte 0x1
+ .uleb128 0x93
+ .string "__UCLIBC_HAS_STDIO_GETC_MACRO__ 1"
+ .byte 0x1
+ .uleb128 0x94
+ .string "__UCLIBC_HAS_STDIO_PUTC_MACRO__ 1"
+ .byte 0x1
+ .uleb128 0x95
+ .string "__UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION__ 1"
+ .byte 0x2
+ .uleb128 0x96
+ .string "__UCLIBC_HAS_FOPEN_LARGEFILE_MODE__"
+ .byte 0x2
+ .uleb128 0x97
+ .string "__UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE__"
+ .byte 0x2
+ .uleb128 0x98
+ .string "__UCLIBC_HAS_GLIBC_CUSTOM_STREAMS__"
+ .byte 0x1
+ .uleb128 0x99
+ .string "__UCLIBC_HAS_PRINTF_M_SPEC__ 1"
+ .byte 0x1
+ .uleb128 0x9a
+ .string "__UCLIBC_HAS_ERRNO_MESSAGES__ 1"
+ .byte 0x1
+ .uleb128 0x9b
+ .string "__UCLIBC_HAS_SYS_ERRLIST__ 1"
+ .byte 0x1
+ .uleb128 0x9c
+ .string "__UCLIBC_HAS_SIGNUM_MESSAGES__ 1"
+ .byte 0x2
+ .uleb128 0x9d
+ .string "__UCLIBC_HAS_SYS_SIGLIST__"
+ .byte 0x2
+ .uleb128 0x9e
+ .string "__UCLIBC_HAS_GETTEXT_AWARENESS__"
+ .byte 0x1
+ .uleb128 0x9f
+ .string "__UCLIBC_HAS_GNU_GETOPT__ 1"
+ .byte 0x1
+ .uleb128 0xa0
+ .string "__UCLIBC_HAS_STDIO_FUTEXES__ 1"
+ .byte 0x1
+ .uleb128 0xa1
+ .string "__UCLIBC_HAS_GNU_GETSUBOPT__ 1"
+ .byte 0x1
+ .uleb128 0xa6
+ .string "__UCLIBC_HAS_REGEX__ 1"
+ .byte 0x2
+ .uleb128 0xa7
+ .string "__UCLIBC_HAS_REGEX_OLD__"
+ .byte 0x1
+ .uleb128 0xa8
+ .string "__UCLIBC_HAS_FNMATCH__ 1"
+ .byte 0x1
+ .uleb128 0xa9
+ .string "__UCLIBC_HAS_FNMATCH_OLD__ 1"
+ .byte 0x2
+ .uleb128 0xaa
+ .string "__UCLIBC_HAS_WORDEXP__"
+ .byte 0x2
+ .uleb128 0xab
+ .string "__UCLIBC_HAS_FTW__"
+ .byte 0x1
+ .uleb128 0xac
+ .string "__UCLIBC_HAS_GLOB__ 1"
+ .byte 0x1
+ .uleb128 0xad
+ .string "__UCLIBC_HAS_GNU_GLOB__ 1"
+ .byte 0x1
+ .uleb128 0xb2
+ .string "__SHARED_LIB_LOADER_PREFIX__ \"/lib\""
+ .byte 0x1
+ .uleb128 0xb3
+ .string "__RUNTIME_PREFIX__ \"/\""
+ .byte 0x1
+ .uleb128 0xb4
+ .string "__DEVEL_PREFIX__ \"/usr\""
+ .byte 0x2
+ .uleb128 0xb9
+ .string "__UCLIBC_HAS_ARC4RANDOM__"
+ .byte 0x2
+ .uleb128 0xba
+ .string "__HAVE_NO_SSP__"
+ .byte 0x2
+ .uleb128 0xbb
+ .string "__UCLIBC_HAS_SSP__"
+ .byte 0x1
+ .uleb128 0xbc
+ .string "__UCLIBC_BUILD_RELRO__ 1"
+ .byte 0x2
+ .uleb128 0xbd
+ .string "__UCLIBC_BUILD_NOW__"
+ .byte 0x1
+ .uleb128 0xbe
+ .string "__UCLIBC_BUILD_NOEXECSTACK__ 1"
+ .byte 0x1
+ .uleb128 0xc3
+ .string "__CROSS_COMPILER_PREFIX__ \"sh4-linux-uclibc-\""
+ .byte 0x1
+ .uleb128 0xc4
+ .string "__UCLIBC_EXTRA_CFLAGS__ \"\""
+ .byte 0x1
+ .uleb128 0xc5
+ .string "__DODEBUG__ 1"
+ .byte 0x1
+ .uleb128 0xc6
+ .string "__DOASSERTS__ 1"
+ .byte 0x1
+ .uleb128 0xc7
+ .string "__SUPPORT_LD_DEBUG__ 1"
+ .byte 0x1
+ .uleb128 0xc8
+ .string "__SUPPORT_LD_DEBUG_EARLY__ 1"
+ .byte 0x2
+ .uleb128 0xc9
+ .string "__UCLIBC_MALLOC_DEBUGGING__"
+ .byte 0x1
+ .uleb128 0xca
+ .string "__WARNINGS__ \"-Wall\""
+ .byte 0x1
+ .uleb128 0xcb
+ .string "__EXTRA_WARNINGS__ 1"
+ .byte 0x2
+ .uleb128 0xcc
+ .string "__DOMULTI__"
+ .byte 0x1
+ .uleb128 0xcd
+ .string "__UCLIBC_MJN3_ONLY__ 1"
+ .byte 0x4
+ .byte 0x2
+ .uleb128 0x24
+ .string "__need_uClibc_config_h"
+ .byte 0x1
+ .uleb128 0x29
+ .string "__OPTIMIZE_SIZE__ 1"
+ .byte 0x2
+ .uleb128 0x71
+ .string "__USE_ISOC99"
+ .byte 0x2
+ .uleb128 0x72
+ .string "__USE_POSIX"
+ .byte 0x2
+ .uleb128 0x73
+ .string "__USE_POSIX2"
+ .byte 0x2
+ .uleb128 0x74
+ .string "__USE_POSIX199309"
+ .byte 0x2
+ .uleb128 0x75
+ .string "__USE_POSIX199506"
+ .byte 0x2
+ .uleb128 0x76
+ .string "__USE_XOPEN"
+ .byte 0x2
+ .uleb128 0x77
+ .string "__USE_XOPEN_EXTENDED"
+ .byte 0x2
+ .uleb128 0x78
+ .string "__USE_UNIX98"
+ .byte 0x2
+ .uleb128 0x79
+ .string "__USE_XOPEN2K"
+ .byte 0x2
+ .uleb128 0x7a
+ .string "__USE_LARGEFILE"
+ .byte 0x2
+ .uleb128 0x7b
+ .string "__USE_LARGEFILE64"
+ .byte 0x2
+ .uleb128 0x7c
+ .string "__USE_FILE_OFFSET64"
+ .byte 0x2
+ .uleb128 0x7d
+ .string "__USE_BSD"
+ .byte 0x2
+ .uleb128 0x7e
+ .string "__USE_SVID"
+ .byte 0x2
+ .uleb128 0x7f
+ .string "__USE_MISC"
+ .byte 0x2
+ .uleb128 0x80
+ .string "__USE_ATFILE"
+ .byte 0x2
+ .uleb128 0x81
+ .string "__USE_GNU"
+ .byte 0x2
+ .uleb128 0x82
+ .string "__USE_REENTRANT"
+ .byte 0x2
+ .uleb128 0x83
+ .string "__USE_FORTIFY_LEVEL"
+ .byte 0x2
+ .uleb128 0x84
+ .string "__FAVOR_BSD"
+ .byte 0x2
+ .uleb128 0x85
+ .string "__KERNEL_STRICT_NAMES"
+ .byte 0x1
+ .uleb128 0x8a
+ .string "__KERNEL_STRICT_NAMES "
+ .byte 0x1
+ .uleb128 0x8e
+ .string "__USE_ANSI 1"
+ .byte 0x1
+ .uleb128 0x98
+ .string "__GNUC_PREREQ(maj,min) ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))"
+ .byte 0x2
+ .uleb128 0xa9
+ .string "_ISOC99_SOURCE"
+ .byte 0x1
+ .uleb128 0xaa
+ .string "_ISOC99_SOURCE 1"
+ .byte 0x2
+ .uleb128 0xab
+ .string "_POSIX_SOURCE"
+ .byte 0x1
+ .uleb128 0xac
+ .string "_POSIX_SOURCE 1"
+ .byte 0x2
+ .uleb128 0xad
+ .string "_POSIX_C_SOURCE"
+ .byte 0x1
+ .uleb128 0xae
+ .string "_POSIX_C_SOURCE 199506L"
+ .byte 0x2
+ .uleb128 0xaf
+ .string "_XOPEN_SOURCE"
+ .byte 0x1
+ .uleb128 0xb0
+ .string "_XOPEN_SOURCE 600"
+ .byte 0x2
+ .uleb128 0xb1
+ .string "_XOPEN_SOURCE_EXTENDED"
+ .byte 0x1
+ .uleb128 0xb2
+ .string "_XOPEN_SOURCE_EXTENDED 1"
+ .byte 0x2
+ .uleb128 0xb4
+ .string "_LARGEFILE64_SOURCE"
+ .byte 0x1
+ .uleb128 0xb5
+ .string "_LARGEFILE64_SOURCE 1"
+ .byte 0x2
+ .uleb128 0xb7
+ .string "_BSD_SOURCE"
+ .byte 0x1
+ .uleb128 0xb8
+ .string "_BSD_SOURCE 1"
+ .byte 0x2
+ .uleb128 0xb9
+ .string "_SVID_SOURCE"
+ .byte 0x1
+ .uleb128 0xba
+ .string "_SVID_SOURCE 1"
+ .byte 0x2
+ .uleb128 0xbb
+ .string "_ATFILE_SOURCE"
+ .byte 0x1
+ .uleb128 0xbc
+ .string "_ATFILE_SOURCE 1"
+ .byte 0x1
+ .uleb128 0xcf
+ .string "__USE_ISOC99 1"
+ .byte 0x1
+ .uleb128 0xdf
+ .string "__USE_POSIX 1"
+ .byte 0x1
+ .uleb128 0xe3
+ .string "__USE_POSIX2 1"
+ .byte 0x1
+ .uleb128 0xe7
+ .string "__USE_POSIX199309 1"
+ .byte 0x1
+ .uleb128 0xeb
+ .string "__USE_POSIX199506 1"
+ .byte 0x1
+ .uleb128 0xf3
+ .string "__USE_XOPEN 1"
+ .byte 0x1
+ .uleb128 0xf5
+ .string "__USE_XOPEN_EXTENDED 1"
+ .byte 0x1
+ .uleb128 0xf6
+ .string "__USE_UNIX98 1"
+ .byte 0x2
+ .uleb128 0xf7
+ .string "_LARGEFILE_SOURCE"
+ .byte 0x1
+ .uleb128 0xf8
+ .string "_LARGEFILE_SOURCE 1"
+ .byte 0x1
+ .uleb128 0xfa
+ .string "__USE_XOPEN2K 1"
+ .byte 0x2
+ .uleb128 0xfb
+ .string "__USE_ISOC99"
+ .byte 0x1
+ .uleb128 0xfc
+ .string "__USE_ISOC99 1"
+ .byte 0x1
+ .uleb128 0x106
+ .string "__USE_LARGEFILE 1"
+ .byte 0x1
+ .uleb128 0x10a
+ .string "__USE_LARGEFILE64 1"
+ .byte 0x1
+ .uleb128 0x112
+ .string "__USE_MISC 1"
+ .byte 0x1
+ .uleb128 0x116
+ .string "__USE_BSD 1"
+ .byte 0x1
+ .uleb128 0x11a
+ .string "__USE_SVID 1"
+ .byte 0x1
+ .uleb128 0x11e
+ .string "__USE_ATFILE 1"
+ .byte 0x1
+ .uleb128 0x122
+ .string "__USE_GNU 1"
+ .byte 0x2
+ .uleb128 0x12a
+ .string "_FORTIFY_SOURCE"
+ .byte 0x1
+ .uleb128 0x133
+ .string "__USE_FORTIFY_LEVEL 0"
+ .byte 0x1
+ .uleb128 0x137
+ .string "__STDC_IEC_559__ 1"
+ .byte 0x1
+ .uleb128 0x138
+ .string "__STDC_IEC_559_COMPLEX__ 1"
+ .byte 0x1
+ .uleb128 0x13c
+ .string "__STDC_ISO_10646__ 200009L"
+ .byte 0x1
+ .uleb128 0x154
+ .string "__GLIBC_PREREQ(maj,min) ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))"
+ .byte 0x3
+ .uleb128 0x165
+ .file 8 "../../include/sys/cdefs.h"
+ .uleb128 0x8
+ .byte 0x1
+ .uleb128 0x14
+ .string "_SYS_CDEFS_H 1"
+ .byte 0x2
+ .uleb128 0x23
+ .string "__P"
+ .byte 0x2
+ .uleb128 0x24
+ .string "__PMT"
+ .byte 0x1
+ .uleb128 0x2e
+ .string "__THROW __attribute__ ((__nothrow__))"
+ .byte 0x1
+ .uleb128 0x2f
+ .string "__NTH(fct) __attribute__ ((__nothrow__)) fct"
+ .byte 0x1
+ .uleb128 0x49
+ .string "__P(args) args"
+ .byte 0x1
+ .uleb128 0x4a
+ .string "__PMT(args) args"
+ .byte 0x1
+ .uleb128 0x4f
+ .string "__CONCAT(x,y) x ## y"
+ .byte 0x1
+ .uleb128 0x50
+ .string "__STRING(x) #x"
+ .byte 0x1
+ .uleb128 0x53
+ .string "__ptr_t void *"
+ .byte 0x1
+ .uleb128 0x54
+ .string "__long_double_t long double"
+ .byte 0x1
+ .uleb128 0x5c
+ .string "__BEGIN_DECLS "
+ .byte 0x1
+ .uleb128 0x5d
+ .string "__END_DECLS "
+ .byte 0x1
+ .uleb128 0x71
+ .string "__BEGIN_NAMESPACE_STD "
+ .byte 0x1
+ .uleb128 0x72
+ .string "__END_NAMESPACE_STD "
+ .byte 0x1
+ .uleb128 0x73
+ .string "__USING_NAMESPACE_STD(name) "
+ .byte 0x1
+ .uleb128 0x74
+ .string "__BEGIN_NAMESPACE_C99 "
+ .byte 0x1
+ .uleb128 0x75
+ .string "__END_NAMESPACE_C99 "
+ .byte 0x1
+ .uleb128 0x76
+ .string "__USING_NAMESPACE_C99(name) "
+ .byte 0x1
+ .uleb128 0x7c
+ .string "__bounded "
+ .byte 0x1
+ .uleb128 0x7d
+ .string "__unbounded "
+ .byte 0x1
+ .uleb128 0x7e
+ .string "__ptrvalue "
+ .byte 0x1
+ .uleb128 0x83
+ .string "__bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1)"
+ .byte 0x1
+ .uleb128 0x84
+ .string "__bos0(ptr) __builtin_object_size (ptr, 0)"
+ .byte 0x1
+ .uleb128 0x85
+ .string "__warndecl(name,msg) extern void name (void)"
+ .byte 0x1
+ .uleb128 0x8b
+ .string "__flexarr []"
+ .byte 0x1
+ .uleb128 0xa6
+ .string "__REDIRECT(name,proto,alias) name proto __asm__ (__ASMNAME (#alias))"
+ .byte 0x1
+ .uleb128 0xab
+ .string "__REDIRECT_NTH(name,proto,alias) name proto __asm__ (__ASMNAME (#alias)) __THROW"
+ .byte 0x1
+ .uleb128 0xae
+ .string "__ASMNAME(cname) __ASMNAME2 (__USER_LABEL_PREFIX__, cname)"
+ .byte 0x1
+ .uleb128 0xaf
+ .string "__ASMNAME2(prefix,cname) __STRING (prefix) cname"
+ .byte 0x1
+ .uleb128 0xc4
+ .string "__attribute_malloc__ __attribute__ ((__malloc__))"
+ .byte 0x1
+ .uleb128 0xcd
+ .string "__attribute_pure__ __attribute__ ((__pure__))"
+ .byte 0x1
+ .uleb128 0xd6
+ .string "__attribute_used__ __attribute__ ((__used__))"
+ .byte 0x1
+ .uleb128 0xd7
+ .string "__attribute_noinline__ __attribute__ ((__noinline__))"
+ .byte 0x1
+ .uleb128 0xdf
+ .string "__attribute_deprecated__ __attribute__ ((__deprecated__))"
+ .byte 0x1
+ .uleb128 0xeb
+ .string "__attribute_format_arg__(x) __attribute__ ((__format_arg__ (x)))"
+ .byte 0x1
+ .uleb128 0xf5
+ .string "__attribute_format_strfmon__(a,b) __attribute__ ((__format__ (__strfmon__, a, b)))"
+ .byte 0x1
+ .uleb128 0xfe
+ .string "__nonnull(params) __attribute__ ((__nonnull__ params))"
+ .byte 0x1
+ .uleb128 0x106
+ .string "__attribute_warn_unused_result__ __attribute__ ((__warn_unused_result__))"
+ .byte 0x1
+ .uleb128 0x10f
+ .string "__wur "
+ .byte 0x1
+ .uleb128 0x114
+ .string "__always_inline __inline __attribute__ ((__always_inline__))"
+ .byte 0x1
+ .uleb128 0x12a
+ .string "__restrict_arr __restrict"
+ .byte 0x4
+ .byte 0x2
+ .uleb128 0x18c
+ .string "_LARGEFILE_SOURCE"
+ .byte 0x2
+ .uleb128 0x18d
+ .string "_LARGEFILE64_SOURCE"
+ .byte 0x2
+ .uleb128 0x18e
+ .string "_FILE_OFFSET_BITS"
+ .byte 0x2
+ .uleb128 0x18f
+ .string "__USE_LARGEFILE"
+ .byte 0x2
+ .uleb128 0x190
+ .string "__USE_LARGEFILE64"
+ .byte 0x2
+ .uleb128 0x191
+ .string "__USE_FILE_OFFSET64"
+ .byte 0x1
+ .uleb128 0x192
+ .string "_LARGEFILE_SOURCE 1"
+ .byte 0x1
+ .uleb128 0x193
+ .string "_LARGEFILE64_SOURCE 1"
+ .byte 0x1
+ .uleb128 0x194
+ .string "__USE_LARGEFILE 1"
+ .byte 0x1
+ .uleb128 0x195
+ .string "__USE_LARGEFILE64 1"
+ .byte 0x2
+ .uleb128 0x199
+ .string "_ATFILE_SOURCE"
+ .byte 0x2
+ .uleb128 0x19a
+ .string "__USE_ATFILE"
+ .byte 0x3
+ .uleb128 0x19e
+ .file 9 "../../include/libc-internal.h"
+ .uleb128 0x9
+ .byte 0x1
+ .uleb128 0x14
+ .string "_LIBC_INTERNAL_H 1"
+ .byte 0x3
+ .uleb128 0x17
+ .uleb128 0x6
+ .byte 0x4
+ .byte 0x1
+ .uleb128 0x19
+ .string "attribute_relro __attribute__ ((section (\".data.rel.ro\")))"
+ .byte 0x1
+ .uleb128 0x1f
+ .string "attribute_tls_model_ie __attribute__ ((tls_model (\"initial-exec\")))"
+ .byte 0x1
+ .uleb128 0x2b
+ .string "__need_size_t "
+ .byte 0x3
+ .uleb128 0x2d
+ .file 10 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stddef.h"
+ .uleb128 0xa
+ .byte 0x1
+ .uleb128 0xbd
+ .string "__size_t__ "
+ .byte 0x1
+ .uleb128 0xbe
+ .string "__SIZE_T__ "
+ .byte 0x1
+ .uleb128 0xbf
+ .string "_SIZE_T "
+ .byte 0x1
+ .uleb128 0xc0
+ .string "_SYS_SIZE_T_H "
+ .byte 0x1
+ .uleb128 0xc1
+ .string "_T_SIZE_ "
+ .byte 0x1
+ .uleb128 0xc2
+ .string "_T_SIZE "
+ .byte 0x1
+ .uleb128 0xc3
+ .string "__SIZE_T "
+ .byte 0x1
+ .uleb128 0xc4
+ .string "_SIZE_T_ "
+ .byte 0x1
+ .uleb128 0xc5
+ .string "_BSD_SIZE_T_ "
+ .byte 0x1
+ .uleb128 0xc6
+ .string "_SIZE_T_DEFINED_ "
+ .byte 0x1
+ .uleb128 0xc7
+ .string "_SIZE_T_DEFINED "
+ .byte 0x1
+ .uleb128 0xc8
+ .string "_BSD_SIZE_T_DEFINED_ "
+ .byte 0x1
+ .uleb128 0xc9
+ .string "_SIZE_T_DECLARED "
+ .byte 0x1
+ .uleb128 0xca
+ .string "___int_size_t_h "
+ .byte 0x1
+ .uleb128 0xcb
+ .string "_GCC_SIZE_T "
+ .byte 0x1
+ .uleb128 0xcc
+ .string "_SIZET_ "
+ .byte 0x1
+ .uleb128 0xd0
+ .string "__size_t "
+ .byte 0x2
+ .uleb128 0xec
+ .string "__need_size_t"
+ .byte 0x2
+ .uleb128 0x199
+ .string "__need_NULL"
+ .byte 0x4
+ .byte 0x3
+ .uleb128 0x46
+ .file 11 "../../include/bits/stackinfo.h"
+ .uleb128 0xb
+ .byte 0x1
+ .uleb128 0x17
+ .string "_STACKINFO_H 1"
+ .byte 0x1
+ .uleb128 0x1a
+ .string "_STACK_GROWS_DOWN 1"
+ .byte 0x4
+ .byte 0x1
+ .uleb128 0x47
+ .string "extend_alloca(buf,len,newlen) (__typeof (buf)) ({ size_t __newlen = (newlen); char *__newbuf = alloca (__newlen); if (__newbuf + __newlen == (char *) buf) len += __newlen; else len = __newlen; __newbuf; })"
+ .byte 0x4
+ .byte 0x1
+ .uleb128 0x1a6
+ .string "__user "
+ .byte 0x4
+ .byte 0x1
+ .uleb128 0x20
+ .string "__need_size_t "
+ .byte 0x1
+ .uleb128 0x21
+ .string "__need_NULL "
+ .byte 0x3
+ .uleb128 0x23
+ .uleb128 0xa
+ .byte 0x2
+ .uleb128 0xec
+ .string "__need_size_t"
+ .byte 0x2
+ .uleb128 0x18e
+ .string "NULL"
+ .byte 0x1
+ .uleb128 0x193
+ .string "NULL ((void *)0)"
+ .byte 0x2
+ .uleb128 0x199
+ .string "__need_NULL"
+ .byte 0x4
+ .byte 0x3
+ .uleb128 0x25
+ .file 12 "../../include/bits/types.h"
+ .uleb128 0xc
+ .byte 0x1
+ .uleb128 0x19
+ .string "_BITS_TYPES_H 1"
+ .byte 0x3
+ .uleb128 0x1d
+ .file 13 "../../include/bits/wordsize.h"
+ .uleb128 0xd
+ .byte 0x1
+ .uleb128 0x13
+ .string "__WORDSIZE 32"
+ .byte 0x4
+ .byte 0x1
+ .uleb128 0x1e
+ .string "__need_size_t "
+ .byte 0x3
+ .uleb128 0x20
+ .uleb128 0xa
+ .byte 0x2
+ .uleb128 0xec
+ .string "__need_size_t"
+ .byte 0x2
+ .uleb128 0x199
+ .string "__need_NULL"
+ .byte 0x4
+ .byte 0x3
+ .uleb128 0x21
+ .file 14 "../../include/bits/kernel_types.h"
+ .uleb128 0xe
+ .byte 0x1
+ .uleb128 0x8
+ .string "__ASM_SH_POSIX_TYPES_H "
+ .byte 0x4
+ .byte 0x1
+ .uleb128 0x67
+ .string "__S16_TYPE short int"
+ .byte 0x1
+ .uleb128 0x68
+ .string "__U16_TYPE unsigned short int"
+ .byte 0x1
+ .uleb128 0x69
+ .string "__S32_TYPE int"
+ .byte 0x1
+ .uleb128 0x6a
+ .string "__U32_TYPE unsigned int"
+ .byte 0x1
+ .uleb128 0x6b
+ .string "__SLONGWORD_TYPE long int"
+ .byte 0x1
+ .uleb128 0x6c
+ .string "__ULONGWORD_TYPE unsigned long int"
+ .byte 0x1
+ .uleb128 0x6e
+ .string "__SQUAD_TYPE __quad_t"
+ .byte 0x1
+ .uleb128 0x6f
+ .string "__UQUAD_TYPE __u_quad_t"
+ .byte 0x1
+ .uleb128 0x70
+ .string "__SWORD_TYPE int"
+ .byte 0x1
+ .uleb128 0x71
+ .string "__UWORD_TYPE unsigned int"
+ .byte 0x1
+ .uleb128 0x72
+ .string "__SLONG32_TYPE long int"
+ .byte 0x1
+ .uleb128 0x73
+ .string "__ULONG32_TYPE unsigned long int"
+ .byte 0x1
+ .uleb128 0x74
+ .string "__S64_TYPE __quad_t"
+ .byte 0x1
+ .uleb128 0x75
+ .string "__U64_TYPE __u_quad_t"
+ .byte 0x1
+ .uleb128 0x78
+ .string "__STD_TYPE __extension__ typedef"
+ .byte 0x3
+ .uleb128 0x88
+ .file 15 "../../include/bits/typesizes.h"
+ .uleb128 0xf
+ .byte 0x1
+ .uleb128 0x19
+ .string "_BITS_TYPESIZES_H 1"
+ .byte 0x1
+ .uleb128 0x1e
+ .string "__DEV_T_TYPE __UQUAD_TYPE"
+ .byte 0x1
+ .uleb128 0x1f
+ .string "__UID_T_TYPE __U32_TYPE"
+ .byte 0x1
+ .uleb128 0x20
+ .string "__GID_T_TYPE __U32_TYPE"
+ .byte 0x1
+ .uleb128 0x21
+ .string "__INO_T_TYPE __ULONGWORD_TYPE"
+ .byte 0x1
+ .uleb128 0x22
+ .string "__INO64_T_TYPE __UQUAD_TYPE"
+ .byte 0x1
+ .uleb128 0x23
+ .string "__MODE_T_TYPE __U32_TYPE"
+ .byte 0x1
+ .uleb128 0x24
+ .string "__NLINK_T_TYPE __UWORD_TYPE"
+ .byte 0x1
+ .uleb128 0x25
+ .string "__OFF_T_TYPE __SLONGWORD_TYPE"
+ .byte 0x1
+ .uleb128 0x26
+ .string "__OFF64_T_TYPE __SQUAD_TYPE"
+ .byte 0x1
+ .uleb128 0x27
+ .string "__PID_T_TYPE __S32_TYPE"
+ .byte 0x1
+ .uleb128 0x28
+ .string "__RLIM_T_TYPE __ULONGWORD_TYPE"
+ .byte 0x1
+ .uleb128 0x29
+ .string "__RLIM64_T_TYPE __UQUAD_TYPE"
+ .byte 0x1
+ .uleb128 0x2a
+ .string "__BLKCNT_T_TYPE __SLONGWORD_TYPE"
+ .byte 0x1
+ .uleb128 0x2b
+ .string "__BLKCNT64_T_TYPE __SQUAD_TYPE"
+ .byte 0x1
+ .uleb128 0x2c
+ .string "__FSBLKCNT_T_TYPE __ULONGWORD_TYPE"
+ .byte 0x1
+ .uleb128 0x2d
+ .string "__FSBLKCNT64_T_TYPE __UQUAD_TYPE"
+ .byte 0x1
+ .uleb128 0x2e
+ .string "__FSFILCNT_T_TYPE __ULONGWORD_TYPE"
+ .byte 0x1
+ .uleb128 0x2f
+ .string "__FSFILCNT64_T_TYPE __UQUAD_TYPE"
+ .byte 0x1
+ .uleb128 0x30
+ .string "__ID_T_TYPE __U32_TYPE"
+ .byte 0x1
+ .uleb128 0x31
+ .string "__CLOCK_T_TYPE __SLONGWORD_TYPE"
+ .byte 0x1
+ .uleb128 0x32
+ .string "__TIME_T_TYPE __SLONGWORD_TYPE"
+ .byte 0x1
+ .uleb128 0x33
+ .string "__USECONDS_T_TYPE __U32_TYPE"
+ .byte 0x1
+ .uleb128 0x34
+ .string "__SUSECONDS_T_TYPE __SLONGWORD_TYPE"
+ .byte 0x1
+ .uleb128 0x35
+ .string "__DADDR_T_TYPE __S32_TYPE"
+ .byte 0x1
+ .uleb128 0x36
+ .string "__SWBLK_T_TYPE __SLONGWORD_TYPE"
+ .byte 0x1
+ .uleb128 0x37
+ .string "__KEY_T_TYPE __S32_TYPE"
+ .byte 0x1
+ .uleb128 0x38
+ .string "__CLOCKID_T_TYPE __S32_TYPE"
+ .byte 0x1
+ .uleb128 0x39
+ .string "__TIMER_T_TYPE void *"
+ .byte 0x1
+ .uleb128 0x3a
+ .string "__BLKSIZE_T_TYPE __SLONGWORD_TYPE"
+ .byte 0x1
+ .uleb128 0x3b
+ .string "__FSID_T_TYPE struct { int __val[2]; }"
+ .byte 0x1
+ .uleb128 0x3c
+ .string "__SSIZE_T_TYPE __SWORD_TYPE"
+ .byte 0x1
+ .uleb128 0x3f
+ .string "__FD_SETSIZE 1024"
+ .byte 0x4
+ .byte 0x2
+ .uleb128 0xc7
+ .string "__STD_TYPE"
+ .byte 0x3
+ .uleb128 0xcf
+ .file 16 "../../include/bits/pthreadtypes.h"
+ .uleb128 0x10
+ .byte 0x1
+ .uleb128 0x15
+ .string "_BITS_PTHREADTYPES_H 1"
+ .byte 0x1
+ .uleb128 0x17
+ .string "__SIZEOF_PTHREAD_ATTR_T 36"
+ .byte 0x1
+ .uleb128 0x18
+ .string "__SIZEOF_PTHREAD_MUTEX_T 24"
+ .byte 0x1
+ .uleb128 0x19
+ .string "__SIZEOF_PTHREAD_MUTEXATTR_T 4"
+ .byte 0x1
+ .uleb128 0x1a
+ .string "__SIZEOF_PTHREAD_COND_T 48"
+ .byte 0x1
+ .uleb128 0x1b
+ .string "__SIZEOF_PTHREAD_COND_COMPAT_T 12"
+ .byte 0x1
+ .uleb128 0x1c
+ .string "__SIZEOF_PTHREAD_CONDATTR_T 4"
+ .byte 0x1
+ .uleb128 0x1d
+ .string "__SIZEOF_PTHREAD_RWLOCK_T 32"
+ .byte 0x1
+ .uleb128 0x1e
+ .string "__SIZEOF_PTHREAD_RWLOCKATTR_T 8"
+ .byte 0x1
+ .uleb128 0x1f
+ .string "__SIZEOF_PTHREAD_BARRIER_T 20"
+ .byte 0x1
+ .uleb128 0x20
+ .string "__SIZEOF_PTHREAD_BARRIERATTR_T 4"
+ .byte 0x4
+ .byte 0x4
+ .byte 0x1
+ .uleb128 0x25
+ .string "__need_FILE "
+ .byte 0x1
+ .uleb128 0x26
+ .string "__need___FILE "
+ .byte 0x1
+ .uleb128 0x36
+ .string "__FILE_defined 1"
+ .byte 0x2
+ .uleb128 0x38
+ .string "__need_FILE"
+ .byte 0x1
+ .uleb128 0x40
+ .string "____FILE_defined 1"
+ .byte 0x2
+ .uleb128 0x42
+ .string "__need___FILE"
+ .byte 0x2
+ .uleb128 0x46
+ .string "_STDIO_USES_IOSTREAM"
+ .byte 0x3
+ .uleb128 0x49
+ .file 17 "../../include/bits/uClibc_stdio.h"
+ .uleb128 0x11
+ .byte 0x1
+ .uleb128 0xe
+ .string "__STDIO_BUFFERS "
+ .byte 0x1
+ .uleb128 0x1d
+ .string "__STDIO_BUFSIZ 4096"
+ .byte 0x1
+ .uleb128 0x28
+ .string "__STDIO_BUILTIN_BUF_SIZE 0"
+ .byte 0x1
+ .uleb128 0x33
+ .string "__STDIO_HAS_OPENLIST 1"
+ .byte 0x2
+ .uleb128 0x3d
+ .string "__USE_LARGEFILE"
+ .byte 0x2
+ .uleb128 0x3e
+ .string "__USE_LARGEFILE64"
+ .byte 0x2
+ .uleb128 0x3f
+ .string "__USE_FILE_OFFSET64"
+ .byte 0x1
+ .uleb128 0x41
+ .string "__USE_LARGEFILE64 1"
+ .byte 0x1
+ .uleb128 0x50
+ .string "__need_wchar_t "
+ .byte 0x3
+ .uleb128 0x52
+ .uleb128 0xa
+ .byte 0x1
+ .uleb128 0x109
+ .string "__wchar_t__ "
+ .byte 0x1
+ .uleb128 0x10a
+ .string "__WCHAR_T__ "
+ .byte 0x1
+ .uleb128 0x10b
+ .string "_WCHAR_T "
+ .byte 0x1
+ .uleb128 0x10c
+ .string "_T_WCHAR_ "
+ .byte 0x1
+ .uleb128 0x10d
+ .string "_T_WCHAR "
+ .byte 0x1
+ .uleb128 0x10e
+ .string "__WCHAR_T "
+ .byte 0x1
+ .uleb128 0x10f
+ .string "_WCHAR_T_ "
+ .byte 0x1
+ .uleb128 0x110
+ .string "_BSD_WCHAR_T_ "
+ .byte 0x1
+ .uleb128 0x111
+ .string "_WCHAR_T_DEFINED_ "
+ .byte 0x1
+ .uleb128 0x112
+ .string "_WCHAR_T_DEFINED "
+ .byte 0x1
+ .uleb128 0x113
+ .string "_WCHAR_T_H "
+ .byte 0x1
+ .uleb128 0x114
+ .string "___int_wchar_t_h "
+ .byte 0x1
+ .uleb128 0x115
+ .string "__INT_WCHAR_T_H "
+ .byte 0x1
+ .uleb128 0x116
+ .string "_GCC_WCHAR_T "
+ .byte 0x1
+ .uleb128 0x117
+ .string "_WCHAR_T_DECLARED "
+ .byte 0x2
+ .uleb128 0x124
+ .string "_BSD_WCHAR_T_"
+ .byte 0x2
+ .uleb128 0x159
+ .string "__need_wchar_t"
+ .byte 0x2
+ .uleb128 0x199
+ .string "__need_NULL"
+ .byte 0x4
+ .byte 0x1
+ .uleb128 0x55
+ .string "__STDIO_MBSTATE "
+ .byte 0x1
+ .uleb128 0x56
+ .string "__need_mbstate_t "
+ .byte 0x3
+ .uleb128 0x58
+ .file 18 "../../include/wchar.h"
+ .uleb128 0x12
+ .byte 0x1
+ .uleb128 0x33
+ .string "__need_wint_t "
+ .byte 0x3
+ .uleb128 0x35
+ .uleb128 0xa
+ .byte 0x1
+ .uleb128 0x15e
+ .string "_WINT_T "
+ .byte 0x2
+ .uleb128 0x165
+ .string "__need_wint_t"
+ .byte 0x2
+ .uleb128 0x199
+ .string "__need_NULL"
+ .byte 0x4
+ .byte 0x3
+ .uleb128 0x37
+ .file 19 "../../include/bits/wchar.h"
+ .uleb128 0x13
+ .byte 0x1
+ .uleb128 0x15
+ .string "_BITS_WCHAR_H 1"
+ .byte 0x1
+ .uleb128 0x17
+ .string "__WCHAR_MIN (-2147483647 - 1)"
+ .byte 0x1
+ .uleb128 0x18
+ .string "__WCHAR_MAX (2147483647)"
+ .byte 0x4
+ .byte 0x1
+ .uleb128 0x4e
+ .string "__mbstate_t_defined 1"
+ .byte 0x2
+ .uleb128 0x62
+ .string "__need_mbstate_t"
+ .byte 0x4
+ .byte 0x1
+ .uleb128 0x5f
+ .string "__STDIO_GETC_MACRO "
+ .byte 0x1
+ .uleb128 0x63
+ .string "__STDIO_PUTC_MACRO "
+ .byte 0x1
+ .uleb128 0x8a
+ .string "__STDIO_AUTO_THREADLOCK_VAR int __infunc_user_locking"
+ .byte 0x1
+ .uleb128 0xa5
+ .string "__STDIO_AUTO_THREADLOCK(__stream) if ((__infunc_user_locking = (__stream)->__user_locking) == 0) { __pthread_mutex_lock(&(__stream)->__lock); }"
+ .byte 0x1
+ .uleb128 0xaa
+ .string "__STDIO_AUTO_THREADUNLOCK(__stream) if (__infunc_user_locking == 0) { __pthread_mutex_unlock(&(__stream)->__lock); }"
+ .byte 0x1
+ .uleb128 0xaf
+ .string "__STDIO_SET_USER_LOCKING(__stream) ((__stream)->__user_locking = 1)"
+ .byte 0x1
+ .uleb128 0xb1
+ .string "__STDIO_ALWAYS_THREADLOCK(__stream) __pthread_mutex_lock(&(__stream)->__lock)"
+ .byte 0x1
+ .uleb128 0xb4
+ .string "__STDIO_ALWAYS_THREADTRYLOCK(__stream) __pthread_mutex_trylock(&(__stream)->__lock)"
+ .byte 0x1
+ .uleb128 0xb7
+ .string "__STDIO_ALWAYS_THREADUNLOCK(__stream) __pthread_mutex_unlock(&(__stream)->__lock)"
+ .byte 0x1
+ .uleb128 0xcc
+ .string "__STDIO_IOFBF 0"
+ .byte 0x1
+ .uleb128 0xcd
+ .string "__STDIO_IOLBF 1"
+ .byte 0x1
+ .uleb128 0xce
+ .string "__STDIO_IONBF 2"
+ .byte 0x1
+ .uleb128 0x15b
+ .string "__MASK_READING 0x0003U"
+ .byte 0x1
+ .uleb128 0x15c
+ .string "__FLAG_READING 0x0001U"
+ .byte 0x1
+ .uleb128 0x15d
+ .string "__FLAG_UNGOT 0x0002U"
+ .byte 0x1
+ .uleb128 0x15e
+ .string "__FLAG_EOF 0x0004U"
+ .byte 0x1
+ .uleb128 0x15f
+ .string "__FLAG_ERROR 0x0008U"
+ .byte 0x1
+ .uleb128 0x160
+ .string "__FLAG_WRITEONLY 0x0010U"
+ .byte 0x1
+ .uleb128 0x161
+ .string "__FLAG_READONLY 0x0020U"
+ .byte 0x1
+ .uleb128 0x162
+ .string "__FLAG_WRITING 0x0040U"
+ .byte 0x1
+ .uleb128 0x163
+ .string "__FLAG_NARROW 0x0080U"
+ .byte 0x1
+ .uleb128 0x165
+ .string "__FLAG_FBF 0x0000U"
+ .byte 0x1
+ .uleb128 0x166
+ .string "__FLAG_LBF 0x0100U"
+ .byte 0x1
+ .uleb128 0x167
+ .string "__FLAG_NBF 0x0200U"
+ .byte 0x1
+ .uleb128 0x168
+ .string "__MASK_BUFMODE 0x0300U"
+ .byte 0x1
+ .uleb128 0x169
+ .string "__FLAG_APPEND 0x0400U"
+ .byte 0x1
+ .uleb128 0x16a
+ .string "__FLAG_WIDE 0x0800U"
+ .byte 0x1
+ .uleb128 0x16c
+ .string "__FLAG_FREEFILE 0x2000U"
+ .byte 0x1
+ .uleb128 0x16d
+ .string "__FLAG_FREEBUF 0x4000U"
+ .byte 0x1
+ .uleb128 0x16e
+ .string "__FLAG_LARGEFILE 0x8000U"
+ .byte 0x1
+ .uleb128 0x16f
+ .string "__FLAG_FAILED_FREOPEN __FLAG_LARGEFILE"
+ .byte 0x1
+ .uleb128 0x19d
+ .string "__CLEARERR_UNLOCKED(__stream) ((void)((__stream)->__modeflags &= ~(__FLAG_EOF|__FLAG_ERROR)))"
+ .byte 0x1
+ .uleb128 0x19f
+ .string "__FEOF_UNLOCKED(__stream) ((__stream)->__modeflags & __FLAG_EOF)"
+ .byte 0x1
+ .uleb128 0x1a0
+ .string "__FERROR_UNLOCKED(__stream) ((__stream)->__modeflags & __FLAG_ERROR)"
+ .byte 0x1
+ .uleb128 0x1a3
+ .string "__CLEARERR(__stream) (clearerr)(__stream)"
+ .byte 0x1
+ .uleb128 0x1a4
+ .string "__FERROR(__stream) (ferror)(__stream)"
+ .byte 0x1
+ .uleb128 0x1a5
+ .string "__FEOF(__stream) (feof)(__stream)"
+ .byte 0x1
+ .uleb128 0x1b0
+ .string "__FGETC_UNLOCKED(__stream) (__fgetc_unlocked)((__stream))"
+ .byte 0x1
+ .uleb128 0x1b1
+ .string "__FGETC(__stream) (fgetc)((__stream))"
+ .byte 0x1
+ .uleb128 0x1b2
+ .string "__GETC_UNLOCKED_MACRO(__stream) (__fgetc_unlocked)((__stream))"
+ .byte 0x1
+ .uleb128 0x1b3
+ .string "__GETC_UNLOCKED(__stream) (__fgetc_unlocked)((__stream))"
+ .byte 0x1
+ .uleb128 0x1b4
+ .string "__GETC(__stream) (fgetc)((__stream))"
+ .byte 0x1
+ .uleb128 0x1b6
+ .string "__FPUTC_UNLOCKED(__c,__stream) (__fputc_unlocked)((__c),(__stream))"
+ .byte 0x1
+ .uleb128 0x1b7
+ .string "__FPUTC(__c,__stream) (fputc)((__c),(__stream))"
+ .byte 0x1
+ .uleb128 0x1b8
+ .string "__PUTC_UNLOCKED_MACRO(__c,__stream) (__fputc_unlocked)((__c),(__stream))"
+ .byte 0x1
+ .uleb128 0x1b9
+ .string "__PUTC_UNLOCKED(__c,__stream) (__fputc_unlocked)((__c),(__stream))"
+ .byte 0x1
+ .uleb128 0x1ba
+ .string "__PUTC(__c,__stream) (fputc)((__c),(__stream))"
+ .byte 0x2
+ .uleb128 0x1c1
+ .string "__GETC_UNLOCKED_MACRO"
+ .byte 0x1
+ .uleb128 0x1c2
+ .string "__GETC_UNLOCKED_MACRO(__stream) ( ((__stream)->__bufpos < (__stream)->__bufgetc_u) ? (*(__stream)->__bufpos++) : __fgetc_unlocked(__stream) )"
+ .byte 0x2
+ .uleb128 0x1d2
+ .string "__FGETC_UNLOCKED"
+ .byte 0x1
+ .uleb128 0x1d3
+ .string "__FGETC_UNLOCKED(__stream) (__extension__ ({ FILE *__S = (__stream); __GETC_UNLOCKED_MACRO(__S); }) )"
+ .byte 0x2
+ .uleb128 0x1d9
+ .string "__GETC_UNLOCKED"
+ .byte 0x1
+ .uleb128 0x1da
+ .string "__GETC_UNLOCKED(__stream) __FGETC_UNLOCKED((__stream))"
+ .byte 0x2
+ .uleb128 0x1dd
+ .string "__FGETC"
+ .byte 0x1
+ .uleb128 0x1de
+ .string "__FGETC(__stream) (__extension__ ({ FILE *__S = (__stream); ((__S->__user_locking ) ? __GETC_UNLOCKED_MACRO(__S) : (fgetc)(__S)); }) )"
+ .byte 0x2
+ .uleb128 0x1e6
+ .string "__GETC"
+ .byte 0x1
+ .uleb128 0x1e7
+ .string "__GETC(__stream) __FGETC((__stream))"
+ .byte 0x2
+ .uleb128 0x1fc
+ .string "__PUTC_UNLOCKED_MACRO"
+ .byte 0x1
+ .uleb128 0x1fd
+ .string "__PUTC_UNLOCKED_MACRO(__c,__stream) ( ((__stream)->__bufpos < (__stream)->__bufputc_u) ? (*(__stream)->__bufpos++) = (__c) : __fputc_unlocked((__c),(__stream)) )"
+ .byte 0x2
+ .uleb128 0x20f
+ .string "__FPUTC_UNLOCKED"
+ .byte 0x1
+ .uleb128 0x210
+ .string "__FPUTC_UNLOCKED(__c,__stream) (__extension__ ({ FILE *__S = (__stream); __PUTC_UNLOCKED_MACRO((__c),__S); }) )"
+ .byte 0x2
+ .uleb128 0x216
+ .string "__PUTC_UNLOCKED"
+ .byte 0x1
+ .uleb128 0x217
+ .string "__PUTC_UNLOCKED(__c,__stream) __FPUTC_UNLOCKED((__c), (__stream))"
+ .byte 0x2
+ .uleb128 0x21a
+ .string "__FPUTC"
+ .byte 0x1
+ .uleb128 0x21b
+ .string "__FPUTC(__c,__stream) (__extension__ ({ FILE *__S = (__stream); ((__S->__user_locking) ? __PUTC_UNLOCKED_MACRO((__c),__S) : (fputc)((__c),__S)); }) )"
+ .byte 0x2
+ .uleb128 0x223
+ .string "__PUTC"
+ .byte 0x1
+ .uleb128 0x224
+ .string "__PUTC(__c,__stream) __FPUTC((__c), (__stream))"
+ .byte 0x4
+ .byte 0x1
+ .uleb128 0x4b
+ .string "__need___va_list "
+ .byte 0x3
+ .uleb128 0x4d
+ .file 20 "/opt/STM/STLinux-2.3ear/devkit/sh4/lib/gcc/sh4-linux-uclibc/4.1.1/include/stdarg.h"
+ .uleb128 0x14
+ .byte 0x2
+ .uleb128 0x25
+ .string "__need___va_list"
+ .byte 0x1
+ .uleb128 0x2a
+ .string "__GNUC_VA_LIST "
+ .byte 0x4
+ .byte 0x1
+ .uleb128 0x5b
+ .string "_IOFBF __STDIO_IOFBF"
+ .byte 0x1
+ .uleb128 0x5c
+ .string "_IOLBF __STDIO_IOLBF"
+ .byte 0x1
+ .uleb128 0x5d
+ .string "_IONBF __STDIO_IONBF"
+ .byte 0x1
+ .uleb128 0x62
+ .string "BUFSIZ __STDIO_BUFSIZ"
+ .byte 0x1
+ .uleb128 0x69
+ .string "EOF (-1)"
+ .byte 0x1
+ .uleb128 0x6f
+ .string "SEEK_SET 0"
+ .byte 0x1
+ .uleb128 0x70
+ .string "SEEK_CUR 1"
+ .byte 0x1
+ .uleb128 0x71
+ .string "SEEK_END 2"
+ .byte 0x1
+ .uleb128 0x76
+ .string "P_tmpdir \"/tmp\""
+ .byte 0x3
+ .uleb128 0x84
+ .file 21 "../../include/bits/stdio_lim.h"
+ .uleb128 0x15
+ .byte 0x1
+ .uleb128 0x18
+ .string "L_tmpnam 20"
+ .byte 0x1
+ .uleb128 0x19
+ .string "TMP_MAX 238328"
+ .byte 0x1
+ .uleb128 0x1a
+ .string "FILENAME_MAX 4095"
+ .byte 0x1
+ .uleb128 0x1d
+ .string "L_ctermid 9"
+ .byte 0x1
+ .uleb128 0x1e
+ .string "L_cuserid 9"
+ .byte 0x2
+ .uleb128 0x23
+ .string "FOPEN_MAX"
+ .byte 0x1
+ .uleb128 0x24
+ .string "FOPEN_MAX 16"
+ .byte 0x4
+ .byte 0x1
+ .uleb128 0x8b
+ .string "stdin stdin"
+ .byte 0x1
+ .uleb128 0x8c
+ .string "stdout stdout"
+ .byte 0x1
+ .uleb128 0x8d
+ .string "stderr stderr"
+ .byte 0x1
+ .uleb128 0x1bc
+ .string "getc(_fp) __GETC(_fp)"
+ .byte 0x1
+ .uleb128 0x1c7
+ .string "getc_unlocked(_fp) __GETC_UNLOCKED(_fp)"
+ .byte 0x1
+ .uleb128 0x1e9
+ .string "putc(_ch,_fp) __PUTC(_ch, _fp)"
+ .byte 0x1
+ .uleb128 0x1fe
+ .string "putc_unlocked(_ch,_fp) __PUTC_UNLOCKED(_ch, _fp)"
+ .byte 0x1
+ .uleb128 0x343
+ .string "fgetc(_fp) __FGETC(_fp)"
+ .byte 0x1
+ .uleb128 0x344
+ .string "fputc(_ch,_fp) __FPUTC(_ch, _fp)"
+ .byte 0x1
+ .uleb128 0x347
+ .string "fgetc_unlocked(_fp) __FGETC_UNLOCKED(_fp)"
+ .byte 0x1
+ .uleb128 0x348
+ .string "fputc_unlocked(_ch,_fp) __FPUTC_UNLOCKED(_ch, _fp)"
+ .byte 0x1
+ .uleb128 0x34e
+ .string "getchar() __GETC(__stdin)"
+ .byte 0x1
+ .uleb128 0x353
+ .string "putchar(_ch) __PUTC((_ch), __stdout)"
+ .byte 0x1
+ .uleb128 0x356
+ .string "getchar_unlocked() __GETC_UNLOCKED(__stdin)"
+ .byte 0x1
+ .uleb128 0x357
+ .string "putchar_unlocked(_ch) __PUTC_UNLOCKED((_ch), __stdout)"
+ .byte 0x1
+ .uleb128 0x35b
+ .string "clearerr(_fp) __CLEARERR(_fp)"
+ .byte 0x1
+ .uleb128 0x35c
+ .string "feof(_fp) __FEOF(_fp)"
+ .byte 0x1
+ .uleb128 0x35d
+ .string "ferror(_fp) __FERROR(_fp)"
+ .byte 0x1
+ .uleb128 0x360
+ .string "clearerr_unlocked(_fp) __CLEARERR_UNLOCKED(_fp)"
+ .byte 0x1
+ .uleb128 0x361
+ .string "feof_unlocked(_fp) __FEOF_UNLOCKED(_fp)"
+ .byte 0x1
+ .uleb128 0x362
+ .string "ferror_unlocked(_fp) __FERROR_UNLOCKED(_fp)"
+ .byte 0x4
+ .byte 0x3
+ .uleb128 0xc
+ .file 22 "../../include/stdlib.h"
+ .uleb128 0x16
+ .byte 0x1
+ .uleb128 0x1c
+ .string "__need_size_t "
+ .byte 0x1
+ .uleb128 0x1f
+ .string "__need_wchar_t "
+ .byte 0x1
+ .uleb128 0x21
+ .string "__need_NULL "
+ .byte 0x3
+ .uleb128 0x24
+ .uleb128 0xa
+ .byte 0x2
+ .uleb128 0xec
+ .string "__need_size_t"
+ .byte 0x2
+ .uleb128 0x159
+ .string "__need_wchar_t"
+ .byte 0x2
+ .uleb128 0x18e
+ .string "NULL"
+ .byte 0x1
+ .uleb128 0x193
+ .string "NULL ((void *)0)"
+ .byte 0x2
+ .uleb128 0x199
+ .string "__need_NULL"
+ .byte 0x4
+ .byte 0x1
+ .uleb128 0x28
+ .string "_STDLIB_H 1"
+ .byte 0x3
+ .uleb128 0x2d
+ .file 23 "../../include/bits/waitflags.h"
+ .uleb128 0x17
+ .byte 0x1
+ .uleb128 0x1a
+ .string "WNOHANG 1"
+ .byte 0x1
+ .uleb128 0x1b
+ .string "WUNTRACED 2"
+ .byte 0x1
+ .uleb128 0x1e
+ .string "WSTOPPED 2"
+ .byte 0x1
+ .uleb128 0x1f
+ .string "WEXITED 4"
+ .byte 0x1
+ .uleb128 0x20
+ .string "WCONTINUED 8"
+ .byte 0x1
+ .uleb128 0x21
+ .string "WNOWAIT 0x01000000"
+ .byte 0x1
+ .uleb128 0x23
+ .string "__WNOTHREAD 0x20000000"
+ .byte 0x1
+ .uleb128 0x25
+ .string "__WALL 0x40000000"
+ .byte 0x1
+ .uleb128 0x26
+ .string "__WCLONE 0x80000000"
+ .byte 0x4
+ .byte 0x3
+ .uleb128 0x2e
+ .file 24 "../../include/bits/waitstatus.h"
+ .uleb128 0x18
+ .byte 0x1
+ .uleb128 0x1d
+ .string "__WEXITSTATUS(status) (((status) & 0xff00) >> 8)"
+ .byte 0x1
+ .uleb128 0x20
+ .string "__WTERMSIG(status) ((status) & 0x7f)"
+ .byte 0x1
+ .uleb128 0x23
+ .string "__WSTOPSIG(status) __WEXITSTATUS(status)"
+ .byte 0x1
+ .uleb128 0x26
+ .string "__WIFEXITED(status) (__WTERMSIG(status) == 0)"
+ .byte 0x1
+ .uleb128 0x2a
+ .string "__WIFSIGNALED(status) (__extension__ ({ int __status = (status); !__WIFSTOPPED(__status) && !__WIFEXITED(__status); }))"
+ .byte 0x1
+ .uleb128 0x32
+ .string "__WIFSTOPPED(status) (((status) & 0xff) == 0x7f)"
+ .byte 0x1
+ .uleb128 0x35
+ .string "__WCOREDUMP(status) ((status) & __WCOREFLAG)"
+ .byte 0x1
+ .uleb128 0x38
+ .string "__W_EXITCODE(ret,sig) ((ret) << 8 | (sig))"
+ .byte 0x1
+ .uleb128 0x39
+ .string "__W_STOPCODE(sig) ((sig) << 8 | 0x7f)"
+ .byte 0x1
+ .uleb128 0x3a
+ .string "__WCOREFLAG 0x80"
+ .byte 0x3
+ .uleb128 0x40
+ .file 25 "../../include/endian.h"
+ .uleb128 0x19
+ .byte 0x1
+ .uleb128 0x14
+ .string "_ENDIAN_H 1"
+ .byte 0x1
+ .uleb128 0x20
+ .string "__LITTLE_ENDIAN 1234"
+ .byte 0x1
+ .uleb128 0x21
+ .string "__BIG_ENDIAN 4321"
+ .byte 0x1
+ .uleb128 0x22
+ .string "__PDP_ENDIAN 3412"
+ .byte 0x3
+ .uleb128 0x26
+ .file 26 "../../include/bits/endian.h"
+ .uleb128 0x1a
+ .byte 0x1
+ .uleb128 0x8
+ .string "__BYTE_ORDER __LITTLE_ENDIAN"
+ .byte 0x1
+ .uleb128 0x9
+ .string "__FLOAT_WORD_ORDER __LITTLE_ENDIAN"
+ .byte 0x4
+ .byte 0x1
+ .uleb128 0x2e
+ .string "LITTLE_ENDIAN __LITTLE_ENDIAN"
+ .byte 0x1
+ .uleb128 0x2f
+ .string "BIG_ENDIAN __BIG_ENDIAN"
+ .byte 0x1
+ .uleb128 0x30
+ .string "PDP_ENDIAN __PDP_ENDIAN"
+ .byte 0x1
+ .uleb128 0x31
+ .string "BYTE_ORDER __BYTE_ORDER"
+ .byte 0x1
+ .uleb128 0x35
+ .string "__LONG_LONG_PAIR(HI,LO) LO, HI"
+ .byte 0x4
+ .byte 0x1
+ .uleb128 0x62
+ .string "w_termsig __wait_terminated.__w_termsig"
+ .byte 0x1
+ .uleb128 0x63
+ .string "w_coredump __wait_terminated.__w_coredump"
+ .byte 0x1
+ .uleb128 0x64
+ .string "w_retcode __wait_terminated.__w_retcode"
+ .byte 0x1
+ .uleb128 0x65
+ .string "w_stopsig __wait_stopped.__w_stopsig"
+ .byte 0x1
+ .uleb128 0x66
+ .string "w_stopval __wait_stopped.__w_stopval"
+ .byte 0x4
+ .byte 0x1
+ .uleb128 0x35
+ .string "__WAIT_INT(status) (__extension__ ({ union { __typeof(status) __in; int __i; } __u; __u.__in = (status); __u.__i; }))"
+ .byte 0x1
+ .uleb128 0x4b
+ .string "__WAIT_STATUS_DEFN int *"
+ .byte 0x1
+ .uleb128 0x57
+ .string "WEXITSTATUS(status) __WEXITSTATUS(__WAIT_INT(status))"
+ .byte 0x1
+ .uleb128 0x58
+ .string "WTERMSIG(status) __WTERMSIG(__WAIT_INT(status))"
+ .byte 0x1
+ .uleb128 0x59
+ .string "WSTOPSIG(status) __WSTOPSIG(__WAIT_INT(status))"
+ .byte 0x1
+ .uleb128 0x5a
+ .string "WIFEXITED(status) __WIFEXITED(__WAIT_INT(status))"
+ .byte 0x1
+ .uleb128 0x5b
+ .string "WIFSIGNALED(status) __WIFSIGNALED(__WAIT_INT(status))"
+ .byte 0x1
+ .uleb128 0x5c
+ .string "WIFSTOPPED(status) __WIFSTOPPED(__WAIT_INT(status))"
+ .byte 0x1
+ .uleb128 0x71
+ .string "__ldiv_t_defined 1"
+ .byte 0x1
+ .uleb128 0x7d
+ .string "__lldiv_t_defined 1"
+ .byte 0x1
+ .uleb128 0x83
+ .string "RAND_MAX 2147483647"
+ .byte 0x1
+ .uleb128 0x88
+ .string "EXIT_FAILURE 1"
+ .byte 0x1
+ .uleb128 0x89
+ .string "EXIT_SUCCESS 0"
+ .byte 0x1
+ .uleb128 0x92
+ .string "MB_CUR_MAX (_stdlib_mb_cur_max ())"
+ .byte 0x3
+ .uleb128 0x133
+ .file 27 "../../include/sys/types.h"
+ .uleb128 0x1b
+ .byte 0x1
+ .uleb128 0x19
+ .string "_SYS_TYPES_H 1"
+ .byte 0x1
+ .uleb128 0x2a
+ .string "__u_char_defined "
+ .byte 0x1
+ .uleb128 0x36
+ .string "__ino_t_defined "
+ .byte 0x1
+ .uleb128 0x3a
+ .string "__ino64_t_defined "
+ .byte 0x1
+ .uleb128 0x3f
+ .string "__dev_t_defined "
+ .byte 0x1
+ .uleb128 0x44
+ .string "__gid_t_defined "
+ .byte 0x1
+ .uleb128 0x49
+ .string "__mode_t_defined "
+ .byte 0x1
+ .uleb128 0x4e
+ .string "__nlink_t_defined "
+ .byte 0x1
+ .uleb128 0x53
+ .string "__uid_t_defined "
+ .byte 0x1
+ .uleb128 0x5c
+ .string "__off_t_defined "
+ .byte 0x1
+ .uleb128 0x60
+ .string "__off64_t_defined "
+ .byte 0x1
+ .uleb128 0x65
+ .string "__pid_t_defined "
+ .byte 0x1
+ .uleb128 0x6a
+ .string "__id_t_defined "
+ .byte 0x1
+ .uleb128 0x6f
+ .string "__ssize_t_defined "
+ .byte 0x1
+ .uleb128 0x76
+ .string "__daddr_t_defined "
+ .byte 0x1
+ .uleb128 0x7c
+ .string "__key_t_defined "
+ .byte 0x1
+ .uleb128 0x80
+ .string "__need_clock_t "
+ .byte 0x1
+ .uleb128 0x82
+ .string "__need_time_t "
+ .byte 0x1
+ .uleb128 0x83
+ .string "__need_timer_t "
+ .byte 0x1
+ .uleb128 0x84
+ .string "__need_clockid_t "
+ .byte 0x3
+ .uleb128 0x86
+ .file 28 "../../include/time.h"
+ .uleb128 0x1c
+ .byte 0x1
+ .uleb128 0x37
+ .string "__clock_t_defined 1"
+ .byte 0x2
+ .uleb128 0x44
+ .string "__need_clock_t"
+ .byte 0x1
+ .uleb128 0x47
+ .string "__time_t_defined 1"
+ .byte 0x2
+ .uleb128 0x54
+ .string "__need_time_t"
+ .byte 0x1
+ .uleb128 0x58
+ .string "__clockid_t_defined 1"
+ .byte 0x2
+ .uleb128 0x60
+ .string "__clockid_time_t"
+ .byte 0x1
+ .uleb128 0x64
+ .string "__timer_t_defined 1"
+ .byte 0x2
+ .uleb128 0x6c
+ .string "__need_timer_t"
+ .byte 0x2
+ .uleb128 0x80
+ .string "__need_timespec"
+ .byte 0x4
+ .byte 0x1
+ .uleb128 0x8a
+ .string "__useconds_t_defined "
+ .byte 0x1
+ .uleb128 0x8e
+ .string "__suseconds_t_defined "
+ .byte 0x1
+ .uleb128 0x92
+ .string "__need_size_t "
+ .byte 0x3
+ .uleb128 0x94
+ .uleb128 0xa
+ .byte 0x2
+ .uleb128 0xec
+ .string "__need_size_t"
+ .byte 0x2
+ .uleb128 0x199
+ .string "__need_NULL"
+ .byte 0x4
+ .byte 0x1
+ .uleb128 0xb8
+ .string "__intN_t(N,MODE) typedef int int ##N ##_t __attribute__ ((__mode__ (MODE)))"
+ .byte 0x1
+ .uleb128 0xba
+ .string "__u_intN_t(N,MODE) typedef unsigned int u_int ##N ##_t __attribute__ ((__mode__ (MODE)))"
+ .byte 0x1
+ .uleb128 0xbe
+ .string "__int8_t_defined "
+ .byte 0x1
+ .uleb128 0xd0
+ .string "__BIT_TYPES_DEFINED__ 1"
+ .byte 0x3
+ .uleb128 0xd9
+ .file 29 "../../include/sys/select.h"
+ .uleb128 0x1d
+ .byte 0x1
+ .uleb128 0x17
+ .string "_SYS_SELECT_H 1"
+ .byte 0x3
+ .uleb128 0x20
+ .file 30 "../../include/bits/select.h"
+ .uleb128 0x1e
+ .byte 0x1
+ .uleb128 0x1a
+ .string "__FD_ZERO(s) do { unsigned int __i; fd_set *__arr = (s); for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) __FDS_BITS (__arr)[__i] = 0; } while (0)"
+ .byte 0x1
+ .uleb128 0x21
+ .string "__FD_SET(d,s) (__FDS_BITS (s)[__FDELT(d)] |= __FDMASK(d))"
+ .byte 0x1
+ .uleb128 0x22
+ .string "__FD_CLR(d,s) (__FDS_BITS (s)[__FDELT(d)] &= ~__FDMASK(d))"
+ .byte 0x1
+ .uleb128 0x23
+ .string "__FD_ISSET(d,s) ((__FDS_BITS (s)[__FDELT(d)] & __FDMASK(d)) != 0)"
+ .byte 0x4
+ .byte 0x3
+ .uleb128 0x23
+ .file 31 "../../include/bits/sigset.h"
+ .uleb128 0x1f
+ .byte 0x1
+ .uleb128 0x15
+ .string "_SIGSET_H_types 1"
+ .byte 0x1
+ .uleb128 0x1b
+ .string "_SIGSET_NWORDS (1024 / (8 * sizeof (unsigned long int)))"
+ .byte 0x4
+ .byte 0x1
+ .uleb128 0x25
+ .string "__sigset_t_defined "
+ .byte 0x1
+ .uleb128 0x2a
+ .string "__need_time_t "
+ .byte 0x1
+ .uleb128 0x2b
+ .string "__need_timespec "
+ .byte 0x3
+ .uleb128 0x2d
+ .uleb128 0x1c
+ .byte 0x2
+ .uleb128 0x44
+ .string "__need_clock_t"
+ .byte 0x2
+ .uleb128 0x54
+ .string "__need_time_t"
+ .byte 0x2
+ .uleb128 0x60
+ .string "__clockid_time_t"
+ .byte 0x2
+ .uleb128 0x6c
+ .string "__need_timer_t"
+ .byte 0x1
+ .uleb128 0x73
+ .string "__timespec_defined 1"
+ .byte 0x2
+ .uleb128 0x80
+ .string "__need_timespec"
+ .byte 0x4
+ .byte 0x1
+ .uleb128 0x2d
+ .string "__need_timeval "
+ .byte 0x3
+ .uleb128 0x2f
+ .file 32 "../../include/bits/time.h"
+ .uleb128 0x20
+ .byte 0x2
+ .uleb128 0x42
+ .string "__need_timeval"
+ .byte 0x1
+ .uleb128 0x44
+ .string "_STRUCT_TIMEVAL 1"
+ .byte 0x4
+ .byte 0x2
+ .uleb128 0x3a
+ .string "__NFDBITS"
+ .byte 0x2
+ .uleb128 0x3b
+ .string "__FDELT"
+ .byte 0x2
+ .uleb128 0x3c
+ .string "__FDMASK"
+ .byte 0x1
+ .uleb128 0x3e
+ .string "__NFDBITS (8 * sizeof (__fd_mask))"
+ .byte 0x1
+ .uleb128 0x3f
+ .string "__FDELT(d) ((d) / __NFDBITS)"
+ .byte 0x1
+ .uleb128 0x40
+ .string "__FDMASK(d) ((__fd_mask) 1 << ((d) % __NFDBITS))"
+ .byte 0x1
+ .uleb128 0x49
+ .string "__FDS_BITS(set) ((set)->fds_bits)"
+ .byte 0x1
+ .uleb128 0x51
+ .string "FD_SETSIZE __FD_SETSIZE"
+ .byte 0x1
+ .uleb128 0x58
+ .string "NFDBITS __NFDBITS"
+ .byte 0x1
+ .uleb128 0x5d
+ .string "FD_SET(fd,fdsetp) __FD_SET (fd, fdsetp)"
+ .byte 0x1
+ .uleb128 0x5e
+ .string "FD_CLR(fd,fdsetp) __FD_CLR (fd, fdsetp)"
+ .byte 0x1
+ .uleb128 0x5f
+ .string "FD_ISSET(fd,fdsetp) __FD_ISSET (fd, fdsetp)"
+ .byte 0x1
+ .uleb128 0x60
+ .string "FD_ZERO(fdsetp) __FD_ZERO (fdsetp)"
+ .byte 0x4
+ .byte 0x3
+ .uleb128 0xdc
+ .file 33 "../../include/sys/sysmacros.h"
+ .uleb128 0x21
+ .byte 0x1
+ .uleb128 0x15
+ .string "_SYS_SYSMACROS_H 1"
+ .byte 0x1
+ .uleb128 0x40
+ .string "major(dev) gnu_dev_major (dev)"
+ .byte 0x1
+ .uleb128 0x41
+ .string "minor(dev) gnu_dev_minor (dev)"
+ .byte 0x1
+ .uleb128 0x42
+ .string "makedev(maj,min) gnu_dev_makedev (maj, min)"
+ .byte 0x4
+ .byte 0x1
+ .uleb128 0xe1
+ .string "__blksize_t_defined "
+ .byte 0x1
+ .uleb128 0xe8
+ .string "__blkcnt_t_defined "
+ .byte 0x1
+ .uleb128 0xec
+ .string "__fsblkcnt_t_defined "
+ .byte 0x1
+ .uleb128 0xf0
+ .string "__fsfilcnt_t_defined "
+ .byte 0x4
+ .byte 0x1
+ .uleb128 0x1ca
+ .string "__malloc_and_calloc_defined "
+ .byte 0x3
+ .uleb128 0x1e5
+ .file 34 "../../include/alloca.h"
+ .uleb128 0x22
+ .byte 0x1
+ .uleb128 0x14
+ .string "_ALLOCA_H 1"
+ .byte 0x1
+ .uleb128 0x18
+ .string "__need_size_t "
+ .byte 0x3
+ .uleb128 0x1a
+ .uleb128 0xa
+ .byte 0x2
+ .uleb128 0xec
+ .string "__need_size_t"
+ .byte 0x2
+ .uleb128 0x199
+ .string "__need_NULL"
+ .byte 0x4
+ .byte 0x2
+ .uleb128 0x1e
+ .string "alloca"
+ .byte 0x1
+ .uleb128 0x24
+ .string "alloca(size) __builtin_alloca (size)"
+ .byte 0x1
+ .uleb128 0x27
+ .string "__MAX_ALLOCA_CUTOFF 65536"
+ .byte 0x4
+ .byte 0x1
+ .uleb128 0x232
+ .string "__UCLIBC_MAX_ATEXIT 20"
+ .byte 0x1
+ .uleb128 0x285
+ .string "__COMPAR_FN_T "
+ .byte 0x2
+ .uleb128 0x35c
+ .string "__need_malloc_and_calloc"
+ .byte 0x4
+ .byte 0x3
+ .uleb128 0xd
+ .file 35 "../../include/string.h"
+ .uleb128 0x23
+ .byte 0x1
+ .uleb128 0x18
+ .string "_STRING_H 1"
+ .byte 0x1
+ .uleb128 0x1f
+ .string "__need_size_t "
+ .byte 0x1
+ .uleb128 0x20
+ .string "__need_NULL "
+ .byte 0x3
+ .uleb128 0x22
+ .uleb128 0xa
+ .byte 0x2
+ .uleb128 0xec
+ .string "__need_size_t"
+ .byte 0x2
+ .uleb128 0x18e
+ .string "NULL"
+ .byte 0x1
+ .uleb128 0x193
+ .string "NULL ((void *)0)"
+ .byte 0x2
+ .uleb128 0x199
+ .string "__need_NULL"
+ .byte 0x4
+ .byte 0x1
+ .uleb128 0x90
+ .string "strdupa(s) (__extension__ ({ __const char *__old = (s); size_t __len = strlen (__old) + 1; char *__new = (char *) __builtin_alloca (__len); (char *) memcpy (__new, __old, __len); }))"
+ .byte 0x1
+ .uleb128 0x9a
+ .string "strndupa(s,n) (__extension__ ({ __const char *__old = (s); size_t __len = strnlen (__old, (n)); char *__new = (char *) __builtin_alloca (__len + 1); __new[__len] = '\\0'; (char *) memcpy (__new, __old, __len); }))"
+ .byte 0x4
+ .byte 0x3
+ .uleb128 0xe
+ .file 36 "../../include/locale.h"
+ .uleb128 0x24
+ .byte 0x1
+ .uleb128 0x18
+ .string "_LOCALE_H 1"
+ .byte 0x1
+ .uleb128 0x1c
+ .string "__need_NULL "
+ .byte 0x3
+ .uleb128 0x1e
+ .uleb128 0xa
+ .byte 0x2
+ .uleb128 0x18e
+ .string "NULL"
+ .byte 0x1
+ .uleb128 0x193
+ .string "NULL ((void *)0)"
+ .byte 0x2
+ .uleb128 0x199
+ .string "__need_NULL"
+ .byte 0x4
+ .byte 0x3
+ .uleb128 0x1f
+ .file 37 "../../include/bits/uClibc_locale.h"
+ .uleb128 0x25
+ .byte 0x1
+ .uleb128 0x1f
+ .string "_UCLIBC_LOCALE_H "
+ .byte 0x2
+ .uleb128 0x26
+ .string "__LOCALE_C_ONLY"
+ .byte 0x1
+ .uleb128 0x34
+ .string "__NL_ITEM_CATEGORY_SHIFT (8)"
+ .byte 0x1
+ .uleb128 0x35
+ .string "__NL_ITEM_INDEX_MASK (0xff)"
+ .byte 0x1
+ .uleb128 0x39
+ .string "__LC_CTYPE 0"
+ .byte 0x1
+ .uleb128 0x3a
+ .string "__LC_NUMERIC 1"
+ .byte 0x1
+ .uleb128 0x3b
+ .string "__LC_MONETARY 2"
+ .byte 0x1
+ .uleb128 0x3c
+ .string "__LC_TIME 3"
+ .byte 0x1
+ .uleb128 0x3d
+ .string "__LC_COLLATE 4"
+ .byte 0x1
+ .uleb128 0x3e
+ .string "__LC_MESSAGES 5"
+ .byte 0x1
+ .uleb128 0x3f
+ .string "__LC_ALL 6"
+ .byte 0x3
+ .uleb128 0x46
+ .uleb128 0xa
+ .byte 0x1
+ .uleb128 0x2b
+ .string "_STDDEF_H "
+ .byte 0x1
+ .uleb128 0x2c
+ .string "_STDDEF_H_ "
+ .byte 0x1
+ .uleb128 0x2e
+ .string "_ANSI_STDDEF_H "
+ .byte 0x1
+ .uleb128 0x30
+ .string "__STDDEF_H__ "
+ .byte 0x1
+ .uleb128 0x8d
+ .string "_PTRDIFF_T "
+ .byte 0x1
+ .uleb128 0x8e
+ .string "_T_PTRDIFF_ "
+ .byte 0x1
+ .uleb128 0x8f
+ .string "_T_PTRDIFF "
+ .byte 0x1
+ .uleb128 0x90
+ .string "__PTRDIFF_T "
+ .byte 0x1
+ .uleb128 0x91
+ .string "_PTRDIFF_T_ "
+ .byte 0x1
+ .uleb128 0x92
+ .string "_BSD_PTRDIFF_T_ "
+ .byte 0x1
+ .uleb128 0x93
+ .string "___int_ptrdiff_t_h "
+ .byte 0x1
+ .uleb128 0x94
+ .string "_GCC_PTRDIFF_T "
+ .byte 0x2
+ .uleb128 0xa3
+ .string "__need_ptrdiff_t"
+ .byte 0x2
+ .uleb128 0xec
+ .string "__need_size_t"
+ .byte 0x2
+ .uleb128 0x159
+ .string "__need_wchar_t"
+ .byte 0x2
+ .uleb128 0x18e
+ .string "NULL"
+ .byte 0x1
+ .uleb128 0x193
+ .string "NULL ((void *)0)"
+ .byte 0x2
+ .uleb128 0x199
+ .string "__need_NULL"
+ .byte 0x1
+ .uleb128 0x19e
+ .string "offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)"
+ .byte 0x4
+ .byte 0x3
+ .uleb128 0x47
+ .file 38 "../../include/stdint.h"
+ .uleb128 0x26
+ .byte 0x1
+ .uleb128 0x18
+ .string "_STDINT_H 1"
+ .byte 0x3
+ .uleb128 0x1f
+ .uleb128 0xd
+ .byte 0x1
+ .uleb128 0x13
+ .string "__WORDSIZE 32"
+ .byte 0x4
+ .byte 0x1
+ .uleb128 0x37
+ .string "__uint32_t_defined "
+ .byte 0x1
+ .uleb128 0x81
+ .string "__intptr_t_defined "
+ .byte 0x1
+ .uleb128 0x9b
+ .string "__INT64_C(c) c ## LL"
+ .byte 0x1
+ .uleb128 0x9c
+ .string "__UINT64_C(c) c ## ULL"
+ .byte 0x1
+ .uleb128 0xa2
+ .string "INT8_MIN (-128)"
+ .byte 0x1
+ .uleb128 0xa3
+ .string "INT16_MIN (-32767-1)"
+ .byte 0x1
+ .uleb128 0xa4
+ .string "INT32_MIN (-2147483647-1)"
+ .byte 0x1
+ .uleb128 0xa5
+ .string "INT64_MIN (-__INT64_C(9223372036854775807)-1)"
+ .byte 0x1
+ .uleb128 0xa7
+ .string "INT8_MAX (127)"
+ .byte 0x1
+ .uleb128 0xa8
+ .string "INT16_MAX (32767)"
+ .byte 0x1
+ .uleb128 0xa9
+ .string "INT32_MAX (2147483647)"
+ .byte 0x1
+ .uleb128 0xaa
+ .string "INT64_MAX (__INT64_C(9223372036854775807))"
+ .byte 0x1
+ .uleb128 0xad
+ .string "UINT8_MAX (255)"
+ .byte 0x1
+ .uleb128 0xae
+ .string "UINT16_MAX (65535)"
+ .byte 0x1
+ .uleb128 0xaf
+ .string "UINT32_MAX (4294967295U)"
+ .byte 0x1
+ .uleb128 0xb0
+ .string "UINT64_MAX (__UINT64_C(18446744073709551615))"
+ .byte 0x1
+ .uleb128 0xb4
+ .string "INT_LEAST8_MIN (-128)"
+ .byte 0x1
+ .uleb128 0xb5
+ .string "INT_LEAST16_MIN (-32767-1)"
+ .byte 0x1
+ .uleb128 0xb6
+ .string "INT_LEAST32_MIN (-2147483647-1)"
+ .byte 0x1
+ .uleb128 0xb7
+ .string "INT_LEAST64_MIN (-__INT64_C(9223372036854775807)-1)"
+ .byte 0x1
+ .uleb128 0xb9
+ .string "INT_LEAST8_MAX (127)"
+ .byte 0x1
+ .uleb128 0xba
+ .string "INT_LEAST16_MAX (32767)"
+ .byte 0x1
+ .uleb128 0xbb
+ .string "INT_LEAST32_MAX (2147483647)"
+ .byte 0x1
+ .uleb128 0xbc
+ .string "INT_LEAST64_MAX (__INT64_C(9223372036854775807))"
+ .byte 0x1
+ .uleb128 0xbf
+ .string "UINT_LEAST8_MAX (255)"
+ .byte 0x1
+ .uleb128 0xc0
+ .string "UINT_LEAST16_MAX (65535)"
+ .byte 0x1
+ .uleb128 0xc1
+ .string "UINT_LEAST32_MAX (4294967295U)"
+ .byte 0x1
+ .uleb128 0xc2
+ .string "UINT_LEAST64_MAX (__UINT64_C(18446744073709551615))"
+ .byte 0x1
+ .uleb128 0xc6
+ .string "INT_FAST8_MIN (-128)"
+ .byte 0x1
+ .uleb128 0xcb
+ .string "INT_FAST16_MIN (-2147483647-1)"
+ .byte 0x1
+ .uleb128 0xcc
+ .string "INT_FAST32_MIN (-2147483647-1)"
+ .byte 0x1
+ .uleb128 0xce
+ .string "INT_FAST64_MIN (-__INT64_C(9223372036854775807)-1)"
+ .byte 0x1
+ .uleb128 0xd0
+ .string "INT_FAST8_MAX (127)"
+ .byte 0x1
+ .uleb128 0xd5
+ .string "INT_FAST16_MAX (2147483647)"
+ .byte 0x1
+ .uleb128 0xd6
+ .string "INT_FAST32_MAX (2147483647)"
+ .byte 0x1
+ .uleb128 0xd8
+ .string "INT_FAST64_MAX (__INT64_C(9223372036854775807))"
+ .byte 0x1
+ .uleb128 0xdb
+ .string "UINT_FAST8_MAX (255)"
+ .byte 0x1
+ .uleb128 0xe0
+ .string "UINT_FAST16_MAX (4294967295U)"
+ .byte 0x1
+ .uleb128 0xe1
+ .string "UINT_FAST32_MAX (4294967295U)"
+ .byte 0x1
+ .uleb128 0xe3
+ .string "UINT_FAST64_MAX (__UINT64_C(18446744073709551615))"
+ .byte 0x1
+ .uleb128 0xec
+ .string "INTPTR_MIN (-2147483647-1)"
+ .byte 0x1
+ .uleb128 0xed
+ .string "INTPTR_MAX (2147483647)"
+ .byte 0x1
+ .uleb128 0xee
+ .string "UINTPTR_MAX (4294967295U)"
+ .byte 0x1
+ .uleb128 0xf3
+ .string "INTMAX_MIN (-__INT64_C(9223372036854775807)-1)"
+ .byte 0x1
+ .uleb128 0xf5
+ .string "INTMAX_MAX (__INT64_C(9223372036854775807))"
+ .byte 0x1
+ .uleb128 0xf8
+ .string "UINTMAX_MAX (__UINT64_C(18446744073709551615))"
+ .byte 0x1
+ .uleb128 0x10a
+ .string "PTRDIFF_MIN (-2147483647-1)"
+ .byte 0x1
+ .uleb128 0x10b
+ .string "PTRDIFF_MAX (2147483647)"
+ .byte 0x1
+ .uleb128 0x10f
+ .string "SIG_ATOMIC_MIN (-2147483647-1)"
+ .byte 0x1
+ .uleb128 0x110
+ .string "SIG_ATOMIC_MAX (2147483647)"
+ .byte 0x1
+ .uleb128 0x116
+ .string "SIZE_MAX (4294967295U)"
+ .byte 0x1
+ .uleb128 0x11d
+ .string "WCHAR_MIN __WCHAR_MIN"
+ .byte 0x1
+ .uleb128 0x11e
+ .string "WCHAR_MAX __WCHAR_MAX"
+ .byte 0x1
+ .uleb128 0x122
+ .string "WINT_MIN (0u)"
+ .byte 0x1
+ .uleb128 0x123
+ .string "WINT_MAX (4294967295u)"
+ .byte 0x1
+ .uleb128 0x12e
+ .string "INT8_C(c) c"
+ .byte 0x1
+ .uleb128 0x12f
+ .string "INT16_C(c) c"
+ .byte 0x1
+ .uleb128 0x130
+ .string "INT32_C(c) c"
+ .byte 0x1
+ .uleb128 0x134
+ .string "INT64_C(c) c ## LL"
+ .byte 0x1
+ .uleb128 0x138
+ .string "UINT8_C(c) c ## U"
+ .byte 0x1
+ .uleb128 0x139
+ .string "UINT16_C(c) c ## U"
+ .byte 0x1
+ .uleb128 0x13a
+ .string "UINT32_C(c) c ## U"
+ .byte 0x1
+ .uleb128 0x13e
+ .string "UINT64_C(c) c ## ULL"
+ .byte 0x1
+ .uleb128 0x146
+ .string "INTMAX_C(c) c ## LL"
+ .byte 0x1
+ .uleb128 0x147
+ .string "UINTMAX_C(c) c ## ULL"
+ .byte 0x4
+ .byte 0x3
+ .uleb128 0x48
+ .file 39 "../../include/bits/uClibc_touplow.h"
+ .uleb128 0x27
+ .byte 0x1
+ .uleb128 0x1f
+ .string "_UCLIBC_TOUPLOW_H "
+ .byte 0x1
+ .uleb128 0x2b
+ .string "__UCLIBC_CTYPE_B_TBL_OFFSET 128"
+ .byte 0x1
+ .uleb128 0x2c
+ .string "__UCLIBC_CTYPE_TO_TBL_OFFSET 128"
+ .byte 0x4
+ .byte 0x3
+ .uleb128 0x4b
+ .file 40 "../../include/bits/uClibc_locale_data.h"
+ .uleb128 0x28
+ .byte 0x1
+ .uleb128 0x1
+ .string "__lc_time_data_LEN 25900"
+ .byte 0x1
+ .uleb128 0x2
+ .string "__lc_time_rows_LEN 7650"
+ .byte 0x1
+ .uleb128 0x3
+ .string "__lc_time_item_offsets_LEN 50"
+ .byte 0x1
+ .uleb128 0x4
+ .string "__lc_time_item_idx_LEN 3190"
+ .byte 0x1
+ .uleb128 0x5
+ .string "__lc_numeric_data_LEN 22"
+ .byte 0x1
+ .uleb128 0x6
+ .string "__lc_numeric_rows_LEN 42"
+ .byte 0x1
+ .uleb128 0x7
+ .string "__lc_numeric_item_offsets_LEN 3"
+ .byte 0x1
+ .uleb128 0x8
+ .string "__lc_numeric_item_idx_LEN 13"
+ .byte 0x1
+ .uleb128 0x9
+ .string "__lc_monetary_data_LEN 1578"
+ .byte 0x1
+ .uleb128 0xa
+ .string "__lc_monetary_rows_LEN 3652"
+ .byte 0x1
+ .uleb128 0xb
+ .string "__lc_monetary_item_offsets_LEN 22"
+ .byte 0x1
+ .uleb128 0xc
+ .string "__lc_monetary_item_idx_LEN 391"
+ .byte 0x1
+ .uleb128 0xd
+ .string "__lc_messages_data_LEN 1583"
+ .byte 0x1
+ .uleb128 0xe
+ .string "__lc_messages_rows_LEN 312"
+ .byte 0x1
+ .uleb128 0xf
+ .string "__lc_messages_item_offsets_LEN 4"
+ .byte 0x1
+ .uleb128 0x10
+ .string "__lc_messages_item_idx_LEN 170"
+ .byte 0x1
+ .uleb128 0x11
+ .string "__lc_ctype_data_LEN 51"
+ .byte 0x1
+ .uleb128 0x12
+ .string "__lc_ctype_rows_LEN 20"
+ .byte 0x1
+ .uleb128 0x13
+ .string "__lc_ctype_item_offsets_LEN 10"
+ .byte 0x1
+ .uleb128 0x14
+ .string "__lc_ctype_item_idx_LEN 20"
+ .byte 0x1
+ .uleb128 0x15
+ .string "__CTYPE_HAS_UTF_8_LOCALES 1"
+ .byte 0x1
+ .uleb128 0x16
+ .string "__LOCALE_DATA_CATEGORIES 6"
+ .byte 0x1
+ .uleb128 0x17
+ .string "__LOCALE_DATA_WIDTH_LOCALES 9"
+ .byte 0x1
+ .uleb128 0x18
+ .string "__LOCALE_DATA_NUM_LOCALES 315"
+ .byte 0x1
+ .uleb128 0x19
+ .string "__LOCALE_DATA_NUM_LOCALE_NAMES 167"
+ .byte 0x1
+ .uleb128 0x1a
+ .string "__LOCALE_DATA_AT_MODIFIERS_LENGTH 18"
+ .byte 0x1
+ .uleb128 0x1b
+ .string "__lc_names_LEN 69"
+ .byte 0x1
+ .uleb128 0x1c
+ .string "__lc_collate_data_LEN 91141"
+ .byte 0x1
+ .uleb128 0x1d
+ .string "__CTYPE_HAS_8_BIT_LOCALES 1"
+ .byte 0x1
+ .uleb128 0x1f
+ .string "__LOCALE_DATA_Cctype_IDX_SHIFT 3"
+ .byte 0x1
+ .uleb128 0x20
+ .string "__LOCALE_DATA_Cctype_IDX_LEN 16"
+ .byte 0x1
+ .uleb128 0x21
+ .string "__LOCALE_DATA_Cctype_ROW_LEN 4"
+ .byte 0x1
+ .uleb128 0x22
+ .string "__LOCALE_DATA_Cctype_PACKED 1"
+ .byte 0x1
+ .uleb128 0x24
+ .string "__LOCALE_DATA_Cuplow_IDX_SHIFT 3"
+ .byte 0x1
+ .uleb128 0x25
+ .string "__LOCALE_DATA_Cuplow_IDX_LEN 16"
+ .byte 0x1
+ .uleb128 0x26
+ .string "__LOCALE_DATA_Cuplow_ROW_LEN 8"
+ .byte 0x1
+ .uleb128 0x28
+ .string "__LOCALE_DATA_Cc2wc_IDX_LEN 16"
+ .byte 0x1
+ .uleb128 0x29
+ .string "__LOCALE_DATA_Cc2wc_IDX_SHIFT 3"
+ .byte 0x1
+ .uleb128 0x2a
+ .string "__LOCALE_DATA_Cc2wc_ROW_LEN 8"
+ .byte 0x1
+ .uleb128 0x34
+ .string "__LOCALE_DATA_Cwc2c_DOMAIN_MAX 0x25ff"
+ .byte 0x1
+ .uleb128 0x35
+ .string "__LOCALE_DATA_Cwc2c_TI_SHIFT 4"
+ .byte 0x1
+ .uleb128 0x36
+ .string "__LOCALE_DATA_Cwc2c_TT_SHIFT 4"
+ .byte 0x1
+ .uleb128 0x37
+ .string "__LOCALE_DATA_Cwc2c_II_LEN 38"
+ .byte 0x1
+ .uleb128 0x38
+ .string "__LOCALE_DATA_Cwc2c_TI_LEN 1072"
+ .byte 0x1
+ .uleb128 0x39
+ .string "__LOCALE_DATA_Cwc2c_TT_LEN 3456"
+ .byte 0x1
+ .uleb128 0x3c
+ .string "__LOCALE_DATA_Cwc2c_TBL_LEN 4528"
+ .byte 0x1
+ .uleb128 0x3e
+ .string "__LOCALE_DATA_Cuplow_TBL_LEN 504"
+ .byte 0x1
+ .uleb128 0x41
+ .string "__LOCALE_DATA_Cctype_TBL_LEN 420"
+ .byte 0x1
+ .uleb128 0x44
+ .string "__LOCALE_DATA_Cc2wc_TBL_LEN 1760"
+ .byte 0x1
+ .uleb128 0x48
+ .string "__LOCALE_DATA_NUM_CODESETS 23"
+ .byte 0x1
+ .uleb128 0x49
+ .ascii "__LOCALE_DATA_CODESET_LIST \"\\x18\\x22\\x31\\x38\\x3f\\x4b\\"
+ .ascii "x56\\x62\" \"\\x6e\\x7a\\x86\\x92\\x9d\\xa8\\xb3\\xbe\" \"\\"
+ .ascii "xc9\\xd4\\xdf\\xea\\xf1\\xf8\\xff\" \"\\0\" \"ARMSCII-8\\0\""
+ .ascii " \"ANSI_X3.4-1968\\0\" \"CP1251\\0\" \"CP1255\\0\" \"GEORGIA"
+ .ascii "N-PS\\0\" \"IS"
+ .string "O-8859-1\\0\" \"ISO-8859-10\\0\" \"ISO-8859-13\\0\" \"ISO-8859-14\\0\" \"ISO-8859-15\\0\" \"ISO-8859-16\\0\" \"ISO-8859-2\\0\" \"ISO-8859-3\\0\" \"ISO-8859-4\\0\" \"ISO-8859-5\\0\" \"ISO-8859-6\\0\" \"ISO-8859-7\\0\" \"ISO-8859-8\\0\" \"ISO-8859-9\\0\" \"KOI8-R\\0\" \"KOI8-T\\0\" \"KOI8-U\\0\" \"TIS-620\\0\""
+ .byte 0x1
+ .uleb128 0x66
+ .string "__CTYPE_HAS_CODESET_ARMSCII_8 "
+ .byte 0x1
+ .uleb128 0x67
+ .string "__CTYPE_HAS_CODESET_ANSI_X3 .4_1968"
+ .byte 0x1
+ .uleb128 0x68
+ .string "__CTYPE_HAS_CODESET_CP1251 "
+ .byte 0x1
+ .uleb128 0x69
+ .string "__CTYPE_HAS_CODESET_CP1255 "
+ .byte 0x1
+ .uleb128 0x6a
+ .string "__CTYPE_HAS_CODESET_GEORGIAN_PS "
+ .byte 0x1
+ .uleb128 0x6b
+ .string "__CTYPE_HAS_CODESET_ISO_8859_1 "
+ .byte 0x1
+ .uleb128 0x6c
+ .string "__CTYPE_HAS_CODESET_ISO_8859_10 "
+ .byte 0x1
+ .uleb128 0x6d
+ .string "__CTYPE_HAS_CODESET_ISO_8859_13 "
+ .byte 0x1
+ .uleb128 0x6e
+ .string "__CTYPE_HAS_CODESET_ISO_8859_14 "
+ .byte 0x1
+ .uleb128 0x6f
+ .string "__CTYPE_HAS_CODESET_ISO_8859_15 "
+ .byte 0x1
+ .uleb128 0x70
+ .string "__CTYPE_HAS_CODESET_ISO_8859_16 "
+ .byte 0x1
+ .uleb128 0x71
+ .string "__CTYPE_HAS_CODESET_ISO_8859_2 "
+ .byte 0x1
+ .uleb128 0x72
+ .string "__CTYPE_HAS_CODESET_ISO_8859_3 "
+ .byte 0x1
+ .uleb128 0x73
+ .string "__CTYPE_HAS_CODESET_ISO_8859_4 "
+ .byte 0x1
+ .uleb128 0x74
+ .string "__CTYPE_HAS_CODESET_ISO_8859_5 "
+ .byte 0x1
+ .uleb128 0x75
+ .string "__CTYPE_HAS_CODESET_ISO_8859_6 "
+ .byte 0x1
+ .uleb128 0x76
+ .string "__CTYPE_HAS_CODESET_ISO_8859_7 "
+ .byte 0x1
+ .uleb128 0x77
+ .string "__CTYPE_HAS_CODESET_ISO_8859_8 "
+ .byte 0x1
+ .uleb128 0x78
+ .string "__CTYPE_HAS_CODESET_ISO_8859_9 "
+ .byte 0x1
+ .uleb128 0x79
+ .string "__CTYPE_HAS_CODESET_KOI8_R "
+ .byte 0x1
+ .uleb128 0x7a
+ .string "__CTYPE_HAS_CODESET_KOI8_T "
+ .byte 0x1
+ .uleb128 0x7b
+ .string "__CTYPE_HAS_CODESET_KOI8_U "
+ .byte 0x1
+ .uleb128 0x7c
+ .string "__CTYPE_HAS_CODESET_TIS_620 "
+ .byte 0x1
+ .uleb128 0x7d
+ .string "__CTYPE_HAS_CODESET_UTF_8 "
+ .byte 0x1
+ .uleb128 0x7e
+ .string "__LOCALE_DATA_WC_TABLE_DOMAIN_MAX 0x2ffff"
+ .byte 0x1
+ .uleb128 0x80
+ .string "__LOCALE_DATA_WCctype_II_LEN 768"
+ .byte 0x1
+ .uleb128 0x81
+ .string "__LOCALE_DATA_WCctype_TI_LEN 1888"
+ .byte 0x1
+ .uleb128 0x82
+ .string "__LOCALE_DATA_WCctype_UT_LEN 948"
+ .byte 0x1
+ .uleb128 0x83
+ .string "__LOCALE_DATA_WCctype_II_SHIFT 5"
+ .byte 0x1
+ .uleb128 0x84
+ .string "__LOCALE_DATA_WCctype_TI_SHIFT 3"
+ .byte 0x1
+ .uleb128 0x87
+ .string "__LOCALE_DATA_WCuplow_II_LEN 384"
+ .byte 0x1
+ .uleb128 0x88
+ .string "__LOCALE_DATA_WCuplow_TI_LEN 576"
+ .byte 0x1
+ .uleb128 0x89
+ .string "__LOCALE_DATA_WCuplow_UT_LEN 720"
+ .byte 0x1
+ .uleb128 0x8a
+ .string "__LOCALE_DATA_WCuplow_II_SHIFT 6"
+ .byte 0x1
+ .uleb128 0x8b
+ .string "__LOCALE_DATA_WCuplow_TI_SHIFT 3"
+ .byte 0x1
+ .uleb128 0x8e
+ .string "__LOCALE_DATA_WCuplow_diffs 98"
+ .byte 0x1
+ .uleb128 0x96
+ .string "__WCHAR_ENABLED "
+ .byte 0x1
+ .uleb128 0x9b
+ .string "__LOCALE_DATA_WCctype_TBL_LEN (__LOCALE_DATA_WCctype_II_LEN + __LOCALE_DATA_WCctype_TI_LEN + __LOCALE_DATA_WCctype_UT_LEN)"
+ .byte 0x1
+ .uleb128 0x9c
+ .string "__LOCALE_DATA_WCuplow_TBL_LEN (__LOCALE_DATA_WCuplow_II_LEN + __LOCALE_DATA_WCuplow_TI_LEN + __LOCALE_DATA_WCuplow_UT_LEN)"
+ .byte 0x1
+ .uleb128 0x9d
+ .string "__LOCALE_DATA_WCuplow_diff_TBL_LEN (2 * __LOCALE_DATA_WCuplow_diffs)"
+ .byte 0x2
+ .uleb128 0xa1
+ .string "__PASTE2"
+ .byte 0x1
+ .uleb128 0xa2
+ .string "__PASTE2(A,B) A ## B"
+ .byte 0x2
+ .uleb128 0xa3
+ .string "__PASTE3"
+ .byte 0x1
+ .uleb128 0xa4
+ .string "__PASTE3(A,B,C) A ## B ## C"
+ .byte 0x1
+ .uleb128 0xa6
+ .string "__LOCALE_DATA_COMMON_MMAP(X) unsigned char __PASTE3(lc_,X,_data)[__PASTE3(__lc_,X,_data_LEN)];"
+ .byte 0x1
+ .uleb128 0xa9
+ .string "__LOCALE_DATA_COMMON_MMIDX(X) unsigned char __PASTE3(lc_,X,_rows)[__PASTE3(__lc_,X,_rows_LEN)]; uint16_t __PASTE3(lc_,X,_item_offsets)[__PASTE3(__lc_,X,_item_offsets_LEN)]; uint16_t __PASTE3(lc_,X,_item_idx)[__PASTE3(__lc_,X,_item_idx_LEN)];"
+ .byte 0x4
+ .byte 0x1
+ .uleb128 0x57
+ .string "LOCALE_STRING_SIZE (2 * __LC_ALL + 2)"
+ .byte 0x1
+ .uleb128 0x163
+ .string "__UCLIBC_CURLOCALE (__global_locale)"
+ .byte 0x1
+ .uleb128 0x164
+ .string "__UCLIBC_CURLOCALE_DATA (*__global_locale)"
+ .byte 0x1
+ .uleb128 0x171
+ .string "__XL_NPP(N) N"
+ .byte 0x1
+ .uleb128 0x172
+ .string "__LOCALE_PARAM "
+ .byte 0x1
+ .uleb128 0x173
+ .string "__LOCALE_ARG "
+ .byte 0x1
+ .uleb128 0x174
+ .string "__LOCALE_PTR __UCLIBC_CURLOCALE"
+ .byte 0x4
+ .byte 0x1
+ .uleb128 0x24
+ .string "LC_CTYPE __LC_CTYPE"
+ .byte 0x1
+ .uleb128 0x25
+ .string "LC_NUMERIC __LC_NUMERIC"
+ .byte 0x1
+ .uleb128 0x26
+ .string "LC_TIME __LC_TIME"
+ .byte 0x1
+ .uleb128 0x27
+ .string "LC_COLLATE __LC_COLLATE"
+ .byte 0x1
+ .uleb128 0x28
+ .string "LC_MONETARY __LC_MONETARY"
+ .byte 0x1
+ .uleb128 0x29
+ .string "LC_MESSAGES __LC_MESSAGES"
+ .byte 0x1
+ .uleb128 0x32
+ .string "LC_ALL __LC_ALL"
+ .byte 0x1
+ .uleb128 0xa5
+ .string "LC_CTYPE_MASK (1 << __LC_CTYPE)"
+ .byte 0x1
+ .uleb128 0xa6
+ .string "LC_NUMERIC_MASK (1 << __LC_NUMERIC)"
+ .byte 0x1
+ .uleb128 0xa7
+ .string "LC_TIME_MASK (1 << __LC_TIME)"
+ .byte 0x1
+ .uleb128 0xa8
+ .string "LC_COLLATE_MASK (1 << __LC_COLLATE)"
+ .byte 0x1
+ .uleb128 0xa9
+ .string "LC_MONETARY_MASK (1 << __LC_MONETARY)"
+ .byte 0x1
+ .uleb128 0xaa
+ .string "LC_MESSAGES_MASK (1 << __LC_MESSAGES)"
+ .byte 0x1
+ .uleb128 0xc3
+ .string "LC_ALL_MASK (LC_CTYPE_MASK | LC_NUMERIC_MASK | LC_TIME_MASK | LC_COLLATE_MASK | LC_MONETARY_MASK | LC_MESSAGES_MASK )"
+ .byte 0x1
+ .uleb128 0xdd
+ .string "LC_GLOBAL_LOCALE ((__locale_t) -1L)"
+ .byte 0x4
+ .byte 0x3
+ .uleb128 0xf
+ .file 41 "../../include/errno.h"
+ .uleb128 0x29
+ .byte 0x1
+ .uleb128 0x1c
+ .string "_ERRNO_H 1"
+ .byte 0x3
+ .uleb128 0x25
+ .file 42 "../../include/bits/errno.h"
+ .uleb128 0x2a
+ .byte 0x3
+ .uleb128 0x17
+ .file 43 "../../include/bits/errno_values.h"
+ .uleb128 0x2b
+ .byte 0x1
+ .uleb128 0x2
+ .string "_BITS_ERRNO_VALUES_H "
+ .byte 0x1
+ .uleb128 0xc
+ .string "EPERM 1"
+ .byte 0x1
+ .uleb128 0xd
+ .string "ENOENT 2"
+ .byte 0x1
+ .uleb128 0xe
+ .string "ESRCH 3"
+ .byte 0x1
+ .uleb128 0xf
+ .string "EINTR 4"
+ .byte 0x1
+ .uleb128 0x10
+ .string "EIO 5"
+ .byte 0x1
+ .uleb128 0x11
+ .string "ENXIO 6"
+ .byte 0x1
+ .uleb128 0x12
+ .string "E2BIG 7"
+ .byte 0x1
+ .uleb128 0x13
+ .string "ENOEXEC 8"
+ .byte 0x1
+ .uleb128 0x14
+ .string "EBADF 9"
+ .byte 0x1
+ .uleb128 0x15
+ .string "ECHILD 10"
+ .byte 0x1
+ .uleb128 0x16
+ .string "EAGAIN 11"
+ .byte 0x1
+ .uleb128 0x17
+ .string "ENOMEM 12"
+ .byte 0x1
+ .uleb128 0x18
+ .string "EACCES 13"
+ .byte 0x1
+ .uleb128 0x19
+ .string "EFAULT 14"
+ .byte 0x1
+ .uleb128 0x1a
+ .string "ENOTBLK 15"
+ .byte 0x1
+ .uleb128 0x1b
+ .string "EBUSY 16"
+ .byte 0x1
+ .uleb128 0x1c
+ .string "EEXIST 17"
+ .byte 0x1
+ .uleb128 0x1d
+ .string "EXDEV 18"
+ .byte 0x1
+ .uleb128 0x1e
+ .string "ENODEV 19"
+ .byte 0x1
+ .uleb128 0x1f
+ .string "ENOTDIR 20"
+ .byte 0x1
+ .uleb128 0x20
+ .string "EISDIR 21"
+ .byte 0x1
+ .uleb128 0x21
+ .string "EINVAL 22"
+ .byte 0x1
+ .uleb128 0x22
+ .string "ENFILE 23"
+ .byte 0x1
+ .uleb128 0x23
+ .string "EMFILE 24"
+ .byte 0x1
+ .uleb128 0x24
+ .string "ENOTTY 25"
+ .byte 0x1
+ .uleb128 0x25
+ .string "ETXTBSY 26"
+ .byte 0x1
+ .uleb128 0x26
+ .string "EFBIG 27"
+ .byte 0x1
+ .uleb128 0x27
+ .string "ENOSPC 28"
+ .byte 0x1
+ .uleb128 0x28
+ .string "ESPIPE 29"
+ .byte 0x1
+ .uleb128 0x29
+ .string "EROFS 30"
+ .byte 0x1
+ .uleb128 0x2a
+ .string "EMLINK 31"
+ .byte 0x1
+ .uleb128 0x2b
+ .string "EPIPE 32"
+ .byte 0x1
+ .uleb128 0x2c
+ .string "EDOM 33"
+ .byte 0x1
+ .uleb128 0x2d
+ .string "ERANGE 34"
+ .byte 0x1
+ .uleb128 0x2e
+ .string "EDEADLK 35"
+ .byte 0x1
+ .uleb128 0x2f
+ .string "ENAMETOOLONG 36"
+ .byte 0x1
+ .uleb128 0x30
+ .string "ENOLCK 37"
+ .byte 0x1
+ .uleb128 0x31
+ .string "ENOSYS 38"
+ .byte 0x1
+ .uleb128 0x32
+ .string "ENOTEMPTY 39"
+ .byte 0x1
+ .uleb128 0x33
+ .string "ELOOP 40"
+ .byte 0x1
+ .uleb128 0x34
+ .string "EWOULDBLOCK EAGAIN"
+ .byte 0x1
+ .uleb128 0x35
+ .string "ENOMSG 42"
+ .byte 0x1
+ .uleb128 0x36
+ .string "EIDRM 43"
+ .byte 0x1
+ .uleb128 0x37
+ .string "ECHRNG 44"
+ .byte 0x1
+ .uleb128 0x38
+ .string "EL2NSYNC 45"
+ .byte 0x1
+ .uleb128 0x39
+ .string "EL3HLT 46"
+ .byte 0x1
+ .uleb128 0x3a
+ .string "EL3RST 47"
+ .byte 0x1
+ .uleb128 0x3b
+ .string "ELNRNG 48"
+ .byte 0x1
+ .uleb128 0x3c
+ .string "EUNATCH 49"
+ .byte 0x1
+ .uleb128 0x3d
+ .string "ENOCSI 50"
+ .byte 0x1
+ .uleb128 0x3e
+ .string "EL2HLT 51"
+ .byte 0x1
+ .uleb128 0x3f
+ .string "EBADE 52"
+ .byte 0x1
+ .uleb128 0x40
+ .string "EBADR 53"
+ .byte 0x1
+ .uleb128 0x41
+ .string "EXFULL 54"
+ .byte 0x1
+ .uleb128 0x42
+ .string "ENOANO 55"
+ .byte 0x1
+ .uleb128 0x43
+ .string "EBADRQC 56"
+ .byte 0x1
+ .uleb128 0x44
+ .string "EBADSLT 57"
+ .byte 0x1
+ .uleb128 0x45
+ .string "EDEADLOCK EDEADLK"
+ .byte 0x1
+ .uleb128 0x46
+ .string "EBFONT 59"
+ .byte 0x1
+ .uleb128 0x47
+ .string "ENOSTR 60"
+ .byte 0x1
+ .uleb128 0x48
+ .string "ENODATA 61"
+ .byte 0x1
+ .uleb128 0x49
+ .string "ETIME 62"
+ .byte 0x1
+ .uleb128 0x4a
+ .string "ENOSR 63"
+ .byte 0x1
+ .uleb128 0x4b
+ .string "ENONET 64"
+ .byte 0x1
+ .uleb128 0x4c
+ .string "ENOPKG 65"
+ .byte 0x1
+ .uleb128 0x4d
+ .string "EREMOTE 66"
+ .byte 0x1
+ .uleb128 0x4e
+ .string "ENOLINK 67"
+ .byte 0x1
+ .uleb128 0x4f
+ .string "EADV 68"
+ .byte 0x1
+ .uleb128 0x50
+ .string "ESRMNT 69"
+ .byte 0x1
+ .uleb128 0x51
+ .string "ECOMM 70"
+ .byte 0x1
+ .uleb128 0x52
+ .string "EPROTO 71"
+ .byte 0x1
+ .uleb128 0x53
+ .string "EMULTIHOP 72"
+ .byte 0x1
+ .uleb128 0x54
+ .string "EDOTDOT 73"
+ .byte 0x1
+ .uleb128 0x55
+ .string "EBADMSG 74"
+ .byte 0x1
+ .uleb128 0x56
+ .string "EOVERFLOW 75"
+ .byte 0x1
+ .uleb128 0x57
+ .string "ENOTUNIQ 76"
+ .byte 0x1
+ .uleb128 0x58
+ .string "EBADFD 77"
+ .byte 0x1
+ .uleb128 0x59
+ .string "EREMCHG 78"
+ .byte 0x1
+ .uleb128 0x5a
+ .string "ELIBACC 79"
+ .byte 0x1
+ .uleb128 0x5b
+ .string "ELIBBAD 80"
+ .byte 0x1
+ .uleb128 0x5c
+ .string "ELIBSCN 81"
+ .byte 0x1
+ .uleb128 0x5d
+ .string "ELIBMAX 82"
+ .byte 0x1
+ .uleb128 0x5e
+ .string "ELIBEXEC 83"
+ .byte 0x1
+ .uleb128 0x5f
+ .string "EILSEQ 84"
+ .byte 0x1
+ .uleb128 0x60
+ .string "ERESTART 85"
+ .byte 0x1
+ .uleb128 0x61
+ .string "ESTRPIPE 86"
+ .byte 0x1
+ .uleb128 0x62
+ .string "EUSERS 87"
+ .byte 0x1
+ .uleb128 0x63
+ .string "ENOTSOCK 88"
+ .byte 0x1
+ .uleb128 0x64
+ .string "EDESTADDRREQ 89"
+ .byte 0x1
+ .uleb128 0x65
+ .string "EMSGSIZE 90"
+ .byte 0x1
+ .uleb128 0x66
+ .string "EPROTOTYPE 91"
+ .byte 0x1
+ .uleb128 0x67
+ .string "ENOPROTOOPT 92"
+ .byte 0x1
+ .uleb128 0x68
+ .string "EPROTONOSUPPORT 93"
+ .byte 0x1
+ .uleb128 0x69
+ .string "ESOCKTNOSUPPORT 94"
+ .byte 0x1
+ .uleb128 0x6a
+ .string "EOPNOTSUPP 95"
+ .byte 0x1
+ .uleb128 0x6b
+ .string "EPFNOSUPPORT 96"
+ .byte 0x1
+ .uleb128 0x6c
+ .string "EAFNOSUPPORT 97"
+ .byte 0x1
+ .uleb128 0x6d
+ .string "EADDRINUSE 98"
+ .byte 0x1
+ .uleb128 0x6e
+ .string "EADDRNOTAVAIL 99"
+ .byte 0x1
+ .uleb128 0x6f
+ .string "ENETDOWN 100"
+ .byte 0x1
+ .uleb128 0x70
+ .string "ENETUNREACH 101"
+ .byte 0x1
+ .uleb128 0x71
+ .string "ENETRESET 102"
+ .byte 0x1
+ .uleb128 0x72
+ .string "ECONNABORTED 103"
+ .byte 0x1
+ .uleb128 0x73
+ .string "ECONNRESET 104"
+ .byte 0x1
+ .uleb128 0x74
+ .string "ENOBUFS 105"
+ .byte 0x1
+ .uleb128 0x75
+ .string "EISCONN 106"
+ .byte 0x1
+ .uleb128 0x76
+ .string "ENOTCONN 107"
+ .byte 0x1
+ .uleb128 0x77
+ .string "ESHUTDOWN 108"
+ .byte 0x1
+ .uleb128 0x78
+ .string "ETOOMANYREFS 109"
+ .byte 0x1
+ .uleb128 0x79
+ .string "ETIMEDOUT 110"
+ .byte 0x1
+ .uleb128 0x7a
+ .string "ECONNREFUSED 111"
+ .byte 0x1
+ .uleb128 0x7b
+ .string "EHOSTDOWN 112"
+ .byte 0x1
+ .uleb128 0x7c
+ .string "EHOSTUNREACH 113"
+ .byte 0x1
+ .uleb128 0x7d
+ .string "EALREADY 114"
+ .byte 0x1
+ .uleb128 0x7e
+ .string "EINPROGRESS 115"
+ .byte 0x1
+ .uleb128 0x7f
+ .string "ESTALE 116"
+ .byte 0x1
+ .uleb128 0x80
+ .string "EUCLEAN 117"
+ .byte 0x1
+ .uleb128 0x81
+ .string "ENOTNAM 118"
+ .byte 0x1
+ .uleb128 0x82
+ .string "ENAVAIL 119"
+ .byte 0x1
+ .uleb128 0x83
+ .string "EISNAM 120"
+ .byte 0x1
+ .uleb128 0x84
+ .string "EREMOTEIO 121"
+ .byte 0x1
+ .uleb128 0x85
+ .string "EDQUOT 122"
+ .byte 0x1
+ .uleb128 0x86
+ .string "ENOMEDIUM 123"
+ .byte 0x1
+ .uleb128 0x87
+ .string "EMEDIUMTYPE 124"
+ .byte 0x4
+ .byte 0x1
+ .uleb128 0x19
+ .string "ENOTSUP EOPNOTSUPP"
+ .byte 0x1
+ .uleb128 0x1d
+ .string "ECANCELED 125"
+ .byte 0x1
+ .uleb128 0x27
+ .string "errno (*__errno_location ())"
+ .byte 0x4
+ .byte 0x2
+ .uleb128 0x25
+ .string "__need_Emath"
+ .byte 0x2
+ .uleb128 0x3f
+ .string "errno"
+ .byte 0x1
+ .uleb128 0x41
+ .string "errno __libc_errno"
+ .byte 0x1
+ .uleb128 0x4a
+ .string "__set_errno(val) (errno = (val))"
+ .byte 0x1
+ .uleb128 0x5a
+ .string "__error_t_defined 1"
+ .byte 0x2
+ .uleb128 0x5c
+ .string "__need_error_t"
+ .byte 0x4
+ .byte 0x3
+ .uleb128 0x10
+ .file 44 "../../include/signal.h"
+ .uleb128 0x2c
+ .byte 0x1
+ .uleb128 0x1a
+ .string "_SIGNAL_H "
+ .byte 0x3
+ .uleb128 0x22
+ .uleb128 0x1f
+ .byte 0x1
+ .uleb128 0x2b
+ .string "_SIGSET_H_fns 1"
+ .byte 0x1
+ .uleb128 0x2e
+ .string "_EXTERN_INLINE extern __inline"
+ .byte 0x1
+ .uleb128 0x32
+ .string "__sigmask(sig) (((unsigned long int) 1) << (((sig) - 1) % (8 * sizeof (unsigned long int))))"
+ .byte 0x1
+ .uleb128 0x36
+ .string "__sigword(sig) (((sig) - 1) / (8 * sizeof (unsigned long int)))"
+ .byte 0x1
+ .uleb128 0x39
+ .string "__sigemptyset(set) (__extension__ ({ int __cnt = _SIGSET_NWORDS; sigset_t *__set = (set); while (--__cnt >= 0) __set->__val[__cnt] = 0; 0; }))"
+ .byte 0x1
+ .uleb128 0x3e
+ .string "__sigfillset(set) (__extension__ ({ int __cnt = _SIGSET_NWORDS; sigset_t *__set = (set); while (--__cnt >= 0) __set->__val[__cnt] = ~0UL; 0; }))"
+ .byte 0x1
+ .uleb128 0x48
+ .string "__sigisemptyset(set) (__extension__ ({ int __cnt = _SIGSET_NWORDS; const sigset_t *__set = (set); int __ret = __set->__val[--__cnt]; while (!__ret && --__cnt >= 0) __ret = __set->__val[__cnt]; __ret == 0; }))"
+ .byte 0x1
+ .uleb128 0x4f
+ .ascii "__sigandset("
+ .string "dest,left,right) (__extension__ ({ int __cnt = _SIGSET_NWORDS; sigset_t *__dest = (dest); const sigset_t *__left = (left); const sigset_t *__right = (right); while (--__cnt >= 0) __dest->__val[__cnt] = (__left->__val[__cnt] & __right->__val[__cnt]); 0; }))"
+ .byte 0x1
+ .uleb128 0x58
+ .ascii "__sigorset("
+ .string "dest,left,right) (__extension__ ({ int __cnt = _SIGSET_NWORDS; sigset_t *__dest = (dest); const sigset_t *__left = (left); const sigset_t *__right = (right); while (--__cnt >= 0) __dest->__val[__cnt] = (__left->__val[__cnt] | __right->__val[__cnt]); 0; }))"
+ .byte 0x4
+ .byte 0x1
+ .uleb128 0x27
+ .string "__sig_atomic_t_defined "
+ .byte 0x2
+ .uleb128 0x2c
+ .string "__need_sig_atomic_t"
+ .byte 0x2
+ .uleb128 0x34
+ .string "__need_sigset_t"
+ .byte 0x3
+ .uleb128 0x3b
+ .file 45 "../../include/bits/signum.h"
+ .uleb128 0x2d
+ .byte 0x1
+ .uleb128 0x17
+ .string "SIG_ERR ((__sighandler_t) -1)"
+ .byte 0x1
+ .uleb128 0x18
+ .string "SIG_DFL ((__sighandler_t) 0)"
+ .byte 0x1
+ .uleb128 0x19
+ .string "SIG_IGN ((__sighandler_t) 1)"
+ .byte 0x1
+ .uleb128 0x1c
+ .string "SIG_HOLD ((__sighandler_t) 2)"
+ .byte 0x1
+ .uleb128 0x21
+ .string "SIGHUP 1"
+ .byte 0x1
+ .uleb128 0x22
+ .string "SIGINT 2"
+ .byte 0x1
+ .uleb128 0x23
+ .string "SIGQUIT 3"
+ .byte 0x1
+ .uleb128 0x24
+ .string "SIGILL 4"
+ .byte 0x1
+ .uleb128 0x25
+ .string "SIGTRAP 5"
+ .byte 0x1
+ .uleb128 0x26
+ .string "SIGABRT 6"
+ .byte 0x1
+ .uleb128 0x27
+ .string "SIGIOT 6"
+ .byte 0x1
+ .uleb128 0x28
+ .string "SIGBUS 7"
+ .byte 0x1
+ .uleb128 0x29
+ .string "SIGFPE 8"
+ .byte 0x1
+ .uleb128 0x2a
+ .string "SIGKILL 9"
+ .byte 0x1
+ .uleb128 0x2b
+ .string "SIGUSR1 10"
+ .byte 0x1
+ .uleb128 0x2c
+ .string "SIGSEGV 11"
+ .byte 0x1
+ .uleb128 0x2d
+ .string "SIGUSR2 12"
+ .byte 0x1
+ .uleb128 0x2e
+ .string "SIGPIPE 13"
+ .byte 0x1
+ .uleb128 0x2f
+ .string "SIGALRM 14"
+ .byte 0x1
+ .uleb128 0x30
+ .string "SIGTERM 15"
+ .byte 0x1
+ .uleb128 0x31
+ .string "SIGSTKFLT 16"
+ .byte 0x1
+ .uleb128 0x32
+ .string "SIGCLD SIGCHLD"
+ .byte 0x1
+ .uleb128 0x33
+ .string "SIGCHLD 17"
+ .byte 0x1
+ .uleb128 0x34
+ .string "SIGCONT 18"
+ .byte 0x1
+ .uleb128 0x35
+ .string "SIGSTOP 19"
+ .byte 0x1
+ .uleb128 0x36
+ .string "SIGTSTP 20"
+ .byte 0x1
+ .uleb128 0x37
+ .string "SIGTTIN 21"
+ .byte 0x1
+ .uleb128 0x38
+ .string "SIGTTOU 22"
+ .byte 0x1
+ .uleb128 0x39
+ .string "SIGURG 23"
+ .byte 0x1
+ .uleb128 0x3a
+ .string "SIGXCPU 24"
+ .byte 0x1
+ .uleb128 0x3b
+ .string "SIGXFSZ 25"
+ .byte 0x1
+ .uleb128 0x3c
+ .string "SIGVTALRM 26"
+ .byte 0x1
+ .uleb128 0x3d
+ .string "SIGPROF 27"
+ .byte 0x1
+ .uleb128 0x3e
+ .string "SIGWINCH 28"
+ .byte 0x1
+ .uleb128 0x3f
+ .string "SIGPOLL SIGIO"
+ .byte 0x1
+ .uleb128 0x40
+ .string "SIGIO 29"
+ .byte 0x1
+ .uleb128 0x41
+ .string "SIGPWR 30"
+ .byte 0x1
+ .uleb128 0x42
+ .string "SIGSYS 31"
+ .byte 0x1
+ .uleb128 0x43
+ .string "SIGUNUSED 31"
+ .byte 0x1
+ .uleb128 0x45
+ .string "_NSIG 64"
+ .byte 0x1
+ .uleb128 0x48
+ .string "SIGRTMIN (__libc_current_sigrtmin ())"
+ .byte 0x1
+ .uleb128 0x49
+ .string "SIGRTMAX (__libc_current_sigrtmax ())"
+ .byte 0x1
+ .uleb128 0x4d
+ .string "__SIGRTMIN 32"
+ .byte 0x1
+ .uleb128 0x4e
+ .string "__SIGRTMAX (_NSIG - 1)"
+ .byte 0x4
+ .byte 0x1
+ .uleb128 0xa3
+ .string "sigpause(sig) __sigpause ((sig), 1)"
+ .byte 0x1
+ .uleb128 0xaf
+ .string "sigmask(sig) __sigmask(sig)"
+ .byte 0x1
+ .uleb128 0xbd
+ .string "NSIG _NSIG"
+ .byte 0x1
+ .uleb128 0xcd
+ .string "__need_timespec "
+ .byte 0x3
+ .uleb128 0xcf
+ .uleb128 0x1c
+ .byte 0x2
+ .uleb128 0x44
+ .string "__need_clock_t"
+ .byte 0x2
+ .uleb128 0x54
+ .string "__need_time_t"
+ .byte 0x2
+ .uleb128 0x60
+ .string "__clockid_time_t"
+ .byte 0x2
+ .uleb128 0x6c
+ .string "__need_timer_t"
+ .byte 0x2
+ .uleb128 0x80
+ .string "__need_timespec"
+ .byte 0x4
+ .byte 0x3
+ .uleb128 0xd2
+ .file 46 "../../include/bits/siginfo.h"
+ .uleb128 0x2e
+ .byte 0x3
+ .uleb128 0x1a
+ .uleb128 0xd
+ .byte 0x1
+ .uleb128 0x13
+ .string "__WORDSIZE 32"
+ .byte 0x4
+ .byte 0x1
+ .uleb128 0x1e
+ .string "__have_sigval_t 1"
+ .byte 0x1
+ .uleb128 0x2a
+ .string "__have_siginfo_t 1"
+ .byte 0x1
+ .uleb128 0x2c
+ .string "__SI_MAX_SIZE 128"
+ .byte 0x1
+ .uleb128 0x30
+ .string "__SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3)"
+ .byte 0x1
+ .uleb128 0x6f
+ .string "si_pid _sifields._kill.si_pid"
+ .byte 0x1
+ .uleb128 0x70
+ .string "si_uid _sifields._kill.si_uid"
+ .byte 0x1
+ .uleb128 0x71
+ .string "si_timer1 _sifields._timer._timer1"
+ .byte 0x1
+ .uleb128 0x72
+ .string "si_timer2 _sifields._timer._timer2"
+ .byte 0x1
+ .uleb128 0x73
+ .string "si_status _sifields._sigchld.si_status"
+ .byte 0x1
+ .uleb128 0x74
+ .string "si_utime _sifields._sigchld.si_utime"
+ .byte 0x1
+ .uleb128 0x75
+ .string "si_stime _sifields._sigchld.si_stime"
+ .byte 0x1
+ .uleb128 0x76
+ .string "si_value _sifields._rt.si_sigval"
+ .byte 0x1
+ .uleb128 0x77
+ .string "si_int _sifields._rt.si_sigval.sival_int"
+ .byte 0x1
+ .uleb128 0x78
+ .string "si_ptr _sifields._rt.si_sigval.sival_ptr"
+ .byte 0x1
+ .uleb128 0x79
+ .string "si_addr _sifields._sigfault.si_addr"
+ .byte 0x1
+ .uleb128 0x7a
+ .string "si_band _sifields._sigpoll.si_band"
+ .byte 0x1
+ .uleb128 0x7b
+ .string "si_fd _sifields._sigpoll.si_fd"
+ .byte 0x1
+ .uleb128 0x83
+ .string "SI_ASYNCNL SI_ASYNCNL"
+ .byte 0x1
+ .uleb128 0x85
+ .string "SI_TKILL SI_TKILL"
+ .byte 0x1
+ .uleb128 0x87
+ .string "SI_SIGIO SI_SIGIO"
+ .byte 0x1
+ .uleb128 0x89
+ .string "SI_ASYNCIO SI_ASYNCIO"
+ .byte 0x1
+ .uleb128 0x8b
+ .string "SI_MESGQ SI_MESGQ"
+ .byte 0x1
+ .uleb128 0x8d
+ .string "SI_TIMER SI_TIMER"
+ .byte 0x1
+ .uleb128 0x8f
+ .string "SI_QUEUE SI_QUEUE"
+ .byte 0x1
+ .uleb128 0x91
+ .string "SI_USER SI_USER"
+ .byte 0x1
+ .uleb128 0x93
+ .string "SI_KERNEL SI_KERNEL"
+ .byte 0x1
+ .uleb128 0x9b
+ .string "ILL_ILLOPC ILL_ILLOPC"
+ .byte 0x1
+ .uleb128 0x9d
+ .string "ILL_ILLOPN ILL_ILLOPN"
+ .byte 0x1
+ .uleb128 0x9f
+ .string "ILL_ILLADR ILL_ILLADR"
+ .byte 0x1
+ .uleb128 0xa1
+ .string "ILL_ILLTRP ILL_ILLTRP"
+ .byte 0x1
+ .uleb128 0xa3
+ .string "ILL_PRVOPC ILL_PRVOPC"
+ .byte 0x1
+ .uleb128 0xa5
+ .string "ILL_PRVREG ILL_PRVREG"
+ .byte 0x1
+ .uleb128 0xa7
+ .string "ILL_COPROC ILL_COPROC"
+ .byte 0x1
+ .uleb128 0xa9
+ .string "ILL_BADSTK ILL_BADSTK"
+ .byte 0x1
+ .uleb128 0xb0
+ .string "FPE_INTDIV FPE_INTDIV"
+ .byte 0x1
+ .uleb128 0xb2
+ .string "FPE_INTOVF FPE_INTOVF"
+ .byte 0x1
+ .uleb128 0xb4
+ .string "FPE_FLTDIV FPE_FLTDIV"
+ .byte 0x1
+ .uleb128 0xb6
+ .string "FPE_FLTOVF FPE_FLTOVF"
+ .byte 0x1
+ .uleb128 0xb8
+ .string "FPE_FLTUND FPE_FLTUND"
+ .byte 0x1
+ .uleb128 0xba
+ .string "FPE_FLTRES FPE_FLTRES"
+ .byte 0x1
+ .uleb128 0xbc
+ .string "FPE_FLTINV FPE_FLTINV"
+ .byte 0x1
+ .uleb128 0xbe
+ .string "FPE_FLTSUB FPE_FLTSUB"
+ .byte 0x1
+ .uleb128 0xc5
+ .string "SEGV_MAPERR SEGV_MAPERR"
+ .byte 0x1
+ .uleb128 0xc7
+ .string "SEGV_ACCERR SEGV_ACCERR"
+ .byte 0x1
+ .uleb128 0xce
+ .string "BUS_ADRALN BUS_ADRALN"
+ .byte 0x1
+ .uleb128 0xd0
+ .string "BUS_ADRERR BUS_ADRERR"
+ .byte 0x1
+ .uleb128 0xd2
+ .string "BUS_OBJERR BUS_OBJERR"
+ .byte 0x1
+ .uleb128 0xd9
+ .string "TRAP_BRKPT TRAP_BRKPT"
+ .byte 0x1
+ .uleb128 0xdb
+ .string "TRAP_TRACE TRAP_TRACE"
+ .byte 0x1
+ .uleb128 0xe2
+ .string "CLD_EXITED CLD_EXITED"
+ .byte 0x1
+ .uleb128 0xe4
+ .string "CLD_KILLED CLD_KILLED"
+ .byte 0x1
+ .uleb128 0xe6
+ .string "CLD_DUMPED CLD_DUMPED"
+ .byte 0x1
+ .uleb128 0xe8
+ .string "CLD_TRAPPED CLD_TRAPPED"
+ .byte 0x1
+ .uleb128 0xea
+ .string "CLD_STOPPED CLD_STOPPED"
+ .byte 0x1
+ .uleb128 0xec
+ .string "CLD_CONTINUED CLD_CONTINUED"
+ .byte 0x1
+ .uleb128 0xf3
+ .string "POLL_IN POLL_IN"
+ .byte 0x1
+ .uleb128 0xf5
+ .string "POLL_OUT POLL_OUT"
+ .byte 0x1
+ .uleb128 0xf7
+ .string "POLL_MSG POLL_MSG"
+ .byte 0x1
+ .uleb128 0xf9
+ .string "POLL_ERR POLL_ERR"
+ .byte 0x1
+ .uleb128 0xfb
+ .string "POLL_PRI POLL_PRI"
+ .byte 0x1
+ .uleb128 0xfd
+ .string "POLL_HUP POLL_HUP"
+ .byte 0x2
+ .uleb128 0x100
+ .string "__need_siginfo_t"
+ .byte 0x1
+ .uleb128 0x106
+ .string "__have_sigevent_t 1"
+ .byte 0x1
+ .uleb128 0x109
+ .string "__SIGEV_MAX_SIZE 64"
+ .byte 0x1
+ .uleb128 0x10d
+ .string "__SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3)"
+ .byte 0x1
+ .uleb128 0x126
+ .string "sigev_notify_function _sigev_un._sigev_thread._function"
+ .byte 0x1
+ .uleb128 0x127
+ .string "sigev_notify_attributes _sigev_un._sigev_thread._attribute"
+ .byte 0x1
+ .uleb128 0x12d
+ .string "SIGEV_SIGNAL SIGEV_SIGNAL"
+ .byte 0x1
+ .uleb128 0x12f
+ .string "SIGEV_NONE SIGEV_NONE"
+ .byte 0x1
+ .uleb128 0x131
+ .string "SIGEV_THREAD SIGEV_THREAD"
+ .byte 0x1
+ .uleb128 0x134
+ .string "SIGEV_THREAD_ID SIGEV_THREAD_ID"
+ .byte 0x4
+ .byte 0x3
+ .uleb128 0xf4
+ .file 47 "../../include/bits/sigaction.h"
+ .uleb128 0x2f
+ .byte 0x1
+ .uleb128 0x25
+ .string "sa_handler __sigaction_handler.sa_handler"
+ .byte 0x1
+ .uleb128 0x26
+ .string "sa_sigaction __sigaction_handler.sa_sigaction"
+ .byte 0x1
+ .uleb128 0x36
+ .string "SA_NOCLDSTOP 1"
+ .byte 0x1
+ .uleb128 0x37
+ .string "SA_NOCLDWAIT 2"
+ .byte 0x1
+ .uleb128 0x38
+ .string "SA_SIGINFO 4"
+ .byte 0x1
+ .uleb128 0x3b
+ .string "SA_ONSTACK 0x08000000"
+ .byte 0x1
+ .uleb128 0x3c
+ .string "SA_RESTART 0x10000000"
+ .byte 0x1
+ .uleb128 0x3d
+ .string "SA_NODEFER 0x40000000"
+ .byte 0x1
+ .uleb128 0x3f
+ .string "SA_RESETHAND 0x80000000"
+ .byte 0x1
+ .uleb128 0x42
+ .string "SA_INTERRUPT 0x20000000"
+ .byte 0x1
+ .uleb128 0x45
+ .string "SA_NOMASK SA_NODEFER"
+ .byte 0x1
+ .uleb128 0x46
+ .string "SA_ONESHOT SA_RESETHAND"
+ .byte 0x1
+ .uleb128 0x47
+ .string "SA_STACK SA_ONSTACK"
+ .byte 0x1
+ .uleb128 0x4b
+ .string "SIG_BLOCK 0"
+ .byte 0x1
+ .uleb128 0x4c
+ .string "SIG_UNBLOCK 1"
+ .byte 0x1
+ .uleb128 0x4d
+ .string "SIG_SETMASK 2"
+ .byte 0x4
+ .byte 0x1
+ .uleb128 0x139
+ .string "sv_onstack sv_flags"
+ .byte 0x1
+ .uleb128 0x13d
+ .string "SV_ONSTACK (1 << 0)"
+ .byte 0x1
+ .uleb128 0x13e
+ .string "SV_INTERRUPT (1 << 1)"
+ .byte 0x1
+ .uleb128 0x13f
+ .string "SV_RESETHAND (1 << 2)"
+ .byte 0x3
+ .uleb128 0x14d
+ .file 48 "../../include/bits/sigcontext.h"
+ .uleb128 0x30
+ .byte 0x1
+ .uleb128 0x1a
+ .string "sigcontext_struct sigcontext"
+ .byte 0x3
+ .uleb128 0x1d
+ .file 49 "/opt/STM/STLinux-2.3ear/devkit/sh4/uclibc_target/usr/include/asm/sigcontext.h"
+ .uleb128 0x31
+ .byte 0x1
+ .uleb128 0x2
+ .string "__ASM_SH_SIGCONTEXT_H "
+ .byte 0x4
+ .byte 0x4
+ .byte 0x3
+ .uleb128 0x15c
+ .file 50 "../../include/bits/sigstack.h"
+ .uleb128 0x32
+ .byte 0x1
+ .uleb128 0x25
+ .string "SS_ONSTACK SS_ONSTACK"
+ .byte 0x1
+ .uleb128 0x27
+ .string "SS_DISABLE SS_DISABLE"
+ .byte 0x1
+ .uleb128 0x2b
+ .string "MINSIGSTKSZ 2048"
+ .byte 0x1
+ .uleb128 0x2e
+ .string "SIGSTKSZ 8192"
+ .byte 0x4
+ .byte 0x3
+ .uleb128 0x15f
+ .file 51 "../../include/ucontext.h"
+ .uleb128 0x33
+ .byte 0x1
+ .uleb128 0x14
+ .string "_UCONTEXT_H 1"
+ .byte 0x3
+ .uleb128 0x1a
+ .file 52 "../../include/sys/ucontext.h"
+ .uleb128 0x34
+ .byte 0x1
+ .uleb128 0x16
+ .string "_SYS_UCONTEXT_H 1"
+ .byte 0x3
+ .uleb128 0x1a
+ .uleb128 0x2c
+ .byte 0x4
+ .byte 0x3
+ .uleb128 0x1e
+ .uleb128 0x30
+ .byte 0x4
+ .byte 0x1
+ .uleb128 0x23
+ .string "NFPREG 16"
+ .byte 0x1
+ .uleb128 0x2d
+ .string "R0 R0"
+ .byte 0x1
+ .uleb128 0x2f
+ .string "R1 R1"
+ .byte 0x1
+ .uleb128 0x31
+ .string "R2 R2"
+ .byte 0x1
+ .uleb128 0x33
+ .string "R3 R3"
+ .byte 0x1
+ .uleb128 0x35
+ .string "R4 R4"
+ .byte 0x1
+ .uleb128 0x37
+ .string "R5 R5"
+ .byte 0x1
+ .uleb128 0x39
+ .string "R6 R6"
+ .byte 0x1
+ .uleb128 0x3b
+ .string "R7 R7"
+ .byte 0x1
+ .uleb128 0x3d
+ .string "R8 R8"
+ .byte 0x1
+ .uleb128 0x3f
+ .string "R9 R9"
+ .byte 0x1
+ .uleb128 0x41
+ .string "R10 R10"
+ .byte 0x1
+ .uleb128 0x43
+ .string "R11 R11"
+ .byte 0x1
+ .uleb128 0x45
+ .string "R12 R12"
+ .byte 0x1
+ .uleb128 0x47
+ .string "R13 R13"
+ .byte 0x1
+ .uleb128 0x49
+ .string "R14 R14"
+ .byte 0x1
+ .uleb128 0x4b
+ .string "R15 R15"
+ .byte 0x1
+ .uleb128 0x52
+ .string "NFPREG 16"
+ .byte 0x4
+ .byte 0x4
+ .byte 0x3
+ .uleb128 0x183
+ .file 53 "../../include/bits/sigthread.h"
+ .uleb128 0x35
+ .byte 0x1
+ .uleb128 0x15
+ .string "_BITS_SIGTHREAD_H 1"
+ .byte 0x4
+ .byte 0x4
+ .byte 0x3
+ .uleb128 0x12
+ .file 54 "tst_types.h"
+ .uleb128 0x36
+ .byte 0x1
+ .uleb128 0xb
+ .string "TST_TYPES_H "
+ .byte 0x3
+ .uleb128 0xf
+ .uleb128 0x12
+ .byte 0x1
+ .uleb128 0x1b
+ .string "_WCHAR_H 1"
+ .byte 0x1
+ .uleb128 0x25
+ .string "__need___FILE "
+ .byte 0x1
+ .uleb128 0x27
+ .string "__need_FILE "
+ .byte 0x1
+ .uleb128 0x2b
+ .string "__need___va_list "
+ .byte 0x3
+ .uleb128 0x2d
+ .uleb128 0x14
+ .byte 0x2
+ .uleb128 0x25
+ .string "__need___va_list"
+ .byte 0x4
+ .byte 0x1
+ .uleb128 0x2f
+ .string "__need_size_t "
+ .byte 0x1
+ .uleb128 0x30
+ .string "__need_wchar_t "
+ .byte 0x1
+ .uleb128 0x31
+ .string "__need_NULL "
+ .byte 0x1
+ .uleb128 0x33
+ .string "__need_wint_t "
+ .byte 0x3
+ .uleb128 0x35
+ .uleb128 0xa
+ .byte 0x2
+ .uleb128 0xa3
+ .string "__need_ptrdiff_t"
+ .byte 0x2
+ .uleb128 0xec
+ .string "__need_size_t"
+ .byte 0x2
+ .uleb128 0x159
+ .string "__need_wchar_t"
+ .byte 0x2
+ .uleb128 0x165
+ .string "__need_wint_t"
+ .byte 0x2
+ .uleb128 0x18e
+ .string "NULL"
+ .byte 0x1
+ .uleb128 0x193
+ .string "NULL ((void *)0)"
+ .byte 0x2
+ .uleb128 0x199
+ .string "__need_NULL"
+ .byte 0x1
+ .uleb128 0x19e
+ .string "offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)"
+ .byte 0x4
+ .byte 0x2
+ .uleb128 0x62
+ .string "__need_mbstate_t"
+ .byte 0x1
+ .uleb128 0x78
+ .string "WEOF (0xffffffffu)"
+ .byte 0x4
+ .byte 0x3
+ .uleb128 0x10
+ .file 55 "../../include/wctype.h"
+ .uleb128 0x37
+ .byte 0x1
+ .uleb128 0x22
+ .string "_WCTYPE_H 1"
+ .byte 0x1
+ .uleb128 0x26
+ .string "__need_wint_t "
+ .byte 0x3
+ .uleb128 0x28
+ .uleb128 0xa
+ .byte 0x2
+ .uleb128 0xa3
+ .string "__need_ptrdiff_t"
+ .byte 0x2
+ .uleb128 0xec
+ .string "__need_size_t"
+ .byte 0x2
+ .uleb128 0x159
+ .string "__need_wchar_t"
+ .byte 0x2
+ .uleb128 0x165
+ .string "__need_wint_t"
+ .byte 0x2
+ .uleb128 0x18e
+ .string "NULL"
+ .byte 0x1
+ .uleb128 0x193
+ .string "NULL ((void *)0)"
+ .byte 0x2
+ .uleb128 0x199
+ .string "__need_NULL"
+ .byte 0x1
+ .uleb128 0x19e
+ .string "offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)"
+ .byte 0x4
+ .byte 0x2
+ .uleb128 0x3b
+ .string "__need_iswxxx"
+ .byte 0x1
+ .uleb128 0x41
+ .string "__iswxxx_defined 1"
+ .byte 0x1
+ .uleb128 0x4b
+ .string "_ISwbit(bit) (1 << (bit))"
+ .byte 0x4
+ .byte 0x3
+ .uleb128 0x11
+ .file 56 "tst_funcs.h"
+ .uleb128 0x38
+ .byte 0x1
+ .uleb128 0xb
+ .string "TST_FUNCS_H "
+ .byte 0x1
+ .uleb128 0xd
+ .string "C_SUCCESS 'S'"
+ .byte 0x1
+ .uleb128 0xe
+ .string "C_FAILURE 'F'"
+ .byte 0x1
+ .uleb128 0xf
+ .string "C_IGNORED 'I'"
+ .byte 0x1
+ .uleb128 0x10
+ .string "C_INVALID 'D'"
+ .byte 0x1
+ .uleb128 0x11
+ .string "C_LOCALES 'L'"
+ .byte 0x1
+ .uleb128 0x17
+ .string "Result(C,S,E,M) result (fp, (C), (S), locale, rec+1, seq_num+1, (E), (M))"
+ .byte 0x1
+ .uleb128 0x1a
+ .string "CASE_0 0"
+ .byte 0x1
+ .uleb128 0x1b
+ .string "CASE_1 1"
+ .byte 0x1
+ .uleb128 0x1c
+ .string "CASE_2 2"
+ .byte 0x1
+ .uleb128 0x1d
+ .string "CASE_3 3"
+ .byte 0x1
+ .uleb128 0x1e
+ .string "CASE_4 4"
+ .byte 0x1
+ .uleb128 0x1f
+ .string "CASE_5 5"
+ .byte 0x1
+ .uleb128 0x20
+ .string "CASE_6 6"
+ .byte 0x1
+ .uleb128 0x21
+ .string "CASE_7 7"
+ .byte 0x1
+ .uleb128 0x22
+ .string "CASE_8 8"
+ .byte 0x1
+ .uleb128 0x23
+ .string "CASE_9 9"
+ .byte 0x1
+ .uleb128 0x25
+ .string "MS_PASSED \"PASSED\""
+ .byte 0x1
+ .uleb128 0x26
+ .string "MS_SPACE \"\t \""
+ .byte 0x1
+ .uleb128 0x27
+ .string "MS_FAILED \"\t \""
+ .byte 0x1
+ .uleb128 0x28
+ .string "MS_NOTEST \"NOTEST\""
+ .byte 0x1
+ .uleb128 0x29
+ .string "MS_ABORTU \"ABEND0\""
+ .byte 0x1
+ .uleb128 0x2a
+ .string "MS_ABORT \"ABEND1\""
+ .byte 0x1
+ .uleb128 0x2c
+ .string "MK_PASSED 0x00"
+ .byte 0x1
+ .uleb128 0x2d
+ .string "MK_SPACE 0x01"
+ .byte 0x1
+ .uleb128 0x2e
+ .string "MK_NOTEST 0x02"
+ .byte 0x1
+ .uleb128 0x2f
+ .string "MK_ABORTU 0x04"
+ .byte 0x1
+ .uleb128 0x30
+ .string "MK_ABORT 0x08"
+ .byte 0x1
+ .uleb128 0x36
+ .string "TST_ABS(x) (((x) > 0) ? (x) : -(x))"
+ .byte 0x1
+ .uleb128 0x38
+ .string "TMD_ERRET(_type_) int err_val; int ret_flg; _type_ ret_val"
+ .byte 0x1
+ .uleb128 0x3c
+ .string "TMD_RECHEAD(_FUNC_) typedef struct { TIN_ ##_FUNC_ ##_REC input; TEX_ ##_FUNC_ ##_REC expect; int is_last; } TST_ ##_FUNC_ ##_REC; typedef struct { TST_HEAD hd; TST_ ##_FUNC_ ##_REC rec[ MAX_LOC_TEST ]; } TST_ ##_FUNC_"
+ .byte 0x1
+ .uleb128 0x48
+ .string "TST_FTYP(func) tst_ ##func ##_loc"
+ .byte 0x1
+ .uleb128 0x49
+ .string "TST_HEAD(func) tst_ ##func ##_loc[ loc ].hd"
+ .byte 0x1
+ .uleb128 0x4a
+ .string "TST_INPUT(func) tst_ ##func ##_loc[ loc ].rec[ rec ].input"
+ .byte 0x1
+ .uleb128 0x4b
+ .string "TST_EXPECT(func) tst_ ##func ##_loc[ loc ].rec[ rec ].expect"
+ .byte 0x1
+ .uleb128 0x4c
+ .string "TST_INPUT_SEQ(func) tst_ ##func ##_loc[ loc ].rec[ rec ].input.seq[ seq_num ]"
+ .byte 0x1
+ .uleb128 0x4e
+ .string "TST_EXPECT_SEQ(func) tst_ ##func ##_loc[ loc ].rec[ rec ].expect.seq[ seq_num ]"
+ .byte 0x1
+ .uleb128 0x50
+ .string "TST_IS_LAST(func) tst_ ##func ##_loc[ loc ].rec[ rec ].is_last"
+ .byte 0x1
+ .uleb128 0x54
+ .string "TST_DECL_VARS(_type_) int loc, rec, err_count = 0; int warn_count __attribute__ ((unused)); int func_id, seq_num = 0; const char *locale; int err_exp, ret_flg; int errno_save = 0; _type_ ret_exp; _type_ ret"
+ .byte 0x1
+ .uleb128 0x5e
+ .string "TST_DO_TEST(o_func) for (loc = 0; strcmp (TST_HEAD (o_func).locale, TST_LOC_end); ++loc)"
+ .byte 0x1
+ .uleb128 0x62
+ .ascii "TST_HEAD_LOCALE(ofunc,s_func) func_id = TST_HEAD (ofunc"
+ .string ").func_id; locale = TST_HEAD (ofunc).locale; if (setlocale (LC_ALL, locale) == NULL) { fprintf (stderr, \"Warning : can't set locale: %s\\nskipping ...\\n\", locale); result (fp, C_LOCALES, s_func, locale, 0, 0, 0, \"can't set locale\"); ++err_count; continue; }"
+ .byte 0x1
+ .uleb128 0x6e
+ .string "TST_DO_REC(ofunc) for (rec=0; !TST_IS_LAST (ofunc); ++rec)"
+ .byte 0x1
+ .uleb128 0x71
+ .string "TST_DO_SEQ(_count_) for (seq_num=0; seq_num < _count_; seq_num++)"
+ .byte 0x1
+ .uleb128 0x74
+ .string "TST_GET_ERRET(_ofunc_) err_exp = TST_EXPECT (_ofunc_).err_val; ret_flg = TST_EXPECT (_ofunc_).ret_flg; ret_exp = TST_EXPECT (_ofunc_).ret_val"
+ .byte 0x1
+ .uleb128 0x79
+ .string "TST_GET_ERRET_SEQ(_ofunc_) err_exp = TST_EXPECT_SEQ (_ofunc_).err_val; ret_flg = TST_EXPECT_SEQ (_ofunc_).ret_flg; ret_exp = TST_EXPECT_SEQ (_ofunc_).ret_val"
+ .byte 0x1
+ .uleb128 0x7e
+ .string "TST_CLEAR_ERRNO errno = 0"
+ .byte 0x1
+ .uleb128 0x81
+ .string "TST_SAVE_ERRNO errno_save = errno"
+ .byte 0x1
+ .uleb128 0x85
+ .ascii "TST_IF_RETURN(_s_func_) if (err_exp != 0) { if (errno_save ="
+ .ascii "= err_exp) { result (fp, C_SUCCESS, _s_func_, locale, rec+1,"
+ .ascii " seq_num+1, 1, MS_PASSED); } else { err_count++; result (fp,"
+ .ascii " C_FAILURE, _s_func_, locale, rec+1, seq_num+1, 1, \"the val"
+ .ascii "ue of errno is different from an expected value\"); } } if ("
+ .ascii "ret_f"
+ .string "lg == 1) { if (ret == ret_exp) { result (fp, C_SUCCESS, _s_func_, locale, rec+1, seq_num+1, 2, MS_PASSED); } else { err_count++; result (fp, C_FAILURE, _s_func_, locale, rec+1, seq_num+1, 2, \"the return value is different from an expected value\"); } } else"
+ .byte 0x1
+ .uleb128 0xa5
+ .string "TEX_ERRET_REC(_type_) struct { TMD_ERRET (_type_); }"
+ .byte 0x1
+ .uleb128 0xaa
+ .string "TEX_ERRET_REC_SEQ(_type_,_count_) struct { struct { TMD_ERRET (_type_); } seq[ _count_ ]; }"
+ .byte 0x1
+ .uleb128 0xb5
+ .string "TST_ISW_STRUCT(_FUNC_,_func_) typedef struct { wint_t wc; } TIN_ISW ##_FUNC_ ##_REC; typedef TEX_ERRET_REC (int) TEX_ISW ##_FUNC_ ##_REC; TMD_RECHEAD (ISW ##_FUNC_)"
+ .byte 0x1
+ .uleb128 0xbe
+ .ascii "TST_FUNC_ISW(_FUNC_,_func_) int tst_isw ##_func_ (FILE *fp, "
+ .ascii "int debug_flg) { TST_DECL_VARS(int); wint_t wc; TST_DO_TEST "
+ .ascii "(isw ##_func_) { TST_HEAD_LOCALE (isw ##_func_, S_ISW ##_FUN"
+ .ascii "C_); TST_DO_REC(isw ##_func_) { TST_GET_ERRET (isw ##_func_)"
+ .ascii "; wc = TST_INPUT (isw ##_func_).wc; ret = isw ##_func_ (wc);"
+ .ascii " if (debug_flg) { fprintf (stdout, \"isw*() [ %s : %d ] ret "
+ .ascii "= %d\\n\", locale, rec+1, ret); } TST_IF_RETURN (S_ISW ##_FU"
+ .ascii "NC_) { if (ret !"
+ .string "= 0) { result (fp, C_SUCCESS, S_ISW ##_FUNC_, locale, rec+1, seq_num+1, 3, MS_PASSED); } else { err_count++; result (fp, C_FAILURE, S_ISW ##_FUNC_, locale, rec+1, seq_num+1, 3, \"the function returned 0, but should be non-zero\"); } } } } return err_count; }"
+ .byte 0x1
+ .uleb128 0xeb
+ .string "TST_TOW_STRUCT(_FUNC_,_func_) typedef struct { wint_t wc; } TIN_TOW ##_FUNC_ ##_REC; typedef TEX_ERRET_REC (wint_t) TEX_TOW ##_FUNC_ ##_REC; TMD_RECHEAD (TOW ##_FUNC_)"
+ .byte 0x1
+ .uleb128 0xf4
+ .ascii "TST_FUNC_TOW(_FUNC_,_func_) int tst_tow ##_func_ (FILE *fp, "
+ .ascii "int debug_flg) { TST_DECL_VARS (wint_t); wint_t wc; TST_DO_T"
+ .ascii "EST (tow ##_func_) { TST_HEAD_LOCALE (tow ##_func_, S_TOW ##"
+ .ascii "_FUNC_); TST_DO_REC ("
+ .string "tow ##_func_) { TST_GET_ERRET (tow ##_func_); wc = TST_INPUT (tow ##_func_).wc; ret = tow ##_func_ (wc); if (debug_flg) { fprintf (stdout, \"tow*() [ %s : %d ] ret = 0x%x\\n\", locale, rec+1, ret); } TST_IF_RETURN (S_TOW ##_FUNC_) { }; } } return err_count; }"
+ .byte 0x4
+ .byte 0x3
+ .uleb128 0x12
+ .file 57 "tgn_funcdef.h"
+ .uleb128 0x39
+ .byte 0x1
+ .uleb128 0x2
+ .string "TGN_FUNCDEF_H "
+ .byte 0x1
+ .uleb128 0x5
+ .string "Tiswalnum 1"
+ .byte 0x1
+ .uleb128 0x6
+ .string "Tiswalpha 2"
+ .byte 0x1
+ .uleb128 0x7
+ .string "Tiswcntrl 3"
+ .byte 0x1
+ .uleb128 0x8
+ .string "Tiswctype 4"
+ .byte 0x1
+ .uleb128 0x9
+ .string "Tiswdigit 5"
+ .byte 0x1
+ .uleb128 0xa
+ .string "Tiswgraph 6"
+ .byte 0x1
+ .uleb128 0xb
+ .string "Tiswlower 7"
+ .byte 0x1
+ .uleb128 0xc
+ .string "Tiswprint 8"
+ .byte 0x1
+ .uleb128 0xd
+ .string "Tiswpunct 9"
+ .byte 0x1
+ .uleb128 0xe
+ .string "Tiswspace 10"
+ .byte 0x1
+ .uleb128 0xf
+ .string "Tiswupper 11"
+ .byte 0x1
+ .uleb128 0x10
+ .string "Tiswxdigit 12"
+ .byte 0x1
+ .uleb128 0x11
+ .string "Tmblen 13"
+ .byte 0x1
+ .uleb128 0x12
+ .string "Tmbrlen 14"
+ .byte 0x1
+ .uleb128 0x13
+ .string "Tmbrtowc 15"
+ .byte 0x1
+ .uleb128 0x14
+ .string "Tmbsrtowcs 16"
+ .byte 0x1
+ .uleb128 0x15
+ .string "Tmbstowcs 17"
+ .byte 0x1
+ .uleb128 0x16
+ .string "Tmbtowc 18"
+ .byte 0x1
+ .uleb128 0x17
+ .string "Tstrcoll 19"
+ .byte 0x1
+ .uleb128 0x18
+ .string "Tstrfmon 20"
+ .byte 0x1
+ .uleb128 0x19
+ .string "Tstrxfrm 21"
+ .byte 0x1
+ .uleb128 0x1a
+ .string "Tswscanf 22"
+ .byte 0x1
+ .uleb128 0x1b
+ .string "Ttowctrans 23"
+ .byte 0x1
+ .uleb128 0x1c
+ .string "Ttowlower 24"
+ .byte 0x1
+ .uleb128 0x1d
+ .string "Ttowupper 25"
+ .byte 0x1
+ .uleb128 0x1e
+ .string "Twcrtomb 26"
+ .byte 0x1
+ .uleb128 0x1f
+ .string "Twcscat 27"
+ .byte 0x1
+ .uleb128 0x20
+ .string "Twcschr 28"
+ .byte 0x1
+ .uleb128 0x21
+ .string "Twcscmp 29"
+ .byte 0x1
+ .uleb128 0x22
+ .string "Twcscoll 30"
+ .byte 0x1
+ .uleb128 0x23
+ .string "Twcscpy 31"
+ .byte 0x1
+ .uleb128 0x24
+ .string "Twcscspn 32"
+ .byte 0x1
+ .uleb128 0x25
+ .string "Twcslen 33"
+ .byte 0x1
+ .uleb128 0x26
+ .string "Twcsncat 34"
+ .byte 0x1
+ .uleb128 0x27
+ .string "Twcsncmp 35"
+ .byte 0x1
+ .uleb128 0x28
+ .string "Twcsncpy 36"
+ .byte 0x1
+ .uleb128 0x29
+ .string "Twcspbrk 37"
+ .byte 0x1
+ .uleb128 0x2a
+ .string "Twcsrtombs 38"
+ .byte 0x1
+ .uleb128 0x2b
+ .string "Twcsspn 39"
+ .byte 0x1
+ .uleb128 0x2c
+ .string "Twcsstr 40"
+ .byte 0x1
+ .uleb128 0x2d
+ .string "Twcstod 41"
+ .byte 0x1
+ .uleb128 0x2e
+ .string "Twcstok 42"
+ .byte 0x1
+ .uleb128 0x2f
+ .string "Twcstombs 43"
+ .byte 0x1
+ .uleb128 0x30
+ .string "Twcswidth 44"
+ .byte 0x1
+ .uleb128 0x31
+ .string "Twcsxfrm 45"
+ .byte 0x1
+ .uleb128 0x32
+ .string "Twctob 46"
+ .byte 0x1
+ .uleb128 0x33
+ .string "Twctomb 47"
+ .byte 0x1
+ .uleb128 0x34
+ .string "Twctrans 48"
+ .byte 0x1
+ .uleb128 0x35
+ .string "Twctype 49"
+ .byte 0x1
+ .uleb128 0x36
+ .string "Twcwidth 50"
+ .byte 0x1
+ .uleb128 0x39
+ .string "S_ISWALNUM \"iswalnum\""
+ .byte 0x1
+ .uleb128 0x3a
+ .string "S_ISWALPHA \"iswalpha\""
+ .byte 0x1
+ .uleb128 0x3b
+ .string "S_ISWCNTRL \"iswcntrl\""
+ .byte 0x1
+ .uleb128 0x3c
+ .string "S_ISWCTYPE \"iswctype\""
+ .byte 0x1
+ .uleb128 0x3d
+ .string "S_ISWDIGIT \"iswdigit\""
+ .byte 0x1
+ .uleb128 0x3e
+ .string "S_ISWGRAPH \"iswgraph\""
+ .byte 0x1
+ .uleb128 0x3f
+ .string "S_ISWLOWER \"iswlower\""
+ .byte 0x1
+ .uleb128 0x40
+ .string "S_ISWPRINT \"iswprint\""
+ .byte 0x1
+ .uleb128 0x41
+ .string "S_ISWPUNCT \"iswpunct\""
+ .byte 0x1
+ .uleb128 0x42
+ .string "S_ISWSPACE \"iswspace\""
+ .byte 0x1
+ .uleb128 0x43
+ .string "S_ISWUPPER \"iswupper\""
+ .byte 0x1
+ .uleb128 0x44
+ .string "S_ISWXDIGIT \"iswxdigit\""
+ .byte 0x1
+ .uleb128 0x45
+ .string "S_MBLEN \"mblen\""
+ .byte 0x1
+ .uleb128 0x46
+ .string "S_MBRLEN \"mbrlen\""
+ .byte 0x1
+ .uleb128 0x47
+ .string "S_MBRTOWC \"mbrtowc\""
+ .byte 0x1
+ .uleb128 0x48
+ .string "S_MBSRTOWCS \"mbsrtowcs\""
+ .byte 0x1
+ .uleb128 0x49
+ .string "S_MBSTOWCS \"mbstowcs\""
+ .byte 0x1
+ .uleb128 0x4a
+ .string "S_MBTOWC \"mbtowc\""
+ .byte 0x1
+ .uleb128 0x4b
+ .string "S_STRCOLL \"strcoll\""
+ .byte 0x1
+ .uleb128 0x4c
+ .string "S_STRFMON \"strfmon\""
+ .byte 0x1
+ .uleb128 0x4d
+ .string "S_STRXFRM \"strxfrm\""
+ .byte 0x1
+ .uleb128 0x4e
+ .string "S_SWSCANF \"swscanf\""
+ .byte 0x1
+ .uleb128 0x4f
+ .string "S_TOWCTRANS \"towctrans\""
+ .byte 0x1
+ .uleb128 0x50
+ .string "S_TOWLOWER \"towlower\""
+ .byte 0x1
+ .uleb128 0x51
+ .string "S_TOWUPPER \"towupper\""
+ .byte 0x1
+ .uleb128 0x52
+ .string "S_WCRTOMB \"wcrtomb\""
+ .byte 0x1
+ .uleb128 0x53
+ .string "S_WCSCAT \"wcscat\""
+ .byte 0x1
+ .uleb128 0x54
+ .string "S_WCSCHR \"wcschr\""
+ .byte 0x1
+ .uleb128 0x55
+ .string "S_WCSCMP \"wcscmp\""
+ .byte 0x1
+ .uleb128 0x56
+ .string "S_WCSCOLL \"wcscoll\""
+ .byte 0x1
+ .uleb128 0x57
+ .string "S_WCSCPY \"wcscpy\""
+ .byte 0x1
+ .uleb128 0x58
+ .string "S_WCSCSPN \"wcscspn\""
+ .byte 0x1
+ .uleb128 0x59
+ .string "S_WCSLEN \"wcslen\""
+ .byte 0x1
+ .uleb128 0x5a
+ .string "S_WCSNCAT \"wcsncat\""
+ .byte 0x1
+ .uleb128 0x5b
+ .string "S_WCSNCMP \"wcsncmp\""
+ .byte 0x1
+ .uleb128 0x5c
+ .string "S_WCSNCPY \"wcsncpy\""
+ .byte 0x1
+ .uleb128 0x5d
+ .string "S_WCSPBRK \"wcspbrk\""
+ .byte 0x1
+ .uleb128 0x5e
+ .string "S_WCSRTOMBS \"wcsrtombs\""
+ .byte 0x1
+ .uleb128 0x5f
+ .string "S_WCSSPN \"wcsspn\""
+ .byte 0x1
+ .uleb128 0x60
+ .string "S_WCSSTR \"wcsstr\""
+ .byte 0x1
+ .uleb128 0x61
+ .string "S_WCSTOD \"wcstod\""
+ .byte 0x1
+ .uleb128 0x62
+ .string "S_WCSTOK \"wcstok\""
+ .byte 0x1
+ .uleb128 0x63
+ .string "S_WCSTOMBS \"wcstombs\""
+ .byte 0x1
+ .uleb128 0x64
+ .string "S_WCSWIDTH \"wcswidth\""
+ .byte 0x1
+ .uleb128 0x65
+ .string "S_WCSXFRM \"wcsxfrm\""
+ .byte 0x1
+ .uleb128 0x66
+ .string "S_WCTOB \"wctob\""
+ .byte 0x1
+ .uleb128 0x67
+ .string "S_WCTOMB \"wctomb\""
+ .byte 0x1
+ .uleb128 0x68
+ .string "S_WCTRANS \"wctrans\""
+ .byte 0x1
+ .uleb128 0x69
+ .string "S_WCTYPE \"wctype\""
+ .byte 0x1
+ .uleb128 0x6a
+ .string "S_WCWIDTH \"wcwidth\""
+ .byte 0x4
+ .byte 0x1
+ .uleb128 0x13
+ .string "MBSSIZE 24"
+ .byte 0x1
+ .uleb128 0x14
+ .string "WCSSIZE 12"
+ .byte 0x1
+ .uleb128 0x15
+ .string "MONFMTSIZE 16"
+ .byte 0x1
+ .uleb128 0x16
+ .string "MONSIZE 64"
+ .byte 0x1
+ .uleb128 0x17
+ .string "USE_MBCURMAX 99"
+ .byte 0x1
+ .uleb128 0x18
+ .string "TST_DBL_EPS 2.22153e-16"
+ .byte 0x1
+ .uleb128 0x19
+ .string "WCSTOK_SEQNUM 3"
+ .byte 0x1
+ .uleb128 0x1a
+ .string "MBLEN_SEQNUM 3"
+ .byte 0x1
+ .uleb128 0x1b
+ .string "MBTOWC_SEQNUM 3"
+ .byte 0x1
+ .uleb128 0x1c
+ .string "MBSTOWCS_SEQNUM 3"
+ .byte 0x1
+ .uleb128 0x1d
+ .string "WCTOMB_SEQNUM 3"
+ .byte 0x1
+ .uleb128 0x1e
+ .string "WCSTOMBS_SEQNUM 3"
+ .byte 0x1
+ .uleb128 0x1f
+ .string "MBRLEN_SEQNUM 3"
+ .byte 0x1
+ .uleb128 0x20
+ .string "MBRTOWC_SEQNUM 3"
+ .byte 0x1
+ .uleb128 0x21
+ .string "MBSRTOWCS_SEQNUM 3"
+ .byte 0x1
+ .uleb128 0x22
+ .string "WCRTOMB_SEQNUM 3"
+ .byte 0x1
+ .uleb128 0x23
+ .string "WCSRTOMBS_SEQNUM 3"
+ .byte 0x1
+ .uleb128 0x26
+ .string "MAX_LOC_TEST 300"
+ .byte 0x4
+ .byte 0x3
+ .uleb128 0x13
+ .file 58 "tgn_locdef.h"
+ .uleb128 0x3a
+ .byte 0x1
+ .uleb128 0x2
+ .string "TGN_LOCDEF_H "
+ .byte 0x1
+ .uleb128 0x7
+ .string "TST_LOC_C \"C\""
+ .byte 0x1
+ .uleb128 0xa
+ .string "TST_LOC_de \"de_DE.ISO-8859-1\""
+ .byte 0x1
+ .uleb128 0xe
+ .string "TST_LOC_enUS \"en_US.ANSI_X3.4-1968\""
+ .byte 0x1
+ .uleb128 0x15
+ .string "TST_LOC_eucJP \"ja_JP.EUC-JP\""
+ .byte 0x1
+ .uleb128 0x1c
+ .string "TST_LOC_de_UTF8 \"de_DE.UTF-8\""
+ .byte 0x1
+ .uleb128 0x1f
+ .string "TST_LOC_end \"lastEntry\""
+ .byte 0x4
+ .section .rodata
+ .align 2
+.LC0:
+ .string "\nTST_MBWC ===> %s ...\n"
+ .text
+ .align 1
+ .global main
+ .type main, @function
+main:
+.LFB5:
+ .loc 4 23 0
+ mov.l r14,@-r15
+.LCFI0:
+ sts.l pr,@-r15
+.LCFI1:
+ add #-20,r15
+.LCFI2:
+ mov r15,r14
+.LCFI3:
+ mov r14,r1
+ add #-44,r1
+ mov.l r4,@(52,r1)
+ mov r14,r1
+ add #-44,r1
+ mov.l r5,@(48,r1)
+ .loc 4 27 0
+ mov r14,r1
+ add #-44,r1
+ mov.l @(52,r1),r2
+ mov #1,r1
+ cmp/gt r1,r2
+ bf .L2
+ mov r14,r1
+ add #-44,r1
+ mov.l @(48,r1),r1
+ add #4,r1
+ mov.l @r1,r1
+ mov r1,r4
+ mov.l .L8,r1
+ jsr @r1
+ nop
+ mov.l r0,@r14
+ bra .L4
+ nop
+ .align 1
+.L2:
+ mov #0,r1
+ mov.l r1,@r14
+.L4:
+ mov r14,r1
+ add #-44,r1
+ mov.l @r14,r2
+ mov.l r2,@(60,r1)
+ .loc 4 29 0
+ mov r14,r1
+ add #-44,r1
+ mov.l @(60,r1),r1
+ tst r1,r1
+ bt .L5
+ .loc 4 31 0
+ mov.l .L12,r1
+ mov.l @r1,r2
+ mov r14,r1
+ add #-44,r1
+ mov.l @(48,r1),r1
+ mov.l @r1,r3
+ mov.l .L10,r1
+ mov r2,r4
+ mov r1,r5
+ mov r3,r6
+ mov.l .L11,r1
+ jsr @r1
+ nop
+.L5:
+ .loc 4 33 0
+ mov.l .L12,r1
+ mov.l @r1,r2
+ mov r14,r1
+ add #-44,r1
+ mov.l @(60,r1),r1
+ mov r2,r4
+ mov r1,r5
+ mov.l .L13,r1
+ jsr @r1
+ nop
+ mov r14,r1
+ add #-44,r1
+ mov.l r0,@(56,r1)
+ .loc 4 35 0
+ mov r14,r1
+ add #-44,r1
+ mov.l @(56,r1),r1
+ tst r1,r1
+ mov #-1,r1
+ negc r1,r1
+ mov r1,r0
+ .loc 4 36 0
+ add #20,r14
+ mov r14,r15
+ lds.l @r15+,pr
+ mov.l @r15+,r14
+ rts
+ nop
+.L14:
+ .align 2
+.L8:
+ .long atoi
+.L12:
+ .long stdout
+.L10:
+ .long .LC0
+.L11:
+ .long fprintf
+.L13:
+ .long tst_mbrlen
+.LFE5:
+ .size main, .-main
+ .section .debug_macinfo
+ .byte 0x1
+ .uleb128 0x26
+ .string "MAX_RESULT_REC 132"
+ .section .rodata
+ .align 2
+.LC1:
+ .string "Warning: result(): can't write the result: %s:%s:%d:%d:%s\n"
+ .align 2
+.LC2:
+ .string "%s:%s:%d:%d:%d:%c:%s\n"
+ .text
+ .align 1
+ .global result
+ .type result, @function
+result:
+.LFB6:
+ .loc 4 45 0
+ mov.l r8,@-r15
+.LCFI4:
+ mov.l r14,@-r15
+.LCFI5:
+ sts.l pr,@-r15
+.LCFI6:
+ add #-20,r15
+.LCFI7:
+ mov r15,r14
+.LCFI8:
+ mov r14,r1
+ add #-44,r1
+ mov.l r4,@(60,r1)
+ mov r5,r2
+ mov r14,r1
+ add #-44,r1
+ mov.l r6,@(52,r1)
+ mov r14,r1
+ add #-44,r1
+ mov.l r7,@(48,r1)
+ mov r14,r1
+ add #12,r1
+ mov.b r2,@r1
+ .loc 4 46 0
+ mov r14,r1
+ add #-44,r1
+ mov.l @(60,r1),r1
+ tst r1,r1
+ bt .L16
+ mov r14,r1
+ add #-44,r1
+ mov.l @(52,r1),r1
+ mov r1,r4
+ mov.l .L25,r1
+ jsr @r1
+ nop
+ mov r0,r8
+ mov r14,r1
+ add #-44,r1
+ mov.l @(48,r1),r1
+ mov r1,r4
+ mov.l .L25,r1
+ jsr @r1
+ nop
+ add r0,r8
+ mov.l @(44,r14),r1
+ mov r1,r4
+ mov.l .L25,r1
+ jsr @r1
+ nop
+ mov r8,r1
+ add r0,r1
+ mov r1,r2
+ add #32,r2
+ mov.w .L26,r1
+ cmp/hi r1,r2
+ bf .L18
+.L16:
+ .loc 4 49 0
+ mov.l .L27,r1
+ mov.l @r1,r7
+ add #-12,r15
+ mov r15,r2
+ mov.l .L28,r6
+ mov r14,r1
+ add #-44,r1
+ mov.l @(52,r1),r0
+ mov r14,r1
+ add #-44,r1
+ mov.l @(48,r1),r3
+ mov.l @(32,r14),r1
+ mov.l r1,@r2
+ mov.l @(40,r14),r1
+ mov.l r1,@(4,r2)
+ mov.l @(44,r14),r1
+ mov.l r1,@(8,r2)
+ mov r7,r4
+ mov r6,r5
+ mov r0,r6
+ mov r3,r7
+ mov.l .L29,r1
+.LCFI9:
+ jsr @r1
+ nop
+ add #12,r15
+ .loc 4 52 0
+ mov #0,r1
+ mov.l r1,@r14
+ bra .L19
+ nop
+ .align 1
+.L18:
+ .loc 4 55 0
+ mov r14,r1
+ add #12,r1
+ mov.b @r1,r3
+ add #-20,r15
+ mov r15,r2
+ mov.l .L33,r7
+ mov.l .L31,r6
+ mov r14,r1
+ add #-44,r1
+ mov.l @(52,r1),r0
+ mov r14,r1
+ add #-44,r1
+ mov.l @(48,r1),r8
+ mov.l @(32,r14),r1
+ mov.l r1,@r2
+ mov.l @(36,r14),r1
+ mov.l r1,@(4,r2)
+ mov.l @(40,r14),r1
+ mov.l r1,@(8,r2)
+ mov.l r3,@(12,r2)
+ mov.l @(44,r14),r1
+ mov.l r1,@(16,r2)
+ mov r7,r4
+ mov r6,r5
+ mov r0,r6
+ mov r8,r7
+ mov.l .L32,r1
+.LCFI10:
+ jsr @r1
+ nop
+ add #20,r15
+ .loc 4 58 0
+ mov.l .L33,r2
+ mov r14,r1
+ add #-44,r1
+ mov.l @(60,r1),r1
+ mov r2,r4
+ mov r1,r5
+ mov.l .L34,r1
+.LCFI11:
+ jsr @r1
+ nop
+ mov #-1,r1
+ cmp/eq r1,r0
+ bf .L20
+ .loc 4 60 0
+ mov #0,r1
+ mov.l r1,@r14
+ bra .L19
+ nop
+ .align 1
+.L20:
+ .loc 4 63 0
+ mov #1,r1
+ mov.l r1,@r14
+.L19:
+ mov.l @r14,r0
+ .loc 4 64 0
+ add #20,r14
+ mov r14,r15
+ lds.l @r15+,pr
+ mov.l @r15+,r14
+ mov.l @r15+,r8
+ rts
+ nop
+ .align 1
+.L26:
+ .short 132
+.L35:
+ .align 2
+.L25:
+ .long strlen
+.L27:
+ .long stderr
+.L28:
+ .long .LC1
+.L29:
+ .long fprintf
+.L33:
+ .long result_rec
+.L31:
+ .long .LC2
+.L32:
+ .long sprintf
+.L34:
+ .long fputs
+.LFE6:
+ .size result, .-result
+ .section .debug_macinfo
+ .byte 0x4
+ .byte 0x3
+ .uleb128 0x9
+ .file 59 "dat_mbrlen.c"
+ .uleb128 0x3b
+ .global tst_mbrlen_loc
+ .section .rodata
+ .align 2
+.LC3:
+ .string "de_DE.ISO-8859-1"
+ .align 2
+.LC4:
+ .string "en_US.ANSI_X3.4-1968"
+ .align 2
+.LC5:
+ .string "ja_JP.EUC-JP"
+ .align 2
+.LC6:
+ .string "lastEntry"
+ .data
+ .align 2
+ .type tst_mbrlen_loc, @object
+ .size tst_mbrlen_loc, 192032
+tst_mbrlen_loc:
+ .long 14
+ .long .LC3
+ .long 1
+ .string ""
+ .zero 23
+ .long 0
+ .long 0
+ .long 0
+ .long 1
+ .string ""
+ .zero 23
+ .long 1
+ .long 0
+ .long 0
+ .long 1
+ .string "\300"
+ .zero 22
+ .long 99
+ .long 0
+ .long 0
+ .long 0
+ .long 1
+ .long 0
+ .long 0
+ .long 1
+ .long 0
+ .long 0
+ .long 1
+ .long 1
+ .zero 4
+ .long 1
+ .string "\300\001"
+ .zero 21
+ .long 0
+ .long 0
+ .long 0
+ .long 1
+ .string "\300\001"
+ .zero 21
+ .long 1
+ .long 0
+ .long 0
+ .long 1
+ .string "\317\001"
+ .zero 21
+ .long 99
+ .long 0
+ .long 0
+ .long 0
+ .long 1
+ .long 0
+ .long 0
+ .long 1
+ .long 1
+ .long 0
+ .long 1
+ .long 1
+ .zero 4
+ .zero 156
+ .long 1
+ .zero 47520
+ .long 14
+ .long .LC4
+ .long 1
+ .string "A"
+ .zero 22
+ .long 0
+ .long 0
+ .long 0
+ .long 1
+ .string "A"
+ .zero 22
+ .long 1
+ .long 0
+ .long 0
+ .long 1
+ .string "A"
+ .zero 22
+ .long 99
+ .long 0
+ .long 0
+ .long 0
+ .long 1
+ .long 0
+ .long 0
+ .long 1
+ .long 1
+ .long 0
+ .long 1
+ .long 1
+ .zero 4
+ .long 1
+ .string "\317\001"
+ .zero 21
+ .long 0
+ .long 1
+ .long 0
+ .long 1
+ .string "\317\001"
+ .zero 21
+ .long 1
+ .long 1
+ .long 0
+ .long 1
+ .string "\317\001"
+ .zero 21
+ .long 99
+ .long 1
+ .long 0
+ .long 0
+ .long 1
+ .long 0
+ .long 84
+ .long 1
+ .long -1
+ .long 84
+ .long 1
+ .long -1
+ .zero 4
+ .zero 156
+ .long 1
+ .zero 47520
+ .long 14
+ .long .LC5
+ .long 1
+ .string "\317\302"
+ .zero 21
+ .long 1
+ .long 1
+ .long 1
+ .long 0
+ .string ""
+ .zero 23
+ .long 0
+ .long 1
+ .long 0
+ .long 1
+ .string "\317\302"
+ .zero 21
+ .long 99
+ .long 1
+ .long 1
+ .long 0
+ .long 1
+ .long -2
+ .long 0
+ .long 1
+ .long -1
+ .long 0
+ .long 1
+ .long 2
+ .zero 4
+ .long 1
+ .string "\317"
+ .zero 22
+ .long 1
+ .long 1
+ .long 0
+ .long 1
+ .string "\302"
+ .zero 22
+ .long 1
+ .long 1
+ .long 0
+ .long 1
+ .string "\317\302"
+ .zero 21
+ .long 99
+ .long 0
+ .long 0
+ .long 0
+ .long 1
+ .long -2
+ .long 0
+ .long 1
+ .long 1
+ .long 0
+ .long 1
+ .long 2
+ .zero 4
+ .long 1
+ .string "\216\217"
+ .zero 21
+ .long 0
+ .long 0
+ .long 0
+ .long 1
+ .string "\216\217"
+ .zero 21
+ .long 1
+ .long 0
+ .long 0
+ .long 1
+ .string "\216\217"
+ .zero 21
+ .long 99
+ .long 0
+ .long 0
+ .long 0
+ .long 1
+ .long 0
+ .long 0
+ .long 1
+ .long -2
+ .long 84
+ .long 1
+ .long -1
+ .zero 4
+ .zero 156
+ .long 1
+ .zero 47360
+ .long 14
+ .long .LC6
+ .zero 48000
+ .section .debug_macinfo
+ .byte 0x4
+ .local s.3934
+ .comm s.3934,8,4
+ .section .rodata
+ .align 2
+.LC7:
+ .string "Warning : can't set locale: %s\nskipping ...\n"
+ .align 2
+.LC8:
+ .string "mbrlen"
+ .align 2
+.LC9:
+ .string "can't set locale"
+ .align 2
+.LC10:
+ .string "Initialization (external mbstate object) failed - skipped this test case."
+ .align 2
+.LC11:
+ .string "n = %d.\n"
+ .align 2
+.LC12:
+ .string "s_in = %c, n = %d, t_ini = %d, s_flg = %d, t_flg = %d, MB_CUR_MAX = %d.\n"
+ .align 2
+.LC13:
+ .string "mbrlen() [ %s : %d : %d ] ret = %zd\n"
+ .align 2
+.LC14:
+ .string "\t\t\t errno = %d\n"
+ .align 2
+.LC15:
+ .string "PASSED"
+ .align 2
+.LC16:
+ .string "the value of errno is different from an expected value"
+ .align 2
+.LC17:
+ .string "the return value is different from an expected value"
+ .text
+ .align 1
+ .global tst_mbrlen
+ .type tst_mbrlen, @function
+tst_mbrlen:
+.LFB7:
+ .loc 1 13 0
+ mov.l r8,@-r15
+.LCFI12:
+ mov.l r9,@-r15
+.LCFI13:
+ mov.l r10,@-r15
+.LCFI14:
+ mov.l r11,@-r15
+.LCFI15:
+ mov.l r12,@-r15
+.LCFI16:
+ mov.l r14,@-r15
+.LCFI17:
+ sts.l pr,@-r15
+.LCFI18:
+ add #-80,r15
+.LCFI19:
+ mov r15,r14
+.LCFI20:
+ mov r14,r1
+ add #-48,r1
+ mov.l r4,@(56,r1)
+ mov r14,r1
+ add #-48,r1
+ mov.l r5,@(52,r1)
+ .loc 1 14 0
+ mov r14,r2
+ add #16,r2
+ mov #0,r1
+ mov.l r1,@(4,r2)
+ mov r14,r2
+ add #16,r2
+ mov #0,r1
+ mov.l r1,@(16,r2)
+ mov r14,r2
+ add #16,r2
+ mov #0,r1
+ mov.l r1,@(32,r2)
+ .loc 1 23 0
+ mov r14,r2
+ add #-48,r2
+ mov #0,r1
+ mov.l r1,@(60,r2)
+ bra .L37
+ nop
+ .align 1
+.L38:
+ .loc 1 25 0
+ mov r14,r1
+ add #-48,r1
+ mov.l @(60,r1),r2
+ mov r14,r7
+ add #16,r7
+ mov.l .L72,r3
+ mov.l .L73,r1
+ mul.l r1,r2
+ sts macl,r1
+ add r3,r1
+ mov.l @r1,r1
+ mov.l r1,@(12,r7)
+ mov r14,r1
+ add #-48,r1
+ mov.l @(60,r1),r2
+ mov r14,r7
+ add #16,r7
+ mov.l .L72,r3
+ mov.l .L73,r1
+ mul.l r1,r2
+ sts macl,r1
+ add r3,r1
+ add #4,r1
+ mov.l @r1,r1
+ mov.l r1,@(20,r7)
+ mov r14,r1
+ add #16,r1
+ mov.l @(20,r1),r1
+ mov #6,r4
+ mov r1,r5
+ mov.l .L74,r1
+ jsr @r1
+ nop
+ tst r0,r0
+ bf .L39
+ mov.l .L75,r1
+ mov.l @r1,r2
+ mov.l .L76,r3
+ mov r14,r1
+ add #16,r1
+ mov.l @(20,r1),r1
+ mov r2,r4
+ mov r3,r5
+ mov r1,r6
+ mov.l .L77,r1
+ jsr @r1
+ nop
+ add #-16,r15
+ mov r15,r2
+ mov r14,r1
+ add #-48,r1
+ mov.l @(56,r1),r3
+ mov.l .L83,r7
+ mov r14,r1
+ add #16,r1
+ mov.l @(20,r1),r0
+ mov #0,r1
+ mov.l r1,@r2
+ mov #0,r1
+ mov.l r1,@(4,r2)
+ mov #0,r1
+ mov.l r1,@(8,r2)
+ mov.l .L79,r1
+ mov.l r1,@(12,r2)
+ mov r3,r4
+ mov #76,r5
+ mov r7,r6
+ mov r0,r7
+ mov.l .L85,r1
+.LCFI21:
+ jsr @r1
+ nop
+ add #16,r15
+ mov r14,r2
+ add #16,r2
+ mov r14,r1
+ add #16,r1
+ mov.l @(4,r1),r1
+ add #1,r1
+ mov.l r1,@(4,r2)
+ bra .L41
+ nop
+ .align 1
+.L39:
+ .loc 1 26 0
+ mov r14,r2
+ add #16,r2
+ mov #0,r1
+ mov.l r1,@(0,r2)
+ bra .L42
+ nop
+ .align 1
+.L43:
+ .loc 1 28 0
+ mov.l .L81,r1
+ mov #0,r4
+ mov #0,r5
+ mov r1,r6
+ mov.l .L82,r1
+.LCFI22:
+ jsr @r1
+ nop
+ tst r0,r0
+ bt .L44
+ .loc 1 30 0
+ mov r14,r2
+ add #16,r2
+ mov r14,r1
+ add #16,r1
+ mov.l @(4,r1),r1
+ add #1,r1
+ mov.l r1,@(4,r2)
+ .loc 1 31 0
+ mov r14,r1
+ add #16,r1
+ mov.l @(0,r1),r1
+ mov r1,r6
+ add #1,r6
+ mov r14,r1
+ add #16,r1
+ mov.l @(16,r1),r1
+ mov r1,r3
+ add #1,r3
+ add #-16,r15
+ mov r15,r2
+ mov r14,r1
+ add #-48,r1
+ mov.l @(56,r1),r7
+ mov.l .L83,r8
+ mov r14,r1
+ add #16,r1
+ mov.l @(20,r1),r0
+ mov.l r6,@r2
+ mov.l r3,@(4,r2)
+ mov #3,r1
+ mov.l r1,@(8,r2)
+ mov.l .L84,r1
+ mov.l r1,@(12,r2)
+ mov r7,r4
+ mov #70,r5
+ mov r8,r6
+ mov r0,r7
+ mov.l .L85,r1
+.LCFI23:
+ jsr @r1
+ nop
+ add #16,r15
+ .loc 1 34 0
+ bra .L46
+ nop
+ .align 1
+.L44:
+ .loc 1 37 0
+ mov r14,r2
+ add #16,r2
+ mov #0,r1
+ mov.l r1,@(16,r2)
+ bra .L47
+ nop
+.L86:
+ .align 2
+.L72:
+ .long tst_mbrlen_loc
+.L73:
+ .long 48008
+.L74:
+ .long setlocale
+.L75:
+ .long stderr
+.L76:
+ .long .LC7
+.L77:
+ .long fprintf
+.L83:
+ .long .LC8
+.L79:
+ .long .LC9
+.L85:
+ .long result
+.L81:
+ .long s.3934
+.L82:
+ .long mbrlen
+.L84:
+ .long .LC10
+ .align 1
+.L48:
+ .loc 1 39 0
+ mov r14,r1
+ add #-48,r1
+ mov.l @(60,r1),r3
+ mov r14,r1
+ add #16,r1
+ mov.l @(0,r1),r7
+ mov r14,r1
+ add #16,r1
+ mov.l @(16,r1),r2
+ mov r14,r6
+ add #16,r6
+ mov.l .L112,r5
+ mov r2,r1
+ add r1,r1
+ add r2,r1
+ mov r1,r2
+ shll2 r2
+ mov.l .L113,r1
+ mul.l r1,r3
+ sts macl,r1
+ add r1,r2
+ mov.w .L114,r1
+ mul.l r1,r7
+ sts macl,r1
+ add r2,r1
+ mov r1,r2
+ add r5,r2
+ mov.w .L91,r1
+ add r2,r1
+ mov.l @r1,r1
+ mov.l r1,@(24,r6)
+ mov r14,r1
+ add #-48,r1
+ mov.l @(60,r1),r3
+ mov r14,r1
+ add #16,r1
+ mov.l @(0,r1),r7
+ mov r14,r1
+ add #16,r1
+ mov.l @(16,r1),r2
+ mov r14,r6
+ add #16,r6
+ mov.l .L112,r5
+ mov r2,r1
+ add r1,r1
+ add r2,r1
+ mov r1,r2
+ shll2 r2
+ mov.l .L113,r1
+ mul.l r1,r3
+ sts macl,r1
+ add r1,r2
+ mov.w .L114,r1
+ mul.l r1,r7
+ sts macl,r1
+ add r2,r1
+ mov r1,r2
+ add r5,r2
+ mov.w .L95,r1
+ add r2,r1
+ mov.l @r1,r1
+ mov.l r1,@(28,r6)
+ mov r14,r1
+ add #-48,r1
+ mov.l @(60,r1),r3
+ mov r14,r1
+ add #16,r1
+ mov.l @(0,r1),r7
+ mov r14,r1
+ add #16,r1
+ mov.l @(16,r1),r2
+ mov r14,r6
+ add #16,r6
+ mov.l .L112,r5
+ mov r2,r1
+ add r1,r1
+ add r2,r1
+ mov r1,r2
+ shll2 r2
+ mov.l .L113,r1
+ mul.l r1,r3
+ sts macl,r1
+ add r1,r2
+ mov.w .L114,r1
+ mul.l r1,r7
+ sts macl,r1
+ add r2,r1
+ mov r1,r2
+ add r5,r2
+ mov.w .L99,r1
+ add r2,r1
+ mov.l @r1,r1
+ mov.l r1,@(36,r6)
+ .loc 1 40 0
+ mov r14,r1
+ add #-48,r1
+ mov.l @(60,r1),r3
+ mov r14,r1
+ add #16,r1
+ mov.l @(0,r1),r7
+ mov r14,r1
+ add #16,r1
+ mov.l @(16,r1),r2
+ mov.l .L112,r6
+ mov #40,r1
+ mul.l r1,r2
+ sts macl,r2
+ mov.l .L113,r1
+ mul.l r1,r3
+ sts macl,r1
+ add r1,r2
+ mov.w .L114,r1
+ mul.l r1,r7
+ sts macl,r1
+ add r2,r1
+ add r6,r1
+ add #8,r1
+ mov.l @r1,r2
+ mov r14,r1
+ add #63,r1
+ mov.b r2,@r1
+ .loc 1 41 0
+ mov r14,r1
+ add #-48,r1
+ mov.l @(60,r1),r7
+ mov r14,r1
+ add #16,r1
+ mov.l @(0,r1),r3
+ mov r14,r1
+ add #16,r1
+ mov.l @(16,r1),r2
+ mov r14,r6
+ add #16,r6
+ mov #40,r1
+ mul.l r1,r2
+ sts macl,r2
+ mov.w .L114,r1
+ mul.l r1,r3
+ sts macl,r1
+ add r1,r2
+ mov.l .L113,r1
+ mul.l r1,r7
+ sts macl,r1
+ add r2,r1
+ mov r1,r2
+ add #12,r2
+ mov.l .L112,r1
+ add r2,r1
+ mov.l r1,@(48,r6)
+ .loc 1 42 0
+ mov r14,r1
+ add #-48,r1
+ mov.l @(60,r1),r3
+ mov r14,r1
+ add #16,r1
+ mov.l @(0,r1),r7
+ mov r14,r1
+ add #16,r1
+ mov.l @(16,r1),r2
+ mov r14,r6
+ add #16,r6
+ mov.l .L112,r5
+ mov #40,r1
+ mul.l r1,r2
+ sts macl,r2
+ mov.l .L113,r1
+ mul.l r1,r3
+ sts macl,r1
+ add r1,r2
+ mov.w .L114,r1
+ mul.l r1,r7
+ sts macl,r1
+ add r2,r1
+ add r5,r1
+ add #36,r1
+ mov.l @r1,r1
+ mov.l r1,@(52,r6)
+ .loc 1 43 0
+ mov r14,r1
+ add #-48,r1
+ mov.l @(60,r1),r3
+ mov r14,r1
+ add #16,r1
+ mov.l @(0,r1),r7
+ mov r14,r1
+ add #16,r1
+ mov.l @(16,r1),r2
+ mov.l .L112,r6
+ mov #40,r1
+ mul.l r1,r2
+ sts macl,r2
+ mov.l .L113,r1
+ mul.l r1,r3
+ sts macl,r1
+ add r1,r2
+ mov.w .L114,r1
+ mul.l r1,r7
+ sts macl,r1
+ add r2,r1
+ add r6,r1
+ add #40,r1
+ mov.l @r1,r2
+ mov r14,r1
+ add #74,r1
+ mov.b r2,@r1
+ .loc 1 44 0
+ mov r14,r1
+ add #-48,r1
+ mov.l @(60,r1),r3
+ mov r14,r1
+ add #16,r1
+ mov.l @(0,r1),r7
+ mov r14,r1
+ add #16,r1
+ mov.l @(16,r1),r2
+ mov.l .L112,r6
+ mov #40,r1
+ mul.l r1,r2
+ sts macl,r2
+ mov.l .L113,r1
+ mul.l r1,r3
+ sts macl,r1
+ add r1,r2
+ mov.w .L114,r1
+ mul.l r1,r7
+ sts macl,r1
+ add r2,r1
+ add r6,r1
+ add #44,r1
+ mov.l @r1,r2
+ mov r14,r1
+ add #75,r1
+ mov.b r2,@r1
+ .loc 1 45 0
+ mov r14,r1
+ add #63,r1
+ mov.b @r1,r1
+ tst r1,r1
+ bra .L87
+ nop
+ .align 1
+.L114:
+ .short 160
+.L91:
+ .short 128
+.L95:
+ .short 132
+.L99:
+ .short 136
+.L115:
+ .align 2
+.L112:
+ .long tst_mbrlen_loc
+.L113:
+ .long 48008
+ .align 1
+.L87:
+ bf .L49
+ .loc 1 47 0
+ mov r14,r2
+ add #16,r2
+ mov #0,r1
+ mov.l r1,@(48,r2)
+.L49:
+ .loc 1 51 0
+ mov.l .L136,r1
+ mov.l @r1,r2
+ mov.l .L117,r3
+ mov r14,r1
+ add #16,r1
+ mov.l @(52,r1),r1
+ mov r2,r4
+ mov r3,r5
+ mov r1,r6
+ mov.l .L138,r1
+.LCFI24:
+ jsr @r1
+ nop
+ .loc 1 53 0
+ mov r14,r1
+ add #16,r1
+ mov.l @(52,r1),r2
+ mov #99,r1
+ cmp/eq r1,r2
+ bf .L51
+ .loc 1 55 0
+ mov.l .L130,r1
+ jsr @r1
+ nop
+ mov r14,r1
+ add #16,r1
+ mov.l r0,@(52,r1)
+.L51:
+ .loc 1 58 0
+ mov r14,r1
+ add #74,r1
+ mov.b @r1,r1
+ tst r1,r1
+ bt .L53
+ mov.l .L121,r1
+ mov.l r1,@r14
+ bra .L55
+ nop
+ .align 1
+.L53:
+ mov #0,r2
+ mov.l r2,@r14
+.L55:
+ mov r14,r1
+ add #16,r1
+ mov.l @r14,r2
+ mov.l r2,@(60,r1)
+ .loc 1 60 0
+ mov r14,r1
+ add #75,r1
+ mov.b @r1,r1
+ tst r1,r1
+ bt .L56
+ .loc 1 62 0
+ mov.l .L121,r1
+ mov r1,r4
+ mov #0,r5
+ mov #8,r6
+ mov.l .L122,r1
+ jsr @r1
+ nop
+ .loc 1 63 0
+ mov #0,r4
+ mov #0,r5
+ mov #0,r6
+ mov.l .L126,r1
+ jsr @r1
+ nop
+.L56:
+ .loc 1 66 0
+ mova .L128,r0
+ mov.l .L128,r12
+ add r0,r12
+ mov.l 1f,r0
+ stc gbr,r1
+ mov.l @(r0,r12),r0
+ bra 2f
+ add r0,r1
+ .align 2
+1: .long __libc_errno@GOTTPOFF
+2:
+ mov r1,r2
+ mov #0,r1
+ mov.l r1,@r2
+ .loc 1 67 0
+ mov r14,r1
+ add #16,r1
+ mov.l @(48,r1),r2
+ mov r14,r1
+ add #16,r1
+ mov.l @(52,r1),r3
+ mov r14,r1
+ add #16,r1
+ mov.l @(60,r1),r1
+ mov r2,r4
+ mov r3,r5
+ mov r1,r6
+ mov.l .L126,r1
+ jsr @r1
+ nop
+ mov r14,r1
+ add #16,r1
+ mov.l r0,@(40,r1)
+ .loc 1 68 0
+ mov r14,r2
+ add #16,r2
+ mova .L128,r0
+ mov.l .L128,r12
+ add r0,r12
+ mov.l 1f,r0
+ stc gbr,r1
+ mov.l @(r0,r12),r0
+ bra 2f
+ add r0,r1
+ .align 2
+1: .long __libc_errno@GOTTPOFF
+2:
+ mov.l @r1,r1
+ mov.l r1,@(32,r2)
+ .loc 1 71 0
+ mov.l .L136,r1
+ mov.l @r1,r8
+ mov r14,r1
+ add #75,r1
+ mov.b @r1,r9
+ mov r14,r1
+ add #63,r1
+ mov.b @r1,r10
+ mov r14,r1
+ add #74,r1
+ mov.b @r1,r11
+ mov.l .L130,r1
+ jsr @r1
+ nop
+ add #-16,r15
+ mov r15,r2
+ mov.l .L131,r3
+ mov r14,r1
+ add #16,r1
+ mov.l @(48,r1),r7
+ mov r14,r1
+ add #16,r1
+ mov.l @(52,r1),r1
+ mov.l r9,@r2
+ mov.l r10,@(4,r2)
+ mov.l r11,@(8,r2)
+ mov.l r0,@(12,r2)
+ mov r8,r4
+ mov r3,r5
+ mov r7,r6
+ mov r1,r7
+ mov.l .L138,r1
+.LCFI25:
+ jsr @r1
+ nop
+ add #16,r15
+ .loc 1 75 0
+ mov r14,r1
+ add #-48,r1
+ mov.l @(52,r1),r1
+ tst r1,r1
+ bt .L58
+ .loc 1 77 0
+ mov.l .L136,r1
+ mov.l @r1,r5
+ mov r14,r1
+ add #16,r1
+ mov.l @(0,r1),r1
+ mov r1,r0
+ add #1,r0
+ mov r14,r1
+ add #16,r1
+ mov.l @(16,r1),r1
+ mov r1,r3
+ add #1,r3
+ add #-8,r15
+ mov r15,r2
+ mov.l .L134,r7
+ mov r14,r1
+ add #16,r1
+ mov.l @(20,r1),r6
+ mov.l r3,@r2
+ mov r14,r1
+ add #16,r1
+ mov.l @(40,r1),r1
+ mov.l r1,@(4,r2)
+ mov r5,r4
+ mov r7,r5
+ mov r0,r7
+ mov.l .L138,r1
+.LCFI26:
+ jsr @r1
+ nop
+ add #8,r15
+ .loc 1 79 0
+ mov.l .L136,r1
+ mov.l @r1,r2
+ mov.l .L137,r3
+ mov r14,r1
+ add #16,r1
+ mov.l @(32,r1),r1
+ mov r2,r4
+ mov r3,r5
+ mov r1,r6
+ mov.l .L138,r1
+.LCFI27:
+ jsr @r1
+ nop
+.L58:
+ .loc 1 82 0
+ mov r14,r1
+ add #16,r1
+ mov.l @(24,r1),r1
+ tst r1,r1
+ bt .L60
+ mov r14,r1
+ add #16,r1
+ mov r14,r2
+ add #16,r2
+ mov.l @(32,r1),r3
+ mov.l @(24,r2),r1
+ cmp/eq r1,r3
+ bf .L62
+ mov r14,r1
+ add #16,r1
+ mov.l @(0,r1),r1
+ mov r1,r6
+ add #1,r6
+ mov r14,r1
+ add #16,r1
+ mov.l @(16,r1),r1
+ mov r1,r3
+ add #1,r3
+ add #-16,r15
+ mov r15,r2
+ mov r14,r1
+ add #-48,r1
+ mov.l @(56,r1),r7
+ mov.l .L145,r8
+ mov r14,r1
+ add #16,r1
+ mov.l @(20,r1),r0
+ mov.l r6,@r2
+ mov.l r3,@(4,r2)
+ mov #1,r1
+ mov.l r1,@(8,r2)
+ mov.l .L146,r1
+ mov.l r1,@(12,r2)
+ mov r7,r4
+ mov #83,r5
+ mov r8,r6
+ mov r0,r7
+ mov.l .L147,r1
+.LCFI28:
+ jsr @r1
+ nop
+ add #16,r15
+ bra .L60
+ nop
+ .align 1
+.L62:
+ mov r14,r2
+ add #16,r2
+ mov r14,r1
+ add #16,r1
+ mov.l @(4,r1),r1
+ add #1,r1
+ mov.l r1,@(4,r2)
+ mov r14,r1
+ add #16,r1
+ mov.l @(0,r1),r1
+ mov r1,r6
+ add #1,r6
+ mov r14,r1
+ add #16,r1
+ mov.l @(16,r1),r1
+ mov r1,r3
+ add #1,r3
+ add #-16,r15
+ mov r15,r2
+ mov r14,r1
+ add #-48,r1
+ mov.l @(56,r1),r7
+ mov.l .L145,r8
+ mov r14,r1
+ add #16,r1
+ mov.l @(20,r1),r0
+ mov.l r6,@r2
+ mov.l r3,@(4,r2)
+ mov #1,r1
+ mov.l r1,@(8,r2)
+ mov.l .L143,r1
+ mov.l r1,@(12,r2)
+ mov r7,r4
+ mov #70,r5
+ mov r8,r6
+ mov r0,r7
+ mov.l .L147,r1
+ jsr @r1
+ nop
+ add #16,r15
+.L60:
+ mov r14,r1
+ add #16,r1
+ mov.l @(28,r1),r2
+ mov #1,r1
+ cmp/eq r1,r2
+ bf .L161
+ mov r14,r1
+ add #16,r1
+ mov r14,r2
+ add #16,r2
+ mov.l @(40,r1),r3
+ mov.l @(36,r2),r1
+ cmp/eq r1,r3
+ bf .L66
+ mov r14,r1
+ add #16,r1
+ mov.l @(0,r1),r1
+ mov r1,r6
+ add #1,r6
+ mov r14,r1
+ add #16,r1
+ mov.l @(16,r1),r1
+ mov r1,r3
+ add #1,r3
+ add #-16,r15
+ mov r15,r2
+ mov r14,r1
+ add #-48,r1
+ mov.l @(56,r1),r7
+ mov.l .L145,r8
+ mov r14,r1
+ add #16,r1
+ mov.l @(20,r1),r0
+ mov.l r6,@r2
+ mov.l r3,@(4,r2)
+ mov #2,r1
+ mov.l r1,@(8,r2)
+ mov.l .L146,r1
+ mov.l r1,@(12,r2)
+ mov r7,r4
+ mov #83,r5
+ mov r8,r6
+ mov r0,r7
+ mov.l .L147,r1
+ jsr @r1
+ nop
+ add #16,r15
+.L161:
+ bra .L64
+ nop
+.L148:
+ .align 2
+.L136:
+ .long stdout
+.L117:
+ .long .LC11
+.L138:
+ .long fprintf
+.L130:
+ .long _stdlib_mb_cur_max
+.L121:
+ .long s.3934
+.L122:
+ .long memset
+.L126:
+ .long mbrlen
+.L128:
+ .long _GLOBAL_OFFSET_TABLE_
+.L131:
+ .long .LC12
+.L134:
+ .long .LC13
+.L137:
+ .long .LC14
+.L145:
+ .long .LC8
+.L146:
+ .long .LC15
+.L147:
+ .long result
+.L143:
+ .long .LC16
+ .align 1
+.L66:
+ mov r14,r2
+ add #16,r2
+ mov r14,r1
+ add #16,r1
+ mov.l @(4,r1),r1
+ add #1,r1
+ mov.l r1,@(4,r2)
+ mov r14,r1
+ add #16,r1
+ mov.l @(0,r1),r1
+ mov r1,r6
+ add #1,r6
+ mov r14,r1
+ add #16,r1
+ mov.l @(16,r1),r1
+ mov r1,r3
+ add #1,r3
+ add #-16,r15
+ mov r15,r2
+ mov r14,r1
+ add #-48,r1
+ mov.l @(56,r1),r7
+ mov.l .L149,r8
+ mov r14,r1
+ add #16,r1
+ mov.l @(20,r1),r0
+ mov.l r6,@r2
+ mov.l r3,@(4,r2)
+ mov #2,r1
+ mov.l r1,@(8,r2)
+ mov.l .L150,r1
+ mov.l r1,@(12,r2)
+ mov r7,r4
+ mov #70,r5
+ mov r8,r6
+ mov r0,r7
+ mov.l .L151,r1
+ jsr @r1
+ nop
+ add #16,r15
+.L64:
+ .loc 1 37 0
+ mov r14,r2
+ add #16,r2
+ mov r14,r1
+ add #16,r1
+ mov.l @(16,r1),r1
+ add #1,r1
+ mov.l r1,@(16,r2)
+.L47:
+ mov r14,r1
+ add #16,r1
+ mov.l @(16,r1),r2
+ mov #2,r1
+ cmp/gt r1,r2
+ bt .L167
+ bra .L48
+ nop
+.L167:
+.L46:
+ .loc 1 26 0
+ mov r14,r2
+ add #16,r2
+ mov r14,r1
+ add #16,r1
+ mov.l @(0,r1),r1
+ add #1,r1
+ mov.l r1,@(0,r2)
+.L42:
+ mov r14,r1
+ add #-48,r1
+ mov.l @(60,r1),r3
+ mov r14,r1
+ add #16,r1
+ mov.l @(0,r1),r2
+ mov.l .L156,r7
+ mov.w .L153,r1
+ mul.l r1,r2
+ sts macl,r2
+ mov.l .L157,r1
+ mul.l r1,r3
+ sts macl,r1
+ add r2,r1
+ mov r1,r2
+ add r7,r2
+ mov.w .L155,r1
+ add r2,r1
+ mov.l @r1,r1
+ tst r1,r1
+ bf .L166
+ bra .L43
+ nop
+.L166:
+.L41:
+ .loc 1 23 0
+ mov r14,r2
+ add #-48,r2
+ mov r14,r1
+ add #-48,r1
+ mov.l @(60,r1),r1
+ add #1,r1
+ mov.l r1,@(60,r2)
+.L37:
+ mov r14,r1
+ add #-48,r1
+ mov.l @(60,r1),r2
+ mov.l .L156,r3
+ mov.l .L157,r1
+ mul.l r1,r2
+ sts macl,r1
+ add r3,r1
+ add #4,r1
+ mov.l @r1,r1
+ mov.l .L158,r2
+ mov r1,r4
+ mov r2,r5
+ mov.l .L159,r1
+.LCFI29:
+ jsr @r1
+ nop
+ tst r0,r0
+ bt .L165
+ bra .L38
+ nop
+.L165:
+ .loc 1 89 0
+ mov r14,r1
+ add #16,r1
+ mov.l @(4,r1),r1
+ mov r1,r0
+ .loc 1 90 0
+ add #80,r14
+ mov r14,r15
+ lds.l @r15+,pr
+ mov.l @r15+,r14
+ mov.l @r15+,r12
+ mov.l @r15+,r11
+ mov.l @r15+,r10
+ mov.l @r15+,r9
+ mov.l @r15+,r8
+ rts
+ nop
+ .align 1
+.L153:
+ .short 160
+.L155:
+ .short 164
+.L160:
+ .align 2
+.L149:
+ .long .LC8
+.L150:
+ .long .LC17
+.L151:
+ .long result
+.L156:
+ .long tst_mbrlen_loc
+.L157:
+ .long 48008
+.L158:
+ .long .LC6
+.L159:
+ .long strcmp
+.LFE7:
+ .size tst_mbrlen, .-tst_mbrlen
+ .section .debug_macinfo
+ .byte 0x4
+ .comm result_rec,132,4
+ .section .debug_frame,"",@progbits
+.Lframe0:
+ .ualong .LECIE0-.LSCIE0
+.LSCIE0:
+ .ualong 0xffffffff
+ .byte 0x1
+ .string ""
+ .uleb128 0x1
+ .sleb128 -4
+ .byte 0x11
+ .byte 0xc
+ .uleb128 0xf
+ .uleb128 0x0
+ .align 2
+.LECIE0:
+.LSFDE0:
+ .ualong .LEFDE0-.LASFDE0
+.LASFDE0:
+ .ualong .Lframe0
+ .ualong .LFB5
+ .ualong .LFE5-.LFB5
+ .byte 0x4
+ .ualong .LCFI0-.LFB5
+ .byte 0xe
+ .uleb128 0x4
+ .byte 0x4
+ .ualong .LCFI1-.LCFI0
+ .byte 0xe
+ .uleb128 0x8
+ .byte 0x4
+ .ualong .LCFI2-.LCFI1
+ .byte 0xe
+ .uleb128 0x1c
+ .byte 0x91
+ .uleb128 0x2
+ .byte 0x8e
+ .uleb128 0x1
+ .byte 0x4
+ .ualong .LCFI3-.LCFI2
+ .byte 0xd
+ .uleb128 0xe
+ .align 2
+.LEFDE0:
+.LSFDE2:
+ .ualong .LEFDE2-.LASFDE2
+.LASFDE2:
+ .ualong .Lframe0
+ .ualong .LFB6
+ .ualong .LFE6-.LFB6
+ .byte 0x4
+ .ualong .LCFI4-.LFB6
+ .byte 0xe
+ .uleb128 0x4
+ .byte 0x4
+ .ualong .LCFI5-.LCFI4
+ .byte 0xe
+ .uleb128 0x8
+ .byte 0x4
+ .ualong .LCFI6-.LCFI5
+ .byte 0xe
+ .uleb128 0xc
+ .byte 0x4
+ .ualong .LCFI7-.LCFI6
+ .byte 0xe
+ .uleb128 0x20
+ .byte 0x91
+ .uleb128 0x3
+ .byte 0x8e
+ .uleb128 0x2
+ .byte 0x88
+ .uleb128 0x1
+ .byte 0x4
+ .ualong .LCFI8-.LCFI7
+ .byte 0xd
+ .uleb128 0xe
+ .byte 0x4
+ .ualong .LCFI9-.LCFI8
+ .byte 0x2e
+ .uleb128 0xc
+ .byte 0x4
+ .ualong .LCFI10-.LCFI9
+ .byte 0x2e
+ .uleb128 0x14
+ .byte 0x4
+ .ualong .LCFI11-.LCFI10
+ .byte 0x2e
+ .uleb128 0x0
+ .align 2
+.LEFDE2:
+.LSFDE4:
+ .ualong .LEFDE4-.LASFDE4
+.LASFDE4:
+ .ualong .Lframe0
+ .ualong .LFB7
+ .ualong .LFE7-.LFB7
+ .byte 0x4
+ .ualong .LCFI12-.LFB7
+ .byte 0xe
+ .uleb128 0x4
+ .byte 0x4
+ .ualong .LCFI13-.LCFI12
+ .byte 0xe
+ .uleb128 0x8
+ .byte 0x4
+ .ualong .LCFI14-.LCFI13
+ .byte 0xe
+ .uleb128 0xc
+ .byte 0x4
+ .ualong .LCFI15-.LCFI14
+ .byte 0xe
+ .uleb128 0x10
+ .byte 0x4
+ .ualong .LCFI16-.LCFI15
+ .byte 0xe
+ .uleb128 0x14
+ .byte 0x4
+ .ualong .LCFI17-.LCFI16
+ .byte 0xe
+ .uleb128 0x18
+ .byte 0x4
+ .ualong .LCFI18-.LCFI17
+ .byte 0xe
+ .uleb128 0x1c
+ .byte 0x4
+ .ualong .LCFI19-.LCFI18
+ .byte 0xe
+ .uleb128 0x6c
+ .byte 0x91
+ .uleb128 0x7
+ .byte 0x8e
+ .uleb128 0x6
+ .byte 0x8c
+ .uleb128 0x5
+ .byte 0x8b
+ .uleb128 0x4
+ .byte 0x8a
+ .uleb128 0x3
+ .byte 0x89
+ .uleb128 0x2
+ .byte 0x88
+ .uleb128 0x1
+ .byte 0x4
+ .ualong .LCFI20-.LCFI19
+ .byte 0xd
+ .uleb128 0xe
+ .byte 0x4
+ .ualong .LCFI21-.LCFI20
+ .byte 0x2e
+ .uleb128 0x10
+ .byte 0x4
+ .ualong .LCFI22-.LCFI21
+ .byte 0x2e
+ .uleb128 0x0
+ .byte 0x4
+ .ualong .LCFI23-.LCFI22
+ .byte 0x2e
+ .uleb128 0x10
+ .byte 0x4
+ .ualong .LCFI24-.LCFI23
+ .byte 0x2e
+ .uleb128 0x0
+ .byte 0x4
+ .ualong .LCFI25-.LCFI24
+ .byte 0x2e
+ .uleb128 0x10
+ .byte 0x4
+ .ualong .LCFI26-.LCFI25
+ .byte 0x2e
+ .uleb128 0x8
+ .byte 0x4
+ .ualong .LCFI27-.LCFI26
+ .byte 0x2e
+ .uleb128 0x0
+ .byte 0x4
+ .ualong .LCFI28-.LCFI27
+ .byte 0x2e
+ .uleb128 0x10
+ .byte 0x4
+ .ualong .LCFI29-.LCFI28
+ .byte 0x2e
+ .uleb128 0x0
+ .align 2
+.LEFDE4:
+ .text
+.Letext0:
+ .section .debug_loc,"",@progbits
+.Ldebug_loc0:
+.LLST0:
+ .ualong .LFB5-.Ltext0
+ .ualong .LCFI0-.Ltext0
+ .uaword 0x1
+ .byte 0x5f
+ .ualong .LCFI0-.Ltext0
+ .ualong .LCFI1-.Ltext0
+ .uaword 0x2
+ .byte 0x7f
+ .sleb128 4
+ .ualong .LCFI1-.Ltext0
+ .ualong .LCFI2-.Ltext0
+ .uaword 0x2
+ .byte 0x7f
+ .sleb128 8
+ .ualong .LCFI2-.Ltext0
+ .ualong .LCFI3-.Ltext0
+ .uaword 0x2
+ .byte 0x7f
+ .sleb128 28
+ .ualong .LCFI3-.Ltext0
+ .ualong .LFE5-.Ltext0
+ .uaword 0x2
+ .byte 0x7e
+ .sleb128 28
+ .ualong 0x0
+ .ualong 0x0
+.LLST1:
+ .ualong .LFB6-.Ltext0
+ .ualong .LCFI4-.Ltext0
+ .uaword 0x1
+ .byte 0x5f
+ .ualong .LCFI4-.Ltext0
+ .ualong .LCFI5-.Ltext0
+ .uaword 0x2
+ .byte 0x7f
+ .sleb128 4
+ .ualong .LCFI5-.Ltext0
+ .ualong .LCFI6-.Ltext0
+ .uaword 0x2
+ .byte 0x7f
+ .sleb128 8
+ .ualong .LCFI6-.Ltext0
+ .ualong .LCFI7-.Ltext0
+ .uaword 0x2
+ .byte 0x7f
+ .sleb128 12
+ .ualong .LCFI7-.Ltext0
+ .ualong .LCFI8-.Ltext0
+ .uaword 0x2
+ .byte 0x7f
+ .sleb128 32
+ .ualong .LCFI8-.Ltext0
+ .ualong .LFE6-.Ltext0
+ .uaword 0x2
+ .byte 0x7e
+ .sleb128 32
+ .ualong 0x0
+ .ualong 0x0
+.LLST2:
+ .ualong .LFB7-.Ltext0
+ .ualong .LCFI12-.Ltext0
+ .uaword 0x1
+ .byte 0x5f
+ .ualong .LCFI12-.Ltext0
+ .ualong .LCFI13-.Ltext0
+ .uaword 0x2
+ .byte 0x7f
+ .sleb128 4
+ .ualong .LCFI13-.Ltext0
+ .ualong .LCFI14-.Ltext0
+ .uaword 0x2
+ .byte 0x7f
+ .sleb128 8
+ .ualong .LCFI14-.Ltext0
+ .ualong .LCFI15-.Ltext0
+ .uaword 0x2
+ .byte 0x7f
+ .sleb128 12
+ .ualong .LCFI15-.Ltext0
+ .ualong .LCFI16-.Ltext0
+ .uaword 0x2
+ .byte 0x7f
+ .sleb128 16
+ .ualong .LCFI16-.Ltext0
+ .ualong .LCFI17-.Ltext0
+ .uaword 0x2
+ .byte 0x7f
+ .sleb128 20
+ .ualong .LCFI17-.Ltext0
+ .ualong .LCFI18-.Ltext0
+ .uaword 0x2
+ .byte 0x7f
+ .sleb128 24
+ .ualong .LCFI18-.Ltext0
+ .ualong .LCFI19-.Ltext0
+ .uaword 0x2
+ .byte 0x7f
+ .sleb128 28
+ .ualong .LCFI19-.Ltext0
+ .ualong .LCFI20-.Ltext0
+ .uaword 0x3
+ .byte 0x7f
+ .sleb128 108
+ .ualong .LCFI20-.Ltext0
+ .ualong .LFE7-.Ltext0
+ .uaword 0x3
+ .byte 0x7e
+ .sleb128 108
+ .ualong 0x0
+ .ualong 0x0
+ .section .debug_info
+ .ualong 0x925
+ .uaword 0x2
+ .ualong .Ldebug_abbrev0
+ .byte 0x4
+ .uleb128 0x1
+ .ualong .Ldebug_macinfo0
+ .ualong .Ldebug_line0
+ .ualong .Letext0
+ .ualong .Ltext0
+ .string "GNU C 4.1.1 (STMicroelectronics Special) [build Jun 26 2007]"
+ .byte 0x1
+ .string "tst_mbrlen.c"
+ .string "/vob/stsca_uClibc-nptl/uClibc-nptl/test/locale-mbwc"
+ .uleb128 0x2
+ .string "size_t"
+ .byte 0xa
+ .byte 0xd6
+ .ualong 0xa9
+ .uleb128 0x3
+ .ualong .LASF0
+ .byte 0x4
+ .byte 0x7
+ .uleb128 0x4
+ .string "short unsigned int"
+ .byte 0x2
+ .byte 0x7
+ .uleb128 0x4
+ .string "long unsigned int"
+ .byte 0x4
+ .byte 0x7
+ .uleb128 0x4
+ .string "long int"
+ .byte 0x4
+ .byte 0x5
+ .uleb128 0x4
+ .string "int"
+ .byte 0x4
+ .byte 0x5
+ .uleb128 0x5
+ .byte 0x4
+ .ualong 0xf4
+ .uleb128 0x4
+ .string "char"
+ .byte 0x1
+ .byte 0x6
+ .uleb128 0x4
+ .string "long long int"
+ .byte 0x8
+ .byte 0x5
+ .uleb128 0x3
+ .ualong .LASF0
+ .byte 0x4
+ .byte 0x7
+ .uleb128 0x4
+ .string "unsigned char"
+ .byte 0x1
+ .byte 0x8
+ .uleb128 0x4
+ .string "signed char"
+ .byte 0x1
+ .byte 0x6
+ .uleb128 0x4
+ .string "short int"
+ .byte 0x2
+ .byte 0x5
+ .uleb128 0x4
+ .string "long long unsigned int"
+ .byte 0x8
+ .byte 0x7
+ .uleb128 0x6
+ .ualong 0x1cf
+ .byte 0x18
+ .byte 0x10
+ .byte 0x34
+ .uleb128 0x7
+ .string "__lock"
+ .byte 0x10
+ .byte 0x35
+ .ualong 0xe7
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x0
+ .uleb128 0x7
+ .string "__count"
+ .byte 0x10
+ .byte 0x36
+ .ualong 0xa9
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x4
+ .uleb128 0x7
+ .string "__owner"
+ .byte 0x10
+ .byte 0x37
+ .ualong 0xe7
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x8
+ .uleb128 0x7
+ .string "__kind"
+ .byte 0x10
+ .byte 0x3a
+ .ualong 0xe7
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0xc
+ .uleb128 0x7
+ .string "__nusers"
+ .byte 0x10
+ .byte 0x3b
+ .ualong 0xa9
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x10
+ .uleb128 0x7
+ .string "__spins"
+ .byte 0x10
+ .byte 0x3c
+ .ualong 0xe7
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x14
+ .byte 0x0
+ .uleb128 0x8
+ .ualong 0x203
+ .byte 0x18
+ .byte 0x10
+ .byte 0x32
+ .uleb128 0x9
+ .string "__data"
+ .byte 0x10
+ .byte 0x3d
+ .ualong 0x15b
+ .uleb128 0x9
+ .string "__size"
+ .byte 0x10
+ .byte 0x3e
+ .ualong 0x203
+ .uleb128 0x9
+ .string "__align"
+ .byte 0x10
+ .byte 0x3f
+ .ualong 0xdb
+ .byte 0x0
+ .uleb128 0xa
+ .ualong 0x213
+ .ualong 0xf4
+ .uleb128 0xb
+ .ualong 0x10d
+ .byte 0x17
+ .byte 0x0
+ .uleb128 0x2
+ .string "pthread_mutex_t"
+ .byte 0x10
+ .byte 0x40
+ .ualong 0x1cf
+ .uleb128 0x2
+ .string "FILE"
+ .byte 0x5
+ .byte 0x2e
+ .ualong 0x236
+ .uleb128 0xc
+ .ualong 0x381
+ .string "__STDIO_FILE_STRUCT"
+ .byte 0x50
+ .byte 0x5
+ .byte 0x2e
+ .uleb128 0xd
+ .string "__modeflags"
+ .byte 0x11
+ .uaword 0x110
+ .ualong 0xb0
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x0
+ .uleb128 0xd
+ .string "__ungot_width"
+ .byte 0x11
+ .uaword 0x113
+ .ualong 0x3cd
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x2
+ .uleb128 0xd
+ .string "__filedes"
+ .byte 0x11
+ .uaword 0x11a
+ .ualong 0xe7
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x4
+ .uleb128 0xd
+ .string "__bufstart"
+ .byte 0x11
+ .uaword 0x11c
+ .ualong 0x3dd
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x8
+ .uleb128 0xd
+ .string "__bufend"
+ .byte 0x11
+ .uaword 0x11d
+ .ualong 0x3dd
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0xc
+ .uleb128 0xd
+ .string "__bufpos"
+ .byte 0x11
+ .uaword 0x11e
+ .ualong 0x3dd
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x10
+ .uleb128 0xd
+ .string "__bufread"
+ .byte 0x11
+ .uaword 0x11f
+ .ualong 0x3dd
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x14
+ .uleb128 0xd
+ .string "__bufgetc_u"
+ .byte 0x11
+ .uaword 0x122
+ .ualong 0x3dd
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x18
+ .uleb128 0xd
+ .string "__bufputc_u"
+ .byte 0x11
+ .uaword 0x125
+ .ualong 0x3dd
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x1c
+ .uleb128 0xd
+ .string "__nextopen"
+ .byte 0x11
+ .uaword 0x12b
+ .ualong 0x3e3
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x20
+ .uleb128 0xd
+ .string "__ungot"
+ .byte 0x11
+ .uaword 0x132
+ .ualong 0x3e9
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x24
+ .uleb128 0xd
+ .string "__state"
+ .byte 0x11
+ .uaword 0x135
+ .ualong 0x3ba
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x2c
+ .uleb128 0xd
+ .string "__user_locking"
+ .byte 0x11
+ .uaword 0x13b
+ .ualong 0xe7
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x34
+ .uleb128 0xd
+ .string "__lock"
+ .byte 0x11
+ .uaword 0x13f
+ .ualong 0x213
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x38
+ .byte 0x0
+ .uleb128 0xe
+ .string "wchar_t"
+ .byte 0xa
+ .uaword 0x146
+ .ualong 0xdb
+ .uleb128 0x6
+ .ualong 0x3ba
+ .byte 0x8
+ .byte 0x12
+ .byte 0x52
+ .uleb128 0x7
+ .string "__mask"
+ .byte 0x12
+ .byte 0x53
+ .ualong 0x381
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x0
+ .uleb128 0x7
+ .string "__wc"
+ .byte 0x12
+ .byte 0x54
+ .ualong 0x381
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x4
+ .byte 0x0
+ .uleb128 0x2
+ .string "__mbstate_t"
+ .byte 0x12
+ .byte 0x55
+ .ualong 0x391
+ .uleb128 0xa
+ .ualong 0x3dd
+ .ualong 0x114
+ .uleb128 0xb
+ .ualong 0x10d
+ .byte 0x1
+ .byte 0x0
+ .uleb128 0x5
+ .byte 0x4
+ .ualong 0x114
+ .uleb128 0x5
+ .byte 0x4
+ .ualong 0x236
+ .uleb128 0xa
+ .ualong 0x3f9
+ .ualong 0x381
+ .uleb128 0xb
+ .ualong 0x10d
+ .byte 0x1
+ .byte 0x0
+ .uleb128 0x5
+ .byte 0x4
+ .ualong 0x3ff
+ .uleb128 0xf
+ .ualong 0xf4
+ .uleb128 0x2
+ .string "mbstate_t"
+ .byte 0x12
+ .byte 0x6b
+ .ualong 0x3ba
+ .uleb128 0x6
+ .ualong 0x441
+ .byte 0x8
+ .byte 0x36
+ .byte 0x35
+ .uleb128 0x7
+ .string "func_id"
+ .byte 0x36
+ .byte 0x36
+ .ualong 0xe7
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x0
+ .uleb128 0x7
+ .string "locale"
+ .byte 0x36
+ .byte 0x37
+ .ualong 0x3f9
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x4
+ .byte 0x0
+ .uleb128 0x2
+ .string "TST_HEAD"
+ .byte 0x36
+ .byte 0x39
+ .ualong 0x415
+ .uleb128 0x6
+ .ualong 0x4a3
+ .byte 0x28
+ .byte 0x36
+ .byte 0x76
+ .uleb128 0x7
+ .string "s_flg"
+ .byte 0x36
+ .byte 0x77
+ .ualong 0xe7
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x0
+ .uleb128 0x7
+ .string "s"
+ .byte 0x36
+ .byte 0x78
+ .ualong 0x203
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x4
+ .uleb128 0x7
+ .string "n"
+ .byte 0x36
+ .byte 0x79
+ .ualong 0x9b
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x1c
+ .uleb128 0x7
+ .string "t_flg"
+ .byte 0x36
+ .byte 0x7a
+ .ualong 0xe7
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x20
+ .uleb128 0x7
+ .string "t_init"
+ .byte 0x36
+ .byte 0x7b
+ .ualong 0xe7
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x24
+ .byte 0x0
+ .uleb128 0x6
+ .ualong 0x4ba
+ .byte 0x78
+ .byte 0x36
+ .byte 0x74
+ .uleb128 0x7
+ .string "seq"
+ .byte 0x36
+ .byte 0x7d
+ .ualong 0x4ba
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x0
+ .byte 0x0
+ .uleb128 0xa
+ .ualong 0x4ca
+ .ualong 0x451
+ .uleb128 0xb
+ .ualong 0x10d
+ .byte 0x2
+ .byte 0x0
+ .uleb128 0x2
+ .string "TIN_MBRLEN_REC"
+ .byte 0x36
+ .byte 0x7f
+ .ualong 0x4a3
+ .uleb128 0x6
+ .ualong 0x51f
+ .byte 0xc
+ .byte 0x36
+ .byte 0x81
+ .uleb128 0x7
+ .string "err_val"
+ .byte 0x36
+ .byte 0x81
+ .ualong 0xe7
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x0
+ .uleb128 0x7
+ .string "ret_flg"
+ .byte 0x36
+ .byte 0x81
+ .ualong 0xe7
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x4
+ .uleb128 0x7
+ .string "ret_val"
+ .byte 0x36
+ .byte 0x81
+ .ualong 0x9b
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x8
+ .byte 0x0
+ .uleb128 0x6
+ .ualong 0x536
+ .byte 0x24
+ .byte 0x36
+ .byte 0x81
+ .uleb128 0x7
+ .string "seq"
+ .byte 0x36
+ .byte 0x81
+ .ualong 0x536
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x0
+ .byte 0x0
+ .uleb128 0xa
+ .ualong 0x546
+ .ualong 0x4e0
+ .uleb128 0xb
+ .ualong 0x10d
+ .byte 0x2
+ .byte 0x0
+ .uleb128 0x2
+ .string "TEX_MBRLEN_REC"
+ .byte 0x36
+ .byte 0x81
+ .ualong 0x51f
+ .uleb128 0x6
+ .ualong 0x599
+ .byte 0xa0
+ .byte 0x36
+ .byte 0x82
+ .uleb128 0x7
+ .string "input"
+ .byte 0x36
+ .byte 0x82
+ .ualong 0x4ca
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x0
+ .uleb128 0x7
+ .string "expect"
+ .byte 0x36
+ .byte 0x82
+ .ualong 0x546
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x78
+ .uleb128 0x7
+ .string "is_last"
+ .byte 0x36
+ .byte 0x82
+ .ualong 0xe7
+ .byte 0x3
+ .byte 0x23
+ .uleb128 0x9c
+ .byte 0x0
+ .uleb128 0x2
+ .string "TST_MBRLEN_REC"
+ .byte 0x36
+ .byte 0x82
+ .ualong 0x55c
+ .uleb128 0x10
+ .ualong 0x5d4
+ .uaword 0xbb88
+ .byte 0x36
+ .byte 0x82
+ .uleb128 0x7
+ .string "hd"
+ .byte 0x36
+ .byte 0x82
+ .ualong 0x441
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x0
+ .uleb128 0x7
+ .string "rec"
+ .byte 0x36
+ .byte 0x82
+ .ualong 0x5d4
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x8
+ .byte 0x0
+ .uleb128 0xa
+ .ualong 0x5e5
+ .ualong 0x599
+ .uleb128 0x11
+ .ualong 0x10d
+ .uaword 0x12b
+ .byte 0x0
+ .uleb128 0x2
+ .string "TST_MBRLEN"
+ .byte 0x36
+ .byte 0x82
+ .ualong 0x5af
+ .uleb128 0x4
+ .string "double"
+ .byte 0x8
+ .byte 0x4
+ .uleb128 0x4
+ .string "float"
+ .byte 0x4
+ .byte 0x4
+ .uleb128 0x12
+ .ualong 0x665
+ .byte 0x1
+ .string "main"
+ .byte 0x4
+ .byte 0x17
+ .byte 0x1
+ .ualong 0xe7
+ .ualong .LFB5
+ .ualong .LFE5
+ .ualong .LLST0
+ .uleb128 0x13
+ .string "argc"
+ .byte 0x4
+ .byte 0x16
+ .ualong 0xe7
+ .byte 0x2
+ .byte 0x91
+ .sleb128 -20
+ .uleb128 0x13
+ .string "argv"
+ .byte 0x4
+ .byte 0x16
+ .ualong 0x665
+ .byte 0x2
+ .byte 0x91
+ .sleb128 -24
+ .uleb128 0x14
+ .string "ret"
+ .byte 0x4
+ .byte 0x18
+ .ualong 0xe7
+ .byte 0x2
+ .byte 0x91
+ .sleb128 -16
+ .uleb128 0x14
+ .string "debug"
+ .byte 0x4
+ .byte 0x19
+ .ualong 0xe7
+ .byte 0x2
+ .byte 0x91
+ .sleb128 -12
+ .byte 0x0
+ .uleb128 0x5
+ .byte 0x4
+ .ualong 0xee
+ .uleb128 0x12
+ .ualong 0x706
+ .byte 0x1
+ .string "result"
+ .byte 0x4
+ .byte 0x2d
+ .byte 0x1
+ .ualong 0xe7
+ .ualong .LFB6
+ .ualong .LFE6
+ .ualong .LLST1
+ .uleb128 0x13
+ .string "fp"
+ .byte 0x4
+ .byte 0x2b
+ .ualong 0x706
+ .byte 0x2
+ .byte 0x91
+ .sleb128 -16
+ .uleb128 0x13
+ .string "res"
+ .byte 0x4
+ .byte 0x2b
+ .ualong 0xf4
+ .byte 0x2
+ .byte 0x91
+ .sleb128 -20
+ .uleb128 0x13
+ .string "func"
+ .byte 0x4
+ .byte 0x2b
+ .ualong 0x3f9
+ .byte 0x2
+ .byte 0x91
+ .sleb128 -24
+ .uleb128 0x13
+ .string "loc"
+ .byte 0x4
+ .byte 0x2b
+ .ualong 0x3f9
+ .byte 0x2
+ .byte 0x91
+ .sleb128 -28
+ .uleb128 0x13
+ .string "rec_no"
+ .byte 0x4
+ .byte 0x2b
+ .ualong 0xe7
+ .byte 0x2
+ .byte 0x91
+ .sleb128 0
+ .uleb128 0x13
+ .string "seq_no"
+ .byte 0x4
+ .byte 0x2c
+ .ualong 0xe7
+ .byte 0x2
+ .byte 0x91
+ .sleb128 4
+ .uleb128 0x13
+ .string "case_no"
+ .byte 0x4
+ .byte 0x2c
+ .ualong 0xe7
+ .byte 0x2
+ .byte 0x91
+ .sleb128 8
+ .uleb128 0x13
+ .string "msg"
+ .byte 0x4
+ .byte 0x2c
+ .ualong 0x3f9
+ .byte 0x2
+ .byte 0x91
+ .sleb128 12
+ .byte 0x0
+ .uleb128 0x5
+ .byte 0x4
+ .ualong 0x22a
+ .uleb128 0x12
+ .ualong 0x896
+ .byte 0x1
+ .string "tst_mbrlen"
+ .byte 0x1
+ .byte 0xd
+ .byte 0x1
+ .ualong 0xe7
+ .ualong .LFB7
+ .ualong .LFE7
+ .ualong .LLST2
+ .uleb128 0x13
+ .string "fp"
+ .byte 0x1
+ .byte 0xc
+ .ualong 0x706
+ .byte 0x3
+ .byte 0x91
+ .sleb128 -100
+ .uleb128 0x13
+ .string "debug_flg"
+ .byte 0x1
+ .byte 0xc
+ .ualong 0xe7
+ .byte 0x3
+ .byte 0x91
+ .sleb128 -104
+ .uleb128 0x14
+ .string "loc"
+ .byte 0x1
+ .byte 0xe
+ .ualong 0xe7
+ .byte 0x3
+ .byte 0x91
+ .sleb128 -96
+ .uleb128 0x14
+ .string "rec"
+ .byte 0x1
+ .byte 0xe
+ .ualong 0xe7
+ .byte 0x3
+ .byte 0x91
+ .sleb128 -92
+ .uleb128 0x14
+ .string "err_count"
+ .byte 0x1
+ .byte 0xe
+ .ualong 0xe7
+ .byte 0x3
+ .byte 0x91
+ .sleb128 -88
+ .uleb128 0x14
+ .string "warn_count"
+ .byte 0x1
+ .byte 0xe
+ .ualong 0xe7
+ .byte 0x3
+ .byte 0x91
+ .sleb128 -84
+ .uleb128 0x14
+ .string "func_id"
+ .byte 0x1
+ .byte 0xe
+ .ualong 0xe7
+ .byte 0x3
+ .byte 0x91
+ .sleb128 -80
+ .uleb128 0x14
+ .string "seq_num"
+ .byte 0x1
+ .byte 0xe
+ .ualong 0xe7
+ .byte 0x3
+ .byte 0x91
+ .sleb128 -76
+ .uleb128 0x14
+ .string "locale"
+ .byte 0x1
+ .byte 0xe
+ .ualong 0x3f9
+ .byte 0x3
+ .byte 0x91
+ .sleb128 -72
+ .uleb128 0x14
+ .string "err_exp"
+ .byte 0x1
+ .byte 0xe
+ .ualong 0xe7
+ .byte 0x3
+ .byte 0x91
+ .sleb128 -68
+ .uleb128 0x14
+ .string "ret_flg"
+ .byte 0x1
+ .byte 0xe
+ .ualong 0xe7
+ .byte 0x2
+ .byte 0x91
+ .sleb128 -64
+ .uleb128 0x14
+ .string "errno_save"
+ .byte 0x1
+ .byte 0xe
+ .ualong 0xe7
+ .byte 0x2
+ .byte 0x91
+ .sleb128 -60
+ .uleb128 0x14
+ .string "ret_exp"
+ .byte 0x1
+ .byte 0xe
+ .ualong 0x9b
+ .byte 0x2
+ .byte 0x91
+ .sleb128 -56
+ .uleb128 0x14
+ .string "ret"
+ .byte 0x1
+ .byte 0xe
+ .ualong 0x9b
+ .byte 0x2
+ .byte 0x91
+ .sleb128 -52
+ .uleb128 0x14
+ .string "s_flg"
+ .byte 0x1
+ .byte 0xf
+ .ualong 0xf4
+ .byte 0x2
+ .byte 0x91
+ .sleb128 -45
+ .uleb128 0x14
+ .string "s_in"
+ .byte 0x1
+ .byte 0x10
+ .ualong 0x3f9
+ .byte 0x2
+ .byte 0x91
+ .sleb128 -44
+ .uleb128 0x14
+ .string "n"
+ .byte 0x1
+ .byte 0x11
+ .ualong 0x9b
+ .byte 0x2
+ .byte 0x91
+ .sleb128 -40
+ .uleb128 0x14
+ .string "t_flg"
+ .byte 0x1
+ .byte 0x12
+ .ualong 0xf4
+ .byte 0x2
+ .byte 0x91
+ .sleb128 -34
+ .uleb128 0x14
+ .string "t_ini"
+ .byte 0x1
+ .byte 0x13
+ .ualong 0xf4
+ .byte 0x2
+ .byte 0x91
+ .sleb128 -33
+ .uleb128 0x14
+ .string "ps"
+ .byte 0x1
+ .byte 0x15
+ .ualong 0x896
+ .byte 0x2
+ .byte 0x91
+ .sleb128 -32
+ .uleb128 0x14
+ .string "s"
+ .byte 0x1
+ .byte 0x14
+ .ualong 0x404
+ .byte 0x5
+ .byte 0x3
+ .ualong s.3934
+ .byte 0x0
+ .uleb128 0x5
+ .byte 0x4
+ .ualong 0x404
+ .uleb128 0x15
+ .string "stdout"
+ .byte 0x5
+ .byte 0x88
+ .ualong 0x706
+ .byte 0x1
+ .byte 0x1
+ .uleb128 0x15
+ .string "stderr"
+ .byte 0x5
+ .byte 0x89
+ .ualong 0x706
+ .byte 0x1
+ .byte 0x1
+ .uleb128 0x15
+ .string "__libc_errno"
+ .byte 0x29
+ .byte 0x45
+ .ualong 0xe7
+ .byte 0x1
+ .byte 0x1
+ .uleb128 0xa
+ .ualong 0x8e2
+ .ualong 0xf4
+ .uleb128 0xb
+ .ualong 0x10d
+ .byte 0x83
+ .byte 0x0
+ .uleb128 0x16
+ .string "result_rec"
+ .byte 0x4
+ .byte 0x27
+ .ualong 0x8d2
+ .byte 0x1
+ .byte 0x5
+ .byte 0x3
+ .ualong result_rec
+ .uleb128 0xa
+ .ualong 0x90b
+ .ualong 0x5e5
+ .uleb128 0xb
+ .ualong 0x10d
+ .byte 0x3
+ .byte 0x0
+ .uleb128 0x16
+ .string "tst_mbrlen_loc"
+ .byte 0x3b
+ .byte 0x13
+ .ualong 0x8fb
+ .byte 0x1
+ .byte 0x5
+ .byte 0x3
+ .ualong tst_mbrlen_loc
+ .byte 0x0
+ .section .debug_abbrev
+ .uleb128 0x1
+ .uleb128 0x11
+ .byte 0x1
+ .uleb128 0x43
+ .uleb128 0x6
+ .uleb128 0x10
+ .uleb128 0x6
+ .uleb128 0x12
+ .uleb128 0x1
+ .uleb128 0x11
+ .uleb128 0x1
+ .uleb128 0x25
+ .uleb128 0x8
+ .uleb128 0x13
+ .uleb128 0xb
+ .uleb128 0x3
+ .uleb128 0x8
+ .uleb128 0x1b
+ .uleb128 0x8
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x2
+ .uleb128 0x16
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0x8
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x49
+ .uleb128 0x13
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0x24
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0xb
+ .uleb128 0xb
+ .uleb128 0x3e
+ .uleb128 0xb
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x4
+ .uleb128 0x24
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0x8
+ .uleb128 0xb
+ .uleb128 0xb
+ .uleb128 0x3e
+ .uleb128 0xb
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x5
+ .uleb128 0xf
+ .byte 0x0
+ .uleb128 0xb
+ .uleb128 0xb
+ .uleb128 0x49
+ .uleb128 0x13
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x6
+ .uleb128 0x13
+ .byte 0x1
+ .uleb128 0x1
+ .uleb128 0x13
+ .uleb128 0xb
+ .uleb128 0xb
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x7
+ .uleb128 0xd
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0x8
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x38
+ .uleb128 0xa
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x8
+ .uleb128 0x17
+ .byte 0x1
+ .uleb128 0x1
+ .uleb128 0x13
+ .uleb128 0xb
+ .uleb128 0xb
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x9
+ .uleb128 0xd
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0x8
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x49
+ .uleb128 0x13
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0xa
+ .uleb128 0x1
+ .byte 0x1
+ .uleb128 0x1
+ .uleb128 0x13
+ .uleb128 0x49
+ .uleb128 0x13
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0xb
+ .uleb128 0x21
+ .byte 0x0
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x2f
+ .uleb128 0xb
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0xc
+ .uleb128 0x13
+ .byte 0x1
+ .uleb128 0x1
+ .uleb128 0x13
+ .uleb128 0x3
+ .uleb128 0x8
+ .uleb128 0xb
+ .uleb128 0xb
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0xd
+ .uleb128 0xd
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0x8
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0x5
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x38
+ .uleb128 0xa
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0xe
+ .uleb128 0x16
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0x8
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0x5
+ .uleb128 0x49
+ .uleb128 0x13
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0xf
+ .uleb128 0x26
+ .byte 0x0
+ .uleb128 0x49
+ .uleb128 0x13
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x10
+ .uleb128 0x13
+ .byte 0x1
+ .uleb128 0x1
+ .uleb128 0x13
+ .uleb128 0xb
+ .uleb128 0x5
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x11
+ .uleb128 0x21
+ .byte 0x0
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x2f
+ .uleb128 0x5
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x12
+ .uleb128 0x2e
+ .byte 0x1
+ .uleb128 0x1
+ .uleb128 0x13
+ .uleb128 0x3f
+ .uleb128 0xc
+ .uleb128 0x3
+ .uleb128 0x8
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x27
+ .uleb128 0xc
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x11
+ .uleb128 0x1
+ .uleb128 0x12
+ .uleb128 0x1
+ .uleb128 0x40
+ .uleb128 0x6
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x13
+ .uleb128 0x5
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0x8
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x2
+ .uleb128 0xa
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x14
+ .uleb128 0x34
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0x8
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x2
+ .uleb128 0xa
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x15
+ .uleb128 0x34
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0x8
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x3f
+ .uleb128 0xc
+ .uleb128 0x3c
+ .uleb128 0xc
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x16
+ .uleb128 0x34
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0x8
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x3f
+ .uleb128 0xc
+ .uleb128 0x2
+ .uleb128 0xa
+ .byte 0x0
+ .byte 0x0
+ .byte 0x0
+ .section .debug_pubnames,"",@progbits
+ .ualong 0x53
+ .uaword 0x2
+ .ualong .Ldebug_info0
+ .ualong 0x929
+ .ualong 0x60a
+ .string "main"
+ .ualong 0x66b
+ .string "result"
+ .ualong 0x70c
+ .string "tst_mbrlen"
+ .ualong 0x8e2
+ .string "result_rec"
+ .ualong 0x90b
+ .string "tst_mbrlen_loc"
+ .ualong 0x0
+ .section .debug_aranges,"",@progbits
+ .ualong 0x1c
+ .uaword 0x2
+ .ualong .Ldebug_info0
+ .byte 0x4
+ .byte 0x0
+ .uaword 0x0
+ .uaword 0x0
+ .ualong .Ltext0
+ .ualong .Letext0-.Ltext0
+ .ualong 0x0
+ .ualong 0x0
+ .section .debug_macinfo
+ .byte 0x0
+ .section .debug_str,"",@progbits
+.LASF0:
+ .string "unsigned int"
+ .ident "GCC: (GNU) 4.1.1 (STMicroelectronics Special) [build Jun 26 2007]"
+ .section .note.GNU-stack,"",@progbits
diff --git a/test/locale-mbwc/tst_mbrtowc.c b/test/locale-mbwc/tst_mbrtowc.c
new file mode 100644
index 000000000..3a6070a87
--- /dev/null
+++ b/test/locale-mbwc/tst_mbrtowc.c
@@ -0,0 +1,103 @@
+/*
+ MBRTOWC: size_t mbrtowc (wchar_t *pwc, const char *s, size_t n,
+ mbstate_t *ps)
+*/
+
+#define TST_FUNCTION mbrtowc
+
+#include "tsp_common.c"
+#include "dat_mbrtowc.c"
+
+
+int
+tst_mbrtowc (FILE * fp, int debug_flg)
+{
+ TST_DECL_VARS (size_t);
+ char w_flg, s_flg;
+ char *s;
+ size_t n;
+ char t_flg, t_ini;
+ static mbstate_t t = { 0 };
+ mbstate_t *pt;
+ wchar_t wc, *pwc, wc_ex;
+
+ TST_DO_TEST (mbrtowc)
+ {
+ TST_HEAD_LOCALE (mbrtowc, S_MBRTOWC);
+ TST_DO_REC (mbrtowc)
+ {
+ if (mbrtowc (NULL, "", 0, &t) != 0)
+ {
+ err_count++;
+ Result (C_FAILURE, S_MBRTOWC, CASE_3,
+ "Initialization failed - skipping this test case.");
+ continue;
+ }
+
+ TST_DO_SEQ (MBRTOWC_SEQNUM)
+ {
+ TST_GET_ERRET_SEQ (mbrtowc);
+ w_flg = TST_INPUT_SEQ (mbrtowc).w_flg;
+ s_flg = TST_INPUT_SEQ (mbrtowc).s_flg;
+ s = TST_INPUT_SEQ (mbrtowc).s;
+ n = TST_INPUT_SEQ (mbrtowc).n;
+ t_flg = TST_INPUT_SEQ (mbrtowc).t_flg;
+ t_ini = TST_INPUT_SEQ (mbrtowc).t_init;
+ pwc = (w_flg == 0) ? NULL : &wc;
+
+ if (s_flg == 0)
+ {
+ s = NULL;
+ }
+
+ if (n == USE_MBCURMAX)
+ {
+ n = MB_CUR_MAX;
+ }
+
+ pt = (t_flg == 0) ? NULL : &t;
+#if 0
+ if (t_ini != 0)
+ {
+ memset (&t, 0, sizeof (t));
+ }
+#endif
+ TST_CLEAR_ERRNO;
+ ret = mbrtowc (pwc, s, n, pt);
+ TST_SAVE_ERRNO;
+
+ if (debug_flg)
+ {
+ fprintf (stdout, "mbrtowc() [ %s : %d : %d ] ret = %zd\n",
+ locale, rec + 1, seq_num + 1, ret);
+ fprintf (stdout, " errno = %hd\n",
+ errno_save);
+ }
+
+ TST_IF_RETURN (S_MBRTOWC)
+ {
+ };
+
+ if (pwc == NULL || s == NULL || ret == (size_t) - 1
+ || ret == (size_t) - 2)
+ {
+ continue;
+ }
+
+ wc_ex = TST_EXPECT_SEQ (mbrtowc).wc;
+ if (wc_ex == wc)
+ {
+ Result (C_SUCCESS, S_MBRTOWC, CASE_4, MS_PASSED);
+ }
+ else
+ {
+ err_count++;
+ Result (C_FAILURE, S_MBRTOWC, CASE_4,
+ "converted wc is different from an expected wc");
+ }
+ }
+ }
+ }
+
+ return err_count;
+}
diff --git a/test/locale-mbwc/tst_mbsrtowcs.c b/test/locale-mbwc/tst_mbsrtowcs.c
new file mode 100644
index 000000000..3f3ea716b
--- /dev/null
+++ b/test/locale-mbwc/tst_mbsrtowcs.c
@@ -0,0 +1,109 @@
+/*
+ MBSRTOWCS: size_t mbsrtowcs (wchar_t *ws, const char **s, size_t n,
+ mbstate_t *ps)
+*/
+
+#define TST_FUNCTION mbsrtowcs
+
+#include "tsp_common.c"
+#include "dat_mbsrtowcs.c"
+
+int
+tst_mbsrtowcs (FILE * fp, int debug_flg)
+{
+ TST_DECL_VARS (size_t);
+ char w_flg;
+ const char *s, *p;
+ size_t n;
+ char t_flg, t_ini;
+ static mbstate_t t = { 0 };
+ mbstate_t *pt;
+ wchar_t ws[WCSSIZE], *ws_ex, *wp;
+ int err, i;
+
+ TST_DO_TEST (mbsrtowcs)
+ {
+ TST_HEAD_LOCALE (mbsrtowcs, S_MBSRTOWCS);
+ TST_DO_REC (mbsrtowcs)
+ {
+ s = "";
+ if (mbsrtowcs (NULL, &s, 0, &t) != 0)
+ {
+ err_count++;
+ Result (C_FAILURE, S_MBSRTOWCS, CASE_3,
+ "Initialization failed - skipping this test case.");
+ continue;
+ }
+
+ TST_DO_SEQ (MBSRTOWCS_SEQNUM)
+ {
+ TST_GET_ERRET_SEQ (mbsrtowcs);
+ w_flg = TST_INPUT_SEQ (mbsrtowcs).w_flg;
+ p = s = TST_INPUT_SEQ (mbsrtowcs).s;
+ n = TST_INPUT_SEQ (mbsrtowcs).n;
+ t_flg = TST_INPUT_SEQ (mbsrtowcs).t_flg;
+ t_ini = TST_INPUT_SEQ (mbsrtowcs).t_init;
+ wp = (w_flg == 0) ? NULL : ws;
+
+ if (n == USE_MBCURMAX)
+ {
+ n = MB_CUR_MAX;
+ }
+
+ pt = (t_flg == 0) ? NULL : &t;
+
+ if (t_ini != 0)
+ {
+ memset (&t, 0, sizeof (t));
+ }
+
+ TST_CLEAR_ERRNO;
+ ret = mbsrtowcs (wp, &p, n, pt);
+ TST_SAVE_ERRNO;
+
+ if (debug_flg)
+ {
+ fprintf (stderr, "mbsrtowcs: [ %d ] : ret = %zd\n", rec + 1, ret);
+ }
+
+ TST_IF_RETURN (S_MBSRTOWCS)
+ {
+ };
+
+ if (wp == NULL || ret == (size_t) - 1 || ret == (size_t) - 2)
+ {
+ continue;
+ }
+
+ ws_ex = TST_EXPECT_SEQ (mbsrtowcs).ws;
+ for (err = 0, i = 0; i < ret; i++)
+ {
+ if (debug_flg)
+ {
+ fprintf (stderr,
+ "mbsrtowcs: ws[%d] => 0x%lx : 0x%lx <= ws_ex[%d]\n",
+ i, (unsigned long int) ws[i],
+ (unsigned long int) ws_ex[i], i);
+ }
+
+ if (ws[i] != ws_ex[i])
+ {
+ err++;
+ err_count++;
+ Result (C_FAILURE, S_MBSRTOWCS, CASE_4,
+ "the converted wc string has "
+ "different value from an expected string");
+ break;
+ }
+ }
+
+ if (!err)
+ {
+ Result (C_SUCCESS, S_MBSRTOWCS, CASE_4, MS_PASSED);
+ }
+ }
+ }
+ }
+
+ return err_count;
+}
diff --git a/test/locale-mbwc/tst_mbstowcs.c b/test/locale-mbwc/tst_mbstowcs.c
new file mode 100644
index 000000000..878df6a96
--- /dev/null
+++ b/test/locale-mbwc/tst_mbstowcs.c
@@ -0,0 +1,98 @@
+/*
+ MBSTOWCS: size_t mbstowcs (wchar_t *ws, char *s, size_t n)
+*/
+
+#define TST_FUNCTION mbstowcs
+
+#include "tsp_common.c"
+#include "dat_mbstowcs.c"
+
+int
+tst_mbstowcs (FILE * fp, int debug_flg)
+{
+ TST_DECL_VARS (size_t);
+ char w_flg, s_flg;
+ const char *s;
+ size_t n;
+ wchar_t ws[WCSSIZE], *ws_ex, *wp;
+ int err, i;
+
+ TST_DO_TEST (mbstowcs)
+ {
+ TST_HEAD_LOCALE (mbstowcs, S_MBSTOWCS);
+ TST_DO_REC (mbstowcs)
+ {
+ if (mbstowcs (NULL, "", 0) != 0)
+ {
+ err_count++;
+ Result (C_FAILURE, S_MBSTOWCS, CASE_3,
+ "Initialization failed - skipping this test case.");
+ continue;
+ }
+
+ TST_DO_SEQ (MBSTOWCS_SEQNUM)
+ {
+ TST_GET_ERRET_SEQ (mbstowcs);
+ w_flg = TST_INPUT_SEQ (mbstowcs).w_flg;
+ s_flg = TST_INPUT_SEQ (mbstowcs).s_flg;
+ n = TST_INPUT_SEQ (mbstowcs).n;
+
+ if (s_flg == 0)
+ s = NULL;
+ else
+ s = TST_INPUT_SEQ (mbstowcs).s;
+
+
+ wp = (wchar_t *) ((w_flg == 0) ? NULL : ws);
+
+ TST_CLEAR_ERRNO;
+ ret = mbstowcs (wp, s, n);
+ TST_SAVE_ERRNO;
+
+ if (debug_flg)
+ {
+ fprintf (stderr, "mbstowcs: ret = %zd\n", ret);
+ }
+
+ TST_IF_RETURN (S_MBSTOWCS)
+ {
+ };
+
+ if (s == NULL || wp == NULL || ret == (size_t) - 1)
+ {
+ continue;
+ }
+
+ ws_ex = TST_EXPECT_SEQ (mbstowcs).ws;
+
+ for (err = 0, i = 0; i < ret; i++)
+ {
+ if (debug_flg)
+ {
+ fprintf (stderr,
+ "mbstowcs: ws[%d] => 0x%lx : 0x%lx <= ws_ex[%d]\n",
+ i, (unsigned long int) ws[i],
+ (unsigned long int) ws_ex[i], i);
+ }
+
+ if (ws[i] != ws_ex[i])
+ {
+ err++;
+ err_count++;
+ Result (C_FAILURE, S_MBSTOWCS, CASE_4,
+ "the converted wc string has "
+ "different value from an expected string");
+ break;
+ }
+ }
+
+ if (!err)
+ {
+ Result (C_SUCCESS, S_MBSTOWCS, CASE_4, MS_PASSED);
+ }
+ }
+ }
+ }
+
+ return err_count;
+}
diff --git a/test/locale-mbwc/tst_mbtowc.c b/test/locale-mbwc/tst_mbtowc.c
new file mode 100644
index 000000000..7c274f66c
--- /dev/null
+++ b/test/locale-mbwc/tst_mbtowc.c
@@ -0,0 +1,130 @@
+/*
+ MBTOWC: int mbtowc (wchar_t *wc, char *s, size_t n)
+*/
+
+#define TST_FUNCTION mbtowc
+
+#include "tsp_common.c"
+#include "dat_mbtowc.c"
+
+
+int
+tst_mbtowc (FILE * fp, int debug_flg)
+{
+ TST_DECL_VARS (int);
+ char w_flg, s_flg;
+ const char *s_in;
+ size_t n;
+ wchar_t wc, wc_ex, *wp;
+
+ TST_DO_TEST (mbtowc)
+ {
+ TST_HEAD_LOCALE (mbtowc, S_MBTOWC);
+ TST_DO_REC (mbtowc)
+ {
+ if (mbstowcs (NULL, "", 0) != 0)
+ {
+ err_count++;
+ Result (C_FAILURE, S_MBSTOWCS, CASE_3,
+ "Initialization failed - skipping this test case.");
+ continue;
+ }
+
+ TST_DO_SEQ (MBTOWC_SEQNUM)
+ {
+ TST_GET_ERRET_SEQ (mbtowc);
+ w_flg = TST_INPUT_SEQ (mbtowc).w_flg;
+ s_flg = TST_INPUT_SEQ (mbtowc).s_flg;
+ n = TST_INPUT_SEQ (mbtowc).n;
+
+ if (n == USE_MBCURMAX)
+ {
+ n = MB_CUR_MAX;
+ }
+
+ if (s_flg == 0)
+ s_in = NULL;
+ else
+ s_in = TST_INPUT_SEQ (mbtowc).s;
+
+ wp = (wchar_t *) ((w_flg == 0) ? NULL : &wc);
+
+ /* XXX Clear the internal state. We should probably have
+ a flag for this. */
+ mbtowc (NULL, NULL, 0);
+
+ TST_CLEAR_ERRNO;
+ ret = mbtowc (wp, s_in, n);
+ TST_SAVE_ERRNO;
+
+ if (debug_flg)
+ {
+ fprintf (stdout, "mbtowc() [ %s : %d ] ret = %d\n", locale,
+ rec + 1, ret);
+ fprintf (stdout, " errno = %d\n",
+ errno_save);
+ }
+
+ TST_IF_RETURN (S_MBTOWC)
+ {
+ if (s_in == NULL)
+ { /* state dependency */
+ if (ret_exp == +1)
+ { /* state-dependent */
+ if (ret != 0)
+ {
+ /* Non-zero: state-dependent encoding. */
+ Result (C_SUCCESS, S_MBTOWC, CASE_3, MS_PASSED);
+ }
+ else
+ {
+ err_count++;
+ Result (C_FAILURE, S_MBTOWC, CASE_3,
+ "should be state-dependent encoding, "
+ "but a return value shows it is "
+ "state-independent");
+ }
+ }
+
+ if (ret_exp == 0)
+ { /* state-independent */
+ if (ret == 0)
+ {
+ /* Non-zero: state-dependent encoding. */
+ Result (C_SUCCESS, S_MBTOWC, CASE_3, MS_PASSED);
+ }
+ else
+ {
+ err_count++;
+ Result (C_FAILURE, S_MBTOWC, CASE_3,
+ "should be state-independent encoding, "
+ "but a return value shows it is "
+ "state-dependent");
+ }
+ }
+ }
+ }
+
+ if ((wp == NULL || s_in == NULL || s_in[0] == 0) || ret <= 0)
+ {
+ continue;
+ }
+
+ wc_ex = TST_EXPECT_SEQ (mbtowc).wc;
+
+ if (wc_ex == wc)
+ {
+ Result (C_SUCCESS, S_MBTOWC, CASE_4, MS_PASSED);
+ }
+ else
+ {
+ err_count++;
+ Result (C_FAILURE, S_MBTOWC, CASE_4,
+ "converted wc is different from an expected wc");
+ }
+ }
+ }
+ }
+
+ return err_count;
+}
diff --git a/test/locale-mbwc/tst_strcoll.c b/test/locale-mbwc/tst_strcoll.c
new file mode 100644
index 000000000..4c5a84f69
--- /dev/null
+++ b/test/locale-mbwc/tst_strcoll.c
@@ -0,0 +1,87 @@
+/*
+ STRCOLL: int strcoll (const char *s1, const char *s2)
+*/
+
+#define TST_FUNCTION strcoll
+
+#include "tsp_common.c"
+#include "dat_strcoll.c"
+
+int
+tst_strcoll (FILE * fp, int debug_flg)
+{
+ TST_DECL_VARS (int);
+ const char *s1, *s2;
+
+ TST_DO_TEST (strcoll)
+ {
+ TST_HEAD_LOCALE (strcoll, S_STRCOLL);
+ TST_DO_REC (strcoll)
+ {
+ TST_GET_ERRET (strcoll);
+ s1 = TST_INPUT (strcoll).s1;
+ s2 = TST_INPUT (strcoll).s2;
+
+ TST_CLEAR_ERRNO;
+ ret = strcoll (s1, s2);
+ TST_SAVE_ERRNO;
+
+ if (debug_flg)
+ {
+ fprintf (stdout, "strcoll() [ %s : %d ] ret = %d\n", locale,
+ rec + 1, ret);
+ fprintf (stdout, " errno = %d\n",
+ errno_save);
+ fprintf (stdout, " LC_COLLATE = %s\n",
+ (setlocale (LC_COLLATE, NULL)) ? setlocale (LC_COLLATE,
+ NULL) : "");
+ }
+
+ TST_IF_RETURN (S_STRCOLL)
+ {
+ if (ret_exp == +1)
+ {
+ if (ret > 0)
+ {
+ Result (C_SUCCESS, S_STRCOLL, CASE_3, MS_PASSED);
+ }
+ else
+ {
+ err_count++;
+ Result (C_FAILURE, S_STRCOLL, CASE_3,
+ "the return value should be greater than 0,"
+ " but is not ...");
+ }
+ }
+ else if (ret_exp == -1)
+ {
+ if (ret < 0)
+ {
+ Result (C_SUCCESS, S_STRCOLL, CASE_3, MS_PASSED);
+ }
+ else
+ {
+ err_count++;
+ Result (C_FAILURE, S_STRCOLL, CASE_3,
+ "the return value should less than 0, but not ...");
+ }
+ }
+ else if (ret_exp != 0)
+ {
+ if (debug_flg)
+ {
+ fprintf (stderr, "*** Warning *** : tst_strcoll : "
+ "(check the test data); should set ret_flg=1"
+ " to check a return value");
+ }
+
+ warn_count++;
+ Result (C_INVALID, S_WCSCHR, CASE_3, "(check the test data); "
+ "should set ret_flg=1 to check a return value");
+ }
+ }
+ }
+ }
+
+ return err_count;
+}
diff --git a/test/locale-mbwc/tst_strfmon.c b/test/locale-mbwc/tst_strfmon.c
new file mode 100644
index 000000000..88e93167d
--- /dev/null
+++ b/test/locale-mbwc/tst_strfmon.c
@@ -0,0 +1,74 @@
+/*
+ STRFMON: size_t strfmon (char *buf, size_t nbyte, const char *fmt, ...)
+*/
+
+#define TST_FUNCTION strfmon
+
+#include "tsp_common.c"
+#include "dat_strfmon.c"
+#include <monetary.h>
+
+int
+tst_strfmon (FILE * fp, int debug_flg)
+{
+ TST_DECL_VARS (size_t);
+ char buf[MONSIZE], *mon;
+ size_t nbt;
+ char *fmt;
+ double val;
+
+ TST_DO_TEST (strfmon)
+ {
+ TST_HEAD_LOCALE (strfmon, S_STRFMON);
+ TST_DO_REC (strfmon)
+ {
+ TST_GET_ERRET (strfmon);
+ nbt = TST_INPUT (strfmon).nbytes;
+ fmt = TST_INPUT (strfmon).fmt;
+ val = TST_INPUT (strfmon).val;
+ memset (buf, 0, MONSIZE);
+ if (nbt > MONSIZE)
+ {
+ err_count++;
+ Result (C_FAILURE, S_STRFMON, CASE_3, "buffer too small in test");
+ continue;
+ }
+
+ TST_CLEAR_ERRNO;
+ ret = strfmon (buf, nbt, fmt, val, val, val);
+ TST_SAVE_ERRNO;
+
+ if (debug_flg) /* seems fprintf doesn't update the errno */
+ {
+ fprintf (stdout, "strfmon() [ %s : %d ]\n", locale, rec + 1);
+ fprintf (stdout, " : err = %d | %s\n", errno_save,
+ strerror (errno));
+ fprintf (stdout, " : ret = %zd; \t fmt = |%s|\n", ret, fmt);
+ fprintf (stdout, " : buf = |%s|\n\n", buf);
+ }
+
+ TST_IF_RETURN (S_STRFMON)
+ {
+ };
+ if (errno != 0 || ret == -1)
+ {
+ continue;
+ }
+
+ mon = TST_EXPECT (strfmon).mon;
+
+ if (!strcmp (buf, mon))
+ {
+ Result (C_SUCCESS, S_STRFMON, CASE_3, MS_PASSED);
+ }
+ else
+ {
+ err_count++;
+ Result (C_FAILURE, S_STRFMON, CASE_3, "the formatted string is "
+ "different from an expected result");
+ }
+ }
+ }
+
+ return err_count;
+}
diff --git a/test/locale-mbwc/tst_strxfrm.c b/test/locale-mbwc/tst_strxfrm.c
new file mode 100644
index 000000000..fdfeffc89
--- /dev/null
+++ b/test/locale-mbwc/tst_strxfrm.c
@@ -0,0 +1,136 @@
+/*
+ STRXFRM: size_t strxfrm (char *s1, const char *s2, size_t n)
+*/
+
+#define TST_FUNCTION strxfrm
+
+#include "tsp_common.c"
+#include "dat_strxfrm.c"
+
+
+int
+tst_strxfrm (FILE * fp, int debug_flg)
+{
+ TST_DECL_VARS (size_t);
+ const char *org1, *org2;
+ char frm1[MBSSIZE], frm2[MBSSIZE];
+ size_t n1, n2;
+ int ret_coll, ret_cmp;
+
+ TST_DO_TEST (strxfrm)
+ {
+ TST_HEAD_LOCALE (strxfrm, S_STRXFRM);
+ TST_DO_REC (strxfrm)
+ {
+ TST_GET_ERRET (strxfrm);
+ org1 = TST_INPUT (strxfrm).org1;
+ org2 = TST_INPUT (strxfrm).org2;
+ n1 = TST_INPUT (strxfrm).n1;
+ n2 = TST_INPUT (strxfrm).n2;
+
+ if (n1 < 0 || sizeof (frm1) < n1 || sizeof (frm2) < n2)
+ {
+ warn_count++;
+ Result (C_IGNORED, S_STRXFRM, CASE_9,
+ "input data n1 or n2 is invalid");
+ continue;
+ }
+
+ /* An errno and a return value are checked
+ only for 2nd strxfrm() call.
+ A result of 1st call is used for comparing
+ those 2 values by using strcmp().
+ */
+
+ /*-- First call --*/
+
+ TST_CLEAR_ERRNO;
+ ret = strxfrm (frm1, org1, n1);
+ TST_SAVE_ERRNO;
+
+ if (debug_flg)
+ {
+ fprintf (stdout, "strxfrm() [ %s : %d ] ( 1st call )\n", locale,
+ rec + 1);
+ fprintf (stdout, " : err = %d | %s\n", errno_save,
+ strerror (errno));
+ fprintf (stdout, " : ret = %zu\n", ret);
+ fprintf (stdout, " : org = %s\n", org1);
+ }
+
+ if (ret >= n1 || errno != 0)
+ {
+ warn_count++;
+ Result (C_INVALID, S_STRXFRM, CASE_8,
+ "got an error in fist strxfrm() call");
+ continue;
+ }
+
+ /*-- Second call --*/
+
+ TST_CLEAR_ERRNO;
+ ret = strxfrm (((n2 == 0) ? NULL : frm2), org2, n2);
+ TST_SAVE_ERRNO;
+
+ if (debug_flg)
+ {
+ fprintf (stderr, " ..............( 2nd call )\n");
+ fprintf (stdout, " : err = %d | %s\n", errno,
+ strerror (errno));
+ fprintf (stdout, " : ret = %zu\n", ret);
+ fprintf (stdout, " : org = %s\n", org2);
+ }
+
+ TST_IF_RETURN (S_STRXFRM)
+ {
+ };
+
+ if (n2 == 0 || ret >= n2 || errno != 0)
+ {
+#if 0
+ warn_count++;
+ Result (C_IGNORED, S_STRXFRM, CASE_7, "did not get a result");
+#endif
+ continue;
+ }
+
+ /*-- strcoll & strcmp --*/
+
+ TST_CLEAR_ERRNO;
+ /* Depends on strcoll() ... not good though ... */
+ ret_coll = strcoll (org1, org2);
+
+ if (errno != 0)
+ {
+ /* bug * bug may get correct results ... */
+ warn_count++;
+ Result (C_INVALID, S_STRXFRM, CASE_6,
+ "got an error in strcoll() call");
+ continue;
+ }
+
+ ret_cmp = strcmp (frm1, frm2);
+
+ if ((ret_coll == 0 && ret_cmp == 0)
+ || (ret_coll < 0 && ret_cmp < 0) || (ret_coll > 0 && ret_cmp > 0))
+ {
+ Result (C_SUCCESS, S_STRXFRM, CASE_3,
+ MS_PASSED "(depends on strcoll & strcmp)");
+ }
+ else
+ {
+ err_count++;
+ Result (C_FAILURE, S_STRXFRM, CASE_3,
+ "results from strcoll & strcmp() do not match");
+ }
+
+ if (debug_flg)
+ {
+ fprintf (stdout, ".......... strcoll = %d <-> %d = strcmp\n",
+ ret_coll, ret_cmp);
+ }
+ }
+ }
+
+ return err_count;
+}
diff --git a/test/locale-mbwc/tst_swscanf.c b/test/locale-mbwc/tst_swscanf.c
new file mode 100644
index 000000000..76445d75f
--- /dev/null
+++ b/test/locale-mbwc/tst_swscanf.c
@@ -0,0 +1,137 @@
+/*
+ SWSCANF: int swscanf (const wchar_t *ws, const wchar_t *fmt, ...);
+*/
+
+#define TST_FUNCTION swscanf
+
+#include "tsp_common.c"
+#include "dat_swscanf.c"
+
+int
+tst_swscanf (FILE * fp, int debug_flg)
+{
+ TST_DECL_VARS (int);
+ wchar_t *ws;
+ wchar_t *fmt;
+ int val_int1;
+ unsigned val_int2;
+ float val_flt;
+ char val_c;
+ char val_s[MBSSIZE * 3];
+ wchar_t val_S[WCSSIZE * 3], *exp_S;
+ int i;
+
+ TST_DO_TEST (swscanf)
+ {
+ TST_HEAD_LOCALE (swscanf, S_SWSCANF);
+ TST_DO_REC (swscanf)
+ {
+ TST_GET_ERRET (swscanf);
+ ws = TST_INPUT (swscanf).ws;
+ fmt = TST_INPUT (swscanf).fmt;
+ val_int1 = val_int2 = val_flt = val_c = 0;
+ memset (val_s, 0, sizeof (val_s));
+ memset (val_S, 0, sizeof (val_S));
+
+ TST_CLEAR_ERRNO;
+
+ if (TST_INPUT (swscanf).wch)
+ {
+ ret = swscanf (ws, fmt, val_S);
+ }
+ else
+ {
+ ret =
+ swscanf (ws, fmt, &val_int1, &val_int2, &val_flt, &val_c, val_s);
+ }
+
+ TST_SAVE_ERRNO;
+
+ if (debug_flg)
+ { /* seems fprintf doesn't update errno */
+ fprintf (stdout, "swscanf() [ %s : %d ] ret = %d\n", locale,
+ rec + 1, ret);
+ fprintf (stdout, " errno = %d\n",
+ errno_save);
+ fprintf (stdout, " collate = %s\n",
+ (setlocale (LC_COLLATE, NULL)) ? setlocale (LC_COLLATE,
+ NULL) : "");
+
+ if (TST_INPUT (swscanf).wch)
+ {
+ fprintf (stdout, " val_S[ 0 ] = 0x%lx\n",
+ (unsigned long int) val_S[0]);
+ }
+ else
+ {
+ fprintf (stdout, " val_int1 = %d\n",
+ val_int1);
+ fprintf (stdout, " val_int2 = %d\n",
+ val_int2);
+ fprintf (stdout, " val_flt = %f\n",
+ val_flt);
+ fprintf (stdout, " val_c = %c\n",
+ val_c);
+ fprintf (stdout, " val_s = %s\n",
+ val_s);
+ }
+ }
+
+ TST_IF_RETURN (S_SWSCANF)
+ {
+ };
+
+ if (errno == 0 && TST_INPUT (swscanf).wch)
+ {
+ for (exp_S = TST_EXPECT (swscanf).val_S, i = 0; i < WCSSIZE * 3;
+ i++)
+ {
+ if (val_S[i] == L'\0' || exp_S[i] == L'\0')
+ {
+ if (val_S[i] != exp_S[i] && TST_INPUT (swscanf).wch == 'C')
+ {
+ err_count++;
+ Result (C_FAILURE, S_SWSCANF, CASE_4,
+ "the converted wide-char string is different"
+ " from an expected value.");
+ }
+ break;
+ }
+
+ if (val_S[i] != exp_S[i])
+ {
+ err_count++;
+ Result (C_FAILURE, S_SWSCANF, CASE_4,
+ "the converted wide-char string is different from"
+ " an expected value.");
+ break;
+ }
+ else
+ {
+ Result (C_SUCCESS, S_SWSCANF, CASE_4, MS_PASSED);
+ }
+ }
+ }
+
+ if (errno == 0 && !TST_INPUT (swscanf).wch)
+ {
+ if (val_int1 != TST_EXPECT (swscanf).val_int ||
+ val_int2 != TST_EXPECT (swscanf).val_uns ||
+ val_flt != TST_EXPECT (swscanf).val_flt ||
+ val_c != TST_EXPECT (swscanf).val_c ||
+ strcmp (val_s, TST_EXPECT (swscanf).val_s))
+ {
+ err_count++;
+ Result (C_FAILURE, S_SWSCANF, CASE_3,
+ "the converted values are different from expected values.");
+ }
+ else
+ {
+ Result (C_SUCCESS, S_SWSCANF, CASE_3, MS_PASSED);
+ }
+ }
+ }
+ }
+
+ return err_count;
+}
diff --git a/test/locale-mbwc/tst_towctrans.c b/test/locale-mbwc/tst_towctrans.c
new file mode 100644
index 000000000..1d874dc0f
--- /dev/null
+++ b/test/locale-mbwc/tst_towctrans.c
@@ -0,0 +1,82 @@
+/*
+ TOWCTRANS: wint_t towctrans (wint_t wc, wctrans_t desc);
+*/
+
+#define TST_FUNCTION towctrans
+
+#include "tsp_common.c"
+#include "dat_towctrans.c"
+
+
+int
+tst_towctrans (FILE *fp, int debug_flg)
+{
+ TST_DECL_VARS (wint_t);
+ wint_t wc;
+ const char *ts;
+#if SHOJI_IS_RIGHT
+ int dummy=0;
+#endif
+ wctrans_t wto;
+
+ TST_DO_TEST (towctrans)
+ {
+ TST_HEAD_LOCALE (towctrans, S_TOWCTRANS);
+ TST_DO_REC (towctrans)
+ {
+ TST_GET_ERRET (towctrans);
+ wc = TST_INPUT (towctrans).wc;
+ ts = TST_INPUT (towctrans).ts;
+
+#if SHOJI_IS_RIGHT
+ if ((wto = wctrans (ts)) == (wctrans_t) 0)
+ {
+#if 0
+ result (fp, C_IGNORED, S_TOWCTRANS, locale, rec+1, seq_num+1, 3,
+ "Skip this data because the wctrans object is not invalid.");
+ warn_count++;
+ continue;
+#else
+ wto = &dummy; /* not good ... */
+#endif
+ if (debug_flg)
+ {
+ fprintf (stdout, "towctrans() ------ wctrans() returnd 0.\n");
+ }
+ }
+#else
+ wto = wctrans (ts);
+#endif
+
+ TST_CLEAR_ERRNO;
+ ret = towctrans (wc, wto);
+ TST_SAVE_ERRNO;
+
+ if (debug_flg)
+ {
+ fprintf (stdout, "towctrans() [ %s : %d ] ret = 0x%x\n",
+ locale, rec+1, ret);
+ fprintf (stdout, " errno = %d\n",
+ errno_save);
+ }
+
+ TST_IF_RETURN (S_TOWCTRANS)
+ {
+ if (ret != 0)
+ {
+ result (fp, C_SUCCESS, S_TOWCTRANS, locale, rec+1,
+ seq_num+1, 3, MS_PASSED);
+ }
+ else
+ {
+ err_count++;
+ result (fp, C_FAILURE, S_TOWCTRANS, locale, rec+1,
+ seq_num+1, 3,
+ "the function returned 0, but should be non-zero");
+ }
+ }
+ }
+ }
+
+ return err_count;
+}
diff --git a/test/locale-mbwc/tst_towlower.c b/test/locale-mbwc/tst_towlower.c
new file mode 100644
index 000000000..7719b0dae
--- /dev/null
+++ b/test/locale-mbwc/tst_towlower.c
@@ -0,0 +1,11 @@
+/*
+ TOWLOWER: int towlower (wint_t wc);
+*/
+
+#define TST_FUNCTION towlower
+
+#include "tsp_common.c"
+#include "dat_towlower.c"
+
+
+TST_FUNC_TOW (LOWER, lower);
diff --git a/test/locale-mbwc/tst_towupper.c b/test/locale-mbwc/tst_towupper.c
new file mode 100644
index 000000000..a077d27d9
--- /dev/null
+++ b/test/locale-mbwc/tst_towupper.c
@@ -0,0 +1,10 @@
+/*
+ TOWUPPER: int towupper (wint_t wc);
+*/
+
+#define TST_FUNCTION towupper
+
+#include "tsp_common.c"
+#include "dat_towupper.c"
+
+TST_FUNC_TOW (UPPER, upper);
diff --git a/test/locale-mbwc/tst_types.h b/test/locale-mbwc/tst_types.h
new file mode 100644
index 000000000..3d1827941
--- /dev/null
+++ b/test/locale-mbwc/tst_types.h
@@ -0,0 +1,729 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: tst_types.h
+ *
+ * Definitions of data types for each test function
+ */
+
+
+#ifndef TST_TYPES_H
+#define TST_TYPES_H
+
+#include <stdio.h>
+#include <wchar.h>
+#include <wctype.h>
+#include "tst_funcs.h"
+#include "tgn_funcdef.h"
+
+#define MBSSIZE 24
+#define WCSSIZE 12
+#define MONFMTSIZE 16
+#define MONSIZE 64
+#define USE_MBCURMAX 99 /* well, but ... */
+#define TST_DBL_EPS 2.22153e-16
+#define WCSTOK_SEQNUM 3
+#define MBLEN_SEQNUM 3
+#define MBTOWC_SEQNUM 3
+#define MBSTOWCS_SEQNUM 3
+#define WCTOMB_SEQNUM 3
+#define WCSTOMBS_SEQNUM 3
+#define MBRLEN_SEQNUM 3
+#define MBRTOWC_SEQNUM 3
+#define MBSRTOWCS_SEQNUM 3
+#define WCRTOMB_SEQNUM 3
+#define WCSRTOMBS_SEQNUM 3
+
+/* Maximum numbers of test in one of the _loc arrays. */
+#define MAX_LOC_TEST 300
+
+
+/*----------------------------------------------------------------------*/
+/* FUNCTION */
+/*----------------------------------------------------------------------*/
+
+typedef struct
+{
+ char *func_str;
+ int func_id;
+}
+TST_FID;
+
+typedef struct
+{
+ int func_id;
+ const char *locale;
+}
+TST_HEAD;
+
+typedef struct
+{
+ TST_HEAD *head;
+}
+TST_FUNCS;
+
+
+/*----------------------------------------------------------------------*/
+/* ISW*: int isw* (wchar_t wc) */
+/*----------------------------------------------------------------------*/
+
+TST_ISW_STRUCT (ALNUM, alnum);
+TST_ISW_STRUCT (ALPHA, alpha);
+TST_ISW_STRUCT (CNTRL, cntrl);
+TST_ISW_STRUCT (DIGIT, digit);
+TST_ISW_STRUCT (GRAPH, graph);
+TST_ISW_STRUCT (LOWER, lower);
+TST_ISW_STRUCT (PRINT, print);
+TST_ISW_STRUCT (PUNCT, punct);
+TST_ISW_STRUCT (SPACE, space);
+TST_ISW_STRUCT (UPPER, upper);
+TST_ISW_STRUCT (XDIGIT, xdigit);
+
+typedef struct
+{
+ wint_t wc;
+ const char *ts;
+}
+TIN_ISWCTYPE_REC;
+
+typedef
+TEX_ERRET_REC (int)
+ TEX_ISWCTYPE_REC;
+TMD_RECHEAD (ISWCTYPE);
+
+
+/*----------------------------------------------------------------------*/
+/* MBLEN: int mblen (const char *s, size_t n) */
+/*----------------------------------------------------------------------*/
+
+typedef struct
+{
+ char s_flg;
+ char s[MBSSIZE];
+ size_t n;
+}
+TIN_MBLEN_REC;
+
+typedef TEX_ERRET_REC (int) TEX_MBLEN_REC;
+TMD_RECHEAD (MBLEN);
+
+
+/*----------------------------------------------------------------------*/
+/* MBRLEN: size_t mbrlen (const char *s, size_t n, mbstate_t *ps) */
+/*----------------------------------------------------------------------*/
+
+typedef struct
+{
+ struct
+ {
+ int s_flg;
+ char s[MBSSIZE];
+ size_t n;
+ int t_flg;
+ int t_init;
+ }
+ seq[WCSTOK_SEQNUM];
+}
+TIN_MBRLEN_REC;
+
+typedef TEX_ERRET_REC_SEQ (size_t, MBRLEN_SEQNUM) TEX_MBRLEN_REC;
+TMD_RECHEAD (MBRLEN);
+
+
+/*----------------------------------------------------------------------*/
+/* MBRTOWC: size_t mbrtowc (wchar_t *pwc, const char *s, size_t n, */
+/* mbstate_t *ps) */
+/*----------------------------------------------------------------------*/
+
+typedef struct
+{
+ struct
+ {
+ int w_flg;
+ int s_flg;
+ char s[MBSSIZE];
+ size_t n;
+ int t_flg;
+ int t_init;
+ }
+ seq[MBRTOWC_SEQNUM];
+}
+TIN_MBRTOWC_REC;
+
+typedef struct
+{
+ struct
+ {
+ TMD_ERRET (size_t);
+ wchar_t wc;
+ }
+ seq[MBRTOWC_SEQNUM];
+}
+TEX_MBRTOWC_REC;
+
+TMD_RECHEAD (MBRTOWC);
+
+
+/*----------------------------------------------------------------------*/
+/* MBSRTOWCS: size_t mbsrtowcs (wchar_t *ws, const char **s, size_t n, */
+/* mbstate_t *ps ) */
+/*----------------------------------------------------------------------*/
+
+typedef struct
+{
+ struct
+ {
+ int w_flg;
+ char s[MBSSIZE];
+ size_t n;
+ int t_flg;
+ int t_init;
+ }
+ seq[MBSRTOWCS_SEQNUM];
+}
+TIN_MBSRTOWCS_REC;
+
+typedef struct
+{
+ struct
+ {
+ TMD_ERRET (size_t);
+ wchar_t ws[WCSSIZE];
+ }
+ seq[MBSRTOWCS_SEQNUM];
+}
+TEX_MBSRTOWCS_REC;
+
+TMD_RECHEAD (MBSRTOWCS);
+
+
+/*----------------------------------------------------------------------*/
+/* MBSTOWCS: size_t mbstowcs (wchar_t *ws, const char *s, size_t n) */
+/*----------------------------------------------------------------------*/
+
+typedef struct
+{
+ struct
+ {
+ int w_flg;
+ int s_flg;
+ const char *s;
+ size_t n;
+ }
+ seq[MBSTOWCS_SEQNUM];
+}
+TIN_MBSTOWCS_REC;
+
+typedef TEX_MBSRTOWCS_REC TEX_MBSTOWCS_REC;
+/* MBSRTOWCS_SEQNUM == MBSTOWCS_SEQNUM */
+TMD_RECHEAD (MBSTOWCS);
+
+
+/*----------------------------------------------------------------------*/
+/* MBTOWC: int mbtowc (wchar_t *wc, const char *s, size_t n) */
+/*----------------------------------------------------------------------*/
+
+typedef TIN_MBSTOWCS_REC TIN_MBTOWC_REC;
+/* MBTOWC_SEQNUM == MBSTOWCS_SEQNUM */
+
+typedef struct
+{
+ struct
+ {
+ TMD_ERRET (int);
+ wchar_t wc;
+ }
+ seq[MBTOWC_SEQNUM];
+}
+TEX_MBTOWC_REC;
+
+TMD_RECHEAD (MBTOWC);
+
+
+/*----------------------------------------------------------------------*/
+/* STRCOLL: int strcoll (const char *s1, const char *s2) */
+/*----------------------------------------------------------------------*/
+
+typedef struct
+{
+ char s1[MBSSIZE];
+ char s2[MBSSIZE];
+}
+TIN_STRCOLL_REC;
+
+typedef TEX_ERRET_REC (int) TEX_STRCOLL_REC;
+TMD_RECHEAD (STRCOLL);
+
+
+/*----------------------------------------------------------------------*/
+/* STRFMON: size_t strfmon (char *buf, size_t nbytes, */
+/* const char *fmt, ... ) */
+/*----------------------------------------------------------------------*/
+
+typedef struct
+{
+ int nbytes;
+ char fmt[MONFMTSIZE];
+ double val;
+}
+TIN_STRFMON_REC;
+
+typedef struct
+{
+ TMD_ERRET (size_t);
+ char mon[MONSIZE];
+}
+TEX_STRFMON_REC;
+
+TMD_RECHEAD (STRFMON);
+
+
+/*----------------------------------------------------------------------*/
+/* STRXFRM: size_t strxfrm (char *s1, const char *s2, size_t n) */
+/*----------------------------------------------------------------------*/
+
+typedef struct
+{
+ char org1[MBSSIZE];
+ char org2[MBSSIZE];
+ size_t n1, n2;
+}
+TIN_STRXFRM_REC;
+
+typedef TEX_ERRET_REC (size_t) TEX_STRXFRM_REC; /* only for org2[] */
+TMD_RECHEAD (STRXFRM);
+
+
+/*----------------------------------------------------------------------*/
+/* SWSCANF: int swscanf (const wchar_t *ws, const wchar_t *fmt, ...) */
+/*----------------------------------------------------------------------*/
+
+typedef struct
+{
+ wchar_t ws[WCSSIZE * 3];
+ wchar_t fmt[WCSSIZE * 3];
+ int wch;
+}
+TIN_SWSCANF_REC;
+
+typedef struct
+{
+ TMD_ERRET (int);
+ int val_int; /* %d */
+ unsigned val_uns; /* %u */
+ float val_flt; /* %f */
+ int val_c; /* %c */
+ char val_s[MBSSIZE * 2]; /* %s */
+ wchar_t val_S[WCSSIZE * 2]; /* %lc, %ls, %C, %S */
+}
+TEX_SWSCANF_REC;
+
+TMD_RECHEAD (SWSCANF);
+
+
+/*----------------------------------------------------------------------*/
+/* TOWCTRANS: wint_t towctrans (wint_t wc, wctrans_t desc) */
+/*----------------------------------------------------------------------*/
+
+typedef TIN_ISWCTYPE_REC TIN_TOWCTRANS_REC;
+typedef TEX_ERRET_REC (wint_t) TEX_TOWCTRANS_REC;
+TMD_RECHEAD (TOWCTRANS);
+
+
+/*----------------------------------------------------------------------*/
+/* TOW*ER: wint_t tow*er (wint_t wc) */
+/*----------------------------------------------------------------------*/
+
+TST_TOW_STRUCT (LOWER, lower);
+TST_TOW_STRUCT (UPPER, upper);
+
+
+/*----------------------------------------------------------------------*/
+/* WCRTOMB: wchar_t wcrtomb (char *s, wchar_t wc, mbstate_t *ps) */
+/*----------------------------------------------------------------------*/
+
+typedef struct
+{
+ int s_flg;
+ wchar_t wc;
+ int t_flg;
+ int t_init;
+}
+TIN_WCRTOMB_REC;
+
+typedef struct
+{
+ TMD_ERRET (wchar_t);
+ char s[MBSSIZE];
+}
+TEX_WCRTOMB_REC;
+
+TMD_RECHEAD (WCRTOMB);
+
+
+/*----------------------------------------------------------------------*/
+/* WCSCAT: wchar_t *wcscat (wchar_t *ws1, wchar_t *ws2) */
+/*----------------------------------------------------------------------*/
+
+typedef struct
+{
+ wchar_t ws1[WCSSIZE];
+ wchar_t ws2[WCSSIZE];
+}
+TIN_WCSCAT_REC;
+
+typedef struct
+{
+ TMD_ERRET (wchar_t *);
+ wchar_t ws[WCSSIZE];
+}
+TEX_WCSCAT_REC;
+
+TMD_RECHEAD (WCSCAT);
+
+
+/*----------------------------------------------------------------------*/
+/* WCSCHR: wchar_t *wcschr (wchar_t *ws, wchar_t wc); */
+/*----------------------------------------------------------------------*/
+
+typedef struct
+{
+ wchar_t ws[WCSSIZE];
+ wchar_t wc;
+}
+TIN_WCSCHR_REC;
+
+typedef TEX_ERRET_REC (wchar_t *) TEX_WCSCHR_REC;
+TMD_RECHEAD (WCSCHR);
+
+
+/*----------------------------------------------------------------------*/
+/* WCSCMP: int wcscmp (const wchar_t *ws1, const wchar_t *ws2) */
+/*----------------------------------------------------------------------*/
+
+typedef TIN_WCSCAT_REC TIN_WCSCMP_REC;
+typedef TEX_ERRET_REC (int) TEX_WCSCMP_REC;
+TMD_RECHEAD (WCSCMP);
+
+
+/*----------------------------------------------------------------------*/
+/* WCSCOLL: int wcscoll (const wchar_t *ws1, const wchar_t *ws2) */
+/*----------------------------------------------------------------------*/
+
+typedef TIN_WCSCMP_REC TIN_WCSCOLL_REC;
+typedef struct
+{
+ TMD_ERRET (int);
+ int cmp_flg;
+}
+TEX_WCSCOLL_REC;
+TMD_RECHEAD (WCSCOLL);
+
+
+/*----------------------------------------------------------------------*/
+/* WCSCPY: wchar_t *wcscpy (wchar_t *ws1, const wchar_t *ws2) */
+/*----------------------------------------------------------------------*/
+
+typedef struct
+{
+ wchar_t ws[WCSSIZE]; /* ws2: original string */
+}
+TIN_WCSCPY_REC;
+
+typedef TEX_WCSCAT_REC TEX_WCSCPY_REC;
+TMD_RECHEAD (WCSCPY);
+
+
+/*----------------------------------------------------------------------*/
+/* WCSCSPN: size_t wcscspn (const wchar_t *ws1, const wchar_t *ws2) */
+/*----------------------------------------------------------------------*/
+
+typedef TIN_WCSCAT_REC TIN_WCSCSPN_REC;
+typedef TEX_ERRET_REC (size_t) TEX_WCSCSPN_REC;
+TMD_RECHEAD (WCSCSPN);
+
+
+/*----------------------------------------------------------------------*/
+/* WCSLEN: size_t wcslen (const wchar_t *ws) */
+/*----------------------------------------------------------------------*/
+
+typedef TIN_WCSCPY_REC TIN_WCSLEN_REC;
+typedef TEX_ERRET_REC (size_t) TEX_WCSLEN_REC;
+TMD_RECHEAD (WCSLEN);
+
+
+/*----------------------------------------------------------------------*/
+/* WCSNCAT: wchar_t *wcsncat (wchar_t *ws1, const wchar_t *ws2, */
+/* size_t n) */
+/*----------------------------------------------------------------------*/
+
+typedef struct
+{
+ wchar_t ws1[WCSSIZE];
+ wchar_t ws2[WCSSIZE];
+ size_t n;
+}
+TIN_WCSNCAT_REC;
+
+typedef TEX_WCSCAT_REC TEX_WCSNCAT_REC;
+TMD_RECHEAD (WCSNCAT);
+
+
+/*----------------------------------------------------------------------*/
+/* WCSNCMP: int *wcsncmp (const wchar_t *ws1, const wchar_t *ws2, */
+/* size_t n) */
+/*----------------------------------------------------------------------*/
+
+typedef TIN_WCSNCAT_REC TIN_WCSNCMP_REC;
+typedef TEX_ERRET_REC (int) TEX_WCSNCMP_REC;
+TMD_RECHEAD (WCSNCMP);
+
+
+/*----------------------------------------------------------------------*/
+/* WCSNCPY: wchar_t *wcsncpy (wchar_t *ws1, const wchar_t *ws2, */
+/* size_t n) */
+/*----------------------------------------------------------------------*/
+
+typedef struct
+{
+ wchar_t ws[WCSSIZE]; /* ws2: original string */
+ size_t n;
+}
+TIN_WCSNCPY_REC;
+
+typedef TEX_WCSCPY_REC TEX_WCSNCPY_REC;
+TMD_RECHEAD (WCSNCPY);
+
+
+/*----------------------------------------------------------------------*/
+/* WCSPBRK: wchar_t *wcspbrk (const wchar_t *ws1, const wchar_t *ws2) */
+/*----------------------------------------------------------------------*/
+
+typedef TIN_WCSCSPN_REC TIN_WCSPBRK_REC;
+
+typedef struct
+{
+ TMD_ERRET (wchar_t *);
+ wchar_t wc;
+}
+TEX_WCSPBRK_REC;
+
+TMD_RECHEAD (WCSPBRK);
+
+
+/*----------------------------------------------------------------------*/
+/* WCSRTOMBS: size_t wcsrtombs (char *s, const wchar_t **ws, size_t n, */
+/* mbstate_t *ps) */
+/*----------------------------------------------------------------------*/
+
+typedef struct
+{
+ int s_flg;
+ int w_flg; /* don't need this */
+ wchar_t ws[WCSSIZE];
+ size_t n;
+ int t_flg;
+ int t_init;
+}
+TIN_WCSRTOMBS_REC;
+
+typedef struct
+{
+ TMD_ERRET (size_t);
+ char s[MBSSIZE];
+}
+TEX_WCSRTOMBS_REC;
+
+TMD_RECHEAD (WCSRTOMBS);
+
+
+/*----------------------------------------------------------------------*/
+/* WCSSPN: size_t wcsspn (const wchar_t *ws1, const wchar_t *ws2) */
+/*----------------------------------------------------------------------*/
+
+typedef TIN_WCSCSPN_REC TIN_WCSSPN_REC;
+typedef TEX_WCSCSPN_REC TEX_WCSSPN_REC;
+TMD_RECHEAD (WCSSPN);
+
+
+/*----------------------------------------------------------------------*/
+/* WCSSTR: wchar_t *wcsstr (const wchar_t *ws1, const wchar_t *ws2) */
+/*----------------------------------------------------------------------*/
+
+typedef TIN_WCSCSPN_REC TIN_WCSSTR_REC;
+typedef TEX_ERRET_REC (wchar_t *) TEX_WCSSTR_REC;
+TMD_RECHEAD (WCSSTR);
+
+
+/*----------------------------------------------------------------------*/
+/* WCSTOD: double wcstod (const wchar_t *np, wchar_t **endp) */
+/*----------------------------------------------------------------------*/
+
+typedef struct
+{
+ wchar_t np[WCSSIZE];
+}
+TIN_WCSTOD_REC;
+
+typedef struct
+{
+ TMD_ERRET (double);
+ double val;
+ wchar_t fwc;
+}
+TEX_WCSTOD_REC;
+
+TMD_RECHEAD (WCSTOD);
+
+
+/*----------------------------------------------------------------------*/
+/* WCSTOK: wchar_t *wcstok (wchar_t *ws, const wchar_t *dlm, */
+/* wchar_t **pt) */
+/*----------------------------------------------------------------------*/
+
+typedef struct
+{
+ struct
+ {
+ int w_flg;
+ wchar_t ws[WCSSIZE];
+ wchar_t dt[WCSSIZE]; /* delimiter */
+ }
+ seq[WCSTOK_SEQNUM];
+}
+TIN_WCSTOK_REC;
+
+typedef struct
+{
+ struct
+ {
+ TMD_ERRET (wchar_t *);
+ wchar_t ws[WCSSIZE];
+ }
+ seq[WCSTOK_SEQNUM];
+}
+TEX_WCSTOK_REC;
+
+TMD_RECHEAD (WCSTOK);
+
+
+/*----------------------------------------------------------------------*/
+/* WCSTOMBS: size_t wcstombs (char s, const wchar_t *ws, size_t n) */
+/*----------------------------------------------------------------------*/
+
+typedef struct
+{
+ int s_flg;
+ int w_flg; /* currently we don't need it. */
+ wchar_t ws[WCSSIZE];
+ size_t n;
+}
+TIN_WCSTOMBS_REC;
+
+typedef struct
+{
+ TMD_ERRET (size_t);
+ char s[MBSSIZE];
+}
+TEX_WCSTOMBS_REC;
+
+TMD_RECHEAD (WCSTOMBS);
+
+
+/*----------------------------------------------------------------------*/
+/* WCSWIDTH: int wcswidth (const wchar_t *ws, size_t n) */
+/*----------------------------------------------------------------------*/
+
+typedef TIN_WCSNCPY_REC TIN_WCSWIDTH_REC;
+typedef TEX_ERRET_REC (int) TEX_WCSWIDTH_REC;
+TMD_RECHEAD (WCSWIDTH);
+
+
+/*----------------------------------------------------------------------*/
+/* WCSXFRM: size_t wcsxfrm (wchar_t *ws1, const wchar_t *ws2, size_t n)*/
+/*----------------------------------------------------------------------*/
+
+typedef struct
+{
+ wchar_t org1[WCSSIZE];
+ wchar_t org2[WCSSIZE];
+ int n1, n2;
+}
+TIN_WCSXFRM_REC;
+
+typedef TEX_ERRET_REC (size_t) TEX_WCSXFRM_REC; /* only for org2[] */
+TMD_RECHEAD (WCSXFRM);
+
+
+/*----------------------------------------------------------------------*/
+/* WCTOB: int wctob (wint_t wc) */
+/*----------------------------------------------------------------------*/
+
+typedef struct
+{
+ wint_t wc;
+}
+TIN_WCTOB_REC;
+
+typedef TEX_ERRET_REC (int) TEX_WCTOB_REC;
+TMD_RECHEAD (WCTOB);
+
+
+/*----------------------------------------------------------------------*/
+/* WCTOMB: int wctomb (char *s, wchar_t wc) */
+/*----------------------------------------------------------------------*/
+
+typedef struct
+{
+ int s_flg;
+ wchar_t wc;
+}
+TIN_WCTOMB_REC;
+
+typedef struct
+{
+ TMD_ERRET (int);
+ char s[MBSSIZE];
+}
+TEX_WCTOMB_REC;
+
+TMD_RECHEAD (WCTOMB);
+
+
+/*----------------------------------------------------------------------*/
+/* WCTRANS: wctrans_t wctrans (const char *charclass) */
+/*----------------------------------------------------------------------*/
+
+typedef struct
+{
+ char class[MBSSIZE];
+}
+TIN_WCTRANS_REC;
+
+typedef TEX_ERRET_REC (wctrans_t) TEX_WCTRANS_REC;
+TMD_RECHEAD (WCTRANS);
+
+
+/*----------------------------------------------------------------------*/
+/* WCTYPE: wctype_t wctype (const char *class) */
+/*----------------------------------------------------------------------*/
+
+typedef TIN_WCTRANS_REC TIN_WCTYPE_REC;
+typedef TEX_ERRET_REC (wctype_t) TEX_WCTYPE_REC;
+TMD_RECHEAD (WCTYPE);
+
+
+/*----------------------------------------------------------------------*/
+/* WCWIDTH: int wcwidth (wchar_t wc) */
+/*----------------------------------------------------------------------*/
+
+typedef struct
+{
+ wchar_t wc;
+}
+TIN_WCWIDTH_REC;
+
+typedef TEX_ERRET_REC (int) TEX_WCWIDTH_REC;
+TMD_RECHEAD (WCWIDTH);
+
+#endif /* TST_TYPES_H */
diff --git a/test/locale-mbwc/tst_wcrtomb.c b/test/locale-mbwc/tst_wcrtomb.c
new file mode 100644
index 000000000..0029a4940
--- /dev/null
+++ b/test/locale-mbwc/tst_wcrtomb.c
@@ -0,0 +1,79 @@
+/*
+ WCRTOMB: wchar_t wcrtomb (char *s, wchar_t wc, mbstate_t *ps)
+*/
+
+#define TST_FUNCTION wcrtomb
+
+#include "tsp_common.c"
+#include "dat_wcrtomb.c"
+
+
+int
+tst_wcrtomb (FILE * fp, int debug_flg)
+{
+ TST_DECL_VARS (wchar_t);
+ wchar_t wc;
+ char s[MBSSIZE], *s_in, *s_ex;
+ char t_flg, t_ini;
+ static mbstate_t t = { 0 };
+ mbstate_t *pt;
+ int err, i;
+
+ TST_DO_TEST (wcrtomb)
+ {
+ TST_HEAD_LOCALE (wcrtomb, S_WCRTOMB);
+ TST_DO_REC (wcrtomb)
+ {
+ TST_GET_ERRET (wcrtomb);
+ s_in = ((TST_INPUT (wcrtomb).s_flg) == 0) ? (char *) NULL : s;
+ wc = TST_INPUT (wcrtomb).wc;
+ t_flg = TST_INPUT (wcrtomb).t_flg;
+ t_ini = TST_INPUT (wcrtomb).t_init;
+ pt = (t_flg == 0) ? NULL : &t;
+
+ if (t_ini != 0)
+ {
+ memset (&t, 0, sizeof (t));
+ }
+
+ TST_CLEAR_ERRNO;
+ ret = wcrtomb (s_in, wc, pt);
+ TST_SAVE_ERRNO;
+
+ if (debug_flg)
+ {
+ fprintf (stdout, "wcrtomb() [ %s : %d ] ret = %lu\n", locale,
+ rec + 1, (unsigned long int) ret);
+ fprintf (stdout, " errno = %d\n", errno_save);
+ }
+
+ TST_IF_RETURN (S_WCRTOMB)
+ {
+ };
+
+ s_ex = TST_EXPECT (wcrtomb).s;
+
+ if (s_in)
+ {
+ for (i = 0, err = 0; *(s_ex + i) != 0 && i < MBSSIZE; i++)
+ {
+ if (s_in[i] != s_ex[i])
+ {
+ err++;
+ err_count++;
+ Result (C_FAILURE, S_WCRTOMB, CASE_4,
+ "copied string is different from an "
+ "expected string");
+ break;
+ }
+ }
+ if (!err)
+ {
+ Result (C_SUCCESS, S_WCRTOMB, CASE_4, MS_PASSED);
+ }
+ }
+ }
+ }
+
+ return err_count;
+}
diff --git a/test/locale-mbwc/tst_wcscat.c b/test/locale-mbwc/tst_wcscat.c
new file mode 100644
index 000000000..3dc98091c
--- /dev/null
+++ b/test/locale-mbwc/tst_wcscat.c
@@ -0,0 +1,78 @@
+/*
+ WCSCAT: wchar_t *wcscat (wchar_t *ws1, const wchar_t *ws2);
+*/
+
+#define TST_FUNCTION wcscat
+
+#include "tsp_common.c"
+#include "dat_wcscat.c"
+
+int
+tst_wcscat (FILE * fp, int debug_flg)
+{
+ TST_DECL_VARS (wchar_t *);
+ wchar_t *ws1, *ws2, *ws_ex;
+ int i, err;
+
+ TST_DO_TEST (wcscat)
+ {
+ TST_HEAD_LOCALE (wcscat, S_WCSCAT);
+ TST_DO_REC (wcscat)
+ {
+ TST_GET_ERRET (wcscat);
+ ws1 = TST_INPUT (wcscat).ws1; /* external value: size WCSSIZE */
+ ws2 = TST_INPUT (wcscat).ws2;
+
+ TST_CLEAR_ERRNO;
+ ret = wcscat (ws1, ws2);
+ TST_SAVE_ERRNO;
+
+ TST_IF_RETURN (S_WCSCAT)
+ {
+ if (ret == ws1)
+ {
+ Result (C_SUCCESS, S_WCSCAT, CASE_3, MS_PASSED);
+ }
+ else
+ {
+ err_count++;
+ Result (C_FAILURE, S_WCSCAT, CASE_3,
+ "the return address may not be correct");
+ }
+ }
+
+ /* function specific test cases here */
+
+ if (ret == ws1)
+ {
+ ws_ex = TST_EXPECT (wcscat).ws;
+ for (err = 0, i = 0;
+ (ws1[i] != 0L || ws_ex[i] != 0L) && i < WCSSIZE; i++)
+ {
+ if (debug_flg)
+ {
+ fprintf (stdout, "tst_wcscat() : ws1[%d] = 0x%lx\n", i,
+ (unsigned long int) ws1[i]);
+ }
+
+ if (ws1[i] != ws_ex[i])
+ {
+ err++;
+ err_count++;
+ Result (C_FAILURE, S_WCSCAT, CASE_4,
+ "concatinated string is different from an "
+ "expected string");
+ break;
+ }
+ }
+
+ if (!err)
+ {
+ Result (C_SUCCESS, S_WCSCAT, CASE_4, MS_PASSED);
+ }
+ }
+ }
+ }
+
+ return err_count;
+}
diff --git a/test/locale-mbwc/tst_wcschr.c b/test/locale-mbwc/tst_wcschr.c
new file mode 100644
index 000000000..b57a05a8f
--- /dev/null
+++ b/test/locale-mbwc/tst_wcschr.c
@@ -0,0 +1,70 @@
+/*
+ WCSCHR: wchar_t *wcschr (wchar_t *ws, wchar_t wc);
+*/
+
+#define TST_FUNCTION wcschr
+
+#include "tsp_common.c"
+#include "dat_wcschr.c"
+
+int
+tst_wcschr (FILE * fp, int debug_flg)
+{
+ TST_DECL_VARS (wchar_t *);
+ wchar_t *ws, wc;
+
+ TST_DO_TEST (wcschr)
+ {
+ TST_HEAD_LOCALE (wcschr, S_WCSCHR);
+ TST_DO_REC (wcschr)
+ {
+ TST_GET_ERRET (wcschr);
+ ws = TST_INPUT (wcschr).ws; /* external value: size WCSSIZE */
+ wc = TST_INPUT (wcschr).wc;
+ ret = wcschr (ws, wc);
+
+ if (debug_flg)
+ {
+ if (ret)
+ {
+ fprintf (stderr, "wcschr: ret = 0x%lx\n",
+ (unsigned long int) *ret);
+ }
+ else
+ {
+ fprintf (stderr, "wcschr: ret = NULL pointer\n");
+ }
+ }
+
+ TST_IF_RETURN (S_WCSCHR)
+ {
+ if (ret == NULL)
+ {
+ if (debug_flg)
+ {
+ fprintf (stderr, "*** Warning *** tst_wcschr: "
+ "set ret_flg=1 to check NULL return value\n");
+ }
+
+ warn_count++;
+ Result (C_INVALID, S_WCSCHR, CASE_3, "(check the test data) "
+ "set ret_flg=1 to check NULL return value");
+ continue;
+ }
+
+ if (*ret == wc)
+ {
+ Result (C_SUCCESS, S_WCSCHR, CASE_3, MS_PASSED);
+ }
+ else
+ {
+ err_count++;
+ Result (C_FAILURE, S_WCSCHR, CASE_3,
+ "the returned address of the string seems to be wrong");
+ }
+ }
+ }
+ }
+
+ return err_count;
+}
diff --git a/test/locale-mbwc/tst_wcscmp.c b/test/locale-mbwc/tst_wcscmp.c
new file mode 100644
index 000000000..594682ce9
--- /dev/null
+++ b/test/locale-mbwc/tst_wcscmp.c
@@ -0,0 +1,40 @@
+/*
+ WCSCMP: int wcscmp (const wchar_t *ws1, const wchar_t *ws2);
+*/
+
+#define TST_FUNCTION wcscmp
+
+#include "tsp_common.c"
+#include "dat_wcscmp.c"
+
+
+int
+tst_wcscmp (FILE * fp, int debug_flg)
+{
+ TST_DECL_VARS (int);
+ wchar_t *ws1, *ws2;
+
+ TST_DO_TEST (wcscmp)
+ {
+ TST_HEAD_LOCALE (wcscmp, S_WCSCMP);
+ TST_DO_REC (wcscmp)
+ {
+ TST_GET_ERRET (wcscmp);
+ ws1 = TST_INPUT (wcscmp).ws1;
+ ws2 = TST_INPUT (wcscmp).ws2;
+ ret = wcscmp (ws1, ws2);
+ ret = (ret > 0 ? 1 : ret < 0 ? -1 : 0);
+
+ if (debug_flg)
+ {
+ fprintf (stderr, "tst_wcscmp: ret = %d\n", ret);
+ }
+
+ TST_IF_RETURN (S_WCSCMP)
+ {
+ };
+ }
+ }
+
+ return err_count;
+}
diff --git a/test/locale-mbwc/tst_wcscoll.c b/test/locale-mbwc/tst_wcscoll.c
new file mode 100644
index 000000000..929f80d80
--- /dev/null
+++ b/test/locale-mbwc/tst_wcscoll.c
@@ -0,0 +1,76 @@
+/*
+ WCSCOLL: int wcscoll (const wchar_t *ws1, const wchar_t *ws2);
+*/
+
+#define TST_FUNCTION wcscoll
+
+#include "tsp_common.c"
+#include "dat_wcscoll.c"
+
+int
+tst_wcscoll (FILE * fp, int debug_flg)
+{
+ TST_DECL_VARS (int);
+ wchar_t *ws1, *ws2;
+ int cmp;
+
+ TST_DO_TEST (wcscoll)
+ {
+ TST_HEAD_LOCALE (wcscoll, S_WCSCOLL);
+ TST_DO_REC (wcscoll)
+ {
+ TST_GET_ERRET (wcscoll);
+ ws1 = TST_INPUT (wcscoll).ws1; /* external value: size WCSSIZE */
+ ws2 = TST_INPUT (wcscoll).ws2;
+
+ TST_CLEAR_ERRNO;
+ ret = wcscoll (ws1, ws2);
+ TST_SAVE_ERRNO;
+
+ if (debug_flg)
+ {
+ fprintf (stderr, "tst_wcscoll: ret = %d\n", ret);
+ }
+
+ cmp = TST_EXPECT (wcscoll).cmp_flg;
+ TST_IF_RETURN (S_WCSCOLL)
+ {
+ if (cmp != 0)
+ {
+ if ((cmp == 1 && ret > 0) || (cmp == -1 && ret < 0))
+ {
+ Result (C_SUCCESS, S_WCSCOLL, CASE_3, MS_PASSED);
+ }
+ else
+ {
+ err_count++;
+ if (cmp == 1)
+ {
+ if (ret == 0)
+ Result (C_FAILURE, S_WCSCOLL, CASE_3,
+ "the return value should be positive"
+ " but it's zero.");
+ else
+ Result (C_FAILURE, S_WCSCOLL, CASE_3,
+ "the return value should be positive"
+ " but it's negative.");
+ }
+ else
+ {
+ if (ret == 0)
+ Result (C_FAILURE, S_WCSCOLL, CASE_3,
+ "the return value should be negative"
+ " but it's zero.");
+ else
+ Result (C_FAILURE, S_WCSCOLL, CASE_3,
+ "the return value should be negative"
+ " but it's positive.");
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return err_count;
+}
diff --git a/test/locale-mbwc/tst_wcscpy.c b/test/locale-mbwc/tst_wcscpy.c
new file mode 100644
index 000000000..d5705a55d
--- /dev/null
+++ b/test/locale-mbwc/tst_wcscpy.c
@@ -0,0 +1,85 @@
+/*-------------------------------------------------------------------------------------*/
+/* WCSCPY: wchar_t *wcscpy( wchar_t *ws1, const wchar_t *ws2 ) */
+/*-------------------------------------------------------------------------------------*/
+#define TST_FUNCTION wcscpy
+
+#include "tsp_common.c"
+#include "dat_wcscpy.c"
+
+int
+tst_wcscpy (FILE * fp, int debug_flg)
+{
+ TST_DECL_VARS (wchar_t *);
+ wchar_t ws1[WCSSIZE], *ws2, *ws_ex;
+ int err, i;
+
+ TST_DO_TEST (wcscpy)
+ {
+ TST_HEAD_LOCALE (wcscpy, S_WCSCPY);
+ TST_DO_REC (wcscpy)
+ {
+ TST_GET_ERRET (wcscpy);
+ ws2 = TST_INPUT (wcscpy).ws; /* external value: size WCSSIZE */
+ ret = wcscpy (ws1, ws2);
+
+ TST_IF_RETURN (S_WCSCPY)
+ {
+ if (ret == ws1)
+ {
+ Result (C_SUCCESS, S_WCSCPY, CASE_3, MS_PASSED);
+ }
+ else
+ {
+ err_count++;
+ Result (C_FAILURE, S_WCSCPY, CASE_3,
+ "the return address may not be correct");
+ }
+ }
+
+ if (ret == ws1)
+ {
+ ws_ex = TST_EXPECT (wcscpy).ws;
+
+ for (err = 0, i = 0;
+ (ws1[i] != 0L || ws_ex[i] != 0L) && i < WCSSIZE; i++)
+ {
+ if (debug_flg)
+ {
+ fprintf (stderr,
+ "ws1[ %d ] = 0x%lx <-> wx_ex[ %d ] = 0x%lx\n", i,
+ (unsigned long int) ws1[i], i,
+ (unsigned long int) ws_ex[i]);
+ }
+
+ if (ws1[i] != ws_ex[i])
+ {
+ err++;
+ err_count++;
+ Result (C_FAILURE, S_WCSCPY, CASE_4,
+ "copied string is different from an"
+ " expected string");
+ break;
+ }
+ }
+
+ if (!err)
+ {
+ Result (C_SUCCESS, S_WCSCPY, CASE_4, MS_PASSED);
+ }
+
+ if (ws1[i] == 0L)
+ {
+ Result (C_SUCCESS, S_WCSCPY, CASE_5, MS_PASSED);
+ }
+ else
+ {
+ err_count++;
+ Result (C_FAILURE, S_WCSCPY, CASE_5,
+ "copied string is not null-terminated");
+ }
+ }
+ }
+ }
+
+ return err_count;
+}
diff --git a/test/locale-mbwc/tst_wcscspn.c b/test/locale-mbwc/tst_wcscspn.c
new file mode 100644
index 000000000..e1c8892fe
--- /dev/null
+++ b/test/locale-mbwc/tst_wcscspn.c
@@ -0,0 +1,38 @@
+/*
+ WCSCSPN: size_t wcscspn (const wchar_t *ws1, const wchar_t *ws2);
+*/
+
+#define TST_FUNCTION wcscspn
+
+#include "tsp_common.c"
+#include "dat_wcscspn.c"
+
+int
+tst_wcscspn (FILE * fp, int debug_flg)
+{
+ TST_DECL_VARS (size_t);
+ wchar_t *ws1, *ws2;
+
+ TST_DO_TEST (wcscspn)
+ {
+ TST_HEAD_LOCALE (wcscspn, S_WCSCSPN);
+ TST_DO_REC (wcscspn)
+ {
+ TST_GET_ERRET (wcscspn);
+ ws1 = TST_INPUT (wcscspn).ws1;
+ ws2 = TST_INPUT (wcscspn).ws2; /* external value: size WCSSIZE */
+ ret = wcscspn (ws1, ws2);
+
+ if (debug_flg)
+ {
+ fprintf (stderr, "wcscspn: ret = %zu\n", ret);
+ }
+
+ TST_IF_RETURN (S_WCSCSPN)
+ {
+ };
+ }
+ }
+
+ return err_count;
+}
diff --git a/test/locale-mbwc/tst_wcslen.c b/test/locale-mbwc/tst_wcslen.c
new file mode 100644
index 000000000..d0ffa5a44
--- /dev/null
+++ b/test/locale-mbwc/tst_wcslen.c
@@ -0,0 +1,31 @@
+/*
+ WCSLEN: size_t wcslen (const wchar_t *ws);
+*/
+
+#define TST_FUNCTION wcslen
+
+#include "tsp_common.c"
+#include "dat_wcslen.c"
+
+int
+tst_wcslen (FILE * fp, int debug_flg)
+{
+ TST_DECL_VARS (size_t);
+ wchar_t *ws;
+
+ TST_DO_TEST (wcslen)
+ {
+ TST_HEAD_LOCALE (wcslen, S_WCSLEN);
+ TST_DO_REC (wcslen)
+ {
+ TST_GET_ERRET (wcslen);
+ ws = TST_INPUT (wcslen).ws;
+ ret = wcslen (ws);
+ TST_IF_RETURN (S_WCSLEN)
+ {
+ };
+ }
+ }
+
+ return err_count;
+}
diff --git a/test/locale-mbwc/tst_wcsncat.c b/test/locale-mbwc/tst_wcsncat.c
new file mode 100644
index 000000000..a2f6ba020
--- /dev/null
+++ b/test/locale-mbwc/tst_wcsncat.c
@@ -0,0 +1,75 @@
+/*
+ WCSNCAT: wchar_t *wcsncat (wchar_t *ws1, const wchar_t *ws2, size_t n);
+*/
+
+#define TST_FUNCTION wcsncat
+
+#include "tsp_common.c"
+#include "dat_wcsncat.c"
+
+int
+tst_wcsncat (FILE * fp, int debug_flg)
+{
+ TST_DECL_VARS (wchar_t *);
+ wchar_t *ws1, *ws2, *ws_ex;
+ int n, i, err;
+
+ TST_DO_TEST (wcsncat)
+ {
+ TST_HEAD_LOCALE (wcsncat, S_WCSNCAT);
+ TST_DO_REC (wcsncat)
+ {
+ TST_GET_ERRET (wcsncat);
+ ws1 = TST_INPUT (wcsncat).ws1; /* external value: size WCSSIZE */
+ ws2 = TST_INPUT (wcsncat).ws2;
+ n = TST_INPUT (wcsncat).n;
+ ret = wcsncat (ws1, ws2, n);
+
+ TST_IF_RETURN (S_WCSNCAT)
+ {
+ if (ret == ws1)
+ {
+ Result (C_SUCCESS, S_WCSNCAT, CASE_3, MS_PASSED);
+ }
+ else
+ {
+ err_count++;
+ Result (C_FAILURE, S_WCSNCAT, CASE_3,
+ "the return address may not be correct");
+ }
+ }
+
+ if (ret == ws1)
+ {
+ ws_ex = TST_EXPECT (wcsncat).ws;
+
+ for (err = 0, i = 0;
+ (ws1[i] != 0L || ws_ex[i] != 0L) && i < WCSSIZE; i++)
+ {
+ if (debug_flg)
+ {
+ fprintf (stderr, "ws1[%d] = 0x%lx\n", i,
+ (unsigned long int) ws1[i]);
+ }
+
+ if (ws1[i] != ws_ex[i])
+ {
+ err++;
+ err_count++;
+ Result (C_FAILURE, S_WCSNCAT, CASE_4,
+ "the concatinated string has "
+ "different value from an expected string");
+ break;
+ }
+ }
+
+ if (!err)
+ {
+ Result (C_SUCCESS, S_WCSNCAT, CASE_4, MS_PASSED);
+ }
+ }
+ }
+ }
+
+ return err_count;
+}
diff --git a/test/locale-mbwc/tst_wcsncmp.c b/test/locale-mbwc/tst_wcsncmp.c
new file mode 100644
index 000000000..d046ecd13
--- /dev/null
+++ b/test/locale-mbwc/tst_wcsncmp.c
@@ -0,0 +1,40 @@
+/*-------------------------------------------------------------------------------------*/
+/* WCSNCMP: int wcsncmp( const wchar_t *ws1, const wchar_t *ws2, size_t n ) */
+/*-------------------------------------------------------------------------------------*/
+
+#define TST_FUNCTION wcsncmp
+
+#include "tsp_common.c"
+#include "dat_wcsncmp.c"
+
+int
+tst_wcsncmp (FILE * fp, int debug_flg)
+{
+ TST_DECL_VARS (int);
+ wchar_t *ws1, *ws2;
+ size_t n;
+
+ TST_DO_TEST (wcsncmp)
+ {
+ TST_HEAD_LOCALE (wcsncmp, S_WCSNCMP);
+ TST_DO_REC (wcsncmp)
+ {
+ TST_GET_ERRET (wcsncmp);
+ ws1 = TST_INPUT (wcsncmp).ws1; /* external value: size WCSSIZE */
+ ws2 = TST_INPUT (wcsncmp).ws2;
+ n = TST_INPUT (wcsncmp).n;
+ ret = wcsncmp (ws1, ws2, n);
+
+ if (debug_flg)
+ {
+ fprintf (stderr, "tst_wcsncmp: ret = %d, 0x%x\n", ret, ret);
+ }
+
+ TST_IF_RETURN (S_WCSNCMP)
+ {
+ };
+ }
+ }
+
+ return err_count;
+}
diff --git a/test/locale-mbwc/tst_wcsncpy.c b/test/locale-mbwc/tst_wcsncpy.c
new file mode 100644
index 000000000..814bbc0a8
--- /dev/null
+++ b/test/locale-mbwc/tst_wcsncpy.c
@@ -0,0 +1,93 @@
+/*
+ WCSNCPY: wchar_t *wcsncpy (wchar_t *ws1, const wchar_t *ws2, size_t n);
+*/
+
+#define TST_FUNCTION wcsncpy
+
+#include "tsp_common.c"
+#include "dat_wcsncpy.c"
+
+#define WCSNUM_NCPY 7
+
+int
+tst_wcsncpy (FILE *fp, int debug_flg)
+{
+ TST_DECL_VARS (wchar_t *);
+ wchar_t ws1[WCSSIZE] =
+ { 0x9999, 0x9999, 0x9999, 0x9999, 0x9999, 0x9999, 0x0000 };
+ wchar_t *ws2, *ws_ex;
+ int err, i;
+ size_t n;
+
+ TST_DO_TEST (wcsncpy)
+ {
+ TST_HEAD_LOCALE (wcsncpy, S_WCSNCPY);
+ TST_DO_REC (wcsncpy)
+ {
+ TST_GET_ERRET (wcsncpy);
+
+ for (n = 0; n < WCSNUM_NCPY - 1; ++n)
+ {
+ ws1[n] = 0x9999;
+ }
+
+ ws1[n] = 0;
+ ws2 = TST_INPUT (wcsncpy).ws; /* external value: size WCSSIZE */
+ n = TST_INPUT (wcsncpy).n;
+ ret = wcsncpy (ws1, ws2, n);
+
+ TST_IF_RETURN (S_WCSNCPY)
+ {
+ if (ret == ws1)
+ {
+ Result (C_SUCCESS, S_WCSNCPY, CASE_3, MS_PASSED);
+ }
+ else
+ {
+ err_count++;
+ Result (C_FAILURE, S_WCSNCPY, CASE_3,
+ "the return address may not be correct");
+ }
+ }
+
+ if (ret == ws1)
+ {
+ if (debug_flg)
+ {
+ fprintf (stderr, "\nwcsncpy: n = %zu\n\n", n);
+ }
+
+ ws_ex = TST_EXPECT (wcsncpy).ws;
+
+ for (err = 0, i = 0; i < WCSNUM_NCPY && i < WCSSIZE; i++)
+ {
+ if (debug_flg)
+ fprintf (stderr,
+ "wcsncpy: ws1[ %d ] = 0x%lx <-> wx_ex[ %d ] = 0x%lx\n",
+ i, (unsigned long int) ws1[i], i,
+ (unsigned long int) ws_ex[i]);
+
+ if (ws1[i] != ws_ex[i])
+ {
+ err++;
+ err_count++;
+ Result (C_FAILURE, S_WCSNCPY, CASE_4,
+ "copied string is different from an "
+ "expected string");
+ break;
+ }
+ }
+
+ if (!err)
+ {
+ Result (C_SUCCESS, S_WCSNCPY, CASE_4, MS_PASSED);
+ }
+
+ /* A null terminate character is not supposed to be copied
+ unless (num chars of ws2)<n. */
+ }
+ }
+ }
+
+ return err_count;
+}
diff --git a/test/locale-mbwc/tst_wcspbrk.c b/test/locale-mbwc/tst_wcspbrk.c
new file mode 100644
index 000000000..95c1c0fa6
--- /dev/null
+++ b/test/locale-mbwc/tst_wcspbrk.c
@@ -0,0 +1,80 @@
+/*
+ WCSPBRK: wchar_t *wcspbrk (const wchar_t *ws1, const wchar_t *ws2);
+*/
+
+#define TST_FUNCTION wcspbrk
+
+#include "tsp_common.c"
+#include "dat_wcspbrk.c"
+
+int
+tst_wcspbrk (FILE * fp, int debug_flg)
+{
+ TST_DECL_VARS (wchar_t *);
+ wchar_t *ws1, *ws2;
+ int err;
+ wchar_t wc_ex;
+
+ TST_DO_TEST (wcspbrk)
+ {
+ TST_HEAD_LOCALE (wcspbrk, S_WCSPBRK);
+ TST_DO_REC (wcspbrk)
+ {
+ TST_GET_ERRET (wcspbrk);
+ ws1 = TST_INPUT (wcspbrk).ws1;
+ ws2 = TST_INPUT (wcspbrk).ws2;
+
+ ret = wcspbrk (ws1, ws2);
+
+ if (debug_flg)
+ {
+ fprintf (stdout, "wcspbrk() [ %s : %d ] ret = %s\n", locale,
+ rec + 1, (ret == NULL) ? "null" : "not null");
+ if (ret)
+ fprintf (stderr,
+ " ret[0] = 0x%lx : 0x%lx = ws2[0]\n",
+ (unsigned long int) ret[0], (unsigned long int) ws2[0]);
+ }
+
+ TST_IF_RETURN (S_WCSPBRK)
+ {
+ if (ws2[0] == 0)
+ {
+ if (ret == ws1)
+ {
+ Result (C_SUCCESS, S_WCSPBRK, CASE_3, MS_PASSED);
+ }
+ else
+ {
+ err_count++;
+ Result (C_FAILURE, S_WCSPBRK, CASE_3,
+ "return address is not same address as ws1");
+ }
+
+ continue;
+ }
+
+ wc_ex = TST_EXPECT (wcspbrk).wc;
+
+ if (debug_flg)
+ fprintf (stdout,
+ " *ret = 0x%lx <-> 0x%lx = wc_ex\n",
+ (unsigned long int) *ret, (unsigned long int) wc_ex);
+
+ if (*ret != wc_ex)
+ {
+ err++;
+ err_count++;
+ Result (C_FAILURE, S_WCSPBRK, CASE_4, "the pointed wc is "
+ "different from an expected wc");
+ }
+ else
+ {
+ Result (C_SUCCESS, S_WCSPBRK, CASE_4, MS_PASSED);
+ }
+ }
+ }
+ }
+
+ return err_count;
+}
diff --git a/test/locale-mbwc/tst_wcsrtombs.c b/test/locale-mbwc/tst_wcsrtombs.c
new file mode 100644
index 000000000..3a8edccad
--- /dev/null
+++ b/test/locale-mbwc/tst_wcsrtombs.c
@@ -0,0 +1,127 @@
+/*
+ WCSRTOMBS: size_t wcsrtombs (char *s, const wchar_t **ws, size_t n,
+ mbstate_t *ps)
+*/
+
+#define TST_FUNCTION wcsrtombs
+
+#include "tsp_common.c"
+#include "dat_wcsrtombs.c"
+
+#define MARK_VAL 0x01
+
+int
+tst_wcsrtombs (FILE * fp, int debug_flg)
+{
+ TST_DECL_VARS (size_t);
+ char s_flg, n;
+ const wchar_t *ws, *wp;
+ char s[MBSSIZE], *s_in;
+ char t_flg, t_ini;
+ static mbstate_t t = { 0 };
+ mbstate_t *pt;
+ int err, i;
+ char *s_ex;
+
+ TST_DO_TEST (wcsrtombs)
+ {
+ TST_HEAD_LOCALE (wcsrtombs, S_WCSRTOMBS);
+ TST_DO_REC (wcsrtombs)
+ {
+ TST_GET_ERRET (wcsrtombs);
+ memset (s, MARK_VAL, MBSSIZE);
+
+ s_flg = TST_INPUT (wcsrtombs).s_flg;
+ s_in = (s_flg == 1) ? s : (char *) NULL;
+ wp = ws = TST_INPUT (wcsrtombs).ws;
+ n = TST_INPUT (wcsrtombs).n;
+ t_flg = TST_INPUT (wcsrtombs).t_flg;
+ t_ini = TST_INPUT (wcsrtombs).t_init;
+ pt = (t_flg == 0) ? NULL : &t;
+
+ if (t_ini != 0)
+ {
+ memset (&t, 0, sizeof (t));
+ }
+
+ TST_CLEAR_ERRNO;
+ ret = wcsrtombs (s_in, &wp, n, pt);
+ TST_SAVE_ERRNO;
+
+ if (debug_flg)
+ {
+ fprintf (stderr, "wcsrtombs: ret = %zu\n", ret);
+ }
+
+ TST_IF_RETURN (S_WCSRTOMBS)
+ {
+ };
+
+ if (s_in != NULL && ret != (size_t) - 1)
+ {
+ /* No definition for s, when error occurs. */
+ s_ex = TST_EXPECT (wcsrtombs).s;
+
+ for (err = 0, i = 0; i <= ret && i < MBSSIZE; i++)
+ {
+ if (debug_flg)
+ {
+ fprintf (stderr,
+ " : s[%d] = 0x%hx <-> 0x%hx = s_ex[%d]\n", i,
+ s[i], s_ex[i], i);
+ }
+
+ if (i == ret && ret == n) /* no null termination */
+ {
+ if (s[i] == MARK_VAL)
+ {
+ Result (C_SUCCESS, S_WCSRTOMBS, CASE_4, MS_PASSED);
+ }
+ else
+ {
+ err_count++;
+ Result (C_FAILURE, S_WCSRTOMBS, CASE_4,
+ "should not be null terminated "
+ "(it may be a null char), but it is");
+ }
+
+ break;
+ }
+
+ if (i == ret && ret < n) /* null termination */
+ {
+ if (s[i] == 0)
+ {
+ Result (C_SUCCESS, S_WCSRTOMBS, CASE_5, MS_PASSED);
+ }
+ else
+ {
+ err_count++;
+ Result (C_FAILURE, S_WCSRTOMBS, CASE_5,
+ "should be null terminated, but it is not");
+ }
+
+ break;
+ }
+
+ if (s[i] != s_ex[i])
+ {
+ err++;
+ err_count++;
+ Result (C_FAILURE, S_WCSRTOMBS, CASE_6,
+ "converted string is different from an"
+ " expected string");
+ break;
+ }
+ }
+
+ if (!err)
+ {
+ Result (C_SUCCESS, S_WCSRTOMBS, CASE_6, MS_PASSED);
+ }
+ }
+ }
+ }
+
+ return err_count;
+}
diff --git a/test/locale-mbwc/tst_wcsspn.c b/test/locale-mbwc/tst_wcsspn.c
new file mode 100644
index 000000000..02157eeca
--- /dev/null
+++ b/test/locale-mbwc/tst_wcsspn.c
@@ -0,0 +1,38 @@
+/*
+ WCSSPN: size_t wcsspn (const wchar_t *ws1, const wchar_t *ws2);
+*/
+
+#define TST_FUNCTION wcsspn
+
+#include "tsp_common.c"
+#include "dat_wcsspn.c"
+
+int
+tst_wcsspn (FILE *fp, int debug_flg)
+{
+ TST_DECL_VARS (size_t);
+ wchar_t *ws1, *ws2;
+
+ TST_DO_TEST (wcsspn)
+ {
+ TST_HEAD_LOCALE (wcsspn, S_WCSSPN);
+ TST_DO_REC (wcsspn)
+ {
+ TST_GET_ERRET (wcsspn);
+ ws1 = TST_INPUT (wcsspn).ws1;
+ ws2 = TST_INPUT (wcsspn).ws2; /* external value: size WCSSIZE */
+ ret = wcsspn (ws1, ws2);
+
+ if (debug_flg)
+ {
+ fprintf (stderr, "wcsspn: ret = %zu\n", ret);
+ }
+
+ TST_IF_RETURN (S_WCSSPN)
+ {
+ };
+ }
+ }
+
+ return err_count;
+}
diff --git a/test/locale-mbwc/tst_wcsstr.c b/test/locale-mbwc/tst_wcsstr.c
new file mode 100644
index 000000000..f8b00c4b7
--- /dev/null
+++ b/test/locale-mbwc/tst_wcsstr.c
@@ -0,0 +1,86 @@
+/*
+ WCSSTR: wchar_t *wcsstr (const wchar_t *ws1, const wchar_t *ws2);
+*/
+
+#define TST_FUNCTION wcsstr
+
+#include "tsp_common.c"
+#include "dat_wcsstr.c"
+
+int
+tst_wcsstr (FILE * fp, int debug_flg)
+{
+ TST_DECL_VARS (wchar_t *);
+ wchar_t *ws1, *ws2;
+ int err, i;
+
+ TST_DO_TEST (wcsstr)
+ {
+ TST_HEAD_LOCALE (wcsstr, S_WCSSTR);
+ TST_DO_REC (wcsstr)
+ {
+ TST_GET_ERRET (wcsstr);
+ ws1 = TST_INPUT (wcsstr).ws1;
+ ws2 = TST_INPUT (wcsstr).ws2; /* external value: size WCSSIZE */
+ ret = wcsstr (ws1, ws2);
+
+ if (debug_flg)
+ {
+ fprintf (stderr, "wcsstr: %d : ret = %s\n", rec + 1,
+ (ret == NULL) ? "null" : "not null");
+ if (ret)
+ {
+ fprintf (stderr,
+ " ret[ 0 ] = 0x%lx <-> 0x%lx = ws2[ 0 ]\n",
+ (unsigned long int) ret[0], (unsigned long int) ws2[0]);
+ }
+ }
+
+ TST_IF_RETURN (S_WCSSTR)
+ {
+ if (ws2[0] == 0)
+ {
+ if (ret == ws1)
+ {
+ Result (C_SUCCESS, S_WCSSTR, CASE_3, MS_PASSED);
+ }
+ else
+ {
+ err_count++;
+ Result (C_FAILURE, S_WCSSTR, CASE_3,
+ "return address is not same address as ws1");
+ }
+
+ continue;
+ }
+
+ for (i = 0, err = 0; *(ws2 + i) != 0 && i < WCSSIZE; i++)
+ {
+ if (debug_flg)
+ {
+ fprintf (stderr,
+ " : ret[ %d ] = 0x%lx <-> 0x%lx = ws2[ %d ]\n",
+ i, (unsigned long int) ret[i],
+ (unsigned long int) ws2[i], i);
+ }
+
+ if (ret[i] != ws2[i])
+ {
+ err++;
+ err_count++;
+ Result (C_FAILURE, S_WCSSTR, CASE_4, "pointed sub-string is "
+ "different from an expected sub-string");
+ break;
+ }
+ }
+
+ if (!err)
+ {
+ Result (C_SUCCESS, S_WCSSTR, CASE_4, MS_PASSED);
+ }
+ }
+ }
+ }
+
+ return err_count;
+}
diff --git a/test/locale-mbwc/tst_wcstod.c b/test/locale-mbwc/tst_wcstod.c
new file mode 100644
index 000000000..1648d3539
--- /dev/null
+++ b/test/locale-mbwc/tst_wcstod.c
@@ -0,0 +1,69 @@
+/*
+ WCSTOD: double wcstod (wchar_t *np, const wchar_t **endp);
+*/
+
+#define TST_FUNCTION wcstod
+
+#include "tsp_common.c"
+#include "dat_wcstod.c"
+
+int
+tst_wcstod (FILE * fp, int debug_flg)
+{
+ TST_DECL_VARS (double);
+ wchar_t *np, *endp, fwc;
+ double val;
+
+ TST_DO_TEST (wcstod)
+ {
+ TST_HEAD_LOCALE (wcstod, S_WCSTOD);
+ TST_DO_REC (wcstod)
+ {
+ TST_GET_ERRET (wcstod);
+ np = TST_INPUT (wcstod).np;
+
+ TST_CLEAR_ERRNO;
+ ret = wcstod (np, &endp);
+ TST_SAVE_ERRNO;
+
+ if (debug_flg)
+ {
+ fprintf (stdout, "wcstod() [ %s : %d ] ret = %f\n", locale,
+ rec + 1, ret);
+ fprintf (stdout, " *endp = 0x%lx\n",
+ (unsigned long int) *endp);
+ }
+
+ TST_IF_RETURN (S_WCSTOD)
+ {
+ if (ret != 0)
+ {
+ val = ret - TST_EXPECT (wcstod).val;
+ if (TST_ABS (val) < TST_DBL_EPS)
+ {
+ Result (C_SUCCESS, S_WCSTOD, CASE_3, MS_PASSED);
+ }
+ else
+ {
+ err_count++;
+ Result (C_FAILURE, S_WCSTOD, CASE_3, "return value is wrong");
+ }
+ }
+ }
+
+ fwc = TST_EXPECT (wcstod).fwc;
+
+ if (fwc == *endp)
+ {
+ Result (C_SUCCESS, S_WCSTOD, CASE_4, MS_PASSED);
+ }
+ else
+ {
+ err_count++;
+ Result (C_FAILURE, S_WCSTOD, CASE_4, "a final wc is wrong.");
+ }
+ }
+ }
+
+ return err_count;
+}
diff --git a/test/locale-mbwc/tst_wcstok.c b/test/locale-mbwc/tst_wcstok.c
new file mode 100644
index 000000000..1222b9785
--- /dev/null
+++ b/test/locale-mbwc/tst_wcstok.c
@@ -0,0 +1,96 @@
+/*
+ WCSTOK: wchar_t *wcstok (wchar_t *ws, const wchar_t *dlm, wchar_t **pt);
+*/
+
+
+#define TST_FUNCTION wcstok
+
+#include "tsp_common.c"
+#include "dat_wcstok.c"
+
+int
+tst_wcstok (FILE * fp, int debug_flg)
+{
+ TST_DECL_VARS (wchar_t *);
+ char w_flg;
+ wchar_t *ws;
+ wchar_t *dt, *pt;
+ wchar_t *ws_ex;
+ int err, i;
+
+ TST_DO_TEST (wcstok)
+ {
+ TST_HEAD_LOCALE (wcstok, S_WCSTOK);
+ TST_DO_REC (wcstok)
+ {
+ TST_DO_SEQ (WCSTOK_SEQNUM)
+ {
+ TST_GET_ERRET_SEQ (wcstok);
+ w_flg = TST_INPUT_SEQ (wcstok).w_flg;
+ ws = (w_flg) ? TST_INPUT_SEQ (wcstok).ws : NULL;
+ dt = TST_INPUT_SEQ (wcstok).dt;
+
+ ret = wcstok (ws, dt, &pt);
+
+ if (debug_flg)
+ {
+ fprintf (stdout, "wcstok() [ %s : %d : %d ] *ret = 0x%lx\n",
+ locale, rec + 1, seq_num + 1, (unsigned long int) *ret);
+ if (pt && *pt)
+ {
+ fprintf (stdout, " *pt = 0x%lx\n",
+ (unsigned long int) *pt);
+ }
+ }
+
+ TST_IF_RETURN (S_WCSTOK)
+ {
+ };
+
+ if (ret != NULL)
+ {
+ ws_ex = TST_EXPECT_SEQ (wcstok).ws;
+
+ /* XXX: REVISIT : insufficient conditions */
+ for (err = 0, i = 0; i < WCSSIZE; i++)
+ {
+ if (ret[i] == L'\0' && ws_ex[i] == L'\0')
+ {
+ break;
+ }
+
+ if (debug_flg)
+ {
+ fprintf (stderr,
+ " ret[%d] = 0x%lx <-> "
+ "0x%lx = ws_ex[%d]\n",
+ i, (unsigned long int) ret[i],
+ (unsigned long int) ws_ex[i], i);
+ }
+
+ if (ret[i] != ws_ex[i])
+ {
+ err++;
+ err_count++;
+ Result (C_FAILURE, S_WCSTOK, CASE_3,
+ "the token is different from an expected string");
+ break;
+ }
+
+ if (ret[i] == L'\0' || ws_ex[i] == L'\0')
+ {
+ break;
+ }
+ }
+
+ if (!err)
+ {
+ Result (C_SUCCESS, S_WCSTOK, CASE_3, MS_PASSED);
+ }
+ }
+ }
+ }
+ }
+
+ return err_count;
+}
diff --git a/test/locale-mbwc/tst_wcstombs.c b/test/locale-mbwc/tst_wcstombs.c
new file mode 100644
index 000000000..c0851a430
--- /dev/null
+++ b/test/locale-mbwc/tst_wcstombs.c
@@ -0,0 +1,115 @@
+/*
+ WCSTOMBS: size_t wcstombs (char *s, const wchar_t *ws, size_t n)
+*/
+
+#define TST_FUNCTION wcstombs
+
+#include "tsp_common.c"
+#include "dat_wcstombs.c"
+
+#define MARK_VAL 0x01
+
+int
+tst_wcstombs (FILE * fp, int debug_flg)
+{
+ TST_DECL_VARS (size_t);
+ char s_flg, n;
+ wchar_t *ws;
+ char s[MBSSIZE], *s_in;
+ int err, i;
+ char *s_ex;
+
+ TST_DO_TEST (wcstombs)
+ {
+ TST_HEAD_LOCALE (wcstombs, S_WCSTOMBS);
+ TST_DO_REC (wcstombs)
+ {
+ TST_GET_ERRET (wcstombs);
+ memset (s, MARK_VAL, MBSSIZE);
+
+ s_flg = TST_INPUT (wcstombs).s_flg;
+ s_in = (s_flg == 1) ? s : (char *) NULL;
+ ws = TST_INPUT (wcstombs).ws;
+ n = TST_INPUT (wcstombs).n;
+
+ TST_CLEAR_ERRNO;
+ ret = wcstombs (s_in, ws, n);
+ TST_SAVE_ERRNO;
+
+ if (debug_flg)
+ {
+ fprintf (stdout, "wcstombs: ret = %zu\n", ret);
+ }
+
+ TST_IF_RETURN (S_WCSTOMBS)
+ {
+ };
+
+ if (s_in != NULL && ret != (size_t) - 1)
+ {
+ /* No definition for s, when error occurs. */
+ s_ex = TST_EXPECT (wcstombs).s;
+
+ for (err = 0, i = 0; i <= ret && i < MBSSIZE; i++)
+ {
+ if (debug_flg)
+ {
+ fprintf (stdout,
+ " : s[%d] = 0x%hx <-> 0x%hx = s_ex[%d]\n", i,
+ s[i], s_ex[i], i);
+ }
+
+ if (i == ret && ret == n) /* no null termination */
+ {
+ if (s[i] == MARK_VAL)
+ {
+ Result (C_SUCCESS, S_WCSTOMBS, CASE_4, MS_PASSED);
+ }
+ else
+ {
+ err_count++;
+ Result (C_FAILURE, S_WCSTOMBS, CASE_4,
+ "should not be null terminated "
+ "(it may be a null char), but it is");
+ }
+
+ break;
+ }
+
+ if (i == ret && ret < n) /* null termination */
+ {
+ if (s[i] == 0)
+ {
+ Result (C_SUCCESS, S_WCSTOMBS, CASE_5, MS_PASSED);
+ }
+ else
+ {
+ err_count++;
+ Result (C_FAILURE, S_WCSTOMBS, CASE_5,
+ "should be null terminated, but it is not");
+ }
+
+ break;
+ }
+
+ if (s[i] != s_ex[i])
+ {
+ err++;
+ err_count++;
+ Result (C_FAILURE, S_WCSTOMBS, CASE_6,
+ "converted string is different from an "
+ "expected string");
+ break;
+ }
+ }
+
+ if (!err)
+ {
+ Result (C_SUCCESS, S_WCSTOMBS, CASE_6, MS_PASSED);
+ }
+ }
+ }
+ }
+
+ return err_count;
+}
diff --git a/test/locale-mbwc/tst_wcswidth.c b/test/locale-mbwc/tst_wcswidth.c
new file mode 100644
index 000000000..c8369753e
--- /dev/null
+++ b/test/locale-mbwc/tst_wcswidth.c
@@ -0,0 +1,39 @@
+/*
+ WCSWIDTH: int wcswidth (const wchar_t *ws, size_t n);
+*/
+
+#define TST_FUNCTION wcswidth
+
+#include "tsp_common.c"
+#include "dat_wcswidth.c"
+
+int
+tst_wcswidth (FILE *fp, int debug_flg)
+{
+ TST_DECL_VARS (int);
+ wchar_t *ws;
+ int n;
+
+ TST_DO_TEST (wcswidth)
+ {
+ TST_HEAD_LOCALE (wcswidth, S_WCSWIDTH);
+ TST_DO_REC (wcswidth)
+ {
+ TST_GET_ERRET (wcswidth);
+ ws = TST_INPUT (wcswidth).ws;
+ n = TST_INPUT (wcswidth).n;
+ ret = wcswidth (ws, n);
+
+ if (debug_flg)
+ {
+ fprintf (stderr, "wcswidth: [ %d ] : ret = %d\n", rec + 1, ret);
+ }
+
+ TST_IF_RETURN (S_WCSWIDTH)
+ {
+ };
+ }
+ }
+
+ return err_count;
+}
diff --git a/test/locale-mbwc/tst_wcsxfrm.c b/test/locale-mbwc/tst_wcsxfrm.c
new file mode 100644
index 000000000..6fb8a1c28
--- /dev/null
+++ b/test/locale-mbwc/tst_wcsxfrm.c
@@ -0,0 +1,122 @@
+/*
+ WCSXFRM: size_t wcsxfrm (wchar_t *ws1, const wchar_t *ws2, size_t n);
+*/
+
+#define TST_FUNCTION wcsxfrm
+
+#include "tsp_common.c"
+#include "dat_wcsxfrm.c"
+
+int
+tst_wcsxfrm (FILE * fp, int debug_flg)
+{
+ TST_DECL_VARS (size_t);
+ wchar_t *org1, *org2;
+ wchar_t frm1[MBSSIZE], frm2[MBSSIZE];
+ size_t n1, n2;
+ int ret_coll, ret_cmp;
+
+ TST_DO_TEST (wcsxfrm)
+ {
+ TST_HEAD_LOCALE (wcsxfrm, S_WCSXFRM);
+ TST_DO_REC (wcsxfrm)
+ {
+ TST_GET_ERRET (wcsxfrm);
+ org1 = TST_INPUT (wcsxfrm).org1;
+ org2 = TST_INPUT (wcsxfrm).org2;
+ n1 = TST_INPUT (wcsxfrm).n1;
+ n2 = TST_INPUT (wcsxfrm).n2;
+ if (n1 < 0 || sizeof (frm1) < n1 || sizeof (frm2) < n2)
+ {
+ warn_count++;
+ Result (C_IGNORED, S_WCSXFRM, CASE_9,
+ "input data n1 or n2 is invalid");
+ continue;
+ }
+
+ /* an errno and a return value are checked
+ only for 2nd wcsxfrm() call.
+ A result of 1st call is used to compare
+ those 2 values by using wcscmp().
+ */
+
+ TST_CLEAR_ERRNO;
+ ret = wcsxfrm (frm1, org1, n1); /* First call */
+ TST_SAVE_ERRNO;
+
+ if (debug_flg)
+ {
+ fprintf (stdout, "tst_wcsxfrm() : REC = %d\n", rec + 1);
+ fprintf (stdout, "tst_wcsxfrm() : 1st ret = %zu\n", ret);
+ }
+
+ if (ret == -1 || ret >= n1 || errno_save != 0)
+ {
+ warn_count++;
+ Result (C_INVALID, S_WCSXFRM, CASE_8,
+ "got an error in fist wcsxfrm() call");
+ continue;
+ }
+
+ TST_CLEAR_ERRNO;
+ /* Second call */
+ ret = wcsxfrm (((n2 == 0) ? NULL : frm2), org2, n2);
+ TST_SAVE_ERRNO;
+
+ TST_IF_RETURN (S_WCSXFRM)
+ {
+ };
+
+ if (n2 == 0 || ret >= n2 || errno != 0)
+ {
+#if 0
+ warn_count++;
+ Result (C_IGNORED, S_WCSXFRM, CASE_7, "did not get a result");
+#endif
+ continue;
+ }
+
+ if (debug_flg)
+ {
+ fprintf (stdout, "tst_wcsxfrm() : 2nd ret = %zu\n", ret);
+ }
+
+ /* wcscoll() */
+ TST_CLEAR_ERRNO;
+ /* depends on wcscoll() ... not good though ... */
+ ret_coll = wcscoll (org1, org2);
+ TST_SAVE_ERRNO;
+
+ if (errno != 0) /* bugs * bugs may got correct results ... */
+ {
+ warn_count++;
+ Result (C_INVALID, S_WCSXFRM, CASE_6,
+ "got an error in wcscoll() call");
+ continue;
+ }
+ /* wcscmp() */
+ ret_cmp = wcscmp (frm1, frm2);
+
+ if ((ret_coll == ret_cmp) || (ret_coll > 0 && ret_cmp > 0)
+ || (ret_coll < 0 && ret_cmp < 0))
+ {
+ Result (C_SUCCESS, S_WCSXFRM, CASE_3,
+ MS_PASSED " (depends on wcscoll & wcscmp)");
+ }
+ else
+ {
+ err_count++;
+ Result (C_FAILURE, S_WCSXFRM, CASE_3,
+ "results from wcscoll & wcscmp() do not match");
+ }
+
+ if (debug_flg)
+ {
+ fprintf (stdout, "tst_wcsxfrm() : coll = %d <-> %d = cmp\n",
+ ret_coll, ret_cmp);
+ }
+ }
+ }
+
+ return err_count;
+}
diff --git a/test/locale-mbwc/tst_wctob.c b/test/locale-mbwc/tst_wctob.c
new file mode 100644
index 000000000..2377daf59
--- /dev/null
+++ b/test/locale-mbwc/tst_wctob.c
@@ -0,0 +1,37 @@
+/*-------------------------------------------------------------------------------------*/
+/* WCTOB: int wctob( wint_t wc ) */
+/*-------------------------------------------------------------------------------------*/
+
+#define TST_FUNCTION wctob
+
+#include "tsp_common.c"
+#include "dat_wctob.c"
+
+int
+tst_wctob (FILE * fp, int debug_flg)
+{
+ TST_DECL_VARS (int);
+ wchar_t wc;
+
+ TST_DO_TEST (wctob)
+ {
+ TST_HEAD_LOCALE (wctob, S_WCTOB);
+ TST_DO_REC (wctob)
+ {
+ TST_GET_ERRET (wctob);
+ wc = TST_INPUT (wctob).wc;
+ ret = wctob (wc);
+
+ if (debug_flg)
+ {
+ fprintf (stderr, "tst_wctob : [ %d ] ret = %d\n", rec + 1, ret);
+ }
+
+ TST_IF_RETURN (S_WCTOB)
+ {
+ };
+ }
+ }
+
+ return err_count;
+}
diff --git a/test/locale-mbwc/tst_wctomb.c b/test/locale-mbwc/tst_wctomb.c
new file mode 100644
index 000000000..aea89fed8
--- /dev/null
+++ b/test/locale-mbwc/tst_wctomb.c
@@ -0,0 +1,99 @@
+/*
+ WCTOMB: int wctomb (char *s, wchar_t wc)
+*/
+
+#define TST_FUNCTION wctomb
+
+#include "tsp_common.c"
+#include "dat_wctomb.c"
+
+int
+tst_wctomb (FILE * fp, int debug_flg)
+{
+ TST_DECL_VARS (int);
+ wchar_t wc;
+ char s[MBSSIZE], *s_in, *s_ex;
+ int err, i;
+
+ TST_DO_TEST (wctomb)
+ {
+ TST_HEAD_LOCALE (wctomb, S_WCTOMB);
+ TST_DO_REC (wctomb)
+ {
+ TST_GET_ERRET (wctomb);
+ wc = TST_INPUT (wctomb).wc;
+ s_in = ((TST_INPUT (wctomb).s_flg) == 0) ? (char *) NULL : s;
+ ret = wctomb (s_in, wc);
+
+ if (debug_flg)
+ {
+ fprintf (stdout, "wctomb() [ %s : %d ] ret = %d\n", locale,
+ rec + 1, ret);
+ }
+
+ TST_IF_RETURN (S_WCTOMB)
+ {
+ if (s_in == NULL) /* state dependency */
+ {
+ if (ret_exp == +1) /* state-dependent */
+ {
+ if (ret != 0)
+ {
+ /* Non-zero means state-dependent encoding. */
+ Result (C_SUCCESS, S_WCTOMB, CASE_3, MS_PASSED);
+ }
+ else
+ {
+ err_count++;
+ Result (C_FAILURE, S_WCTOMB, CASE_3,
+ "should be state-dependent encoding, "
+ "but a return value shows it is "
+ "state-independent");
+ }
+ }
+
+ if (ret_exp == 0) /* state-independent */
+ {
+ if (ret == 0)
+ {
+ /* Non-zero means state-dependent encoding. */
+ Result (C_SUCCESS, S_WCTOMB, CASE_3, MS_PASSED);
+ }
+ else
+ {
+ err_count++;
+ Result (C_FAILURE, S_WCTOMB, CASE_3,
+ "should be state-independent encoding, "
+ "but a return value shows it is state-dependent");
+ }
+ }
+ }
+ }
+
+ s_ex = TST_EXPECT (wctomb).s;
+
+ if (s_in)
+ {
+ for (i = 0, err = 0; *(s_ex + i) != 0 && i < MBSSIZE; i++)
+ {
+ if (s_in[i] != s_ex[i])
+ {
+ err++;
+ err_count++;
+ Result (C_FAILURE, S_WCTOMB, CASE_4,
+ "copied string is different from an"
+ " expected string");
+ break;
+ }
+ }
+
+ if (!err)
+ {
+ Result (C_SUCCESS, S_WCTOMB, CASE_4, MS_PASSED);
+ }
+ }
+ }
+ }
+
+ return err_count;
+}
diff --git a/test/locale-mbwc/tst_wctrans.c b/test/locale-mbwc/tst_wctrans.c
new file mode 100644
index 000000000..b422d6ff9
--- /dev/null
+++ b/test/locale-mbwc/tst_wctrans.c
@@ -0,0 +1,52 @@
+/*
+ WCTRANS: wctrans_t wctrans (const char *charclass);
+*/
+
+#define TST_FUNCTION wctrans
+
+#include "tsp_common.c"
+#include "dat_wctrans.c"
+
+int
+tst_wctrans (FILE * fp, int debug_flg)
+{
+ TST_DECL_VARS (wctrans_t);
+ char *class;
+
+ TST_DO_TEST (wctrans)
+ {
+ TST_HEAD_LOCALE (wctrans, S_WCTRANS);
+ TST_DO_REC (wctrans)
+ {
+ TST_GET_ERRET (wctrans);
+ class = TST_INPUT (wctrans).class;
+
+ TST_CLEAR_ERRNO;
+ ret = wctrans (class);
+ TST_SAVE_ERRNO;
+
+ if (debug_flg)
+ {
+ fprintf (stderr, "tst_wctrans : [ %d ] ret = %ld\n", rec + 1,
+ (long int) ret);
+ fprintf (stderr, " errno = %d\n", errno_save);
+ }
+
+ TST_IF_RETURN (S_WCTRANS)
+ {
+ if (ret != 0)
+ {
+ Result (C_SUCCESS, S_WCTYPE, CASE_3, MS_PASSED);
+ }
+ else
+ {
+ err_count++;
+ Result (C_FAILURE, S_WCTYPE, CASE_3,
+ "should return non-0, but returned 0");
+ }
+ }
+ }
+ }
+
+ return err_count;
+}
diff --git a/test/locale-mbwc/tst_wctype.c b/test/locale-mbwc/tst_wctype.c
new file mode 100644
index 000000000..a203e4908
--- /dev/null
+++ b/test/locale-mbwc/tst_wctype.c
@@ -0,0 +1,48 @@
+/*
+ WCTYPE: wctype_t wctype (const char *class);
+*/
+
+
+#define TST_FUNCTION wctype
+
+#include "tsp_common.c"
+#include "dat_wctype.c"
+
+int
+tst_wctype (FILE * fp, int debug_flg)
+{
+ TST_DECL_VARS (wctype_t);
+ char *class;
+
+ TST_DO_TEST (wctype)
+ {
+ TST_HEAD_LOCALE (wctype, S_WCTYPE);
+ TST_DO_REC (wctype)
+ {
+ TST_GET_ERRET (wctype);
+ class = TST_INPUT (wctype).class;
+ ret = wctype (class);
+
+ if (debug_flg)
+ {
+ fprintf (stderr, "tst_wctype : [ %d ] ret = %ld\n", rec + 1, ret);
+ }
+
+ TST_IF_RETURN (S_WCTYPE)
+ {
+ if (ret != 0)
+ {
+ Result (C_SUCCESS, S_WCTYPE, CASE_3, MS_PASSED);
+ }
+ else
+ {
+ err_count++;
+ Result (C_FAILURE, S_WCTYPE, CASE_3,
+ "should return non-0, but returned 0");
+ }
+ }
+ }
+ }
+
+ return err_count;
+}
diff --git a/test/locale-mbwc/tst_wcwidth.c b/test/locale-mbwc/tst_wcwidth.c
new file mode 100644
index 000000000..6a5af6fa3
--- /dev/null
+++ b/test/locale-mbwc/tst_wcwidth.c
@@ -0,0 +1,38 @@
+/*
+ WCWIDTH: int wcwidth (wchar_t wc);
+*/
+
+#define TST_FUNCTION wcwidth
+
+#include "tsp_common.c"
+#include "dat_wcwidth.c"
+
+int
+tst_wcwidth (FILE * fp, int debug_flg)
+{
+ TST_DECL_VARS (int);
+ wchar_t wc;
+
+ TST_DO_TEST (wcwidth)
+ {
+ TST_HEAD_LOCALE (wcwidth, S_WCWIDTH);
+ TST_DO_REC (wcwidth)
+ {
+ TST_GET_ERRET (wcwidth);
+ wc = TST_INPUT (wcwidth).wc;
+ ret = wcwidth (wc);
+
+ if (debug_flg)
+ {
+ fprintf (stdout, "wcwidth() [ %s : %d ] ret = %d\n", locale,
+ rec + 1, ret);
+ }
+
+ TST_IF_RETURN (S_WCWIDTH)
+ {
+ }
+ }
+ }
+
+ return err_count;
+}