Now since there is essentially a one-to-one correspondence between Tiny-Fu's vectors and Script-Fu's "arrays", it might be worth considering adding compatibility definitions to "init.scm" (similar to gimpcompat.h for plug-ins), that would, depending on a certain "compatibility"-switch in a configuration file (or in "init.scm" itself, but I don't know if every user will get a copy or you will install the file in /usr/gimpsomething...), "define ...." the current array operations and map them to corresponding vector functions. You could then (depending on said switch) also re-define set! to use "define" if a variable is not "defined?".
I don't really want a "compatibility"-switch. Instead, old Script-Fu scripts should be updated so they do things the way they are supposed to be done in Scheme rather than how the old SIOD interpreter let script writers get away with some things (ie. not defining variables). It forces a review of the code. For example, I noticed that one script defined an internal routine to compute a least common multiple rather. I deleted the routine and used the standard Scheme routine 'lcm'.
I am planning on putting together a Perl script that will take a Script-Fu script and update as much of it as possible for use with Tiny-Fu. I know of quite a few mappings from SIOD to TinyScheme that can be applied. Pre-defining variables and changing while loops to do loops will still have to be done by hand.
Owner of Elecraft K2 #2172 |"What are we going to do today, Borg?" E-mail:kcozens at interlog dot com|"Same thing we always do, Pinkutus: Packet:[EMAIL PROTECTED]| Try to assimilate the world!" #include <disclaimer/favourite> | -Pinkutus & the Borg
_______________________________________________ Gimp-developer mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer