Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!jato!vsnyder From: vsnyder@jato.jpl.nasa.gov (Van Snyder) Newsgroups: comp.sys.atari.st.tech Subject: Re: Can my program find its name? Message-ID: <1991Feb26.202605.13316@jato.jpl.nasa.gov> Date: 26 Feb 91 20:26:05 GMT References: <2133022@nuthaus.UUCP> <1991Feb18.205200.8638@uwovax.uwo.ca> <2843@atari.UUCP> <1991Feb21.151919.23876@informatik.uni-erlangen.de> <2845@atari.UUCP> Reply-To: vsnyder@jato.Jpl.Nasa.Gov (Van Snyder) Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 22 In article <2845@atari.UUCP> apratt@atari.UUCP (Allan Pratt) writes: >csbrod@immd4.informatik.uni-erlangen.de (Claus Brod) writes: >>BTW, the missing argv[0] in TOS programs really hurts sometimes. >>Sure, it's a design failure you are not responsible for, but it >>might be worth it thinking about solutions. > >We *have* thought about solutions. That's what the extended argument >passing spec is for. It's pretty widely accepted, I think. It's the same >as the MWC method, using ARGV= in the environment, except (A) there is no >information about file handles (you can find out other ways), and (B) there >is a special value in the "length" byte of the command line to tell you the >environment's ARGV= is valid. > >I will try to find the extended argument spec document and post it again. Have you considered the MS-DOS method: The ENV string block ends with 2 nulls, after which is the program name and another null? -- vsnyder@jato.Jpl.Nasa.Gov ames!elroy!jato!vsnyder vsnyder@jato.uucp