2010-02-09 00:13 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/pp/pplib.c
* src/common/hbprintf.c
* src/rtl/gtclip.c
* src/rdd/dbfntx/dbfntx1.c
* src/rdd/dbfnsx/dbfnsx1.c
* src/rdd/dbfcdx/dbfcdx1.c
* src/rdd/dbffpt/dbffpt1.c
* src/compiler/hbpcode.c
* include/hbgtcore.h
* contrib/hbbmcdx/bmdbfcdx.c
* contrib/hbbtree/hb_btree.h
* contrib/hbbtree/hb_btree.c
! Fixed remaining type conversion problems after doing
live testing on win/bcc.
Please test it on other platforms.
* config/rules.mk
+ Enabled HB_LEGACY_TYPES_OFF on default Harbour
builds. This is required to keep new type usage
enforced.
This commit is contained in:
@@ -17,6 +17,28 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2010-02-09 00:13 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* src/pp/pplib.c
|
||||
* src/common/hbprintf.c
|
||||
* src/rtl/gtclip.c
|
||||
* src/rdd/dbfntx/dbfntx1.c
|
||||
* src/rdd/dbfnsx/dbfnsx1.c
|
||||
* src/rdd/dbfcdx/dbfcdx1.c
|
||||
* src/rdd/dbffpt/dbffpt1.c
|
||||
* src/compiler/hbpcode.c
|
||||
* include/hbgtcore.h
|
||||
* contrib/hbbmcdx/bmdbfcdx.c
|
||||
* contrib/hbbtree/hb_btree.h
|
||||
* contrib/hbbtree/hb_btree.c
|
||||
! Fixed remaining type conversion problems after doing
|
||||
live testing on win/bcc.
|
||||
Please test it on other platforms.
|
||||
|
||||
* config/rules.mk
|
||||
+ Enabled HB_LEGACY_TYPES_OFF on default Harbour
|
||||
builds. This is required to keep new type usage
|
||||
enforced.
|
||||
|
||||
2010-02-08 23:18 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* src/rtl/gtwin/gtwin.c
|
||||
* include/hbrddcdx.h
|
||||
@@ -205,8 +227,8 @@
|
||||
|
||||
; TODO:
|
||||
- Verify with grep script [DONE]
|
||||
- Verify with HB_USER_CFLAGS=-DHB_LEGACY_TYPES_OFF
|
||||
- Make HB_LEGACY_TYPES_OFF default for Harbour builds.
|
||||
- Verify with HB_USER_CFLAGS=-DHB_LEGACY_TYPES_OFF [DONE]
|
||||
- Make HB_LEGACY_TYPES_OFF default for Harbour builds. [DONE]
|
||||
- Tie HB_LEGACY_TYPES_OFF to HB_LEGACY_LEVEL3
|
||||
- Replace current windows.h inclusion hack with regular method
|
||||
- Delete hacks dealing with former type chaos:
|
||||
|
||||
@@ -16,6 +16,8 @@ ifeq ($(HB_BUILD_UNICODE),yes)
|
||||
HB_CFLAGS := -DUNICODE $(HB_CFLAGS)
|
||||
endif
|
||||
|
||||
HB_CFLAGS := -DHB_LEGACY_TYPES_OFF $(HB_CFLAGS)
|
||||
|
||||
ifeq ($(HB_DYN_COPT),)
|
||||
OBJ_DYN_POSTFIX :=
|
||||
else
|
||||
|
||||
@@ -1516,7 +1516,7 @@ static HB_BOOL hb_cdxIndexUnLockWrite( LPCDXINDEX pIndex )
|
||||
pIndex->fFlush = HB_TRUE;
|
||||
pIndex->fChanged = HB_FALSE;
|
||||
}
|
||||
hb_fileFlush( pIndex->pFile, TRUE );
|
||||
hb_fileFlush( pIndex->pFile, HB_TRUE );
|
||||
#ifdef HB_CDX_DBGCODE
|
||||
if( ! pIndex->WrLck || pIndex->RdLck )
|
||||
hb_errInternal( 9108, "hb_cdxIndexUnLockWrite: unlock error (*)", NULL, NULL );
|
||||
@@ -1584,7 +1584,7 @@ static void hb_cdxIndexDiscardBuffers( LPCDXINDEX pIndex )
|
||||
pTag->CurKey->rec = 0;
|
||||
pTag = pTag->pNext;
|
||||
}
|
||||
hb_fileFlush( pIndex->pFile, FALSE );
|
||||
hb_fileFlush( pIndex->pFile, HB_FALSE );
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -394,7 +394,7 @@ static void ioBufferScan( struct hb_BTree * pBTree, HB_ULONG page )
|
||||
for ( thisptr = pBTree->ioBuffer;
|
||||
thisptr && !BTREENODEISNULL( pBTree, thisptr->xPage.ulPage ) && thisptr->xPage.ulPage != page && thisptr->next;
|
||||
thisptr = thisptr->next )
|
||||
;
|
||||
{};
|
||||
|
||||
/* only shuffle the buffers if the target buffer is not the root buffer */
|
||||
if ( thisptr != pBTree->ioBuffer )
|
||||
@@ -669,7 +669,7 @@ static void Prune( struct hb_BTree * pBTree, HB_ULONG ulNode )
|
||||
HB_ULONG n;
|
||||
|
||||
for ( thisptr = pBTree->ioBuffer; thisptr && thisptr->xPage.ulPage != ulNode; thisptr = thisptr->next )
|
||||
;
|
||||
{};
|
||||
|
||||
if ( thisptr->prev ) thisptr->prev->next = thisptr->next;
|
||||
if ( thisptr->next ) thisptr->next->prev = thisptr->prev;
|
||||
@@ -1207,7 +1207,7 @@ static void Successor( struct hb_BTree * pBTree, HB_ULONG ulNode, int iPosition
|
||||
for ( tmpnode = BranchGet( pBTree, ulNode, iPosition );
|
||||
!BTREENODEISNULL( pBTree, BranchGet( pBTree, tmpnode, 0 ) );
|
||||
tmpnode = BranchGet( pBTree, tmpnode, 0 ) )
|
||||
;
|
||||
{};
|
||||
KeySet( pBTree, ulNode, iPosition, ( buffer = KeyGet( pBTree, tmpnode, 1, NULL ) ) );
|
||||
BufferRelease( buffer );
|
||||
}
|
||||
@@ -1362,7 +1362,7 @@ HB_BOOL hb_BTreeDelete( struct hb_BTree * pBTree, const char *target, HB_LONG lD
|
||||
}
|
||||
#if 0
|
||||
else
|
||||
; /* error - key does not exist */
|
||||
{}; /* error - key does not exist */
|
||||
#endif
|
||||
}
|
||||
else
|
||||
@@ -1382,7 +1382,7 @@ void hb_BTreeGoTop( struct hb_BTree * pBTree )
|
||||
HB_ULONG ulLastNode;
|
||||
|
||||
for ( ulLastNode = ulNode = pBTree->ulRootPage; !BTREENODEISNULL( pBTree, ulNode ); ulLastNode = ulNode, ulNode = BranchGet( pBTree, ulNode, 0 ) )
|
||||
;
|
||||
{};
|
||||
|
||||
if ( BTREENODEISNULL( pBTree, ulLastNode ) )
|
||||
CLEARKEYDATA( pBTree );
|
||||
@@ -1396,14 +1396,14 @@ void hb_BTreeGoBottom( struct hb_BTree * pBTree )
|
||||
HB_ULONG ulLastNode;
|
||||
|
||||
for ( ulLastNode = ulNode = pBTree->ulRootPage; !BTREENODEISNULL( pBTree, ulNode ); ulLastNode = ulNode, ulNode = BranchGet( pBTree, ulNode, CountGet( pBTree, ulNode ) ) )
|
||||
;
|
||||
{};
|
||||
if ( BTREENODEISNULL( pBTree, ulLastNode ) )
|
||||
CLEARKEYDATA( pBTree );
|
||||
else
|
||||
KeyGet( pBTree, ulLastNode, CountGet( pBTree, ulLastNode ), pBTree->pThisKeyData );
|
||||
}
|
||||
|
||||
LONG hb_BTreeSkip( struct hb_BTree * pBTree, HB_LONG records )
|
||||
HB_LONG hb_BTreeSkip( struct hb_BTree * pBTree, HB_LONG records )
|
||||
{
|
||||
HB_LONG results = 0;
|
||||
int iPosition;
|
||||
@@ -1667,7 +1667,7 @@ const char * hb_BTreeKey( struct hb_BTree * pBTree )
|
||||
return ( const char * )pBTree->pThisKeyData->szKey;
|
||||
}
|
||||
|
||||
LONG hb_BTreeData( struct hb_BTree * pBTree )
|
||||
HB_LONG hb_BTreeData( struct hb_BTree * pBTree )
|
||||
{
|
||||
return pBTree->pThisKeyData->xData.lData;
|
||||
}
|
||||
@@ -1687,7 +1687,7 @@ static int BTree_SetTreeIndex( struct hb_BTree * pBTree )
|
||||
return -1;
|
||||
|
||||
for ( n = 0; n < s_BTree_List_Count && s_BTree_List[ n ] != NULL; n++ )
|
||||
;
|
||||
{};
|
||||
|
||||
if ( n == s_BTree_List_Count )
|
||||
{
|
||||
|
||||
@@ -43,16 +43,16 @@ HB_EXTERN_BEGIN
|
||||
struct hb_BTree;
|
||||
|
||||
struct hb_BTree * hb_BTreeNew( const char * FileName, HB_USHORT usPageSize, HB_USHORT usKeySize, HB_ULONG ulFlags, HB_ULONG ulBuffers );
|
||||
struct hb_BTree *hb_BTreeOpen( const char *FileName, HB_ULONG ulFlags, HB_ULONG ulBuffers );
|
||||
struct hb_BTree * hb_BTreeOpen( const char *FileName, HB_ULONG ulFlags, HB_ULONG ulBuffers );
|
||||
void hb_BTreeClose( struct hb_BTree * pBTree );
|
||||
HB_BOOL hb_BTreeInsert( struct hb_BTree * pBTree, const char * szKey, PHB_ITEM pData );
|
||||
HB_BOOL hb_BTreeDelete( struct hb_BTree * pBTree, const char * szKey, HB_LONG lData );
|
||||
void hb_BTreeGoTop( struct hb_BTree * pBTree );
|
||||
void hb_BTreeGoBottom( struct hb_BTree * pBTree );
|
||||
HB_BOOL hb_BTreeSeek( struct hb_BTree * pBTree, const char *szKey, HB_LONG lData, HB_BOOL bSoftSeek );
|
||||
LONG hb_BTreeSkip( struct hb_BTree * pBTree, HB_LONG records );
|
||||
HB_BOOL hb_BTreeSeek( struct hb_BTree * pBTree, const char * szKey, HB_LONG lData, HB_BOOL bSoftSeek );
|
||||
HB_LONG hb_BTreeSkip( struct hb_BTree * pBTree, HB_LONG records );
|
||||
const char * hb_BTreeKey( struct hb_BTree * pBTree );
|
||||
LONG hb_BTreeData( struct hb_BTree * pBTree );
|
||||
HB_LONG hb_BTreeData( struct hb_BTree * pBTree );
|
||||
PHB_ITEM hb_BTreeDataItem( struct hb_BTree * pBTree );
|
||||
|
||||
HB_EXTERN_END
|
||||
|
||||
@@ -598,8 +598,8 @@ extern int hb_gt_chrmapinit( int * piTransTbl, const char * pszTerm, HB_BOOL fS
|
||||
extern HB_BOOL hb_gt_setClipboard( const char * szClipData, HB_SIZE ulLen );
|
||||
extern HB_BOOL hb_gt_getClipboard( char ** pszClipData, HB_SIZE * pulLen );
|
||||
#if defined( HB_OS_WIN )
|
||||
extern HB_BOOL hb_gt_winapi_setClipboard( UINT uFormat, const char * szClipData, HB_SIZE ulLen );
|
||||
extern HB_BOOL hb_gt_winapi_getClipboard( UINT uFormat, char ** pszClipData, HB_SIZE * pulLen );
|
||||
extern HB_BOOL hb_gt_winapi_setClipboard( HB_UINT uFormat, const char * szClipData, HB_SIZE ulLen );
|
||||
extern HB_BOOL hb_gt_winapi_getClipboard( HB_UINT uFormat, char ** pszClipData, HB_SIZE * pulLen );
|
||||
extern int hb_gt_winapi_getKbdState( void );
|
||||
extern void hb_gt_winapi_setKbdState( int kbdShifts );
|
||||
extern void hb_gt_winapi_tone( double dFrequency, double dDuration );
|
||||
|
||||
@@ -176,8 +176,8 @@ optimized.
|
||||
# define _x_double int
|
||||
#endif
|
||||
#ifndef __NO_LONGLONG__
|
||||
# define _x_longlong LONGLONG
|
||||
# define _x_ulonglong ULONGLONG
|
||||
# define _x_longlong HB_LONGLONG
|
||||
# define _x_ulonglong HB_ULONGLONG
|
||||
#else
|
||||
# define _x_longlong long
|
||||
# define _x_ulonglong unsigned long
|
||||
|
||||
@@ -493,7 +493,7 @@ static HB_PCODE_FUNC_PTR s_psize_table[] =
|
||||
hb_p_threadstatics /* HB_P_THREADSTATICS */
|
||||
};
|
||||
|
||||
LONG hb_compPCodeSize( PFUNCTION pFunc, HB_ULONG ulOffset )
|
||||
HB_LONG hb_compPCodeSize( PFUNCTION pFunc, HB_ULONG ulOffset )
|
||||
{
|
||||
HB_LONG lSize = 0;
|
||||
HB_BYTE opcode = pFunc->pCode[ ulOffset ];
|
||||
|
||||
@@ -75,7 +75,7 @@ static void hb_pp_ErrorMessage( void * cargo, const char * szMsgTable[],
|
||||
PHB_ITEM pError;
|
||||
hb_snprintf( szMsgBuf, sizeof( szMsgBuf ), szMsgTable[ iCode - 1 ],
|
||||
szParam1, szParam2 );
|
||||
pError = hb_errRT_New( ES_ERROR, "PP", 1001, ( ULONG ) iCode, szMsgBuf,
|
||||
pError = hb_errRT_New( ES_ERROR, "PP", 1001, ( HB_ULONG ) iCode, szMsgBuf,
|
||||
NULL, 0, EF_NONE | EF_CANDEFAULT );
|
||||
hb_errLaunch( pError );
|
||||
hb_errRelease( pError );
|
||||
@@ -229,7 +229,7 @@ HB_FUNC( __PP_ADDRULE )
|
||||
if( pState )
|
||||
{
|
||||
const char * szText = hb_parc( 2 );
|
||||
ULONG ulLen = hb_parclen( 2 );
|
||||
HB_SIZE ulLen = hb_parclen( 2 );
|
||||
|
||||
if( szText )
|
||||
{
|
||||
@@ -270,7 +270,7 @@ HB_FUNC( __PP_PROCESS )
|
||||
|
||||
if( pState )
|
||||
{
|
||||
ULONG ulLen = hb_parclen( 2 );
|
||||
HB_SIZE ulLen = hb_parclen( 2 );
|
||||
|
||||
if( ulLen )
|
||||
{
|
||||
|
||||
@@ -1364,7 +1364,7 @@ static HB_BOOL hb_cdxIndexUnLockWrite( LPCDXINDEX pIndex )
|
||||
pIndex->fFlush = HB_TRUE;
|
||||
pIndex->fChanged = HB_FALSE;
|
||||
}
|
||||
hb_fileFlush( pIndex->pFile, TRUE );
|
||||
hb_fileFlush( pIndex->pFile, HB_TRUE );
|
||||
#ifdef HB_CDX_DBGCODE
|
||||
if( ! pIndex->WrLck || pIndex->RdLck )
|
||||
hb_errInternal( 9108, "hb_cdxIndexUnLockWrite: unlock error (*)", NULL, NULL );
|
||||
@@ -1432,7 +1432,7 @@ static void hb_cdxIndexDiscardBuffers( LPCDXINDEX pIndex )
|
||||
pTag->CurKey->rec = 0;
|
||||
pTag = pTag->pNext;
|
||||
}
|
||||
hb_fileFlush( pIndex->pFile, FALSE );
|
||||
hb_fileFlush( pIndex->pFile, HB_FALSE );
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -197,7 +197,7 @@ static HB_BOOL hb_fptFileUnLockEx( FPTAREAP pArea )
|
||||
{
|
||||
if( pArea->fShared )
|
||||
{
|
||||
hb_fileFlush( pArea->pMemoFile, FALSE );
|
||||
hb_fileFlush( pArea->pMemoFile, HB_FALSE );
|
||||
return hb_fileLock( pArea->pMemoFile, FPT_LOCKPOS, FPT_LOCKSIZE, FL_UNLOCK );
|
||||
}
|
||||
else
|
||||
@@ -211,7 +211,7 @@ static HB_BOOL hb_fptFileUnLockSh( FPTAREAP pArea )
|
||||
{
|
||||
if( pArea->fShared )
|
||||
{
|
||||
hb_fileFlush( pArea->pMemoFile, FALSE );
|
||||
hb_fileFlush( pArea->pMemoFile, HB_FALSE );
|
||||
return hb_fileLock( pArea->pMemoFile, FPT_LOCKPOS, FPT_LOCKSIZE, FL_UNLOCK );
|
||||
}
|
||||
else
|
||||
@@ -250,7 +250,7 @@ static HB_BOOL hb_fptRootBlockUnLock( FPTAREAP pArea )
|
||||
{
|
||||
if( pArea->fShared )
|
||||
{
|
||||
hb_fileFlush( pArea->pMemoFile, FALSE );
|
||||
hb_fileFlush( pArea->pMemoFile, HB_FALSE );
|
||||
return hb_fileLock( pArea->pMemoFile, FPT_ROOTBLOCK_OFFSET, 4, FL_UNLOCK );
|
||||
}
|
||||
else
|
||||
|
||||
@@ -1246,7 +1246,7 @@ static void hb_nsxDiscardBuffers( LPNSXINDEX pIndex )
|
||||
pIndex->lpTags[ i ]->stackLevel = 0;
|
||||
pIndex->lpTags[ i ]->CurKeyOffset = 0;
|
||||
}
|
||||
hb_fileFlush( pIndex->pFile, FALSE );
|
||||
hb_fileFlush( pIndex->pFile, HB_FALSE );
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2278,7 +2278,7 @@ static HB_BOOL hb_nsxIndexUnLockWrite( LPNSXINDEX pIndex )
|
||||
}
|
||||
else
|
||||
{
|
||||
hb_fileFlush( pIndex->pFile, TRUE );
|
||||
hb_fileFlush( pIndex->pFile, HB_TRUE );
|
||||
pIndex->fValidHeader = HB_FALSE;
|
||||
fOK = hb_dbfLockIdxFile( pIndex->pFile, pIndex->pArea->dbfarea.bLockType,
|
||||
FL_UNLOCK, &pIndex->ulLockPos );
|
||||
|
||||
@@ -1012,7 +1012,7 @@ static void hb_ntxDiscardBuffers( LPNTXINDEX pIndex )
|
||||
if( pIndex->iTags )
|
||||
pIndex->lpTags[ 0 ]->stackLevel = 0;
|
||||
}
|
||||
hb_fileFlush( pIndex->DiskFile, FALSE );
|
||||
hb_fileFlush( pIndex->DiskFile, HB_FALSE );
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2170,7 +2170,7 @@ static HB_BOOL hb_ntxIndexUnLockWrite( LPNTXINDEX pIndex )
|
||||
}
|
||||
else
|
||||
{
|
||||
hb_fileFlush( pIndex->DiskFile, TRUE );
|
||||
hb_fileFlush( pIndex->DiskFile, HB_TRUE );
|
||||
pIndex->fValidHeader = HB_FALSE;
|
||||
fOK = hb_dbfLockIdxFile( pIndex->DiskFile, pIndex->Owner->dbfarea.bLockType,
|
||||
FL_UNLOCK, &pIndex->ulLockPos );
|
||||
|
||||
@@ -110,7 +110,7 @@ HB_BOOL hb_gt_getClipboard( char ** pszClipData, HB_SIZE *pulLen )
|
||||
|
||||
#if defined( HB_OS_WIN )
|
||||
|
||||
HB_BOOL hb_gt_winapi_setClipboard( UINT uFormat, const char * szClipData, HB_SIZE ulLen )
|
||||
HB_BOOL hb_gt_winapi_setClipboard( HB_UINT uFormat, const char * szClipData, HB_SIZE ulLen )
|
||||
{
|
||||
HB_BOOL fResult = HB_FALSE;
|
||||
|
||||
@@ -142,20 +142,20 @@ HB_BOOL hb_gt_winapi_setClipboard( UINT uFormat, const char * szClipData, HB_SIZ
|
||||
}
|
||||
( void ) GlobalUnlock( hglbCopy );
|
||||
/* Place the handle on the clipboard. */
|
||||
SetClipboardData( uFormat, hglbCopy );
|
||||
SetClipboardData( ( UINT ) uFormat, hglbCopy );
|
||||
}
|
||||
CloseClipboard();
|
||||
}
|
||||
return fResult;
|
||||
}
|
||||
|
||||
HB_BOOL hb_gt_winapi_getClipboard( UINT uFormat, char ** pszClipData, HB_SIZE * pulLen )
|
||||
HB_BOOL hb_gt_winapi_getClipboard( HB_UINT uFormat, char ** pszClipData, HB_SIZE * pulLen )
|
||||
{
|
||||
*pulLen = 0;
|
||||
*pszClipData = NULL;
|
||||
if( IsClipboardFormatAvailable( uFormat ) && OpenClipboard( NULL ) )
|
||||
{
|
||||
HGLOBAL hglb = GetClipboardData( uFormat );
|
||||
HGLOBAL hglb = GetClipboardData( ( UINT ) uFormat );
|
||||
if( hglb )
|
||||
{
|
||||
LPTSTR lptstr = ( LPTSTR ) GlobalLock( hglb );
|
||||
|
||||
Reference in New Issue
Block a user