🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #4335

Re: Programming Question

#4335
From: Randell Jesup
Date: Thu, 12 Jul 1990 21:02
26 lines
2042 bytes
In article <dick.3311@woodwrk.UUCP> dick@woodwrk.UUCP (Richard H. Wood) writes:
>>In article <13119@cbmvax.commodore.com> jesup@cbmvax.commodore.com (Randell Jesup) writes:
>>	It's easy under 2.0:  GetProgramDir() returns a lock on the directory,
>>or references things via PROGDIR:.  Under 1.3, it's harder.  You have to try
>>to second-guess the shell (search the path, etc), and that doesn't help if
>                                                       ^^^^^^^^^^^^^^^^^^^^
>>the command-line specified a directory.
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
>Not much of a consolation, but:  Don't all C's return the entire string
>(i.e., the command part of the command-line) in arg[0]?  I haven't
>tried this with Aztec 5.0, but on VAX C it appears to (on a VMS
>machine).  If you checked this first and found a path, you wouldn't
>even have to do your second(third ?)-guess routine. ;-)

	Only if the shell lets the command see that path.  The standard
Commdore Shell (and CLI) don't, and most other shells don't (though perhaps
one or two do).  If the startup code can't see the shell command-line, it
can't use it.  I'm fairly sure this isn't tightly specified in ANSI, I suspect
it's merely listed as "command name", with no reference to paths, aliases, etc,
which are all system-dependant.

-- 
Randell Jesup, Keeper of AmigaDos, Commodore Engineering.
{uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.cbm.commodore.com  BIX: rjesup  
Common phrase heard at Amiga Devcon '89: "It's in there!"
Technical Details
Message-ID: <13181@cbmvax.commodore.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!wuarchive!psuvax1!rutgers!cbmvax!jesup
References: <8180@ur-cc.UUCP> <13119@cbmvax.commodore.com> <dick.3311@woodwrk.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!wuarchive!psuvax1!rutgers!cbmvax!jesup
From: jesup@cbmvax.commodore.com (Randell Jesup)
Newsgroups: comp.sys.amiga.tech
Subject: Re:  Programming Question
Message-ID: <13181@cbmvax.commodore.com>
Date: 12 Jul 90 21:02:09 GMT
References: <8180@ur-cc.UUCP> <13119@cbmvax.commodore.com> <dick.3311@woodwrk.UUCP>
Reply-To: jesup@cbmvax (Randell Jesup)
Organization: Commodore, West Chester, PA
Lines: 26