🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: FileInfoBlock

#6514
From: aycock
Date: Sat, 10 Nov 1990 04:12
23 lines
1379 bytes
Mark Gooderum (markv@kuhub.cc.ukans.edu) writes:
| Or if you have SAS C 5.1 you can say:
| 
| 	struct FileInfoBlock _aligned fib;
| 
| and use &fib.  The _aligned is nice because it eliminates the need for
| lots of otherwise uneeded Alloc/Free code just so you can get longword
| alignment.

Or, if you don't have Lattice, or refuse to never ever ever use another of
their compilers again, you could use:

unsigned char space[sizeof(struct FileInfoBlock) + 4];
struct FileInfoBlock *fib;

fib = (struct FileInfoBlock *) (((unsigned long)space+4)&~3);

I agree, though, it's much nicer than using AllocMem() and FreeMem().
:ja
--

  //\|_||\|	John D. Aycock		aycock@cpsc.ucalgary.ca
\/ \/| || |	(403) 285-8727
Technical Details
Message-ID: <AYCOCK.90Nov9201232@rat.cpsc.ucalgary.ca>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!dali.cs.montana.edu!milton!uw-beaver!ubc-cs!alberta!cpsc.ucalgary.ca!aycock
References: <phil.656904446@adam.adelaide.edu.au> <15413@cbmvax.commodore.com> <26622.27392887@kuhub.cc.ukans.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!dali.cs.montana.edu!milton!uw-beaver!ubc-cs!alberta!cpsc.ucalgary.ca!aycock
From: aycock@cpsc.ucalgary.ca (aycock)
Newsgroups: comp.sys.amiga.tech
Subject: Re: FileInfoBlock
Message-ID: <AYCOCK.90Nov9201232@rat.cpsc.ucalgary.ca>
Date: 10 Nov 90 04:12:32 GMT
References: <phil.656904446@adam.adelaide.edu.au> <15413@cbmvax.commodore.com>
 <26622.27392887@kuhub.cc.ukans.edu>
Distribution: comp
Organization: University of Calgary
Lines: 23
In-Reply-To: markv@kuhub.cc.ukans.edu's message of 8 Nov 90 14:42:30 GMT
Nntp-Posting-Host: rat