READ-LINE does the job as well as READ-CRLF-IO, so kick CRLF-IO.

This commit is contained in:
interp 2003-01-17 17:40:30 +00:00
parent 92d760a1cd
commit 05b7af0986
1 changed files with 5 additions and 8 deletions

View File

@ -1,18 +1,15 @@
(define-structure servlet servlet-interface (define-structure servlet servlet-interface
(open scheme-with-scsh (open scheme-with-scsh
servlets servlets)
crlf-io)
(begin (begin
(define *data* '()) (define *data* '())
(define (read-data) (define (read-data)
(let ((news-input (open-input-file "news.txt"))) (let ((news-input (open-input-file "news.txt")))
(let loop ((next-line (read-crlf-line news-input))) (do ((next-line (read-line news-input)
(if (eof-object? next-line) (read-line news-input)))
(close news-input) ((eof-object? next-line) (close news-input))
(begin (set! *data* (cons next-line *data*)))))
(set! *data* (cons next-line *data*))
(loop (read-crlf-line news-input)))))))
(define (main req) (define (main req)
(if (null? *data*) (read-data)) (if (null? *data*) (read-data))