From: Bruno Haible Date: Tue, 5 Feb 2002 13:04:35 +0000 (+0000) Subject: Remove temporary hack. X-Git-Tag: v0.11.1~96 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b3eef81045bccf496567379f054be9a9b906400;p=thirdparty%2Fgettext.git Remove temporary hack. --- diff --git a/lib/ChangeLog b/lib/ChangeLog index de83280ff..87b4f1dbe 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,7 @@ +2002-02-03 Bruno Haible + + * xerror.c (multiline_warning): Remove temporary hack. + 2002-01-31 Bruno Haible * gettext-0.11 released. diff --git a/lib/xerror.c b/lib/xerror.c index 424715374..dbb1e6ebb 100644 --- a/lib/xerror.c +++ b/lib/xerror.c @@ -118,9 +118,6 @@ multiline_warning (prefix, message) if (np == NULL || np[1] == '\0') { fputs (cp, stderr); - /* Temporary hack for gettext-0.11 check_header_entry function. */ - if (np == NULL) - fputc ('\n', stderr); break; } diff --git a/src/ChangeLog b/src/ChangeLog index 2b3560438..7eb816c82 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2002-02-03 Bruno Haible + + * msgfmt.c (check_header_entry): Terminate the error strings with + newlines. + 2002-02-03 Bruno Haible * plural-table.h: New file. diff --git a/src/msgfmt.c b/src/msgfmt.c index 9f880325f..be5c2dc06 100644 --- a/src/msgfmt.c +++ b/src/msgfmt.c @@ -797,32 +797,36 @@ check_plural (mlp) min_pos = NULL; max_nplurals = 0; max_pos = NULL; - for (j = 0; j < mlp->nitems; j++) { - message_ty *mp = mlp->item[j]; - - if (mp->msgid_plural != NULL) { - const char *p; - const char *p_end; - unsigned long n; + for (j = 0; j < mlp->nitems; j++) + { + message_ty *mp = mlp->item[j]; - if (has_plural == NULL) - has_plural = &mp->pos; - - n = 0; - for (p = mp->msgstr, p_end = p + mp->msgstr_len; - p < p_end; - p += strlen (p) + 1) - n++; - if (min_nplurals > n) { - min_nplurals = n; - min_pos = &mp->pos; - } - if (max_nplurals > n) { - max_nplurals = n; - min_pos = &mp->pos; - } + if (mp->msgid_plural != NULL) + { + const char *p; + const char *p_end; + unsigned long n; + + if (has_plural == NULL) + has_plural = &mp->pos; + + n = 0; + for (p = mp->msgstr, p_end = p + mp->msgstr_len; + p < p_end; + p += strlen (p) + 1) + n++; + if (min_nplurals > n) + { + min_nplurals = n; + min_pos = &mp->pos; + } + if (max_nplurals > n) + { + max_nplurals = n; + min_pos = &mp->pos; + } + } } - } /* Look at the plural entry for this domain. Cf, function extract_plural_expression. */ @@ -1230,12 +1234,12 @@ check_header_entry (msgstr_string) if (endp == NULL) multiline_error (xasprintf ("%s: ", gram_pos.file_name), - xasprintf (_("headerfield `%s' missing in header"), + xasprintf (_("headerfield `%s' missing in header\n"), required_fields[cnt])); else if (endp != msgstr_string && endp[-1] != '\n') multiline_error (xasprintf ("%s: ", gram_pos.file_name), xasprintf (_("\ -header field `%s' should start at beginning of line"), +header field `%s' should start at beginning of line\n"), required_fields[cnt])); else if (default_values[cnt] != NULL && strncmp (default_values[cnt], @@ -1246,7 +1250,7 @@ header field `%s' should start at beginning of line"), { multiline_error (xasprintf ("%s: ", gram_pos.file_name), xstrdup (_("\ -some header fields still have the initial default value"))); +some header fields still have the initial default value\n"))); initial = -1; break; } @@ -1257,7 +1261,8 @@ some header fields still have the initial default value"))); if (initial != -1) multiline_error (xasprintf ("%s: ", gram_pos.file_name), - xasprintf (_("field `%s' still has initial default value"), + xasprintf (_("\ +field `%s' still has initial default value\n"), required_fields[initial])); }