Added make-list. Corrected name of unstrbreakup to unbreakupstr and fixed

2006-11-24  Kevin Cozens  <kcozens@cvs.gnome.org>

	* plug-ins/script-fu/scripts/script-fu-compat.init: Added make-list.
	Corrected name of unstrbreakup to unbreakupstr and fixed bug in it.
	Fixed butlast to handle lists with one entry.
This commit is contained in:
Kevin Cozens 2006-11-24 05:25:52 +00:00 committed by Kevin Cozens
parent 9b9c336ed8
commit 92d2de9785
2 changed files with 16 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2006-11-24 Kevin Cozens <kcozens@cvs.gnome.org>
* plug-ins/script-fu/scripts/script-fu-compat.init: Added make-list.
Corrected name of unstrbreakup to unbreakupstr and fixed bug in it.
Fixed butlast to handle lists with one entry.
2006-11-23 Sven Neumann <sven@gimp.org>
* Made 2.3.13 development release.

View File

@ -128,6 +128,10 @@
;Items below this line are for compatability with Script-Fu but
;may be useful enough to keep around
(define (make-list count fill)
(vector->list (make-vector count fill))
)
(define (strbreakup str sep)
(let* (
(seplen (string-length sep))
@ -200,9 +204,10 @@
)
)
(define (unstrbreakup stringlist sep)
(define (unbreakupstr stringlist sep)
(let ((str (car stringlist)))
(set! (stringlist (cdr stringlist)))
(while (not (null? stringlist))
(set! str (string-append str sep (car stringlist)))
(set! stringlist (cdr stringlist))
@ -232,7 +237,10 @@
)
(define (butlast x)
(reverse (cdr (reverse x)))
(if (= (length x) 1)
'()
(reverse (cdr (reverse x)))
)
)
(define (cons-array count type)