From: Bruno Haible Date: Mon, 19 Jan 2009 00:05:46 +0000 (+0000) Subject: Allow multiple levels of verbosity in 'msgfmt'. X-Git-Tag: v0.18~263 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ba001508d2ebd4ec1850df6b57583159e449849;p=thirdparty%2Fgettext.git Allow multiple levels of verbosity in 'msgfmt'. --- diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog index 13251cb4f..3f0701bdc 100644 --- a/gettext-tools/src/ChangeLog +++ b/gettext-tools/src/ChangeLog @@ -1,3 +1,13 @@ +2009-01-18 Bruno Haible + + Allow multiple levels of verbosity in 'msgfmt'. + * msgfmt.h (verbose): Change from 'bool' to 'int'. + * msgfmt.c (verbose): Likewise. + (main): Increment 'verbose' for each --verbose option. + * write-java.c (msgdomain_write_java): Update. + * write-csharp.c (msgdomain_write_csharp): Update. + * write-resources.c (msgdomain_write_csharp_resources): Update. + 2009-01-18 Bruno Haible * str-list.h (string_list_join): Change the separator argument, diff --git a/gettext-tools/src/msgfmt.c b/gettext-tools/src/msgfmt.c index 558afa9f7..050e45106 100644 --- a/gettext-tools/src/msgfmt.c +++ b/gettext-tools/src/msgfmt.c @@ -114,7 +114,7 @@ static struct msg_domain *current_domain; 'error' or 'multiline_error' to emit verbosity messages, because 'error' and 'multiline_error' during PO file parsing cause the program to exit with EXIT_FAILURE. See function lex_end(). */ -bool verbose = false; +int verbose = 0; /* If true check strings according to format string rules for the language. */ @@ -285,7 +285,7 @@ main (int argc, char *argv[]) strict_uniforum = true; break; case 'v': - verbose = true; + verbose++; break; case 'V': do_version = true; diff --git a/gettext-tools/src/msgfmt.h b/gettext-tools/src/msgfmt.h index 56e6e664b..e61f72ca3 100644 --- a/gettext-tools/src/msgfmt.h +++ b/gettext-tools/src/msgfmt.h @@ -1,5 +1,5 @@ /* msgfmt specifics - Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1995-1998, 2000-2001, 2009 Free Software Foundation, Inc. Written by Ulrich Drepper , April 1995. This program is free software: you can redistribute it and/or modify @@ -22,6 +22,6 @@ 'error' or 'multiline_error' to emit verbosity messages, because 'error' and 'multiline_error' during PO file parsing cause the program to exit with EXIT_FAILURE. See function lex_end(). */ -extern bool verbose; +extern int verbose; #endif /* _MSGFMT_H */ diff --git a/gettext-tools/src/write-csharp.c b/gettext-tools/src/write-csharp.c index 82c0c80fc..c6590b1ff 100644 --- a/gettext-tools/src/write-csharp.c +++ b/gettext-tools/src/write-csharp.c @@ -1,5 +1,5 @@ /* Writing C# satellite assemblies. - Copyright (C) 2003-2008 Free Software Foundation, Inc. + Copyright (C) 2003-2009 Free Software Foundation, Inc. Written by Bruno Haible , 2003. This program is free software: you can redistribute it and/or modify @@ -745,7 +745,7 @@ msgdomain_write_csharp (message_list_ty *mlp, const char *canon_encoding, libdirs[0] = gettextlibdir; libraries[0] = "GNU.Gettext"; if (compile_csharp_class (csharp_sources, 1, libdirs, 1, libraries, 1, - output_file, true, false, verbose)) + output_file, true, false, verbose > 0)) { if (!verbose) error (0, 0, _("compilation of C# class failed, please try --verbose")); diff --git a/gettext-tools/src/write-java.c b/gettext-tools/src/write-java.c index f343e994a..370c235a8 100644 --- a/gettext-tools/src/write-java.c +++ b/gettext-tools/src/write-java.c @@ -1,5 +1,5 @@ /* Writing Java ResourceBundles. - Copyright (C) 2001-2003, 2005-2008 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2005-2009 Free Software Foundation, Inc. Written by Bruno Haible , 2001. This program is free software: you can redistribute it and/or modify @@ -1054,7 +1054,7 @@ msgdomain_write_java (message_list_ty *mlp, const char *canon_encoding, which is in a temporary directory in our case. */ java_sources[0] = java_file_name; if (compile_java_class (java_sources, 1, NULL, 0, "1.3", "1.1", directory, - true, false, true, verbose)) + true, false, true, verbose > 0)) { if (!verbose) error (0, 0, _("\ diff --git a/gettext-tools/src/write-resources.c b/gettext-tools/src/write-resources.c index 9899c7227..378353270 100644 --- a/gettext-tools/src/write-resources.c +++ b/gettext-tools/src/write-resources.c @@ -1,5 +1,5 @@ /* Writing C# .resources files. - Copyright (C) 2003, 2005, 2007-2008 Free Software Foundation, Inc. + Copyright (C) 2003, 2005, 2007-2009 Free Software Foundation, Inc. Written by Bruno Haible , 2003. This program is free software: you can redistribute it and/or modify @@ -181,7 +181,7 @@ but the C# .resources format doesn't support plural handling\n"))); if (execute_csharp_program (assembly_path, NULL, 0, args, - verbose, false, + verbose > 0, false, execute_writing_input, &locals)) /* An error message should already have been provided. */ exit (EXIT_FAILURE);