Quote:
Originally Posted by kamelito
Why not using conditional compilation using the C preprocessor and defining the missing types instead of replacing them? Kamelito
|
You are right, instead of replacing in the sources the OS4 lines by OS3 equivalents IMHO creating an "os4support.h" file and add there many defines is a better solution in the long term, otherwise it will be a lot of work maintaining it.
e.g.:
//OS4support file:
#ifndef OS4SUPPORT_H
#define OS4SUPPORT_H 1
//insert here the OS4 equivalents
//types
#define int32 LONG
#define int16 WORD
#define uint16 WORD
#define int8 BYTE
#define uint8 UBYTE
//here rawkey codes
#define RAWKEY_79 0x79
//functions
#define IDoMethod DoMethod
#endif