READ-LINE does the job as well as READ-CRLF-IO, so kick CRLF-IO.
This commit is contained in:
		
							parent
							
								
									92d760a1cd
								
							
						
					
					
						commit
						05b7af0986
					
				|  | @ -1,18 +1,15 @@ | |||
| (define-structure servlet servlet-interface | ||||
|   (open scheme-with-scsh | ||||
| 	servlets | ||||
| 	crlf-io) | ||||
| 	servlets) | ||||
|   (begin | ||||
|     (define *data* '()) | ||||
|      | ||||
|     (define (read-data) | ||||
|       (let ((news-input (open-input-file "news.txt"))) | ||||
| 	(let loop ((next-line (read-crlf-line news-input))) | ||||
| 	  (if (eof-object? next-line) | ||||
| 	      (close news-input) | ||||
| 	      (begin | ||||
| 		(set! *data* (cons next-line *data*)) | ||||
| 		(loop (read-crlf-line news-input))))))) | ||||
| 	(do ((next-line (read-line news-input) | ||||
| 			(read-line news-input))) | ||||
| 	    ((eof-object? next-line) (close news-input)) | ||||
| 	  (set! *data* (cons next-line *data*))))) | ||||
|        | ||||
|     (define (main req) | ||||
|       (if (null? *data*) (read-data)) | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 interp
						interp