Use new table for listings.
This commit is contained in:
parent
3e4e8c4672
commit
eaced78aee
3 changed files with 6 additions and 5 deletions
|
@ -105,7 +105,7 @@ testing.o: testing.import.scm
|
|||
testing.import.scm: $(TESTING-SOURCES)
|
||||
|
||||
LISTING-SOURCES=listing.scm testing.import.scm ansi.import.scm \
|
||||
racket-kwargs.import.scm table-old.import.scm
|
||||
racket-kwargs.import.scm table.import.scm
|
||||
|
||||
listing.o: listing.import.scm
|
||||
listing.import.scm: $(LISTING-SOURCES)
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
ansi
|
||||
racket-kwargs
|
||||
util-dict-list
|
||||
table-old)
|
||||
table)
|
||||
|
||||
;; Returns the number of digits required to represent a given number
|
||||
;; in decimal format.
|
||||
|
@ -148,7 +148,7 @@
|
|||
(was-printing #f)
|
||||
(rtbl '()))
|
||||
(if (null? lines)
|
||||
(print (table->string (reverse rtbl) #:ansi #t))
|
||||
(print (table->string (reverse rtbl)))
|
||||
(let* ((highlight (match-highlight number highlights))
|
||||
(hl-type (if highlight (cadddr highlight) #f))
|
||||
(hl-def (assq hl-type highlight-rules))
|
||||
|
|
|
@ -183,14 +183,15 @@
|
|||
;;(_ (print min-widths0))
|
||||
(min-widths (combine-column-widths min-widths0 widths))
|
||||
;;(_ (print min-widths))
|
||||
(col-weights (table-column-weights ptbl))
|
||||
(col-weights (table-column-weights ptbl)) ;; Also ideal widths
|
||||
;;(_ (print col-weights))
|
||||
(min-width (foldl + 0 min-widths))
|
||||
(max-width (foldl + 0 col-weights))
|
||||
;;(_ (print min-width))
|
||||
(width (if (and width-arg
|
||||
(> width-arg min-width))
|
||||
width-arg
|
||||
min-width))
|
||||
max-width))
|
||||
;;(_ (print width))
|
||||
(width-surplus (- width min-width))
|
||||
;;(_ (print width-surplus))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue