On Thu, 2025-08-28 at 12:03 +0200, Gisle Vanem wrote: > With a 'load mk_speak.dll(speak_init)' (no space), > all is well. Why does it not handle this single > space? > > It seems a 'load' line is parsed similar to a normal include > file where a ' ' is not legal. Or? IMHO, a space should be > accepted.
No. Because, it's legal to load multiple files in a single line (as with include), so: load foo(bar) is parsed as loading "foo" with the argument "bar", but: load foo (bar) is parsed as loading two files, one named "foo" and the other named "(bar)" > BTW1. I'm not sure what the signature of such a 'speak_init()' > function should be. The argument gives an alternate symbol name for the setup function so yes, it should have the same syntax as the setup function. > BTW2. Could such an init-function take parameters? > E.g. 'load mk_speak.dll(speak_init, 50)' would be handy > to set the volume to 50%. It can't. The argument is the name of the function used to set up the DLL. However you can register a different function which can be used to change the volume; that might even be better since you could use different volumes for different things. The docs here: https://www.gnu.org/software/make/manual/html_node/Loading-Objects.html and the example here: https://www.gnu.org/software/make/manual/html_node/Loaded-Object-Example.html are hopefully sufficient to get you started.