From 8a0a7a5d773cdbd4673103ee34e27d98bf9ac889 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 19 Nov 2009 16:06:58 +0000 Subject: [PATCH] 2009-11-19 17:06 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * src/rtl/errapi.c * contrib/hbct/ctc.c ! Fixed printf() format strings after recent HB_ERRCODE change. * contrib/hbqt/tests/demoqt.prg % Deleted hb_idleSleep( 1 ) after main window creation. Please advise if it was put there with some reason. * contrib/hbqt/hbqt_slots.cpp ! Fixed to use hb_releaseCPU() instead of hb_idleSleep( 0.2 ). I'm not sure whether this code part was active, but looked like a very bad workaround if the 0.2 sec sleep was really needed there. --- harbour/ChangeLog | 16 +++++++++++++++- harbour/contrib/hbct/ctc.c | 4 ++-- harbour/contrib/hbqt/hbqt_slots.cpp | 2 +- harbour/contrib/hbqt/tests/demoqt.prg | 2 +- harbour/src/rtl/errapi.c | 6 +++--- 5 files changed, 22 insertions(+), 8 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 99b336f04c..56185a57e4 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,20 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-11-19 17:06 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * src/rtl/errapi.c + * contrib/hbct/ctc.c + ! Fixed printf() format strings after recent HB_ERRCODE change. + + * contrib/hbqt/tests/demoqt.prg + % Deleted hb_idleSleep( 1 ) after main window creation. + Please advise if it was put there with some reason. + + * contrib/hbqt/hbqt_slots.cpp + ! Fixed to use hb_releaseCPU() instead of hb_idleSleep( 0.2 ). + I'm not sure whether this code part was active, but looked like + a very bad workaround if the 0.2 sec sleep was really needed there. + 2009-11-19 13:34 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/src/rdd/dbfcdx/dbfcdx1.c ! minor typo in comment @@ -719,7 +733,7 @@ 2009-11-18 16:00 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * include/hbapi.h - * Changed HB_ERRCODE to be 'insigned int' (was USHORT). + * Changed HB_ERRCODE to be 'unsigned int' (was USHORT). ; You'll need to rebuild all sources. * utils/hbmk2/hbmk2.prg diff --git a/harbour/contrib/hbct/ctc.c b/harbour/contrib/hbct/ctc.c index 8d6f34a0df..8d02983afe 100644 --- a/harbour/contrib/hbct/ctc.c +++ b/harbour/contrib/hbct/ctc.c @@ -69,7 +69,7 @@ USHORT ct_error( USHORT uiSeverity, HB_ERRCODE ulGenCode, HB_ERRCODE ulSubCode, va_list va; ULONG ulArgPos; - HB_TRACE( HB_TR_DEBUG, ( "ct_error(%hu, %lu, %lu, %s, %s, %hu, %hu, %lu)", + HB_TRACE( HB_TR_DEBUG, ( "ct_error(%hu, %d, %d, %s, %s, %d, %hu, %lu)", uiSeverity, ulGenCode, ulSubCode, szDescription, szOperation, uiOsCode, uiFlags, ulArgCount ) ); pError = hb_errRT_New( uiSeverity, CT_SUBSYSTEM, ulGenCode, ulSubCode, szDescription, szOperation, uiOsCode, uiFlags ); @@ -136,7 +136,7 @@ PHB_ITEM ct_error_subst( USHORT uiSeverity, HB_ERRCODE ulGenCode, HB_ERRCODE ulS va_list va; ULONG ulArgPos; - HB_TRACE( HB_TR_DEBUG, ( "ct_error_subst(%hu, %lu, %lu, %s, %s, %hu, %hu, %lu)", + HB_TRACE( HB_TR_DEBUG, ( "ct_error_subst(%hu, %d, %d, %s, %s, %d, %hu, %lu)", uiSeverity, ulGenCode, ulSubCode, szDescription, szOperation, uiOsCode, uiFlags, ulArgCount ) ); pError = hb_errRT_New_Subst( uiSeverity, CT_SUBSYSTEM, ulGenCode, ulSubCode, szDescription, szOperation, uiOsCode, uiFlags ); diff --git a/harbour/contrib/hbqt/hbqt_slots.cpp b/harbour/contrib/hbqt/hbqt_slots.cpp index 95b90a25d7..ef5e69a735 100644 --- a/harbour/contrib/hbqt/hbqt_slots.cpp +++ b/harbour/contrib/hbqt/hbqt_slots.cpp @@ -2543,7 +2543,7 @@ void MyMainWindow::paintEvent( QPaintEvent * event ) * interface in Harbour. So sad... */ #if defined( QT_EXECUTE_IN_THREADS ) - hb_idleSleep( 0.2 ); + hb_releaseCPU(); #endif hb_threadMutexUnlock( s_mutex ); diff --git a/harbour/contrib/hbqt/tests/demoqt.prg b/harbour/contrib/hbqt/tests/demoqt.prg index bf8cb80fd0..a89849b603 100644 --- a/harbour/contrib/hbqt/tests/demoqt.prg +++ b/harbour/contrib/hbqt/tests/demoqt.prg @@ -133,7 +133,7 @@ HBQT_DEBUG( "-----------------b-----------------" ) FOR i := 1 TO 1 oWnd := QMainWindow():new() - hb_idleSleep( 1 ) + // hb_idleSleep( 1 ) NEXT oWnd:show() diff --git a/harbour/src/rtl/errapi.c b/harbour/src/rtl/errapi.c index da85558b53..063b70b29c 100644 --- a/harbour/src/rtl/errapi.c +++ b/harbour/src/rtl/errapi.c @@ -777,7 +777,7 @@ HB_ERRCODE hb_errGetGenCode( PHB_ITEM pError ) PHB_ITEM hb_errPutGenCode( PHB_ITEM pError, HB_ERRCODE uiGenCode ) { - HB_TRACE(HB_TR_DEBUG, ("hb_errPutGenCode(%p, %hu)", pError, uiGenCode)); + HB_TRACE(HB_TR_DEBUG, ("hb_errPutGenCode(%p, %d)", pError, uiGenCode)); hb_arraySetNI( pError, HB_TERROR_GENCODE, uiGenCode ); @@ -816,7 +816,7 @@ HB_ERRCODE hb_errGetOsCode( PHB_ITEM pError ) PHB_ITEM hb_errPutOsCode( PHB_ITEM pError, HB_ERRCODE uiOsCode ) { - HB_TRACE(HB_TR_DEBUG, ("hb_errPutOsCode(%p, %hu)", pError, uiOsCode)); + HB_TRACE(HB_TR_DEBUG, ("hb_errPutOsCode(%p, %d)", pError, uiOsCode)); hb_arraySetNI( pError, HB_TERROR_OSCODE, uiOsCode ); @@ -848,7 +848,7 @@ HB_ERRCODE hb_errGetSubCode( PHB_ITEM pError ) PHB_ITEM hb_errPutSubCode( PHB_ITEM pError, HB_ERRCODE uiSubCode ) { - HB_TRACE(HB_TR_DEBUG, ("hb_errPutSubCode(%p, %hu)", pError, uiSubCode)); + HB_TRACE(HB_TR_DEBUG, ("hb_errPutSubCode(%p, %d)", pError, uiSubCode)); hb_arraySetNI( pError, HB_TERROR_SUBCODE, uiSubCode );