+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
/* 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
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;
}
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,
{
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;
}
}
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]));
}