🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

CurrentDir

#2973
From: Dave Lowrey
Date: Fri, 16 Mar 1990 11:30
36 lines
1464 bytes
Reading in Rob Peck's "Programmer's Guide to the Amiga" about
the CurrentDir function, he says the proper sequence to use is:

   mylock = Lock("df0:c", ACCESS_READ);
   oldlock = CurrentDir(mylock);

Now, he also says that I shouldn't free any locks that are returned
by CurrentDir, only ones I obtained by Lock.

I understand this so far. However, is it legal to add the following
line immediately AFTER the CurrentDir call:

   Unlock(mylock);

Would this pull the rug out from under DOS, or does it get it's own
lock on the current directory?

The reason i'm asking this is that I am trying to simulate a UNIX
"chdir()" system call. I don't want to have to figure out a way to
free up all of the locks at the end of my program, if I don't have
to.

Thanks!

Dave (I need a DOS programmer's manual BAD!) Lowrey




--
----------------------------------------------------------------------------
These words be mine. The company doesn't care, because I am the company! :-)

      Dave Lowrey	 |  In Texas: {uhnix1,moray}!starsoft!david
Starbound Software Group | The World: dwl10@uts.amdahl.com (amdahl!dwl10)
      Houston, TX	 |
Technical Details
Message-ID: <00173.AA00173@starsoft.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!munnari.oz.au!uhccux!ames!apple!amdahl!starsoft!david

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!munnari.oz.au!uhccux!ames!apple!amdahl!starsoft!david
From: david@starsoft.UUCP (Dave Lowrey)
Newsgroups: comp.sys.amiga.tech
Subject: CurrentDir
Message-ID: <00173.AA00173@starsoft.UUCP>
Date: 16 Mar 90 11:30:57 GMT
Followup-To: comp.sys.amiga.tech
Lines: 36