minor change to concat in output-strings.

This commit is contained in:
Abdulaziz Ghuloum 2007-05-20 00:57:28 -04:00
parent 7b8b50a6aa
commit 3c520ea9d3
2 changed files with 6 additions and 4 deletions

Binary file not shown.

View File

@ -53,7 +53,7 @@
(let ([outbv ($make-bytevector n)]) (let ([outbv ($make-bytevector n)])
(let f ([n (copy outbv bv i n)] [ls ls]) (let f ([n (copy outbv bv i n)] [ls ls])
(if (null? ls) (if (null? ls)
(utf8-bytevector->string outbv) outbv
(let ([a ($car ls)]) (let ([a ($car ls)])
(f (copy outbv a ($bytevector-length a) n) ($cdr ls))))))))) (f (copy outbv a ($bytevector-length a) n) ($cdr ls)))))))))
(define sum (define sum
@ -140,9 +140,11 @@
(set! open? #f)] (set! open? #f)]
[(port-name p) 'string-port] [(port-name p) 'string-port]
[(get-output-string p) [(get-output-string p)
(concat ($port-output-buffer p) (utf8-bytevector->string
($port-output-index p) (concat
buffer-list)] ($port-output-buffer p)
($port-output-index p)
buffer-list))]
[else (error 'output-handler [else (error 'output-handler
"unhandled message ~s" (cons msg args))]))) "unhandled message ~s" (cons msg args))])))
output-handler)) output-handler))