diff options
author | Bruno Haible <bruno@clisp.org> | 2002-02-05 13:04:35 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-06-22 01:16:18 +0200 |
commit | 8b3eef81045bccf496567379f054be9a9b906400 (patch) | |
tree | 4c6440cea65ddc5eb8ab405abf6adb70e27d5ad6 | |
parent | 4d714dd8854913b7c604da9bb62a2dfbf6e18c5f (diff) | |
download | external_gettext-8b3eef81045bccf496567379f054be9a9b906400.zip external_gettext-8b3eef81045bccf496567379f054be9a9b906400.tar.gz external_gettext-8b3eef81045bccf496567379f054be9a9b906400.tar.bz2 |
Remove temporary hack.
-rw-r--r-- | lib/ChangeLog | 4 | ||||
-rw-r--r-- | lib/xerror.c | 3 | ||||
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/msgfmt.c | 61 |
4 files changed, 42 insertions, 31 deletions
diff --git a/lib/ChangeLog b/lib/ChangeLog index de83280..87b4f1d 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,7 @@ +2002-02-03 Bruno Haible <bruno@clisp.org> + + * xerror.c (multiline_warning): Remove temporary hack. + 2002-01-31 Bruno Haible <bruno@clisp.org> * gettext-0.11 released. diff --git a/lib/xerror.c b/lib/xerror.c index 4247153..dbb1e6e 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 2b35604..7eb816c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2002-02-03 Bruno Haible <bruno@clisp.org> + * msgfmt.c (check_header_entry): Terminate the error strings with + newlines. + +2002-02-03 Bruno Haible <bruno@clisp.org> + * plural-table.h: New file. * plural-table.c: New file. * msginit.c: Include plural-table.h. diff --git a/src/msgfmt.c b/src/msgfmt.c index 9f88032..be5c2dc 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])); } |