Skip to content

Commit 55a2119

Browse files
committed
msgfmt: support keyword, template, output options
follow #47. 'keyword=' is simply ignored. msgfmt will generate the output based on the template file and other sources. so 'template=' is the input file.
1 parent a76f8ad commit 55a2119

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/msgfmt.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,7 @@ int main(int argc, char**argv) {
313313
streq(A+2, "no-hash") ||
314314
streq(A+2, "verbose") ||
315315
streq(A+2, "statistics") ||
316+
strstarts(A+2, "keyword=") ||
316317
strstarts(A+2, "check-accelerators=") ||
317318
strstarts(A+2, "resource=")
318319
) {
@@ -335,8 +336,13 @@ int main(int argc, char**argv) {
335336
} else if((locale = strstarts(A+2, "locale="))) {
336337
} else if(streq(A+2, "check")) {
337338
strict = true;
339+
} else if(strstarts(A+2, "template=")) {
340+
set_file(0, A+11, &in);
341+
expect_in_fn = 0;
338342
} else if(strstarts(A+2, "output-file=")) {
339343
set_file(1, A+14, &out);
344+
} else if(strstarts(A+2, "output=")) {
345+
set_file(1, A+9, &out);
340346
} else if(streq(A+2, "version")) {
341347
version();
342348
return 0;

0 commit comments

Comments
 (0)