;;; -*- Mode:Lisp; Readtable:ZL; Package:USER; Base:8; Patch-File:T -*- ;;; Patch file for System version 124.39 ;;; Reason: ;;; (cli:read-from-string) didn't handle eof-error-p correctly. ;;; Written 8-Jun-88 17:12:20 by pld (Peter L. DeWolf) at site Gigamos Cambridge ;;; while running on Cthulhu from band 1 ;;; with Experimental System 124.38, Experimental Local-File 74.1, Experimental File-Server 23.1, Experimental Unix-Interface 12.0, Experimental ZMail 72.1, Experimental Tape 23.6, Experimental Lambda-Diag 16.1, microcode 1756, SDU Boot Tape 3.14, SDU ROM 8, the old ones. ; From modified file DJ: L.IO; QIO.LISP#231 at 8-Jun-88 17:12:21 #8R SYSTEM-INTERNALS#: (COMPILER-LET ((*PACKAGE* (PKG-FIND-PACKAGE "SYSTEM-INTERNALS"))) (COMPILER::PATCH-SOURCE-FILE "SYS: IO; QIO  " (defun cli:read-from-string (string &optional (eof-error-p t) eof-value &key (start 0) end preserve-whitespace) "Read an expression out of the characters in STRING. START and END are indices which specify a substring of STRING to be used. START defaults to 0 and END to NIL (which means the end of STRING). Reaching the end of STRING or the specified substring constitutes EOF. EOF-ERROR-P controls whether this signals an error; if not, EOF-VALUE is returned. PRESERVE-WHITESPACE non-NIL causes the effect of using READ-PRESERVING-WHITESPACE. Only one object is read. The first value is that object (or perhaps EOF-VALUE) and the second value is the index in STRING at which reading stopped." (declare (values contents end-char-position)) (let ((stream (make-string-input-stream string start end))) (values (condition-case-if (not eof-error-p) (error) (internal-read stream t nil nil preserve-whitespace) (read-end-of-file eof-value)) (send stream :pointer)))) ))