]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Allow multiple levels of verbosity in 'msgfmt'.
authorBruno Haible <bruno@clisp.org>
Mon, 19 Jan 2009 00:05:46 +0000 (00:05 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:15:58 +0000 (12:15 +0200)
gettext-tools/src/ChangeLog
gettext-tools/src/msgfmt.c
gettext-tools/src/msgfmt.h
gettext-tools/src/write-csharp.c
gettext-tools/src/write-java.c
gettext-tools/src/write-resources.c

index 13251cb4f5d2ed155d66e3057e869853a0ed5113..3f0701bdcf51cf9c9177178f1487b103680c3025 100644 (file)
@@ -1,3 +1,13 @@
+2009-01-18  Bruno Haible  <bruno@clisp.org>
+
+       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  <bruno@clisp.org>
 
        * str-list.h (string_list_join): Change the separator argument,
index 558afa9f7ca5f9a16299087e8d1c2eff098c6dda..050e45106c4efd0d0fcd8312ae92046d470ffd8c 100644 (file)
@@ -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;
index 56e6e664b5ddf83406ced49842bc5c0107f3a68b..e61f72ca32fd83893415dc3fc2c474e5eecce006 100644 (file)
@@ -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 <drepper@gnu.ai.mit.edu>, 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 */
index 82c0c80fc73ea6eddcd175589c7b5b79024e48a9..c6590b1ffd91ece8515445c7b31301b3eadd572f 100644 (file)
@@ -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 <bruno@clisp.org>, 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"));
index f343e994ae2f9e6dbb6327d0756bb55bab926115..370c235a8616321ed7369684551574e00d46180a 100644 (file)
@@ -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 <haible@clisp.cons.org>, 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, _("\
index 9899c722794de4ba08aab03a6492ef2a49e59045..378353270634920d96c1975eb3d4154736f57790 100644 (file)
@@ -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 <bruno@clisp.org>, 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);