2010-01-24 11:44 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)

* src/vm/estack.c
    ! Replaced printf() calls with hb_snprintf() and hb_conOutErr()
      calls. This will avoid reported problems where MinGW binary
      build refers to internal printf function. As a rule we should
      never use printf() in Harbour code. There are still a few
      commented ones in hbrtl.
      [TOMERGE 2.0]

  * src/vm/hvm.c
    ! Replaced printf() (commented) call with HB_TRACE().
      [TOMERGE 2.0]

  * utils/hbmk2/hbmk2.prg
    ! Fixed -build option not being recognized.
    ! Fixed -build option not being ignored in second option
      parsing loop.
    ! Fixed -lang= option not being ignored in second option
      parsing loop.
      [TOMERGE 2.0]

  * utils/hbmk2/hbmk2.pt_BR.po
  * utils/hbmk2/hbmk2.hu_HU.po
  * utils/hbmk2/hbmk2.prg
    + Extended help text for -head option.

  * contrib/hbwin/win_prn1.c
    % WIN_LOADBITMAPFILE() optimized to use hb_retclen_buffer().
    ! WIN_LOADBITMAPFILE() fixed to return empty string instead
      of NIL in case of file read failure.

  * examples/rddado/adordd.ch
    + Added new 'adCmd*' constants. From xhb.
      (2010-01-20 20:53 UTC+0100 Miguel Angel Marchuet)
    * Formatting.
This commit is contained in:
Viktor Szakats
2010-01-24 11:02:50 +00:00
parent dee1085796
commit 7022c7e00a
8 changed files with 110 additions and 61 deletions

View File

@@ -1105,90 +1105,94 @@ void hb_stackBaseProcInfo( char * szProcName, USHORT * puiProcLine )
/* NOTE: DEBUG function */
void hb_stackDispLocal( void )
{
char buffer[ 1024 ];
HB_STACK_TLS_PRELOAD
PHB_ITEM * pBase;
HB_TRACE(HB_TR_DEBUG, ("hb_stackDispLocal()"));
printf( "%s", hb_conNewLine() );
printf( HB_I_("Virtual Machine Stack Dump at %s(%i):"),
hb_conOutErr( hb_conNewLine(), 0 );
hb_snprintf( buffer, sizeof( buffer ), HB_I_("Virtual Machine Stack Dump at %s(%i):"),
( *hb_stack.pBase )->item.asSymbol.value->szName,
( *hb_stack.pBase )->item.asSymbol.stackstate->uiLineNo );
printf( "%s", hb_conNewLine() );
printf( "--------------------------" );
hb_conOutErr( buffer, 0 );
hb_conOutErr( hb_conNewLine(), 0 );
hb_conOutErr( "--------------------------", 0 );
for( pBase = hb_stack.pBase; pBase <= hb_stack.pPos; pBase++ )
{
printf( "%s", hb_conNewLine() );
hb_conOutErr( hb_conNewLine(), 0 );
switch( hb_itemType( *pBase ) )
{
case HB_IT_NIL:
printf( HB_I_("NIL ") );
hb_snprintf( buffer, sizeof( buffer ), HB_I_("NIL ") );
break;
case HB_IT_ARRAY:
if( hb_arrayIsObject( *pBase ) )
printf( HB_I_("OBJECT = %s "), hb_objGetClsName( *pBase ) );
hb_snprintf( buffer, sizeof( buffer ), HB_I_("OBJECT = %s "), hb_objGetClsName( *pBase ) );
else
printf( HB_I_("ARRAY ") );
hb_snprintf( buffer, sizeof( buffer ), HB_I_("ARRAY ") );
break;
case HB_IT_BLOCK:
printf( HB_I_("BLOCK ") );
hb_snprintf( buffer, sizeof( buffer ), HB_I_("BLOCK ") );
break;
case HB_IT_DATE:
{
char szDate[ 9 ];
printf( HB_I_("DATE = \"%s\" "), hb_itemGetDS( *pBase, szDate ) );
hb_snprintf( buffer, sizeof( buffer ), HB_I_("DATE = \"%s\" "), hb_itemGetDS( *pBase, szDate ) );
}
break;
case HB_IT_TIMESTAMP:
{
char szDateTime[ 24 ];
printf( HB_I_("TIMESTAMP = \"%s\" "),
hb_snprintf( buffer, sizeof( buffer ), HB_I_("TIMESTAMP = \"%s\" "),
hb_timeStampStr( szDateTime, ( *pBase )->item.asDateTime.julian,
( *pBase )->item.asDateTime.time ) );
}
break;
case HB_IT_DOUBLE:
printf( HB_I_("DOUBLE = %f "), hb_itemGetND( *pBase ) );
hb_snprintf( buffer, sizeof( buffer ), HB_I_("DOUBLE = %f "), hb_itemGetND( *pBase ) );
break;
case HB_IT_LOGICAL:
printf( HB_I_("LOGICAL = %s "), hb_itemGetL( *pBase ) ? ".T." : ".F." );
hb_snprintf( buffer, sizeof( buffer ), HB_I_("LOGICAL = %s "), hb_itemGetL( *pBase ) ? ".T." : ".F." );
break;
case HB_IT_LONG:
{
char szBuf[ 24 ];
printf( HB_I_("LONG = %s ") , hb_numToStr( szBuf, sizeof( szBuf ), hb_itemGetNInt( *pBase ) ) );
hb_snprintf( buffer, sizeof( buffer ), HB_I_("LONG = %s ") , hb_numToStr( szBuf, sizeof( szBuf ), hb_itemGetNInt( *pBase ) ) );
break;
}
case HB_IT_INTEGER:
printf( HB_I_("INTEGER = %i "), hb_itemGetNI( *pBase ) );
hb_snprintf( buffer, sizeof( buffer ), HB_I_("INTEGER = %i "), hb_itemGetNI( *pBase ) );
break;
case HB_IT_STRING:
printf( HB_I_("STRING = \"%s\" "), hb_itemGetCPtr( *pBase ) );
hb_snprintf( buffer, sizeof( buffer ), HB_I_("STRING = \"%s\" "), hb_itemGetCPtr( *pBase ) );
break;
case HB_IT_SYMBOL:
printf( HB_I_("SYMBOL = %s "), ( *pBase )->item.asSymbol.value->szName );
hb_snprintf( buffer, sizeof( buffer ), HB_I_("SYMBOL = %s "), ( *pBase )->item.asSymbol.value->szName );
break;
case HB_IT_POINTER:
printf( HB_I_("POINTER = %p "), ( *pBase )->item.asPointer.value );
hb_snprintf( buffer, sizeof( buffer ), HB_I_("POINTER = %p "), ( *pBase )->item.asPointer.value );
break;
default:
printf( HB_I_("UNKNOWN = TYPE %i "), hb_itemType( *pBase ) );
hb_snprintf( buffer, sizeof( buffer ), HB_I_("UNKNOWN = TYPE %i "), hb_itemType( *pBase ) );
break;
}
hb_conOutErr( buffer, 0 );
}
}

View File

@@ -7755,7 +7755,7 @@ PHB_SYMBOLS hb_vmRegisterSymbols( PHB_SYMB pModuleSymbols, USHORT uiSymbols,
#if 0
if( fPublic && ( hSymScope & ( HB_FS_INITEXIT | HB_FS_STATIC ) ) != 0 )
{
printf("Registring: %s:%s scope %04x\r\n", szModuleName, pSymbol->szName, hSymScope ); fflush(stdout);
HB_TRACE(HB_TR_DEBUG, ("Registering: %s:%s scope %04x", szModuleName, pSymbol->szName, hSymScope));
}
#endif