mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-25 06:20:06 +00:00
eabea97226
2002-06-29 Ulrich Drepper <drepper@redhat.com> * catgets/gencat.c (read_input_file): Handle more than one slash at end of line correctly [PR libc/3926]. Based on a patch by Steven Kim <steven.kim@peregrine.com>. * catgets/sample.SJIS: Add test case for above bug. * catgets/test-gencat.c: Adjust test code. * catgets/test-gencat.sh: Adjust expected results. * elf/do-rel.h (elf_dynamic_do_rel): Avoid overflow in computation to skip relative relocations. Patch by Geoff Keating <geoffk@redhat.com>.
32 lines
775 B
C
32 lines
775 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);
|
|
if (catalog == (nl_catd) -1)
|
|
{
|
|
printf ("no catalog: %m\n");
|
|
exit (1);
|
|
}
|
|
|
|
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"));
|
|
printf ("%s\n", catgets(catalog, 1, 6, "sample 6"));
|
|
printf ("%s\n", catgets(catalog, 1, 7, "sample 7"));
|
|
catclose (catalog);
|
|
|
|
return 0;
|
|
}
|