COLUMNS - flag works now (removed bug from previous revision).
This commit is contained in:
		
							parent
							
								
									a9a269043f
								
							
						
					
					
						commit
						69271875a9
					
				
							
								
								
									
										10
									
								
								ls.scm
								
								
								
								
							
							
						
						
									
										10
									
								
								ls.scm
								
								
								
								
							| 
						 | 
					@ -78,11 +78,12 @@
 | 
				
			||||||
       
 | 
					       
 | 
				
			||||||
       (if recursive?
 | 
					       (if recursive?
 | 
				
			||||||
	   (let ((directories
 | 
						   (let ((directories
 | 
				
			||||||
		  (map (lambda (file-name)
 | 
					;		  (map (lambda (file-name)
 | 
				
			||||||
			 (string-append directory file-name))
 | 
					;			 (string-append directory file-name))
 | 
				
			||||||
		       (filter (lambda (file)
 | 
							       (filter (lambda (file)
 | 
				
			||||||
				 (file-directory? file #f))
 | 
									 (file-directory? file #f))
 | 
				
			||||||
			       files))))
 | 
								       files)))
 | 
				
			||||||
 | 
					;	     )
 | 
				
			||||||
	     (if (not (null? directories))
 | 
						     (if (not (null? directories))
 | 
				
			||||||
		 (begin
 | 
							 (begin
 | 
				
			||||||
		   (newline port)
 | 
							   (newline port)
 | 
				
			||||||
| 
						 | 
					@ -128,7 +129,8 @@
 | 
				
			||||||
	  ((= column columns))
 | 
						  ((= column columns))
 | 
				
			||||||
	(let ((tail (vector-ref tails column)))
 | 
						(let ((tail (vector-ref tails column)))
 | 
				
			||||||
	  (if (not (null? tail))
 | 
						  (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)
 | 
							(display-spaces (- column-width width) port)
 | 
				
			||||||
		(vector-set! tails column (cdr tail))))))
 | 
							(vector-set! tails column (cdr tail))))))
 | 
				
			||||||
      (newline port))))
 | 
					      (newline port))))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue