diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-03-20 15:53:20 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-03-20 15:53:20 +0200 |
commit | 64fc02b811f0ba797c221912fbb1685857893ac0 (patch) | |
tree | 9d08ea3e4e4e8a4875be088a0c95c22275266fd9 /src | |
parent | 004dc35b5d6c451184ed0983caee65e47c6b4091 (diff) | |
download | gamma-64fc02b811f0ba797c221912fbb1685857893ac0.tar.gz gamma-64fc02b811f0ba797c221912fbb1685857893ac0.tar.bz2 |
Finish the docs.
Diffstat (limited to 'src')
-rw-r--r-- | src/expat.sci | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/expat.sci b/src/expat.sci index 1dcabc6..a9449c3 100644 --- a/src/expat.sci +++ b/src/expat.sci @@ -60,11 +60,14 @@ include(BUILDDIR/gamma-expat.inc) (else (xml-primitive-parse parser input #f)))) -(define (xml-parse parser) - (let loop ((line (read-line))) - (xml-parse-more parser line) - (if (not (eof-object? line)) - (loop (read-line))))) +(define (xml-parse parser . args) + (let ((port (if (null? args) + (current-input-port) + (car args)))) + (let loop ((line (read-line port 'concat))) + (xml-parse-more parser line) + (if (not (eof-object? line)) + (loop (read-line port 'concat)))))) (define (xml-set-handler parser . rest) (if (odd? (length rest)) |