1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-01 12:20:26 +02:00

2004-05-25 Matthias Koeppe <mkoeppe@mail.math.uni-magdeburg.de>

* format.scm: Remove the arbitrary limit of 100 iterations for the
	~{...~} control structure.
This commit is contained in:
Kevin Ryde 2004-07-19 00:13:17 +00:00
parent 381e1f582f
commit 28fdf6ac32

View file

@ -614,8 +614,7 @@
(case modifier
((colon)
(if (not max-iterations) (set! max-iterations 1)))
((colon-at at) (format:error "illegal modifier"))
(else (if (not max-iterations) (set! max-iterations 100))))
((colon-at at) (format:error "illegal modifier")))
(if (not (null? params))
(format:error "no parameters allowed in ~~}"))
(if (zero? iteration-nest)
@ -637,7 +636,8 @@
(list-tail args arg-pos))))
(i 0 (+ i 1)))
((or (>= arg-pos args-len)
(>= i max-iterations))))))
(and max-iterations
(>= i max-iterations)))))))
((sublists)
(let ((args (next-arg))
(args-len 0))
@ -646,7 +646,8 @@
(set! args-len (length args))
(do ((arg-pos 0 (+ arg-pos 1)))
((or (>= arg-pos args-len)
(>= arg-pos max-iterations)))
(and max-iterations
(>= arg-pos max-iterations))))
(let ((sublist (list-ref args arg-pos)))
(if (not (list? sublist))
(format:error
@ -663,7 +664,8 @@
args arg-pos))))
(i 0 (+ i 1)))
((or (>= arg-pos args-len)
(>= i max-iterations))
(and max-iterations
(>= i max-iterations)))
arg-pos))))
(add-arg-pos usedup-args)))
((rest-sublists)
@ -672,7 +674,8 @@
(usedup-args
(do ((arg-pos 0 (+ arg-pos 1)))
((or (>= arg-pos args-len)
(>= arg-pos max-iterations))
(and max-iterations
(>= arg-pos max-iterations)))
arg-pos)
(let ((sublist (list-ref args arg-pos)))
(if (not (list? sublist))