* include/Makefile
- include/hbdbsort.h
* src/rdd/Makefile
- src/rdd/hbdbsort.c
* src/rdd/dbf1.c
- completely removed old code used in DBF* RDDs as low level backend
for SORT TO ... command and __dbArrange() function.
It was buggy and extremely inefficient in some cases, i.e. after
20 hours I killed process which was sorting table with 2'000'000
records in reverted order so I cannot even say how much time it
needed.
* src/rdd/dbf1.c
+ added new code for table sorting in DBF* RDDs
(SORT TO ... / __dbArrange() backend)
New code fixes many different problems which existed in previous one
like missing support for national collation, wrong descending orders,
wrong sorting of numeric fields with negative values, missing support
for sorting many field types, missing support for transferring MEMO
fields, missing support for transferring records to table with different
field structure or serving by different RDD, etc.
New code is also many times faster then the old one. In practice it
means is now usable for tables with more then few thousands records,
i.e. the test table with 2'000'000 records I used with old code was
copied in sorted order in 13 secs. when pure COPY TO needed 10 secs.
Now it's possible to export sorted tables to different RDDs, i.e.
using DELIM or SDF RDDs in desitnation area.
New code is written in general form without any local to DBF* RDDs
extensions so it can be adopted as base in any other RDD. Probably
I'll move it to default workarea methods so it will be inherited by
all Harbour RDDs and only if necessary authors of some RDDs may
overload it, i.e. to move the operation to the server side in remote
RDDs when source and destination tables are processed by the same
server.
This modification closes the last known for years bug or rather bag
of bugs ;-) in Harbour.
; NOTE: For large tables new sorting algorithm may access source records
more then once. It means that results may be wrongly sorted when
sorted fields in exported records are modified concurrently by
other station during exporting. This can be easy eliminated by
copping source records to temporary file anyhow it will introduce
additional overhead in all cases and user can easy eliminate the
problem by simple FLOCK before sort or making export to temporary
file and then sorting this file or he can simply ignore this
problem as unimportant in the specific situation so I decided to
not implement double copping.
I haven't tested what Cl*pper exactly does in such case so
I cannot say if current behavior is or isn't Cl*pper compatible.
* include/Makefile
+ include/hbiousr.ch
* src/rtl/Makefile
+ src/rtl/iousr.c
+ added module for writting Harbour FILE IO redirectors at PRG level
+ tests/iotcp.prg
+ example code for FILE IO redirector written in PRG.
It's IOTCP and gives exactly the same functionality as TCP redirector
in contrib which is written in C.
* src/vm/runner.c
% modified internal structure to eliminate some memory allocations
* contrib/hbpgsql/rddcopy.c
% small simplification
* 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.
* include/Makefile
+ include/hbzlib.h
* include/hbzlib.ch
* src/rtl/Makefile
* src/rtl/hbzlib.c
+ added new C functions weakly bound with ZLIB library:
HB_SIZE hb_zlibCompressBound( HB_SIZE nLen );
HB_SIZE hb_zlibUncompressedSize( const char * pSrc, HB_SIZE nLen,
int * piResult );
int hb_zlibCompress( char * pDst, HB_SIZE * pnDst,
const char * pSrc, HB_SIZE nLen, int iLevel );
int hb_zlibUncompress( char * pDst, HB_SIZE * pnDst,
const char * pSrc, HB_SIZE nLen );
these functions can be used by any C code without forcing ZLIB liking.
If user usese in his code HB_ZCOMPRESS() function or has
REQUEST HB_ZCOMPRESS
then above funcitons are automatically bound with linked ZLIB library.
Otherwise they return 0 or HB_ZLIB_RES_UNSUPPORTED error.
* src/rdd/dbf1.c
* small code simplification
; added note about alternative numeric value rounding when
pure binary integer fields (without decimal places) are
assigned.
* src/common/hbdate.c
! added missing header for WinCE builds
* include/hbexpra.c
* minor simplification
* src/vm/macro.c
+ added new implementation for MemVarBlock() function. It's much faster
and does not force dynamic symbol table scanning on each call
* src/rtl/Makefile
- src/rtl/memvarbl.prg
- removed previous implementation of MemVarBlock()
* src/rtl/tgetint.prg
! fixed __Get() and __GetA() to return NIL when cVarName parameter
is not string (CA-Cl*pper compatible)
! fixed __GetA() to return NIL when given aIndex parameter or value
returned by variable block is not array (CA-Cl*pper compatible)
! fixed __Get() and __GetA() to use FieldWBlock() instead of manually
created macro block which didn't respect workarea
(CA-Cl*pper compatible)
! fixed __GetA() to create SET/GET block instead of access block
(CA-Cl*pper compatible)
! fixed __Get() and __GetA() to not create simple SET/GET macro
blocks but always force memvar usage (CA-Cl*pper compatible).
Please remember that
&( "DATA" )
gives code which tries to access field then memvar but
&( "DATA := .T." )
gives code which always tries to assign memvar and does not even
check if "DATA" field exists in current WA. It means that macro
compiled code like:
&( "{|_1| iif( _1 == NIL, DATA, DATA := _1 ) }" )
should not be used because gives higher priority for fields in
access operation and always assigns memvars, if necessary creating
them.
! allow to dynamically create memvars for get objects in error handler
(CA-Cl*pper compatible)
% use much faster MemVarBlock() instead of manually created codeblock
which activates dynamic symbol table scanning on each call
* (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