Revision: 20823
          http://sourceforge.net/p/jmol/code/20823
Author:   hansonr
Date:     2015-10-13 18:46:17 +0000 (Tue, 13 Oct 2015)
Log Message:
-----------


Modified Paths:
--------------
    branches/v14_2/Jmol/src/javajs/util/AU.java
    branches/v14_2/Jmol/src/org/jmol/modelset/LabelToken.java
    branches/v14_2/Jmol/src/org/jmol/scriptext/CmdExt.java
    branches/v14_2/Jmol/src/org/jmol/shape/Labels.java
    branches/v14_2/Jmol/src/org/jmol/smiles/SmilesParser.java

Modified: branches/v14_2/Jmol/src/javajs/util/AU.java
===================================================================
--- branches/v14_2/Jmol/src/javajs/util/AU.java 2015-10-13 18:41:22 UTC (rev 
20822)
+++ branches/v14_2/Jmol/src/javajs/util/AU.java 2015-10-13 18:46:17 UTC (rev 
20823)
@@ -636,6 +636,7 @@
         * process, but particularly out of file reading.
         * 
         * @param b
+        * @return b
         */
        public static byte[] ensureSignedBytes(byte[] b) {
                if (b != null) {

Modified: branches/v14_2/Jmol/src/org/jmol/modelset/LabelToken.java
===================================================================
--- branches/v14_2/Jmol/src/org/jmol/modelset/LabelToken.java   2015-10-13 
18:41:22 UTC (rev 20822)
+++ branches/v14_2/Jmol/src/org/jmol/modelset/LabelToken.java   2015-10-13 
18:46:17 UTC (rev 20823)
@@ -358,8 +358,11 @@
   private static int setToken(Viewer vwr, String strFormat, LabelToken lt,
                               int cch, int chAtom, Map<String, Object> 
htValues) {
     int ich = lt.pt + 1;
-    if (ich >= cch)
+    if (ich >= cch) {
+      // trailing % is OK
+      lt.text = "%";
       return ich;
+    }
     char ch;
     if (strFormat.charAt(ich) == '-') {
       lt.alignLeft = true;

Modified: branches/v14_2/Jmol/src/org/jmol/scriptext/CmdExt.java
===================================================================
--- branches/v14_2/Jmol/src/org/jmol/scriptext/CmdExt.java      2015-10-13 
18:41:22 UTC (rev 20822)
+++ branches/v14_2/Jmol/src/org/jmol/scriptext/CmdExt.java      2015-10-13 
18:46:17 UTC (rev 20823)
@@ -2892,6 +2892,9 @@
       for (int i = 0; i < 3; i++) {
         switch (tokAt(eval.iToken)) {
         case T.nada:
+          if (i == 0)
+            invArg();
+          //$FALL-THROUGH$
         case T.format:
         case T.min:
         case T.max:

Modified: branches/v14_2/Jmol/src/org/jmol/shape/Labels.java
===================================================================
--- branches/v14_2/Jmol/src/org/jmol/shape/Labels.java  2015-10-13 18:41:22 UTC 
(rev 20822)
+++ branches/v14_2/Jmol/src/org/jmol/shape/Labels.java  2015-10-13 18:46:17 UTC 
(rev 20823)
@@ -541,6 +541,8 @@
         return;
       offsets = AU.ensureLengthI(offsets, i + 1);
     }
+    if (offset == 0)
+      offset = JC.LABEL_DEFAULT_OFFSET;
     offsets[i] = (offsets[i] & JC.LABEL_FLAGS) | offset;
 
     text = getLabel(i);

Modified: branches/v14_2/Jmol/src/org/jmol/smiles/SmilesParser.java
===================================================================
--- branches/v14_2/Jmol/src/org/jmol/smiles/SmilesParser.java   2015-10-13 
18:41:22 UTC (rev 20822)
+++ branches/v14_2/Jmol/src/org/jmol/smiles/SmilesParser.java   2015-10-13 
18:46:17 UTC (rev 20823)
@@ -994,7 +994,7 @@
               "'!' may only involve one primitive.");
       }
       if (hydrogenCount == Integer.MIN_VALUE && isBracketed)
-        hydrogenCount = Integer.MIN_VALUE + 1;
+        hydrogenCount++;
       newAtom.setExplicitHydrogenCount(hydrogenCount);
       // for stereochemistry only:
       molecule.patternAtoms[newAtom.index]

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


------------------------------------------------------------------------------
_______________________________________________
Jmol-commits mailing list
Jmol-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-commits

Reply via email to