Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!ames!apple!oliveb!amiga!cbmvax!daveh From: daveh@cbmvax.UUCP (Dave Haynie) Newsgroups: comp.sys.amiga.tech Subject: Re: What is my name? Message-ID: <7359@cbmvax.UUCP> Date: 19 Jul 89 16:29:36 GMT References: <7374@ardent.UUCP> Organization: Commodore Technology, West Chester, PA Lines: 34 in article <7374@ardent.UUCP>, rap@peck.ardent.com (Rob Peck) says: > In article <26406@agate.BERKELEY.EDU> mwm@eris.berkeley.edu (Mike (I'll think of something yet) Meyer) writes: >> mwm@mica.berkeley.edu (Mike (I'll think of something yet) Meyer) writes: >><>Before I sit down & write it myself, does anyone have a piece of code >><>that will give me a full name for the binary it's running in? Not just >><>argv[0], but the name path & file name (not file, but c:file, or >><>sys:system/file, or whatever). > I now understand your question exactly and I agree that the current > directory path name listing is inadequate. Looks like you have some > work on your hands. AAARRRGGGHHH! > Rob Peck We had a big discussion on bix about this some time back, when I wanted to do pretty much the same kind of thing. The basis for it was this. I have a program which can get launched from Workbench or from the CLI. I have a number of parameters than can be fed to the program, and I'd like a way to set any number of these to user-defined defaults, instead of the defaults I picked when I wrote the code. Under Workbench, the ToolTypes array does this just dandy. So I think to myself, all I need to make this the standard place to put defaults is to have the program, when started under CLI, go hunt down it's icon, and we're set. But whoops; there's no easy parent lock or anything like that passed down to a CLI program. This is actually a case in which Workbench does a better job than CLI. The only obvious fix to this I could think of would require the shell a CLI program is launched from to pass down a lock to that image's parent as well as the name as it currently does. This is obviously known at the time the image is launched. In any case, sure would be nice to have this stuff more consistent. Maybe in 1.4? -- Dave Haynie Commodore-Amiga (Systems Engineering) "The Crew That Never Rests" {uunet|pyramid|rutgers}!cbmvax!daveh PLINK: D-DAVE H BIX: hazy Be careful what you wish for -- you just might get it