🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: DateStamp HELP!

#6869
From: Phil Kernick
Date: Tue, 20 Nov 1990 23:53
36 lines
1977 bytes
huver@amgraf.UUCP (Huver) writes:

>If you need to do it from inside a program, Thad Floryan just posted to
>comp.sys.amiga (as a follow-up to `compress' spawned question) an example,
>in C source, by Jeff Lydiatt.

>NOTICE, however, in Lydiatt's setDate() function he used:

>   arg[1] = (ULONG)IoErr(); /* lock on parent director set by DeviceProc() */

>which is incorrect.  ParentDir() should be used for this purpose.

I was the one who started the 'compress' discussion, and Lydiatt (and Thad)
are correct and you are wrong.

Consulting the RKM L&D and looking for DeviceProc() it says that a lock
for the parent directory is returned by IoErr() - but remember that if
you do any other dos calls inbetween, IoErr() will not return what you
think.  So the code stub has to go something like...

mesg = DeviceProc(<whatever>);

stuff the parameters into the struct StandardPacket and using IoErr() to
set arg[1], and then call PutMsg.

I suspect that you did something else inbetween the DeviceProc and the
PutMsg (like maybe a Lock) and this changed the return from IoErr and so
you though that this would not work.  It does.

Phil.

-- 
Phil Kernick                            EMail:  phil@adam.adelaide.edu.au
Departmental Engineer                   Phone:  +618 228 5914
Dept. of Psychology                     Fax:    +618 224 0464
University of Adelaide                  Mail:   GPO Box 498 Adelaide SA 5001
Technical Details
Message-ID: <phil.659145232@adam.adelaide.edu.au>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!munnari.oz.au!sirius.ucs.adelaide.edu.au!adam.adelaide.edu.au!phil
References: <1990Nov18.030410.7819@hoss.unl.edu> <364@amgraf.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!munnari.oz.au!sirius.ucs.adelaide.edu.au!adam.adelaide.edu.au!phil
From: phil@adam.adelaide.edu.au (Phil Kernick)
Newsgroups: comp.sys.amiga.tech
Subject: Re: DateStamp HELP!
Message-ID: <phil.659145232@adam.adelaide.edu.au>
Date: 20 Nov 90 23:53:52 GMT
References: <1990Nov18.030410.7819@hoss.unl.edu> <364@amgraf.UUCP>
Sender: news@ucs.adelaide.edu.au
Organization: University of Adelaide
Lines: 36
Nntp-Posting-Host: adam.adelaide.edu.au