]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Change some msgfmt error message to include the file name.
authorBruno Haible <bruno@clisp.org>
Mon, 21 Jan 2002 13:23:18 +0000 (13:23 +0000)
committerBruno Haible <bruno@clisp.org>
Sun, 21 Jun 2009 23:04:24 +0000 (01:04 +0200)
lib/ChangeLog
lib/xerror.c
src/ChangeLog
src/msgfmt.c

index 1ff942de5268bbfdc27ca74201adf74f495575b6..feda4f4dc344bbc145f7bb2dc742725bd5d9b707 100644 (file)
@@ -1,3 +1,8 @@
+2002-01-19  Bruno Haible  <bruno@clisp.org>
+
+       * xerror.c (multiline_warning): Add a newline if the message doesn't
+       terminate with a newline.
+
 2002-01-12  Bruno Haible  <bruno@clisp.org>
 
        * gettext.h (gettext_noop): Remove the parentheses around the
index 349bb734e661eb5ebe01caefd766148cd19a897a..424715374858de40712f0239f8b55bb78897a550 100644 (file)
@@ -1,5 +1,5 @@
 /* Multiline error-reporting functions.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
@@ -118,6 +118,9 @@ 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;
        }
 
index d370b1baaff0414fe434959a46f3d79cdf36c600..c5c5f9ceea1bba6478eea8a0e461d5933d43a5d2 100644 (file)
@@ -1,3 +1,8 @@
+2002-01-19  Bruno Haible  <bruno@clisp.org>
+
+       * msgfmt.c (check_header_entry): Emit error messages including the
+       file name.
+
 2002-01-19  Bruno Haible  <bruno@clisp.org>
 
        * open-po.c (open_po_file): Use 'size_t' instead of 'int'.
index 08d2159fd3eec1a2b2dbf7413f1ae2fcebb32c16..523ffb85d0bfc857b54b12937d78aedd51135744 100644 (file)
@@ -1197,11 +1197,14 @@ check_header_entry (msgstr_string)
       char *endp = strstr (msgstr_string, required_fields[cnt]);
 
       if (endp == NULL)
-       error (0, 0, _("headerfield `%s' missing in header"),
-              required_fields[cnt]);
+       multiline_error (xasprintf ("%s: ", gram_pos.file_name),
+                        xasprintf (_("headerfield `%s' missing in header"),
+                                   required_fields[cnt]));
       else if (endp != msgstr_string && endp[-1] != '\n')
-       error (0, 0, _("header field `%s' should start at beginning of line"),
-              required_fields[cnt]);
+       multiline_error (xasprintf ("%s: ", gram_pos.file_name),
+                        xasprintf (_("\
+header field `%s' should start at beginning of line"),
+                                   required_fields[cnt]));
       else if (default_values[cnt] != NULL
               && strncmp (default_values[cnt],
                           endp + strlen (required_fields[cnt]) + 2,
@@ -1209,8 +1212,9 @@ check_header_entry (msgstr_string)
        {
          if (initial != -1)
            {
-             error (0, 0, _("\
-some header fields still have the initial default value"));
+             multiline_error (xasprintf ("%s: ", gram_pos.file_name),
+                              xstrdup (_("\
+some header fields still have the initial default value")));
              initial = -1;
              break;
            }
@@ -1220,8 +1224,9 @@ some header fields still have the initial default value"));
     }
 
   if (initial != -1)
-    error (0, 0, _("field `%s' still has initial default value"),
-          required_fields[initial]);
+    multiline_error (xasprintf ("%s: ", gram_pos.file_name),
+                    xasprintf (_("field `%s' still has initial default value"),
+                               required_fields[initial]));
 }