diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 545ebf2731..7189623248 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,32 @@ 2002-12-01 13:30 UTC+0100 Foo Bar */ * harbour/makefile.vc +2006-03-13 23:15 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/source/rtl/hbgtcore.c + * respect pure REQUEST HB_GT_NUL as user GT choice if only GTNUL + is linked + + * harbour/source/rtl/errorint.c + ! fixed GPF when no lang module is register - I'll wait a while for + other people opinion and if no one will give good reason against + then I'll make EN language definition default part of langapi.c + what will resolve the problem of valid error description when no + language module is linked. + +2006-03-13 19:20 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/ChangeLog + * fixed description in last commit. Should be HB_GTSYS() not GTSYS() + + * harbour/include/hbapi.h + * fixed hb_retl() macro by adding missing parenthesis + + * harbour/source/compiler/harbour.c + * removed unnecessary initialization to avoid BCC warning + + * harbour/source/rtl/console.c + * harbour/source/rtl/hbgtcore.c + * do not call hb_gtOutStd()/hb_gtOutErr() when given string + has 0 length - it may cause unpredictable results in low level hb_fsWrite() when trunc operation will be activated for non real file handles in some systems @@ -22,7 +48,6 @@ 2006-03-13 11:40 UTC+0100 Ryszard Glab * source/compiler/cmdcheck.c - * source/pp/pragma.c * fixed to force max recurse preprocessor passed bigger then 0 @@ -101,7 +126,7 @@ programs. + harbour/source/rtl/gtwvt/Makefile - proc GTSYS() + + harbour/source/rtl/gtwvt/gtwvt.c + harbour/source/rtl/gtwvt/gtwvt.h + added new GT driver GTWVT - the core of this driver it's Peter Ress work in xHarbour. In Harbour GTWVT contains only pure GT code without @@ -112,8 +137,8 @@ Please update non GNU make files and test this GT in Windows. The programs which want to use GTWVT should be compiled as standard Windows GUI programs. GTWVT replaces window console code. - hb* scripts does not have to use GTSYS() in source code but can simply - use -gt switch in hblnk and hbmk. + if you add to your code: + proc HB_GTSYS() request HB_GT_WIN request HB_GT_WVT return diff --git a/harbour/include/hbapi.h b/harbour/include/hbapi.h index b185a46d49..1b671aed89 100644 --- a/harbour/include/hbapi.h +++ b/harbour/include/hbapi.h @@ -340,7 +340,7 @@ extern HB_EXPORT LONGLONG hb_parnll( int iParam, ... ); /* retrieve a numeric #define hb_retds( szDate ) hb_itemPutDS( hb_stackReturnItem(), szDate ) #define hb_retd( iYear, iMonth, iDay ) hb_itemPutD( hb_stackReturnItem(), iYear, iMonth, iDay ) #define hb_retdl( lJulian ) hb_itemPutDL( hb_stackReturnItem(), lJulian ) -#define hb_retl( iLogical ) hb_itemPutL( hb_stackReturnItem(), iLogical ? TRUE : FALSE ) +#define hb_retl( iLogical ) hb_itemPutL( hb_stackReturnItem(), (iLogical) ? TRUE : FALSE ) #define hb_retnd( dNumber ) hb_itemPutND( hb_stackReturnItem(), dNumber ) #define hb_retni( iNumber ) hb_itemPutNI( hb_stackReturnItem(), iNumber ) #define hb_retnl( lNumber ) hb_itemPutNL( hb_stackReturnItem(), lNumber ) diff --git a/harbour/source/compiler/harbour.c b/harbour/source/compiler/harbour.c index bf4d83f226..ae1815f1ba 100644 --- a/harbour/source/compiler/harbour.c +++ b/harbour/source/compiler/harbour.c @@ -501,7 +501,7 @@ void * hb_xrealloc( void * pMem, ULONG ulSize ) /* reallocates memory */ #ifdef HB_FM_STATISTICS PHB_MEMINFO pMemBlock; ULONG ulMemSize; - void * pResult = NULL; + void * pResult; if( ulSize == 0 ) { diff --git a/harbour/source/rtl/console.c b/harbour/source/rtl/console.c index 0c6276db84..babafc1bd5 100644 --- a/harbour/source/rtl/console.c +++ b/harbour/source/rtl/console.c @@ -207,7 +207,8 @@ void hb_conOutStd( const char * pStr, ULONG ulLen ) if( ulLen == 0 ) ulLen = strlen( pStr ); - hb_gtOutStd( ( BYTE * ) pStr, ulLen ); + if( ulLen > 0 ) + hb_gtOutStd( ( BYTE * ) pStr, ulLen ); } /* Output an item to STDERR */ @@ -218,7 +219,8 @@ void hb_conOutErr( const char * pStr, ULONG ulLen ) if( ulLen == 0 ) ulLen = strlen( pStr ); - hb_gtOutErr( ( BYTE * ) pStr, ulLen ); + if( ulLen > 0 ) + hb_gtOutErr( ( BYTE * ) pStr, ulLen ); } /* Output an item to the screen and/or printer and/or alternate */ diff --git a/harbour/source/rtl/errorint.c b/harbour/source/rtl/errorint.c index 71f21a1964..c8d0cf2e68 100644 --- a/harbour/source/rtl/errorint.c +++ b/harbour/source/rtl/errorint.c @@ -60,7 +60,7 @@ void hb_errInternal( ULONG ulIntCode, const char * szText, const char * szPar1, const char * szPar2 ) { - char buffer[ 128 ]; + char buffer[ 1024 ]; HB_TRACE(HB_TR_DEBUG, ("hb_errInternal(%lu, %s, %s, %s)", ulIntCode, szText, szPar1, szPar2)); diff --git a/harbour/source/rtl/gtcrs/gtcrs.c b/harbour/source/rtl/gtcrs/gtcrs.c index 128efc6d83..86f1d55569 100644 --- a/harbour/source/rtl/gtcrs/gtcrs.c +++ b/harbour/source/rtl/gtcrs/gtcrs.c @@ -1195,7 +1195,7 @@ static void disp_mousecursor( InOutBase * ioBase ) gpm_consolefd ); } #else - HB_SYMBOL_UNUSED( ioBase ); + HB_SYMBOL_UNUSED( ioBase ); #endif } diff --git a/harbour/source/rtl/hbgtcore.c b/harbour/source/rtl/hbgtcore.c index 7c44f01e5b..4125ef52a0 100644 --- a/harbour/source/rtl/hbgtcore.c +++ b/harbour/source/rtl/hbgtcore.c @@ -685,28 +685,34 @@ static BOOL hb_gt_def_Resume() static void hb_gt_def_OutStd( BYTE * pbyStr, ULONG ulLen ) { - USHORT uiErrorOld; + if( ulLen ) + { + USHORT uiErrorOld; - if( s_curGT ) - hb_gt_PreExt(); - uiErrorOld = hb_fsError(); - hb_fsWriteLarge( s_hStdOut, ( BYTE * ) pbyStr, ulLen ); - hb_fsSetError( uiErrorOld ); - if( s_curGT ) - hb_gt_PostExt(); + if( s_curGT ) + hb_gt_PreExt(); + uiErrorOld = hb_fsError(); + hb_fsWriteLarge( s_hStdOut, ( BYTE * ) pbyStr, ulLen ); + hb_fsSetError( uiErrorOld ); + if( s_curGT ) + hb_gt_PostExt(); + } } static void hb_gt_def_OutErr( BYTE * pbyStr, ULONG ulLen ) { - USHORT uiErrorOld; + if( ulLen ) + { + USHORT uiErrorOld; - if( s_curGT ) - hb_gt_PreExt(); - uiErrorOld = hb_fsError(); - hb_fsWriteLarge( s_hStdErr, ( BYTE * ) pbyStr, ulLen ); - hb_fsSetError( uiErrorOld ); - if( s_curGT ) - hb_gt_PostExt(); + if( s_curGT ) + hb_gt_PreExt(); + uiErrorOld = hb_fsError(); + hb_fsWriteLarge( s_hStdErr, ( BYTE * ) pbyStr, ulLen ); + hb_fsSetError( uiErrorOld ); + if( s_curGT ) + hb_gt_PostExt(); + } } static void hb_gt_def_Tone( double dFrequency, double dDuration ) diff --git a/harbour/source/rtl/inkey.c b/harbour/source/rtl/inkey.c index e7e990894a..6b0cf271c2 100644 --- a/harbour/source/rtl/inkey.c +++ b/harbour/source/rtl/inkey.c @@ -170,7 +170,7 @@ HB_EXPORT void hb_inkeyPut( int iKey ) if( iKey == K_MOUSEMOVE ) { /* - * Clipper dos not store in buffer repeated mouse movement + * Clipper does not store in buffer repeated mouse movement * IMHO it's good idea to reduce unnecessary inkey buffer * overloading so I also implemented it, [druzus] */