diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 722f7c0d81..0c0ceaa993 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,16 @@ +20000504-09:12 GMT+1 Victor Szakats + + * contrib/hbclip/hbclip.ch + + Added strong typing compatibility translation + + * include/hbcomp.h + * include/hberrors.h + * source/compiler/harbour.c + * source/compiler/hbpcode.c + ! Some macros renamed + ! One warning fixed. + ! Minor fixes. + 20000503-21:30 GMT-8 Ron Pinkas * include/hbcomp.h diff --git a/harbour/contrib/hbclip/hbclip.ch b/harbour/contrib/hbclip/hbclip.ch index bf1d7d4650..1610dbd59f 100644 --- a/harbour/contrib/hbclip/hbclip.ch +++ b/harbour/contrib/hbclip/hbclip.ch @@ -61,6 +61,19 @@ #xtranslate HB_SETKEYSAVE( [] ) => ( {} ) #xtranslate HB_SETKEYCHECK( [, [, [, ]]] ) => ( .F. ) +#translate AS CHAR => +#translate AS CHARACTER => +#translate AS STRING => +#translate AS NUM => +#translate AS NUMERIC => +#translate AS DATE => +#translate AS ARRAY => +#translate AS BLOCK => +#translate AS OBJECT => +#translate AS LOGICAL => + +#command DECLARE FUNCTION <*x*> => + #endif /* HB_CLIP_CH_ */ #endif diff --git a/harbour/include/hbcomp.h b/harbour/include/hbcomp.h index 8b475a5468..8670e096ee 100644 --- a/harbour/include/hbcomp.h +++ b/harbour/include/hbcomp.h @@ -113,13 +113,13 @@ typedef struct __FUNC ULONG lPCodeSize; /* total memory size for pcode */ ULONG lPCodePos; /* actual pcode offset */ int iStaticsBase; /* base for this function statics */ - ULONG * pNOOPs; /* pointer to the NOOP array */ - ULONG * pJumps; /* pointer to the Jumps array */ + ULONG * pNOOPs; /* pointer to the NOOP array */ + ULONG * pJumps; /* pointer to the Jumps array */ ULONG iNOOPs; /* NOOPs Counter */ ULONG iJumps; /* Jumps Counter */ - BYTE * pStack; /* Compile Time Stack */ - USHORT iStackSize; /* Compile Time Stack Index */ - int iStackIndex; /* Compile Time Stack Index */ + BYTE * pStack; /* Compile Time Stack */ + USHORT iStackSize; /* Compile Time Stack size */ + int iStackIndex; /* Compile Time Stack index */ struct __FUNC * pOwner; /* pointer to the function/procedure that owns the codeblock */ struct __FUNC * pNext; /* pointer to the next defined function */ } _FUNC, * PFUNCTION; diff --git a/harbour/include/hberrors.h b/harbour/include/hberrors.h index 2b7db610bb..17aad799a2 100644 --- a/harbour/include/hberrors.h +++ b/harbour/include/hberrors.h @@ -104,11 +104,11 @@ extern "C" { #define HB_COMP_WARN_ASSIGN_SUSPECT 11 #define HB_COMP_WARN_OPERAND_SUSPECT 12 #define HB_COMP_WARN_NOT_ARRAY 13 -#define HB_COMP_RETURN_TYPE 14 -#define HB_COMP_PARAM_COUNT 15 -#define HB_COMP_PARAM_TYPE 16 -#define HB_COMP_DUP_DECLARATION 17 -#define HB_COMP_DECLARATION_CONFLICT 18 +#define HB_COMP_WARN_RETURN_TYPE 14 +#define HB_COMP_WARN_PARAM_COUNT 15 +#define HB_COMP_WARN_PARAM_TYPE 16 +#define HB_COMP_WARN_DUP_DECLARATION 17 +#define HB_COMP_WARN_DECLARATION_CONFLICT 18 #define HB_COMP_WARN_NOT_INITIALIZED 19 #define HB_COMP_WARN_MEANINGLESS 20 #define HB_COMP_WARN_UNREACHABLE 21 @@ -134,8 +134,8 @@ extern "C" { #define HB_PP_WARN_DEFINE_REDEF 1 -extern void hb_compGenError( char * _szErrors[], char cPrefix, int iError, char * szError1, char * szError2 ); /* generic parsing error management function */ -extern void hb_compGenWarning( char * _szWarnings[], char cPrefix, int iWarning, char * szWarning1, char * szWarning2); /* generic parsing warning management function */ +extern void hb_compGenError( char * szErrors[], char cPrefix, int iError, char * szError1, char * szError2 ); /* generic parsing error management function */ +extern void hb_compGenWarning( char * szWarnings[], char cPrefix, int iWarning, char * szWarning1, char * szWarning2); /* generic parsing warning management function */ #if defined(HB_EXTERN_C) } diff --git a/harbour/source/compiler/harbour.c b/harbour/source/compiler/harbour.c index e1bb29ce72..3bf2681f99 100644 --- a/harbour/source/compiler/harbour.c +++ b/harbour/source/compiler/harbour.c @@ -704,9 +704,9 @@ PCOMDECLARED hb_compDeclaredAdd( char * szDeclaredName ) if ( hb_comp_iWarnings < 3 ) return NULL; - if ( ( pDeclared = hb_compDeclaredFind( szDeclaredName ) ) ) + if ( ( pDeclared = hb_compDeclaredFind( szDeclaredName ) ) != NULL ) { - hb_compGenWarning( hb_comp_szWarnings, 'W', HB_COMP_DUP_DECLARATION, szDeclaredName, NULL ); + hb_compGenWarning( hb_comp_szWarnings, 'W', HB_COMP_WARN_DUP_DECLARATION, szDeclaredName, NULL ); return pDeclared; } diff --git a/harbour/source/compiler/hbpcode.c b/harbour/source/compiler/hbpcode.c index 2400740b1c..f216529716 100644 --- a/harbour/source/compiler/hbpcode.c +++ b/harbour/source/compiler/hbpcode.c @@ -252,7 +252,7 @@ void hb_compStrongType( int iSize ) sprintf( szType1, "%c", pDeclared->cType ); sprintf( szType2, "%c", pFunc->pStack[ pFunc->iStackIndex ] ); - hb_compGenWarning( hb_comp_szWarnings, 'W', HB_COMP_RETURN_TYPE, szType2, szType1 ); + hb_compGenWarning( hb_comp_szWarnings, 'W', HB_COMP_WARN_RETURN_TYPE, szType2, szType1 ); } break; @@ -273,7 +273,7 @@ void hb_compStrongType( int iSize ) { sprintf( szType1, "%i", hb_comp_iParamCount + 1 ); sprintf( szType2, "%c", hb_comp_cParamTypes[ hb_comp_iParamCount ] ); - hb_compGenWarning( hb_comp_szWarnings, 'W', HB_COMP_PARAM_TYPE, szType1, szType2 ); + hb_compGenWarning( hb_comp_szWarnings, 'W', HB_COMP_WARN_PARAM_TYPE, szType1, szType2 ); } } } @@ -281,7 +281,7 @@ void hb_compStrongType( int iSize ) { sprintf( szType1, "%i", wVar ); sprintf( szType2, "%i", hb_comp_iParamCount ); - hb_compGenWarning( hb_comp_szWarnings, 'W', HB_COMP_PARAM_COUNT, szType1, szType2 ); + hb_compGenWarning( hb_comp_szWarnings, 'W', HB_COMP_WARN_PARAM_COUNT, szType1, szType2 ); } } @@ -314,7 +314,7 @@ void hb_compStrongType( int iSize ) { sprintf( szType1, "%i", hb_comp_iParamCount + 1 ); sprintf( szType2, "%c", hb_comp_cParamTypes[ hb_comp_iParamCount ] ); - hb_compGenWarning( hb_comp_szWarnings, 'W', HB_COMP_PARAM_TYPE, szType1, szType2 ); + hb_compGenWarning( hb_comp_szWarnings, 'W', HB_COMP_WARN_PARAM_TYPE, szType1, szType2 ); } } } @@ -322,7 +322,7 @@ void hb_compStrongType( int iSize ) { sprintf( szType1, "%i", wVar ); sprintf( szType2, "%i", hb_comp_iParamCount ); - hb_compGenWarning( hb_comp_szWarnings, 'W', HB_COMP_PARAM_COUNT, szType1, szType2 ); + hb_compGenWarning( hb_comp_szWarnings, 'W', HB_COMP_WARN_PARAM_COUNT, szType1, szType2 ); } }