From: Bruno Haible Date: Mon, 26 Nov 2001 13:40:23 +0000 (+0000) Subject: Make it possible for execute_java_class to not spit out an error message if X-Git-Tag: v0.11~272 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d93f1f8148f3e44308f2ab5e2243bd11f385a180;p=thirdparty%2Fgettext.git Make it possible for execute_java_class to not spit out an error message if there is no JVM. --- diff --git a/lib/ChangeLog b/lib/ChangeLog index b9b761df8..27b1a708a 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,8 @@ +2001-11-24 Bruno Haible + + * javaexec.h (execute_java_class): New argument 'quiet'. + * javaexec.c (execute_java_class): Likewise. + 2001-11-17 Bruno Haible * hash.c (lookup_2): Remove function, identical to 'lookup'. diff --git a/lib/javaexec.c b/lib/javaexec.c index 79682ee7b..b72042ade 100644 --- a/lib/javaexec.c +++ b/lib/javaexec.c @@ -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: diff --git a/lib/javaexec.h b/lib/javaexec.h index 71561bb8c..8c4a16769 100644 --- a/lib/javaexec.h +++ b/lib/javaexec.h @@ -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)); diff --git a/src/ChangeLog b/src/ChangeLog index 4468f6c32..6c55a3b76 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2001-11-24 Bruno Haible + + * read-java.c (msgdomain_read_java): Update for changed + execute_java_class parameter list. + 2001-11-24 Bruno Haible * msgexec.c (process_message): Really process each plural form once. diff --git a/src/read-java.c b/src/read-java.c index 1b9d69498..a20ef37ce 100644 --- a/src/read-java.c +++ b/src/read-java.c @@ -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);