]> git.ipfire.org Git - thirdparty/glibc.git/blame - catgets/test-gencat.c
sparc64: Use linux generic time implementation
[thirdparty/glibc.git] / catgets / test-gencat.c
CommitLineData
14d5391f
UD
1#include <locale.h>
2#include <nl_types.h>
3#include <stdio.h>
4#include <stdlib.h>
5
29955b5d
AS
6static int
7do_test (void)
14d5391f
UD
8{
9 nl_catd catalog;
10 setlocale (LC_ALL, "");
11
12 printf ("LC_MESSAGES = %s\n", setlocale (LC_MESSAGES, NULL));
13
14 catalog = catopen ("sample", NL_CAT_LOCALE);
ca130fe4
UD
15 if (catalog == (nl_catd) -1)
16 {
17 printf ("no catalog: %m\n");
18 exit (1);
19 }
20
14d5391f
UD
21 printf ("%s\n", catgets(catalog, 1, 1, "sample 1"));
22 printf ("%s\n", catgets(catalog, 1, 2, "sample 2"));
23 printf ("%s\n", catgets(catalog, 1, 3, "sample 3"));
24 printf ("%s\n", catgets(catalog, 1, 4, "sample 4"));
25 printf ("%s\n", catgets(catalog, 1, 5, "sample 5"));
eabea972
UD
26 printf ("%s\n", catgets(catalog, 1, 6, "sample 6"));
27 printf ("%s\n", catgets(catalog, 1, 7, "sample 7"));
14d5391f
UD
28 catclose (catalog);
29
30 return 0;
31}
29955b5d
AS
32
33#define TEST_FUNCTION do_test ()
34#include "../test-skeleton.c"