1 /*-------------------------------------------------------------------------------------*/
2 /* WCSNCMP: int wcsncmp( const wchar_t *ws1, const wchar_t *ws2, size_t n ) */
3 /*-------------------------------------------------------------------------------------*/
5 #define TST_FUNCTION wcsncmp
7 #include "tsp_common.c"
8 #include "dat_wcsncmp.c"
11 tst_wcsncmp (FILE * fp
, int debug_flg
)
19 TST_HEAD_LOCALE (wcsncmp
, S_WCSNCMP
);
22 TST_GET_ERRET (wcsncmp
);
23 ws1
= TST_INPUT (wcsncmp
).ws1
; /* external value: size WCSSIZE */
24 ws2
= TST_INPUT (wcsncmp
).ws2
;
25 n
= TST_INPUT (wcsncmp
).n
;
26 ret
= wcsncmp (ws1
, ws2
, n
);
27 ret
= (ret
> 0 ? 1 : ret
< 0 ? -1 : 0);
31 fprintf (stderr
, "tst_wcsncmp: ret = %d, 0x%x\n", ret
, ret
);
34 TST_IF_RETURN (S_WCSNCMP
)