;;; -*- Mode:Lisp; Readtable:ZL; Package:USER; Base:8; Patch-File:T -*-
;;; Patch file for System version 125.13
;;; Reason:
;;;  more intelligent calculation of line length for finger-arg-prompt
;;; Written 21-Jul-88 14:59:24 by pld (Peter L. DeWolf) at site Gigamos Cambridge
;;; while running on Azathoth from band 2
;;; with System 125.12, ZWEI 125.2, ZMail 73.0, Local-File 75.0, File-Server 24.0, Unix-Interface 13.0, Tape 24.0, Lambda-Diag 17.0, microcode 1762, SDU Boot Tape 3.14, SDU ROM 8, the old ones.



; From modified file DJ: L.WINDOW; BASSTR.LISP#415 at 21-Jul-88 14:59:25
#8R TV#: 
(COMPILER-LET ((*PACKAGE* (PKG-FIND-PACKAGE "TV")))
  (COMPILER::PATCH-SOURCE-FILE "SYS: WINDOW; BASSTR  "

(defun new-finger-arg-prompt ()
  "Return a string that describe the arguments to Terminal-F"
  (format:output nil
    (format t "Show users: ")
    (let ((arg-printed nil)
	  (comma-p nil)
	  (width (- (// (send default-screen :inside-width)
			(send default-screen :char-width))
		    48.))
	  )
      (loop for (arg . val) in *finger-arg-alist*
	    do (if comma-p
		   (if (> (send *standard-output* :read-cursorpos :character) width)
		       (format t ",~%  ")
		     (princ ", " *standard-output*))
		 (setq comma-p t))
	    when arg
	    do (unless arg-printed
		 (send *standard-output* :string-out "or prefix argument of ")
		 (setq arg-printed t))
	    do (when arg (format t "~D: " arg))
	    DO (write-kbd-finger-action nil val *standard-output*)))
    (format t ".")))

(finger-initialize-prompt)
))
