From: Bruno Haible Date: Sun, 24 Aug 2003 18:11:08 +0000 (+0000) Subject: Use plural-count. X-Git-Tag: v0.13~309 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2808d44ff56ca6d61d4bec586700278d8c132a7e;p=thirdparty%2Fgettext.git Use plural-count. --- diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog index 63081f0b3..ad5b52ec5 100644 --- a/gettext-tools/src/ChangeLog +++ b/gettext-tools/src/ChangeLog @@ -2,6 +2,8 @@ * plural-count.h: New file. * plural-count.c: New file, extracted from msgmerge.c. + * msgmerge.c: Include plural-count.h instead of plural-exp.h. + (match_domain): Use function get_plural_count(). * Makefile.am (noinst_HEADERS): Add plural-count.h. (msgmerge_SOURCES): Add plural-count.c. * Makefile.msvc (msgmerge_OBJECTS): Add plural-count.obj. diff --git a/gettext-tools/src/msgmerge.c b/gettext-tools/src/msgmerge.c index d9cb33f75..a2e3591c4 100644 --- a/gettext-tools/src/msgmerge.c +++ b/gettext-tools/src/msgmerge.c @@ -47,7 +47,7 @@ #include "stpncpy.h" #include "msgl-iconv.h" #include "msgl-equal.h" -#include "plural-exp.h" +#include "plural-count.h" #include "backupfile.h" #include "copy-file.h" #include "gettext.h" @@ -977,14 +977,11 @@ this message is used but not defined in %s"), fn1); if (problematic & 1) { /* Need to know nplurals of the result domain. */ - message_ty *header_entry; - struct expression *plural; - - header_entry = message_list_search (resultmlp, ""); - extract_plural_expression (header_entry - ? header_entry->msgstr - : NULL, - &plural, &nplurals); + message_ty *header_entry = message_list_search (resultmlp, ""); + + nplurals = get_plural_count (header_entry + ? header_entry->msgstr + : NULL); } for (j = 0; j < resultmlp->nitems; j++)