Changeset 12786 in project for chicken/trunk/chicken-status.scm


Ignore:
Timestamp:
12/05/08 15:08:07 (12 years ago)
Author:
felix winkelmann
Message:

removed setup-utils (merged into setup-api)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chicken/trunk/chicken-status.scm

    r11966 r12786  
    4040       (concatenate (map (cut grep <> eggs) patterns))
    4141       string=?)))
     42
     43  (define (format-string str cols #!optional right (padc #\space))
     44    (let* ((len (string-length str))
     45           (pad (make-string (fxmax 0 (fx- cols len)) padc)) )
     46      (if right
     47          (string-append pad str)
     48          (string-append str pad) ) ) )
     49
     50  (define get-terminal-width
     51    (let ((default-width 80))        ; Standard default terminal width
     52      (lambda ()
     53        (let ((cop (current-output-port)))
     54          (if (terminal-port? cop)
     55              (let ((w (nth-value 1 (terminal-size cop))))
     56                (if (zero? w) default-width w))
     57              default-width)))))
    4258
    4359  (define (list-installed-eggs eggs)
Note: See TracChangeset for help on using the changeset viewer.