From 11a7b7999b66cc609254554ad46935c8977a0873 Mon Sep 17 00:00:00 2001 From: Stelian Ionescu Date: Mon, 29 Mar 2010 02:01:38 +0200 Subject: [PATCH] Re-arrange test clauses in STREAM-READ-CHAR-NO-HANG. --- src/streams/gray/gray-stream-methods.lisp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/streams/gray/gray-stream-methods.lisp b/src/streams/gray/gray-stream-methods.lisp index 13dc314..4a5a831 100644 --- a/src/streams/gray/gray-stream-methods.lisp +++ b/src/streams/gray/gray-stream-methods.lisp @@ -188,13 +188,13 @@ (if eofp :eof nil) ;; At this point, there's at least one octet in the buffer (let ((line-end (funcall (eol-finder-of stream) ib fd read-fn t eofp))) - (cond (;; There's a CR but it's not EOF so we could still receive a LF - (and (eql :incomplete line-end) (not eofp)) - nil) + (cond ((null line-end) + (decode-one-char/no-hang ib encoding)) ((eql #\Newline line-end) #\Newline) - (t - (decode-one-char/no-hang ib encoding))))))))) + ;; There's a CR but it's not EOF so we could still receive a LF + ((and (eql :incomplete line-end) (not eofp)) + nil)))))))) (defun %stream-unread-char (stream) (declare (type dual-channel-gray-stream stream)) -- 2.11.4.GIT