2017-09-08 16:00 UTC Viktor Szakats (vszakats users.noreply.github.com)
* *
* partial sync with the 3.4 fork codebase. These are the things
synces for the most part:
- copyright headers
- grammar/typos in comments and some readmes
- comment/whitespace/decorations
- variable scoping in C files
- DO CASE/SWITCH and some other alternate syntax usage
- minimal amount of human readable text in strings
- minor code updates
- HB_TRACE() void * casts for pointers and few other changes to
avoid C compiler warnings
- various other, minor code cleanups
- only Harbour/C code/headers were touched in src, utils, contrib,
include. No 3rd party code, no make files, and with just a few
exceptions, no 'tests' code was touched.
- certain components were not touched were 3.4 diverged too much
already, like f.e. hbmk2, hbssl, hbcurl, hbexpat
- the goal was that no actual program logic should be altered by
these changes. Except some possible minor exceptions, any such
change is probably a bug in this patch.
It's a massive patch, if you find anything broken after it, please
open an Issue with the details. Build test was done on macOS.
The goal is make it easier to see what actual code/logic was changed
in 3.4 compared to 3.2 and to make patches easier to apply in both
ways.
This commit is contained in:
@@ -90,21 +90,16 @@ static HB_USHORT s_uiRddIdSQLMIX = ( HB_USHORT ) -1;
|
||||
static RDDFUNCS sqlmixSuper;
|
||||
|
||||
|
||||
/*
|
||||
=======================================================================
|
||||
Misc functions
|
||||
=======================================================================
|
||||
*/
|
||||
/* --- Misc functions --- */
|
||||
|
||||
|
||||
static HB_ERRCODE sqlmixErrorRT( SQLMIXAREAP pArea, HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, char * filename, HB_ERRCODE errOsCode, HB_USHORT uiFlags )
|
||||
{
|
||||
PHB_ITEM pError;
|
||||
HB_ERRCODE iRet = HB_FAILURE;
|
||||
|
||||
if( hb_vmRequestQuery() == 0 )
|
||||
{
|
||||
pError = hb_errNew();
|
||||
PHB_ITEM pError = hb_errNew();
|
||||
hb_errPutGenCode( pError, errGenCode );
|
||||
hb_errPutSubCode( pError, errSubCode );
|
||||
hb_errPutOsCode( pError, errOsCode );
|
||||
@@ -120,13 +115,10 @@ static HB_ERRCODE sqlmixErrorRT( SQLMIXAREAP pArea, HB_ERRCODE errGenCode, HB_ER
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
=======================================================================
|
||||
Memory Index
|
||||
=======================================================================
|
||||
*/
|
||||
/* --- Memory Index --- */
|
||||
|
||||
/* --- Key management --- */
|
||||
|
||||
/* -------------------------- Key management ---------------------------- */
|
||||
/* hb_mixKey*() */
|
||||
|
||||
static PMIXKEY hb_mixKeyNew( PMIXTAG pTag )
|
||||
@@ -293,7 +285,8 @@ static int hb_mixKeyCompare( PMIXTAG pTag, PMIXKEY pKey1, PMIXKEY pKey2, unsigne
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------- Tag management ---------------------------- */
|
||||
/* --- Tag management --- */
|
||||
|
||||
/* hb_mixTag*() */
|
||||
|
||||
/* This function is used for debugging purposes. Uncomment it, if you need it. */
|
||||
@@ -771,7 +764,7 @@ static PMIXTAG hb_mixTagCreate( const char * szTagName, PHB_ITEM pKeyExpr, PHB_I
|
||||
pTag->szKeyExpr = ( char * ) hb_xgrab( hb_itemGetCLen( pKeyExpr ) + 1 );
|
||||
hb_strncpyTrim( pTag->szKeyExpr, hb_itemGetCPtr( pKeyExpr ), hb_itemGetCLen( pKeyExpr ) );
|
||||
|
||||
/* TODO: FOR expresion */
|
||||
/* TODO: FOR expression */
|
||||
pTag->szForExpr = NULL;
|
||||
|
||||
pTag->pKeyItem = pKeyItem;
|
||||
@@ -1080,7 +1073,8 @@ static void hb_mixTagSkip( PMIXTAG pTag, HB_LONG lSkip )
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------- Misc functions ---------------------------- */
|
||||
/* --- Misc functions --- */
|
||||
|
||||
/* hb_mix*() */
|
||||
|
||||
static PMIXTAG hb_mixFindTag( SQLMIXAREAP pArea, PHB_ITEM pOrder )
|
||||
@@ -1110,20 +1104,20 @@ static PMIXTAG hb_mixFindTag( SQLMIXAREAP pArea, PHB_ITEM pOrder )
|
||||
}
|
||||
|
||||
|
||||
/*=======================================================================*/
|
||||
/* --- */
|
||||
|
||||
|
||||
static HB_ULONG hb_mixTagNodeKeyCount( PMIXNODE pNode )
|
||||
{
|
||||
HB_ULONG ulKeyCount;
|
||||
unsigned int ui;
|
||||
HB_ULONG ulKeyCount = pNode->KeyCount;
|
||||
|
||||
ulKeyCount = pNode->KeyCount;
|
||||
if( ! pNode->Leaf )
|
||||
{
|
||||
unsigned int ui;
|
||||
for( ui = 0; ui <= pNode->KeyCount; ui++ )
|
||||
ulKeyCount += hb_mixTagNodeKeyCount( pNode->Child[ ui ] );
|
||||
}
|
||||
|
||||
return ulKeyCount;
|
||||
}
|
||||
|
||||
@@ -1216,11 +1210,7 @@ static HB_ULONG hb_mixDBOIKeyNo( PMIXTAG pTag, HB_BOOL fFilter )
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
=======================================================================
|
||||
SQLMIX RDD METHODS
|
||||
=======================================================================
|
||||
*/
|
||||
/* --- SQLMIX RDD METHODS --- */
|
||||
|
||||
static HB_ERRCODE sqlmixGoBottom( SQLMIXAREAP pArea )
|
||||
{
|
||||
@@ -1809,7 +1799,7 @@ static HB_ERRCODE sqlmixOrderInfo( SQLMIXAREAP pArea, HB_USHORT uiIndex, LPDBORD
|
||||
break;
|
||||
|
||||
case DBOI_NUMBER:
|
||||
pOrderInfo->itmResult = hb_itemPutNI( pOrderInfo->itmResult, uiTag ); /* kitaip */
|
||||
pOrderInfo->itmResult = hb_itemPutNI( pOrderInfo->itmResult, uiTag ); /* otherwise */
|
||||
break;
|
||||
|
||||
case DBOI_ISCOND:
|
||||
|
||||
Reference in New Issue
Block a user