1#! qscheme -*- scheme -*- 2 3(define (print-file fname) 4 (let ((port (open-input-file fname)) 5 (buf (make-string 0))) 6 (while (read-line buf port) 7 (print buf)) 8 (close-port port))) 9 10(define (fprint-file fname) 11 (let ((fd (fopen fname "r")) 12 (buf (make-string 0))) 13 (while (positive? (fgetline buf fd)) 14 (fwrite buf stdout)) 15 (fclose fd))) 16 17(define (doit) 18 (let* ((i 0) 19 (l (vector-length argv))) 20 (while (< i l) 21 (print-file (vref argv i)) 22 (set! i (+ i 1))))) 23(doit) 24