From 2f599545f5ad0e51aa3edd445edd18ca1d7ec2df Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 20 Aug 2000 08:24:10 +0000 Subject: Update. 2000-08-20 Ulrich Drepper * intl/loadmsgcat.c (_nl_unload_domain): Also free conv_tab element. Pretty printing. * intl/plural.y (new_exp): Take number of optional parameters in second parameter. Test for correct number of parameters and free correctly in case of failure. Adjust all callers. (yylex): Allow ';' as terminator character. --- intl/loadmsgcat.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'intl/loadmsgcat.c') diff --git a/intl/loadmsgcat.c b/intl/loadmsgcat.c index 398d7518d9..2b6262ea38 100644 --- a/intl/loadmsgcat.c +++ b/intl/loadmsgcat.c @@ -386,21 +386,17 @@ _nl_unload_domain (domain) if (domain->plural != &germanic_plural) __gettext_free_exp (domain->plural); -#ifdef _LIBC + if (domain->conv_tab != NULL && domain->conv_tab != (char **) -1) + free (domain->conv_tab); + if (domain->conv != (__gconv_t) -1) __gconv_close (domain->conv); -#else -# if HAVE_ICONV - if (domain->conv != (iconv_t) -1) - iconv_close (domain->conv); -# endif -#endif -#ifdef _POSIX_MAPPED_FILES +# ifdef _POSIX_MAPPED_FILES if (domain->use_mmap) munmap ((caddr_t) domain->data, domain->mmap_size); else -#endif /* _POSIX_MAPPED_FILES */ +# endif /* _POSIX_MAPPED_FILES */ free ((void *) domain->data); free (domain); -- cgit 1.4.1