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:
@@ -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
|
||||
|
||||
@@ -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__ )
|
||||
|
||||
|
||||
Reference in New Issue
Block a user