* include/hbapiitm.h
* src/rtl/hbdef.c
* src/vm/itemapi.c
* src/harbour.def
+ added new public C function
HB_BOOL hb_itemTypeCmp( PHB_ITEM pItem1, PHB_ITEM pItem2 );
which uses low level item type comparison code taken from hb_default()
and hb_defaultValue() PRG functions
* include/harbour.hbx
* src/harbour.def
* src/vm/hashfunc.c
+ added new PRG function
hb_HSetDef( <hVal>, <xKey> [, <xDefVal> ] )
it checks if <xKey> exists and if not then adds it to hash array
and optionally sets key value to <xDefVal> otherwise (the key
exists in hash array) and <xDefVal> is given then it checks if
the type of key's value is compatible with <xDefVal> and if not
then replaces key's value with <xDefVal>.
In other words it's combination of hb_HGetDef() and hb_default()
and works like this PRG code:
FUNCTION hb_HSetDef( hVal, xKey, xDefVal )
IF xKey $ hVal
hb_default( @hVal[ xKey ], xDefVal )
ELSE
hVal[ xKey ] := xDefVal
ENDIF
RETURN hVal
but much faster.
* src/rtl/dirscan.prg
* remove READONLY attribute from deleted directories.
Be careful. Now this function allows to recursively remove
all directories even if they have READONLY attribute.
* *
* 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/hbapiitm.h
* src/vm/itemapi.c
+ added new C function:
PHB_ITEM hb_itemPutNil( PHB_ITEM pItem );
* src/rdd/dbf1.c
! fixed yet another RDDI_SETHEADER clearing in internal DBF RDD code
* clear few passed variables before internal SELF_INFO() and
SELF_RDDINFO() read calls - they were safe in current code but
potentially may badly interact with 3-rd party DBF RDD wrappers.
* *
% 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
* src/vm/hvm.c
+ allow to compare symbol items with == operator, i.e.:
? @QOut() == &( "@QOut()" )
* include/hbapiitm.h
* src/vm/itemapi.c
+ added new C function:
hb_itemCompare( PHB_ITEM pItem1, PHB_ITEM pItem2,
HB_BOOL bForceExact, int * piResult );
For compatible types it compares pItem1 with pItem2 setting piResult
to -1, 0 or 1 if pItem1 is <, == or > then pItem2 and returns true
otherwise it returns false and does not touch piResult.
+ allow to compare symbol items in hb_itemEqual()
* 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 >=
* include/hbapicdp.h
* include/hbapiitm.h
* src/rtl/itemseri.c
* changed 2-nd parameter in hb_itemSerialize() and hb_itemSerializeCP()
from HB_BOOL fNumSize parameter to int iFlags.
Previous fNumSize is replaced by HB_SERIALIZE_NUMSIZE flag.
Warning: declaration is not backward compatible though existing code
using these functions is binary compatible so it will work
without recompilation.
+ added support for optional compression of serialized values.
It can be enabled in C code by HB_SERIALIZE_COMPRESS flag.
+ added support for serialization flags passed in 2-nd parameter to
hb_Serialize() PRG function.
; Info: support for compression and decompression exists only in
programs which are linked with ZLIB library. Programmers
which want to use it and so far the haven't used ZLIB functions
should add to their code REQUEST HB_ZCOMPRESS
* include/Makefile
+ include/hbserial.ch
+ added header file with Harbour serialization flags.
Now the following flags are supported:
HB_SERIALIZE_NUMSIZE
HB_SERIALIZE_COMPRESS
I'll add support for HB_SERIALIZE_OBJECTSTRUCT soon.
* src/rtl/hbi18n1.c
* contrib/hbnetio/netiocli.c
* contrib/hbnetio/netiosrv.c
* updated to use new Harbour serialization flags.
* (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