From: Chris Hanson Date: Fri, 3 Jan 2003 01:35:55 +0000 (+0000) Subject: Don't write column separators for empty cells in the table. X-Git-Tag: 20090517-FFI~2075 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=aa2b8217a493991bc34ac9150858fcce6819a651;p=mit-scheme.git Don't write column separators for empty cells in the table. --- diff --git a/v7/src/runtime/output.scm b/v7/src/runtime/output.scm index 40da300d8..29fb6e53b 100644 --- a/v7/src/runtime/output.scm +++ b/v7/src/runtime/output.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: output.scm,v 14.27 2003/01/02 01:52:51 cph Exp $ +$Id: output.scm,v 14.28 2003/01/03 01:35:55 cph Exp $ Copyright (c) 1986,1987,1988,1989,1990 Massachusetts Institute of Technology Copyright (c) 1991,1992,1993,1999,2001 Massachusetts Institute of Technology @@ -276,17 +276,16 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. (begin (write-string prefix port) (write-string (car strings) port) - (do ((n (- (car col-widths) (string-length (car strings))) - (- n 1))) - ((= n 0)) - (write-char #\space port)) - (set-car! cols (cdr strings))) - (begin - (write-string prefix port) - (do ((n (car col-widths) (- n 1))) - ((= n 0)) - (write-char #\space port)))))) + (write-spaces (- (car col-widths) + (string-length (car strings)))) + (set-car! cols (cdr strings)))))) (write-string right-margin port) (newline port))) + (define (write-spaces n) + (if (> n 0) + (begin + (write-char #\space port) + (write-spaces (- n 1))))) + (if row-major? (do-row-major) (do-col-major)))) \ No newline at end of file