2007-08-28 14:00 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/rtl/diskspac.c
* formatting
* harbour/source/rtl/disksphb.c
! fixed typo in numeric drive parameter, now 1->A, 2->B, ..., 0->default
* extract drive letter only when second letter in path is
OS_DRIVE_DELIMITER
This commit is contained in:
@@ -8,6 +8,14 @@
|
||||
2002-12-01 13:30 UTC+0100 Foo Bar <foo.bar@foobar.org>
|
||||
*/
|
||||
|
||||
2007-08-28 14:00 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/source/rtl/diskspac.c
|
||||
* formatting
|
||||
* harbour/source/rtl/disksphb.c
|
||||
! fixed typo in numeric drive parameter, now 1->A, 2->B, ..., 0->default
|
||||
* extract drive letter only when second letter in path is
|
||||
OS_DRIVE_DELIMITER
|
||||
|
||||
2007-08-28 03:15 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/source/rtl/diskspac.c
|
||||
* harbour/source/rtl/disksphb.c
|
||||
|
||||
@@ -105,7 +105,6 @@ HB_FUNC( DISKSPACE )
|
||||
UINT uiErrMode;
|
||||
|
||||
/* Get the default drive */
|
||||
|
||||
if( uiDrive == 0 )
|
||||
uiDrive = hb_fsCurDrv() + 1;
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ HB_FUNC( HB_DISKSPACE )
|
||||
#ifdef OS_HAS_DRIVE_LETTER
|
||||
if( ISNUM( 1 ) )
|
||||
{
|
||||
szPathBuf[ 0 ] = ( char ) hb_parni( 1 );
|
||||
szPathBuf[ 0 ] = ( char ) hb_parni( 1 ) + 'A' - 1;
|
||||
szPathBuf[ 1 ] = OS_DRIVE_DELIMITER;
|
||||
szPathBuf[ 2 ] = OS_PATH_DELIMITER;
|
||||
szPathBuf[ 3 ] = '\0';
|
||||
@@ -99,7 +99,8 @@ HB_FUNC( HB_DISKSPACE )
|
||||
|
||||
#if defined(HB_OS_DOS)
|
||||
{
|
||||
USHORT uiDrive = ( szPath[ 0 ] >= 'A' && szPath[ 0 ] <= 'Z' ?
|
||||
USHORT uiDrive = szPath[ 1 ] != OS_DRIVE_DELIMITER ? 0 :
|
||||
( szPath[ 0 ] >= 'A' && szPath[ 0 ] <= 'Z' ?
|
||||
szPath[ 0 ] - 'A' + 1 :
|
||||
( szPath[ 0 ] >= 'a' && szPath[ 0 ] <= 'z' ?
|
||||
szPath[ 0 ] - 'a' + 1 : 0 ) );
|
||||
@@ -285,7 +286,8 @@ HB_FUNC( HB_DISKSPACE )
|
||||
{
|
||||
struct _FSALLOCATE fsa;
|
||||
USHORT rc;
|
||||
USHORT uiDrive = ( szPath[ 0 ] >= 'A' && szPath[ 0 ] <= 'Z' ?
|
||||
USHORT uiDrive = szPath[ 1 ] != OS_DRIVE_DELIMITER ? 0 :
|
||||
( szPath[ 0 ] >= 'A' && szPath[ 0 ] <= 'Z' ?
|
||||
szPath[ 0 ] - 'A' + 1 :
|
||||
( szPath[ 0 ] >= 'a' && szPath[ 0 ] <= 'z' ?
|
||||
szPath[ 0 ] - 'a' + 1 : 0 ) );
|
||||
|
||||
Reference in New Issue
Block a user