Changeset 6205


Ignore:
Timestamp:
Apr 8, 2007, 4:37:04 AM (12 years ago)
Author:
gb
Message:

DRIBBLE via PROCESS-DRIBBLE.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/lib/streams.lisp

    r5395 r6205  
    180180;;;File Stuff here
    181181
    182 (let* ((dribble-stream nil)
    183        (old-standard-input nil)
    184        (old-standard-output nil)
    185        (old-error-output nil))
    186   (defun undribble ()
    187     (when dribble-stream
    188       (close dribble-stream)
    189       (setq dribble-stream nil
    190             *standard-output* old-standard-output
    191             old-standard-output nil
    192             *standard-input* old-standard-input
    193             old-standard-input nil
    194             *error-output* old-error-output
    195             old-error-output nil)))
    196   (defun dribble (&optional filename)
    197     "With a file name as an argument, dribble opens the file and sends a
     182(defun dribble (&optional filename)
     183  "With a file name as an argument, dribble opens the file and sends a
    198184     record of further I/O to that file. Without an argument, it closes
    199185     the dribble file, and quits logging."
    200     (undribble)
    201     (when filename
    202       (setq dribble-stream
    203             (open filename :direction :output :if-exists :append
    204                   :if-does-not-exist :create)
    205             old-standard-input *standard-input*
    206             *standard-input* (make-echo-stream
    207                               old-standard-input dribble-stream)
    208             old-standard-output *standard-output*
    209             *standard-output* (make-broadcast-stream
    210                                old-standard-output dribble-stream)
    211             old-error-output *error-output*
    212             *error-output* (make-broadcast-stream
    213                             old-error-output dribble-stream)))))
     186  (process-dribble *current-process* filename))
    214187
Note: See TracChangeset for help on using the changeset viewer.