anchor.diff:  
   (declaim (inline capability))
   (defun capability (name &optional (terminfo *terminfo*))
  +  "Return the contents of the terminfo database for the given parameter.
  +Returns nil for undefined capabilities."
     (%capability name terminfo))
   
   #+CMU
  
positive.code: 		  2500000 3000000 3500000 4000000)
  		(logxor baud unix::tty-cbaudex)))))))
  
  (defun tputs (string &rest args)
    (when string
      (let* ((stream (if (streamp (first args)) (pop args) *terminal-io*))
  	   (terminfo (if (terminfo-p (first args)) (pop args) *terminfo*)))
        (with-input-from-string (string (apply #'tparm string args))
  	(do ((c (read-char string nil) (read-char string nil)))
  	    ((null c))
  	  (cond ((and (char= c #\$)
  		      (eql (peek-char nil string nil) #\<))
  		 (let ((time 0) (force nil) (rate nil) (pad #\Null))
  
  		   ;; Find out how long to pad for:
  		   (read-char string) ; eat the #\<
  		   (loop
  		     (setq c (read-char string))
  		     (let ((n (digit-char-p c)))
  		       (if n
  			   (setq time (+ (* time 10) n))
  			   (return))))
  		   (if (char= c #\.)
  		       (setq time (+ (* time 10)
  				     (digit-char-p (read-char string)))
  			     c (read-char string))
  		       (setq time (* time 10)))
  		   (when (char= c #\*)
  		     ;; multiply time by "number of lines affected"
  		     ;; but how do I know that??
  		     (setq c (read-char string)))
  		   (when (char= c #\/)
  		     (setq force t c (read-char string)))
  		   (unless (char= c #\>)
  		     (error "Invalid padding specification."))
  
  		   ;; Decide whether to apply padding:
  		   (when (or force (not (capability :xon-xoff terminfo)))
  		     (setq rate (stream-baud-rate stream))
  		     (when (let ((pb (capability :padding-baud-rate terminfo)))
  			     (and rate (or (null pb) (> rate pb))))
  		       (cond ((capability :no-pad-char terminfo)
  			      (finish-output stream)
  			      (sleep (/ time 10000.0)))
  			     (t
  			      (let ((tmp (capability :pad-char terminfo)))
  				(when tmp (setf pad (schar tmp 0))))
  			      (dotimes (i (ceiling (* rate time) 100000))
  				(princ pad stream))))))))
  
  		(t
  		 (princ c stream))))))
      t))
  
  (defun set-terminal (&optional name)
    (setf *terminfo* (load-terminfo (or name
  				      #+ccl
  				      (ccl:getenv "TERM")
  
negative.code: 			   (go terminal))))
  		  (error "Invalid integer constant")
  		state14
  		  (go terminal)
  		state15
  		  (when (/= (pop stack) 0)
  		    (go terminal))
  		  (skip-forward in t)
  		  (go terminal)
  		state16
  		  (skip-forward in nil)
  		state17
  		terminal
  		  #| that's all, folks |#))
  	      (t (princ c out)))))))
  
  (defgeneric stream-fileno (stream)
    (:method ((stream stream))
      nil)
    #+CMU
    (:method ((stream sys:fd-stream))
      (sys:fd-stream-fd stream))
    (:method ((stream two-way-stream))
      (stream-fileno (two-way-stream-output-stream stream)))
    (:method ((stream synonym-stream))
      (stream-fileno (symbol-value (synonym-stream-symbol stream))))
    (:method ((stream echo-stream))
      (stream-fileno (echo-stream-output-stream stream)))
    (:method ((stream broadcast-stream))
      (stream-fileno (first (broadcast-stream-streams stream))))
    #+(and CMU simple-streams)
    (:method ((stream stream:simple-stream))
      (let ((fd (stream:stream-output-handle stream)))
        (if (or (null fd) (integerp fd)) fd (stream-fileno fd)))))
  
  (defun stream-baud-rate (stream)
    (declare (type stream stream)
  	   (values (or null (integer 0 4000000))))
    #+CMU
    (alien:with-alien ((termios (alien:struct unix:termios)))
      (declare (optimize (ext:inhibit-warnings 3)))
  