* gettext-tools/src/msgl-merge.h (merge): Add definitions_file_syntax parameter.
Rename input_syntax parameter to references_file_syntax.
* gettext-tools/src/msgl-merge.c (merge): Likewise.
* gettext-tools/src/msginit.c (main): New variable output_file_input_syntax.
Fix merge() call.
* gettext-tools/src/msgmerge.c (main): Update merge() call.
char *output_file = NULL;
const char *input_file = NULL;
catalog_input_format_ty input_syntax = &input_format_po;
+ catalog_input_format_ty output_file_input_syntax = &input_format_po;
catalog_output_format_ty output_syntax = &output_format_po;
locale = NULL;
break;
case 'p':
+ output_file_input_syntax = &input_format_properties;
output_syntax = &output_format_properties;
break;
break;
case CHAR_MAX + 4: /* --stringtable-output */
+ output_file_input_syntax = &input_format_stringtable;
output_syntax = &output_format_stringtable;
break;
quiet = true;
keep_previous = true;
msgdomain_list_ty *def;
- result = merge (output_file, input_file, input_syntax, &def);
+ result = merge (output_file, output_file_input_syntax,
+ input_file, input_syntax,
+ &def);
/* Update the header entry. */
result = fill_header (result, false);
}
msgdomain_list_ty *
-merge (const char *definitions_file_name, const char *references_file_name,
- catalog_input_format_ty input_syntax,
+merge (const char *definitions_file_name,
+ catalog_input_format_ty definitions_file_syntax,
+ const char *references_file_name,
+ catalog_input_format_ty references_file_syntax,
msgdomain_list_ty **defp)
{
struct statistics stats;
stats.merged = stats.fuzzied = stats.missing = stats.obsolete = 0;
/* This is the definitions file, created by a human. */
- msgdomain_list_ty *def = read_catalog_file (definitions_file_name, input_syntax);
+ msgdomain_list_ty *def =
+ read_catalog_file (definitions_file_name, definitions_file_syntax);
/* This is the references file, created by groping the sources with
the xgettext program. */
- msgdomain_list_ty *ref = read_catalog_file (references_file_name, input_syntax);
+ msgdomain_list_ty *ref =
+ read_catalog_file (references_file_name, references_file_syntax);
check_pot_charset (ref, references_file_name);
/* Add a dummy header entry, if the references file contains none. */
for (size_t k = 0; k < ref->nitems; k++)
/* Merging a .po file with a .pot file.
- Copyright (C) 1995-2025 Free Software Foundation, Inc.
+ Copyright (C) 1995-2026 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
extern msgdomain_list_ty *
merge (const char *definitions_file_name,
+ catalog_input_format_ty definitions_file_syntax,
const char *references_file_name,
- catalog_input_format_ty input_syntax,
+ catalog_input_format_ty references_file_syntax,
msgdomain_list_ty **defp);
/* Merge the two files. */
msgdomain_list_ty *def;
msgdomain_list_ty *result =
- merge (argv[optind], argv[optind + 1], input_syntax, &def);
+ merge (argv[optind], input_syntax, argv[optind + 1], input_syntax, &def);
/* Sort the results. */
if (sort_by_filepos)