harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject svn commit: r441737 - /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main.c
Date Sat, 09 Sep 2006 04:25:01 GMT
Author: geirm
Date: Fri Sep  8 21:24:59 2006
New Revision: 441737

URL: http://svn.apache.org/viewvc?view=rev&rev=441737
Log:
tweaks - make it so that on

   java -version 

the version is printed after the exec() so we don't get double
print  and also let it continue so we get launcher version *and* VM version, if VM 
supports such foolishness 


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

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main.c
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main.c?view=diff&rev=441737&r1=441736&r2=441737
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main.c
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main.c
Fri Sep  8 21:24:59 2006
@@ -26,7 +26,7 @@
 
 #define PORT_LIB_OPTION "_org.apache.harmony.vmi.portlib"
 
-#define HY_COPYRIGHT_STRING "(c) Copyright 1991, 2006 The Apache Software Foundation or its
licensors, as applicable."
+#define HY_COPYRIGHT_STRING "Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache
Software Foundation or its licensors, as applicable."
 
 #define HY_PATH_SLASH DIR_SEPARATOR
 
@@ -126,6 +126,7 @@
   char defaultDirName[] = "default";
   int rc = -1;
   int showVersion = 0;
+  int versionFlag = 0;
   int genericLauncher = 0;
   char *str;
   char *knownGenericNames[] = { "java", "java.exe", "javaw.exe", NULL };
@@ -200,10 +201,7 @@
 			isStandaloneJar = 1;
 		}
 		if (0 == strcmp ("-version", argv[i])) {
-			/* We are being asked to print our version, and quit */
-			dumpVersionInfo (PORTLIB);
-			hyfile_printf (PORTLIB, HYPORT_TTY_OUT, HY_COPYRIGHT_STRING "\n");
-			goto bail;
+            versionFlag = 1;
 		}
 		if (0 == strcmp ("-showversion", argv[i])) {
 			/* We are being asked to print our version and continue */
@@ -318,6 +316,13 @@
           versionWritten = 1;
         }
     }
+    
+  if (versionFlag == 1) {
+    /* 
+     * We are being asked to print our version, and quit 
+     */
+    hyfile_printf (PORTLIB, HYPORT_TTY_OUT, HY_COPYRIGHT_STRING "\n");    
+  }
   /* set up the properties file */
   propertiesFileName = hymem_allocate_memory (strlen (vmiPath) + 12);
   if (propertiesFileName == NULL)



Mime
View raw message