Back to index

glibc  2.9
Defines | Functions
tst_wcscmp.c File Reference
#include "tsp_common.c"
#include "dat_wcscmp.c"

Go to the source code of this file.

Defines

#define TST_FUNCTION   wcscmp

Functions

int tst_wcscmp (FILE *fp, int debug_flg)

Define Documentation

#define TST_FUNCTION   wcscmp

Definition at line 5 of file tst_wcscmp.c.


Function Documentation

int tst_wcscmp ( FILE fp,
int  debug_flg 
)

Definition at line 12 of file tst_wcscmp.c.

{
  TST_DECL_VARS (int);
  wchar_t *ws1, *ws2;

  TST_DO_TEST (wcscmp)
  {
    TST_HEAD_LOCALE (wcscmp, S_WCSCMP);
    TST_DO_REC (wcscmp)
    {
      TST_GET_ERRET (wcscmp);
      ws1 = TST_INPUT (wcscmp).ws1;
      ws2 = TST_INPUT (wcscmp).ws2;
      ret = wcscmp (ws1, ws2);
      ret = (ret > 0 ? 1 : ret < 0 ? -1 : 0);

      if (debug_flg)
       {
         fprintf (stderr, "tst_wcscmp: ret = %d\n", ret);
       }

      TST_IF_RETURN (S_WCSCMP)
      {
      };
    }
  }

  return err_count;
}

Here is the call graph for this function: