Back to index

glibc  2.9
tst_wcsncmp.c
Go to the documentation of this file.
00001 /*-------------------------------------------------------------------------------------*/
00002 /* WCSNCMP: int wcsncmp( const wchar_t *ws1, const wchar_t *ws2, size_t n )         */
00003 /*-------------------------------------------------------------------------------------*/
00004 
00005 #define TST_FUNCTION wcsncmp
00006 
00007 #include "tsp_common.c"
00008 #include "dat_wcsncmp.c"
00009 
00010 int
00011 tst_wcsncmp (FILE * fp, int debug_flg)
00012 {
00013   TST_DECL_VARS (int);
00014   wchar_t *ws1, *ws2;
00015   size_t n;
00016 
00017   TST_DO_TEST (wcsncmp)
00018   {
00019     TST_HEAD_LOCALE (wcsncmp, S_WCSNCMP);
00020     TST_DO_REC (wcsncmp)
00021     {
00022       TST_GET_ERRET (wcsncmp);
00023       ws1 = TST_INPUT (wcsncmp).ws1;      /* external value: size WCSSIZE */
00024       ws2 = TST_INPUT (wcsncmp).ws2;
00025       n = TST_INPUT (wcsncmp).n;
00026       ret = wcsncmp (ws1, ws2, n);
00027 
00028       if (debug_flg)
00029        {
00030          fprintf (stderr, "tst_wcsncmp: ret = %d, 0x%x\n", ret, ret);
00031        }
00032 
00033       TST_IF_RETURN (S_WCSNCMP)
00034       {
00035       };
00036     }
00037   }
00038 
00039   return err_count;
00040 }