diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c004474d4b..f69125f21b 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,16 @@ The license applies to all entries newer than 2009-04-28. */ +2011-10-22 16:22 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/src/vm/fm.c + ! do not enable by default DLMALLOC in WinCE builds. + It was the source of problems reported by Jarek with file read/write + operation in WinCE builds. Now it should work correctly - please + make some tests with real devices - I used emulator only. + + * harbour/contrib/hbwin/wapi_wingdi_font.c + + added WAPI_ADDFONTRESOURCE() and WAPI_REMOVEFONTRESOURCE() + 2011-10-21 15:52 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbziparc/ziparc.prg ! fix to prev diff --git a/harbour/contrib/hbwin/wapi_wingdi_font.c b/harbour/contrib/hbwin/wapi_wingdi_font.c index 0849853aba..75c0d15f0b 100644 --- a/harbour/contrib/hbwin/wapi_wingdi_font.c +++ b/harbour/contrib/hbwin/wapi_wingdi_font.c @@ -52,6 +52,20 @@ #include "hbwapi.h" +HB_FUNC( WAPI_ADDFONTRESOURCE ) +{ + void * hFileName; + hb_retni( AddFontResource( HB_PARSTRDEF( 1, &hFileName, NULL ) ) ); + hb_strfree( hFileName ); +} + +HB_FUNC( WAPI_REMOVEFONTRESOURCE ) +{ + void * hFileName; + hb_retni( RemoveFontResource( HB_PARSTRDEF( 1, &hFileName, NULL ) ) ); + hb_strfree( hFileName ); +} + HB_FUNC( WAPI_ADDFONTRESOURCEEX ) { int iResult = 0; diff --git a/harbour/src/vm/fm.c b/harbour/src/vm/fm.c index aae4a3a8a6..83a58e57f7 100644 --- a/harbour/src/vm/fm.c +++ b/harbour/src/vm/fm.c @@ -109,11 +109,18 @@ # undef HB_FM_DL_ALLOC # undef HB_FM_DLMT_ALLOC # undef HB_FM_WIN_ALLOC +#elif defined( HB_FM_WIN_ALLOC ) +# undef HB_FM_DL_ALLOC #elif !defined( HB_FM_DL_ALLOC ) && !defined( HB_FM_WIN_ALLOC ) -# if defined( _MSC_VER ) || defined( __BORLANDC__ ) || defined( __MINGW32__ ) || \ - ( defined( __WATCOMC__ ) && defined( HB_OS_WIN ) ) || \ - defined( HB_OS_OS2 ) || \ - ( defined( HB_FM_DLMT_ALLOC ) && defined( HB_MT_VM ) ) +# if defined( HB_OS_WIN_CE ) + /* In WinCE builds DLMALLOC creates problems when allocated + * memory is used in file IO operations. + */ +# define HB_FM_STD_ALLOC +# elif defined( _MSC_VER ) || defined( __BORLANDC__ ) || defined( __MINGW32__ ) || \ + ( defined( __WATCOMC__ ) && defined( HB_OS_WIN ) ) || \ + defined( HB_OS_OS2 ) || \ + ( defined( HB_FM_DLMT_ALLOC ) && defined( HB_MT_VM ) ) # define HB_FM_DL_ALLOC # else /* #define HB_FM_DL_ALLOC */