Commit 92d2de97 authored by Kevin Cozens's avatar Kevin Cozens Committed by Kevin Cozens
Browse files

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.
parent 9b9c336e
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.
......
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment