[slime-cvs] CVS update: slime/swank-cmucl.lisp

Helmut Eller heller at common-lisp.net
Sun Oct 9 19:13:04 UTC 2005


Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv6772

Modified Files:
	swank-cmucl.lisp 
Log Message:
(sis/in): Use finish-output instead of force-output.
Date: Sun Oct  9 21:13:04 2005
Author: heller

Index: slime/swank-cmucl.lisp
diff -u slime/swank-cmucl.lisp:1.155 slime/swank-cmucl.lisp:1.156
--- slime/swank-cmucl.lisp:1.155	Tue Sep 27 23:50:38 2005
+++ slime/swank-cmucl.lisp	Sun Oct  9 21:13:03 2005
@@ -229,16 +229,7 @@
      nil)
     (:force-output
      (log-stream-op stream operation)
-     (unless (or (zerop (sos.index stream))
-                 (loop with buffer = (sos.buffer stream)
-                       for i from 0 below (sos.index stream)
-                       always (char= (aref buffer i) #\newline)))
-       (let ((last (sos.last-flush-time stream))
-             (now (get-internal-real-time)))
-         (when (> (/ (- now last)
-                     (coerce internal-time-units-per-second 'double-float))
-                  0.1)
-           (finish-output stream))))
+     (sos/misc-force-output stream)
      nil)
     (:charpos (sos.column stream))
     (:line-length 75)
@@ -248,6 +239,18 @@
     (:close nil)
     (t (format *terminal-io* "~&~Astream: ~S~%" stream operation))))
 
+(defun sos/misc-force-output (stream)
+  (unless (or (zerop (sos.index stream))
+              (loop with buffer = (sos.buffer stream)
+                    for i from 0 below (sos.index stream)
+                    always (char= (aref buffer i) #\newline)))
+    (let ((last (sos.last-flush-time stream))
+          (now (get-internal-real-time)))
+      (when (> (/ (- now last)
+                  (coerce internal-time-units-per-second 'double-float))
+               0.1)
+        (finish-output stream)))))
+
 (defstruct (slime-input-stream
              (:include string-stream
                        (lisp::in #'sis/in)
@@ -263,10 +266,10 @@
   (index    0   :type kernel:index))
 
 (defun sis/in (stream eof-errorp eof-value)
+  (finish-output (sis.sos stream))
   (let ((index (sis.index stream))
 	(buffer (sis.buffer stream)))
     (when (= index (length buffer))
-      (force-output (sis.sos stream))
       (let ((string (funcall (sis.input-fn stream))))
         (cond ((zerop (length string))
                (return-from sis/in




More information about the slime-cvs mailing list