From 59604ddfbfc1119f494fa2eb4abb97919dd92896 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sun, 7 Feb 2010 20:22:34 +0000 Subject: [PATCH] 2010-02-07 21:21 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * include/clipdefs.h + Added Clipper compatible legacy types to Clipper compatibility header. They are enabled when HB_LEGACY_TYPES_OFF is set. --- harbour/ChangeLog | 5 +++++ harbour/include/clipdefs.h | 37 ++++++++++++++++++++++++++----------- 2 files changed, 31 insertions(+), 11 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index eb09548e43..8e76955b34 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,11 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-02-07 21:21 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * include/clipdefs.h + + Added Clipper compatible legacy types to Clipper compatibility + header. They are enabled when HB_LEGACY_TYPES_OFF is set. + 2010-02-07 19:02 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * src/vm/classes.c * src/rtl/gtdos/gtdos.c diff --git a/harbour/include/clipdefs.h b/harbour/include/clipdefs.h index 5131dccd84..b103586ee5 100644 --- a/harbour/include/clipdefs.h +++ b/harbour/include/clipdefs.h @@ -68,17 +68,26 @@ typedef BOOL Boolean; /* New types */ +#if defined( HB_LEGACY_TYPES_OFF ) +typedef unsigned char BYTE; +#endif typedef BYTE * BYTEP; typedef BYTEP BYTEPP; #if !( defined( HB_OS_OS2 ) && defined( HB_DONT_DEFINE_BASIC_TYPES ) ) typedef BYTEP PBYTE; #endif +#if defined( HB_LEGACY_TYPES_OFF ) +typedef short SHORT; +#endif typedef SHORT * SHORTP; #if !( defined( HB_OS_OS2 ) && defined( HB_DONT_DEFINE_BASIC_TYPES ) ) typedef SHORTP PSHORT; #endif +#if defined( HB_LEGACY_TYPES_OFF ) +typedef unsigned short USHORT; +#endif typedef USHORT * USHORTP; #if !( defined( HB_OS_OS2 ) && defined( HB_DONT_DEFINE_BASIC_TYPES ) ) typedef USHORTP PUSHORT; @@ -90,11 +99,17 @@ typedef USHORTP PUSHORT; typedef WORDP PWORD; #endif +#if defined( HB_LEGACY_TYPES_OFF ) +typedef long LONG; +#endif typedef LONG * LONGP; #if !( defined( HB_OS_OS2 ) && defined( HB_DONT_DEFINE_BASIC_TYPES ) ) typedef LONGP PLONG; #endif +#if defined( HB_LEGACY_TYPES_OFF ) +typedef unsigned long ULONG; +#endif typedef ULONG * ULONGP; #if !( defined( HB_OS_OS2 ) && defined( HB_DONT_DEFINE_BASIC_TYPES ) ) typedef ULONGP PULONG; @@ -104,6 +119,10 @@ typedef unsigned long DWORD; typedef DWORD * DWORDP; typedef DWORDP PDWORD; +#if defined( HB_LEGACY_TYPES_OFF ) +#undef BOOL +typedef USHORT BOOL; +#endif typedef BOOL * BOOLP; #if !( defined( HB_OS_OS2 ) && defined( HB_DONT_DEFINE_BASIC_TYPES ) ) typedef BOOLP PBOOL; @@ -122,20 +141,10 @@ typedef NEARP * NEARPP; typedef HB_VMHANDLE HANDLE; #endif -#ifndef HB_LEGACY_LEVEL2 +#if ! defined( HB_LEGACY_LEVEL2 ) #define ERRCODE HB_ERRCODE #endif -#ifndef HB_LEGACY_LEVEL3 - #undef BOOL - typedef int BOOL; - - #undef FALSE - #define FALSE 0 - #undef TRUE - #define TRUE 1 -#endif - typedef ERRCODE IHELP; typedef ERRCODE ICODE; @@ -146,6 +155,12 @@ typedef FUNCP * FUNCPP; #define HIDE static #define CLIPPER HARBOUR +#if defined( HB_LEGACY_TYPES_OFF ) + #undef FALSE + #define FALSE 0 + #undef TRUE + #define TRUE 1 +#endif #ifndef NIL #define NIL '\0' #endif