From 9f1141cbb6bf1558b0b22ede290f2c74b07ce321 Mon Sep 17 00:00:00 2001 From: Kevin Cozens Date: Tue, 15 Mar 2005 03:59:05 +0000 Subject: [PATCH] Added substring-equal? function. Re-ordered contents of file. Updated some 2005-03-14 Kevin Cozens * scripts/script-fu-compat.init: Added substring-equal? function. Re-ordered contents of file. Updated some comments. * scripts/test-sphere.sct: Updated to use multi-line text for the text displayed in the generated image. * debug-tiny-fu.txt: Added an option passed to valgrind. --- .../script-fu/scripts/script-fu-compat.init | 72 +++++++++++-------- 1 file changed, 41 insertions(+), 31 deletions(-) diff --git a/plug-ins/script-fu/scripts/script-fu-compat.init b/plug-ins/script-fu/scripts/script-fu-compat.init index f99d8d2a19..b11340017b 100644 --- a/plug-ins/script-fu/scripts/script-fu-compat.init +++ b/plug-ins/script-fu/scripts/script-fu-compat.init @@ -7,7 +7,8 @@ ;compability functions and define statements which follow the random number ;generator routines. ; -;This compatibility layer may be removed at some later date. +;The items marked as deprecated at the end of this file may be removed +;at some later date. ;The random number generator routines below have been slightly reformatted. @@ -124,20 +125,28 @@ ) -;Items below this line are deprecated and should not be used in new scripts. +;Items below this line are for compatability with Script-Fu but +;may be useful enough to keep around -(define (nth k list) - (list-ref list k) +(define (substring-equal? str str2 start end) + (string=? str (substring str2 start end)) ) -(define (prog1 form1 . form2) - (let ((a)) - (set! a form1) - (if (not (null? form2)) - form2 - ) - a - ) + +;Items below this line are deprecated and should not be used in new scripts. + +(define aset array-set!) +(define aref array-ref) +(define fopen open-input-file) +(define mapcar map) +(define nreverse reverse) +(define pow expt) +(define string-lessp stringexact (truncate a)) (inexact->exact (truncate b))) ) -(define *pi* - (* 4 (atan 1.0)) -) - -(define (rand . modulus) - (if (null? modulus) - (msrg-rand) - (apply random modulus) - ) -) - (define (fread arg1 file) (define (fread-get-chars count file) @@ -202,11 +200,23 @@ ) ) -(define aset array-set!) -(define aref array-ref) -(define fopen open-input-file) -(define mapcar map) -(define nreverse reverse) -(define pow expt) -(define symbol-bound? defined?) -(define trunc truncate) +(define (nth k list) + (list-ref list k) +) + +(define (prog1 form1 . form2) + (let ((a)) + (set! a form1) + (if (not (null? form2)) + form2 + ) + a + ) +) + +(define (rand . modulus) + (if (null? modulus) + (msrg-rand) + (apply random modulus) + ) +)