[Lazarus] Mac OS X : Reading/Writing files under both Intel and PowerPC

dominique at savagesoftware.com.au dominique at savagesoftware.com.au
Thu Sep 25 21:55:24 CEST 2008


Hey that's great, I think this is exactly the sort of thing I'm looking
for.

Only thing is that in my case since all the existing game files are little
endian, so it looks like I'll need to reverse the code.

Thanks again,

Dominique.

On Thu, 25 Sep 2008 19:39:23 +0100, "Inoussa OUEDRAOGO"
<inoussa12 at gmail.com> wrote:
> Hi
> 
> The unit below, part of WST, implements a reader and a writer that
> always store and read their content in a big endian fashion. It mostly
> has no dependency and can be used alone.
> 
>
https://lazarus-ccr.svn.sourceforge.net/svnroot/lazarus-ccr/wst/trunk/binary_streamer.pas
> 
> Best regards.
> --
> Inoussa O.
> 
> 2008/9/25, dominique at savagesoftware.com.au
> <dominique at savagesoftware.com.au>:
>> Hi all,
>>   I need to be able to handle both reading and writing files under i386
> and
>> PowerPC via my Mac OS X application.
>> I can create a Universal Binary, but none of my code is cross CPU ready
>> yet.
>>
>> 1. What should I be aware of?
>>
>> 2. Should I use IFDEF ENDIAN to separate the i386 and PowerPC file
> system
>> calls for reading and writing?
>>
>> 3. Is there an easy way to detect in my code, if the compiler is
> compiling
>> for i386 of PowerPC?
>>
>> Thanks,
>>
>>
>> Dominique.
>>
>> _______________________________________________
>> Lazarus mailing list
>> Lazarus at lazarus.freepascal.org
>> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
>>
> 
> 
> --
> Inoussa O.
> _______________________________________________
> Lazarus mailing list
> Lazarus at lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus




More information about the Lazarus mailing list