diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 1f77d87d69..526f7d7059 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,9 @@ +19990624-08:00 WIB Andi Jahja + * source/rtl/copyfile.c + - function name now upper case + - change filesys.api to filesys.h + - add hb_ prefix to internal calls + 19990623-22:30 WIB Andi Jahja + tests/working/testcopy.prg + source/rtl/copyfile.c diff --git a/harbour/source/rtl/copyfile.c b/harbour/source/rtl/copyfile.c index 1f0f29dab8..84bb27f2b4 100644 --- a/harbour/source/rtl/copyfile.c +++ b/harbour/source/rtl/copyfile.c @@ -6,13 +6,13 @@ #include #include #include -#include +#include #define BUFFER_SIZE 8096 static long _fsCopy(BYTEP ,BYTEP ) ; -HARBOUR hb___copyfile() { +HARBOUR HB___COPYFILE() { if ( ISCHAR(1) && ISCHAR(2) ) { hb_retnl(_fsCopy((BYTEP)hb_parc(1),(BYTEP)hb_parc(2))); } @@ -24,33 +24,33 @@ static long _fsCopy(BYTEP source,BYTEP dest) { char *buffer; USHORT usCount; ULONG ulCount = 0L; - sHANDLE = _fsOpen(source, FO_READ); - if ( ! _fsError() ) { - dHANDLE = _fsCreate(dest,FC_NORMAL); - if ( _fsError() ) { - _fsClose(sHANDLE); + sHANDLE = hb_fsOpen(source, FO_READ); + if ( ! hb_fsError() ) { + dHANDLE = hb_fsCreate(dest,FC_NORMAL); + if ( hb_fsError() ) { + hb_fsClose(sHANDLE); return( -2L) ; } buffer = hb_xgrab(BUFFER_SIZE); if (buffer == NULL) { - _fsClose(sHANDLE); - _fsClose(dHANDLE); + hb_fsClose(sHANDLE); + hb_fsClose(dHANDLE); return(-3L); } - usCount = _fsRead(sHANDLE,buffer,BUFFER_SIZE); + usCount = hb_fsRead(sHANDLE,buffer,BUFFER_SIZE); while(1) { ulCount += (ULONG)usCount; - _fsWrite(dHANDLE,buffer, usCount); - usCount = _fsRead(sHANDLE,buffer, BUFFER_SIZE); + hb_fsWrite(dHANDLE,buffer, usCount); + usCount = hb_fsRead(sHANDLE,buffer, BUFFER_SIZE); if (usCount != BUFFER_SIZE ) { break; } } ulCount += (ULONG)usCount; - _fsWrite(dHANDLE,buffer,usCount); + hb_fsWrite(dHANDLE,buffer,usCount); hb_xfree(buffer); - _fsClose(sHANDLE); - _fsClose(dHANDLE); + hb_fsClose(sHANDLE); + hb_fsClose(dHANDLE); } return( ulCount ); }