Ignore:
Timestamp:
Feb 6, 2004, 7:36:45 PM (16 years ago)
Author:
gb
Message:

Tweaks to the :Y command, to handle new shared-resource scheme.
Marco Baringer's :SET breakloop command, from almost a year ago.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/level-1/l1-readloop-lds.lisp

    r334 r480  
    4242
    4343(define-toplevel-command
    44     :global y (p) "Yield control of terminal-input to process whose name or ID is <p>"
    45     (let* ((proc (find-process p)))
    46         (if (null proc)
    47           (format t "~&;; not found - ~s" p)
    48           (if (not (member proc *terminal-input-requests*))
    49             (format t "~&;; process not requesting control of terminal input")
    50             (%%yield-terminal-to proc)))))
     44    :global y (&optional p) "Yield control of terminal-input to process
     45whose name or ID matches <p>, or to any process if <p> is null"
     46    (if p
     47      (let* ((proc (find-process p)))
     48        (%%yield-terminal-to proc)      ;may be nil
     49        (%%yield-terminal-to nil))))
    5150
    5251(define-toplevel-command
     
    6968               (if (and suspend-count (not (eql 0 suspend-count)))
    7069                 (format t " (Suspended)")))
    71              (if (member proc *terminal-input-requests*)
    72                (format t " (Requesting terminal input)"))
     70             (let* ((terminal-input-shared-resource
     71                     (if (typep *terminal-io* 'two-way-stream)
     72                       (input-stream-shared-resource
     73                        (two-way-stream-input-stream *terminal-io*)))))
     74               (if (and terminal-input-shared-resource
     75                        (%shared-resource-requestor-p
     76                         terminal-input-shared-resource proc))
     77                 (format t " (Requesting terminal input)")))
    7378             (fresh-line)))
    7479      (if p
     
    8792    (dotimes (i (length r) (terpri))
    8893      (format t "~&~d. ~a" i (svref r i)))))
     94
     95;;; From Marco Baringer 2003/03/18
     96(define-toplevel-command :break set (n frame value) "Set <n>th item of frame <frame> to <value>"
     97  (let* ((frame-sp (nth-raw-frame frame *break-frame* (%current-tcr))))
     98    (if frame-sp
     99        (toplevel-print (list (set-nth-value-in-frame frame-sp n (%current-tcr) value)))
     100        (format *debug-io* "No frame with number ~D~%" frame))))
    89101
    90102(define-toplevel-command :global ? () "help"
Note: See TracChangeset for help on using the changeset viewer.