harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r548420 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main.c
Date Mon, 18 Jun 2007 17:19:54 GMT
Author: ayza
Date: Mon Jun 18 10:19:53 2007
New Revision: 548420

URL: http://svn.apache.org/viewvc?view=rev&rev=548420
Log:
Applying patch from HARMONY-4069 ([classlib][launcher] 'java -help', 'java -X' output is very
poor)

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main.c

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main.c?view=diff&rev=548420&r1=548419&r2=548420
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main.c (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main.c Mon
Jun 18 10:19:53 2007
@@ -137,6 +137,7 @@
   int rc = -1;
   int showVersion = 0;
   int versionFlag = 0;
+  int vmHelp = 0;
   int genericLauncher = 0;
   char *str;
   char *knownGenericNames[] = { "java", "java.exe", "javaw.exe", NULL };
@@ -206,13 +207,12 @@
 	*/
 	for (i = 1; i < argc; i++) {
         if ((0 == strcmp ("-help", argv[i])) ||
+            (0 == strcmp ("-h", argv[i])) ||
             (0 == strcmp ("-?", argv[i])) ||
             (0 == strcmp ("-X", argv[i]))) {
-            printUsageMessage(PORTLIB);
-            rc = 0;
-            goto bail;
+            vmHelp = 1;
         }
-        
+
 		if ((0 == strcmp ("-cp", argv[i])) ||
 		    (0 == strcmp ("-classpath", argv[i]))) {
 			/* Skip the classpath argument while looking for main class */
@@ -273,7 +273,7 @@
 	classArg = arrangeToolsArgs(args->portLibrary, &argc, &argv, mainClass);
   }
 
-  if (mainClass == NULL && !isStandaloneJar && !versionFlag) {
+  if (mainClass == NULL && !isStandaloneJar && !versionFlag && !vmHelp)
{
     printUsageMessage(PORTLIB);
     goto bail;
   }



Mime
View raw message