+2009-01-18 Bruno Haible <bruno@clisp.org>
+
+ Fix a '(null)' in an error message. Bug present since gettext-0.16.
+ * read-catalog.h (DEFAULT_CATALOG_READER_TY): Add a file_name field.
+ * read-catalog.c (read_catalog_stream): Initialize it.
+ * x-po.c (extract): Likewise.
+ * msgfmt.c (read_catalog_file_msgfmt): Likewise.
+ (msgfmt_parse_debrief): Use the file_name field from the catalog reader
+ instead of gram_pos.file_name.
+
2009-01-17 Bruno Haible <bruno@clisp.org>
Update after gnulib changed.
/* Converts Uniforum style .po files to binary .mo files
- Copyright (C) 1995-1998, 2000-2007 Free Software Foundation, Inc.
+ Copyright (C) 1995-1998, 2000-2007, 2009 Free Software Foundation, Inc.
Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, April 1995.
This program is free software: you can redistribute it and/or modify
{
if (!this->has_header_entry)
{
- multiline_error (xasprintf ("%s: ", gram_pos.file_name),
+ multiline_error (xasprintf ("%s: ", this->file_name),
xasprintf (_("\
warning: PO file header missing or invalid\n")));
multiline_error (NULL,
ignore a fuzzy header entry and even give an error on it, we
give a warning, to increase operability with these older
msgfmt versions. This warning can go away in January 2003. */
- multiline_warning (xasprintf ("%s: ", gram_pos.file_name),
+ multiline_warning (xasprintf ("%s: ", this->file_name),
xasprintf (_("warning: PO file header fuzzy\n")));
multiline_warning (NULL,
xasprintf (_("\
pop->allow_domain_directives = true;
pop->allow_duplicates = false;
pop->allow_duplicates_if_same_msgstr = false;
+ pop->file_name = real_filename;
pop->mdlp = NULL;
pop->mlp = NULL;
if (current_domain != NULL)
/* Reading PO files.
- Copyright (C) 1995-1998, 2000-2003, 2005-2006, 2008 Free Software Foundation, Inc.
+ Copyright (C) 1995-1998, 2000-2003, 2005-2006, 2008-2009 Free Software Foundation, Inc.
This file was written by Peter Miller <millerp@canb.auug.org.au>
This program is free software: you can redistribute it and/or modify
pop->allow_domain_directives = true;
pop->allow_duplicates = allow_duplicates;
pop->allow_duplicates_if_same_msgstr = false;
+ pop->file_name = real_filename;
pop->mdlp = msgdomain_list_alloc (!pop->allow_duplicates);
pop->mlp = msgdomain_list_sublist (pop->mdlp, pop->domain, true);
if (input_syntax->produces_utf8)
/* Reading PO files.
- Copyright (C) 1995-1998, 2000-2003, 2005-2006, 2008 Free Software Foundation, Inc.
+ Copyright (C) 1995-1998, 2000-2003, 2005-2006, 2008-2009 Free Software Foundation, Inc.
This file was written by Bruno Haible <haible@clisp.cons.org>.
This program is free software: you can redistribute it and/or modify
/* If true, allow duplicates if they have the same translation. */ \
bool allow_duplicates_if_same_msgstr; \
\
+ /* File name used in error messages. */ \
+ const char *file_name; \
+ \
/* List of messages already appeared in the current file. */ \
msgdomain_list_ty *mdlp; \
\
/* xgettext PO and JavaProperties backends.
- Copyright (C) 1995-1998, 2000-2003, 2005-2006, 2008 Free Software Foundation, Inc.
+ Copyright (C) 1995-1998, 2000-2003, 2005-2006, 2008-2009 Free Software Foundation, Inc.
This file was written by Peter Miller <millerp@canb.auug.org.au>
pop->allow_domain_directives = false;
pop->allow_duplicates = false;
pop->allow_duplicates_if_same_msgstr = true;
+ pop->file_name = real_filename;
pop->mdlp = NULL;
pop->mlp = mdlp->item[0]->messages;
catalog_reader_parse ((abstract_catalog_reader_ty *) pop, fp, real_filename,