20000501-18:05 GMT+1 Victor Szakats <info@szelvesz.hu>

This commit is contained in:
Viktor Szakats
2000-05-01 16:02:51 +00:00
parent d2a2b542ea
commit 69df442a66
3 changed files with 27 additions and 9 deletions

View File

@@ -1,3 +1,11 @@
20000501-18:05 GMT+1 Victor Szakats <info@szelvesz.hu>
* source/rtl/filesys.c
! Fixed hb_fsCurDirBuff() (and CURDIR()) for non-MINGW32 platforms.
* include/hbapi.h
+ Added missing declaration from the previous CVS.
20000501-17:42 GMT+1 Victor Szakats <info@szelvesz.hu>
* source/vm/cmdarg.c

View File

@@ -509,6 +509,7 @@ extern char * hb_macroGetType( HB_ITEM_PTR );
extern char * hb_verPlatform( void );
extern char * hb_verCompiler( void );
extern char * hb_verHarbour( void );
extern void hb_verBuildInfo( void );
#if defined(HB_EXTERN_C)
}

View File

@@ -1140,15 +1140,21 @@ USHORT hb_fsCurDirBuff( USHORT uiDrive, BYTE * pbyBuffer, ULONG ulLen )
#elif defined(__MINGW32__)
errno = 0;
_getdcwd( uiDrive, pbyBuffer, ulLen );
s_uiErrorLast = errno;
#else
s_uiErrorLast = FS_ERROR;
#endif
/* Strip the leading drive spec, and leading backslash if there's one. */
{
BYTE * pbyStart = pbyBuffer;
errno = 0;
_getdcwd( uiDrive, pbyBuffer, ulLen );
s_uiErrorLast = errno;
/* Strip the leading drive spec, and leading underscore. */
/* NOTE: A trailing underscore is not returned on this platform,
so we don't need to strip it. [vszakats] */
@@ -1161,11 +1167,14 @@ USHORT hb_fsCurDirBuff( USHORT uiDrive, BYTE * pbyBuffer, ULONG ulLen )
memmove( pbyBuffer, pbyStart, ulLen );
}
#else
/* Strip the trailing (back)slash if there's one */
s_uiErrorLast = FS_ERROR;
{
ULONG ulLen = strlen( pbyBuffer );
#endif
if( strchr( OS_PATH_DELIMITER_LIST, pbyBuffer[ ulLen - 1 ] ) )
pbyBuffer[ ulLen - 1 ] = '\0';
}
return s_uiErrorLast;
}