glibc/localedata/tests-mbwc/dat_wctob.c
Ulrich Drepper 0e16ecfa1e Update.
* locale/programs/ld-ctype.c (ctype_finish): Take all characters from
	the input charset into account when generating the hash table.
	(allocate_arrays): Correct setting default width.  Not all empty slots
	in the table are filled, only those not covert explicitly by the
	locale description and in the charset.

	* stdio-common/vfscanf.c: Make sure to always return WEOF and EOF for
	wide character version.
	For %C handling, test correct pointer variable for NULL.

	* wcsmbs/wctob.c: Handle WEOF special.

	* wcsmbs/wcwidth.h: 0xff in width array means invalid character.

	* wctype/wctype.h: Protect gcc-isms with __extension__.  Avoid
	always-true test to avoid warning.
2000-06-28 04:27:24 +00:00

58 lines
1.5 KiB
C

/*
* 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,0, 1, EOF } },
{ { 0x0020 }, { 0,0, 1, 0x20 } },
{ { 0x0061 }, { 0,0, 1, 0x61 } },
{ { 0x0080 }, { 0,0, 1, 0x80 } },
{ { 0x00C4 }, { 0,0, 1, 0xC4 } },
{ { 0x30C4 }, { 0,0, 1, EOF } },
{ is_last: 1 } /* Last element. */
}
},
{ { Twctob, TST_LOC_enUS },
{
{ { WEOF }, { 0,0, 1, EOF } },
{ { 0x0020 }, { 0,0, 1, 0x20 } },
{ { 0x0061 }, { 0,0, 1, 0x61 } },
#ifdef SHOJI_IS_RIGHT
{ { 0x0080 }, { 0,0, 1, 0x80 } },
{ { 0x00C4 }, { 0,0, 1, 0xC4 } },
#else
/* XXX These are no valid characters. */
{ { 0x0080 }, { 0,0, 1, EOF } },
{ { 0x00C4 }, { 0,0, 1, EOF } },
#endif
{ { 0x30C4 }, { 0,0, 1, EOF } },
{ is_last: 1 } /* Last element. */
}
},
{ { Twctob, TST_LOC_eucJP },
{
{ { WEOF }, { 0,0, 1, EOF } },
{ { 0x0020 }, { 0,0, 1, 0x20 } },
{ { 0x0061 }, { 0,0, 1, 0x61 } },
#ifdef SHOJI_IS_RIGHT
{ { 0x0080 }, { 0,0, 1, 0x80 } }, /* <WAIVER> */
#else
/* XXX These are no valid characters. */
{ { 0x0080 }, { 0,0, 1, EOF } },
#endif
{ { 0x00C4 }, { 0,0, 1, EOF } },
{ { 0x30C4 }, { 0,0, 1, EOF } },
{ is_last: 1 } /* Last element. */
}
},
{ { Twctob, TST_LOC_end } }
};