* 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()
* include/hbrdddel.h
* src/rdd/delim1.c
+ added to DELIM RDD support for defined by user default filename
extenssion. It can be changed by:
hb_rddInfo( RDDI_TABLEEXT, ".csv", "DELIM" )
+ added to DELIM RDD support for exporting initial record with field
names. It can be enabled by:
hb_rddInfo( RDDI_SETHEADER, 1, "DELIM" )
and disabled by:
hb_rddInfo( RDDI_SETHEADER, 0, "DELIM" )
Importing from CSV files with such header is not supported yet but
I plan to add it so in the future RDDI_SETHEADER=1 will also effect
import (APPEND FROM).
* include/hbapigt.h
* src/rtl/gttrm/gttrm.c
* modified GTTRM to generate HB_K_CLOSE if input stream is closed and
then HB_K_TERMINATE on next inkey calls.
* src/rtl/hbznet.c
* src/rtl/hbzsock.c
! cleanup
* include/hbrdddel.h
* include/hbrddsdf.h
* src/rdd/delim1.c
* src/rdd/sdf1.c
+ added support for any standard EOL combination to DELIM and SDF RDDs,
Now LF, CRLF, CR and LFCR EOLs are supported and automatically
recognized during import if one of such EOLs is also set in HVM by
_SET_EOL.
% use 8192 bytes read ahead buffer to speed up import from DELIM and
SDF RDDs
+ modified file IO operations to work with stream only (no support for
file seek) Harbour File IO drivers
% optimized some File IO operations
* strip all EOF (^Z) characters from imported data. It's not strictly
Cl*pper compatible because Cl*pper interrupts import on first ^Z
character anyhow it was always the source of problems when .txt
files are concatenated by tools like 'cat' in *nixes so I decided
to change it.
+ added support RECORD clause command in commands like:
APPEND FROM "data.txt" RECORD (nRec) DELIMITED
APPEND FROM "data.txt" RECORD (nRec) SDF
It's Harbour extension - Cl*pper does not support it.
+ generate RTE when some unsupported in transfer RDDs methods are
called
+ src/3rd/hbdossrl/Makefile
+ src/3rd/hbdossrl/serial.c
+ src/3rd/hbdossrl/serial.h
+ src/3rd/hbdossrl/README
+ added DOS Serial Library - it's much cleaner and simpler then COMLib
we used so far in DOS builds. It also supports hardware and software
flow control. Many thanks for Karl Stenerud for his wonderful job.
* src/rtl/hbcom.c
+ added support for DOS Serial Library used as low level backend in
Harbour DOS builds.
* config/dos/djgpp.mk
* config/dos/watcom.mk
* config/dyn.mk
* config/lib.mk
* src/3rd/Makefile
* src/Makefile
* utils/hbmk2/hbmk2.hbp
* utils/hbmk2/hbmk2.prg
* use DOS Serial Library (hbdossrl) instead of COMLib (hbpmcom)
* include/harbour.hbx
* src/vm/hvm.c
+ added new PRG function:
__RecoverErrorBlock() -> <bError> | NIL
It extracts previous error block pushed on HVM stack
by BEGIN SEQUENCE WITH ...
* src/rdd/dbf1.c
! fixed detecting VFP tables broken in my previous
modification - thanks to Mario H. Sabado for information
about the problem.
* config/dos/watcom.mk
* config/win/watcom.mk
* config/linux/watcom.mk
! enabled -bd OpenWatcom switch for code compiled as part of dynamic
libraries
* use CauseWay as default DOS extender for dynamic DOS builds
* config/dyn.mk
* config/lib.mk
* src/Makefile
! fixed list of libraries used to create Harbour DLL in DOS builds
* config/bin.mk
* src/vm/Makefile
* create hbmainstd library for OpenWatcom DOS shared builds
* src/vm/maindllh.c
+ added DLL entry function for CauseWay DLLs in OpenWatcom builds
* src/vm/main.c
* include maindllh.c in OpenWatcom DOS shared builds
* utils/hbmk2/hbmk2.prg
+ added support for dynamic binaries in DOS OpenWatcom builds.
Support for CauseWay DLLs is still broken in current OpenWatcom
builds so it will have to wait for the fix to be usable.
* src/vm/dynlibhb.c
+ added support for dynamic libraries to OpenWatcom DOS builds.
Now it's enabled only in harbour.dll due to problems with
CW and current OW.
* src/3rd/zlib/zconf.h
* src/3rd/zlib/zlib.dif
* use OS2 patch for exporting ZLIB symbols also in DOS builds
* src/rdd/dbf1.c
* pacified warning
* include/dbinfo.ch
* include/hbrdddbf.h
* src/rdd/dbf1.c
+ added new RDD switch RDDI_SETHEADER
It allows to define how DBF header is updated in tables which
will be opened later, i.e.:
// maximize performance reducing number of DBF header updating
// header is updated only when table is closed if before new
// record was added
hb_rddInfo( RDDI_SETHEADER, DB_SETHEADER_MINIMAL )
or:
// update header in the same moment as Clipper and xBase++
// and store only last two digit from the year for compatibility
// with old dBase and FoxPro versions
hb_rddInfo( RDDI_SETHEADER, ;
hb_bitOr( DB_SETHEADER_CLIPPER, DB_SETHEADER_YYEAR ) )
// DB_SETHEADER_CLIPPER
By default Harbour uses DB_SETHEADER_APPENDSYNC.
For more information look at comments for DB_SETHEADER_* switches
in dbinfo.ch
+ added new table switch DBI_SETHEADER
It has the same meaning as RDDI_SETHEADER but changes the header
updated mode of already open table by dbInfo() function.
* src/rtl/filebuf.c
! added missing redirection for Configure() method.
* src/rtl/hbproces.c
! fixed sysconf() emulation for OpenWatcom 1.9 and earlier to work with
_SC_PAGESIZE
* include/hbstack.h
* src/vm/estack.c
+ added new C function:
HB_ISIZ hb_stackBaseSymbolOffset( PHB_SYMB pSymbol );
it returns offset of pSymbol function frame on HVM stack or -1
if function/procedure pointed by pSymbol is not called.
* contrib/hbnetio/readme.txt
* contrib/hbnetio/netiosrv.c
* contrib/hbnetio/hbnetio.hbx
+ added new server side function:
netio_ServedConnection() -> <pConnectionSocket>
It returns connection served by netio_Server() in current thread and
can be used inside executed RPC functions to access <pConnectionSocket>
* src/rdd/dbf1.c
* update DBF header only after modification in COMMIT and CLOSE methods.
It's Cl*pper and xBase++ compatible behavior anyhow it also means that
number of records in DBF header is not modified just after APPEND
so it cannot be used to synchronization in concurrent file access.
* src/rtl/hbproces.c
! safe and restore hb_fsError() when unused pipe handles are closed
in hb_fsProcessOpen()
! add extension (.com or .exe) in hb_fsProcessOpen()/hb_fsProcessRun()
when executed command is given with PATH part and without extension.
It's documented that DosExecPgm() needs full filename in such case.
It fixes problem with contrib/make.hb which calls hbmk2 with directory
part but without extension.
! enabled pipes instead of temporary files for stdio redirection in OS2
builds of hb_fsProcessRun() - now it should work correctly.
* src/rtl/hbprocfn.c
+ update FError() in hb_Proces*() functions
* include/hbjson.h
* src/rtl/hbjson.c
+ added new C function:
char * hb_jsonEncodeCP( PHB_ITEM pValue, HB_SIZE * pnLen,
HB_BOOL fHuman, PHB_CODEPAGE cdp );
It allows to pass explicitly codepage in which strings inside pValue
are encoded. If cdp parameter is not NULL then it's used to extract
unicode character values from passed strings and this values is used
to encode to encode non ASCII characters as "\uXXXX" where XXXX is
unicode character value. Data serialized in such way is 7bit clean.
If this parameter is NULL then strings are encoded in raw form just
like in hb_jsonEncode().
+ added new C function:
HB_SIZE hb_jsonDecodeCP( const char * szSource, PHB_ITEM pValue,
PHB_CODEPAGE cdp );
It allows to pass explicitly codepage used for strings decoded from
JSON data. If this parameter is NULL then strings are decoded in raw
form and unicode character with code over 255 are converted to '?'
char.
+ added optional 3-rd parameter with codepage ID to PRG functions
hb_jsonEncode() and hb_jsonDecode(). If this parameter is not given
then above functions works like before this modification:
hb_jsonEncode() uses raw string encoding and hb_jsonDecode() uses
current HVM CP to decode characters encoded as \uXXXX.
+ modified PRG function hb_jsonDecode() to return decoded data
instead of length of decoded data when second parameter is not
passed by reference.
* include/harbour.hbx
* src/rtl/dateshb.c
+ added two new PRG functions:
hb_SecToT( <nSeconds> ) -> <tTime>
hb_MSecToT( <nMilliseconds> ) -> <tTime>
* include/hbset.h
* src/vm/set.c
+ added new C function:
int hb_setUpdateEpoch( int iYear );
if necessary it converts year respecting _SET_EPOCH settings
* src/rtl/dates.c
* use hb_setUpdateEpoch() instead of local code
* src/rdd/dbf1.c
! respect _SET_EPOCH decoding DBF update time from DBF HEADER
(LUpdate() function).
It's not Cl*pper compatible anyhow looks that most of tools
stores only last two digits from the year (just like in the
DBF documentation) and -1900 trick is not used so it helps
to decode correct update date.
* store 'year % 100' instead of 'year - 1900' in DBF header
when DBF table with VFP signature is used (DB_DBF_VFP).
* include/hbapirdd.h
* src/rdd/wacore.c
* changed 4-th parameter of hb_rddRequestArea() from HB_BOOL fWait to
HB_ULONG ulMilliSec
[INCOMPATIBLE]
* src/rdd/dbdetach.c
+ accept optionally as 4-th parameter of hb_dbRequest() numeric value
with timeout in seconds. The previous version using xBase++ compatible
parameters (logical value <lWait> in 4-th parameter) is still working.
; above modifications are based on request and patch sent to harbour-devel
list by Rolf (many thanks), ref:
https://groups.google.com/forum/?hl=pl#!topic/harbour-devel/Pu2b1M5VXjU
* src/rdd/dbf1.c
+ reserve space for DBC name in newly created DBF files with VFP DBF
signature, Thanks to Nikos Christophi, Jeff Stone and other who
reported this problem.
+ added RTE when size of DBF header is exceed by "_NullFlags" field
* src/vm/thread.c
! typo in comment
* src/rtl/filebuf.c
! fixed file handle sharing in POSIX systems when writeonly mode is used
! fixed accessing files in writeonly mode in POSIX systems which use
fcntl() locks for DENY_* flag emulation.
! added for POSIX systems protection against potential race condition in
MT programs and file open and close operations. Now the whole low level
open and close operations are covered by mutex. It means that they are
fully serialized so in case of remote file access (i.e. NFS or SMBFS)
it may reduce the performance in applications which simultaneously open
and closes many different files in different threads but its necessary.
For local file access it should not create noticeable scalability
problems. In my Linux box Harbour can open and close in MT mode more
then 250000 files per second.
% use different mutexes for file open/close and file lock operations to
not reduce the lock performance by potentially slow open() operation
in POSIX systems.
; NOTE: please remember that DENY_* flag emulation in POSIX systems
emulates only shared and exclusive modes so if any of
FO_DENYREAD, FO_DENYWRITE or FO_EXCLUSIVE flag is used then
it effectively works like FO_EXCLUSIVE in POSIX system and
is not mandatory for other processes so it blocks only
other Harbour applications which use Harbour virtual handles
(RDD code, hb_vf*() functions)
* src/rtl/filesys.c
* do not convert exclusive lock to shared one when file is open in
readonly mode on POSIX system using flock() for DENY_* flag emulation.
Now HB_USE_BSDLOCKS is enabled only for Linux and it's documented that
this implementation allow to use shared and exclusive locks regardless of
file open mode.
% do not create file name copy in hb_fsExtOpen() when passed parameters
does not force file name modification
* src/rtl/gtwin/gtwin.c
* added workaround for compilers which do not have MOUSE_HWHEELED macro
(thanks to Alexey)
* src/rtl/gtwvt/gtwvt.c
* do not use LR_DEFAULTSIZE in WinCE builds (synced with Viktor's branch)
* tests/gtkeys.prg
* casing
* src/rtl/gtsln/kbsln.c
* tests/inkey.prg
- removed not longer used HB_INKEY_RAW flag
* tests/inkey.prg
* test HB_INKEY_EXT keycodes when second parameter contains "E" letter
* src/rtl/gtwvt/gtwvt.c
* minor switch order modification
* accept 127 as unicode character value if system also do that
* src/rtl/gtwin/gtwin.c
+ added support for Harbour extended key codes
+ added support for mouse middle button
+ added support for some missing key combinations
! fixed mouse event processing
! fixed ALT + KeyPad NUMs processing - now it's disabled by default
because current GTWIN supports native ALT + KeyPad NUMs processing
provided by MS-Windows console. It works when NUMLOCK is ON. If
someone needs to process it also when NUMLOCK is OFF then he can
enable it by:
hb_gtInfo( HB_GTI_KBDALT, .T. )
! fixed and simplified workaround for bug in MS-Windows 95 and 98
consoles which wrongly decode SHIFT + <NUMBER> with CAPSLOCK ON
for standard US keyboard drivers. Now enabling this workaround by:
hb_gtInfo( HB_GTI_KBDSPECIAL, .T. )
should not break input with fixed keyboard drivers.
; please test it with different windows versions and national keyboard
layouts, tests/gtkeys.prg is quite good test program.
* src/rtl/gtwin/gtwin.c
! add some HB_GTI_* setting to default GT handler
(2015-06-08 23:32 UTC+0200 Viktor Szakats)
+ add HB_GTI_WINHANDLE support to GTWIN
(2015-04-24 19:56 UTC+0200 Viktor Szakats)
% variable scopes adjusted
* minor cleanups along the way
(2015-03-30 13:57 UTC+0200 Viktor Szakats)
! move misplaced comment to its proper location
(2015-03-28 15:45 UTC+0100 Viktor Szakats)
* simplify compatibility logic around [P]CONSOLE_SCREEN_BUFFER_INFOEX
it's also an attempt to fix it for some mingw distros
(f.e. on AppVeyor CI)
(2015-03-23 03:32 UTC+0100 Viktor Szakats)
% cleanup a #define spagetti
(2015-03-23 03:27 UTC+0100 Viktor Szakats)
! fixed msvc sanitize warnings
(2014-07-16 17:37 UTC+0200 Viktor Szakats)
* include/hbgtinfo.ch
* removed unused HB_GTI_KBD_* macros
* redefined few other HB_GTI_KBD_* macros to be more HB_KF_* friendly.
[INCOMPATIBLE]
; Warning this modification is not binary compatible so if someone uses
HB_GTI_KBD_SCROLOCK, HB_GTI_KBD_NUMLOCK, HB_GTI_KBD_CAPSLOCK,
HB_GTI_KBD_LSHIFT, HB_GTI_KBD_RSHIFT,
HB_GTI_KBD_LCTRL, HB_GTI_KBD_RCTRL,
HB_GTI_KBD_LALT, HB_GTI_KBD_RALT,
HB_GTI_KBD_LWIN, HB_GTI_KBD_RWIN or
HB_GTI_KBD_MENU
then he should recompile his code with new hbgtinfo.ch header files.
* include/hbgtcore.h
* src/rtl/gtkeycod.c
* src/rtl/gtdos/gtdos.c
* src/rtl/gtos2/gtos2.c
* src/rtl/gtpca/gtpca.c
* src/rtl/gtstd/gtstd.c
+ added support for Harbour extended keycodes
* src/rtl/gtos2/gtos2.c
+ added support for HB_GTI_KBDSHIFTS
* src/rtl/gtdos/gtdos.c
! fixed CTRL+C and CTRL+BREAK handling in OpenWatcom builds
* src/rtl/inkeyapi.c
! fixed translation for CTRL + @
* tests/gtkeys.prg
+ added raw keyboard test - it disables any additional interactions
* modified Harbour output to show more information about extended
keycodes
* src/rtl/gtwvt/gtwvt.c
* src/rtl/gtwvt/gtwvt.h
* merged and simplified code for HB_GTI_ICONFILE and HB_GTI_ICONRES
* src/rtl/hbcom.c
* use "COM<n>:" instead of "COM<n>" as serial port name in WinCE
builds - it's suggested by MSDN but if some of you has different
experience then please inform me.
* src/rtl/mlcfunc.c
! do not access trailing 0 byte in empty strings passed to hb_MLEval()
(thanks to Abe for information and example illustrating the problem)
* respect in return value also empty line after last EOL
* src/rtl/memoedit.prg
* always returned reformatted string after CTRL+W even if user has not
made any modifications in edited data - Cl*pper compatible behavior.
* src/rtl/hbsocket.c
! fixed typo (unnecessary parenthesis) in previous commit
* enabled getnameinfo() in MSVS 2015 builds
; thanks to Viktor for the information about above items