mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-01 20:30:28 +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:
parent
381e1f582f
commit
28fdf6ac32
1 changed files with 9 additions and 6 deletions
|
@ -614,8 +614,7 @@
|
||||||
(case modifier
|
(case modifier
|
||||||
((colon)
|
((colon)
|
||||||
(if (not max-iterations) (set! max-iterations 1)))
|
(if (not max-iterations) (set! max-iterations 1)))
|
||||||
((colon-at at) (format:error "illegal modifier"))
|
((colon-at at) (format:error "illegal modifier")))
|
||||||
(else (if (not max-iterations) (set! max-iterations 100))))
|
|
||||||
(if (not (null? params))
|
(if (not (null? params))
|
||||||
(format:error "no parameters allowed in ~~}"))
|
(format:error "no parameters allowed in ~~}"))
|
||||||
(if (zero? iteration-nest)
|
(if (zero? iteration-nest)
|
||||||
|
@ -637,7 +636,8 @@
|
||||||
(list-tail args arg-pos))))
|
(list-tail args arg-pos))))
|
||||||
(i 0 (+ i 1)))
|
(i 0 (+ i 1)))
|
||||||
((or (>= arg-pos args-len)
|
((or (>= arg-pos args-len)
|
||||||
(>= i max-iterations))))))
|
(and max-iterations
|
||||||
|
(>= i max-iterations)))))))
|
||||||
((sublists)
|
((sublists)
|
||||||
(let ((args (next-arg))
|
(let ((args (next-arg))
|
||||||
(args-len 0))
|
(args-len 0))
|
||||||
|
@ -646,7 +646,8 @@
|
||||||
(set! args-len (length args))
|
(set! args-len (length args))
|
||||||
(do ((arg-pos 0 (+ arg-pos 1)))
|
(do ((arg-pos 0 (+ arg-pos 1)))
|
||||||
((or (>= arg-pos args-len)
|
((or (>= arg-pos args-len)
|
||||||
(>= arg-pos max-iterations)))
|
(and max-iterations
|
||||||
|
(>= arg-pos max-iterations))))
|
||||||
(let ((sublist (list-ref args arg-pos)))
|
(let ((sublist (list-ref args arg-pos)))
|
||||||
(if (not (list? sublist))
|
(if (not (list? sublist))
|
||||||
(format:error
|
(format:error
|
||||||
|
@ -663,7 +664,8 @@
|
||||||
args arg-pos))))
|
args arg-pos))))
|
||||||
(i 0 (+ i 1)))
|
(i 0 (+ i 1)))
|
||||||
((or (>= arg-pos args-len)
|
((or (>= arg-pos args-len)
|
||||||
(>= i max-iterations))
|
(and max-iterations
|
||||||
|
(>= i max-iterations)))
|
||||||
arg-pos))))
|
arg-pos))))
|
||||||
(add-arg-pos usedup-args)))
|
(add-arg-pos usedup-args)))
|
||||||
((rest-sublists)
|
((rest-sublists)
|
||||||
|
@ -672,7 +674,8 @@
|
||||||
(usedup-args
|
(usedup-args
|
||||||
(do ((arg-pos 0 (+ arg-pos 1)))
|
(do ((arg-pos 0 (+ arg-pos 1)))
|
||||||
((or (>= arg-pos args-len)
|
((or (>= arg-pos args-len)
|
||||||
(>= arg-pos max-iterations))
|
(and max-iterations
|
||||||
|
(>= arg-pos max-iterations)))
|
||||||
arg-pos)
|
arg-pos)
|
||||||
(let ((sublist (list-ref args arg-pos)))
|
(let ((sublist (list-ref args arg-pos)))
|
||||||
(if (not (list? sublist))
|
(if (not (list? sublist))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue