From: Bruno Haible Date: Sat, 13 Oct 2007 15:53:46 +0000 (+0000) Subject: From glibc: 2007-07-26 Jakub Jelinek X-Git-Tag: v0.17~136 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2bf361d603f22941d9686693d2adbda4c0503ab;p=thirdparty%2Fgettext.git From glibc: 2007-07-26 Jakub Jelinek --- diff --git a/gettext-runtime/intl/ChangeLog b/gettext-runtime/intl/ChangeLog index 857bea4d5..ec238efec 100644 --- a/gettext-runtime/intl/ChangeLog +++ b/gettext-runtime/intl/ChangeLog @@ -1,3 +1,16 @@ +2007-07-26 Jakub Jelinek + + * gettextP.h (struct loaded_domain): Change plural to const + struct expression *. + * eval-plural.h (plural_eval): Change first argument to + const struct expression *. + * plural-exp.c (EXTRACT_PLURAL_EXPRESSION): Change first argument to + const struct expression **. + * plural-exp.h (EXTRACT_PLURAL_EXPRESSION, plural_eval): Adjust + prototypes. + * loadmsgcat.c (_nl_unload_domain): Cast away const in call to + __gettext_free_exp. + 2007-07-19 Jakub Jelinek * dcigettext.c (_nl_find_msg): Return NULL even if __gconv_open diff --git a/gettext-runtime/intl/eval-plural.h b/gettext-runtime/intl/eval-plural.h index dacd003db..21eecb3a0 100644 --- a/gettext-runtime/intl/eval-plural.h +++ b/gettext-runtime/intl/eval-plural.h @@ -1,5 +1,5 @@ /* Plural expression evaluation. - Copyright (C) 2000-2003 Free Software Foundation, Inc. + Copyright (C) 2000-2003, 2007 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published @@ -24,7 +24,7 @@ STATIC unsigned long int internal_function -plural_eval (struct expression *pexp, unsigned long int n) +plural_eval (const struct expression *pexp, unsigned long int n) { switch (pexp->nargs) { diff --git a/gettext-runtime/intl/gettextP.h b/gettext-runtime/intl/gettextP.h index 449eb7701..8a464de4e 100644 --- a/gettext-runtime/intl/gettextP.h +++ b/gettext-runtime/intl/gettextP.h @@ -186,7 +186,7 @@ struct loaded_domain struct converted_domain *conversions; size_t nconversions; - struct expression *plural; + const struct expression *plural; unsigned long int nplurals; }; diff --git a/gettext-runtime/intl/loadmsgcat.c b/gettext-runtime/intl/loadmsgcat.c index 8e01c53a5..ec766bc71 100644 --- a/gettext-runtime/intl/loadmsgcat.c +++ b/gettext-runtime/intl/loadmsgcat.c @@ -1,5 +1,5 @@ /* Load needed message catalogs. - Copyright (C) 1995-1999, 2000-2006 Free Software Foundation, Inc. + Copyright (C) 1995-1999, 2000-2007 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published @@ -1304,7 +1304,7 @@ _nl_unload_domain (struct loaded_domain *domain) size_t i; if (domain->plural != &__gettext_germanic_plural) - __gettext_free_exp (domain->plural); + __gettext_free_exp ((struct expression *) domain->plural); for (i = 0; i < domain->nconversions; i++) { diff --git a/gettext-runtime/intl/plural-exp.c b/gettext-runtime/intl/plural-exp.c index 46fa75811..751a688eb 100644 --- a/gettext-runtime/intl/plural-exp.c +++ b/gettext-runtime/intl/plural-exp.c @@ -1,5 +1,5 @@ /* Expression parsing for plural form selection. - Copyright (C) 2000-2001, 2003, 2005-2006 Free Software Foundation, Inc. + Copyright (C) 2000-2001, 2003, 2005-2007 Free Software Foundation, Inc. Written by Ulrich Drepper , 2000. This program is free software; you can redistribute it and/or modify it @@ -96,7 +96,8 @@ init_germanic_plural () void internal_function -EXTRACT_PLURAL_EXPRESSION (const char *nullentry, struct expression **pluralp, +EXTRACT_PLURAL_EXPRESSION (const char *nullentry, + const struct expression **pluralp, unsigned long int *npluralsp) { if (nullentry != NULL) diff --git a/gettext-runtime/intl/plural-exp.h b/gettext-runtime/intl/plural-exp.h index b0992b986..d6cb8c51b 100644 --- a/gettext-runtime/intl/plural-exp.h +++ b/gettext-runtime/intl/plural-exp.h @@ -1,5 +1,5 @@ /* Expression parsing and evaluation for plural form selection. - Copyright (C) 2000-2003, 2005-2006 Free Software Foundation, Inc. + Copyright (C) 2000-2003, 2005-2007 Free Software Foundation, Inc. Written by Ulrich Drepper , 2000. This program is free software; you can redistribute it and/or modify it @@ -112,12 +112,12 @@ extern void FREE_EXPRESSION (struct expression *exp) extern int PLURAL_PARSE (void *arg); extern struct expression GERMANIC_PLURAL attribute_hidden; extern void EXTRACT_PLURAL_EXPRESSION (const char *nullentry, - struct expression **pluralp, + const struct expression **pluralp, unsigned long int *npluralsp) internal_function; #if !defined (_LIBC) && !defined (IN_LIBINTL) && !defined (IN_LIBGLOCALE) -extern unsigned long int plural_eval (struct expression *pexp, +extern unsigned long int plural_eval (const struct expression *pexp, unsigned long int n); #endif