+2001-09-19 Bruno Haible <haible@clisp.cons.org>
+
+ * xgettext.h (omit_header): New declaration.
+ * xgettext.c (omit_header): Make global.
+ * x-po.c (extract_directive_message): Don't throw the header entry
+ away if omit_header is true.
+
2001-09-19 Bruno Haible <haible@clisp.cons.org>
* write-po.c (msgdomain_list_print): Treat charset=CHARSET as if it
if (exclude != NULL && message_list_search (exclude, msgid) != NULL)
goto discard;
- /* If the msgid is the empty string, it is the old header.
- Throw it away, we have constructed a new one. */
- if (*msgid == '\0')
+ /* If the msgid is the empty string, it is the old header. Throw it
+ away, we have constructed a new one.
+ But if no new one was constructed, keep the old header. This is useful
+ because the old header may contain a charset= directive. */
+ if (*msgid == '\0' && !omit_header)
{
discard:
free (msgid);