🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: What is my name?

#581
From: Brian J. Witt
Date: Sun, 23 Jul 1989 17:49
30 lines
2020 bytes
Yes, you might have problems when using a script, but try this out
and see how far you get.  If your program was launched under CLI or
Shell (true programs officially from CA), then:
          myproc->pr_CLI->cli_CommandName
is a BSTR to the path used to invoke your program as typed in on the
command line.  If there are now path seperators here, then the
program was in the current directory (a quick Lock() should answer
that question).  If the lock fails, then walk the path seglist in:
          myproc->pr_CLI->cli_CommandDir
attempting locks on the path directories.  You can try this right
now by running one program using an explicit path.  In another CLI
type,  status full .  Check out those paths!!!

   Danger Will Robinson!!!!!  The prophets have announced that AmigaDOS
will receive some serious changes in the next few years.  As such, the
sturctures named here may wither and die.  The best long-term solution
may be to ask for a DOS function call to return the lock.  For short
term, allow this method to work while SysBase->version < 40...  If
program private resources are ever to become reality (ala Mac), then
this function call must be available.

   Danger Will Robinson!!!!!  If you program came into being from 
some one LoadSeg()ing-CreateProc()'ing, chances are there won't be
a CLI structure.  At that point, you're just an orphan... :-(


--- When you re-zone vacate cemetry land for apartment buildings,
    do you have to notify the next of kind of those buried nearby?
--- brian witt
--- well!aleks@ucbvax.Berkeley.EDU
Technical Details
Message-ID: <12835@well.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!gatech!ncar!ames!pacbell!well!aleks
References: <26385@agate.BERKELEY.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!gatech!ncar!ames!pacbell!well!aleks
From: aleks@well.UUCP (Brian J. Witt)
Newsgroups: comp.sys.amiga.tech
Subject: Re: What is my name?
Summary: for CLI's, check the CLI structure
Message-ID: <12835@well.UUCP>
Date: 23 Jul 89 17:49:02 GMT
References: <26385@agate.BERKELEY.EDU>
Reply-To: aleks@well.UUCP (Brian Witt)
Organization: Waiting for 1.5, all C DOS
Lines: 30