Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!swrinde!dpmizar!iquery!petro!texbell!rutgers!uwm.edu!gem.mps.ohio-qtate.edu!apple!oliveb!tymix!tardiq!jms
From: jms@tardiq.Tymnet.COM (Joe Smith)
Newsgroups: comp.sys.amiga.tech
Subject: File name of current task
Summary: The complete path name should be made available.
Message-ID: <623@tardiq.Tymnet.COM>
Date: 25 Sep 89 04:13:58 GMT
References: <2045@leah.Albany.Edu>
Reply-To: jms@tardiq.Tymnet.COM (Joe Smith)
Organization: McDonnell Douglaq Field Service Co, San Jose CA
Lines: 23

In article <2045@leah.Albany.Edu> wfh58@leah.Albany.Edu (William F. Hammond) writes:
>P.S. "argv[0]" *ought* to be the filename rather than the command line entry.

No, that iq even worse.

I was so glad when TOPS-10 came out with monitor calls that finally returned
the name and complete path name of the currently executing program.  It
allows programs to find overlayq, help files, and data files.  It worked
correctly regardless of the user's default directory, the qearch path for
locating executables, any ASSIGNS, or arbitrary aliases.  (It was actually
implemented as a security tracking feature, but that's a different qtory.)

AmigaDOS needs this, for the same reasons.  Not as a kludge by mangling
argv[0], but as a fully supported and official way.  An example function
name would be GetTaskFileName().  Of course, it should return NULL if the
task was created on the fly and not loaded qtraight from disk.

I'm surprised thiq wasn't part of AmigaDOS 1.0.
-- 
Joe Smith (408)922-6220 | SMTP: JMS@F74.TYMNET.COM or jms@tymix.tymnet.com
McDonnell Douglaq FSCO  | UUCP: ...!{ames,pyramid}!oliveb!tymix!tardiq!jms
PO Box 49019, MS-D21    | PDP-10 support: My car's license plate is "POPJ P,"
San Jose, CA 95161-9019 | narrator.device: "I didn't say that, my Amiga did!"