19991007-01:42 GMT+1

This commit is contained in:
Viktor Szakats
1999-10-06 23:55:11 +00:00
parent 82550d4ec4
commit 1b38766ee3
4 changed files with 28 additions and 10 deletions

View File

@@ -1,3 +1,12 @@
19991007-01:42 GMT+1 Victor Szel <info@szelvesz.hu>
* include/filesys.h
source/rtl/filesys.c
% Only use hb_fsReadLarge() and hb_fsWriteLarge() when the size of an
unsigned int is not the same as the size of an unsigned long.
(Same logic as for xmem*() functions)
* source/rtl/dummy.prg
- ReadKey() removed.
19991007-01:16 GMT+1 Victor Szel <info@szelvesz.hu>
+ source/vm/main.c (added)
source/vm/Makefile

View File

@@ -88,7 +88,6 @@ extern BOOL hb_fsLock ( FHANDLE hFileHandle, ULONG ulStart,
extern BOOL hb_fsMkDir ( BYTE * pDirName );
extern FHANDLE hb_fsOpen ( BYTE * pFilename, USHORT uiFlags );
extern USHORT hb_fsRead ( FHANDLE hFileHandle, BYTE * pBuff, USHORT ulCount );
extern ULONG hb_fsReadLarge ( FHANDLE hFileHandle, BYTE * pBuff, ULONG ulCount );
extern BOOL hb_fsRmDir ( BYTE * pDirName );
extern int hb_fsRename ( BYTE * pOldName, BYTE * pNewName );
extern ULONG hb_fsSeek ( FHANDLE hFileHandle, LONG lOffset, USHORT uiMode );
@@ -96,7 +95,17 @@ extern ULONG hb_fsTell ( FHANDLE hFileHandle );
extern void hb_fsSetDevMode ( FHANDLE hFileHandle, USHORT uiDevMode );
extern void hb_fsSetError ( USHORT uiError );
extern USHORT hb_fsWrite ( FHANDLE hFileHandle, BYTE * pBuff, USHORT ulCount );
#if UINT_MAX == ULONG_MAX
/* NOTE: hb_fsRead/hb_fsWrite can work with ULONG data blocks */
#define hb_fsReadLarge hb_fsRead
#define hb_fsWriteLarge hb_fsWrite
#else
/* NOTE: otherwise, the extended version of the functions
will be used to copy and/or set ULONG data blocks */
extern ULONG hb_fsReadLarge ( FHANDLE hFileHandle, BYTE * pBuff, ULONG ulCount );
extern ULONG hb_fsWriteLarge ( FHANDLE hFileHandle, BYTE * pBuff, ULONG ulCount );
#endif
extern PHB_FNAME hb_fsFNameSplit ( char * szFilename ); /* Split given filename into path, name and extension */
extern char * hb_fsFNameMerge ( char * szFileName, PHB_FNAME pFileName ); /* This function joins path, name and extension into a string with a filename */

View File

@@ -80,17 +80,14 @@ FUNCTION __dbTotal() ; RETURN NIL
FUNCTION __dbUpdate() ; RETURN NIL
FUNCTION __dbZap() ; RETURN NIL
FUNCTION __LabelForm() ; RETURN NIL
FUNCTION __ReportForm() ; RETURN NIL
FUNCTION __SetFormat() ; RETURN NIL
FUNCTION __TypeFile() ; RETURN NIL
FUNCTION Browse() ; RETURN .T.
FUNCTION dbEdit() ; RETURN NIL
FUNCTION IsPrinter() ; RETURN .T.
FUNCTION NetName() ; RETURN ""
FUNCTION ReadKey() ; RETURN 0
FUNCTION __qqPub() ; RETURN NIL
FUNCTION __TypeFile() ; RETURN NIL
FUNCTION __LabelForm() ; RETURN NIL
FUNCTION __ReportForm() ; RETURN NIL
FUNCTION GetActive() ; RETURN NIL
FUNCTION GetApplyKey() ; RETURN NIL
@@ -102,6 +99,5 @@ FUNCTION ReadFormat() ; RETURN .F.
FUNCTION ReadKill() ; RETURN .F.
FUNCTION ReadUpdated() ; RETURN .T.
FUNCTION Updated() ; RETURN .T.
FUNCTION __qqPub() ; RETURN NIL
FUNCTION __SetFormat() ; RETURN NIL

View File

@@ -519,6 +519,8 @@ USHORT hb_fsWrite( FHANDLE hFileHandle, BYTE * pBuff, USHORT uiCount )
return uiWritten;
}
#if UINT_MAX != ULONG_MAX
ULONG hb_fsReadLarge( FHANDLE hFileHandle, BYTE * pBuff, ULONG ulCount )
{
ULONG ulRead = 0L, ulLeftToRead = ulCount;
@@ -605,6 +607,8 @@ ULONG hb_fsWriteLarge( FHANDLE hFileHandle, BYTE * pBuff, ULONG ulCount )
return ulWritten;
}
#endif
ULONG hb_fsSeek( FHANDLE hFileHandle, LONG lOffset, USHORT uiFlags )
{
ULONG ulPos = -1;