Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 70961 invoked from network); 15 Dec 2006 12:08:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Dec 2006 12:08:56 -0000 Received: (qmail 61702 invoked by uid 500); 15 Dec 2006 12:07:54 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 60047 invoked by uid 500); 15 Dec 2006 12:07:42 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 58275 invoked by uid 99); 15 Dec 2006 12:07:30 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Dec 2006 04:07:30 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Dec 2006 03:42:26 -0800 Received: by eris.apache.org (Postfix, from userid 65534) id 042171A981A; Fri, 15 Dec 2006 03:41:39 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r487519 - /harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/parse_arguments.cpp Date: Fri, 15 Dec 2006 11:41:38 -0000 To: commits@harmony.apache.org From: varlax@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20061215114140.042171A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: varlax Date: Fri Dec 15 03:41:33 2006 New Revision: 487519 URL: http://svn.apache.org/viewvc?view=rev&rev=487519 Log: Applied HARMONY-2722 [drlvm][initialization] VM shows its version number as many times as -showversion option is repeated in command line Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/parse_arguments.cpp Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/parse_arguments.cpp URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/parse_arguments.cpp?view=diff&rev=487519&r1=487518&r2=487519 ============================================================================== --- harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/parse_arguments.cpp (original) +++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/parse_arguments.cpp Fri Dec 15 03:41:33 2006 @@ -278,6 +278,7 @@ void parse_vm_arguments(Global_Env *p_env) { + bool version_printed = false; #ifdef _DEBUG TRACE2("arguments", "p_env->vm_arguments.nOptions = " << p_env->vm_arguments.nOptions); for (int _i = 0; _i < p_env->vm_arguments.nOptions; _i++) @@ -378,8 +379,11 @@ ECHO(VERSION); LOGGER_EXIT(0); } else if (strcmp(option, "-showversion") == 0) { - // Print the version number and continue - ECHO(VERSION); + if (!version_printed) { + // Print the version number and continue + ECHO(VERSION); + version_printed = true; + } } else if (strcmp(option, "-fullversion") == 0) { // Print the version number and exit ECHO(VM_VERSION);