From 7347a4226095d94ab76ad29165c28ff4b8a7f35b Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Tue, 27 Nov 2007 10:56:53 +0000 Subject: [PATCH] 2007-11-27 11:56 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/common/hbwince.c * added MulDiv() implementation for MinGW32-CE builds --- harbour/ChangeLog | 4 ++++ harbour/source/common/hbwince.c | 13 +++++++++++++ 2 files changed, 17 insertions(+) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c673404f38..0308c03445 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,10 @@ 2002-12-01 13:30 UTC+0100 Foo Bar */ +2007-11-27 11:56 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/source/common/hbwince.c + * added MulDiv() implementation for MinGW32-CE builds + 2007-11-27 11:31 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/compiler/hbmain.c * make all hb_compI18n*() functions which do not need external access diff --git a/harbour/source/common/hbwince.c b/harbour/source/common/hbwince.c index d7548978d9..a89876e6c1 100644 --- a/harbour/source/common/hbwince.c +++ b/harbour/source/common/hbwince.c @@ -672,6 +672,19 @@ HLOCAL WINAPI LocalHandle( LPCVOID p ) } #endif /* !_MSC_VER || __POCC__ || __XCC__ */ +#if defined(__MINGW32CE__) +int WINAPI MulDiv( int nNumber, int nNumerator, int nDenominator ) +{ + if( nDenominator ) + { + HB_LONG llResult = ( HB_LONG ) nNumber * nNumerator / nDenominator; + if( HB_LIM_INT32( llResult ) ) + return ( int ) llResult; + } + return -1; +} +#endif /* __MINGW32CE__ */ + BOOL WINAPI Arc( HDC h, int p1, int p2, int p3, int p4, int p5, int p6, int p7, int p8 ) { HB_SYMBOL_UNUSED( h );