2009-11-23 14:05 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

* harbour/src/rtl/filesys.c
    % eliminated memory allocation from hb_fsCurDirBuff() if non UNICODE
      WIN32 API is used
This commit is contained in:
Przemyslaw Czerpak
2009-11-23 13:06:05 +00:00
parent 044107d4a2
commit bee89c95db
2 changed files with 13 additions and 1 deletions

View File

@@ -17,6 +17,11 @@
past entries belonging to author(s): Viktor Szakats.
*/
2009-11-23 14:05 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/rtl/filesys.c
% eliminated memory allocation from hb_fsCurDirBuff() if non UNICODE
WIN32 API is used
2009-11-23 13:15 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* config/beos/gcc.mk
* config/bsd/gcc.mk

View File

@@ -2731,13 +2731,20 @@ HB_ERRCODE hb_fsCurDirBuff( USHORT uiDrive, char * pszBuffer, ULONG ulSize )
#if defined( HB_OS_WIN )
{
#if defined( UNICODE )
LPTSTR lpBuffer = ( LPTSTR ) hb_xgrab( ulSize * sizeof( TCHAR ) );
hb_vmUnlock();
fResult = GetCurrentDirectory( ulSize, lpBuffer );
hb_fsSetIOError( fResult, 0 );
hb_vmLock();
HB_TCHAR_GETFROM( pszBuffer, lpBuffer, ulSize );
hb_wctombget( pszBuffer, lpBuffer, ulSize );
hb_xfree( lpBuffer );
#else
hb_vmUnlock();
fResult = GetCurrentDirectory( ulSize, pszBuffer );
hb_fsSetIOError( fResult, 0 );
hb_vmLock();
#endif
}
#elif defined( HB_OS_OS2 ) && defined( __GNUC__ )