🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Pointer Initialization

#7690
From: Ron Tarrant
Date: Tue, 25 Dec 1990 22:05
33 lines
1418 bytes
> kzyx@vax5.cit.cornell.edu writes:
> 
> Msg-ID: <1990Dec24.152533.1770@vax5.cit.cornell.edu>
> Posted: 24 Dec 90 19:25:33 GMT
> 
> 
>        Hello there,
> 
>        What is the correct way to initialize a structure pointer to access
> the hardware under ANSI (Aztec C 5.0d)
> 
>        Edval


It's not a good idea to access the hardware directly. It means you have to
update your code every time there is system software and makes it harder (if
I'm not mistaken) to go from one Amiga model to another.

> kzyx@vax5.cit.cornell.edu writes:
> 
>                struct myblitterstruct *myblitterpointer;
> 


This initializes your structure pointer. If you already have a structure of
this type defined, that is. If you also have an actual
structure of this type declared, then make your pointer point to it like this:

        myblitterstruct = &OriginalBlitterStruct

But when you point your pointer at something in the hardware you're asking for
trouble. In fact, I'm not sure it can even be done.
-Ron
Technical Details
Message-ID: <4241@mindlink.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!van-bc!rsoft!mindlink!a976

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!van-bc!rsoft!mindlink!a976
From: a976@mindlink.UUCP (Ron Tarrant)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Pointer Initialization
Message-ID: <4241@mindlink.UUCP>
Date: 25 Dec 90 22:05:01 GMT
Organization: MIND LINK! - British Columbia, Canada
Lines: 33