Blame localedata/tests-mbwc/tst_wcsncmp.c
|
Packit |
6c4009 |
/*-------------------------------------------------------------------------------------*/
|
|
Packit |
6c4009 |
/* WCSNCMP: int wcsncmp( const wchar_t *ws1, const wchar_t *ws2, size_t n ) */
|
|
Packit |
6c4009 |
/*-------------------------------------------------------------------------------------*/
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#define TST_FUNCTION wcsncmp
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#include "tsp_common.c"
|
|
Packit |
6c4009 |
#include "dat_wcsncmp.c"
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
int
|
|
Packit |
6c4009 |
tst_wcsncmp (FILE * fp, int debug_flg)
|
|
Packit |
6c4009 |
{
|
|
Packit |
6c4009 |
TST_DECL_VARS (int);
|
|
Packit |
6c4009 |
wchar_t *ws1, *ws2;
|
|
Packit |
6c4009 |
size_t n;
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
TST_DO_TEST (wcsncmp)
|
|
Packit |
6c4009 |
{
|
|
Packit |
6c4009 |
TST_HEAD_LOCALE (wcsncmp, S_WCSNCMP);
|
|
Packit |
6c4009 |
TST_DO_REC (wcsncmp)
|
|
Packit |
6c4009 |
{
|
|
Packit |
6c4009 |
TST_GET_ERRET (wcsncmp);
|
|
Packit |
6c4009 |
ws1 = TST_INPUT (wcsncmp).ws1; /* external value: size WCSSIZE */
|
|
Packit |
6c4009 |
ws2 = TST_INPUT (wcsncmp).ws2;
|
|
Packit |
6c4009 |
n = TST_INPUT (wcsncmp).n;
|
|
Packit |
6c4009 |
ret = wcsncmp (ws1, ws2, n);
|
|
Packit |
6c4009 |
ret = (ret > 0 ? 1 : ret < 0 ? -1 : 0);
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
if (debug_flg)
|
|
Packit |
6c4009 |
{
|
|
Packit |
6c4009 |
fprintf (stderr, "tst_wcsncmp: ret = %d, 0x%x\n", ret, ret);
|
|
Packit |
6c4009 |
}
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
TST_IF_RETURN (S_WCSNCMP)
|
|
Packit |
6c4009 |
{
|
|
Packit |
6c4009 |
};
|
|
Packit |
6c4009 |
}
|
|
Packit |
6c4009 |
}
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
return err_count;
|
|
Packit |
6c4009 |
}
|