2012-11-21 12:34 UTC+0100 Viktor Szakats (harbour syenar.net)

* ChangeLog
    * made decision how to clean empty loop code
      (it's bar ';' char, indented in next line)

  * include/hbtrace.h
    * inactive HB_TRACE() macro will now translate to
      empty {} block, so there is no need to manually
      do that when used alone in an 'else' branch for example.
      Checkme.

  * contrib/hbwin/win_svc.c
    % deleted {} braces from around HB_TRACE() calls

  * utils/hbmk2/hbmk2.prg
    ! fixed hb_processOpen() results to be displayed at
      once to avoid cutting potential UTF-8 (or other multibyte)
      output from tools to be cut in the middle of character.

  * contrib/hbct/charone.c
  * contrib/hbct/charop.c
  * contrib/hbct/token1.c
  * contrib/hbct/token2.c
    * deleted {} ending comments

  * contrib/hbmysql/tmysql.prg
  * contrib/hbmysql/tsqlbrw.prg
    * deleted change tracking comments. 'blame' functionality
      and repo history should be enough
This commit is contained in:
Viktor Szakats
2012-11-21 11:41:03 +00:00
parent 8c2f741334
commit 033d73d53c
10 changed files with 85 additions and 102 deletions

View File

@@ -10,6 +10,36 @@
* Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment
*/
2012-11-21 12:34 UTC+0100 Viktor Szakats (harbour syenar.net)
* ChangeLog
* made decision how to clean empty loop code
(it's bar ';' char, indented in next line)
* include/hbtrace.h
* inactive HB_TRACE() macro will now translate to
empty {} block, so there is no need to manually
do that when used alone in an 'else' branch for example.
Checkme.
* contrib/hbwin/win_svc.c
% deleted {} braces from around HB_TRACE() calls
* utils/hbmk2/hbmk2.prg
! fixed hb_processOpen() results to be displayed at
once to avoid cutting potential UTF-8 (or other multibyte)
output from tools to be cut in the middle of character.
* contrib/hbct/charone.c
* contrib/hbct/charop.c
* contrib/hbct/token1.c
* contrib/hbct/token2.c
* deleted {} ending comments
* contrib/hbmysql/tmysql.prg
* contrib/hbmysql/tsqlbrw.prg
* deleted change tracking comments. 'blame' functionality
and repo history should be enough
2012-11-21 03:35 UTC+0100 Viktor Szakats (harbour syenar.net)
* contrib/hbtip/mail.prg
! fixed regression in r18462 where casing of class name
@@ -3635,6 +3665,11 @@
; TODO: Use one common syntax for empty blocks.
Harbour currently uses these:
{}, { ; }, {;}, {};, ;
DECISION: -> ';' indented in new line:
---
for( ... )
;
---
2012-11-01 17:41 UTC+0100 Viktor Szakats (harbour syenar.net)
* ChangeLog

View File

@@ -182,7 +182,7 @@ static void do_charone( int iSwitch )
hb_retclen( pcString, sStrLen );
}
break;
} /* switch( iSwitch ) */
}
}
else /* if( HB_ISCHAR( 1 ) ) */
{

View File

@@ -292,7 +292,7 @@ void ct_charop( int iMode )
hb_xmemcpy( pucResult, pucString, sStrLen );
}
break;
} /* endswitch( iMode ) */
}
if( HB_ISBYREF( 1 ) )
hb_storclen( ( char * ) pucResult, sStrLen, 1 );

View File

@@ -297,7 +297,7 @@ static void do_token1( int iSwitch )
else if( pc + 1 == pcString + sStrLen )
break;
}
} /* while( nToken < nTokenCounter ) */
}
switch( iSwitch )
{

View File

@@ -339,7 +339,7 @@ HB_FUNC( TOKENINIT )
if( pc == NULL )
break;
} /* for( ;; ) */
}
/* save token environment to 4th parameter OR to the static */
if( HB_ISBYREF( 4 ) )

View File

