2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: Read a big endian word (16bit) from a streamhook
13 /******************************************************************************
16 #include <aros/bigendianio.h>
17 #include <proto/alib.h>
27 Reads one big endian 16bit value from a streamhook.
31 dataptr - Put the data here
32 stream - Read from this stream
35 The function returns TRUE on success. On success, the value
36 read is written into dataptr. On failure, FALSE is returned and the
37 contents of dataptr are not changed.
40 This function reads big endian values from a streamhook even on
41 little endian machines.
48 ReadByte(), ReadWord(), ReadLong(), ReadFloat(), ReadDouble(),
49 ReadString(), ReadStruct(), WriteByte(), WriteWord(), WriteLong(),
50 WriteFloat(), WriteDouble(), WriteString(), WriteStruct()
54 ******************************************************************************/
58 struct BEIOM_Read rd
= {BEIO_READ
};
65 c
= CallHookA (hook
, stream
, &rd
);
71 value
= CallHookA (hook
, stream
, &rd
);
76 *dataptr
= (c
<< 8) + value
;