diff --git a/test-chibi.scm b/test-chibi.scm index 051b67b..74ff515 100755 --- a/test-chibi.scm +++ b/test-chibi.scm @@ -8,7 +8,7 @@ (define (main arguments) (for-each (lambda (tex-file) - (display (call-with-input-file tex-file parse-tex-from-port)) + (display (with-input-from-file tex-file read-tex-document)) (newline)) (cdr arguments))) diff --git a/tex-parser.scm b/tex-parser.scm index b84e050..7da39b0 100644 --- a/tex-parser.scm +++ b/tex-parser.scm @@ -36,6 +36,5 @@ ;;(fprintf (current-error-port) "Read thing: ~a~%" thing) (loop (append things (list thing))))))))) -(define (parse-tex-from-port char-input-port) - (parameterize ((current-input-port char-input-port)) - (read-tex-until eof-object?))) +(define (read-tex-document) + (read-tex-until eof-object?)) diff --git a/tex-parser.sld b/tex-parser.sld index 06ad584..8b558d5 100644 --- a/tex-parser.sld +++ b/tex-parser.sld @@ -1,5 +1,5 @@ (define-library (tex-parser) - (export parse-tex-from-port) + (export read-tex-document) (import (scheme base) (scheme char) (scheme file)