diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 71a3581e20..58f0463acf 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,13 +16,55 @@ The license applies to all entries newer than 2009-04-28. */ +2012-11-16 14:01 UTC+0100 Viktor Szakats (harbour syenar.net) + * src/rtl/gtwvt/gtwvt.c + * src/rtl/gtwvt/gtwvt.h + ! made gfx drawing functions work again by disabling + compositing on the first drawing call + + * contrib/hbodbc/hbodbc.hbp + + enabled automatic MM after Przemek's changes. + For me however, both odbcdemo.prg and testodbc.prg + GPFs on exit. Maybe it's related to SQLDisconnect() + calls? + + * contrib/hbodbc/odbc.c + ! SQLALLOCENV() after my prev change to use ODBC 3 APIs + to call some weird API to avoid an error. + + * contrib/hbodbc/tests/testodbc.prg + * contrib/hbodbc/todbc.prg + * disabled manual memory management hacks on + prg level + + * contrib/rddsql/hbrddsql.h + * contrib/sddfb/sddfb.c + ! uncrustified + + * doc/howtorep.txt + + added reference to commit.hb + + * contrib/gtwvg/class.prg + * contrib/gtwvg/gtwvg.hbx + * contrib/gtwvg/menubar.prg + * contrib/gtwvg/paint.prg + * contrib/gtwvg/syswnd.prg + ! fixed few casing and where it was used + + * extras/gtwvw/gtwvw.hbx + * extras/gtwvw/wvt2wvw.ch + ! fixed few casing and where it was used + + * contrib/hbgd/gd.ch + * minor + 2012-11-16 13:52 UTC+0200 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt) * harbour/contrib/rddsql/hbrddsql.h * added missing constant 2012-11-16 13:35 UTC+0200 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt) * harbour/contrib/sddfb/sddfb.c - ! added missing query execution :), multiple field type/value decoding + ! added missing query execution :), multiple field type/value decoding changes, etc. 2012-11-16 11:35 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) @@ -161,6 +203,8 @@ * README + added some legal text from old readme under docs + + added notes on configuring text editors + when used with Harbour 2012-11-15 23:08 UTC+0100 Viktor Szakats (harbour syenar.net) * doc/clipper.txt @@ -193,7 +237,7 @@ * contrib/hbct/doc/en/token1.txt * contrib/hbct/doc/en/token2.txt * contrib/hbct/doc/en/trig.txt - ! some fixes to prev. (my regex is not yet perfect) + ! some fixes to prev. (my regex is not yet perfect) (it wasn't the regex) 2012-11-15 19:10 UTC+0100 Viktor Szakats (harbour syenar.net) * contrib/hbct/doc/en/*.txt diff --git a/harbour/contrib/gtwvg/class.prg b/harbour/contrib/gtwvg/class.prg index 0a63e741f6..fa0cb6e3f9 100644 --- a/harbour/contrib/gtwvg/class.prg +++ b/harbour/contrib/gtwvg/class.prg @@ -208,7 +208,7 @@ METHOD WvtDialog:New( nRows, nCols, cTitle, cFont, nFontHeight, nFontWidth, nFon ::oldMenuBlock := SetKey( Wvt_SetMenuKeyEvent() ) ::oldTooltipWidth := Wvt_GetToolTipWidth() - ::oldTooltipBkColor := Wvt_GetToolTipBKColor() + ::oldTooltipBkColor := Wvt_GetToolTipBkColor() ::oldTooltipTextColor := Wvt_GetToolTipTextColor() ::nRows := nRows @@ -494,7 +494,6 @@ METHOD WvtDialog:Inkey() IF ::oCurObj:nType == DLG_OBJ_BROWSE SELECT( ::oCurObj:cAlias ) - ENDIF ::Eval( ::oCurObj:bOnFocus, ::oCurObj ) @@ -914,7 +913,7 @@ METHOD WvtObject:CreatePopup() LOCAL i, nID IF ! Empty( ::aPopup ) .AND. ::hPopup == nil - ::hPopup := Wvt_CreatePOPUPMenu() + ::hPopup := Wvt_CreatePopupMenu() FOR i := 1 TO Len( ::aPopup ) diff --git a/harbour/contrib/gtwvg/gtwvg.hbx b/harbour/contrib/gtwvg/gtwvg.hbx index 178a4e9602..65228ed720 100644 --- a/harbour/contrib/gtwvg/gtwvg.hbx +++ b/harbour/contrib/gtwvg/gtwvg.hbx @@ -73,13 +73,13 @@ DYNAMIC Wvg_CheckMenuItem DYNAMIC Wvg_CheckRadioButton DYNAMIC Wvg_ChooseColor DYNAMIC Wvg_ChooseFont -DYNAMIC Wvg_ChooseFont_GetLOGFont +DYNAMIC Wvg_ChooseFont_GetLogFont DYNAMIC Wvg_ClearGUIObjects DYNAMIC Wvg_ClientToScreen DYNAMIC Wvg_ColorRect DYNAMIC Wvg_CreateBrush DYNAMIC Wvg_CreateMenu -DYNAMIC Wvg_CreatePOPUPMenu +DYNAMIC Wvg_CreatePopupMenu DYNAMIC Wvg_CreateToolTipWindow DYNAMIC Wvg_CreateWindowEx DYNAMIC Wvg_DefWindowProc @@ -209,7 +209,7 @@ DYNAMIC Wvg_TreeView_SetBkColor DYNAMIC Wvg_TreeView_SetLineColor DYNAMIC Wvg_TreeView_SetTextColor DYNAMIC Wvg_TreeView_ShowExpanded -DYNAMIC Wvg_TVIS_Expanded +DYNAMIC Wvg_TVIs_Expanded DYNAMIC Wvg_UpdateWindow DYNAMIC WvtBanner DYNAMIC WvtBrowse @@ -245,7 +245,7 @@ DYNAMIC Wvt_CreateDialogDynamic DYNAMIC Wvt_CreateDialogModal DYNAMIC Wvt_CreateFont DYNAMIC Wvt_CreateMenu -DYNAMIC Wvt_CreatePOPUPMenu +DYNAMIC Wvt_CreatePopupMenu DYNAMIC Wvt_DeleteMenu DYNAMIC Wvt_DestroyMenu DYNAMIC Wvt_DialogBox @@ -289,16 +289,16 @@ DYNAMIC Wvt_GetFontHandle DYNAMIC Wvt_GetFontInfo DYNAMIC Wvt_GetLastMenuEvent DYNAMIC Wvt_GetMenu -DYNAMIC Wvt_GetOpenFilename +DYNAMIC Wvt_GetOpenFileName DYNAMIC Wvt_GetPaintRect DYNAMIC Wvt_GetPalette DYNAMIC Wvt_GetRGBColor DYNAMIC Wvt_GetRGBColorByString -DYNAMIC Wvt_GetSaveFilename +DYNAMIC Wvt_GetSaveFileName DYNAMIC Wvt_GetScreenHeight DYNAMIC Wvt_GetScreenWidth DYNAMIC Wvt_GetTitle -DYNAMIC Wvt_GetToolTipBKColor +DYNAMIC Wvt_GetToolTipBkColor DYNAMIC Wvt_GetToolTipTextColor DYNAMIC Wvt_GetToolTipWidth DYNAMIC Wvt_GetWindowHandle diff --git a/harbour/contrib/gtwvg/menubar.prg b/harbour/contrib/gtwvg/menubar.prg index 9ae29066cf..ba5df2a703 100644 --- a/harbour/contrib/gtwvg/menubar.prg +++ b/harbour/contrib/gtwvg/menubar.prg @@ -556,7 +556,7 @@ METHOD WvgMenu:create( oParent, aPresParams, lVisible ) ::className := "POPUPMENU" - ::hMenu := Wvg_CreatePOPUPMenu() + ::hMenu := Wvg_CreatePopupMenu() RETURN Self diff --git a/harbour/contrib/gtwvg/paint.prg b/harbour/contrib/gtwvg/paint.prg index a1b343c4bb..bfd129e7f1 100644 --- a/harbour/contrib/gtwvg/paint.prg +++ b/harbour/contrib/gtwvg/paint.prg @@ -471,7 +471,7 @@ cDefName: DEFAULT file name Returns: If OFN_ALLOWMULTISELECT ? Array of files selected : FileName. */ -FUNCTION Wvt_GetOpenFilename( hWnd, cPath, cTitle, acFilter, nFlags, cInitDir, cDefExt, nFilterIndex, cDefName ) +FUNCTION Wvt_GetOpenFileName( hWnd, cPath, cTitle, acFilter, nFlags, cInitDir, cDefExt, nFilterIndex, cDefName ) LOCAL cRet, aTmp, xRet, i @@ -514,7 +514,7 @@ nIndex: Index position of types Returns: FileName. */ -FUNCTION Wvt_GetSaveFilename( hWnd, cDefName, cTitle, acFilter, nFlags, cInitDir, cDefExt, nFilterIndex ) +FUNCTION Wvt_GetSaveFileName( hWnd, cDefName, cTitle, acFilter, nFlags, cInitDir, cDefExt, nFilterIndex ) LOCAL cRet, aTmp, xRet, i, cPath diff --git a/harbour/contrib/gtwvg/syswnd.prg b/harbour/contrib/gtwvg/syswnd.prg index 12ed958734..c782510b0f 100644 --- a/harbour/contrib/gtwvg/syswnd.prg +++ b/harbour/contrib/gtwvg/syswnd.prg @@ -411,7 +411,7 @@ METHOD GetWvgFont( aFont ) CLASS WvgFontDialog LOCAL oWvgFont IF ! HB_ISARRAY( aFont ) - aFont := Wvg_ChooseFont_GetLOGFont( ::hWnd ) + aFont := Wvg_ChooseFont_GetLogFont( ::hWnd ) ENDIF oWvgFont := WvgFont():new() @@ -436,47 +436,47 @@ METHOD GetWvgFont( aFont ) CLASS WvgFontDialog */ CREATE CLASS WvgFont - VAR hFont - VAR oPS - VAR hdc + VAR hFont + VAR oPS + VAR hdc - VAR familyName INIT "" - VAR height INIT 0 - VAR nominalPointSize INIT 0 + VAR familyName INIT "" + VAR height INIT 0 + VAR nominalPointSize INIT 0 - VAR width INIT 0 - VAR widthClass INIT .F. + VAR width INIT 0 + VAR widthClass INIT .F. - VAR bold INIT .F. - VAR weightClass INIT FW_DONTCARE + VAR bold INIT .F. + VAR weightClass INIT FW_DONTCARE - VAR italic INIT .F. - VAR strikeout INIT .F. - VAR underscore INIT .F. - VAR codePage INIT DEFAULT_CHARSET + VAR italic INIT .F. + VAR strikeout INIT .F. + VAR underscore INIT .F. + VAR codePage INIT DEFAULT_CHARSET - VAR FIXED INIT .F. - VAR antiAliased INIT .F. + VAR fixed INIT .F. + VAR antiAliased INIT .F. - VAR compoundName INIT "" - METHOD setCompoundName( cName ) INLINE ::compoundName := cName + VAR compoundName INIT "" + METHOD setCompoundName( cName ) INLINE ::compoundName := cName - VAR generic INIT .T. + VAR generic INIT .T. - VAR baseLine INIT 0 READONLY - VAR dbcs INIT .F. - VAR kerning INIT .F. - VAR mbcs INIT .F. - VAR vector INIT .F. - VAR outlined INIT .F. + VAR baseLine INIT 0 READONLY + VAR dbcs INIT .F. + VAR kerning INIT .F. + VAR mbcs INIT .F. + VAR vector INIT .F. + VAR outlined INIT .F. - VAR aFontInfo INIT {} + VAR aFontInfo INIT {} - METHOD new( oPS ) - METHOD create( cFontName ) - METHOD configure( cFontName ) - METHOD list() - METHOD createFont() + METHOD new( oPS ) + METHOD create( cFontName ) + METHOD configure( cFontName ) + METHOD list() + METHOD createFont() DESTRUCTOR destroy() diff --git a/harbour/contrib/hbgd/gd.ch b/harbour/contrib/hbgd/gd.ch index f3cf7524a0..88556e2fc5 100644 --- a/harbour/contrib/hbgd/gd.ch +++ b/harbour/contrib/hbgd/gd.ch @@ -126,7 +126,7 @@ #define gdDisposalRestoreBackground 2 #define gdDisposalRestorePrevious 3 -/* FSG - text alignment */ +/* Text alignment */ #define gdAlignLeft 0 #define gdAlignCenter 1 #define gdAlignRight 2 diff --git a/harbour/contrib/hbodbc/hbodbc.hbp b/harbour/contrib/hbodbc/hbodbc.hbp index 5ec3fb8284..be3db4753c 100644 --- a/harbour/contrib/hbodbc/hbodbc.hbp +++ b/harbour/contrib/hbodbc/hbodbc.hbp @@ -22,8 +22,8 @@ # Automatic memory management. Causes # memory corruption, so it's disabled # until fixed: -#-D_HBODBC_AUTO_MM_ -#-cflag=-D_HBODBC_AUTO_MM_ +-D_HBODBC_AUTO_MM_ +-cflag=-D_HBODBC_AUTO_MM_ hbodbc.hbx diff --git a/harbour/contrib/hbodbc/odbc.c b/harbour/contrib/hbodbc/odbc.c index b652e3f984..fede0c9bcb 100644 --- a/harbour/contrib/hbodbc/odbc.c +++ b/harbour/contrib/hbodbc/odbc.c @@ -101,7 +101,7 @@ It does not cause any speed or memory overhead so I left it as example for more complicated cases and as base for some potential extensions. [druzus] -*/ + */ /* Required by headers on Windows */ #if defined( HB_OS_WIN ) @@ -252,10 +252,8 @@ static HB_GARBAGE_FUNC( hb_SQLHDBC_Mark ) PHB_SQLHDBC pHDbc = ( PHB_SQLHDBC ) Cargo; if( pHDbc->pHEnvItm ) - { /* mark parent item handler as used */ hb_gcMark( pHDbc->pHEnvItm ); - } } static const HB_GC_FUNCS s_gcSQLHDBCFuncs = @@ -338,10 +336,8 @@ static HB_GARBAGE_FUNC( hb_SQLHSTMT_Mark ) PHB_SQLHSTMT pHStmt = ( PHB_SQLHSTMT ) Cargo; if( pHStmt->pHDbcItm ) - { /* mark parent item handler as used */ hb_gcMark( pHStmt->pHDbcItm ); - } } static const HB_GC_FUNCS s_gcSQLHSTMTFuncs = { @@ -382,14 +378,20 @@ static void hb_SQLHSTMT_stor( PHB_ITEM pHDbcItm, SQLHSTMT hStmt, int iParam ) HB_FUNC( SQLALLOCENV ) /* @hEnv --> nRetCode */ { - SQLHENV hEnv; + SQLHENV hEnv; + SQLRETURN result; #if ODBCVER >= 0x0300 - hb_retni( SQLAllocHandle( SQL_HANDLE_ENV, SQL_NULL_HANDLE, &hEnv ) ); + result = SQLAllocHandle( SQL_HANDLE_ENV, SQL_NULL_HANDLE, &hEnv ); + + if( SQL_SUCCEEDED( result ) ) + SQLSetEnvAttr( hEnv, SQL_ATTR_ODBC_VERSION, ( SQLPOINTER ) SQL_OV_ODBC3, SQL_IS_UINTEGER ); #else - hb_retni( SQLAllocEnv( &hEnv ) ); + result = SQLAllocEnv( &hEnv ); #endif + hb_retni( result ); + hb_SQLHENV_stor( hEnv, 1 ); } @@ -508,7 +510,7 @@ HB_FUNC( SQLALLOCSTMT ) /* hDbc, @hStmt --> nRetCode */ { if( hb_SQLHDBC_is( 1 ) ) { - SQLHDBC hDbc = hb_SQLHDBC_par( 1 ); + SQLHDBC hDbc = hb_SQLHDBC_par( 1 ); SQLHSTMT hStmt; #if ODBCVER >= 0x0300 diff --git a/harbour/contrib/hbodbc/tests/testodbc.prg b/harbour/contrib/hbodbc/tests/testodbc.prg index 0e08db6e82..70f197eaeb 100644 --- a/harbour/contrib/hbodbc/tests/testodbc.prg +++ b/harbour/contrib/hbodbc/tests/testodbc.prg @@ -66,7 +66,7 @@ PROCEDURE Main() ? Str( nRows, 4 ), " row(s) affected." #if defined( _HBODBC_AUTO_MM_ ) - hStmt := NIL // TOFIX: There should be no GPF even without this line + // hStmt := NIL // TOFIX: There should be no GPF even without this line SQLDisconnect( hDbc ) #else diff --git a/harbour/contrib/hbodbc/todbc.prg b/harbour/contrib/hbodbc/todbc.prg index 95ef354ab4..4735467086 100644 --- a/harbour/contrib/hbodbc/todbc.prg +++ b/harbour/contrib/hbodbc/todbc.prg @@ -209,7 +209,7 @@ METHOD SetAutoCommit( lEnable ) CLASS TODBC METHOD Destroy() CLASS TODBC #if defined( _HBODBC_AUTO_MM_ ) - ::hStmt := NIL // TOFIX: There should be no GPF even without this line + // ::hStmt := NIL // TOFIX: There should be no GPF even without this line SQLDisconnect( ::hDbc ) // Disconnects from Driver diff --git a/harbour/contrib/rddsql/hbrddsql.h b/harbour/contrib/rddsql/hbrddsql.h index 318018557f..eb44c6982f 100644 --- a/harbour/contrib/rddsql/hbrddsql.h +++ b/harbour/contrib/rddsql/hbrddsql.h @@ -95,7 +95,7 @@ typedef struct _SQLBASEAREA HB_ULONG ulRecCount; /* Total records */ HB_ULONG ulRecMax; /* Size of pRow, pRowFlags buffer */ - void ** pRow; /* array of native pointers or cached PHB_ITEM */ + void ** pRow; /* array of native pointers or cached PHB_ITEM */ HB_BYTE * pRowFlags; void * pRecord; /* current record */ @@ -142,8 +142,8 @@ typedef struct _MIXKEY typedef struct _MIXNODE { - unsigned int Leaf; - unsigned int KeyCount; + unsigned int Leaf; + unsigned int KeyCount; struct _MIXNODE * Parent; struct _MIXNODE * Child[ MIX_NODE_ORDER + 1 ]; } MIXNODE, * PMIXNODE; @@ -151,8 +151,8 @@ typedef struct _MIXNODE typedef struct _MIXNODELEAF { - unsigned int Leaf; - unsigned int KeyCount; + unsigned int Leaf; + unsigned int KeyCount; struct _MIXNODE * Parent; } MIXNODELEAF, * PMIXNODELEAF; @@ -202,7 +202,6 @@ typedef struct _SQLMIXAREA } SQLMIXAREA, * SQLMIXAREAP; - /* ==================================================================== SQLDD diff --git a/harbour/contrib/sddfb/sddfb.c b/harbour/contrib/sddfb/sddfb.c index 4ee118202b..ee421954f3 100644 --- a/harbour/contrib/sddfb/sddfb.c +++ b/harbour/contrib/sddfb/sddfb.c @@ -110,19 +110,21 @@ static void hb_firebirddd_init( void * cargo ) HB_FUNC_TRANSLATE( SDDFB, SQLBASE ) HB_INIT_SYMBOLS_BEGIN( firebirddd__InitSymbols ) -{ "SDDFB", {HB_FS_PUBLIC|HB_FS_LOCAL}, {HB_FUNCNAME( SDDFB )}, NULL }, +{ + "SDDFB", { HB_FS_PUBLIC | HB_FS_LOCAL }, { HB_FUNCNAME( SDDFB ) }, NULL +}, HB_INIT_SYMBOLS_END( firebirddd__InitSymbols ) HB_CALL_ON_STARTUP_BEGIN( _hb_firebirddd_init_ ) - hb_vmAtInit( hb_firebirddd_init, NULL ); +hb_vmAtInit( hb_firebirddd_init, NULL ); HB_CALL_ON_STARTUP_END( _hb_firebirddd_init_ ) #if defined( HB_PRAGMA_STARTUP ) #pragma startup firebirddd__InitSymbols #pragma startup _hb_firebirddd_init_ #elif defined( HB_DATASEG_STARTUP ) - #define HB_DATASEG_BODY HB_DATASEG_FUNC( firebirddd__InitSymbols ) \ - HB_DATASEG_FUNC( _hb_firebirddd_init_ ) + #define HB_DATASEG_BODY HB_DATASEG_FUNC( firebirddd__InitSymbols ) \ + HB_DATASEG_FUNC( _hb_firebirddd_init_ ) #include "hbiniseg.h" #endif @@ -170,10 +172,8 @@ static HB_ERRCODE fbConnect( SQLDDCONNECTION * pConnection, PHB_ITEM pItem ) if( isc_attach_database( status, ( short ) hb_arrayGetCLen( pItem, 5 ), hb_arrayGetCPtr( pItem, 5 ), &hDb, ( short ) i, parambuf ) ) - { /* TODO: error code in status[1]; */ return HB_FAILURE; - } pConnection->pSDDConn = hb_xgrab( sizeof( SDDCONN ) ); ( ( SDDCONN * ) pConnection->pSDDConn )->hDb = hDb; #if 0 @@ -253,7 +253,7 @@ static HB_ERRCODE fbOpen( SQLBASEAREAP pArea ) return HB_FAILURE; } - if( isc_dsql_execute( status, &hTrans, &hStmt, 1, NULL) ) + if( isc_dsql_execute( status, &hTrans, &hStmt, 1, NULL ) ) { hb_errRT_FireBirdDD( EG_OPEN, ESQLDD_EXECUTE, "Execute statement failed", pArea->szQuery, ( HB_ERRCODE ) isc_sqlcode( status ) ); isc_dsql_free_statement( status, &hStmt, DSQL_drop ); @@ -264,11 +264,11 @@ static HB_ERRCODE fbOpen( SQLBASEAREAP pArea ) if( pSqlda->sqld > pSqlda->sqln ) { - uiFields = pSqlda->sqld; - hb_xfree( pSqlda ); - pSqlda = ( XSQLDA * ) hb_xgrab( XSQLDA_LENGTH( uiFields ) ); - pSqlda->sqln = uiFields; - pSqlda->version = 1; + uiFields = pSqlda->sqld; + hb_xfree( pSqlda ); + pSqlda = ( XSQLDA * ) hb_xgrab( XSQLDA_LENGTH( uiFields ) ); + pSqlda->sqln = uiFields; + pSqlda->version = 1; if( isc_dsql_describe( status, &hStmt, SQL_DIALECT_V5, pSqlda ) ) { @@ -310,10 +310,10 @@ static HB_ERRCODE fbOpen( SQLBASEAREAP pArea ) char * pStr; pFieldInfo.uiType = HB_FT_STRING; - pFieldInfo.uiLen = pVar->sqllen; - pVar->sqldata = ( char* ) hb_xgrab( sizeof( char ) * pVar->sqllen + 2 ); + pFieldInfo.uiLen = pVar->sqllen; + pVar->sqldata = ( char * ) hb_xgrab( sizeof( char ) * pVar->sqllen + 2 ); - pStr = ( char * ) memset( hb_xgrab( pFieldInfo.uiLen ), ' ', pFieldInfo.uiLen ); + pStr = ( char * ) memset( hb_xgrab( pFieldInfo.uiLen ), ' ', pFieldInfo.uiLen ); pItem = hb_itemPutCL( NULL, pStr, pFieldInfo.uiLen ); hb_xfree( pStr ); break; @@ -325,11 +325,11 @@ static HB_ERRCODE fbOpen( SQLBASEAREAP pArea ) char * pStr; pFieldInfo.uiType = HB_FT_VARLENGTH; - pFieldInfo.uiLen = pVar->sqllen; + pFieldInfo.uiLen = pVar->sqllen; /* pVar->sqltype = SQL_TEXT; Coercing */ - pVar->sqldata = ( char* ) hb_xgrab( sizeof( char ) * pVar->sqllen + 2 ); + pVar->sqldata = ( char * ) hb_xgrab( sizeof( char ) * pVar->sqllen + 2 ); - pStr = ( char * ) memset( hb_xgrab( pFieldInfo.uiLen ), ' ', pFieldInfo.uiLen ); + pStr = ( char * ) memset( hb_xgrab( pFieldInfo.uiLen ), ' ', pFieldInfo.uiLen ); pItem = hb_itemPutCL( NULL, pStr, pFieldInfo.uiLen ); hb_xfree( pStr ); break; @@ -339,72 +339,72 @@ static HB_ERRCODE fbOpen( SQLBASEAREAP pArea ) if( pVar->sqlscale < 0 ) { pFieldInfo.uiType = HB_FT_LONG; - pFieldInfo.uiLen = 7; - pFieldInfo.uiDec = - pVar->sqlscale; + pFieldInfo.uiLen = 7; + pFieldInfo.uiDec = -pVar->sqlscale; pItem = hb_itemPutNDLen( NULL, 0.0, 6 - pFieldInfo.uiDec, ( int ) pFieldInfo.uiDec ); } else { pFieldInfo.uiType = HB_FT_INTEGER; - pFieldInfo.uiLen = 2; + pFieldInfo.uiLen = 2; pItem = hb_itemPutNILen( NULL, 0, 6 ); } - pVar->sqldata = ( char* ) hb_xgrab( sizeof( short ) ); + pVar->sqldata = ( char * ) hb_xgrab( sizeof( short ) ); break; case SQL_LONG: if( pVar->sqlscale < 0 ) { pFieldInfo.uiType = HB_FT_LONG; - pFieldInfo.uiLen = 12; - pFieldInfo.uiDec = - pVar->sqlscale; + pFieldInfo.uiLen = 12; + pFieldInfo.uiDec = -pVar->sqlscale; pItem = hb_itemPutNDLen( NULL, 0.0, 11 - pFieldInfo.uiDec, ( int ) pFieldInfo.uiDec ); } else { pFieldInfo.uiType = HB_FT_INTEGER; - pFieldInfo.uiLen = 4; + pFieldInfo.uiLen = 4; pItem = hb_itemPutNLLen( NULL, 0, 11 ); } - pVar->sqldata = ( char* ) hb_xgrab( sizeof( long ) ); + pVar->sqldata = ( char * ) hb_xgrab( sizeof( long ) ); break; case SQL_FLOAT: pFieldInfo.uiType = HB_FT_DOUBLE; - pFieldInfo.uiLen = 8; - pFieldInfo.uiDec = - pVar->sqlscale; - pVar->sqldata = ( char* ) hb_xgrab( sizeof( float ) ); + pFieldInfo.uiLen = 8; + pFieldInfo.uiDec = -pVar->sqlscale; + pVar->sqldata = ( char * ) hb_xgrab( sizeof( float ) ); - pItem = hb_itemPutNDLen( NULL, * ( float * ) pVar->sqldata, 20 - pFieldInfo.uiDec, pFieldInfo.uiDec ); + pItem = hb_itemPutNDLen( NULL, *( float * ) pVar->sqldata, 20 - pFieldInfo.uiDec, pFieldInfo.uiDec ); break; case SQL_DOUBLE: pFieldInfo.uiType = HB_FT_DOUBLE; - pFieldInfo.uiLen = 8; - pFieldInfo.uiDec = - pVar->sqlscale; - pVar->sqldata = ( char* ) hb_xgrab( sizeof( double ) ); + pFieldInfo.uiLen = 8; + pFieldInfo.uiDec = -pVar->sqlscale; + pVar->sqldata = ( char * ) hb_xgrab( sizeof( double ) ); - pItem = hb_itemPutNDLen( NULL, * ( float * ) pVar->sqldata, 20 - pFieldInfo.uiDec, pFieldInfo.uiDec ); + pItem = hb_itemPutNDLen( NULL, *( float * ) pVar->sqldata, 20 - pFieldInfo.uiDec, pFieldInfo.uiDec ); break; case SQL_TIMESTAMP: pFieldInfo.uiType = HB_FT_TIMESTAMP; - pFieldInfo.uiLen = 8; - pVar->sqldata = ( char* ) hb_xgrab( sizeof( ISC_TIMESTAMP ) ); + pFieldInfo.uiLen = 8; + pVar->sqldata = ( char * ) hb_xgrab( sizeof( ISC_TIMESTAMP ) ); pItem = hb_itemPutTDT( NULL, 0, 0 ); break; default: /* other fields as binary string */ pFieldInfo.uiType = HB_FT_STRING; - pFieldInfo.uiLen = pVar->sqllen; - pVar->sqldata = ( char* ) hb_xgrab( sizeof( char ) * pVar->sqllen ); + pFieldInfo.uiLen = pVar->sqllen; + pVar->sqldata = ( char * ) hb_xgrab( sizeof( char ) * pVar->sqllen ); - pItem = hb_itemNew( NULL ); + pItem = hb_itemNew( NULL ); bError = HB_TRUE; break; } @@ -491,49 +491,49 @@ static HB_ERRCODE fbGoTo( SQLBASEAREAP pArea, HB_ULONG ulRecNo ) LPFIELD pField; pVar = pSDDData->pSqlda->sqlvar + ui; - if( ( pVar->sqltype & 1 ) && ( * pVar->sqlind < 0 ) ) + if( ( pVar->sqltype & 1 ) && ( *pVar->sqlind < 0 ) ) continue; /* NIL value */ pField = pArea->area.lpFields + ui; - iType = pVar->sqltype & ~1; - switch ( iType ) + iType = pVar->sqltype & ~1; + switch( iType ) { case SQL_TEXT: pItem = hb_itemPutCL( NULL, pVar->sqldata, pVar->sqllen ); break; case SQL_VARYING: - pItem = hb_itemPutCL( NULL, pVar->sqldata + 2, * ( short * ) pVar->sqldata ); + pItem = hb_itemPutCL( NULL, pVar->sqldata + 2, *( short * ) pVar->sqldata ); break; case SQL_SHORT: if( pField->uiDec == 0 ) - pItem = hb_itemPutNILen( NULL, * ( short * ) pVar->sqldata, 6 ); + pItem = hb_itemPutNILen( NULL, *( short * ) pVar->sqldata, 6 ); else - pItem = hb_itemPutNDLen( NULL, hb_numDecConv( * ( short * ) pVar->sqldata, ( int ) pField->uiDec ), + pItem = hb_itemPutNDLen( NULL, hb_numDecConv( *( short * ) pVar->sqldata, ( int ) pField->uiDec ), 6 - pField->uiDec, ( int ) pField->uiDec ); break; case SQL_LONG: - pItem = hb_itemPutNL( NULL, * ( long * ) pVar->sqldata ); + pItem = hb_itemPutNL( NULL, *( long * ) pVar->sqldata ); if( pField->uiDec == 0 ) - pItem = hb_itemPutNLLen( NULL, * ( short * ) pVar->sqldata, 11 ); + pItem = hb_itemPutNLLen( NULL, *( short * ) pVar->sqldata, 11 ); else - pItem = hb_itemPutNDLen( NULL, hb_numDecConv( * ( long * ) pVar->sqldata, ( int ) pField->uiDec ), + pItem = hb_itemPutNDLen( NULL, hb_numDecConv( *( long * ) pVar->sqldata, ( int ) pField->uiDec ), 11 - pField->uiDec, ( int ) pField->uiDec ); break; case SQL_FLOAT: - pItem = hb_itemPutNDLen( NULL, * ( float * ) pVar->sqldata, 20 - pField->uiDec, pField->uiDec ); + pItem = hb_itemPutNDLen( NULL, *( float * ) pVar->sqldata, 20 - pField->uiDec, pField->uiDec ); break; case SQL_DOUBLE: - pItem = hb_itemPutNDLen( NULL, * ( double * ) pVar->sqldata, 20 - pField->uiDec, pField->uiDec ); + pItem = hb_itemPutNDLen( NULL, *( double * ) pVar->sqldata, 20 - pField->uiDec, pField->uiDec ); break; case SQL_TIMESTAMP: - pItem = hb_itemPutTDT( NULL, (( ISC_TIMESTAMP * ) pVar->sqldata )->timestamp_date + 2400001, - (( ISC_TIMESTAMP * ) pVar->sqldata )->timestamp_time / 10 ); + pItem = hb_itemPutTDT( NULL, ( ( ISC_TIMESTAMP * ) pVar->sqldata )->timestamp_date + 2400001, + ( ( ISC_TIMESTAMP * ) pVar->sqldata )->timestamp_time / 10 ); break; default: diff --git a/harbour/doc/howtorep.txt b/harbour/doc/howtorep.txt index da86d7b5d1..58de667b17 100644 --- a/harbour/doc/howtorep.txt +++ b/harbour/doc/howtorep.txt @@ -112,6 +112,10 @@ by Viktor Szakats - Removed ; Comment +- Best is to use commit.hb script to add new entry: + $ hbrun bin/commit.hb + Then add the change descriptions. + - In case of incompatible changes, add the word 'INCOMPATIBLE' to the text. diff --git a/harbour/extras/gtwvw/gtwvw.hbx b/harbour/extras/gtwvw/gtwvw.hbx index 91e3780e65..a022a14ccb 100644 --- a/harbour/extras/gtwvw/gtwvw.hbx +++ b/harbour/extras/gtwvw/gtwvw.hbx @@ -106,7 +106,7 @@ DYNAMIC wvw_CreateDialogDynamic DYNAMIC wvw_CreateDialogModal DYNAMIC wvw_CreateFont DYNAMIC wvw_CreateMenu -DYNAMIC wvw_CreatePOPUPMenu +DYNAMIC wvw_CreatePopupMenu DYNAMIC wvw_cxCreate DYNAMIC wvw_cxDestroy DYNAMIC wvw_cxEnable diff --git a/harbour/extras/gtwvw/wvt2wvw.ch b/harbour/extras/gtwvw/wvt2wvw.ch index b3a1b7f8d2..9c64c66233 100644 --- a/harbour/extras/gtwvw/wvt2wvw.ch +++ b/harbour/extras/gtwvw/wvt2wvw.ch @@ -20,7 +20,7 @@ MEMVAR _wvwtemp_ /* ==================================================== */ #xtranslate Wvt_CreateMenu ( [] ) => wvw_CreateMenu ( [] ) -#xtranslate Wvt_CreatePOPUPMenu ( [] ) => wvw_CreatePOPUPMenu ( [] ) +#xtranslate Wvt_CreatePopupMenu ( [] ) => wvw_CreatePopupMenu ( [] ) #xtranslate Wvt_AppendMenu ( [] ) => wvw_AppendMenu ( [] ) #xtranslate Wvt_DeleteMenu ( [] ) => wvw_DeleteMenu ( [] ) #xtranslate Wvt_DestroyMenu ( [] ) => wvw_DestroyMenu ( [] ) @@ -163,7 +163,7 @@ MEMVAR _wvwtemp_ #xtranslate Wvt_SetToolTipTextColor ( [] ) => wvw_SetToolTipTextColor ( NIL [, ] ) #xtranslate Wvt_SetToolTipTitle ( [] ) => wvw_SetToolTipTitle ( NIL [, ] ) #xtranslate Wvt_GetToolTipWidth ( [] ) => wvw_GetToolTipWidth ( NIL [, ] ) -#xtranslate Wvt_GetToolTipBKColor ( [] ) => wvw_GetToolTipBkColor ( NIL [, ] ) +#xtranslate Wvt_GetToolTipBkColor ( [] ) => wvw_GetToolTipBkColor ( NIL [, ] ) #xtranslate Wvt_GetToolTipTextColor ( [] ) => wvw_GetToolTipTextColor ( NIL [, ] ) /* Timer functions. WARNING: WVT implementation is slightly different. */ diff --git a/harbour/src/rtl/gtwvt/gtwvt.c b/harbour/src/rtl/gtwvt/gtwvt.c index 9f9f59bcb2..ac91431a1e 100644 --- a/harbour/src/rtl/gtwvt/gtwvt.c +++ b/harbour/src/rtl/gtwvt/gtwvt.c @@ -386,6 +386,8 @@ static PHB_GTWVT hb_gt_wvt_New( PHB_GT pGT, HINSTANCE hInstance, int iCmdShow ) pWVT->bResizing = HB_FALSE; pWVT->bAlreadySizing = HB_FALSE; + pWVT->bComposited = HB_FALSE; + return pWVT; } @@ -750,7 +752,7 @@ static void hb_gt_wvt_FitSize( PHB_GTWVT pWVT ) * This code never seems to get executed with "Lucida Console" * Width scaling with some Heights is an issue with Courier New and Terminal * Height scaling with some Widths is an issue with Consolas and Terminal - * but this code lets us adjust it here and try creating the font again. [HVB] + * but this code lets us adjust it here and try creating the font again. [HVB] */ if( iCalcWidth == 0 && iCalcHeight == 0 ) @@ -1041,6 +1043,7 @@ static void hb_gt_wvt_Composited( PHB_GTWVT pWVT, HB_BOOL fEnable ) #else if( hb_iswinvista() && ! GetSystemMetrics( SM_REMOTESESSION ) ) { + pWVT->bComposited = fEnable; if( fEnable ) SetWindowLongPtr( pWVT->hWnd, GWL_EXSTYLE, GetWindowLongPtr( pWVT->hWnd, GWL_EXSTYLE ) | WS_EX_COMPOSITED ); else @@ -3084,6 +3087,9 @@ static int hb_gt_wvt_gfx_Primitive( PHB_GT pGT, int iType, int iTop, int iLeft, if( pWVT->hWnd ) { + if( pWVT->bComposited ) + hb_gt_wvt_Composited( pWVT, HB_FALSE ); + switch( iType ) { case HB_GFX_ACQUIRESCREEN: diff --git a/harbour/src/rtl/gtwvt/gtwvt.h b/harbour/src/rtl/gtwvt/gtwvt.h index df046f0bcd..b8d20a70c0 100644 --- a/harbour/src/rtl/gtwvt/gtwvt.h +++ b/harbour/src/rtl/gtwvt/gtwvt.h @@ -199,6 +199,8 @@ typedef struct HB_BOOL bResizing; HB_BOOL bAlreadySizing; + HB_BOOL bComposited; + RECT ciLast; /* need in WM_ENTERSIZEMOVE processing and hb_gt_wvt_PaintText() function [HVB] */ } HB_GTWVT, * PHB_GTWVT;