Home |
Function RTFSetDefaultOpenFlags Function RTFSetCriticalErrorHandler Function RTFDefaultCriticalErrorHandler Macros RTF_GETx and RTF_PUTx |
Macros RTF_GETx and RTF_PUTxDepending on settings in file Rtfcfg.h, RTF_GET16, RTF_GET32, RTF_PUT16, and RTF_PUT32 expand either to macros or to function calls. They can be used to access little-endian and potentially misaligned data in FAT data structures which have type RTF_U16 or RTF_U32. typedef struct { BYTE B[2]; } RTF_U16; typedef struct { BYTE B[4]; } RTF_U32; WORD RTF_GET16(const RTF_U16 w); DWORD RTF_GET32(const RTF_U32 d); void RTF_PUT16(RTF_U16 & dest, WORD w); void RTF_PUT32(RTF_U32 & dest, DWORD d); Types RTF_U16 and RTF_U32 are not used on little-endian platforms which can access misaligned data (such as x86), so the use of these macros is not required here.
|