2015-09-02 15:54 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)

* include/hbapifs.h
  * src/rtl/filebuf.c
    * added new C function hb_fileLoadData() - it can be used to load data
      from already opened regular files and streams

  * include/harbour.hbx
  * src/rtl/vfile.c
    + added new PRG function:
         hb_vfLoad( <cFileName>, [ <nMaxSize> ] ) -> <cFileBody> | NIL

  * src/vm/runner.c
    * use hb_fileLoadData()

  * contrib/hbwin/win_bmp.c
    * use hb_fileLoad()
This commit is contained in:
Przemysław Czerpak
2015-09-02 15:54:08 +02:00
parent 0f9398515e
commit 38af08e97d
7 changed files with 115 additions and 81 deletions

View File

@@ -927,6 +927,7 @@ DYNAMIC hb_vfHandle
DYNAMIC hb_vfLink
DYNAMIC hb_vfLinkRead
DYNAMIC hb_vfLinkSym
DYNAMIC hb_vfLoad
DYNAMIC hb_vfLock
DYNAMIC hb_vfLockTest
DYNAMIC hb_vfOpen

View File

@@ -418,6 +418,7 @@ extern HB_EXPORT HB_BOOL hb_fileIsLocal( PHB_FILE pFile );
extern HB_EXPORT HB_BOOL hb_fileIsLocalName( const char * pszFileName );
extern HB_EXPORT HB_SIZE hb_fileResult( HB_SIZE nSize );
extern HB_EXPORT HB_BYTE * hb_fileLoad( const char * pszFileName, HB_SIZE nMaxSize, HB_SIZE * pnSize );
extern HB_EXPORT HB_BYTE * hb_fileLoadData( PHB_FILE pFile, HB_SIZE nMaxSize, HB_SIZE * pnSize );
/* interface to PRG level hb_vf*() file pointer items */