COLUMNS - flag works now (removed bug from previous revision).

This commit is contained in:
interp 2001-09-07 15:22:02 +00:00
parent a9a269043f
commit 69271875a9
1 changed files with 6 additions and 4 deletions

10
ls.scm
View File

@ -78,11 +78,12 @@
(if recursive?
(let ((directories
(map (lambda (file-name)
(string-append directory file-name))
; (map (lambda (file-name)
; (string-append directory file-name))
(filter (lambda (file)
(file-directory? file #f))
files))))
files)))
; )
(if (not (null? directories))
(begin
(newline port)
@ -128,7 +129,8 @@
((= column columns))
(let ((tail (vector-ref tails column)))
(if (not (null? tail))
(let ((width (display-file (car tail) flag? port)))
(let* ((file-name (car tail))
(width (display-file file-name (file-info file-name) flag? port)))
(display-spaces (- column-width width) port)
(vector-set! tails column (cdr tail))))))
(newline port))))