diff --git a/harbour/ChangeLog b/harbour/ChangeLog index a6777d428a..d57a38cd36 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,79 @@ +20000411-13:12 GMT+1 Victor Szakats + + * include/hbextern.ch + * source/vm/memvclip.c + * source/vm/proc.c + * source/vm/pvalue.c + * source/vm/dynsym.c + * source/rtl/dummy.prg + * source/rtl/fssize.c + * source/rtl/fstemp.c + * source/rtl/setposbs.c + * source/rtl/shadow.c + * source/rtl/accept.c + * source/rtl/oldbox.c + * source/rtl/oldclear.c + * source/rtl/alert.prg + * source/rtl/setta.prg + * source/rtl/console.c + * source/rtl/setkey.prg + * source/rtl/oemansi.c + * source/rtl/inkey.c + * source/rtl/valtostr.c + * source/rtl/trace.c + * source/rdd/dbnubs.c + * source/rdd/dbstrux.prg + * source/pp/pplib.c + + Updated/extended the guards for the UNDOC features and some extensions. + It's now possible to turn UNDOC or EXTENSIONS off. + ! __ACCEPT made multithread safe, at least for the documented part. + + * source/rtl/dbstrux.prg + ! Fixed for disabled HB_COMPAT_XPP mode. + + * source/rtl/alert.prg + * utils/hbdoc/hbdoc.prg + ! Fixed for disabled HB_COMPAT_C53 mode. + + * source/rtl/getsys.prg + * utils/hbtest/rt_stra.prg + ! Fixed for disabled HB_EXTENSION + + ; Note that HBDOC will still need HB_COMPAT_C53 to link (for MAKEDIR()). + + * include/hbexprb.c + * include/hbexprc.c + * include/hbextern.ch + * include/hbsetup.h + * compiler/harbour.c + * compiler/hbfunchk.c + * rdd/dbstrux.prg + * rtl/alert.prg + * rtl/dircmd.prg + * rtl/strzero.c + * vm/arrayshb.c + * vm/hvm.c + * vm/memvars.c + * utils/hbtest/rt_array.prg + * utils/hbtest/rt_main.ch + * utils/hbtest/rt_stra.prg + * include/hbsetup.ch + * source/vm/cmdarg.c + + Added HB_EXTENSION macro to guard Harbour extensions. + + Added HB_C52_UNDOC macro to guard undocumented interfaces of + CA-Cl*pper 5.2e + * HARBOUR_STRICT_CLIPPER_COMPATIBILITY renamed to HB_STRICT_C52 + + * source/rtl/is.c + * source/rtl/at.c + * source/rtl/replic.c + * source/rtl/space.c + * source/rtl/trim.c + - Some tests embedded to the source removed. + + * utils/hbtest/Makefile + - PP removed. + 20000411-03:04 GMT+1 Victor Szakats * utils/hbtest/* @@ -6,6 +82,7 @@ * include/hbsetup.ch * source/vm/cmdarg.c + Added defines for Flagship/FoxPro/dBase extensions. + - Disabled HB_COMPAT_VO by default. 20000411-02:32 GMT+1 Victor Szakats diff --git a/harbour/include/hbexprb.c b/harbour/include/hbexprb.c index f77d4257c9..1021c33250 100644 --- a/harbour/include/hbexprb.c +++ b/harbour/include/hbexprb.c @@ -2011,7 +2011,7 @@ static HB_EXPR_FUNC( hb_compExprUseOr ) break; case HB_EA_PUSH_POP: -#ifdef HARBOUR_STRICT_CLIPPER_COMPATIBILITY +#ifdef HB_C52_STRICT HB_EXPR_USE( pSelf, HB_EA_PUSH_PCODE ); HB_EXPR_PCODE1( hb_compGenPCode1, HB_P_POP ); #else @@ -2080,7 +2080,7 @@ static HB_EXPR_FUNC( hb_compExprUseAnd ) break; case HB_EA_PUSH_POP: -#ifdef HARBOUR_STRICT_CLIPPER_COMPATIBILITY +#ifdef HB_C52_STRICT HB_EXPR_USE( pSelf, HB_EA_PUSH_PCODE ); HB_EXPR_PCODE1( hb_compGenPCode1, HB_P_POP ); #else @@ -2145,7 +2145,7 @@ static HB_EXPR_FUNC( hb_compExprUseNot ) break; case HB_EA_PUSH_POP: -#ifdef HARBOUR_STRICT_CLIPPER_COMPATIBILITY +#ifdef HB_C52_STRICT HB_EXPR_USE( pSelf, HB_EA_PUSH_PCODE ); HB_EXPR_PCODE1( hb_compGenPCode1, HB_P_POP ); #else @@ -2267,7 +2267,7 @@ static HB_EXPR_FUNC( hb_compExprUseEqual ) break; case HB_EA_PUSH_POP: -#ifdef HARBOUR_STRICT_CLIPPER_COMPATIBILITY +#ifdef HB_C52_STRICT HB_EXPR_USE( pSelf, HB_EA_PUSH_PCODE ); HB_EXPR_PCODE1( hb_compGenPCode1, HB_P_POP ); #else @@ -2344,7 +2344,7 @@ static HB_EXPR_FUNC( hb_compExprUseEQ ) break; case HB_EA_PUSH_POP: -#ifdef HARBOUR_STRICT_CLIPPER_COMPATIBILITY +#ifdef HB_C52_STRICT HB_EXPR_USE( pSelf, HB_EA_PUSH_PCODE ); HB_EXPR_PCODE1( hb_compGenPCode1, HB_P_POP ); #else @@ -2399,7 +2399,7 @@ static HB_EXPR_FUNC( hb_compExprUseLT ) break; case HB_EA_PUSH_POP: -#ifdef HARBOUR_STRICT_CLIPPER_COMPATIBILITY +#ifdef HB_C52_STRICT HB_EXPR_USE( pSelf, HB_EA_PUSH_PCODE ); HB_EXPR_PCODE1( hb_compGenPCode1, HB_P_POP ); #else @@ -2454,7 +2454,7 @@ static HB_EXPR_FUNC( hb_compExprUseGT ) break; case HB_EA_PUSH_POP: -#ifdef HARBOUR_STRICT_CLIPPER_COMPATIBILITY +#ifdef HB_C52_STRICT HB_EXPR_USE( pSelf, HB_EA_PUSH_PCODE ); HB_EXPR_PCODE1( hb_compGenPCode1, HB_P_POP ); #else @@ -2510,7 +2510,7 @@ static HB_EXPR_FUNC( hb_compExprUseLE ) break; case HB_EA_PUSH_POP: -#ifdef HARBOUR_STRICT_CLIPPER_COMPATIBILITY +#ifdef HB_C52_STRICT HB_EXPR_USE( pSelf, HB_EA_PUSH_PCODE ); HB_EXPR_PCODE1( hb_compGenPCode1, HB_P_POP ); #else @@ -2566,7 +2566,7 @@ static HB_EXPR_FUNC( hb_compExprUseGE ) break; case HB_EA_PUSH_POP: -#ifdef HARBOUR_STRICT_CLIPPER_COMPATIBILITY +#ifdef HB_C52_STRICT HB_EXPR_USE( pSelf, HB_EA_PUSH_PCODE ); HB_EXPR_PCODE1( hb_compGenPCode1, HB_P_POP ); #else @@ -2622,7 +2622,7 @@ static HB_EXPR_FUNC( hb_compExprUseNE ) break; case HB_EA_PUSH_POP: -#ifdef HARBOUR_STRICT_CLIPPER_COMPATIBILITY +#ifdef HB_C52_STRICT HB_EXPR_USE( pSelf, HB_EA_PUSH_PCODE ); HB_EXPR_PCODE1( hb_compGenPCode1, HB_P_POP ); #else @@ -2679,7 +2679,7 @@ static HB_EXPR_FUNC( hb_compExprUseIN ) break; case HB_EA_PUSH_POP: -#ifdef HARBOUR_STRICT_CLIPPER_COMPATIBILITY +#ifdef HB_C52_STRICT HB_EXPR_USE( pSelf, HB_EA_PUSH_PCODE ); HB_EXPR_PCODE1( hb_compGenPCode1, HB_P_POP ); #else @@ -2734,7 +2734,7 @@ static HB_EXPR_FUNC( hb_compExprUsePlus ) break; case HB_EA_PUSH_POP: -#ifdef HARBOUR_STRICT_CLIPPER_COMPATIBILITY +#ifdef HB_C52_STRICT HB_EXPR_USE( pSelf, HB_EA_PUSH_PCODE ); HB_EXPR_PCODE1( hb_compGenPCode1, HB_P_POP ); #else @@ -2789,7 +2789,7 @@ static HB_EXPR_FUNC( hb_compExprUseMinus ) break; case HB_EA_PUSH_POP: -#ifdef HARBOUR_STRICT_CLIPPER_COMPATIBILITY +#ifdef HB_C52_STRICT HB_EXPR_USE( pSelf, HB_EA_PUSH_PCODE ); HB_EXPR_PCODE1( hb_compGenPCode1, HB_P_POP ); #else @@ -2844,7 +2844,7 @@ static HB_EXPR_FUNC( hb_compExprUseMult ) break; case HB_EA_PUSH_POP: -#ifdef HARBOUR_STRICT_CLIPPER_COMPATIBILITY +#ifdef HB_C52_STRICT HB_EXPR_USE( pSelf, HB_EA_PUSH_PCODE ); HB_EXPR_PCODE1( hb_compGenPCode1, HB_P_POP ); #else @@ -2899,7 +2899,7 @@ static HB_EXPR_FUNC( hb_compExprUseDiv ) break; case HB_EA_PUSH_POP: -#ifdef HARBOUR_STRICT_CLIPPER_COMPATIBILITY +#ifdef HB_C52_STRICT HB_EXPR_USE( pSelf, HB_EA_PUSH_PCODE ); HB_EXPR_PCODE1( hb_compGenPCode1, HB_P_POP ); #else @@ -2954,7 +2954,7 @@ static HB_EXPR_FUNC( hb_compExprUseMod ) break; case HB_EA_PUSH_POP: -#ifdef HARBOUR_STRICT_CLIPPER_COMPATIBILITY +#ifdef HB_C52_STRICT HB_EXPR_USE( pSelf, HB_EA_PUSH_PCODE ); HB_EXPR_PCODE1( hb_compGenPCode1, HB_P_POP ); #else @@ -3006,7 +3006,7 @@ static HB_EXPR_FUNC( hb_compExprUsePower ) break; case HB_EA_PUSH_POP: -#ifdef HARBOUR_STRICT_CLIPPER_COMPATIBILITY +#ifdef HB_C52_STRICT HB_EXPR_USE( pSelf, HB_EA_PUSH_PCODE ); HB_EXPR_PCODE1( hb_compGenPCode1, HB_P_POP ); #else @@ -3073,7 +3073,7 @@ static HB_EXPR_FUNC( hb_compExprUseNegate ) break; case HB_EA_PUSH_POP: -#ifdef HARBOUR_STRICT_CLIPPER_COMPATIBILITY +#ifdef HB_C52_STRICT HB_EXPR_USE( pSelf, HB_EA_PUSH_PCODE ); HB_EXPR_PCODE1( hb_compGenPCode1, HB_P_POP ); #else diff --git a/harbour/include/hbexprc.c b/harbour/include/hbexprc.c index df57c4ea7d..7075364720 100644 --- a/harbour/include/hbexprc.c +++ b/harbour/include/hbexprc.c @@ -83,7 +83,7 @@ void hb_compExprPushOperEq( HB_EXPR_PTR pSelf, BYTE bOpEq ) HB_EXPR_PCODE1( hb_compGenMessageData, pObj->value.asMessage.szMessage ); /* Now push current value of variable */ -#ifdef HARBOUR_STRICT_CLIPPER_COMPATIBILITY +#ifdef HB_C52_STRICT /* push object */ HB_EXPR_USE( pObj->value.asMessage.pObject, HB_EA_PUSH_PCODE ); #else @@ -98,7 +98,7 @@ void hb_compExprPushOperEq( HB_EXPR_PTR pSelf, BYTE bOpEq ) HB_EXPR_PCODE3( hb_compGenPCode3, HB_P_FUNCTION, 0, 0 ); /* NOTE: COMPATIBILITY ISSUE: - * The above HARBOUR_STRICT_CLIPPER_COMPATIBILITY setting determines + * The above HB_C52_STRICT setting determines * the way the chained send messages are handled. * For example, the following code: * @@ -167,7 +167,7 @@ void hb_compExprUseOperEq( HB_EXPR_PTR pSelf, BYTE bOpEq ) HB_EXPR_PCODE1( hb_compGenMessageData, pObj->value.asMessage.szMessage ); /* Now push current value of variable */ -#ifdef HARBOUR_STRICT_CLIPPER_COMPATIBILITY +#ifdef HB_C52_STRICT /* push object */ HB_EXPR_USE( pObj->value.asMessage.pObject, HB_EA_PUSH_PCODE ); #else @@ -221,7 +221,7 @@ void hb_compExprPushPreOp( HB_EXPR_PTR pSelf, BYTE bOper ) HB_EXPR_PCODE1( hb_compGenMessageData, pObj->value.asMessage.szMessage ); /* Now push current value of variable */ -#ifdef HARBOUR_STRICT_CLIPPER_COMPATIBILITY +#ifdef HB_C52_STRICT /* push object */ HB_EXPR_USE( pObj->value.asMessage.pObject, HB_EA_PUSH_PCODE ); #else diff --git a/harbour/include/hbextern.ch b/harbour/include/hbextern.ch index ab738bf6a7..821701f102 100644 --- a/harbour/include/hbextern.ch +++ b/harbour/include/hbextern.ch @@ -100,9 +100,11 @@ EXTERNAL __VMVARLGET // //symbols from file: vm\dynsym.c // +#ifdef HB_EXTENSION EXTERNAL __DYNSCOUNT EXTERNAL __DYNSGETNAME EXTERNAL __DYNSGETINDEX +#endif // //symbols from file: vm\fm.c // @@ -121,7 +123,6 @@ EXTERNAL __QUIT //symbols from file: vm\memvars.c // EXTERNAL __MVPUBLIC -EXTERNAL __QQPUB EXTERNAL __MVPRIVATE EXTERNAL __MVXRELEASE EXTERNAL __MVRELEASE @@ -132,6 +133,9 @@ EXTERNAL __MVGET EXTERNAL __MVPUT EXTERNAL __MVSAVE EXTERNAL __MVRESTORE +#ifdef HB_C52_UNDOC +EXTERNAL __QQPUB +#endif EXTERNAL __MCLEAR EXTERNAL __MRELEASE EXTERNAL __MXRELEASE @@ -146,11 +150,15 @@ EXTERNAL PCOUNT // EXTERNAL PROCNAME EXTERNAL PROCLINE +#ifdef HB_C52_UNDOC EXTERNAL PROCFILE +#endif // //symbols from file: vm\pvalue.c // +#ifdef HB_EXTENSION EXTERNAL HB_PVALUE +#endif // //symbols from file: vm\harbinit.prg // @@ -205,14 +213,18 @@ EXTERNAL DISPCOUNT EXTERNAL ISCOLOR EXTERNAL NOSNOW EXTERNAL HB_SHADOW +#ifdef HB_C52_UNDOC EXTERNAL DBGSHADOW +#endif EXTERNAL SAVESCREEN EXTERNAL RESTSCREEN EXTERNAL SETCURSOR EXTERNAL SETBLINK EXTERNAL SETMODE EXTERNAL __ACCEPT +#ifdef HB_C52_UNDOC EXTERNAL __ACCEPTSTR +#endif EXTERNAL HB_COLORINDEX // //symbols from file: rtl\copyfile.c @@ -310,7 +322,9 @@ EXTERNAL HARDCR // EXTERNAL INKEY EXTERNAL __KEYBOARD +#ifdef HB_EXTENSION EXTERNAL HB_KEYPUT +#endif EXTERNAL NEXTKEY EXTERNAL LASTKEY EXTERNAL FKLABEL @@ -402,14 +416,18 @@ EXTERNAL CONVTOANSICP // //symbols from file: rtl\oldbox.c // +#ifdef HB_C52_UNDOC EXTERNAL __BOX EXTERNAL __BOXD EXTERNAL __BOXS +#endif // //symbols from file: rtl\oldclear.c // +#ifdef HB_C52_UNDOC EXTERNAL __ATCLEAR EXTERNAL __CLEAR +#endif // //symbols from file: rtl\samples.c // @@ -467,7 +485,9 @@ EXTERNAL STRTRAN EXTERNAL VAL EXTERNAL STR EXTERNAL STRZERO +#ifdef HB_EXTENSION EXTERNAL HB_VALTOSTR +#endif // //symbols from file: rtl\tone.c // @@ -475,8 +495,10 @@ EXTERNAL TONE // //symbols from file: rtl\trace.c // +#ifdef HB_EXTENSION EXTERNAL HB_TRACESTATE EXTERNAL HB_TRACELEVEL +#endif // //symbols from file: rtl\transfrm.c // @@ -509,7 +531,9 @@ EXTERNAL ADIR //symbols from file: rtl\alert.prg // EXTERNAL ALERT +#ifdef HB_C52_UNDOC EXTERNAL __NONOALERT +#endif // //symbols from file: rtl\asort.prg // @@ -540,6 +564,8 @@ EXTERNAL __DIR // //symbols from file: rtl\dummy.prg // +EXTERNAL ORDSCOPE +#ifdef HB_COMPAT_C53 EXTERNAL ORDCOND EXTERNAL ORDDESCEND EXTERNAL ORDISUNIQUE @@ -549,15 +575,17 @@ EXTERNAL ORDKEYDEL EXTERNAL ORDKEYGOTO EXTERNAL ORDKEYNO EXTERNAL ORDKEYVAL -EXTERNAL ORDSCOPE EXTERNAL ORDSETRELATION EXTERNAL ORDSKIPUNIQUE +#endif +#ifdef HB_COMPAT_C53 EXTERNAL DBFILEGET EXTERNAL DBFILEPUT EXTERNAL DBINFO EXTERNAL DBORDERINFO EXTERNAL DBRECORDINFO EXTERNAL DBFIELDINFO +#endif EXTERNAL DBSETRELATION EXTERNAL DBCLEARRELATION EXTERNAL MEMOEDIT @@ -585,7 +613,9 @@ EXTERNAL FIELDWBLOCK // //symbols from file: rtl\input.prg // +#ifdef HB_C52_UNDOC EXTERNAL __INPUT +#endif // //symbols from file: rtl\memvarbl.prg // @@ -620,13 +650,17 @@ EXTERNAL READKEY //symbols from file: rtl\setkey.prg // EXTERNAL SETKEY +#ifdef HB_EXTENSION EXTERNAL HB_SETKEYGET EXTERNAL HB_SETKEYSAVE EXTERNAL HB_SETKEYCHECK +#endif // //symbols from file: rtl\setta.prg // +#ifdef HB_C52_UNDOC EXTERNAL SETTYPEAHEAD +#endif // //symbols from file: rtl\tbcolumn.prg // @@ -789,6 +823,7 @@ EXTERNAL DBCREATEINDEX EXTERNAL DBCLEARINDEX EXTERNAL DBSETINDEX EXTERNAL DBSETORDER +#ifdef HB_C52_UNDOC EXTERNAL __DBSEEK EXTERNAL __DBSKIP EXTERNAL __DBGOTOP @@ -813,6 +848,7 @@ EXTERNAL __DBCLOSEAREA EXTERNAL __DBCLOSE EXTERNAL __DBUSE EXTERNAL __DBSELECT +#endif // //symbols from file: rdd\delim1.c // @@ -829,7 +865,7 @@ EXTERNAL SDF_GETFUNCTABLE EXTERNAL __DBCOPYSTRUCT EXTERNAL __DBCOPYXSTRUCT EXTERNAL __DBCREATE -#ifdef HARBOUR_STRICT_CLIPPER_COMPATIBILITY +#ifdef HB_C52_UNDOC EXTERNAL __FLEDIT #endif EXTERNAL __DBSTRUCTFILTER @@ -844,10 +880,16 @@ EXTERNAL INDEXKEY // //symbols from file: pp\hbpplib.c // +#ifdef HB_EXTENSION EXTERNAL __PREPROCESS +#endif +#ifdef HB_EXTENSION EXTERNAL HB_FSIZE EXTERNAL HB_FTEMPNAME EXTERNAL HB_FTEMPCREATE +#endif + +EXTERNAL __HRBRUN #endif /* HB_EXTERN_CH_ */ diff --git a/harbour/include/hbsetup.ch b/harbour/include/hbsetup.ch index 401dd30bd0..ecb75e0f15 100644 --- a/harbour/include/hbsetup.ch +++ b/harbour/include/hbsetup.ch @@ -38,31 +38,20 @@ #ifndef HB_SETUP_CH_ #define HB_SETUP_CH_ -/* *********************************************************************** - * This symbol defines if we want to use strict Clipper compatibility - * - * By default it is disabled (symbol is not defined) -*/ -/*#define HARBOUR_STRICT_CLIPPER_COMPATIBILITY*/ +/* NOTE: You can select here, which features you to include of the different + Clipper implementations. */ -/* *********************************************************************** - * You can select here, whether you want to include feature introduced in - * Clipper implementations other than Cl*pper 5.2e. - * - * By default 5.3x and Xbase++ are turned on -*/ +#define HB_EXTENSION /* Enable Harbour extensions */ -/* Include CA-Cl*pper 5.3[a,b] extensions */ -#define HB_COMPAT_C53 -/* Include Alaska Xbase++ extensions */ -#define HB_COMPAT_XPP -/* Include CA-VO extensions */ -/* #define HB_COMPAT_VO */ -/* Include Flagship extensions */ -/* #define HB_COMPAT_FLAGSHIP */ -/* Include FoxPro extensions */ -/* #define HB_COMPAT_FOXPRO */ -/* Include dBase extensions */ -/* #define HB_COMPAT_DBASE */ +#define HB_C52_UNDOC /* Enable CA-Cl*pper 5.2e undocumented features */ +/* #define HB_C52_STRICT */ /* Enable CA-Cl*pper 5.2e strict compatibility */ + +#define HB_COMPAT_C53 /* Enable CA-Cl*pper 5.3x extensions */ +#define HB_COMPAT_XPP /* Enable Alaska Xbase++ extensions */ +/* #define HB_COMPAT_VO */ /* Enable CA-VO extensions */ +/* #define HB_COMPAT_FLAGSHIP */ /* Enable Flagship extensions */ +/* #define HB_COMPAT_FOXPRO */ /* Enable FoxPro extensions */ +/* #define HB_COMPAT_DBASE */ /* Enable dBase extensions */ #endif /* HB_SETUP_CH_ */ + diff --git a/harbour/include/hbsetup.h b/harbour/include/hbsetup.h index 8ad72ef34c..4a9f7498b8 100644 --- a/harbour/include/hbsetup.h +++ b/harbour/include/hbsetup.h @@ -146,7 +146,7 @@ symbol name to 10. Sometimes this can be useful for compiling legacy code. [vszakats] */ /* - #ifdef HARBOUR_STRICT_CLIPPER_COMPATIBILITY + #ifdef HB_C52_STRICT #define HB_SYMBOL_NAME_LEN 10 #else */ diff --git a/harbour/source/compiler/harbour.c b/harbour/source/compiler/harbour.c index 51060c9abb..65ebb0d5a0 100644 --- a/harbour/source/compiler/harbour.c +++ b/harbour/source/compiler/harbour.c @@ -1369,7 +1369,7 @@ static void hb_compGenVariablePCode( BYTE bPCode, char * szVarName ) * Clipper always assumes a memvar variable if undeclared variable * is popped (a value is asssigned to a variable). */ -#if defined( HARBOUR_STRICT_CLIPPER_COMPATIBILITY ) +#if defined( HB_C52_STRICT ) if( hb_comp_bForceMemvars || bPCode == HB_P_POPVARIABLE ) #else if( hb_comp_bForceMemvars ) diff --git a/harbour/source/compiler/hbfunchk.c b/harbour/source/compiler/hbfunchk.c index 0b03179361..0263f6b274 100644 --- a/harbour/source/compiler/hbfunchk.c +++ b/harbour/source/compiler/hbfunchk.c @@ -142,7 +142,7 @@ void hb_compFunCallCheck( char * szFuncCall, int iArgs ) { if( iArgs < f[ iPos ].iMinParam || ( f[ iPos ].iMaxParam != -1 && iArgs > f[ iPos ].iMaxParam ) ) { -#if defined( HARBOUR_STRICT_CLIPPER_COMPATIBILITY ) +#if defined( HB_C52_STRICT ) /* Clipper way */ hb_compGenError( hb_comp_szErrors, 'E', HB_COMP_ERR_CHECKING_ARGS, szFuncCall, NULL ); #else diff --git a/harbour/source/pp/pplib.c b/harbour/source/pp/pplib.c index fad6dcc26e..79854702ee 100644 --- a/harbour/source/pp/pplib.c +++ b/harbour/source/pp/pplib.c @@ -50,6 +50,8 @@ #include "hbapi.h" #include "hbapierr.h" +#ifdef HB_EXTENSION + PATHNAMES * hb_comp_pIncludePath = NULL; PHB_FNAME hb_comp_pFileName = NULL; FILES hb_comp_files; @@ -156,3 +158,6 @@ void hb_compGenWarning( char * szWarnings[], char cPrefix, int iWarning, char * HB_SYMBOL_UNUSED( szWarning1 ); HB_SYMBOL_UNUSED( szWarning2 ); } + +#endif + diff --git a/harbour/source/rdd/dbnubs.c b/harbour/source/rdd/dbnubs.c index f229fc49b9..bf45dbff47 100644 --- a/harbour/source/rdd/dbnubs.c +++ b/harbour/source/rdd/dbnubs.c @@ -35,6 +35,8 @@ #include "hbdefs.h" +#ifdef HB_C52_UNDOC + extern HB_FUNC( DBSEEK ); extern HB_FUNC( DBSKIP ); extern HB_FUNC( DBGOTOP ); @@ -182,3 +184,5 @@ HB_FUNC( __DBSELECT ) HB_FUNCNAME( DBSELECTAREA )(); } +#endif + diff --git a/harbour/source/rdd/dbstrux.prg b/harbour/source/rdd/dbstrux.prg index ee9894de36..fbd46911ab 100644 --- a/harbour/source/rdd/dbstrux.prg +++ b/harbour/source/rdd/dbstrux.prg @@ -34,6 +34,7 @@ */ #include "hbsetup.ch" + #include "common.ch" #include "dbstruct.ch" @@ -133,10 +134,10 @@ FUNCTION __dbCreate( cFileName, cFileFrom, cRDDName, lNew, cAlias ) RETURN Used() -#ifdef HARBOUR_STRICT_CLIPPER_COMPATIBILITY - /* NOTE: Undocumented, internal Clipper function */ +#ifdef HB_C52_UNDOC + FUNCTION __FLEDIT( aStruct, aFieldList ) RETURN __dbStructFilter( aStruct, aFieldList ) diff --git a/harbour/source/rtl/accept.c b/harbour/source/rtl/accept.c index 04e430127d..456f51474c 100644 --- a/harbour/source/rtl/accept.c +++ b/harbour/source/rtl/accept.c @@ -52,10 +52,21 @@ extern HB_FUNC( QOUT ); #define ACCEPT_BUFFER_LEN 256 /* length of input buffer for ACCEPT command */ +#ifdef HB_C52_UNDOC + static char s_szAcceptResult[ ACCEPT_BUFFER_LEN ] = { '\0' }; +HB_FUNC( __ACCEPTSTR ) +{ + hb_retc( s_szAcceptResult ); +} + +#endif + HB_FUNC( __ACCEPT ) { + char szAcceptResult[ ACCEPT_BUFFER_LEN ]; + int input; ULONG ulLen; @@ -66,6 +77,8 @@ HB_FUNC( __ACCEPT ) ulLen = 0; input = 0; + szAcceptResult[ 0 ] = '\0'; + while( input != K_ENTER ) { /* Wait forever, for keyboard events only */ @@ -84,20 +97,19 @@ HB_FUNC( __ACCEPT ) default: if( ulLen < ( ACCEPT_BUFFER_LEN - 1 ) && input >= 32 ) { - s_szAcceptResult[ ulLen ] = input; /* Accept the input */ - hb_gtWriteCon( ( BYTE * ) &s_szAcceptResult[ ulLen ], sizeof( char ) ); /* Then display it */ + szAcceptResult[ ulLen ] = input; /* Accept the input */ + hb_gtWriteCon( ( BYTE * ) &szAcceptResult[ ulLen ], sizeof( char ) ); /* Then display it */ ulLen++; /* Then adjust the input count */ } } } - s_szAcceptResult[ ulLen ] = '\0'; + szAcceptResult[ ulLen ] = '\0'; - hb_retc( s_szAcceptResult ); -} - -HB_FUNC( __ACCEPTSTR ) -{ - hb_retc( s_szAcceptResult ); +#ifdef HB_C52_UNDOC + strcpy( s_szAcceptResult, szAcceptResult ); +#endif + + hb_retc( szAcceptResult ); } diff --git a/harbour/source/rtl/alert.prg b/harbour/source/rtl/alert.prg index 48507da299..0c11b12f28 100644 --- a/harbour/source/rtl/alert.prg +++ b/harbour/source/rtl/alert.prg @@ -36,14 +36,16 @@ this is not documented. This implementation converts the first parameter to a string if another type was passed. You can switch back to Clipper compatible mode by defining constant - HARBOUR_STRICT_CLIPPER_COMPATIBILITY. [vszakats] */ + HB_C52_STRICT. [vszakats] */ /* NOTE: Clipper handles these buttons { "Ok", "", "Cancel" } in a buggy way. This is fixed. [vszakats] */ /* NOTE: nDelay parameter is a Harbour extension. */ +#ifdef HB_C52_UNDOC STATIC s_lNoAlert := NIL +#endif FUNCTION Alert( xMessage, aOptions, cColorNorm, nDelay ) LOCAL nChoice @@ -59,21 +61,27 @@ FUNCTION Alert( xMessage, aOptions, cColorNorm, nDelay ) LOCAL nOldDispCount LOCAL nCount +#ifdef HB_COMPAT_C53 LOCAL nMRow, nMCol +#endif /* TOFIX: Clipper decides at runtime, whether the GT is linked in, if it is not, the console mode is choosen here. [vszakats] */ LOCAL lConsole := .F. +#ifdef HB_C52_UNDOC + DEFAULT s_lNoAlert TO hb_argCheck( "NOALERT" ) IF s_lNoAlert RETURN NIL ENDIF +#endif + aSay := {} -#ifdef HARBOUR_STRICT_CLIPPER_COMPATIBILITY +#ifdef HB_C52_STRICT IF !ISCHARACTER( xMessage ) RETURN NIL @@ -151,7 +159,7 @@ FUNCTION Alert( xMessage, aOptions, cColorNorm, nDelay ) IF Len( aOptionsOK ) == 0 aOptionsOK := { 'Ok' } -#ifdef HARBOUR_STRICT_CLIPPER_COMPATIBILITY +#ifdef HB_C52_STRICT /* NOTE: Clipper allows only four options [vszakats] */ ELSEIF Len( aOptionsOK ) > 4 aSize( aOptionsOK, 4 ) @@ -266,6 +274,8 @@ FUNCTION Alert( xMessage, aOptions, cColorNorm, nDelay ) nChoice := 0 EXIT +#ifdef HB_COMPAT_C53 + CASE nKey == K_LBUTTONDOWN nMRow := MRow() @@ -285,6 +295,8 @@ FUNCTION Alert( xMessage, aOptions, cColorNorm, nDelay ) EXIT ENDIF +#endif + CASE ( nKey == K_LEFT .OR. nKey == K_SH_TAB ) .AND. Len( aOptionsOK ) > 1 nChoice-- @@ -326,8 +338,13 @@ FUNCTION Alert( xMessage, aOptions, cColorNorm, nDelay ) RETURN nChoice +#ifdef HB_C52_UNDOC + PROCEDURE __NONOALERT() s_lNoAlert := .F. RETURN + +#endif + diff --git a/harbour/source/rtl/at.c b/harbour/source/rtl/at.c index c1ada5437d..c9be9646d5 100644 --- a/harbour/source/rtl/at.c +++ b/harbour/source/rtl/at.c @@ -38,7 +38,6 @@ #include "hbapierr.h" /* locates a substring in a string */ -/* TEST: QOUT( "at( 'cde', 'abcdefgfedcba' ) = '" + at( 'cde', 'abcsefgfedcba' ) + "'" ) */ HB_FUNC( AT ) { diff --git a/harbour/source/rtl/browdbx.prg b/harbour/source/rtl/browdbx.prg index ce1d384762..2602d4aa24 100644 --- a/harbour/source/rtl/browdbx.prg +++ b/harbour/source/rtl/browdbx.prg @@ -71,4 +71,11 @@ FUNCTION dbSkipper( nRecs ) RETURN nSkipped +#else + +/* NOTE: To make it compile */ + +STATIC PROCEDURE Dummy() + RETURN + #endif diff --git a/harbour/source/rtl/console.c b/harbour/source/rtl/console.c index 4826434b95..4a067431be 100644 --- a/harbour/source/rtl/console.c +++ b/harbour/source/rtl/console.c @@ -98,6 +98,7 @@ void hb_conInit( void ) s_iFilenoStdin = fileno( stdin ); s_iFilenoStdout = fileno( stdout ); +#ifdef HB_C52_UNDOC { int iStderr = hb_cmdargNum( "STDERR" ); /* Undocumented CA-Clipper switch //STDERR:x */ @@ -108,6 +109,9 @@ void hb_conInit( void ) else /* //STDERR:x */ s_iFilenoStderr = iStderr; } +#else + s_iFilenoStderr = fileno( stderr ); +#endif /* Some compilers open stdout and stderr in text mode, but Harbour needs them to be open in binary mode. */ diff --git a/harbour/source/rtl/dircmd.prg b/harbour/source/rtl/dircmd.prg index 482ce03e0b..bde27b7d18 100644 --- a/harbour/source/rtl/dircmd.prg +++ b/harbour/source/rtl/dircmd.prg @@ -52,7 +52,7 @@ PROCEDURE __Dir( cFileMask ) This is hard wired to English. So this is a small incompatibility */ -#ifdef HARBOUR_STRICT_CLIPPER_COMPATIBILITY +#ifdef HB_C52_STRICT QOut( "Database Files # Records Last Update Size" ) #else QOut( NationMsg( _DIR_HEADER ) ) diff --git a/harbour/source/rtl/dummy.prg b/harbour/source/rtl/dummy.prg index 2870aab63e..c5de8e732d 100644 --- a/harbour/source/rtl/dummy.prg +++ b/harbour/source/rtl/dummy.prg @@ -33,26 +33,32 @@ * */ +#include "hbsetup.ch" + /* TODO: Dummy functions, should be removed when implemented. */ -FUNCTION ordCond() ; RETURN NIL /* 5.3 */ -FUNCTION ordDescend() ; RETURN .F. /* 5.3 */ -FUNCTION ordIsUnique() ; RETURN .F. /* 5.3 */ -FUNCTION ordKeyAdd() ; RETURN .F. /* 5.3 */ -FUNCTION ordKeyCount() ; RETURN 0 /* 5.3 */ -FUNCTION ordKeyDel() ; RETURN .F. /* 5.3 */ -FUNCTION ordKeyGoto() ; RETURN .F. /* 5.3 */ -FUNCTION ordKeyNo() ; RETURN 0 /* 5.3 */ -FUNCTION ordKeyVal() ; RETURN NIL /* 5.3 */ -FUNCTION ordSetRelation() ; RETURN NIL /* 5.3 */ -FUNCTION ordSkipUnique() ; RETURN .F. /* 5.3 */ +#ifdef HB_COMPAT_C53 +FUNCTION ordCond() ; RETURN NIL +FUNCTION ordDescend() ; RETURN .F. +FUNCTION ordIsUnique() ; RETURN .F. +FUNCTION ordKeyAdd() ; RETURN .F. +FUNCTION ordKeyCount() ; RETURN 0 +FUNCTION ordKeyDel() ; RETURN .F. +FUNCTION ordKeyGoto() ; RETURN .F. +FUNCTION ordKeyNo() ; RETURN 0 +FUNCTION ordKeyVal() ; RETURN NIL +FUNCTION ordSetRelation() ; RETURN NIL +FUNCTION ordSkipUnique() ; RETURN .F. +#endif -FUNCTION dbFileGet() ; RETURN .F. /* 5.3 */ -FUNCTION dbFilePut() ; RETURN .F. /* 5.3 */ -FUNCTION dbInfo() ; RETURN NIL /* 5.3 */ -FUNCTION dbOrderInfo() ; RETURN NIL /* 5.3 */ -FUNCTION dbRecordInfo() ; RETURN NIL /* 5.3 */ -FUNCTION dbFieldInfo() ; RETURN NIL /* 5.3 */ +#ifdef HB_COMPAT_C53 +FUNCTION dbFileGet() ; RETURN .F. +FUNCTION dbFilePut() ; RETURN .F. +FUNCTION dbInfo() ; RETURN NIL +FUNCTION dbOrderInfo() ; RETURN NIL +FUNCTION dbRecordInfo() ; RETURN NIL +FUNCTION dbFieldInfo() ; RETURN NIL +#endif FUNCTION dbSetRelation() ; RETURN NIL FUNCTION dbClearRelation() ; RETURN NIL diff --git a/harbour/source/rtl/fssize.c b/harbour/source/rtl/fssize.c index 472d7df89f..c3c926a750 100644 --- a/harbour/source/rtl/fssize.c +++ b/harbour/source/rtl/fssize.c @@ -82,9 +82,12 @@ ULONG hb_fsFSize( BYTE * pszFileName, BOOL bUseDirEntry ) return 0; } +#ifdef HB_EXTENSION + HB_FUNC( HB_FSIZE ) { hb_retnl( ISCHAR( 1 ) ? hb_fsFSize( ( BYTE * ) hb_parc( 1 ), ISLOG( 2 ) ? hb_parl( 2 ) : TRUE ) : 0 ); } +#endif diff --git a/harbour/source/rtl/fstemp.c b/harbour/source/rtl/fstemp.c index 1f99acf7ef..d35090df44 100644 --- a/harbour/source/rtl/fstemp.c +++ b/harbour/source/rtl/fstemp.c @@ -70,6 +70,8 @@ FHANDLE hb_fsCreateTemp( const BYTE * pszDir, const BYTE * pszPrefix, USHORT uiA return FS_ERROR; } +#ifdef HB_EXTENSION + HB_FUNC( HB_FTEMPNAME ) { BYTE szName[ _POSIX_PATH_MAX + 1 ]; @@ -86,3 +88,4 @@ HB_FUNC( HB_FTEMPCREATE ) ISNUM( 2 ) ? hb_parni( 2 ) : FC_NORMAL ) ); } +#endif diff --git a/harbour/source/rtl/getsys.prg b/harbour/source/rtl/getsys.prg index dcc43fe28f..0d14e82068 100644 --- a/harbour/source/rtl/getsys.prg +++ b/harbour/source/rtl/getsys.prg @@ -238,8 +238,8 @@ FUNCTION RangeCheck( oGet, xDummy, xLow, xHigh ) IF Set( _SET_SCOREBOARD ) - cMessage := Left( NationMsg( _GET_RANGE_FROM ) + LTrim( hb_ValToStr( xLow ) ) + ; - NationMsg( _GET_RANGE_TO ) + LTrim( hb_ValToStr( xHigh ) ), MaxCol() ) + cMessage := Left( NationMsg( _GET_RANGE_FROM ) + LTrim( Transform( xLow, "" ) ) + ; + NationMsg( _GET_RANGE_TO ) + LTrim( Transform( xHigh, "" ) ), MaxCol() ) nOldRow := Row() nOldCol := Col() diff --git a/harbour/source/rtl/inkey.c b/harbour/source/rtl/inkey.c index f51c7a2de1..142826bc83 100644 --- a/harbour/source/rtl/inkey.c +++ b/harbour/source/rtl/inkey.c @@ -327,12 +327,16 @@ void hb_inkeyPut( int ch ) } } +#ifdef HB_EXTENSION + HB_FUNC( HB_KEYPUT ) { if( ISNUM( 1 ) ) hb_inkeyPut( hb_parni( 1 ) ); } +#endif + HB_FUNC( NEXTKEY ) { hb_retni( hb_inkeyNext() ); diff --git a/harbour/source/rtl/input.prg b/harbour/source/rtl/input.prg index 511749e69b..2b4e47a898 100644 --- a/harbour/source/rtl/input.prg +++ b/harbour/source/rtl/input.prg @@ -33,8 +33,21 @@ * */ +#include "hbsetup.ch" + +#ifdef HB_C52_UNDOC + FUNCTION __Input( xPrompt ) LOCAL cString := __Accept( xPrompt ) RETURN iif( Empty( cString ), NIL, &cString ) +#else + +/* NOTE: To make it compile */ + +STATIC PROCEDURE Dummy() + RETURN + +#endif + diff --git a/harbour/source/rtl/is.c b/harbour/source/rtl/is.c index 54c4a5e041..ad8b6f6a25 100644 --- a/harbour/source/rtl/is.c +++ b/harbour/source/rtl/is.c @@ -38,8 +38,6 @@ #include "hbapi.h" /* determines if first char of string is letter */ -/* TEST: QOUT( "isalpha( 'hello' ) = ", isalpha( 'hello' ) ) */ -/* TEST: QOUT( "isalpha( '12345' ) = ", isalpha( '12345' ) ) */ HB_FUNC( ISALPHA ) { @@ -47,8 +45,6 @@ HB_FUNC( ISALPHA ) } /* determines if first char of string is digit */ -/* TEST: QOUT( "isdigit( '12345' ) = ", isdigit( '12345' ) ) */ -/* TEST: QOUT( "isdigit( 'abcde' ) = ", isdigit( 'abcde' ) ) */ HB_FUNC( ISDIGIT ) { @@ -56,8 +52,6 @@ HB_FUNC( ISDIGIT ) } /* determines if first char of string is upper-case */ -/* TEST: QOUT( "isupper( 'Abcde' ) = ", isupper( 'Abcde' ) ) */ -/* TEST: QOUT( "isupper( 'abcde' ) = ", isupper( 'abcde' ) ) */ HB_FUNC( ISUPPER ) { @@ -65,8 +59,6 @@ HB_FUNC( ISUPPER ) } /* determines if first char of string is lower-case */ -/* TEST: QOUT( "islower( 'abcde' ) = ", islower( 'abcde' ) ) */ -/* TEST: QOUT( "islower( 'Abcde' ) = ", islower( 'Abcde' ) ) */ HB_FUNC( ISLOWER ) { diff --git a/harbour/source/rtl/oldbox.c b/harbour/source/rtl/oldbox.c index b0e3b0bdef..f0593f2138 100644 --- a/harbour/source/rtl/oldbox.c +++ b/harbour/source/rtl/oldbox.c @@ -35,6 +35,8 @@ #include "hbapigt.h" +#ifdef HB_C52_UNDOC + HB_FUNC( __BOX ) { if( ISNUM( 1 ) && ISNUM( 2 ) && ISNUM( 3 ) && ISNUM( 4 ) ) @@ -53,3 +55,6 @@ HB_FUNC( __BOXS ) if( ISNUM( 1 ) && ISNUM( 2 ) && ISNUM( 3 ) && ISNUM( 4 ) ) hb_gtBoxS( hb_parni( 1 ), hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ) ); } + +#endif + diff --git a/harbour/source/rtl/oldclear.c b/harbour/source/rtl/oldclear.c index c5c0eecc32..f926c2ee30 100644 --- a/harbour/source/rtl/oldclear.c +++ b/harbour/source/rtl/oldclear.c @@ -35,6 +35,8 @@ #include "hbapigt.h" +#ifdef HB_C52_UNDOC + HB_FUNC( __ATCLEAR ) { if( hb_pcount() == 4 ) @@ -50,3 +52,5 @@ HB_FUNC( __CLEAR ) hb_gtSetPos( 0, 0 ); } +#endif + diff --git a/harbour/source/rtl/replic.c b/harbour/source/rtl/replic.c index 4cb2549bcb..5a801544a6 100644 --- a/harbour/source/rtl/replic.c +++ b/harbour/source/rtl/replic.c @@ -38,7 +38,7 @@ #include "hbapierr.h" /* returns n copies of given string */ -/* TEST: QOUT( "replicate( 'abc', 5 ) = " + replicate( 'abc', 5 ) ) */ + HB_FUNC( REPLICATE ) { if( ISCHAR( 1 ) && ISNUM( 2 ) ) diff --git a/harbour/source/rtl/setkey.prg b/harbour/source/rtl/setkey.prg index b5195e2b4c..82b9895714 100644 --- a/harbour/source/rtl/setkey.prg +++ b/harbour/source/rtl/setkey.prg @@ -33,6 +33,8 @@ * */ +#include "hbsetup.ch" + #include "common.ch" // macro substitutions to access sub-array elements of aSetKeys[] @@ -81,6 +83,8 @@ Function SetKey( anKey, bBlock, bCondition ) return bReturn +#ifdef HB_EXTENSION + Function HB_SetKeyGet( nKey, bCondition ) local nFound @@ -143,3 +147,5 @@ Function HB_SetKeyCheck( nKey, p1, p2, p3 ) return .f. +#endif + diff --git a/harbour/source/rtl/setta.prg b/harbour/source/rtl/setta.prg index 1de253d3af..aa0f3c399b 100644 --- a/harbour/source/rtl/setta.prg +++ b/harbour/source/rtl/setta.prg @@ -33,5 +33,19 @@ * */ +#include "hbsetup.ch" + +#ifdef HB_C52_UNDOC + FUNCTION SetTypeahead( nSize ) RETURN Set( _SET_TYPEAHEAD, nSize ) + +#else + +/* NOTE: To make it compile */ + +STATIC PROCEDURE Dummy() + RETURN + +#endif + diff --git a/harbour/source/rtl/shadow.c b/harbour/source/rtl/shadow.c index c40ca6e04b..877e62e619 100644 --- a/harbour/source/rtl/shadow.c +++ b/harbour/source/rtl/shadow.c @@ -46,8 +46,12 @@ HB_FUNC( HB_SHADOW ) ISNUM( 5 ) ? hb_parni( 5 ) : 7 ); } +#ifdef HB_C52_UNDOC + HB_FUNC( DBGSHADOW ) { HB_FUNCNAME( HB_SHADOW )(); } +#endif + diff --git a/harbour/source/rtl/space.c b/harbour/source/rtl/space.c index 0b6d6306b4..2186da7889 100644 --- a/harbour/source/rtl/space.c +++ b/harbour/source/rtl/space.c @@ -38,7 +38,7 @@ #include "hbapierr.h" /* returns n copies of a single space */ -/* TEST: QOUT( "space( 5 ) = '" + space( 5 ) + "'" ) */ + HB_FUNC( SPACE ) { if( ISNUM( 1 ) ) diff --git a/harbour/source/rtl/strzero.c b/harbour/source/rtl/strzero.c index 65a06bdbee..3d361e3088 100644 --- a/harbour/source/rtl/strzero.c +++ b/harbour/source/rtl/strzero.c @@ -107,7 +107,7 @@ HB_FUNC( STRZERO ) } else { -#ifdef HARBOUR_STRICT_CLIPPER_COMPATIBILITY +#ifdef HB_C52_STRICT /* NOTE: In CA-Cl*pper STRZERO() is written in Clipper, and will call STR() to do the job, the error (if any) will also be thrown by STR(). [vszakats] */ diff --git a/harbour/source/rtl/trace.c b/harbour/source/rtl/trace.c index 7b79ed1907..39ee94b1d9 100644 --- a/harbour/source/rtl/trace.c +++ b/harbour/source/rtl/trace.c @@ -35,6 +35,8 @@ #include "hbapi.h" +#ifdef HB_EXTENSION + HB_FUNC( HB_TRACESTATE ) { hb_retni( hb_tracestate( ISNUM( 1 ) ? hb_parni( 1 ) : -1 ) ); @@ -44,3 +46,6 @@ HB_FUNC( HB_TRACELEVEL ) { hb_retni( hb_tracelevel( ISNUM( 1 ) ? hb_parni( 1 ) : -1 ) ); } + +#endif + diff --git a/harbour/source/rtl/trim.c b/harbour/source/rtl/trim.c index 2378933680..cea9bc8e2a 100644 --- a/harbour/source/rtl/trim.c +++ b/harbour/source/rtl/trim.c @@ -72,7 +72,6 @@ ULONG hb_strRTrimLen( const char * szText, ULONG ulLen, BOOL bAnySpace ) } /* trims leading spaces from a string */ -/* TEST: QOUT( "ltrim( ' hello world ' ) = '" + ltrim( ' hello world ' ) + "'" ) */ HB_FUNC( LTRIM ) { @@ -100,7 +99,7 @@ HB_FUNC( LTRIM ) /* NOTE: The second parameter is a Harbour extension [vszakats] */ /* trims trailing spaces from a string */ -/* TEST: QOUT( "rtrim( ' hello world ' ) = '" + rtrim( ' hello world ' ) + "'" ) */ + HB_FUNC( RTRIM ) { PHB_ITEM pText = hb_param( 1, HB_IT_STRING ); @@ -136,7 +135,7 @@ HB_FUNC( TRIM ) /* NOTE: The second parameter is a Harbour extension [vszakats] */ /* trims leading and trailing spaces from a string */ -/* TEST: QOUT( "alltrim( ' hello world ' ) = '" + alltrim( ' hello world ' ) + "'" ) */ + HB_FUNC( ALLTRIM ) { if( ISCHAR( 1 ) ) diff --git a/harbour/source/rtl/valtostr.c b/harbour/source/rtl/valtostr.c index 08d9c11f27..10e5f326f6 100644 --- a/harbour/source/rtl/valtostr.c +++ b/harbour/source/rtl/valtostr.c @@ -36,6 +36,8 @@ #include "hbapi.h" #include "hbapiitm.h" +#ifdef HB_EXTENSION + HB_FUNC( HB_VALTOSTR ) { ULONG ulLen; @@ -48,3 +50,5 @@ HB_FUNC( HB_VALTOSTR ) hb_xfree( buffer ); } +#endif + diff --git a/harbour/source/vm/arrayshb.c b/harbour/source/vm/arrayshb.c index 3534ce25b6..e900c6ad3d 100644 --- a/harbour/source/vm/arrayshb.c +++ b/harbour/source/vm/arrayshb.c @@ -193,7 +193,7 @@ HB_FUNC( AFILL ) hb_itemReturn( pArray ); /* AFill() returns the array itself */ } else -#ifdef HARBOUR_STRICT_CLIPPER_COMPATIBILITY +#ifdef HB_C52_STRICT /* NOTE: In CA-Cl*pper AFILL() is written in a manner that it will call AEVAL() to do the job, so the error (if any) will also be thrown by AEVAL(). [vszakats] */ diff --git a/harbour/source/vm/cmdarg.c b/harbour/source/vm/cmdarg.c index 934b7bbfbe..c7666286cf 100644 --- a/harbour/source/vm/cmdarg.c +++ b/harbour/source/vm/cmdarg.c @@ -315,8 +315,24 @@ void hb_cmdargProcessVM( void ) hb_xfree( pszVersion ); } - hb_conOutErr( "Strict CA-Clipper compatibility: ", 0 ); -#if defined( HARBOUR_STRICT_CLIPPER_COMPATIBILITY ) + hb_conOutErr( "Harbour extensions: ", 0 ); +#if defined( HB_EXTENSION ) + hb_conOutErr( "Yes", 0 ); +#else + hb_conOutErr( "No", 0 ); +#endif + hb_conOutErr( hb_conNewLine(), 0 ); + + hb_conOutErr( "CA-Clipper 5.2e undocumented: ", 0 ); +#if defined( HB_C52_UNDOC ) + hb_conOutErr( "Yes", 0 ); +#else + hb_conOutErr( "No", 0 ); +#endif + hb_conOutErr( hb_conNewLine(), 0 ); + + hb_conOutErr( "CA-Clipper 5.2e strict compatibility: ", 0 ); +#if defined( HB_C52_STRICT ) hb_conOutErr( "Yes", 0 ); #else hb_conOutErr( "No", 0 ); diff --git a/harbour/source/vm/dynsym.c b/harbour/source/vm/dynsym.c index f838505cbc..9c3c0b6408 100644 --- a/harbour/source/vm/dynsym.c +++ b/harbour/source/vm/dynsym.c @@ -285,6 +285,8 @@ void hb_dynsymRelease( void ) hb_xfree( s_pDynItems ); } +#ifdef HB_EXTENSION + HB_FUNC( __DYNSCOUNT ) /* How much symbols do we have: dsCount = __dynsymCount() */ { hb_retnl( ( long ) s_uiDynSymbols ); @@ -309,3 +311,6 @@ HB_FUNC( __DYNSGETINDEX ) /* Gimme index number of symbol: dsIndex = __dynsymGet else hb_retnl( 0L ); } + +#endif + diff --git a/harbour/source/vm/hvm.c b/harbour/source/vm/hvm.c index 52c8fd3cbd..7213030555 100644 --- a/harbour/source/vm/hvm.c +++ b/harbour/source/vm/hvm.c @@ -288,7 +288,7 @@ void hb_vmInit( BOOL bStartMainProc ) hb_errInternal( 9999, "Can\'t locate the starting procedure: \'%s\'", HARBOUR_START_PROCEDURE, NULL ); } #else -#ifndef HARBOUR_STRICT_CLIPPER_COMPATIBILITY +#ifndef HB_C52_STRICT else if( ! s_pSymStart ) hb_errInternal( 9999, "No starting procedure", NULL, NULL ); #endif diff --git a/harbour/source/vm/memvars.c b/harbour/source/vm/memvars.c index d1923bd5e5..71f1bfbf5f 100644 --- a/harbour/source/vm/memvars.c +++ b/harbour/source/vm/memvars.c @@ -1300,7 +1300,7 @@ HB_FUNC( __MVSAVE ) hb_itemGetNLen( pItem, &iWidth, &iDec ); buffer[ 11 ] = 'N' + 128; -#ifdef HARBOUR_STRICT_CLIPPER_COMPATIBILITY +#ifdef HB_C52_STRICT /* NOTE: This is the buggy, but fully CA-Cl*pper compatible method. [vszakats] */ buffer[ 16 ] = ( BYTE ) iWidth + ( HB_IS_DOUBLE( pItem ) ? iDec + 1 : 0 ); #else diff --git a/harbour/source/vm/memvclip.c b/harbour/source/vm/memvclip.c index f4c58cc22b..8035c2c7e8 100644 --- a/harbour/source/vm/memvclip.c +++ b/harbour/source/vm/memvclip.c @@ -45,6 +45,8 @@ extern HB_FUNC( __MVRESTORE ); /* NOTE: Undocumented Clipper internal function */ +#ifdef HB_C52_UNDOC + HB_FUNC( __QQPUB ) { PHB_ITEM pItem = hb_param( 1, HB_IT_STRING ); @@ -53,6 +55,8 @@ HB_FUNC( __QQPUB ) hb_memvarCreateFromItem( pItem, VS_PUBLIC, NULL ); } +#endif + /* CA-Clipper 5.2e compatibility functions. */ HB_FUNC( __MCLEAR ) @@ -79,4 +83,3 @@ HB_FUNC( __MRESTORE ) { HB_FUNCNAME( __MVRESTORE )(); } - diff --git a/harbour/source/vm/proc.c b/harbour/source/vm/proc.c index 2277856e9a..a556745046 100644 --- a/harbour/source/vm/proc.c +++ b/harbour/source/vm/proc.c @@ -89,6 +89,8 @@ HB_FUNC( PROCLINE ) hb_retni( 0 ); } +#ifdef HB_C52_UNDOC + /* NOTE: Clipper undocumented function, which always returns an empty string. [vszakats] */ @@ -96,3 +98,5 @@ HB_FUNC( PROCFILE ) { hb_retc( "" ); } + +#endif diff --git a/harbour/source/vm/pvalue.c b/harbour/source/vm/pvalue.c index bb29e036e1..ee9eda88e2 100644 --- a/harbour/source/vm/pvalue.c +++ b/harbour/source/vm/pvalue.c @@ -36,6 +36,8 @@ #include "hbapi.h" #include "hbapiitm.h" +#ifdef HB_EXTENSION + HB_FUNC( HB_PVALUE ) { USHORT uiParam = hb_parni( 1 ); @@ -45,3 +47,4 @@ HB_FUNC( HB_PVALUE ) hb_itemReturn( pBase + 1 + uiParam ); } +#endif diff --git a/harbour/utils/hbdoc/hbdoc.prg b/harbour/utils/hbdoc/hbdoc.prg index d4d63d0863..7bba358f3d 100644 --- a/harbour/utils/hbdoc/hbdoc.prg +++ b/harbour/utils/hbdoc/hbdoc.prg @@ -176,7 +176,6 @@ FUNCTION MAIN( cFlags, cLinkName, cAtFile ) // Entry Point // - MHIDE() // Delete log file if present IF FILE( "hbdocerr.log" ) @@ -622,7 +621,6 @@ FUNCTION MAIN( cFlags, cLinkName, cAtFile ) SET CONSOLE ON SET ALTERNATE OFF SET ALTERNATE TO - MSHOW() @ MAXROW(), 0 SAY "Execute ASSEMBL.BAT to compile and link Guides" // Return to caller diff --git a/harbour/utils/hbtest/Makefile b/harbour/utils/hbtest/Makefile index 37395b5682..49da08094a 100644 --- a/harbour/utils/hbtest/Makefile +++ b/harbour/utils/hbtest/Makefile @@ -31,7 +31,6 @@ LIBS=\ rtl \ vm \ macro \ - pp \ common \ include $(TOP)$(ROOT)config/bin.cf diff --git a/harbour/utils/hbtest/rt_array.prg b/harbour/utils/hbtest/rt_array.prg index 71c45614e3..f6a0b65f9d 100644 --- a/harbour/utils/hbtest/rt_array.prg +++ b/harbour/utils/hbtest/rt_array.prg @@ -78,7 +78,7 @@ FUNCTION Main_ARRAY() TEST_LINE( aSort(10) , NIL ) TEST_LINE( aSort({}) , "{.[0].}" ) TEST_LINE( aSort(ErrorNew()) , NIL ) -#ifdef HARBOUR_STRICT_CLIPPER_COMPATIBILITY +#ifdef HB_C52_STRICT #ifndef __XPP__ TEST_LINE( aFill() , "E BASE 2017 Argument error AEVAL " ) #endif diff --git a/harbour/utils/hbtest/rt_main.ch b/harbour/utils/hbtest/rt_main.ch index d5048adedb..54ce155999 100644 --- a/harbour/utils/hbtest/rt_main.ch +++ b/harbour/utils/hbtest/rt_main.ch @@ -54,6 +54,6 @@ #ifdef __HARBOUR__ #include "hbsetup.ch" #else - #define HARBOUR_STRICT_CLIPPER_COMPATIBILITY + #define HB_C52_STRICT #endif diff --git a/harbour/utils/hbtest/rt_stra.prg b/harbour/utils/hbtest/rt_stra.prg index caae25e275..28c9f760db 100644 --- a/harbour/utils/hbtest/rt_stra.prg +++ b/harbour/utils/hbtest/rt_stra.prg @@ -145,7 +145,7 @@ FUNCTION Main_STRA() /* STRZERO() */ -#ifdef HARBOUR_STRICT_CLIPPER_COMPATIBILITY +#ifdef HB_C52_STRICT TEST_LINE( StrZero(NIL) , "E BASE 1099 Argument error STR F:S" ) TEST_LINE( StrZero("A", 10, 2) , "E BASE 1099 Argument error STR F:S" ) TEST_LINE( StrZero(100, 10, "A") , "E BASE 1099 Argument error STR F:S" ) @@ -461,6 +461,7 @@ FUNCTION Exact_Str() FUNCTION New_STRINGS() #ifdef __HARBOUR__ +#ifdef HB_EXTENSION TEST_LINE( HB_ValToStr( 4 ) , " 4" ) TEST_LINE( HB_ValToStr( 4.0 / 2 ) , " 2.00" ) @@ -470,6 +471,7 @@ FUNCTION New_STRINGS() TEST_LINE( HB_ValToStr( .F. ) , ".F." ) TEST_LINE( HB_ValToStr( .T. ) , ".T." ) +#endif #endif RETURN NIL