From bd6e69b714ccd5c1adfb010ab98e80adeb7f736e Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 4 Jun 2008 13:53:05 +0000 Subject: [PATCH] 2008-06-04 15:48 UTC+0100 Viktor Szakats (harbour.01 syenar hu) * source/rtl/hbbit.c + Added important NOTE about hb_bit*() functions' relation to the compiler optimization engine. * source/vm/fm.c * source/vm/extrap.c * Log filenames converted to static variables. With the intent that they'll be converted to Set()s or similar user settable values in the future, since it's useful and more elegant to redirect these to the app's normal logfile. * contrib/hbsqlit3/hbsqlit3.c * Minor formatting. --- harbour/ChangeLog | 16 ++++++++++++++++ harbour/contrib/hbsqlit3/hbsqlit3.c | 10 +++++----- harbour/source/rtl/hbbit.c | 7 +++++++ harbour/source/vm/extrap.c | 4 +++- harbour/source/vm/fm.c | 4 +++- 5 files changed, 34 insertions(+), 7 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 78d5d651ec..7934822679 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,22 @@ 2008-12-31 13:59 UTC+0100 Foo Bar */ +2008-06-04 15:48 UTC+0100 Viktor Szakats (harbour.01 syenar hu) + * source/rtl/hbbit.c + + Added important NOTE about hb_bit*() functions' + relation to the compiler optimization engine. + + * source/vm/fm.c + * source/vm/extrap.c + * Log filenames converted to static variables. With the + intent that they'll be converted to Set()s or similar + user settable values in the future, since it's useful + and more elegant to redirect these to the app's normal + logfile. + + * contrib/hbsqlit3/hbsqlit3.c + * Minor formatting. + 2008-06-04 14:27 UTC+0100 Viktor Szakats (harbour.01 syenar hu) * contrib/hbsqlit2/hbsqlit2.c * Further cleanup, optimizations. diff --git a/harbour/contrib/hbsqlit3/hbsqlit3.c b/harbour/contrib/hbsqlit3/hbsqlit3.c index 1695c409d0..fe62feffcb 100644 --- a/harbour/contrib/hbsqlit3/hbsqlit3.c +++ b/harbour/contrib/hbsqlit3/hbsqlit3.c @@ -1096,13 +1096,13 @@ HB_FUNC( SQLITE3_ENABLE_SHARED_CACHE ) } /* - Tracing And Profiling Functions + Tracing And Profiling Functions - sqlite3_trace( db, lOnOff ) - sqlite3_profile( db, lOnOff ) + sqlite3_trace( db, lOnOff ) + sqlite3_profile( db, lOnOff ) */ -static void SQL3ProfileLog( void *sFile, const char *sProfileMsg, sqlite3_uint64 int64 ) +static void SQL3ProfileLog( void * sFile, const char * sProfileMsg, sqlite3_uint64 int64 ) { if( sProfileMsg ) { @@ -1116,7 +1116,7 @@ static void SQL3ProfileLog( void *sFile, const char *sProfileMsg, sqlite3_uint64 } } -static void SQL3TraceLog( void *sFile, const char *sTraceMsg ) +static void SQL3TraceLog( void * sFile, const char * sTraceMsg ) { if( sTraceMsg ) { diff --git a/harbour/source/rtl/hbbit.c b/harbour/source/rtl/hbbit.c index 4c22943e75..de1e276203 100644 --- a/harbour/source/rtl/hbbit.c +++ b/harbour/source/rtl/hbbit.c @@ -53,6 +53,13 @@ #include "hbapi.h" #include "hbapierr.h" +/* NOTE: IMPORTANT: + hb_bit*() Harbour level function names and logic are embedded + in the compiler optimization engine, so in any case these + function have to be changed, updated or extended, don't forget + to update the references in the compiler as well. + [vszakats] */ + static BOOL hb_numParam( int iParam, HB_LONG * plNum ) { if( ISNUM( iParam ) ) diff --git a/harbour/source/vm/extrap.c b/harbour/source/vm/extrap.c index a6a273c271..8d1e564428 100644 --- a/harbour/source/vm/extrap.c +++ b/harbour/source/vm/extrap.c @@ -60,6 +60,8 @@ #if defined(HB_OS_WIN_32) && !defined(HB_WINCE) +static char * s_pszLogFileName = "hb_ex.log"; + LONG WINAPI hb_win32ExceptionHandler( struct _EXCEPTION_POINTERS * ExceptionInfo ) { char msg[ ( HB_SYMBOL_NAME_LEN + HB_SYMBOL_NAME_LEN + 32 ) * 32 ]; @@ -68,7 +70,7 @@ LONG WINAPI hb_win32ExceptionHandler( struct _EXCEPTION_POINTERS * ExceptionInfo USHORT uiLine; int iLevel; - FILE * hLog = hb_fopen( "hb_ex.log", "a+" ); + FILE * hLog = hb_fopen( s_pszLogFileName, "a+" ); if( hLog ) { diff --git a/harbour/source/vm/fm.c b/harbour/source/vm/fm.c index 95980108d2..1d4cedc103 100644 --- a/harbour/source/vm/fm.c +++ b/harbour/source/vm/fm.c @@ -155,6 +155,8 @@ static LONG s_lMemoryConsumed = 0; /* memory max size consumed */ static PHB_MEMINFO s_pFirstBlock = NULL; static PHB_MEMINFO s_pLastBlock = NULL; +static char * s_pszLogFileName = "hb_fm.log"; + #else /* ! HB_FM_STATISTICS */ typedef void * PHB_MEMINFO; @@ -583,7 +585,7 @@ HB_EXPORT void hb_xexit( void ) /* Deinitialize fixed memory subsystem */ FILE * hLog = NULL; if( s_lMemoryBlocks ) - hLog = hb_fopen( "hb_fm.log", "a+" ); + hLog = hb_fopen( s_pszLogFileName, "a+" ); hb_conOutErr( hb_conNewLine(), 0 ); hb_conOutErr( "----------------------------------------", 0 );