move FILL-UP-STRING and CUT-TO-SIZE to layout

This commit is contained in:
eknauel 2005-05-31 19:32:09 +00:00
parent 49054b8d88
commit 145f79b654
2 changed files with 11 additions and 12 deletions

View File

@ -64,18 +64,6 @@
(cut-to-size 8 (group-info:name
(group-info (file-info:gid fi)))))))
(define (fill-up-string length string)
(if (> (string-length string) length)
(substring string 0 length)
(string-append
string (make-string (- length (string-length string))
#\space))))
(define (cut-to-size length string)
(if (> (string-length string) length)
(substring string 0 length)
string))
;; leave one line for the heading
(define (calculate-number-of-lines result-buffer)
(- (result-buffer-num-lines result-buffer)

View File

@ -187,3 +187,14 @@
(mvwaddstr window pos 1 line)
(loop (+ pos 1)))))))))))
(define (fill-up-string length string)
(if (> (string-length string) length)
(substring string 0 length)
(string-append
string (make-string (- length (string-length string))
#\space))))
(define (cut-to-size length string)
(if (> (string-length string) length)
(substring string 0 length)
string))