summaryrefslogtreecommitdiffstats
path: root/obj2str.scm
diff options
context:
space:
mode:
Diffstat (limited to 'obj2str.scm')
-rw-r--r--obj2str.scm23
1 files changed, 11 insertions, 12 deletions
diff --git a/obj2str.scm b/obj2str.scm
index a8445f6..a9b8313 100644
--- a/obj2str.scm
+++ b/obj2str.scm
@@ -1,9 +1,9 @@
;;; "obj2str.scm", write objects to a string.
;Copyright (C) 1993, 1994 Aubrey Jaffer
;
-;Permission to copy this software, to redistribute it, and to use it
-;for any purpose is granted, subject to the following restrictions and
-;understandings.
+;Permission to copy this software, to modify it, to redistribute it,
+;to distribute modified versions, and to use it for any purpose is
+;granted, subject to the following restrictions and understandings.
;
;1. Any copy made of this software must include this copyright notice
;in full.
@@ -52,13 +52,12 @@
(generic-write obj #f #f
(lambda (str)
(let ((len (string-length str)))
- (if (> len left)
- (begin
- (set! result (cons (substring str 0 left) result))
- (set! left 0)
- #f)
- (begin
- (set! result (cons str result))
- (set! left (- left len))
- #t)))))
+ (cond ((> len left)
+ (set! result (cons (substring str 0 left) result))
+ (set! left 0)
+ #f)
+ (else
+ (set! result (cons str result))
+ (set! left (- left len))
+ #t)))))
(reverse-string-append result)))