]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Make it possible for execute_java_class to not spit out an error message if
authorBruno Haible <bruno@clisp.org>
Mon, 26 Nov 2001 13:40:23 +0000 (13:40 +0000)
committerBruno Haible <bruno@clisp.org>
Sun, 21 Jun 2009 21:24:50 +0000 (23:24 +0200)
there is no JVM.

lib/ChangeLog
lib/javaexec.c
lib/javaexec.h
src/ChangeLog
src/read-java.c

index b9b761df8a37f2706e3e5d0ffa65b66c53d88df3..27b1a708a36731888a4c6dbe36881384e6a1d995 100644 (file)
@@ -1,3 +1,8 @@
+2001-11-24  Bruno Haible  <bruno@clisp.org>
+
+       * javaexec.h (execute_java_class): New argument 'quiet'.
+       * javaexec.c (execute_java_class): Likewise.
+
 2001-11-17  Bruno Haible  <haible@clisp.cons.org>
 
        * hash.c (lookup_2): Remove function, identical to 'lookup'.
index 79682ee7b4e87b786eb53037c9cf5d08cdc14ea9..b72042adefbad84265232346d2a6b6594de8ed86 100644 (file)
@@ -101,7 +101,7 @@ bool
 execute_java_class (class_name,
                    classpaths, classpaths_count, use_minimal_classpath,
                    args,
-                   verbose,
+                   verbose, quiet,
                    executer, private_data)
      const char *class_name;
      const char * const *classpaths;
@@ -109,6 +109,7 @@ execute_java_class (class_name,
      bool use_minimal_classpath;
      const char * const *args;
      bool verbose;
+     bool quiet;
      execute_fn *executer;
      void *private_data;
 {
@@ -399,7 +400,8 @@ execute_java_class (class_name,
   }
 #endif
 
-  error (0, 0, _("Java virtual machine not found, try installing gij or set $JAVA"));
+  if (!quiet)
+    error (0, 0, _("Java virtual machine not found, try installing gij or set $JAVA"));
   err = true;
 
  done2:
index 71561bb8c1e02863c9ef8e479f8abc8ade4bfd43..8c4a167697277bf913a79c4eb29c046971740b5a 100644 (file)
@@ -36,13 +36,14 @@ typedef bool execute_fn PARAMS ((const char *progname,
    If verbose, the command to be executed will be printed.
    Then the command is passed to the execute function together with the
    private_data argument.  This function returns false if OK, true on error.
-   Return false if OK, true on error.  */
+   Return false if OK, true on error.
+   If quiet, error messages will not be printed.  */
 extern bool execute_java_class PARAMS ((const char *class_name,
                                        const char * const *classpaths,
                                        unsigned int classpaths_count,
                                        bool use_minimal_classpath,
                                        const char * const *args,
-                                       bool verbose,
+                                       bool verbose, bool quiet,
                                        execute_fn *executer,
                                        void *private_data));
 
index 4468f6c32ee10d5ab1bcc5ef8c913b618ea6cd4f..6c55a3b767c56f9ee0a10068788a0ff48c936ea9 100644 (file)
@@ -1,3 +1,8 @@
+2001-11-24  Bruno Haible  <bruno@clisp.org>
+
+       * read-java.c (msgdomain_read_java): Update for changed
+       execute_java_class parameter list.
+
 2001-11-24  Bruno Haible  <bruno@clisp.org>
 
        * msgexec.c (process_message): Really process each plural form once.
index 1b9d694989f2895c6787d09e13f3387e812d797e..a20ef37cefdbfb5a1b41fb17933b42efa57e9eb1 100644 (file)
@@ -129,7 +129,7 @@ msgdomain_read_java (resource_name, locale_name)
      resource can be found.  */
   if (execute_java_class (class_name, &gettextjar, 1, false,
                          args,
-                         verbose,
+                         verbose, false,
                          execute_and_read_po_output, &locals))
     /* An error message should already have been provided.  */
     exit (EXIT_FAILURE);