development release newLISP v.9.9.94
development release newLISP v.9.9.94
• command line switch -n to suppress init file loading
• a bug fix for self referential keys in replace
files and changes notes: http://www.newlisp.org/downloads/development
• a bug fix for self referential keys in replace
files and changes notes: http://www.newlisp.org/downloads/development
I was aware of this option, because you gave this advice prior to this thread.
But it is not the same as the -n switch.
The -n switch user has not to provide a global enviroment variable and an empty file.
For the EXE the workaround with an empty file would also work, but is not needed now because of the -n switch.
But it is not the same as the -n switch.
The -n switch user has not to provide a global enviroment variable and an empty file.
For the EXE the workaround with an empty file would also work, but is not needed now because of the -n switch.
Hans-Peter
Perhaps the normal routine of looking for .init.lsp or init.lsp should be completely excluded for newisp.dll. Instead you have to define NEWLISPLIB_INIT if you want a system wide initialization for newlisp.dll.
So by default nothing is loaded from newlisp.dll
Perhaps this is the best solution, because it permits several applications using newlisp.dll to live together on the same machine. So if NEWLISPLIB_INIT is defined it would do only system-wide stuff.
So by default nothing is loaded from newlisp.dll
Perhaps this is the best solution, because it permits several applications using newlisp.dll to live together on the same machine. So if NEWLISPLIB_INIT is defined it would do only system-wide stuff.
-
- Posts: 2038
- Joined: Tue Nov 29, 2005 8:28 pm
- Location: latiitude 50N longitude 3W
- Contact:
Lutz - as a related (MacOSX) question, do you know if it's possible to supply command-line arguments in the first line of a newLISP file when it's running from an editor such as TextWrangler or BBEdit? My attempts to make it recognize any haven't been successful so far...
Also, I prefer to use #!/usr/bin/env newlisp to run newLISP files - because newLISP isn't always in the system /usr/bin location - I can't use command-line arguments there either...
Also, I prefer to use #!/usr/bin/env newlisp to run newLISP files - because newLISP isn't always in the system /usr/bin location - I can't use command-line arguments there either...
On Mac OS X that works well, running the following program:
from the shell command line gives me:
both the stack size and main-args are set.
On FreeBSD (i.e. neearlyfreespeech.net) this will not with env, but the following works:
gives output:
But note, that main-args has all this: "-s 100000 a b c" as one argument, while in Mac OS X they where correctly separated. So it all depends on the plaform you are running on.
Code: Select all
#!/usr/bin/env newlisp -s 100000 a b c
(println (sys-info))
(println (main-args))
(exit)
Code: Select all
Users/lutz> ./test
(412 268435456 371 2 0 100000 566 9994 131)
("newlisp" "-s" "100000" "a" "b" "c" "./test")
/Users/lutz>
On FreeBSD (i.e. neearlyfreespeech.net) this will not with env, but the following works:
Code: Select all
#!/usr/local/bin/newlisp -s 100000 a b c
(println (sys-info))
(println (main-args))
(exit)
Code: Select all
[me@newlisp /home/public]$ ./test
(372 268435456 358 2 0 100000 9300 2)
("/usr/local/bin/newlisp" "-s 100000 a b c" "./test")
[me@newlisp /home/public]$
-
- Posts: 2038
- Joined: Tue Nov 29, 2005 8:28 pm
- Location: latiitude 50N longitude 3W
- Contact: