Revision: 20428
          http://sourceforge.net/p/jmol/code/20428
Author:   hansonr
Date:     2015-04-01 19:23:34 +0000 (Wed, 01 Apr 2015)
Log Message:
-----------
Jmol.___JmolVersion="14.3.13_2015.04.01b" 

bug fix: hash values created from named int variables do not clone properly
bug fix: hash[key1]..key2.push()  does not work properly
bug fix: show hash  where one of the elements is an empty hash ignores that key
bug fix: local var xxx with same name of ..xxx forces lower case xxx
 

Modified Paths:
--------------
    branches/v14_2/Jmol/src/org/jmol/script/SV.java
    branches/v14_2/Jmol/src/org/jmol/script/ScriptExpr.java
    branches/v14_2/Jmol/src/org/jmol/viewer/Jmol.properties
    branches/v14_2/Jmol/src/org/jmol/viewer/Viewer.java

Modified: branches/v14_2/Jmol/src/org/jmol/script/SV.java
===================================================================
--- branches/v14_2/Jmol/src/org/jmol/script/SV.java     2015-04-01 19:23:22 UTC 
(rev 20427)
+++ branches/v14_2/Jmol/src/org/jmol/script/SV.java     2015-04-01 19:23:34 UTC 
(rev 20428)
@@ -714,8 +714,8 @@
       for (int i = 0; i < keys.length; i++) {
         String key = keys[i];
         SV val = ht.get(key);
-        if (skipEmpty && val.tok == T.varray && val.getList().size() == 0
-            || val.tok == T.hash && val.getMap().isEmpty())
+        if (skipEmpty && (val.tok == T.varray && val.getList().size() == 0
+            || val.tok == T.hash && val.getMap().isEmpty()))
           continue;
         if (addValues)
           sb.append(sep).append(PT.esc(key)).append(":");
@@ -860,7 +860,8 @@
     case string:
       break;
     default:
-      return tokenIn;
+      return ((tokenIn instanceof SV) && ((SV) tokenIn).myName != null ? 
newI(0)
+          .setv((SV) tokenIn) : tokenIn);
     }
 
     // negative number is a count from the end

Modified: branches/v14_2/Jmol/src/org/jmol/script/ScriptExpr.java
===================================================================
--- branches/v14_2/Jmol/src/org/jmol/script/ScriptExpr.java     2015-04-01 
19:23:22 UTC (rev 20427)
+++ branches/v14_2/Jmol/src/org/jmol/script/ScriptExpr.java     2015-04-01 
19:23:34 UTC (rev 20428)
@@ -610,8 +610,15 @@
         rpn.dumpStacks("null result");
       error(ERROR_endOfStatementUnexpected);
     }
-    if (result.tok == T.vector)
+    if (result.tok == T.vector) {
+      if (isSpecialAssignment && ptEq == 0) {
+        // no equal sign found! xxxxx.pop() for example
+        Lst<SV> rv = new Lst<SV>();
+        rv.addLast(new SV());
+        return rv;
+      }
       return result.value;
+    }
     if (chk) {
       if (returnBoolean)
         return Boolean.TRUE;
@@ -2040,7 +2047,7 @@
     nv = v.size();
     if (nv == 0)
       invArg();
-    if (chk)
+    if (chk || v.get(0).tok == T.nada)
       return null;
     SV tv = SV.selectItemVar(SV.newS("").setv(v.get(nv - 1)));
     if (nv > 1) {

Modified: branches/v14_2/Jmol/src/org/jmol/viewer/Jmol.properties
===================================================================
--- branches/v14_2/Jmol/src/org/jmol/viewer/Jmol.properties     2015-04-01 
19:23:22 UTC (rev 20427)
+++ branches/v14_2/Jmol/src/org/jmol/viewer/Jmol.properties     2015-04-01 
19:23:34 UTC (rev 20428)
@@ -4,8 +4,11 @@
 # THIS IS THE RELEASE BRANCH 
 # BUG FIXES ONLY, PLEASE
 
-Jmol.___JmolVersion="14.2.13_2015.04.01" 
+Jmol.___JmolVersion="14.2.13_2015.04.01b" 
 
+bug fix: hash values created from named int variables do not clone properly
+bug fix: hash[key1]..key2.push()  does not work properly
+bug fix: show hash  where one of the elements is an empty hash ignores that key
 bug fix: local var xxx with same name of ..xxx forces lower case xxx
  
 JmolVersion="14.2.13_2015.03.30"

Modified: branches/v14_2/Jmol/src/org/jmol/viewer/Viewer.java
===================================================================
--- branches/v14_2/Jmol/src/org/jmol/viewer/Viewer.java 2015-04-01 19:23:22 UTC 
(rev 20427)
+++ branches/v14_2/Jmol/src/org/jmol/viewer/Viewer.java 2015-04-01 19:23:34 UTC 
(rev 20428)
@@ -5205,7 +5205,7 @@
 
   @Override
   public void setStringProperty(String key, String value) {
-    if (value == null)
+    if (value == null || key == null || key.length() == 0)
       return;
     if (key.charAt(0) == '_') {
       g.setO(key, value);
@@ -5434,7 +5434,7 @@
 
   @Override
   public void setFloatProperty(String key, float value) {
-    if (Float.isNaN(value))
+    if (Float.isNaN(value) || key == null || key.length() == 0)
       return;
     if (key.charAt(0) == '_') {
       g.setF(key, value);
@@ -5644,7 +5644,7 @@
 
   @Override
   public void setIntProperty(String key, int value) {
-    if (value == Integer.MIN_VALUE)
+    if (value == Integer.MIN_VALUE || key == null || key.length() == 0)
       return;
     if (key.charAt(0) == '_') {
       g.setI(key, value);
@@ -5852,6 +5852,8 @@
 
   @Override
   public void setBooleanProperty(String key, boolean value) {
+    if (key == null || key.length() == 0)
+      return;
     if (key.charAt(0) == '_') {
       g.setB(key, value);
       return;
@@ -6502,7 +6504,7 @@
   }
 
   public void showString(String str, boolean isPrint) {
-    if (!isJS && isScriptQueued() && (!isSilent || isPrint)) {
+    if (!isJS && isScriptQueued() && (!isSilent || isPrint) && 
!"\0".equals(str)) {
       Logger.warn(str); // warn here because we still want to be be able to 
turn this off
     }
     scriptEcho(str);

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Jmol-commits mailing list
Jmol-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-commits

Reply via email to