aboutsummaryrefslogtreecommitdiff
path: root/catgets/gencat.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-08-08 21:25:01 +0000
committerUlrich Drepper <drepper@redhat.com>2001-08-08 21:25:01 +0000
commitca130fe4651a2ca547b05187bdc2804defc8a66b (patch)
tree9e743e6df3161a03fda43de4ff71f3b52f21c4fa /catgets/gencat.c
parent443470c3360d5d4ffb8f3078f47cda55fd5cffbd (diff)
downloadglibc-ca130fe4651a2ca547b05187bdc2804defc8a66b.zip
glibc-ca130fe4651a2ca547b05187bdc2804defc8a66b.tar.gz
glibc-ca130fe4651a2ca547b05187bdc2804defc8a66b.tar.bz2
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.
Diffstat (limited to 'catgets/gencat.c')
-rw-r--r--catgets/gencat.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/catgets/gencat.c b/catgets/gencat.c
index 103e832..ce5c4dc 100644
--- a/catgets/gencat.c
+++ b/catgets/gencat.c
@@ -1187,21 +1187,15 @@ read_old (struct catalog *catalog, const char *file_name)
int last_set = -1;
size_t cnt;
- old_cat_obj.status = closed;
- old_cat_obj.cat_name = file_name;
- old_cat_obj.nlspath = NULL;
- __libc_lock_init (old_cat_obj.lock);
-
/* Try to open catalog, but don't look through the NLSPATH. */
- __open_catalog (&old_cat_obj);
-
- if (old_cat_obj.status != mmapped && old_cat_obj.status != malloced)
+ if (__open_catalog (file_name, NULL, NULL, &old_cat_obj) != 0)
{
if (errno == ENOENT)
/* No problem, the catalog simply does not exist. */
return;
else
- error (EXIT_FAILURE, errno, gettext ("while opening old catalog file"));
+ error (EXIT_FAILURE, errno,
+ gettext ("while opening old catalog file"));
}
/* OK, we have the catalog loaded. Now read all messages and merge