14d5391f9b
2000-11-28 Ulrich Drepper <drepper@redhat.com> * catgets/gencat.c (normalize_line): Take extra parameter with escape character. Change callers. (open_conversion): Determine mapping of 0x5c as wchar_t value. * catgets/Makefile: Add rules to build and run test-gencat. * catgets/sample.SJIS: New file. * catgets/test-gencat.c: New file. * catgets/test-gencat.sh: New file. Report and test case by Shinya Hanataka <hanataka@abyss.rim.or.jp>.
24 lines
570 B
C
24 lines
570 B
C
#include <locale.h>
|
|
#include <nl_types.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
int
|
|
main (void)
|
|
{
|
|
nl_catd catalog;
|
|
setlocale (LC_ALL, "");
|
|
|
|
printf ("LC_MESSAGES = %s\n", setlocale (LC_MESSAGES, NULL));
|
|
|
|
catalog = catopen ("sample", NL_CAT_LOCALE);
|
|
printf ("%s\n", catgets(catalog, 1, 1, "sample 1"));
|
|
printf ("%s\n", catgets(catalog, 1, 2, "sample 2"));
|
|
printf ("%s\n", catgets(catalog, 1, 3, "sample 3"));
|
|
printf ("%s\n", catgets(catalog, 1, 4, "sample 4"));
|
|
printf ("%s\n", catgets(catalog, 1, 5, "sample 5"));
|
|
catclose (catalog);
|
|
|
|
return 0;
|
|
}
|