mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-27 07:20:11 +00:00
0e16ecfa1e
* 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.
53 lines
935 B
C
53 lines
935 B
C
/*
|
|
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;
|
|
}
|