/[cmucl]/src/code/fd-stream.lisp
ViewVC logotype

Diff of /src/code/fd-stream.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.56 by pw, Sun Jun 17 19:06:58 2001 UTC revision 1.57 by pw, Sun Jul 8 17:37:52 2001 UTC
# Line 1243  Line 1243 
1243                     (unix:get-unix-error-msg err))                     (unix:get-unix-error-msg err))
1244             nil))))             nil))))
1245    
1246    ;;; RETURN-STREAM -- internal
1247    ;;;
1248    ;;; (this is just to save having to reindent the code in OPEN...move it there)
1249    ;;;
1250    (defmacro return-stream (class &body body)
1251      (let ((stream (gensym)))
1252        `(let ((,stream (progn ,@body)))
1253           (return (if ,class
1254                      (make-instance ,class :lisp-stream ,stream)
1255                      ,stream)))))
1256    
1257  ;;; OPEN -- public  ;;; OPEN -- public
1258  ;;;  ;;;
# Line 1255  Line 1265 
1265               (if-exists nil if-exists-given)               (if-exists nil if-exists-given)
1266               (if-does-not-exist nil if-does-not-exist-given)               (if-does-not-exist nil if-does-not-exist-given)
1267               (external-format :default)               (external-format :default)
1268                 class
1269               &aux ; Squelch assignment warning.               &aux ; Squelch assignment warning.
1270               (direction direction)               (direction direction)
1271               (if-does-not-exist if-does-not-exist)               (if-does-not-exist if-does-not-exist)
# Line 1381  Line 1392 
1392                    (unix:unix-open namestring mask mode)                    (unix:unix-open namestring mask mode)
1393                    (values nil unix:enoent))                    (values nil unix:enoent))
1394              (cond ((numberp fd)              (cond ((numberp fd)
1395                     (return                     (return-stream class
1396                      (case direction                      (case direction
1397                        ((:input :output :io)                        ((:input :output :io)
1398                         (make-fd-stream fd                         (make-fd-stream fd

Legend:
Removed from v.1.56  
changed lines
  Added in v.1.57

  ViewVC Help
Powered by ViewVC 1.1.5