From ca130fe4651a2ca547b05187bdc2804defc8a66b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 8 Aug 2001 21:25:01 +0000 Subject: Update. * catgets/open_catalog.c: Rewrite code to assume that the function is called at catopen time and not delayed in catgets. * catgets/catgets.c (catopen): Call __open_catalog and fail if that function failed. (catgets): Remove code for delayed opening of catalog. * catgets/catgetsinfo.h: Remove now unnecessary information from struct catalog_info. Change __open_catalog prototype. * catgets/gencat.c: Adjust __open_catalog call. * catgets/test-gencat.c: Stop program if catopen failed. --- catgets/test-gencat.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'catgets/test-gencat.c') diff --git a/catgets/test-gencat.c b/catgets/test-gencat.c index fe5d0916b7..cb026fdc60 100644 --- a/catgets/test-gencat.c +++ b/catgets/test-gencat.c @@ -12,6 +12,12 @@ main (void) 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")); -- cgit 1.4.1