[cxml-cvs] CVS cxml/xml

dlichteblau dlichteblau at common-lisp.net
Sun Sep 10 14:52:44 UTC 2006


Update of /project/cxml/cvsroot/cxml/xml
In directory clnet:/tmp/cvs-serv3686/xml

Modified Files:
	xml-name-rune-p.lisp 
Log Message:
ANSI conformance fixes


--- /project/cxml/cvsroot/cxml/xml/xml-name-rune-p.lisp	2006/08/20 11:56:11	1.7
+++ /project/cxml/cvsroot/cxml/xml/xml-name-rune-p.lisp	2006/09/10 14:52:44	1.8
@@ -105,15 +105,19 @@
 	       (declare (type simple-vector range-vector))
 	       ;;we were always dealing with a sorted vector... bin search it
  
-	       (loop with start = 0 
-		     with end = (length range-vector)
-		     while (< start end)
-		     for mid-index = (+ start (floor (- end start) 2))
-		     for (mid-item-low mid-item-high) = (aref range-vector mid-index)
-		     if (< mid-item-high code) do (setf start (1+ mid-index))
-		     else if (< code mid-item-low) do (setf end mid-index)
-		     else do (return T)
-		     finally (return nil)))
+	       (let ((start 0)
+		     (end (length range-vector)))
+		 (while (< start end)
+		   (let ((mid-index (+ start (floor (- end start) 2))))
+		     (destructuring-bind (mid-item-low mid-item-high)
+			 (aref range-vector mid-index)
+		       (cond
+			 ((< mid-item-high code)
+			   (setf start (1+ mid-index)))
+			 ((< code mid-item-low)
+			   (setf end mid-index))
+			 (t
+			   (return t))))))))
 	     
 	     (name-start-rune-p (rune)
                (or (letter-rune-p rune)




More information about the Cxml-cvs mailing list