View Single Post
Old 09 April 2013, 10:49   #17
Crumb
Registered User
 
Join Date: Dec 2009
Location: Madrid / Spain
Posts: 48
Quote:
Originally Posted by kamelito View Post
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
Crumb is offline  
 
Page generated in 0.07554 seconds with 11 queries