Warning: argument option processing changes
Jan Wielemaker <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[email protected]> |
Hi, Prolog can be started in many ways and the new stuff around Carlo's console and the Mac makes it even more complicated. I spent most of the day sorting out command line processing. Pushed the changed, which introduces some INCOMPATIBLE changes. It does improve compatibility with some other systems though. Outline: - The Prolog flag =argv= now only provides `user arguments'. I.e., arguments processed by Prolog are not there. This is compatible with at least YAP and SICStus. All arguments are still available with the new flag =os_argv=. - I removed all stuff trying to be clever with arguments from #! scripts. Most of this didn't work anyway, leading to all sorts of hard to debug platform dependent surprises. This concretely means that options in #! under Windows have no meaning. On Unix systems, only #!/path-to-executable [option] (using only one option) is (AFAIK) fully portable. Anything that can be handled using options can be handled with directives these days, so functionality-wise nothing changes. - swipl [option ...] prolog-file ... loads the given Prolog files (extensions .pl and .qlf; this is processed *before* ~/.plrc). - swipl [option ...] script-file arg ... processes script-file and passes the remaining options in the flag argv. A script file is a file with any extension that starts with #! Updated all packages. Also updated ClioPatria to deal with this. Sorry for the inconvenience. Notably the change of the =argv= flag will force changing some programs. I think this was unavoidable, considering established practice. If you see opportunities to further simplify things or reduce compatibility impact, let me know. Cheers --- Jan