Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!uwm.edu!gem.mps.ohio-state.edu!apple!oliveb!tymix!tardis!jms From: jms@tardis.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@tardis.Tymnet.COM> Date: 25 Sep 89 04:13:58 GMT References: <2045@leah.Albany.Edu> Reply-To: jms@tardis.Tymnet.COM (Joe Smith) Organization: McDonnell Douglas 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 is 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 overlays, help files, and data files. It worked correctly regardless of the user's default directory, the search path for locating executables, any ASSIGNS, or arbitrary aliases. (It was actually implemented as a security tracking feature, but that's a different story.) 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 straight from disk. I'm surprised this wasn't part of AmigaDOS 1.0. -- Joe Smith (408)922-6220 | SMTP: JMS@F74.TYMNET.COM or jms@tymix.tymnet.com McDonnell Douglas FSCO | UUCP: ...!{ames,pyramid}!oliveb!tymix!tardis!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!"