🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Is there a routine to generate full-path names?

#2887
From: Chuck McManis
Date: Mon, 22 Jan 1990 18:55
31 lines
1641 bytes
In article <6522@ucdavis.ucdavis.edu> (Brewski Rogers) writes:
>I had the same problem a couple of weeks ago. Here's the source.
>and it does return the volume name, not the device name.
>enjoy - Bruce

Bruce, you should get a copy of the program ShowLocks, you would notice
that after running your code that there were a bunch of filelocks 
hanging around. The reason is that you don't ever "UnLock" anything
that you "Lock". So in your code ...

>    lock=ParentDir(lock);
>    if (lock!=NULL) SeekRoot(lock);

This has to be changed to something like :
	newlock = ParentDir(oldlock);
	UnLock(oldlock);
	oldlock = newlock;
	if (newlock != NULL) ...


And somewhere near the end of this routine you should have a statement :
>    lock=Lock(dirName,ACCESS_READ);
	...
	UnLock(lock);

Otherwise you will be losing little chunks of memory right and left.

--Chuck McManis
uucp: {anywhere}!sun!cmcmanis   BIX: cmcmanis  ARPAnet: cmcmanis@Eng.Sun.COM
These opinions are my own and no one elses, but you knew that didn't you.
"If it didn't have bones in it, it wouldn't be crunchy now would it?!"
Technical Details
Message-ID: <130545@sun.Eng.Sun.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!usc!apple!sun-barr!newstop!sun!stpeter!cmcmanis
References: <1271.AA1271@noel> <6522@ucdavis.ucdavis.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!usc!apple!sun-barr!newstop!sun!stpeter!cmcmanis
From: cmcmanis@stpeter.Sun.COM (Chuck McManis)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Is there a routine to generate full-path names?
Message-ID: <130545@sun.Eng.Sun.COM>
Date: 22 Jan 90 18:55:25 GMT
References: <1271.AA1271@noel> <6522@ucdavis.ucdavis.edu>
Sender: news@sun.Eng.Sun.COM
Reply-To: cmcmanis@sun.UUCP (Chuck McManis)
Organization: Sun Microsystems, Mountain View
Lines: 31