2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: Read a big endian floating point (32bit) from a streamhook
11 /******************************************************************************
15 #include <aros/bigendianio.h>
16 #include <proto/alib.h>
26 Reads one big endian 32bit floating point value from a streamhook.
30 dataptr - Put the data here
31 stream - Read from this stream
34 The function returns TRUE on success. On success, the value
35 read is written into dataptr. On failure, FALSE is returned and the
36 contents of dataptr are not changed.
39 This function reads big endian values from a streamhook even on
40 little endian machines.
47 ReadByte(), ReadWord(), ReadLong(), ReadFloat(), ReadDouble(),
48 ReadString(), ReadStruct(), WriteByte(), WriteWord(), WriteLong(),
49 WriteFloat(), WriteDouble(), WriteString(), WriteStruct()
54 ******************************************************************************/
64 struct BEIOM_Read rd
= {BEIO_READ
};
67 ptr
= (UBYTE
*)&value
;
70 ptr
= ((UBYTE
*)&value
) + 3;
74 #define READ_ONE_BYTE \
75 if ((c = CallHookA (hook, stream, &rd)) == EOF) \
85 *dataptr
= value
.float_val
;