* include/hbapigt.h
* src/rtl/inkeyapi.c
+ added new C function:
int hb_inkeyKeyExt( int iKey );
It extracts function/edit key code value HB_KX_* from Harbour extended
key code. If passed keycode is not valid extended keycode which points
to function/edit key then 0 is returned.
* include/harbour.hbx
* src/rtl/inkey.c
+ added new PRG function hb_keyExt() - it's wrapper to hb_inkeyKeyExt()
* include/harbour.hbx
* src/rtl/mlcfunc.c
! restored original Cl*pper behavior in memo line functions,
test shows that inside MemoEdit() Cl*pper internally uses a little
bit different rules to format text then in memo line functions,
It's Cl*pper bug but hard to fix because any differences to Cl*pper
in this area cause that someone reports them as bug. So I decided
to leave original Cl*pper behavior for compatibility and add new
function which can be used in MemoEdit() and related code.
+ added new memo line function:
hb_MLEval( <cString>, <bCode>, [ <nLineLength>=79 ],
[ <nTabSize>=4 ], [ <lWrap>=.T. ],
[ <nPos> ], [ @<nRow> ], [ @<nCol> ] ) -> <nLines>
it formats texts using rules like in Cl*pper MemoEdit() not Cl*pper
memo lines functions. For each processed line <bCode> is executed
with 2 parameters: <cLine> and <lSoftCR>. It recognizes and accepts
any EOLs just like hb_ATokens( <cText>, .T. ) and strips or converts
soft CRs depending on word wrap mode.
* src/rtl/teditor.prg
* Use hb_MLEval() to format text
% minor optimization
* src/rtl/memoedit.prg
* enabled Harbour extended key codes
* small optimization
! fixed ME_BOTTOMRIGHT processing
! fixed initial line size calculation
* src/vm/thread.c
* removed dymmy code
* src/rtl/hbcom.c
* src/rtl/gtcrs/gtcrs.c
* src/rtl/gtpca/gtpca.c
* src/rtl/gtstd/gtstd.c
* src/rtl/gttrm/gttrm.c
* added workaround for bug in some Linux kernels (i.e.
3.13.0-64-generic Ubuntu) in which select() unconditionally
accepts terminal device for reading if c_cc[ VMIN ] = 0
It's very serious problem, i.e. in GTTRM no input is possible
in such kernels without this workaround.
* src/rtl/dirscan.prg
* modified hb_DirScan() and hb_DirRemoveAll() to work with Harbour
File IO API (hb_vf*() functions)
+ added new PRG function:
hb_FileDelete( <cFileMask> [, <cAttr> ] ) -> <lResult>
this function removes files which match given <cFileMask>
(it may contain path) and returns .T. if at least one file
was deleted. Optional <cAttr> parameter can be used to include
system ("S") and hidden ("H") files. If <cAttr> contains "R"
letter then before deleting READONLY attribute is removed from
files (it's necessary to remove files with READONLY attribute
in systems like DOS, MS-Windows or OS2). This function uses
Harbour File IO API (hb_vf*() functions)
* remove READONLY attribute from files in hb_DirRemoveAll()
* include/harbour.hbx
+ added hb_DirRemoveAll() and hb_FileDelete()
* contrib/hbct/files.c
! do not allow to remove empty directories by FileDelete() function
even if user explicitly sets directory attribute - CT3 compatible fix.
! remove READONLY attribute before deleting READONLY files if 2-nd
parameter of FileDelete() contains READONLY bit
* src/rtl/filesys.c
* formatting
* ChangeLog.txt
! typo
* include/hbapicls.h
* src/vm/classes.c
* minor modification in variable name
* src/rtl/filebuf.c
* src/rtl/fscopy.c
* src/rtl/fslink.c
* src/rtl/vfile.c
* cleaned FError() setting. It should not be changed by C file IO
functions because they can be activated from RDD code so accessing
work area field could change the FError() result, i.e. this code
does not work when FError() is changed by C level IO operations:
AnyFunc( FSeek( hFile, 0, FS_END ), field->MEMOVAL, FError() )
Even simple field access may cause file IO operations in RDD code
when relations are set because records in child area are repositioned
only when necessary (when user tries to make some operations on this
area). In the past RDD code was full of constructions like:
uiSaveError = hb_fsFError();
// make some IO operations
hb_fsSetFerror( uiSaveError );
to eliminate such overhead I separated PRG level FError() from
C level IOError(). Please keep it.
* ChangeLog.txt
! few typos
* include/hbvmpub.h
* src/vm/hvm.c
+ added support for hb_vmAtInit(), hb_vmAtExit() and hb_vmAtQuit()
functions for dynamically loaded libraries
This modification should also fix issue #33
* contrib/hbhpdf/3rd/libhpdf/hpdfimac.c
! removed obsolete memory.h
* contrib/hbhpdf/3rd/libhpdf/libhpdf.dif
* rediffed
* include/hbdate.h
* enabled reentrant safe version of localtime() and gmtime() in all
OpenWatcom builds
* 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/hbdefs.h
* changed reference 32-bit reference counters in Win64 builds to 64-bit
ones. It resolves problems with data alignment in memory allocated
by hb_xgrab().
* src/vm/asort.c
* removed hack for MinGW64 build from new array sort code,
after switching to 64bit reference counters it should not
be longer necessary because allocated that has 64bit alignment
* 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.
* include/fileio.ch
+ added few HB_VF_* macros for hb_vfConfig() settings
* contrib/hbcomio/comio.c
* contrib/hbtcpio/tcpio.c
+ implemented HB_VF_TIMEOUT, HB_VF_PORT, HB_VF_SHUTDOWN, HB_VF_RDHANDLE
and HB_VF_WRHANDLE hb_vfConfig() settings, i.e. now
hb_vfConfig( pFile, HB_VF_TIMEOUT, <nTimeOut> ) -> <nTimeOut>
can be used to change default timeout in TCP and COM Harbour File IO
handles.
* include/hbsocket.h
* src/rtl/hbsockhb.c
+ added socket filters to standard socket API.
At C level hb_sockex*() function with PHB_SOCKEX handler can be
used to operate on socket filters. At PRG level standard hb_socket*()
functions can be used.
The following things has been changed in PRG hb_socket*() functions:
hb_socketErorrString() can accept <pSocket> as 1-st or 2-nd parameter
and redirect call to socket filter errorStr() method.
hb_socketClose() executes automatically shutdown() for connected
sockets - it is important in windows only where without explicit
call to shutdown() before close transmitted data can be lost.
hb_socketSend() and hb_socketRecv() can be redirected to filter
streams if filter set such redirection. If filter does not redirect
them then they operate on raw sockets. If hb_socketSend() is
redirected then sent data is flushed automatically.
The following new PRG functions has been added:
Add/replace socket filter:
hb_socketSetFilter( <pSocket>, [<cFilterName>], [<hParams>] )
-> <pSocket> | NIL
<cFilterName> is filter name, It's possible to set many filters
in single hb_socketSetFilter() call separating filter names
with "|" character, i.e.:
pSock := hb_socketSetFilter( pSock, "ZSOCK|BFSOCK", hParams )
<hParams> is hash array with initialization parameters used by
given socket filter. The core implementation recognize the
following settings:
"readahead" - numeric value with size of read ahead buffer
"flush" - numeric value with auto flush parameter (for more
information look at hb_socketAutoFlush() below)
"redir" - logical value which can be use to enable/disable
hb_socketSend() and hb_socketRecv() redirection
to filter stream.
Return filter name used by socket:
hb_socketGetFilter( <pSocket> ) -> <cFilterName>
Read from socket stream:
hb_socketRead( <pSocket>, @<cData>, [<nLen> = Len( cData )],
[<nTimeout> = FOREVER] ) -> <nRead>
this function is similar to hb_socketRecv() but is always
redirected to socket stream filters.
Write to socket stream:
hb_socketWrite( <pSocket>, <cData>, [<nLen> = Len( cData )],
[<nTimeout> = FOREVER] ) -> <nWritten>
this function is similar to hb_socketSend() but it is always
redirected to socket stream filters. Written data is not flushed
by default and it should be flushed explicitly by hb_socketFlush().
Automatic flushing can be enabled by hb_socketAutoFlush() function.
Flush data written to socket:
hb_socketFlush( <pSocket>, [<nTimeout> = FOREVER], [<lSync>] )
-> <nNotFlushed>
<lSync> parameter is logical value which can be used to force
special synchronization method in some filters. Usually users
do not have to use it in normal code.
Enable/disable automatic flushing of written data.
hb_socketAutoFlush( <pSocket>, [ <nTimeout> ] ) -> <nTimeout>
<nTimeout> is timeout for automatic flush operation on written
data in milliseconds. <nTimeout> = -1 means wait forever and
<nTimeout> = 0 disables auto flush.
automatic flushing can help in adopting existing code anyhow it
may strongly reduce the performance in some filters, i.e.
compression filters like ZSOCK have to add special data to the
stream after each flush operation so it's suggested to call
flush explicitly when we want to force delivering written data
to the peer.
* include/hbznet.h
* src/rtl/hbznet.c
+ added ZNET socket filter - compressed and encrypted streams are
compatible with hb_znet*() streams. The old hb_znet*() interface
is obsolete for pure socket communication and if not used as
hb_inet*() filter then should be replaced by hb_sockex*() in
user programs.
ZNET socket filter can be created by new PRG functions:
hb_socketNewZNet( <pSocket>, [<cPass>], [<nCompressionLevel>], ;
[<nStrategy>] ) -> <pSocket> | NIL
or by standard socket API with "ZNET" as filter name.
ZNET filter recognize the following settings in initialization
hash array:
"key" or "pass" - string with encryption password
"zlib" - numeric compression level (HB_ZLIB_COMPRESSION_*)
"zs" - numeric ZLIB compression strategy (HB_ZLIB_STRATEGY_*)
ZNET filter always disables any other filters and operates on raw
socket.
Please remember that it's optional module. If programmer does not
use hb_socketNewZNet() explicitly and prefers using hb_socketNew()
then he should force linking this module by REQUEST hb_socketNewZNet
+ added fSync parameter to hb_znetFlush()
[INCOMPATIBLE]
* src/rtl/hbinet.c
* call flush filter function before socket is closed
* src/rtl/Makefile
+ src/rtl/hbzsock.c
+ added ZSOCK socket filter - ZLIB and GZIP compression for socket
streams.
ZSOCK socket filter can be created by new PRG functions:
hb_socketNewZSock( <pSocket>, [<hParams>] ) -> <pSocket> | NIL
or by standard socket API with "ZSOCK" as filter name.
Programmers using hb_socketNew() can force linking this module by
REQUEST hb_socketNewZSock
ZSOCK filter can be used with other filters.
ZSOCK filter recognize the following settings in initialization
hash array:
"zlib" - numeric compression level (HB_ZLIB_COMPRESSION_*)
"zs" - numeric ZLIB compression strategy (HB_ZLIB_STRATEGY_*)
"zin" - logical value which allow to enable/disable ZLIB
decompression on input stream (default)
"gzin" - logical value which allow to enable/disable GZIP
decompression on input stream - it's possible to
enable both ZLIB and GZIP decompression together
so both streams can be decompress
"zout" - logical value which allow to enable/disable ZLIB
compression on output stream (default)
"gzout" - logical value which allow to enable/disable GZIP
compression on output stream - if both "zout" and
"gzout" are enabled GZIP compression is used.
* src/rtl/Makefile
+ src/rtl/hbbfsock.c
+ added BFSOCK socket filter - BlowFish input and output stream
encryption in CTR mode.
BFSOCK socket filter can be created by new PRG functions:
hb_socketNewBFSock( <pSocket>, [<hParams>] ) -> <pSocket> | NIL
or by standard socket API with "BFSOCK" as filter name.
Programmers using hb_socketNew() can force linking this module by
REQUEST hb_socketNewBFSock
BFSOCK filter can be used with other filters, i.e. with ZSOCK.
Please only remember that good encryption algorithms have to
generate data which cannot be compressed so using "BFSOCK|ZSOCK"
only wastes resources and correct filter order is "ZSOCK|BFSOCK".
BFSOCK filter recognize the following settings in initialization
hash array:
"key" or "pass" - string with encryption password
"iv" - string with initialization vector for CTR mode
* contrib/hbssl/hbssl.ch
* contrib/hbssl/hbssl.h
* contrib/hbssl/hbssl.hbm
* contrib/hbssl/hbssl.hbx
* contrib/hbssl/ssl.c
* contrib/hbssl/ssl_inet.c
+ contrib/hbssl/ssl_sock.c
+ added SSL socket filter
SSL socket filter can be created by new PRG functions:
hb_socketNewSSL_connect( <pSocket>, <pSSL> [, <nTimeout> ] )
-> <pSocketSSL> | NIL
hb_socketNewSSL_accept( <pSocket>, <pSSL> [, <nTimeout> ] )
-> <pSocketSSL> | NIL
or by standard socket API with "SSL" as filter name.
Programmers using hb_socketNew() can force linking this module by
REQUEST hb_socketNewSSL_connect
or
REQUEST hb_socketNewSSL_accept
SSL filter always disables any other filters and operates on raw
socket.
SSL filter recognize the following settings in initialization hash
array:
"ctx" or "key" - pointer SSL item <pSSL>
"timeout" - timeout (numeric)
"client" - logical value indicating client mode (SSL_connect())
"server" - logical value indicating server mode (SSL_accept())
* contrib/hbssl/tests/inetssl.prg
! cleaned typo in local function name
* contrib/hbnetio/netiocli.c
* contrib/hbnetio/netiosrv.c
* use new Harbour extended socket API (hb_sockex*()) instead of
raw sockets and hb_znet*()
* contrib/hbtcpio/tcpio.c
* use new Harbour extended socket API (hb_sockex*()) instead of
raw sockets
+ implemented hb_fileFlush()
* 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.
* src/rtl/chruni.c
* added new functions hb_BStuff() and hb_UStuff()
* src/rtl/Makefile
- src/rtl/padc.c
- src/rtl/padl.c
- src/rtl/padr.c
+ src/rtl/padx.c
* added new functions hb_BPadL(), hb_BPadR(), hb_BPadC(),
hb_UPadL(), hb_UPadR() and hb_UPadC()
* include/harbour.hbx
* updated
* src/rtl/memoedit.prg
* src/rtl/teditor.prg
* use hb_U*() functions for string manipulation - now it works
correctly with mulitbyte encodings even if HVM CP does enabled
character indexing, i.e. "UTF8"
* src/rtl/vfile.c
* pacified BCC warnin
* src/rtl/filesys.c
* src/rtl/fssize.c
* use GetFileAttributesEx() if available in given windows version
to get file size and time
* 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/harbour.hbx
* src/rtl/cdpapihb.c
+ added new PRG function:
hb_cdpIsCharIdx( [ <cCdpID> ] [, <lNewMode>] ) -> <lPrevMode>
It returns .T. when given codepage uses custom character indexes
instead of byte indexes.
If <cCdpID> is not specified then current HVM codepage is used.
Optional logical parameter <lNewMode> allows to enable/disable
custom character indexes in codepages which have such functionality,
i.e. UTF8, BIG5, CP950.
* src/rtl/rtlshort.c
* removed __QUITCANCEL() - this function does not exist in Cl*pper.
* src/common/hbprintf.c
* removed modfl() protection with old HB_OS_IPHONE macro.
If someone will need it for some old iOS versions then please read
it protected by HB_OS_IOS and __IPHONE_OS_VERSION_MIN_REQUIRED
macros or inform me about the exact iOS version which do not support
modfl() and I'll add it.
* include/hbatomic.h
* disable GCC atomic macros for GCC <= 4.5 in OS2 builds.
They can be manually enabled by users using:
set HB_USER_CFLAGS=-DHB_USE_GCCATOMIC
* include/hbsetup.h
* set HB_OS_IOS when __IPHONE_OS_VERSION_MIN_REQUIRED is defined
* include/hbsetup.h
* src/common/hbver.c
* detect 64bit ARM CPUs
* contrib/hbct/envparam.c
* contrib/hbnf/getenvrn.c
! disabled ENVPARAM() and FT_GETE() in iOS builds
+ added support for FT_GETE() in OS2 builds
* include/harbour.hbx
* src/vm/cmdarg.c
+ added new PRG function
hb_ACmdLine() -> <array>
borrowed from Viktor's branch (2015-03-12 03:02 UTC+0100 Viktor Szakats)
It returns array with all command line parameters. Unlike
hb_AParams( __dbgProcLevel() - 1 )
hb_ACmdLine() returns all parameters also hidden ones just like
hb_CmdLine() function and hb_argv()/hb_argc()
Please also remember that hb_AParams() returns current value of
parameters which could be changed bu user code so they can be different
then original parameters passed to given function.
* src/rtl/gtchrmap.c
* casting
* include/std.ch
* synced casing with Viktor's branch
* include/std.ch
+ added VIA and CODEPAGE parameters to SORT TO and TOTAL TO commands
* formatting
* include/hbsix.ch
* synced SIX3 compatible SORT TO command with core SORT TO parameters
* include/hbapirdd.h
* include/hbusrrdd.ch
+ added DBTF_RECALL flag which disables transferring record DELETED flag
* src/rdd/dbcmd.c
* src/rdd/workarea.c
! disable transferring DELETED flag to destination area in SORT TO /
__dbArrange() operations
* src/rdd/delim1.c
* src/rdd/sdf1.c
+ added dummy RECALL() methods - now RECALL() can be executed by workarea
TRANSREC() method when DBTF_RECALL flag is set
* 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/hbapi.h
* src/vm/garbage.c
+ added hb_gcDummyClear() function
* include/hbapirdd.h
* include/hbusrrdd.ch
+ added DBTF_CPYCTR constant value - when set in dbTransInfo.uiFlags
then after record transfer field counters should to be copied from
source to destination area
* include/hbapirdd.h
* src/rdd/wafunc.c
+ added new C functions hb_dbTransInfoPut() and hb_dbTransInfoGet()
which allow to store and retrieve pointer to DBTRANSINFO structure
into/from HB_ITEM with strict type verification.
* src/rdd/wafunc.c
* pass pointer to DBTRANSINFO structure as argument of DBI_TRANSREC
action. It allows RDD serving destination area to decide which
fields and how should be transferred updating uiFlags, uiItemCount
and lpTransItems members of DBTRANSINFO.
If RDD removes all fields from DBTRANSINFO structure (uiItemCount==0)
or does not return HB_SUCCESS for DBI_TRANSREC action (default WA
implementation returns HB_SUCCESS so it's not necessary to overload
it if RDD does not make any additional operations) then record
transfer is interrupted.
* copy field counters only when destination area asked about it setting
DBTF_CPYCTR in dbTransInfo.uiFlags in DBI_TRANSREC action.
* src/rdd/dbf1.c
* do not copy automatically updated fields when destination area
is not empty
* set DBTF_CPYCTR to indicate that counters should be copied from
source to destination area when original value of automatically
updated fields are transferred
; Now DBF* RDDs in Harbour respects the following rules for record
transfer operations (COPY TO / APPEND FROM) with automatically
updated fields:
- COPY TO transfers original values to destination table and
finally copy counters from the source table to destination one
so autoincrement fields in both tables after next append will be
initialized with the same values regardless of number of copied
records - even if only single record is copied then counters in
destination table will inherit next values for new record from
the source table. Also values of RowVer and ModTime fields are
copied from source to destination table and not updated during
transfer operation.
- APPEND FROM works like COPY TO (original field values and then
counters are copied to destination table) if the source table
supports counters and destination table is empty and FLocked()
or opened in exclusive mode.
If source table does not support counters for given fields, i.e.
it is processed by transfer RDD like DELIM or SDF (RDT_TRANSFER)
or destination table is not empty or opened in shared mode and
FLock is not set when APPEND FROM is executed then automatically
updated fields (counters, RowVer, ModTime) are not copied and
initialized with new values like for each new record added to
destination table.
* ChangeLog.txt
! typo in last ChangeLog entry
* include/hbapi.h
! fixed HB_ISMEMO() macro, original version was accepting the same
items as HB_ISCHAR() so it was not compatible with ISMEMO() macro
in Cl*pper.
* src/rtl/valtype.c
* use HB_ISMEMO() macro
* contrib/rddads/ads1.c
! use AdsSetLongLong() (if available) instead of AdsSetDouble() to not
strip less significant bits from 64bit integer number during conversion
to double
* allow ADS to decide if writing into rowver and modtime fields is legal
instead of generating our own arbitrary RTE
* include/dbinfo.ch
* src/rdd/workarea.c
+ added new dbInfo() action DBI_TRANSREC
It indicates if area is destination table of currently processed COPY TO
or APPEND FROM operation.
* include/hbapirdd.h
* src/rdd/wafunc.c
+ added new C function:
HB_ERRCODE hb_dbTransCounters( LPDBTRANSINFO lpdbTransInfo );
It copies field counters from source into destination table used
in transfer operation.
* src/rdd/dbcmd.c
* src/rdd/wafunc.c
+ call DBI_TRANSREC to inform destination area that record transfer
operation starts and stop. It allows destination RDD to change
rules used for assign to automatically updated fields, i.e. unblock
such operation.
+ call hb_dbTransCounters() to update counters in destination table
after COPY TO operation
* src/rdd/sdf1.c
* src/rdd/delim1.c
* clear AutoInc flag
* src/rdd/dbf1.c
+ allow to set get and set counter for RowVer fields using DBS_COUNTER
action
* return HB_FAILURE for DBS_COUNTER and DBS_STEP if it's not supported
by given field.
+ added support for DBI_TRANSREC - in case of DBF* RDDs it unblocks
writing to automatically updated fields
* contrib/hbssl/tests/inetssl.prg
* contrib/rddads/ads1.c
* src/rtl/teditor.prg
* formatting of my recent modifications taken from Viktor's branch
* src/common/hbfsapi.c
* src/compiler/complex.c
* formatting
* include/hbset.h
* src/vm/set.c
* src/nortl/nortl.c
+ add new C functions to change HVM set values:
hb_setSetFileCase(), hb_setSetDirCase(), hb_setSetDirSeparator(),
hb_setSetTrimFileName()
* include/hbcomp.h
* include/hbcompdf.h
* src/compiler/cmdcheck.c
* src/compiler/hbmain.c
* src/compiler/ppcomp.c
* src/compiler/genc.c
* src/compiler/hbusage.c
* src/nortl/nortl.c
* rewritten code used to parse command line and environment parameters.
New code is covered by GPL + Harbour exception license.
All parameters are decoded by only one function and whole code is
smaller so it's much easier to modify this code.
! fixed some small bugs and incompatibilities with Cl*pper in parameter
parsing
! fixed -y undocumented (YYDEBUG) switch
- removed -x[<prefix>] set symbol init function name prefix (for .c only)
compiler command line switch
* moved -fn[:[l|u]|-] -fd[:[l|u]|-] -fp[:<char>] and -fs[-] switches
parsing to core compiler library. Now these switches are also works
with compiler library linked with HBMK2.
; TOFIX: HBMK2 ignores -fn/-fd switches and allocates temporary names
which are not compatible with names used later by harbour
compiler when above switches are activated. HBMK2 should
parse parameters and update SET FILECASE / SET DIRCASE before
it creates temporary files.
* src/codepage/l_fr.h
+ added 'Ç' and 'ç' characters to set of french letters
; this modification affected "FRISO" and "FRWIN" codepages.
Users using them and above characters in index field should
reindex their databases.
* include/hbcpage.hbx
* src/codepage/Makefile
* src/codepage/cpfr850.c
+ src/codepage/cpfr850c.c
* renamed "FR850" codepage to "FR850C". This is is Cl*pper ntxfre.obj
compatible codepage.
If someone uses DBF files with indexes simultaneously with Cl*pper
applications using collation order defined in ntxfre.obj the he has
to use "FR850C" codepage in Harbour.
Warning: Any users using French "FR850" codepage so far should change
the code to "FR850C".
+ added new French codepage "FR850" with all French characters and
accented equal collation rules.
; above modifications close issue #88
* include/hbznet.h
* src/rtl/hbinet.c
+ added new C function hb_znetInetTimeout()
* minor cleanup (local variables localization)
* contrib/hbssl/hbssl.hbm
* contrib/hbssl/hbssl.hbx
+ contrib/hbssl/ssl_inet.c
+ added support for SSL/TLS encryption in hb_inet*() sockets.
To enable SSL/TLS encryption on such socket it's enough to
call hb_inetSSL_connect() or hb_inetSSL_accept() passing as
1-st parameter hb_inet socket item with already established
connection and in in the 2-nd parameter SSL item. The peer
should call second function. In general hb_inetSSL_connect()
should be called by client and hb_inetSSL_accept() by server.
To use hb_inetSSL_accept() it's necessary to also set
certificated (at least self ;-)) encryption keys. See the
example I committed to test directory.
The exact syntax of new functions is:
hb_inetSSL_connect( <pSocket>, <pSSL> [, <nTimeout> ] )
hb_inetSSL_accept( <pSocket>, <pSSL> [, <nTimeout> ] )
To use hb_inet*() functions to connect with SSL/TLS server
Harbour users only have to call hb_inetSSL_connect() after
setting connection, i.e.:
IF !Empty( sock := hb_inetConnect( cServer, nPort ) )
ssl_ctx := SSL_CTX_new()
IF hb_inetSSL_connect( sock, SSL_new( ssl_ctx ) ) == 1
// SSL connection established
// now user can use all hb_inet*() functions is
// the same way as for raw TCP connections and
// all parameters like timeouts are fully supported
// but transmission is encrypted.
[...]
ENDIF
ENDIF
It's not longer necessary to use SSL_set_fd() + SSL_connect()
and then SSL_read() / SSL_write() / hb_SSL_read_line() /
hb_SSL_read_all().
BTW hb_SSL_read_line() and hb_SSL_read_all() in HBSSL library
are broken and have to be fixed.
TODO: Now HBTIP library can be nicely simplified and additional
code for SSL/TLS read/write operations removed. It's
enough to once call hb_inetSSL_connect() if SSL/TLS
encryption is needed.
+ contrib/hbssl/tests/inetssl.prg
+ added test code for hb_inet*() SSL/TLS connections.
It's client and server example which also generates self
certificated encryption keys running openssl command.
If this code is linked with non console GT then user
should generated certificates himself (see comment in
LoadCertificates() function for more information).
* include/harbour.hbx
* src/vm/hvm.c
+ added new PRG function:
__BreakBlock() -> {|e| Break( e ) }
* include/hbexprb.c
% replace {|e| Break( e ) } with __BreakBlock() function call.
__BreakBlock() returns exactly the same codeblock on each call
so using it save memory and improve a little bit speed because
it's not necessary to allocate new GC memory block and register
it in GC block list. Additionally in MT mode it eliminates mutex
lock necessary to register new GC block.
* include/hbznet.h
* src/rtl/hbinet.c
* src/rtl/hbinetz.c
* moved HB_INET_ERR_* macros to header file
+ added error and errorStr functions to hb_inet*() socket read/write
wrappers
! call close function of hb_inet*() socket read/write wrappers before
closing the socket
+ added hb_znetInetFD() C function
* src/rtl/teditor.prg
! use hb_ATokens( <cText>, .T. ) and MemoLine() to divide text into lines
to improve performance and fix TABs decoding
* src/rtl/memoedit.prg
* src/rtl/teditor.prg
* applied recent fixes and cleanups from Viktor's branch.
* src/rtl/tgetlist.prg
* applied recent fixes from Viktor's branch:
; (2014-12-19 01:00 UTC+0100 Viktor Szakats)
! HBGetList():GUIApplyKey(): fixed bug introduced with UNICODE
support in 93d3a46d84 (upstream).
That patch had an undocumented workaround for the problem inside
ListBox():findText(), which was not Cl*pper compatible, so
it was later removed in 6f8508ff54a3955822b36bf4a65a2775a11bab23.
This patch hopefully fixes the root cause.
Reported here: https://groups.google.com/d/msg/harbour-devel/7Cpax5TdHnY/n5XfXX8N9vMJ
* include/hbcompdf.h
* include/hbexprb.c
* src/common/funcid.c
* src/vm/hvm.c
% optimize Array() function by replacing function call with HB_P_ARRAYDIM
PCODE. Because this optimization changes RTE and interacts with broken
code like
aVal := Array( 10, 0, "A" )
then it's not enabled by default. User can enable it by -ko switch.
* utils/hbtest/rt_array.prg
* use #pragma -ko- to for tests which interacts with above modification
* src/rtl/hbproces.c
% optimize memory allocation for redirected STDOUT and STDERR buffers in
hb_processRun() function.
The previous implementation was extremly inneficient when
hb_processRun() was used to extract very long output from
child process.
* src/rtl/hbtoken.c
+ added support for dividing text into lines using EOLs used by different
platform. To enable it it's enough to specify .T. as delimiter.
* src/rtl/filesys.c
* pacified MSVC warning - in fact this modification is significant only
for bugy code which changes current directory in MT programs. It's bug
on all platforms using current directory as process not thread
attribute (common behavior).
* include/inkey.ch
* src/rtl/hbgtcore.c
+ added new extended keycodes:
HB_K_TERMINATE
HB_K_MENU
* contrib/gtqtc/gtqtc1.cpp
+ center and rescale to console window dimension keeping aspect size ratio
picture passed to HB_GTI_DISPIMAGE when second parameter is .T.
+ added support for HB_K_MENU key
! fixed dynamic font size modification in fullscreen, maximized and
HB_GTI_RESIZEMODE_ROWS modes
* include/hbsocket.ch
+ added HB_SOCKET_ERR_NONE
* src/rtl/hbsocket.c
* clear socket error when hb_socketRecv*() or hb_socketSend*() returns
value greater then 0
% removed unnecessary error code setting in MS-Windows builds
of hb_socketGetIFaces()
* src/rtl/filesys.c
! allocate dynamically buffer for current directory name if default
one is too small when current disk is checked
* src/rtl/hbzlib.c
* use hb_xalloc()/hb_xfree() to allocate/free memory during
ZLIB compression and decompression instead of ZLIB default
ones (finished code started in Viktor's branch)
* src/rtl/tlabel.prg
* src/rtl/treport.prg
% use hb_ATokens() instead of local functions ListAsArray()
* simplified reading labels and reports from files
* src/rtl/teditor.prg
* src/rtl/tget.prg
* src/rtl/tlabel.prg
* src/rtl/treport.prg
* synced with Viktor's branch:
removed explicit NIL from parameters, formatting, updated comments
and variable names, use FOR EACH and SWITCH statements,
use hb_defaultValue(), use hb_StrShrink(), formatting, few fixes
* src/rtl/langcomp.prg
* synced with Viktor's branch
* src/rtl/memoedit.prg
* synced with Viktor's branch, optimizations, formatting and fixes:
; 2014-03-28 13:09 UTC+0100 Viktor Szakats
+ MemoEdit(): allow BLOCK and SYMBOL types for user callbacks
(only in the default, non-strict mode)
! MemoEdit(): fixed to only handle certain types of events in ME_INIT
stage in harmony with Cl*pper documentation
! MemoEdit(): fixed to not get into an infinite loop on initialization
when user callback is returning unhandled value
https://github.com/harbour/core/issues/21
! MemoEdit()/HBMemoEditor():KeyboardHook(): fixed to fall back to
default handling of K_ESC if getting called recursively
https://github.com/harbour/core/issues/21
+ HBMemoEditor():HandleUserKey(): now returns whether the event was
handled (as logical value) (previously: Self) [INCOMPATIBLE]
* fixed some misleading variable names
; 2014-01-28 03:11 UTC+0100 Viktor Szakáts
! MemoEdit() fixed to pass-through without interactivity
when the user function is a boolean .F.
; 2014-01-27 15:15 UTC+0100 Viktor Szakáts
% abort key checking optimized and made unicode compatible
* src/rtl/listbox.prg
* synced with Viktor's branch, optimizations, formatting and fixes:
; 2014-07-21 08:56 UTC+0200 Viktor Szakats
! ListBox():findData(): fixed to be able to search for non-string
data, to the same extent Cl*ipper is able to.
! ListBox():findData(): fixed exact/case-insensitive regression
from 6f8508ff54a3955822b36bf4a65a2775a11bab23
; 2014-07-21 03:26 UTC+0200 Viktor Szakats
+ LISTBOX object instance area made compatible with Cl*pper
(relevant when object is accessed as array)
; 2014-07-21 01:20 UTC+0200 Viktor Szakats
* renamed variable and macro to reflect their type
+ ListBox():findData(): documented potential RTE
; 2014-07-21 01:04 UTC+0200 Viktor Szakats
% ListBox():findText(), ListBox():findData(): use hb_LeftEq[I]()
! ListBox():findText(), ListBox():findData(): fixed to not RTrim()
while searching in EXACT mode. Regression from f61409bf19
+ ListBox():findText(), ListBox():findData(): allow to search
for any type of data in HB_CLP_STRICT mode to mimic Cl*pper behavior
! ListBox():findText(): fixed to allow zero length search text,
like Cl*pper. Regression from 93d3a46d84
! ListBox():addItem( cText, cData ): fixed to allow any type for cData,
not just NIL and string, like Cl*pper
+ ListBox():setData(): documented a Cl*pper bug
; 2014-03-09 18:19 UTC+0100 Viktor Szakáts
! ListBox():scroll() fixed to ignore non-numeric parameter
(like Cl*pper) instead of an RTE
* include/dbinfo.ch
+ added new rddInfo() action: RDDI_DECIMALS
* include/hbrdddbf.h
* src/rdd/dbf1.c
+ added support for RDDI_DECIMALS - when set it's used as default number
of decimal places in conversions to string for fields type "B" and "8"
with 0 number of decimal places in DBF header.
* include/hbgtinfo.ch
+ added HB_GTI_MINIMIZED
* contrib/gtqtc/gtqtc.h
* contrib/gtqtc/gtqtc1.cpp
+ added support for HB_GTI_MINIMIZED
* src/rtl/gtxwc/gtxwc.c
+ added support for HB_GTI_MINIMIZED and HB_GTI_MAXIMIZED
; All above modifications created by Rolf - thanks
* contrib/hbnetio/netiocli.c
* updated some RTEs to be a little bit more precise
* contrib/hbblat/hbblat.hbp
* disabled unconditional dynamic library build
* ChangeLog.txt
* doc/xhb-diff.txt
! typos
* doc/clipper.txt
! removed completely false information about 'LIST &cMacro'
* updated information about FOR EACH
; in general information in this file are outdated and does not
correctly describe current Harbour behavior. I strongly suggest
to not use it in any other documentation. In some spare time
I'll update this file or remove.
* doc/cmpopt.txt
+ added information about unsupported by Clipper syntax extension:
iif( <expr1>, <expr2>, <expr3> ) <op>= <expr4>
* include/hbrddnsx.h
* minor modification in comment
* src/macro/macrolex.c
* accept unconditionally hash 'key => value' operator
* src/rdd/dbfnsx/dbfnsx1.c
! fixed very bad bug in leaf key compression. This problem could be
exploited by keys containing containing CHR( 255 ) in encoded keys
just before trailing empty key characters.
This bug could cause index corruption.
* use hb_xgrabz()
* formatting