diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 62631fbea3..b30bcfe71b 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,22 @@ 2002-12-01 13:30 UTC+0100 Foo Bar */ +2005-11-19 00:30 UTC+0100 Viktor Szakats (viktor.szakats/syenar.hu) + * include/hbapifs.c + * src/rtl/filesys.c + ! hb_fsSetDevMode() fixed back to return a BOOL value + to be compatible with the CA-Cl*pper undocumented + _tdevraw() function. (hb_fsSetDevMove() is mapped + to _tdevraw() in hbundoc.api, it's the documented + version of the same functionality) + Also fixed warning and error for one of the dummy + platform branches. + Since this came from xHarbour it pbly needs to be + fixed there too. + + * tests/Makefile + + symbolt.prg added + 2005-11-16 13:35 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/bin/pack_src.sh * updated for nulsys.prg -> nulsys.c modification diff --git a/harbour/include/hbapifs.h b/harbour/include/hbapifs.h index 7d681177dc..cf2043eaa3 100644 --- a/harbour/include/hbapifs.h +++ b/harbour/include/hbapifs.h @@ -143,7 +143,7 @@ extern BOOL HB_EXPORT hb_fsRename ( BYTE * pszOldName, BYTE * pszNewName extern ULONG HB_EXPORT hb_fsSeek ( FHANDLE hFileHandle, LONG lOffset, USHORT uiMode ); /* reposition an open file */ extern HB_FOFFSET HB_EXPORT hb_fsSeekLarge( FHANDLE hFileHandle, HB_FOFFSET llOffset, USHORT uiFlags ); /* reposition an open file using 64bit API */ extern ULONG HB_EXPORT hb_fsTell ( FHANDLE hFileHandle ); /* retrieve the current position of a file */ -extern void HB_EXPORT hb_fsSetDevMode ( FHANDLE hFileHandle, USHORT uiDevMode ); /* change the device mode of a file (text/binary) */ +extern BOOL HB_EXPORT hb_fsSetDevMode ( FHANDLE hFileHandle, USHORT uiDevMode ); /* change the device mode of a file (text/binary) */ extern void HB_EXPORT hb_fsSetError ( USHORT uiError ); /* set the file system DOS error number */ extern void HB_EXPORT hb_fsSetIOError ( BOOL fResult, USHORT uiOperation ); /* set the file system error number after IO operation */ extern USHORT HB_EXPORT hb_fsWrite ( FHANDLE hFileHandle, BYTE * pBuff, USHORT ulCount ); /* write to an open file from a buffer (<=64K) */ diff --git a/harbour/source/rtl/filesys.c b/harbour/source/rtl/filesys.c index 6712d54697..cb4f94dad4 100644 --- a/harbour/source/rtl/filesys.c +++ b/harbour/source/rtl/filesys.c @@ -796,7 +796,7 @@ void HB_EXPORT hb_fsClose( FHANDLE hFileHandle ) #endif } -void HB_EXPORT hb_fsSetDevMode( FHANDLE hFileHandle, USHORT uiDevMode ) +BOOL HB_EXPORT hb_fsSetDevMode( FHANDLE hFileHandle, USHORT uiDevMode ) { HB_TRACE(HB_TR_DEBUG, ("hb_fsSetDevMode(%p, %hu)", hFileHandle, uiDevMode)); @@ -816,7 +816,10 @@ void HB_EXPORT hb_fsSetDevMode( FHANDLE hFileHandle, USHORT uiDevMode ) iRet = setmode( hFileHandle, O_TEXT ); break; } + hb_fsSetIOError( iRet != -1, 0 ); + + return iRet != -1; } #elif defined(_MSC_VER) || defined(__MINGW32__) || defined(__DMC__) { @@ -832,20 +835,30 @@ void HB_EXPORT hb_fsSetDevMode( FHANDLE hFileHandle, USHORT uiDevMode ) iRet = _setmode( hFileHandle, _O_TEXT ); break; } + hb_fsSetIOError( iRet != -1, 0 ); + + return iRet != -1; } #elif defined( HB_OS_UNIX ) HB_SYMBOL_UNUSED( hFileHandle ); HB_SYMBOL_UNUSED( uiDevMode ); + hb_fsSetError( ( USHORT ) FS_ERROR ); + return FALSE; + #else - hb_fsSetError( (USHORT) FS_ERROR ); + HB_SYMBOL_UNUSED( hFileHandle ); + HB_SYMBOL_UNUSED( uiDevMode ); + + hb_fsSetError( ( USHORT ) FS_ERROR ); + + return FALSE; #endif - } USHORT HB_EXPORT hb_fsRead( FHANDLE hFileHandle, BYTE * pBuff, USHORT uiCount ) diff --git a/harbour/tests/Makefile b/harbour/tests/Makefile index 0012fa95e7..c015d0444f 100644 --- a/harbour/tests/Makefile +++ b/harbour/tests/Makefile @@ -115,6 +115,7 @@ PRG_SOURCES=\ statfun.prg \ statics.prg \ strdelim.prg \ + symbolt.prg \ t1.prg \ test_all.prg \ testbrdb.prg \