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:
Viktor Szakats
2017-09-08 16:25:13 +00:00
parent d55bdd18b7
commit 5a2a287752
916 changed files with 10432 additions and 13266 deletions

View File

@@ -189,7 +189,7 @@ static void hb_gt_std_Init( PHB_GT pGT, HB_FHANDLE hFilenoStdin, HB_FHANDLE hFil
{
PHB_GTSTD pGTSTD;
HB_TRACE( HB_TR_DEBUG, ( "hb_gt_std_Init(%p,%p,%p,%p)", pGT, ( void * ) ( HB_PTRUINT ) hFilenoStdin, ( void * ) ( HB_PTRUINT ) hFilenoStdout, ( void * ) ( HB_PTRUINT ) hFilenoStderr ) );
HB_TRACE( HB_TR_DEBUG, ( "hb_gt_std_Init(%p,%p,%p,%p)", ( void * ) pGT, ( void * ) ( HB_PTRUINT ) hFilenoStdin, ( void * ) ( HB_PTRUINT ) hFilenoStdout, ( void * ) ( HB_PTRUINT ) hFilenoStderr ) );
HB_GTLOCAL( pGT ) = pGTSTD = ( PHB_GTSTD ) hb_xgrabz( sizeof( HB_GTSTD ) );
@@ -242,7 +242,7 @@ static void hb_gt_std_Init( PHB_GT pGT, HB_FHANDLE hFilenoStdin, HB_FHANDLE hFil
pGTSTD->curr_TIO.c_cc[ VMIN ] = 0;
#else
/* workaround for bug in some Linux kernels (i.e. 3.13.0-64-generic
Ubuntu) in which select() unconditionally accepts stdin for
*buntu) in which select() unconditionally accepts stdin for
reading if c_cc[ VMIN ] = 0 [druzus] */
pGTSTD->curr_TIO.c_cc[ VMIN ] = 1;
#endif
@@ -283,7 +283,7 @@ static void hb_gt_std_Exit( PHB_GT pGT )
PHB_GTSTD pGTSTD;
int iRow, iCol;
HB_TRACE( HB_TR_DEBUG, ( "hb_gt_std_Exit(%p)", pGT ) );
HB_TRACE( HB_TR_DEBUG, ( "hb_gt_std_Exit(%p)", ( void * ) pGT ) );
HB_GTSELF_REFRESH( pGT );
HB_GTSELF_GETPOS( pGT, &iRow, &iCol );
@@ -323,7 +323,7 @@ static int hb_gt_std_ReadKey( PHB_GT pGT, int iEventMask )
PHB_GTSTD pGTSTD;
int ch = 0;
HB_TRACE( HB_TR_DEBUG, ( "hb_gt_std_ReadKey(%p,%d)", pGT, iEventMask ) );
HB_TRACE( HB_TR_DEBUG, ( "hb_gt_std_ReadKey(%p,%d)", ( void * ) pGT, iEventMask ) );
HB_SYMBOL_UNUSED( iEventMask );
@@ -438,7 +438,7 @@ static int hb_gt_std_ReadKey( PHB_GT pGT, int iEventMask )
static HB_BOOL hb_gt_std_IsColor( PHB_GT pGT )
{
HB_TRACE( HB_TR_DEBUG, ( "hb_gt_std_IsColor(%p)", pGT ) );
HB_TRACE( HB_TR_DEBUG, ( "hb_gt_std_IsColor(%p)", ( void * ) pGT ) );
HB_SYMBOL_UNUSED( pGT );
@@ -450,7 +450,7 @@ static void hb_gt_std_Tone( PHB_GT pGT, double dFrequency, double dDuration )
double dCurrentSeconds;
PHB_GTSTD pGTSTD;
HB_TRACE( HB_TR_DEBUG, ( "hb_gt_std_Tone(%p,%lf,%lf)", pGT, dFrequency, dDuration ) );
HB_TRACE( HB_TR_DEBUG, ( "hb_gt_std_Tone(%p,%lf,%lf)", ( void * ) pGT, dFrequency, dDuration ) );
pGTSTD = HB_GTSTD_GET( pGT );
@@ -475,14 +475,14 @@ static void hb_gt_std_Tone( PHB_GT pGT, double dFrequency, double dDuration )
static void hb_gt_std_Bell( PHB_GT pGT )
{
HB_TRACE( HB_TR_DEBUG, ( "hb_gt_std_Bell(%p)", pGT ) );
HB_TRACE( HB_TR_DEBUG, ( "hb_gt_std_Bell(%p)", ( void * ) pGT ) );
hb_gt_std_termOut( HB_GTSTD_GET( pGT ), s_szBell, 1 );
}
static const char * hb_gt_std_Version( PHB_GT pGT, int iType )
{
HB_TRACE( HB_TR_DEBUG, ( "hb_gt_std_Version(%p,%d)", pGT, iType ) );
HB_TRACE( HB_TR_DEBUG, ( "hb_gt_std_Version(%p,%d)", ( void * ) pGT, iType ) );
HB_SYMBOL_UNUSED( pGT );
@@ -494,7 +494,7 @@ static const char * hb_gt_std_Version( PHB_GT pGT, int iType )
static HB_BOOL hb_gt_std_Suspend( PHB_GT pGT )
{
HB_TRACE( HB_TR_DEBUG, ( "hb_gt_std_Suspend(%p)", pGT ) );
HB_TRACE( HB_TR_DEBUG, ( "hb_gt_std_Suspend(%p)", ( void * ) pGT ) );
#if defined( HB_HAS_TERMIOS )
{
@@ -509,7 +509,7 @@ static HB_BOOL hb_gt_std_Suspend( PHB_GT pGT )
static HB_BOOL hb_gt_std_Resume( PHB_GT pGT )
{
HB_TRACE( HB_TR_DEBUG, ( "hb_gt_std_Resume(%p)", pGT ) );
HB_TRACE( HB_TR_DEBUG, ( "hb_gt_std_Resume(%p)", ( void * ) pGT ) );
#if defined( HB_HAS_TERMIOS )
@@ -527,7 +527,7 @@ static void hb_gt_std_Scroll( PHB_GT pGT, int iTop, int iLeft, int iBottom, int
{
int iHeight, iWidth;
HB_TRACE( HB_TR_DEBUG, ( "hb_gt_std_Scroll(%p,%d,%d,%d,%d,%d,%d,%d,%d)", pGT, iTop, iLeft, iBottom, iRight, iColor, usChar, iRows, iCols ) );
HB_TRACE( HB_TR_DEBUG, ( "hb_gt_std_Scroll(%p,%d,%d,%d,%d,%d,%d,%d,%d)", ( void * ) pGT, iTop, iLeft, iBottom, iRight, iColor, usChar, iRows, iCols ) );
/* Provide some basic scroll support for full screen */
HB_GTSELF_GETSIZE( pGT, &iHeight, &iWidth );
@@ -598,7 +598,7 @@ static void hb_gt_std_Redraw( PHB_GT pGT, int iRow, int iCol, int iSize )
int iLineFeed, iBackSpace, iMin;
PHB_GTSTD pGTSTD;
HB_TRACE( HB_TR_DEBUG, ( "hb_gt_std_Redraw(%p,%d,%d,%d)", pGT, iRow, iCol, iSize ) );
HB_TRACE( HB_TR_DEBUG, ( "hb_gt_std_Redraw(%p,%d,%d,%d)", ( void * ) pGT, iRow, iCol, iSize ) );
iLineFeed = iBackSpace = 0;
pGTSTD = HB_GTSTD_GET( pGT );
@@ -684,7 +684,7 @@ static void hb_gt_std_Refresh( PHB_GT pGT )
int iHeight, iSize;
PHB_GTSTD pGTSTD;
HB_TRACE( HB_TR_DEBUG, ( "hb_gt_std_Refresh(%p)", pGT ) );
HB_TRACE( HB_TR_DEBUG, ( "hb_gt_std_Refresh(%p)", ( void * ) pGT ) );
pGTSTD = HB_GTSTD_GET( pGT );
HB_GTSELF_GETSIZE( pGT, &iHeight, &pGTSTD->iWidth );
@@ -699,10 +699,10 @@ static void hb_gt_std_Refresh( PHB_GT pGT )
HB_GTSUPER_REFRESH( pGT );
if( pGTSTD->fFullRedraw )
{
int i;
if( pGTSTD->iRow < iHeight - 1 )
{
int i;
for( i = pGTSTD->iRow + 1; i < iHeight; ++i )
hb_gt_std_DispLine( pGT, i, 0, -1 );
}
@@ -711,7 +711,7 @@ static void hb_gt_std_Refresh( PHB_GT pGT )
static HB_BOOL hb_gt_std_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
{
HB_TRACE( HB_TR_DEBUG, ( "hb_gt_std_Info(%p,%d,%p)", pGT, iType, pInfo ) );
HB_TRACE( HB_TR_DEBUG, ( "hb_gt_std_Info(%p,%d,%p)", ( void * ) pGT, iType, ( void * ) pInfo ) );
switch( iType )
{
@@ -730,7 +730,7 @@ static HB_BOOL hb_gt_std_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
static HB_BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable )
{
HB_TRACE( HB_TR_DEBUG, ( "hb_gt_FuncInit(%p)", pFuncTable ) );
HB_TRACE( HB_TR_DEBUG, ( "hb_gt_FuncInit(%p)", ( void * ) pFuncTable ) );
pFuncTable->Init = hb_gt_std_Init;
pFuncTable->Exit = hb_gt_std_Exit;