@@ -93,7 +93,6 @@ METHOD New( aRow, aFStruct, cTableName ) CLASS TMySQLRow
hb_default( @aFStruct, {} )
::aRow := aRow
// DAVID:
::aOriValue := AClone( aRow ) // Original values ( same as TMySQLtable:aOldValue )
::aFieldStruct := aFStruct
@@ -292,8 +291,8 @@ CREATE CLASS TMySQLQuery
METHOD Skip( nRows ) // Same as clipper ones
METHOD Bof() INLINE ::lBof // DAVID: ::nCurRow == 1
METHOD Eof() INLINE ::lEof // DAVID: ::nCurRow == ::nNumRows
METHOD Bof() INLINE ::lBof
METHOD Eof() INLINE ::lEof
METHOD RecNo() INLINE ::nCurRow
METHOD LastRec() INLINE ::nNumRows
METHOD GoTop() INLINE ::GetRow( 1 )
@@ -329,7 +328,6 @@ METHOD New( nSocket, cQuery ) CLASS TMySQLQuery
::nResultHandle := NIL
::nNumFields := 0
::nNumRows := 0
// DAVID:
::lBof := .T.
::lEof := .T.
@@ -343,14 +341,12 @@ METHOD New( nSocket, cQuery ) CLASS TMySQLQuery
::nNumRows := mysql_num_rows( ::nResultHandle )
::nNumFields := mysql_num_fields( ::nResultHandle )
// DAVID:
::aRow := Array( ::nNumFields )
FOR nI := 1 TO ::nNumFields
aField := mysql_fetch_field( ::nResultHandle )
AAdd( ::aFieldStruct, aField )
// DAVID:
IF ::lFieldAsData
__objAddData( Self, ::aFieldStruct[ nI ][ MYSQL_FS_NAME ] )
ENDIF
@@ -392,11 +388,12 @@ METHOD Refresh() CLASS TMySQLQuery
::getRow( ::nCurRow )
ELSE
/* ::aFieldStruct := {}
#if 0
::aFieldStruct := {}
::nResultHandle := NIL
::nNumFields := 0
::nNumRows := 0
*/
#endif
::lError := .T.
ENDIF
@@ -406,13 +403,11 @@ METHOD Refresh() CLASS TMySQLQuery
METHOD Skip( nRows ) CLASS TMySQLQuery
// DAVID:
LOCAL lbof
// NOTE: MySQL row count starts from 0
hb_default( @nRows, 1 )
// DAVID:
::lBof := Empty( ::LastRec() )
IF nRows == 0
@@ -420,7 +415,6 @@ METHOD Skip( nRows ) CLASS TMySQLQuery
ELSEIF nRows < 0
// Negative movement
// DAVID: ::nCurRow := Max( ::nCurRow + nRows, 1 )
IF ( ::RecNo() + nRows ) < 1
nRows := - ::RecNo() + 1
// Clipper: only SKIP movement can set Bof() to .T.
@@ -428,16 +422,14 @@ METHOD Skip( nRows ) CLASS TMySQLQuery
ENDIF
ELSE
// positive movement
// DAVID: ::nCurRow := Min( ::nCurRow + nRows, ::nNumRows )
IF ( ::RecNo() + nRows ) > ::LastRec()
nRows := ::LastRec() - ::RecNo() + 1
ENDIF
ENDIF
// DAVID:
::nCurRow := ::nCurRow + nRows
// DAVID: maintain ::bof() true until next movement
// Maintain ::bof() true until next movement
// Clipper: only SKIP movement can set Bof() to .T.
lbof := ::Bof()
@@ -448,25 +440,20 @@ METHOD Skip( nRows ) CLASS TMySQLQuery
::lBof := .T.
ENDIF
// DAVID: dbSkip() RETURN NIL RETURN ::nCurRow
RETURN NIL
// Get row n of a query and return it as a TMySQLRow object
METHOD GetRow( nRow ) CLASS TMySQLQuery
// DAVID: replaced by ::aRow LOCAL aRow := NIL
LOCAL oRow := NIL
LOCAL i
// DAVID: use current row DEFAULT nRow TO 0
IF ! HB_ISNUMERIC( nRow )
nRow := ::nCurRow
ENDIF
IF ::nResultHandle != NIL
// DAVID:
::lBof := ( Empty( ::LastRec() ) )
IF nRow < 1 .OR. nRow > ::LastRec() // Out of range
@@ -481,11 +468,8 @@ METHOD GetRow( nRow ) CLASS TMySQLQuery
// NOTE: row count starts from 0
mysql_data_seek( ::nResultHandle, nRow - 1 )
::nCurRow := nRow
// DAVID: ELSE
// DAVID: use current row ::nCurRow++
ENDIF
// DAVID:
::lEof := ( ::RecNo() > ::LastRec() )
::aRow := NIL
@@ -509,7 +493,6 @@ METHOD GetRow( nRow ) CLASS TMySQLQuery
CASE MYSQL_TYPE_LONGLONG
CASE MYSQL_TYPE_INT24
CASE MYSQL_TYPE_NEWDECIMAL
// DAVID:
IF ::aRow[ i ] == NIL
::aRow[ i ] := "0"
ENDIF
@@ -518,7 +501,6 @@ METHOD GetRow( nRow ) CLASS TMySQLQuery
CASE MYSQL_TYPE_DOUBLE
CASE MYSQL_TYPE_FLOAT
// DAVID:
IF ::aRow[ i ] == NIL
::aRow[ i ] := "0"
ENDIF
@@ -549,12 +531,10 @@ METHOD GetRow( nRow ) CLASS TMySQLQuery
OTHERWISE
// DAVID: Alert( "Unknown type from SQL Server Field: " + hb_ntos( i ) + " is type " + hb_ntos( ::aFieldStruct[ i ][ MYSQL_FS_TYPE ] ) )
// ? "Unknown type from SQL Server Field: " + hb_ntos( i ) + " is type " + hb_ntos( ::aFieldStruct[ i ][ MYSQL_FS_TYPE ] )
ENDSWITCH
// DAVID:
IF ::lFieldAsData
__objSetValueList( Self, { { ::aFieldStruct[ i ][ MYSQL_FS_NAME ], ::aRow[ i ] } } )
ENDIF
@@ -566,7 +546,6 @@ METHOD GetRow( nRow ) CLASS TMySQLQuery
ENDIF
ENDIF
// DAVID: IF ::arow == NIL; msginfo( "::arow NIL" ); ENDIF
RETURN iif( ::aRow == NIL, NIL, oRow )
@@ -597,10 +576,9 @@ METHOD FieldPos( cFieldName ) CLASS TMySQLQuery
cUpperName := Upper( cFieldName )
// DAVID: nPos := AScan( ::aFieldStruct, {| aItem | iif( Upper( aItem[ MYSQL_FS_NAME ] ) == cUpperName, .T., .F. ) } )
nPos := AScan( ::aFieldStruct, {| aItem | Upper( aItem[ MYSQL_FS_NAME ] ) == cUpperName } )
/*
#if 0
nPos := 0
DO WHILE ++nPos <= Len( ::aFieldStruct )
IF Upper( ::aFieldStruct[ nPos ][ MYSQL_FS_NAME ] ) == cUpperName
@@ -612,7 +590,7 @@ METHOD FieldPos( cFieldName ) CLASS TMySQLQuery
IF nPos > Len( ::aFieldStruct )
nPos := 0
ENDIF
*/
#endif
RETURN nPos
@@ -637,7 +615,6 @@ METHOD FieldGet( cnField ) CLASS TMySQLQuery
ENDIF
IF nNum > 0 .AND. nNum <= ::nNumfields
// DAVID: Value := __objSendMsg( Self,::aFieldStruct[ nNum ][ MYSQL_FS_NAME ] )
Value := ::aRow[ nNum ]
// Char fields are padded with spaces since a real .dbf field would be
@@ -789,23 +766,19 @@ METHOD Skip( nRow ) CLASS TMySQLTable
::aOldValue[ i ] := ::FieldGet( i )
NEXT
// DAVID: dbSkip() RETURN NIL RETURN Self
RETURN NIL
/* Creates an update query for changed fields and submits it to server */
// DAVID: lOldRecord, lRefresh added
METHOD Update( oRow, lOldRecord, lRefresh ) CLASS TMySQLTable
LOCAL cUpdateQuery := "UPDATE " + ::cTable + " SET "
LOCAL i
// DAVID:
LOCAL ni, cWhere := " WHERE "
hb_default( @lOldRecord, .F. )
// DAVID: too many ::refresh() can slow some processes, so we can deactivate it by parameter
// Too many ::refresh() can slow some processes, so we can deactivate it by parameter
hb_default( @lRefresh, .T. )
::lError := .F.
@@ -826,7 +799,6 @@ METHOD Update( oRow, lOldRecord, lRefresh ) CLASS TMySQLTable
// remove last comma
cUpdateQuery := Left( cUpdateQuery, Len( cUpdateQuery ) - 1 )
// DAVID:
IF lOldRecord
// based in matching of ALL fields of old record
// WARNING: if there are more than one record of ALL fields matching, all of those records will be changed
@@ -844,13 +816,12 @@ METHOD Update( oRow, lOldRecord, lRefresh ) CLASS TMySQLTable
ENDIF
IF mysql_query( ::nSocket, cUpdateQuery ) == 0
// DAVID: Clipper maintain same record pointer
// Clipper maintain same record pointer
// DAVID: after refresh(), position of current record is often unpredictable
// After refresh(), position of current record is often unpredictable
IF lRefresh
::refresh()
ELSE
// DAVID: just reset values (?)
FOR i := 1 TO ::nNumFields
::aOldValue[ i ] := ::FieldGet( i )
NEXT
@@ -873,7 +844,6 @@ METHOD Update( oRow, lOldRecord, lRefresh ) CLASS TMySQLTable
// remove last comma
cUpdateQuery := Left( cUpdateQuery, Len( cUpdateQuery ) - 1 )
// DAVID:
IF lOldRecord
// based in matching of ALL fields of old record
// WARNING: if there are more than one record of ALL fields matching, all of those records will be changed
@@ -896,12 +866,11 @@ METHOD Update( oRow, lOldRecord, lRefresh ) CLASS TMySQLTable
AFill( oRow:aDirty, .F. )
AFill( oRow:aOldValue, NIL )
// DAVID:
oRow:aOriValue := AClone( oRow:aRow )
// DAVID: Clipper maintain same record pointer
// Clipper maintain same record pointer
// DAVID: after refresh(), position of current record is often unpredictable
// After refresh(), position of current record is often unpredictable
IF lRefresh
::refresh()
ENDIF
@@ -915,22 +884,19 @@ METHOD Update( oRow, lOldRecord, lRefresh ) CLASS TMySQLTable
RETURN ! ::lError
// DAVID: lOldRecord, lRefresh added
METHOD Delete( oRow, lOldRecord, lRefresh ) CLASS TMySQLTable
LOCAL cDeleteQuery := "DELETE FROM " + ::cTable, i
// DAVID:
LOCAL ni, cWhere := " WHERE "
hb_default( @lOldRecord, .F. )
// DAVID: too many ::refresh() can slow some processes, so we can deactivate it by parameter
// Too many ::refresh() can slow some processes, so we can deactivate it by parameter
hb_default( @lRefresh, .T. )
// is this a row of this table ?
IF oRow == NIL
// DAVID:
IF lOldRecord
// based in matching of ALL fields of old record
// WARNING: if there are more than one record of ALL fields matching, all of those records will be changed
@@ -952,14 +918,12 @@ METHOD Delete( oRow, lOldRecord, lRefresh ) CLASS TMySQLTable
IF mysql_query( ::nSocket, cDeleteQuery ) == 0
::lError := .F.
// DAVID: Clipper maintain same record pointer
// DAVID: ::nCurRow--
// Clipper maintain same record pointer
// DAVID: after refresh(), position of current record is often unpredictable
// After refresh(), position of current record is often unpredictable
IF lRefresh
::refresh()
ELSE
// DAVID: just reset values (?)
FOR i := 1 TO ::nNumFields
::aOldValue[ i ] := ::FieldGet( i )
NEXT
@@ -972,7 +936,6 @@ METHOD Delete( oRow, lOldRecord, lRefresh ) CLASS TMySQLTable
IF oRow:cTable == ::cTable
// DAVID:
IF lOldRecord
// based in matching of ALL fields of old record
// WARNING: if there are more than one record of ALL fields matching, all of those records will be changed
@@ -995,7 +958,7 @@ METHOD Delete( oRow, lOldRecord, lRefresh ) CLASS TMySQLTable
IF mysql_query( ::nSocket, cDeleteQuery ) == 0
::lError := .F.
// DAVID: after refresh(), position of current record is often unpredictable
// After refresh(), position of current record is often unpredictable
IF lRefresh
::refresh()
ENDIF
@@ -1010,13 +973,12 @@ METHOD Delete( oRow, lOldRecord, lRefresh ) CLASS TMySQLTable
// Adds a row with values passed into oRow
// DAVID: lRefresh added
METHOD Append( oRow, lRefresh ) CLASS TMySQLTable
LOCAL cInsertQuery := "INSERT INTO " + ::cTable + " ("
LOCAL i
// DAVID: too many ::refresh() can slow some processes, so we can deactivate it by parameter
// Too many ::refresh() can slow some processes, so we can deactivate it by parameter
hb_default( @lRefresh, .T. )
IF oRow == NIL // default Current row
@@ -1042,19 +1004,19 @@ METHOD Append( oRow, lRefresh ) CLASS TMySQLTable
IF mysql_query( ::nSocket, cInsertQuery ) == 0
::lError := .F.
// DAVID: Clipper add record at end
// Clipper add record at end
::nCurRow := ::LastRec() + 1
// DAVID: after refresh(), position of current record is often unpredictable
// After refresh(), position of current record is often unpredictable
IF lRefresh
::refresh()
ELSE
// DAVID: just reset values in memory (?)
/* was same values from FieldGet( i ) !
#if 0
/* was same values from FieldGet( i ) ! */
FOR i := 1 TO ::nNumFields
::aOldValue[ i ] := ::FieldGet( i )
NEXT
*/
#endif
ENDIF
RETURN .T.
@@ -1086,21 +1048,18 @@ METHOD Append( oRow, lRefresh ) CLASS TMySQLTable
cInsertQuery := Left( cInsertQuery, Len( cInsertQuery ) - 1 ) + ")"
IF mysql_query( ::nSocket, cInsertQuery ) == 0
// DAVID:
::lError := .F.
// DAVID:
// All values are commited
AFill( oRow:aDirty, .F. )
AFill( oRow:aOldValue, NIL )
// DAVID:
oRow:aOriValue := AClone( oRow:aRow )
// DAVID: Clipper add record at end
// Clipper add record at end
::nCurRow := ::LastRec() + 1
// DAVID: after refresh(), position of current record is often unpredictable
// After refresh(), position of current record is often unpredictable
IF lRefresh
::refresh()
ENDIF
@@ -1116,13 +1075,12 @@ METHOD Append( oRow, lRefresh ) CLASS TMySQLTable
RETURN .F.
// DAVID: lSetValues added METHOD GetBlankRow() CLASS TMySQLTable
METHOD GetBlankRow( lSetValues ) CLASS TMySQLTable
LOCAL i
LOCAL aRow := Array( ::nNumFields )
// DAVID: It is not current row, so do not change it
// It is not current row, so do not change it
hb_default( @lSetValues, .F. )
// crate an array of empty fields
@@ -1160,7 +1118,6 @@ METHOD GetBlankRow( lSetValues ) CLASS TMySQLTable
ENDSWITCH
NEXT
// DAVID:
IF lSetValues // Assign values as current row values
FOR i := 1 TO ::nNumFields
::FieldPut( i, aRow[ i ] )
@@ -1183,7 +1140,6 @@ METHOD FieldPut( cnField, Value ) CLASS TMySQLTable
IF nNum > 0 .AND. nNum <= ::nNumFields
// DAVID: IF ValType( Value ) == ValType( ::FieldGet( nNum ) ) .OR. Empty( ::Fieldget( nNum ) )
IF ValType( Value ) == ValType( ::aRow[ nNum ] ) .OR. ::aRow[ nNum ] == NIL
// if it is a char field remove trailing spaces
@@ -1191,7 +1147,6 @@ METHOD FieldPut( cnField, Value ) CLASS TMySQLTable
Value := RTrim( Value )
ENDIF
// DAVID:
::aRow[ nNum ] := Value
IF ::lFieldAsData
__objSetValueList( Self, { { ::aFieldStruct[ nNum ][ MYSQL_FS_NAME ], Value } } )
@@ -1228,13 +1183,14 @@ METHOD Refresh() CLASS TMySQLTABLE
::getRow( ::nCurRow )
ELSE
/* ::aFieldStruct := {}
#if 0
::aFieldStruct := {}
::nResultHandle := NIL
::nNumFields := 0
::nNumRows := 0
::aOldValue := {}
*/
#endif
::lError := .T.
ENDIF
@@ -1406,13 +1362,13 @@ METHOD CreateTable( cTable, aStruct, cPrimaryKey, cUniqueKey, cAuto ) CLASS TMyS
EXIT
CASE "N"
/*
#if 0
IF aStruct[ i ][ DBS_DEC ] == 0
::cCreateQuery += aStruct[ i ][ DBS_NAME ] + " int(" + hb_ntos( aStruct[ i ][ DBS_LEN ] ) + ")" + Eval( cNN, aStruct[ i ] ) + iif( aStruct[ i ][ DBS_NAME ] == cPrimaryKey, " NOT NULL ", "" ) + iif( aStruct[ i ][ DBS_NAME ] == cAuto, " auto_increment ", "" ) + ","
ELSE
::cCreateQuery += aStruct[ i ][ DBS_NAME ] + " real(" + hb_ntos( aStruct[ i ][ DBS_LEN ] ) + "," + hb_ntos( aStruct[ i ][ DBS_DEC ] ) + ")" + Eval( cNN, aStruct[ i ] ) + ","
ENDIF
*/
#endif
IF aStruct[ i ][ DBS_DEC ] == 0 .AND. aStruct[ i ][ DBS_LEN ] <= 18
DO CASE
CASE aStruct[ i ][ DBS_LEN ] <= 2

