Optimised - added note about retry operation

This commit is contained in:
Paul Tucker
2000-03-23 02:57:59 +00:00
parent 2ad211f2de
commit ea545c0135
2 changed files with 34 additions and 10 deletions

View File

@@ -1,3 +1,9 @@
20000322-21:55 EST Paul Tucker <ptucker@sympatico.ca>
* source/rtl/diskspac.c
* accounted for possibility of retrying the operation
* (though I didn't activate it - see notes)
* optimized some assigns.
20000322-21:10 GMT -3 Luiz Rafael Culik <culik@sl.conex.net>
Missed from previos session
*doc/en/array.txt

View File

@@ -78,6 +78,11 @@ HB_FUNC( DISKSPACE )
{
USHORT uiAction = hb_errRT_BASE_Ext1( EG_OPEN, 2018, NULL, NULL, 0, EF_CANDEFAULT );
/* NOTE: Under 'Standard' behaviour, this error does not allow 'retry'
but if you should wish to make it so, then or EF_CANRETRY with
EF_CANDEFAULT above)
*/
if( uiAction == E_DEFAULT || uiAction == E_BREAK )
break;
}
@@ -109,6 +114,7 @@ HB_FUNC( DISKSPACE )
#elif defined(HB_OS_WIN_32)
while( 1 )
{
typedef BOOL (WINAPI *P_GDFSE)(LPCTSTR, PULARGE_INTEGER,
@@ -170,17 +176,17 @@ HB_FUNC( DISKSPACE )
#if defined(__GNUC__) || defined(_MSC_VER)
dSpace = ( double ) i64RetVal.HighPart +
dSpace = ( double ) i64RetVal.LowPart +
( double ) i64RetVal.HighPart +
( double ) i64RetVal.HighPart *
( double ) 0xFFFFFFFF;
dSpace += ( double ) i64RetVal.LowPart;
if( uiType == HB_DISK_USED )
{
dSpace -= ( double ) i64FreeBytes.HighPart +
dSpace -= ( double ) i64FreeBytes.LowPart +
( double ) i64FreeBytes.HighPart +
( double ) i64FreeBytes.HighPart *
( double ) 0xFFFFFFFF;
dSpace -= ( double ) i64FreeBytes.LowPart;
}
#else
@@ -189,17 +195,17 @@ HB_FUNC( DISKSPACE )
struct that is part of ULARGE_INTEGER
[pt] */
dSpace = ( double ) i64RetVal.u.HighPart +
dSpace = ( double ) i64RetVal.u.LowPart +
( double ) i64RetVal.u.HighPart +
( double ) i64RetVal.u.HighPart *
( double ) 0xFFFFFFFF;
dSpace += ( double ) i64RetVal.u.LowPart;
if( uiType == HB_DISK_USED )
{
dSpace -= ( double ) i64FreeBytes.u.HighPart +
dSpace -= ( double ) i64FreeBytes.u.LowPart +
( double ) i64FreeBytes.u.HighPart +
( double ) i64FreeBytes.u.HighPart *
( double ) 0xFFFFFFFF;
dSpace -= ( double ) i64FreeBytes.u.LowPart;
}
#endif
@@ -248,7 +254,19 @@ HB_FUNC( DISKSPACE )
SetErrorMode( uiErrMode );
if( GetLastError() != 0 )
hb_errRT_BASE_Ext1( EG_OPEN, 2018, NULL, NULL, 0, EF_CANDEFAULT );
{
USHORT uiAction = hb_errRT_BASE_Ext1( EG_OPEN, 2018, NULL, NULL, 0, EF_CANDEFAULT );
/* NOTE: Under 'Standard' behaviour, this error does not allow 'retry'
but if you should wish to make it so, then or EF_CANRETRY
with EF_CANDEFAULT above)
*/
if( uiAction == E_RETRY )
continue;
}
break;
}
#else