Yabasic 2.9.9 is now available for download. It isn't polished (just look at todo.txt!), but nevertheless I invite you to test it, experiment with it, and report any bugs that you find.
What's new in 2.9.9?
- In theory, modules are now fully integrated into Yabasic.
- There are two new command-line options, --library-path and --module-path, which allow you to specify the directories that libraries and modules are loaded from respectively.
- Now, the default module and library paths are relative (on Unix-like systems, modules/ and libraries/; on Windows systems, modules\ and libraries\). (Could someone please ensure that this works on Windows?)
- There is a new special function (or array variable) called
__arg$ ()(synonym__args$ ()). It takes a single numerical parameter, the number of an argument passed to Yabasic at startup. If the specified parameter is within range, the argument is returned as a string, otherwise an empty string ("") is returned. - Several bugs have been fixed.
I have tried to integrate Pedro's module code into Yabasic, but I may have left bits out accidentally (although I used vimdiff to check everything). Please let me know if you find any mistakes or omissions.
I managed to eliminate all compilation warnings. I did make three significant changes related to modules:
- I've used the term "module" throughout, as opposed to "plugin". I don't really have a major preference, but it is important that we use the same term consistently in order to avoid confusing users. It would be very easy to change to using "plugin" if that's what people prefer, but we would need to use it consistently. (By the way, the file extension for modules is now .ybm rather than .ybp.)
- I've "expanded" some of the abbreviated symbol prefixes used by Pedro. For example, I changed
ybpi_toyabmod_interface_, andybpf_toyabmod_function_. (The main reason for this change is simple: to make modules more usable and understandable to inexperienced users.) Consequently, some of the existing module code (the SDL module, for example) will need to be changed in order to reflect the new symbol prefixes. - I've eliminated the anonymous variadic macro
CHECK_FUNCTION_CALL, which was used to check module function calls; such macros are not permitted in standard ISO C. It would, I think, be possible to write a function to perform the same task (usingva_argand family) in an ISO C-compatible way, or alternatively to write several macros each taking a particular number of arguments.
You will need to compile modules manually for the time being; the .ybm file should end up in the modules directory.
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.