View File

@@ -215,7 +215,6 @@ STATIC FUNCTION Skipper( nSkip, oQuery )
CASE nSkip > 0
DO WHILE i < nSkip // Skip Foward
// DAVID: change in TMySQLquery:eof() definition if oQuery:eof()
IF oQuery:recno() == oQuery:lastrec()
EXIT
ENDIF
@@ -227,7 +226,6 @@ STATIC FUNCTION Skipper( nSkip, oQuery )
CASE nSkip < 0
DO WHILE i > nSkip // Skip backward
// DAVID: change in TMySQLquery:bof() definition if oQuery:bof()
IF oQuery:recno() == 1
EXIT
ENDIF

View File

@@ -129,19 +129,13 @@ static VOID WINAPI hbwin_SvcMainFunction( DWORD dwArgc, LPTSTR * lpszArgv )
hb_vmRequestRestore();
}
else
{
HB_TRACE( HB_TR_DEBUG, ( "HVM stack not available" ) );
}
}
else
{
HB_TRACE( HB_TR_DEBUG, ( "Harbour service entry function not found" ) );
}
}
else
{
HB_TRACE( HB_TR_DEBUG, ( "Error registering service" ) );
}
}
#endif

View File

@@ -122,37 +122,37 @@ HB_EXTERN_BEGIN
#if HB_TR_LEVEL >= HB_TR_DEBUG
#define HB_ECHO_TRACE_HB_TR_DEBUG(x) HB_ECHO_CREATE(HB_TR_DEBUG, x)
#else
#define HB_ECHO_TRACE_HB_TR_DEBUG(x)
#define HB_ECHO_TRACE_HB_TR_DEBUG(x) {}
#endif
#if HB_TR_LEVEL >= HB_TR_INFO
#define HB_ECHO_TRACE_HB_TR_INFO(x) HB_ECHO_CREATE(HB_TR_INFO, x)
#else
#define HB_ECHO_TRACE_HB_TR_INFO(x)
#define HB_ECHO_TRACE_HB_TR_INFO(x) {}
#endif
#if HB_TR_LEVEL >= HB_TR_WARNING
#define HB_ECHO_TRACE_HB_TR_WARNING(x) HB_ECHO_CREATE(HB_TR_WARNING, x)
#else
#define HB_ECHO_TRACE_HB_TR_WARNING(x)
#define HB_ECHO_TRACE_HB_TR_WARNING(x) {}
#endif
#if HB_TR_LEVEL >= HB_TR_ERROR
#define HB_ECHO_TRACE_HB_TR_ERROR(x) HB_ECHO_CREATE(HB_TR_ERROR, x)
#else
#define HB_ECHO_TRACE_HB_TR_ERROR(x)
#define HB_ECHO_TRACE_HB_TR_ERROR(x) {}
#endif
#if HB_TR_LEVEL >= HB_TR_FATAL
#define HB_ECHO_TRACE_HB_TR_FATAL(x) HB_ECHO_CREATE(HB_TR_FATAL, x)
#else
#define HB_ECHO_TRACE_HB_TR_FATAL(x)
#define HB_ECHO_TRACE_HB_TR_FATAL(x) {}
#endif
#if 1 /* always! */
#define HB_ECHO_TRACE_HB_TR_ALWAYS(x) HB_ECHO_CREATE(HB_TR_ALWAYS, x)
#else
#define HB_ECHO_TRACE_HB_TR_ALWAYS(x)
#define HB_ECHO_TRACE_HB_TR_ALWAYS(x) {}
#endif
@@ -171,37 +171,37 @@ HB_EXTERN_BEGIN
#if HB_TR_LEVEL >= HB_TR_DEBUG
#define HB_ECHO_STEALTH_HB_TR_DEBUG(x) HB_ECHO_STEALTH(HB_TR_DEBUG, x)
#else
#define HB_ECHO_STEALTH_HB_TR_DEBUG(x)
#define HB_ECHO_STEALTH_HB_TR_DEBUG(x) {}
#endif
#if HB_TR_LEVEL >= HB_TR_INFO
#define HB_ECHO_STEALTH_HB_TR_INFO(x) HB_ECHO_STEALTH(HB_TR_INFO, x)
#else
#define HB_ECHO_STEALTH_HB_TR_INFO(x)
#define HB_ECHO_STEALTH_HB_TR_INFO(x) {}
#endif
#if HB_TR_LEVEL >= HB_TR_WARNING
#define HB_ECHO_STEALTH_HB_TR_WARNING(x) HB_ECHO_STEALTH(HB_TR_WARNING, x)
#else
#define HB_ECHO_STEALTH_HB_TR_WARNING(x)
#define HB_ECHO_STEALTH_HB_TR_WARNING(x) {}
#endif
#if HB_TR_LEVEL >= HB_TR_ERROR
#define HB_ECHO_STEALTH_HB_TR_ERROR(x) HB_ECHO_STEALTH(HB_TR_ERROR, x)
#else
#define HB_ECHO_STEALTH_HB_TR_ERROR(x)
#define HB_ECHO_STEALTH_HB_TR_ERROR(x) {}
#endif
#if HB_TR_LEVEL >= HB_TR_FATAL
#define HB_ECHO_STEALTH_HB_TR_FATAL(x) HB_ECHO_STEALTH(HB_TR_FATAL, x)
#else
#define HB_ECHO_STEALTH_HB_TR_FATAL(x)
#define HB_ECHO_STEALTH_HB_TR_FATAL(x) {}
#endif
#if 1 /* always! */
#define HB_ECHO_STEALTH_HB_TR_ALWAYS(x) HB_ECHO_STEALTH(HB_TR_ALWAYS, x)
#else
#define HB_ECHO_STEALTH_HB_TR_ALWAYS(x)
#define HB_ECHO_STEALTH_HB_TR_ALWAYS(x) {}
#endif
/* NOTE: This will print tracing info without changing current

View File

@@ -12244,7 +12244,6 @@ STATIC FUNCTION hbmk_hb_processRunCatch( cCommand, /* @ */ cStdOutErr )
LOCAL hOutErr
LOCAL cData
LOCAL cChunk
LOCAL nLen
LOCAL nErrorLevel
@@ -12255,13 +12254,14 @@ STATIC FUNCTION hbmk_hb_processRunCatch( cCommand, /* @ */ cStdOutErr )
cData := Space( 1024 )
DO WHILE ( nLen := FRead( hOutErr, @cData, hb_BLen( cData ) ) ) > 0
OutStd( cChunk := hb_BLeft( cData, nLen ) )
cStdOutErr += cChunk
cStdOutErr += hb_BLeft( cData, nLen )
ENDDO
nErrorLevel := hb_processValue( hProc )
FClose( hOutErr )
OutStd( cStdOutErr )
ELSE
nErrorLevel := -999
ENDIF