Am 06.02.2013 11:01, schrieb Juha Manninen:
On Wed, Feb 6, 2013 at 10:40 AM, Jeppe Græsdal Johansen
<jjoha...@student.aau.dk> wrote:
function TPNGProcessor.SwapLong( const aValue: Cardinal ): Cardinal;
begin
result := BeToN(aValue);
end;
Thanks, it works!
There are so many functions in FPC libraries which I don't know
anything about. This was one of them.
It could be that BeToN is the wrong function (it depends on how the
method is used). What it does is the following: if the target cpu is big
endian (m68k, powerpc) then just return the value, otherwise (i386) swap
the endianess.
So you should check what SwapLong is really used for.
There are three possible functions:
BeToN (as mentioned above)
LeToN (leave as is if little endian, convert otherwise)
SwapEndian (change always)
Regards,
Sven
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal