~ubuntu-branches/ubuntu/hardy/belocs-locales-data/hardy

« back to all changes in this revision

Viewing changes to localedata/tests-mbwc/tst_wcscmp.c

  • Committer: Bazaar Package Importer
  • Author(s): Denis Barbier
  • Date: 2005-05-17 22:09:38 UTC
  • Revision ID: james.westby@ubuntu.com-20050517220938-814x2iu6tkj3ml2o
Tags: upstream-2.3.4
ImportĀ upstreamĀ versionĀ 2.3.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
  WCSCMP: int wcscmp (const wchar_t *ws1, const wchar_t *ws2);
 
3
*/
 
4
 
 
5
#define TST_FUNCTION wcscmp
 
6
 
 
7
#include "tsp_common.c"
 
8
#include "dat_wcscmp.c"
 
9
 
 
10
 
 
11
int
 
12
tst_wcscmp (FILE * fp, int debug_flg)
 
13
{
 
14
  TST_DECL_VARS (int);
 
15
  wchar_t *ws1, *ws2;
 
16
 
 
17
  TST_DO_TEST (wcscmp)
 
18
  {
 
19
    TST_HEAD_LOCALE (wcscmp, S_WCSCMP);
 
20
    TST_DO_REC (wcscmp)
 
21
    {
 
22
      TST_GET_ERRET (wcscmp);
 
23
      ws1 = TST_INPUT (wcscmp).ws1;
 
24
      ws2 = TST_INPUT (wcscmp).ws2;
 
25
      ret = wcscmp (ws1, ws2);
 
26
      ret = (ret > 0 ? 1 : ret < 0 ? -1 : 0);
 
27
 
 
28
      if (debug_flg)
 
29
        {
 
30
          fprintf (stderr, "tst_wcscmp: ret = %d\n", ret);
 
31
        }
 
32
 
 
33
      TST_IF_RETURN (S_WCSCMP)
 
34
      {
 
35
      };
 
36
    }
 
37
  }
 
38
 
 
39
  return err_count;
 
40
}