🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.amiga.tech
2 messages
2 total messages Started by Anthon Pang Tue, 04 Dec 1990 20:43
Re: UnLocking locks returned by CurrentDir()
#7220
Author: Anthon Pang
Date: Tue, 04 Dec 1990 20:43
8 lines
759 bytes
First of all, IMO, CurrentDir takes the old lock, frees it, and gives you a new
one.  Secondly, NULL isn't a valid lock value (returned by Lock, CurrentDir,
DupLock...)...it is used as a function parameter to specify the root directory
or system volume.

--
Disclaimer: just pulled an all nighter...so all of this is just MHO and
swiss-cheese memory.
Re: UnLocking locks returned by CurrentDir()
#7269
Author: Ken Farinsky - CATS
Date: Thu, 06 Dec 1990 15:07
42 lines
1879 bytes
In article <4046@mindlink.UUCP> a665@mindlink.UUCP (Anthon Pang) writes:
>First of all, IMO, CurrentDir takes the old lock, frees it, and gives you a new
>one.  Secondly, NULL isn't a valid lock value (returned by Lock, CurrentDir,
>DupLock...)...it is used as a function parameter to specify the root directory
>or system volume.

CurrentDir does not free anything.  NULL is a valid result.
When in doubt, consult the documentation:

dos.library/CurrentDir                                   dos.library/CurrentDir

    NAME
        CurrentDir -- Make a directory associated with a lock the working directory

    SYNOPSIS
        oldLock = CurrentDir( lock )
        D0                    D1

        struct FileLock *oldlock, *lock;

    FUNCTION
        CurrentDir() causes a directory associated with a lock to be made
        the current directory.  The old current directory lock is returned.

        A value of zero is a valid result here, this 0 lock represents the
        root of fiat you booted from (which is, in effect, the
        parent of all other file system roots.)

    INPUTS
        lock - BCPL pointer to a lock

    OUTPUTS
        oldLock - BCPL pointer to a lock

    SEE ALSO
        Lock

-- 
--
Ken Farinsky - CATS - (215) 431-9421 - Commodore Business Machines
uucp: ken@cbmvax.commodore.com   or  ...{uunet,rutgers}!cbmvax!ken
bix:  kfarinsky
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads