From f9f07da672f31b0572b8262b6f849b63f4929e1b Mon Sep 17 00:00:00 2001 From: erana Date: Sat, 21 Jan 2012 16:53:32 +0900 Subject: [PATCH] xanadu - btree --- scsh/xanadu/xml.scm | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/scsh/xanadu/xml.scm b/scsh/xanadu/xml.scm index 9a2aa42..b000b50 100644 --- a/scsh/xanadu/xml.scm +++ b/scsh/xanadu/xml.scm @@ -39,18 +39,18 @@ (let ((tagged 0)) (do ((c (read-char in) (read-char in))) ((eof-object? c) contents) - (cond ((and (= tagged 0)(eq? c #\<)) - (set! tagged (+ tagged 1))) - ((and (> tagged 0)(eq? c #\<)) - (set! tagged (+ tagged 1))) - ((and (= tagged 0)(eq? c #\>)) - (set! tagged (- tagged 1))) - ((and (> tagged 0)(eq? c #\>)) - (set! tagged (- tagged 1))) - ((< tagged 0) - (display "xml : bad xml file - broken tags.")(newline) - (set! tagged 0)) - ) - (set! contents (string-append contents (tagify! c tagged)))))) + (cond ((and (= tagged 0)(eq? c #\<)) + (set! tagged (+ tagged 1))) + ((and (> tagged 0)(eq? c #\<)) + (set! tagged (+ tagged 1))) + ((and (= tagged 0)(eq? c #\>)) + (set! tagged (- tagged 1))) + ((and (> tagged 0)(eq? c #\>)) + (set! tagged (- tagged 1))) + ((< tagged 0) + (display "xml : bad xml file - broken tags.")(newline) + (set! tagged 0)) + ) + (set! contents (string-append contents (tagify! c tagged)))))) (xml-read-in-file contents)))