lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame^] | 1 | /*-------------------------------------------------------------------------------------*/ |
| 2 | /* WCSNCMP: int wcsncmp( const wchar_t *ws1, const wchar_t *ws2, size_t n ) */ |
| 3 | /*-------------------------------------------------------------------------------------*/ |
| 4 | |
| 5 | #define TST_FUNCTION wcsncmp |
| 6 | |
| 7 | #include "tsp_common.c" |
| 8 | #include "dat_wcsncmp.c" |
| 9 | |
| 10 | int |
| 11 | tst_wcsncmp (FILE * fp, int debug_flg) |
| 12 | { |
| 13 | TST_DECL_VARS (int); |
| 14 | wchar_t *ws1, *ws2; |
| 15 | size_t n; |
| 16 | |
| 17 | TST_DO_TEST (wcsncmp) |
| 18 | { |
| 19 | TST_HEAD_LOCALE (wcsncmp, S_WCSNCMP); |
| 20 | TST_DO_REC (wcsncmp) |
| 21 | { |
| 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 | |
| 28 | if (debug_flg) |
| 29 | { |
| 30 | fprintf (stderr, "tst_wcsncmp: ret = %d, 0x%x\n", ret, ret); |
| 31 | } |
| 32 | |
| 33 | TST_IF_RETURN (S_WCSNCMP) |
| 34 | { |
| 35 | }; |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | return err_count; |
| 40 | } |