Changeset 5259


Ignore:
Timestamp:
Sep 24, 2006, 7:12:31 PM (18 years ago)
Author:
Gary Byers
Message:

Remove unused (probably ancient) CHKBOUNDS function.
Simpler STRING-START-END.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/level-1/l1-aprims.lisp

    r5151 r5259  
    896896      c)))
    897897
    898 (defun chkbounds (arr start end)
    899   (flet ((are (a i)(error "Array index ~S out of bounds for ~S." a i)))
    900     (let ((len (length arr)))
    901       (if (and end (> end len))(are arr end))
    902       (if (and start (or (< start 0)(> start len)))(are arr start))
    903       (if (%i< (%i- (or end len)(or start 0)) 0)
    904         (error "Start ~S exceeds end ~S." start end)))))
     898
    905899
    906900(defun string-start-end (string start end)
     
    913907      (if (%i> start end)
    914908        (error "Start ~S exceeds end ~S." start end))
    915       (multiple-value-bind (str off)(array-data-and-offset string)
    916         (values str (%i+ off start)(%i+ off end))))))
     909      (if (typep string 'simple-string)
     910        (values string start end)
     911        (multiple-value-bind (str off)(array-data-and-offset string)
     912          (values str (%i+ off start)(%i+ off end)))))))
    917913
    918914(defun get-properties (place indicator-list)
Note: See TracChangeset for help on using the changeset viewer.