You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by va...@apache.org on 2006/12/15 12:41:38 UTC

svn commit: r487519 - /harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/parse_arguments.cpp

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);