Hi, Thanks Camm, I'll try it out!
Cheers, Jared On Fri, Jul 12, 2013 at 11:14 AM, Camm Maguire <[email protected]> wrote: > Greetings! I went ahead and put this into the Version_2_6_9pre tag. If > it works for you and you can drop me a note, that would be great! > > Take care, > > "Jared C. Davis" <[email protected]> writes: > >> Hi, >> >> I'm trying to write a wrapper function that provides uniform access to >> the command-line arguments of Lisp programs across many Lisps. >> >> In CCL (and also in Allegro, CLISP, CMUCL, SBCL, mutatis mutandis), one can >> do: >> >> $ cat myprog-ccl >> #!/bin/sh >> exec ccl -I myprog.ccl -K ISO-8858-1 -e "(myprog::main)" -- "$@" >> >> The options that come before the special "--" argument here are "for >> the Lisp", and options after it are "for my program." >> >> This is especially nice because there is no ambiguity: >> #1. If my program takes its own -I switch, that's okay: the LIsp >> isn't going to get confused and think that I'm telling it to use some >> other image. >> #2. If my program doesn't have its own -K switch, that's fine: the >> Lisp isn't going to send that option to the program, because it's an >> option for the Lisp. >> >> Does GCL have any command-line switch similar to "--"? >> >>>From the man page, it almost sounds like I want to use -f. But that >> seems to do something strange involving reading files, and so it >> doesn't seem quite right. >> >> If there is no such option, I guess I can at least write my wrapper >> script along the following lines: >> >> $ cat myprog-gcl >> #!/bin/sh >> exec myprog.gcl -eval "(myprog::main)" -- "$@" >> >> Then, in my program, I could at least throw out everything before the >> "--" in si::*command-args*. >> >> This would at least give me the good behavior #2. But since GCL would >> still be processing all of the arguments, it doesn't seem like it >> solves #1. For instance, if my program has its own options with names >> like -f, -dir, -eval, etc., then GCL will think are options for it, >> and then would presumably try to do crazy things. >> >> Thanks! >> Jared > > -- > Camm Maguire [email protected] > ========================================================================== > "The earth is but one country, and mankind its citizens." -- Baha'u'llah -- Jared C. Davis <[email protected]> 11410 Windermere Meadows Austin, TX 78759 http://www.cs.utexas.edu/users/jared/ _______________________________________________ Gcl-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/gcl-devel
