Back to index

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