harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r487519 - /harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/parse_arguments.cpp
Date Fri, 15 Dec 2006 11:41:38 GMT
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);



Mime
View raw message