Amiga-C (41/223)

From:Jack York
Date:10 Aug 2001 at 14:59:58
Subject:[amiga-c] Re: How do I copy clone

Hello Stephen

On 11-Aug-01, Stephen Illingworth wrote:
> Hello Twelvebullets

>> Heres a clone example,
>>
>> Set Source to a source file to read
>> Set Dest to a file to write to
>>
>> Copies Size (100) bytes
>> and sets date/protection
>>
>> feel free to use and abuse it
>
> Looks good :-)
>
> However, don't do this
>
> fibb = (struct FileInfoBlock*) AllocVec(sizeof (struct
> FileInfoBlock), MEMF_PUBLIC);
>
> it might work but it's wrong and will almost certainly bite you
> or somebody else on the arse sooner or later. Use
> AllocDosObject() instead. For example,

This message wasn't to me but I am curious. I am assuming you mention the
above because of memory alignment? It was mentioned before on this list
(and I am doing this from memory so who knows how accurate this is :) ) that
AllocVec and AllocPooled calls AllocMem. And memory obtained with
AllocMem is longword aligned. Is this incorrect or did I miss your point
entirely?

Jack



E-Mail: jyork@twmi.rr.com
Alt: jyork@voyager,net
Home: http://my.voyager.net/~jyork

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Small business owners...
Tell us what you think!
http://us.click.yahoo.com/vO1FAB/txzCAA/ySSFAA/dpFolB/TM
---------------------------------------------------------------------~->

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/