* contrib/hbzebra/coredraw.c
* contrib/hbzebra/hbzebra.hbx
+ added new PRG function:
hb_zebra_getsize( <hZebra>, @<nWidth>, @<nHeight> ) -> <nError>
it calculates size in points of the created barcode and returns 0 on
success or error code
+ contrib/hbzebra/tests/gtgfx.prg
+ borrowed from Viktor's fork, thanks
2014-09-18 22:32 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com)
+ added on-screen barcode example, created by elch
(with some minor cleanups)
https://groups.google.com/d/msg/harbour-users/_Wht51JZGgE/ZXyvaJNH9ggJfeb4fc0e20
* contrib/sddoci/core.c
* map ostrlen() to strlen() or wcslen() in OCI_CHARSET_UNICODE builds
; TOFIX: this library uses wchar_t for unicode strings, it means that
in *nixes where wchar_t is 32-bit integer mapping to Harbour
HB_WCHAR is wrong and has to be fixed
* include/hbapifs.h
* src/harbour.def
* src/rtl/filebuf.c
+ added new C function:
HB_BOOL hb_fileSave( const char * pszFileName,
const void * buffer, HB_SIZE nSize );
* include/harbour.hbx
* src/harbour.def
* src/rtl/vfile.c
+ added new PRG function:
hb_vfSave( <cFileName>, <cFileBody> ) --> <lOK>
* src/rtl/vfile.c
* set FError() code in hb_vfLoad()
* include/hbapifs.h
! added missing declaration for hb_fileParamGet()
* include/hbgtcore.h
* added HB_EXPORT attribute for hb_gt_getClipboard(), hb_gt_setClipboard()
and hb_gt_dos_keyCodeTranslate()
* include/hbrdddbf.h
! removed declaration for hb_dbfTranslateRec() function - this functions
was removed many years ago
* include/harbour.hbx
* src/harbour.def
! fixed order of declared functions - they should be sorted.
* include/hbapifs.h
* src/rtl/fscopy.c
+ added new C function:
HB_BOOL hb_fileCopyEx( const char * pszSource, const char * pszDest,
HB_SIZE nBufSize, HB_BOOL fTime,
PHB_ITEM pCallBack );
Unlike hb_fileCopy() it is never redirected to remote server and copy
operation is always done locally.
pCallBack is codeblock or function symbol, it's executed at the
beginning and then on each nBufSize bytes written and receives two
parameters: nBytesWritten, nTotalSize.
Warning: nTotalSize could be 0 when non regular files like pipes or
sockets are copied.
* src/rtl/vfile.c
+ added new PRG function:
hb_vfCopyFile( <cFileSrc>, <cFileDst>, [<nBufSize>=65536], ;
[<lTimePreserve>=.t.], [<bCallBack>] ) --> <nResult>
It's wrapper to hb_fileCopyEx() C function.
For very big files setting <nBufSize> to greater value, i.e. 16777216
may increase performance.
* *
* partial sync with the 3.4 fork codebase. These are the things
synces for the most part:
- copyright headers
- grammar/typos in comments and some readmes
- comment/whitespace/decorations
- variable scoping in C files
- DO CASE/SWITCH and some other alternate syntax usage
- minimal amount of human readable text in strings
- minor code updates
- HB_TRACE() void * casts for pointers and few other changes to
avoid C compiler warnings
- various other, minor code cleanups
- only Harbour/C code/headers were touched in src, utils, contrib,
include. No 3rd party code, no make files, and with just a few
exceptions, no 'tests' code was touched.
- certain components were not touched were 3.4 diverged too much
already, like f.e. hbmk2, hbssl, hbcurl, hbexpat
- the goal was that no actual program logic should be altered by
these changes. Except some possible minor exceptions, any such
change is probably a bug in this patch.
It's a massive patch, if you find anything broken after it, please
open an Issue with the details. Build test was done on macOS.
The goal is make it easier to see what actual code/logic was changed
in 3.4 compared to 3.2 and to make patches easier to apply in both
ways.
* include/hbapifs.h
* src/rtl/filesys.c
+ added new C functions for UNIX and DJGPP builds:
int hb_fsPollFD( PHB_POLLFD pPollSet, int iCount,
HB_MAXINT nTimeOut );
int hb_fsCanRead( HB_FHANDLE hFileHandle, HB_MAXINT nTimeOut );
int hb_fsCanWrite( HB_FHANDLE hFileHandle, HB_MAXINT nTimeOut );
These functions should be used instead of select() in C code to hide
low level access to select()/poll() functionality in *nix builds
(they are supported by DJGPP only to simplify existing code common
for DJGPP and *nix builds). Maximum file handle value which can be
used in select() is limited by FD_SETSIZE. Please note that it's
file handle value not number of file handles in the set. It creates
serious problem for applications which operate on great number of
handles (i.e. servers which have to keep open many sockets, pipes,
files, etc. for their clients) so the new file/socket/pipe/...
handle value can easy exceed FD_SETSIZE limit and in such case
cannot be used with select(). The modification on
2016-04-05 21:24 UTC+0200 Przemyslaw Czerpak
resolved the problem only for sockets and pipes in code which uses
corresponding hb_socket*() and hb_fsPipe*() API but not for all
other cases. This one is for POSIX compilant code which needs pure
POSIX select()/poll() functionality.
Please note that HB_POLLFD structure should is compatible with
struct pollfd defined by POSIX.1-2001 anyhow not all platforms
confirm this standard so portable Harbour code should always use
HB_POLLFD and HB_POLL* constant values instead of POLL* ones.
* include/hbdate.h
* src/common/hbdate.c
+ added new C functions to calculate timeouts:
HB_MAXUINT hb_timerGet( void );
HB_MAXUINT hb_timerInit( HB_MAXINT nTimeOut );
HB_MAXINT hb_timerTest( HB_MAXINT nTimeOut, HB_MAXUINT * pnTimer );
They are designed to be used instead of direct access to
hb_dateMilliSeconds(). Now they internally use hb_dateMilliSeconds()
but it can be easy replaced by any other system monotonic clock by
one local modification inside hb_timerGet() function.
* src/rtl/filesys.c
* use hb_timer*() functions instead of hb_dateMilliSeconds()
* use hb_fsCanRead()/hb_fsCanWrite() instead of select()/poll()
It also fixed timeout processing inside hb_fsPipeIsData() and
hb_fsPipeWrite() in builds using poll()
* src/rtl/filesys.c
* src/rtl/gtcrs/gtcrs.h
* src/rtl/gtcrs/gtcrs.c
* src/rtl/gtpca/gtpca.c
* src/rtl/gtsln/gtsln.c
* src/rtl/gtsln/mousesln.c
* src/rtl/gtstd/gtstd.c
* src/rtl/gttrm/gttrm.c
* src/rtl/gtxwc/gtxwc.c
* use hb_timer*() functions instead of hb_dateMilliSeconds()
* use hb_fsCanRead()/hb_fsCanWrite() instead of select()/poll()
* src/vm/thread.c:
* src/rtl/gtwin/gtwin.c
* src/rtl/hbcom.c
* src/rtl/hbgtcore.c
* src/rtl/hblpp.c
* src/rtl/idle.c
* contrib/hbnetio/netiosrv.c:
* contrib/hbssl/ssl_sock.c:
* use hb_timer*() functions instead of hb_dateMilliSeconds()
* contrib/xhb/hboutdbg.c
* use hb_fsCanWrite() instead of select()
* src/rtl/hbsocket.c
! repeat select() interrupted by signal inside hb_socketSelect()
when poll() function is not available
* src/3rd/hbdossrl/serial.c
! fixed -Wshift-negative-value GCC warnings
* package/harbour.spec
* contrib/hbbz2/hbbz2.hbp
* package/mpkg_rpm.sh
+ added support for '--with localbz2' RPM build parameter
* include/hbpp.h
* src/pp/ppcore.c
* src/compiler/hbmain.c
* modified hb_pp_inBuffer() parameters. Now it supports optional
szFileName parameter.
Warning: it's incompatible with previous version but I do not think
that anyone used this function outside core code so I decided to not
add new function but simply change the existing one.
[INCOMPATIBLE]
* src/rtl/filebuf.c
! do not resepct SET DEFAULT/PATH in hb_fileExists() when 2nd parameter
is NULL in default file IO drivers. It also changes the behvior of
PRG function hb_vfOpen() which now honors SET DEFAULT/PATH only if
its 2nd parameter is passed by reference - this modification is
compatible with 2016-01-25 18:16 UTC+0100 Viktor Szakats in his fork.
* src/rdd/dbf1.c
* src/rdd/dbfcdx/dbfcdx1.c
* src/rdd/dbfnsx/dbfnsx1.c
* src/rdd/dbfntx/dbfntx1.c
* updated to work correctly with modified hb_fileExists() behavior
; CL5.2 DBFCDX and Six3 CDX/NSX RDDs looking for production indexes
respect SET PATH but Harbour in core DBF* index RDDs is CL5.3/COMIX
compatible and looks for production indexes only in the directory
where DBF file is located and only SIXCDX Harbour RDD is CL5.2/Six3
compatible.
Please also note that it's significant only for situations when
DBF file is located in current directory. If it's open from
SET DEFAULT/PATH directory then corresponding path is added
to DBF file name what effectively disables SET DEFAULT/PATH
processing when production index is open.
* src/rtl/filebuf.c
* src/rtl/filebufd.c
* src/rtl/iousr.c
* contrib/hbmemio/memio.c
; cleaned name of hb_fileCopy() paramter
* include/hbapifs.h
* src/rtl/filebuf.c
* src/harbour.def
+ added new C function:
HB_BOOL hb_fileMove( const char * pszSrcFile,
const char * pszDstFile );
* src/rtl/vfile.c
* include/harbour.hbx
* src/harbour.def
+ added new PRG function:
hb_vfMoveFile( <cFileSrc>, <cFileDst> ) -> <nResult>
; unlike hb_fileRename()/hb_vfRename() new hb_fileMove()/hb_vfMoveFile()
functions allow to move files between different file systems/drives
and also different Harbour file IO drivers. Please note that it means
that file name IO driver prefix is significant in both source and
destination file names unless it's local FS operation. New functions
when both file names point to the same Harbour file IO driver try to
use simple rename operation. If it fails then they try to copy the
file and remove the source one.
* ChangeLog.txt
! typo
* include/hbfloat.h
* contrib/xhb/xhbctbit.c
* src/compiler/hbcmplib.c
* src/compiler/hbcomp.c
* src/compiler/hbusage.c
! pacified new GCC warnings and partially synced with Viktor's fork
* src/compiler/hbusage.c
* added Klas Engwall to credits list
* added Rolf to credits list
* updated April White email address
; please verify it and update if necessary
* doc/xhb-diff.txt
+ added information about support for strong typed variables in [x]Harbour
* updated information about typed object items
! typos
* include/hbclass.ch
* updated information about initialization of typed object items
* include/hbatomic.h
* do not force OSSpinLock usage in OSX builds
* include/hbapifs.h
* src/rtl/filesys.c
+ added new C function hb_fsCloseRaw() - it works like hb_fsClose() but
does not change hb_fsError()
* src/rtl/filebuf.c
* changed the condition in hb_fileLoadData() used to detect file
descriptors without full support for file seek - now it's possible
to use [hb_]MemoRead() to read /proc/* files in Linux
* src/rtl/filesys.c
! detach printer process to not leave zombie processes after printing
in programs which do not catch SIGCHLD signal in *nixes builds
* src/rtl/filesys.c
* src/rtl/hbproces.c
* use hb_fsCloseRaw() instead of hb_fsClose() to safe original error code
* src/rtl/hbsocket.c
! fixed OpenWatcom Linux builds
+ added HB_WINSOCK_USE_OLDFUNC macro which disables new WinSock functions
in MS-Windows builds
* src/rtl/gtxwc/gtxwc.c
! fixed recursive mutex lock
! added some missing locks
+ added support for X11 XLockDisplay()/XUnlockDisplay() in default builds
when MT HVM is used. X11 locks can be disabled by HB_XWC_XLOCK_OFF
macro - it may be necessary on some old platforms which do not support
them.
! disabled resize step when font size is changed to reduce possible
problem with reduced number of columns and rows by this operation.
Please remember that X Server/Window Manager may still ignore
suggested window size and force their own dimensions so application
has to be ready to accept final screen size set by server/WM.
* contrib/hbnf/shadow.c
! use 8 instead of 7 as default color attribute in FT_Shadow() function
* include/hbapifs.h
* src/rtl/filesys.c
+ added new C function:
HB_FOFFSET hb_fsGetSize( HB_FHANDLE hFileHandle );
! fixed SetFilePointer() error detecting - it was broken
and we returned wrong results for offset 0xFFFFFFFF
* src/rtl/filebuf.c
* use hb_fsGetSize()
* include/hbapifs.h
* src/common/hbfsapi.c
+ added automatic file handle table resizing to hb_fsOS2DosOpenL()
+ added new C function: hb_fsOS2DosOpen() which is wrapper to DosOpen()
with automatic file handle table resizing.
Please remember that unlike hb_fsOS2DosOpenL() this function is
pure wrapper to DosOpen() so it does not make file name conversions
and does not set hb_fsError().
* src/rtl/filesys.c
* src/rtl/hbcom.c
* src/rtl/hbproces.c
* use hb_fsOS2DosOpen() instead of DosOpen()
* src/vm/cmdarg.c
* set the initial size of file handle table to 256 in OS2 OpenWatcom
builds if user does not set it explicitly by //F:<n> switch
* config/global.mk
- removed set HARBOUR=F:100 - it's not necessary with automatic FHT
resizing
; Please test it in real OS2 environment
* *
% remove brandings and homepage [1] from copyright header. Pass 1 - using script.
[1] nobody has access to it anymore AFAIK - and it's also just
a redirect since long
! update url in copyright header
; this should make the diff between 3.4 and 3.2 easier to manage
* config/global.mk
* set HARBOUR=F:100 during build process in OS2 builds - it increases
maximum number of open handles per process from 20 to 100 so it should
be possible to use -j<n> switch during Harbour compilation - please
test, i.e.:
os2-make -j3
* contrib/xhb/hbcompat.ch
! fixed pp rules for Str(,,, <lStrip> ) translation
* include/hbapifs.h
* src/rtl/filesys.c
+ added new C function:
HB_FHANDLE hb_fsOpenEx( const char * pszFileName, HB_FATTR nAttr,
HB_USHORT uiFlags );
* minor cleanup
* include/hbmemory.ch
* src/vm/fm.c
+ added two new actions for Memory() function:
HB_MEM_STATISTICS - return non 0 value if FM statistic is enabled
HB_MEM_ISLIMIT - return non 0 value if used memory limit is
supported
+ added new PRG function:
__fm_allocLimit( [ <nNewLimit> ] ) -> <nPrevLimit>
It allows to set limit for maximum used memory in some memory
managers, -1 means no limit.
Now it works with DLMALLOC and in ST mode it's limit for memory
allocated from system for whole application. In MT mode when
HB_FM_DLMT_ALLOC (default for DLMALLOC) is enabled it's limit for
single MSPACE (Harbour allocates 16 MSPACES and balance them
between threads to improve scalability) so it's rather per thread
limit. If memory statistic module is enabled during Harbour build
process then this limit works with any memory manager and defines
limit for total memory allocated by Harbour application regardles
of MT or ST mode.
* src/vm/hvm.c
* use HB_MEM_STATISTICS instead of HB_MEM_USEDMAX to check if memory
statistic module is enabled
* src/nortl/nortl.c
+ added hb_fsSetError()
* include/hbapifs.h
* src/common/hbfsapi.c
+ added new C function for OS2 builds: hb_fsOS2QueryPathInfo()
Unlike DosQueryPathInfo() it uses dir entries so it does not need to
open the file what can create file sharing violation problem.
+ added new C function for OS2 builds: hb_isWSeB()
It returns true if OS2 version supports long file API
(IBM OS/2 Warp Server for e-Business)
+ added new C functions for OS2 builds:
hb_fsOS2DosOpenL(), hb_fsOS2DosSetFileLocksL(),
hb_fsOS2DosSetFilePtrL(), hb_fsOS2DosSetFileSizeL()
These are dynamically initialized wrappers to OS2 long file API
functions if such functions exists in given OS2 version.
* src/common/hbfsapi.c
* use hb_fsQueryPathInfo() in OS2 builds of hb_fsNameExists(),
hb_fsFileExists() and hb_fsDirExists()
* src/common/hbffind.c
+ added support for long files (longer then 4GB) in OS2 builds.
It also detects OS2 version to check if long file API is supported.
! fixed file error setting in OS2 builds
* src/rtl/filesys.c
* use hb_fsQueryPathInfo() in OS2 builds of hb_fsGetFileTime() and
hb_fsGetAttr()
* use hb_fsOS2*() functions for long files
* src/rtl/fssize.c
* use hb_fsQueryPathInfo() in OS2 builds of hb_fsFSize()
; please make real life tests in OS2
* 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()
* include/hbapifs.h
* src/rtl/filebufd.c
* moved HB_FILE_ERR_UNSUPPORTED macro to header file
* include/hbapifs.h
* src/rtl/filebuf.c
* added new C function hb_fileLoad() - it can be used to load data
from regular files and streams
* src/rtl/memofile.c
* modified [hb_]Memo{Read|Writ}() to work with streams, i.e. now
this code works:
REQUEST HB_PIPEIO
cDir := hb_memoRead( "|ls -la" )
? upper( cDir )
or:
cData := hb_memoRead( "|xz -c data.gz" )
? hb_memoWrit( "data2.txt", cData )
? hb_memoWrit( "|sh -c 'xz -9 -e > data2.xz'", cData )
* src/rtl/fscopy.c
* removed not used in current code unix header files
* ChangeLog.txt
! fixed typo in ChangeLog entry. I used hb_socketNew() instead of
hb_socketSetFilter()
* include/hbapifs.h
* src/rtl/filebuf.c
+ added helper C function:
HB_SIZE hb_fileResult( HB_SIZE nSize );
It converts ( HB_SIZE ) FS_ERROR to 0 so it can be used to wrap
hb_fileRead()/hb_fileWrite() to force previous results.
* src/rdd/dbffpt/dbffpt1.c
* reduced variable scope
* src/rtl/copyfile.c
! fixed typo in last commit - thanks to Viktor.
* contrib/hbtcpio/tcpio.c
* contrib/hbtcpio/hbtcpio.hbx
+ added new PRG function
hb_vfFromSocket( <pSocket> ) -> <pFile>
It converts socket created by socket open into TCPIP virtual file
which works just like files created by hb_vfOpen( "tcp:...", ... )
* include/hbapifs.h
* src/rtl/filesys.c
+ added new C function
HB_SIZE hb_fsPipeWrite( HB_FHANDLE hPipe, const void * buffer,
HB_SIZE nSize, HB_MAXINT nTimeOut );
+ implemented hb_fsPipeUnblock() in OS2 builds
+ set IO error in hb_fsPipeCreate(), hb_fsIsPipeOrSock() and
hb_fsPipeUnblock()
* return ( HB_SIZE ) -1 from hb_fsPipeRead() if end of stream is
reached or read error appears on non empty buffer. This modification
also change the behavior of PRG hb_PRead() function so now result -1
can be used to detect end of stream.
* src/rtl/philes.c
* include/harbour.hbx
+ added new PRG function:
hb_PWrite( <nPipeHandle>, <cBuffer>, [<nBytes>], [<nTimeOut>] )
-> <nBytesWritten>
% removed unnecessary assignment
* include/hbapiitm.h
+ added HVM internal macro hb_itemRawSwap()
* src/vm/asort.c
% use hb_itemRawSwap()
* in old code use comparison which prefers < and > operators
instead of <= and >=
2015-07-31 14:04 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com)
* include/hbapifs.h
* src/rtl/filebuf.c
* src/rtl/vfile.c
+ add C-level hb_fileSizeGet() function
* update HB_VFSIZE() to use hb_fileSizeGet() when passed a filename
It means now HB_VFSIZE() works for non-virtual filenames
just like HB_FSIZE() did.
* include/hbapifs.h
* src/rtl/filebuf.c
* src/rtl/filebufd.c
* src/rtl/filesys.c
* src/rtl/vfile.c
* src/rtl/iousr.c
* src/rdd/dbfcdx/dbfcdx1.c
* src/rdd/dbffpt/dbffpt1.c
* src/rdd/dbfnsx/dbfnsx1.c
* src/rdd/dbfntx/dbfntx1.c
* src/rdd/hsx/hsx.c
* contrib/hbcomio/comio.c
* contrib/hbmemio/memio.c
* contrib/hbtcpio/tcpio.c
* contrib/hbnetio/netio.h
* contrib/hbnetio/netiocli.c
* contrib/hbnetio/netiosrv.c
* changed HB_USHORT uiAttr parameter to HB_FATTR nAttr
in hb_fsExtOpen() and hb_fileExtOpen()
* include/fileio.ch
* src/rtl/vfile.c
+ added support for FO_DEFAULTS in hb_vfOpen().
When this flag is used in <nModeAttr> parameters then new
_SET_DEFAULT is respected when new file is created and
_SET_DEFAULT + _SET_PATH when file is opened.
+ added support for checking file size by it's in hb_vfSize()
so it can work like hb_FSize() but for virtual FS not only
for local files. Now this function has the following syntax:
hb_vfSize( <pHandle> | <cFileName> [, <lUseDirEntry> ] ) -> <nSize>
The 2-nd parameter <lUseDirEntry> is significant only when
the 1-st one <cFileName> is character value.
* src/rtl/gttrm/gttrm.c
* replaced C++ comments with ANSI ones
* src/rtl/vfile.c
* updated casing of function names in comments
* return F_ERROR instead of NIL hb_vfHandle() when wrong parameter
is given (borrowed from Viktor's branch)
* added C function hb_fileParamGet() borrowed from Viktor's branch
* src/rtl/filesys.c
* variable localization (synced with Viktor's branch)
* src/rtl/disksphb.c
! fixed bug with potentially uninitialized buffer
(fix borrowed from Viktor's branch)
* include/hbapifs.h
* src/rtl/filebuf.c
* src/rtl/filebufd.c
* contrib/hbcomio/comio.c
* contrib/hbmemio/memio.c
* contrib/hbnetio/netiocli.c
* contrib/hbtcpio/tcpio.c
* changed internal FILE IO API. Now all functions which do
not operate on PHB_FILE receive pointer to function table
(PHB_FILE_FUNCS) used by given redirector.
* src/rtl/vfile.c
* open wirtual files in READWRITE mode by default
* translate FO_* attributes to FXO_* ones
* src/vm/classes.c
! fixed typo in RTE message
* src/vm/garbage.c
* use different error code (1301/1302) for destructor RTE
* src/rtl/gtxwc/gtxwc.c
* src/rtl/gtxwc/gtxwc.h
+ added support for HB_GTI_FONTWEIGHT with HB_GTI_FONTW_* actions
* contrib/hbpgsql/rddcopy.c
! fixed memory leak
% encapsulate PQ calls in hb_vmUnlock()/hb_vmLock() to not stop
other threads when GC is activated
* include/hbapifs.h
* src/rtl/filebuf.c
* move HB_FILE_TYPE_MAX definition to header file
% include C stat() header only in *nix builds
* src/pp/ppcore.c
! force stringify when illegal characters are included inside
square brackets []
* src/rdd/hbdbsort.c
* casting
* src/rtl/filesys.c
+ added additional method to extract file time in MS-Windows version of
hb_fsGetFileTime()
* include/hbapifs.h
* src/rtl/vfile.c
+ added C functions to manipulate PRG level hb_vf*() file pointer items
* include/hbapifs.h
* src/rtl/filebuf.c
+ added C functions to create/extract file IO handle from raw file handle
+ added C functions to check if file IO handle points to local file
* contrib/hbmzip/mzip.c
* changed hb_fs*() API to hb_file*() API
! fixed file time setting in *nix builds
* src/vm/set.c
! fixed freed memory access exploited by interactions between
modifications in last few years.
! do not try to remove trailing ^Z char reading from the stream
if FS_END seek reports 0.
! if possible open printer/alternate/extra output in write only mode
to avoid problem on devices where read access is not available.
* src/rtl/langapi.c
* keep EN lang active after deinitialization
* src/rtl/filesys.c
! fixed condition for file time refresh in *nix builds
! fixed file time setting in *nix builds
* include/hbapifs.h
* src/rtl/Makefile
* src/rtl/filebuf.c
+ src/rtl/filebufd.c
* renamed hb_fileRegister2() to hb_fileRegisterFull()
+ added new function hb_fileRegisterPart() which simplifies writing
small FILE IO redirectors.
* contrib/hbmemio/memio.c
* contrib/hbnetio/netiocli.c
* use hb_fileRegisterFull()
* contrib/hbplist.txt
+ contrib/hbtcpio/hbtcpio.hbc
+ contrib/hbtcpio/hbtcpio.hbp
+ contrib/hbtcpio/hbtcpio.hbx
+ contrib/hbtcpio/tcpio.c
+ added new Harbour FILE IO redirector.
It recognizes and process names with "tcp:" prefix, in form like:
tcp:<host>:<port>[:<timeout>]
It can be used in different subsystems using Harbour FILE IO and
stream read/write operations, i.e.
REQUEST HB_TCPIO
SET PRINTER TO tcp:192.168.0.110:9100
can be used to connect to network printers using TCP direct printing.
* utils/hbmk2/po/hbmk2.pt_BR.po
! fixed typo in translation
* ChangeLog.txt
* include/harbour.hbx
* src/rtl/Makefile
- src/rtl/xfile.c
+ src/rtl/vfile.c
* renamed PRG functions HB_X*() to HB_VF*()
* renamed PRG functions hb_vf[GS]etAttr() to hb_vfAttr[GS]et()
* renamed PRG functions hb_vf[GS]etDateTime() to hb_vfTime[GS]et()
* include/hbapifs.h
* src/rtl/filebuf.c
* src/rtl/fscopy.c
* contrib/hbmemio/memio.c
* contrib/hbnetio/netio.h
* contrib/hbnetio/netiocli.c
* contrib/hbnetio/netiosrv.c
* renamed C functions hb_file[GS]etAttr() to hb_fileAttr[GS]et()
* renamed C functions hb_file[GS]etFileTime() to hb_fileTime[GS]et()
* contrib/hbnetio/netio.h
* contrib/hbnetio/netiocli.c
* contrib/hbnetio/netiosrv.c
+ added support for redirecting hb_vfConfig() to the server.
NETIO does not use it anyhow NETIO works as full redirector
to server system and it may be used on the server side.
* include/hbapifs.h
* src/rtl/filebuf.c
+ added new C function hb_filePOpen()
* include/hbset.h
* src/vm/set.c
* src/rtl/console.c
* changed hb_fs*() API to hb_file*() API in HVM SETs
* src/vm/memvars.c
* changed hb_fs*() API to hb_file*() API in .mem files
* src/vm/runner.c
* changed hb_fs*() API to hb_file*() API in .hrb files
* include/hbapifs.h
* src/rtl/filesys.c
* renamed hb_fsPOpen() param
* contrib/hbhpdf/3rd/libhpdf/hpdffdfj.c
! removed executable attribute
* src/vm/thread.c
! fixed typo reported by Viktor - thanks.
* include/hbapifs.h
* src/rtl/hbproces.c
* src/rtl/spfiles.c
* src/rtl/filesys.c
* src/rtl/file.c
* synced parameter file and dir names used in declarations and
implementations
* include/hbrddcdx.h
+ added few fields used in ADI files
* src/codepage/cp_utf8.c
* src/rtl/cdpapi.c
! always return -1, 0 and 1 from hb_cdpcmp() function.
Workaround for problem exploited by optimized memcmp() function.
* src/rdd/dbfntx/dbfntx1.c
! fixed possible sort problem when optimized memcmp() is used
* added feew missing const declarations
* src/rdd/dbfntx/dbfntx1.c
* src/rdd/dbfnsx/dbfnsx1.c
* src/rdd/dbfntx/dbfntx1.c
! fixed OrdWildSeek() to work with optimized memcmp()
* include/hbapifs.h
* src/rtl/disksphb.c
+ added new C function:
double hb_fsDiskSpace( const char * pszPath, HB_USHORT uiType );
* include/hbapifs.h
* src/rtl/direct.c
+ added new C function:
PHB_ITEM hb_fsDirectory( const char * pszDirSpec,
const char * pszAttributes );
* src/rtl/filesys.c
! report EOF in hb_fsEof() also when file position is out of file size
* updated comment
* include/hbapifs.h
* src/rtl/filebuf.c
+ extended Harbour FILE IO API and added support for read/write filepos,
directory and link operations.
Read/write filepos support in some systems (i.e. *nixes) needs additional
emulation code. If it's not necessary then this functionality can be
disabled by FXO_NOSEEKPOS attribute. Now this attribute is used by our
RDD code.
* src/rtl/Makefile
+ src/rtl/xfile.c
+ added PRG interface to Harbour FILE IO API
The following PRG functions are available for Harbour programmers:
HB_XEXISTS( <cFileName>, [ @<cDestFileName> ] ) -> <lOK>
HB_XERASE( <cFileName> ) -> <nResult>
HB_XRENAME( <cFileSrc>, <cFileDst> ) -> <nResult>
HB_XCOPYFILE( <cFileSrc>, <cFileDst> ) -> <nResult>
HB_XDIREXISTS( <cDirName> ) -> <lExists>
HB_XDIRMAKE( <cDirName> ) -> <nSuccess>
HB_XDIRREMOVE( <cDirName> ) -> <nSuccess>
HB_XDIRECTORY( [ <cDirSpec> ], [ <cAttr> ] ) -> <aDirectory>
HB_XDIRSPACE( <cDirName>, [ <nInfoType> ] ) -> <nFreeSpace>
HB_XGETATTR( <cFileName>, @<nAttr> ) -> <lOK>
HB_XSETATTR( <cFileName>, <nAttr> ) -> <lOK>
HB_XGETDATETIME( <cFileName>, @<tsDateTime> ) -> <lOK>
HB_XSETDATETIME( <cFileName>, <tsDateTime> ) -> <lOK>
HB_XLINK( <cExistingFileName>, <cNewFileName> ) -> <nSuccess>
HB_XLINKSYM( <cTargetFileName>, <cNewFileName> ) -> <nSuccess>
HB_XLINKREAD( <cFileName> ) -> <cDestFileName> | ""
HB_XOPEN( <cFileName>, [ <nMode> ], [ <nAttr> ] ) -> <pHandle> | NIL
HB_XCLOSE( <pHandle> ) -> <lOK>
HB_XLOCK( <pHandle>, <nStart>, <nLen>, [ <nType> ] ) -> <lOK>
HB_XUNLOCK( <pHandle>, <nStart>, <nLen> ) -> <lOK>
HB_XLOCKTEST( <pHandle>, <nStart>, <nLen>, [ <nType> ] ) ;
-> <nPID> | 0 (nolock) | -1 (err)
HB_XREAD( <pHandle>, @<cBuff>, [ <nToRead> ], [ <nTimeOut> ] ) ;
-> <nRead>
HB_XWRITE( <pHandle>, <cBuff>, [ <nToWrite> ], [ <nTimeOut> ] ) ;
-> <nWritten>
HB_XREADAT( <pHandle>, @<cBuff>, [ <nToRead> ], [ <nAtOffset> ] ) ;
-> <nRead>
HB_XWRITEAT( <pHandle>, <cBuff>, [ <nToWrite> ], [ <nAtOffset> ] ) ;
-> <nWritten>
HB_XSEEK( <pHandle>, <nOffset>, [ <nWhence> ] ) -> <nOffset>
HB_XTRUNC( <pHandle>, [ <nAtOffset> ] ) -> <lOK>
HB_XSIZE( <pHandle> ) -> <nSize>
HB_XEOF( <pHandle> ) -> <lEOF>
HB_XFLUSH( <pHandle>, [ <lDirtyOnly> ] ) -> NIL
HB_XCOMMIT( <pHandle> ) -> NIL
HB_XCONFIG( <pHandle>, <nSet>, [ <nParam> ] ) -> <nResult>
HB_XHANDLE( <pHandle> ) -> <nOsHandle>
HB_XTEMPFILE( @<cFileName>, [ <cDir> ], [ <cPrefix> ], [ <cExt> ], ;
[ <nAttr> ] ) -> <pHandle> | NIL
Please remember that not all redirectors have to support all of them.
I.e. MEMIO allows to use directory names in files but does not allow to
create or remove directories. It also does not support file attributes
and times in current implementation though it can be easy added.
HB_XCONFIG() is general function which can be used by redirector
authors to make some special operations which are specific to given
device.
HB_XTEMPFILE() always creates temporary files on local system without
switching to FILE IO redirector. It's intentional behavior.
* src/rtl/fscopy.c
* used Harbour FILE IO API in hb_fsCopy()/HB_FCOPY()
Please remember that HB_FCOPY() always makes operation using current
system when HB_XCOPY() may optimize it moving the operation to low
level subsystem or even other computer i.e. NETIO can do that when
both files are located on the same server.
* src/rdd/delim1.c
* src/rdd/sdf1.c
* src/rdd/dbf1.c
* src/rdd/dbfcdx/dbfcdx1.c
* src/rdd/dbffpt/dbffpt1.c
* src/rdd/dbfnsx/dbfnsx1.c
* src/rdd/dbfntx/dbfntx1.c
* src/rdd/hsx/hsx.c
* open files with FXO_NOSEEKPOS attribute to inform low level API that
read/write filepos is not used (disables unnecessary filepos emulation).
* contrib/hbnetio/netio.h
* contrib/hbnetio/netiocli.c
* contrib/hbnetio/netiosrv.c
+ added support for extended Harbour FILE IO API.
* contrib/hbnetio/utils/hbnetio/netiomgm.hb
! renamed "quit" command to "shutdown" as suggested by Rolf.
* contrib/hbnetio/utils/hbnetio/hbnetio.prg
* allow to interrupt server process using ESC when run in console window.
* contrib/hbmemio/memio.c
+ added support for extended Harbour FILE IO API.
I left two minor TODO notes - maybe someone will try to implement it.
* (all files)
* stripped svn header
* minor cleanups
; use following command to find out the history of files:
git log
git log --follow
git blame
git annotate