summaryrefslogtreecommitdiffstats
path: root/gettext-tools/src/msgexec.c
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2006-10-18 11:29:15 +0000
committerBruno Haible <bruno@clisp.org>2009-06-23 12:14:09 +0200
commitf1d3290e2043a85fcba1a7f6107c10fc16fcc508 (patch)
treea59c1050a91df71e29958b0ea4018bf785ced334 /gettext-tools/src/msgexec.c
parent412d2b4a7ba134358d037fee01d986b5c3be3f20 (diff)
downloadexternal_gettext-f1d3290e2043a85fcba1a7f6107c10fc16fcc508.zip
external_gettext-f1d3290e2043a85fcba1a7f6107c10fc16fcc508.tar.gz
external_gettext-f1d3290e2043a85fcba1a7f6107c10fc16fcc508.tar.bz2
Create an object-oriented interface for the catalog input formats.
Diffstat (limited to 'gettext-tools/src/msgexec.c')
-rw-r--r--gettext-tools/src/msgexec.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/gettext-tools/src/msgexec.c b/gettext-tools/src/msgexec.c
index 38f27bc..3af467a 100644
--- a/gettext-tools/src/msgexec.c
+++ b/gettext-tools/src/msgexec.c
@@ -41,6 +41,9 @@
#include "basename.h"
#include "message.h"
#include "read-catalog.h"
+#include "read-po.h"
+#include "read-properties.h"
+#include "read-stringtable.h"
#include "xalloc.h"
#include "exit.h"
#include "full-write.h"
@@ -101,6 +104,7 @@ main (int argc, char **argv)
bool do_version;
const char *input_file;
msgdomain_list_ty *result;
+ catalog_input_format_ty input_syntax = &input_format_po;
size_t i;
/* Set program name for messages. */
@@ -152,7 +156,7 @@ main (int argc, char **argv)
break;
case 'P':
- input_syntax = syntax_properties;
+ input_syntax = &input_format_properties;
break;
case 'V':
@@ -160,7 +164,7 @@ main (int argc, char **argv)
break;
case CHAR_MAX + 1: /* --stringtable-input */
- input_syntax = syntax_stringtable;
+ input_syntax = &input_format_stringtable;
break;
default:
@@ -203,7 +207,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
input_file = "-";
/* Read input file. */
- result = read_catalog_file (input_file);
+ result = read_catalog_file (input_file, input_syntax);
if (strcmp (sub_name, "0") != 0)
{