Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 76342 invoked from network); 9 Sep 2006 04:25:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 9 Sep 2006 04:25:23 -0000 Received: (qmail 22124 invoked by uid 500); 9 Sep 2006 04:25:23 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 22088 invoked by uid 500); 9 Sep 2006 04:25:23 -0000 Mailing-List: contact harmony-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-commits@incubator.apache.org Received: (qmail 22075 invoked by uid 99); 9 Sep 2006 04:25:22 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Sep 2006 21:25:22 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [140.211.166.113] (HELO eris.apache.org) (140.211.166.113) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Sep 2006 21:25:22 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 25D791A981A; Fri, 8 Sep 2006 21:25:02 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: harmony-commits@incubator.apache.org From: geirm@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20060909042502.25D791A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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)