Browse code
Cleaning up
Ed Langley authored on 14/04/2018 07:20:37
Showing 1 changed files
Showing 1 changed files
... | ... |
@@ -93,25 +93,24 @@ |
93 | 93 |
(format t "~&=========~%") |
94 | 94 |
(values)) |
95 | 95 |
|
96 |
-(defun stack-info (the-stack) |
|
97 |
- (lambda (old-status) |
|
96 |
+(defun stack-info (name old-status) |
|
97 |
+ (let* ((the-stack (stack-for-name name)) |
|
98 |
+ (current-status (stack-status the-stack))) |
|
98 | 99 |
(unless old-status |
99 | 100 |
(parameter-block the-stack)) |
100 | 101 |
|
101 |
- (let ((current-status (stack-status the-stack))) |
|
102 |
- (unless (eql old-status current-status) |
|
103 |
- (format t "~&STATUS ~a~%" current-status) |
|
104 |
- (setf old-status current-status)) |
|
102 |
+ (unless (equal old-status current-status) |
|
103 |
+ (format t "~&STATUS ~a~%" old-status current-status)) |
|
105 | 104 |
|
106 |
- (values (if (ends-with-subseq "COMPLETE" (symbol-name current-status)) |
|
107 |
- (output-block the-stack) |
|
108 |
- t) |
|
109 |
- current-status)))) |
|
105 |
+ (values (if (ends-with-subseq "COMPLETE" (symbol-name current-status)) |
|
106 |
+ (output-block the-stack) |
|
107 |
+ t) |
|
108 |
+ name |
|
109 |
+ current-status))) |
|
110 | 110 |
|
111 | 111 |
(defun watch-stack (name) |
112 |
- (let ((the-stack (stack-for-name name))) |
|
113 |
- (format t "~&Watching ~s~2%" name) |
|
114 |
- (every-five-seconds (stack-info the-stack) |
|
115 |
- (list nil)) |
|
116 |
- (fresh-line))) |
|
112 |
+ (format t "~&Watching ~s~2%" name) |
|
113 |
+ (every-five-seconds 'stack-info |
|
114 |
+ (list name nil)) |
|
115 |
+ (fresh-line)) |
|
117 | 116 |
|