2002-08-07 16:20 UTC-0300 Horacio Roldan <harbour_ar@yahoo.com.ar>
* source/rdd/dbf1.c
! added os error code, for neterr() support
and temporary fix for Win/DOS platforms.
This commit is contained in:
@@ -63,12 +63,18 @@
|
||||
#include "hbdbsort.h"
|
||||
#include "error.ch"
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
/* DJGPP can sprintf a float that is almost 320 digits long */
|
||||
#define HB_MAX_DOUBLE_LENGTH 320
|
||||
|
||||
HB_FUNC( _DBFC );
|
||||
HB_FUNC( DBF_GETFUNCTABLE );
|
||||
|
||||
#undef HB_PRG_PCODE_VER
|
||||
#define HB_PRG_PCODE_VER HB_PCODE_VER
|
||||
|
||||
|
||||
HB_INIT_SYMBOLS_BEGIN( dbf1__InitSymbols )
|
||||
{ "_DBFC", HB_FS_PUBLIC, HB_FUNCNAME( _DBFC ), NULL },
|
||||
{ "DBF_GETFUNCTABLE", HB_FS_PUBLIC, HB_FUNCNAME( DBF_GETFUNCTABLE ), NULL }
|
||||
@@ -1732,6 +1738,14 @@ ERRCODE hb_dbfOpen( DBFAREAP pArea, LPDBOPENINFO pOpenInfo )
|
||||
hb_errPutSubCode( pError, EDBF_OPEN_DBF );
|
||||
hb_errPutDescription( pError, hb_langDGetErrorDesc( EG_OPEN ) );
|
||||
hb_errPutFileName( pError, ( char * ) pOpenInfo->abName );
|
||||
/*
|
||||
* Temporary fix for neterr() support and Clipper compatibility,
|
||||
* should be revised with a better solution.
|
||||
*/
|
||||
if ( hb_fsError() == EACCES )
|
||||
hb_errPutOsCode( pError, 32 );
|
||||
else
|
||||
hb_errPutOsCode( pError, hb_fsError() );
|
||||
hb_errPutFlags( pError, EF_CANRETRY | EF_CANDEFAULT );
|
||||
}
|
||||
bRetry = ( SELF_ERROR( ( AREAP ) pArea, pError ) == E_RETRY );
|
||||
|
||||
Reference in New Issue
Block a user