Skip to content

Commit bc018ee

Browse files
committed
msgfmt: do not fail when --statistics is passed
po.m4 from gnulib/gettext uses a check that this option is supported in order to exclude the FreeBSD implementation, and force the GNU version on them. http://git.savannah.gnu.org/cgit/gettext.git/tree/gettext-runtime/m4/po.m4?id=d9cfbdfecb502b70c55e594bc897c217ac082f5f#n37 it does so since several years, so it's funny we haven't hit that earlier. however this now triggers for "deadbeef" in version 0.7.2.
1 parent 1bb0dd7 commit bc018ee

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/msgfmt.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,14 +234,16 @@ int main(int argc, char**argv) {
234234
streq(A+2, "check-accelerators") ||
235235
streq(A+2, "no-hash") ||
236236
streq(A+2, "verbose") ||
237-
streq(A+2, "statistics") ||
238237
strstarts(A+2, "check-accelerators=") ||
239238
strstarts(A+2, "resource=") ||
240239
strstarts(A+2, "locale=")
241240

242241
) {
243242
} else if((dest = strstarts(A+2, "output-file="))) {
244243
set_file(1, dest, &out);
244+
} else if(streq(A+2, "statistics")) {
245+
fprintf(stdout, "No Statistics available.\n");
246+
return 0;
245247
} else if(streq(A+2, "version")) {
246248
version();
247249
} else if(streq(A+2, "help")) syntax();

0 commit comments

Comments
 (0)