* src/debug/dbgentry.c
! fixed typo in my previous commit for AltD() function detection
Thanks to Franček Prijatelj for reporting the problem and Abe
for self contain example
* src/rdd/dbfcdx/dbfcdx1.c
* reverted byte order in Harbour CDX signature - by mistake I used
little endian. When existsing index is open then reverted signatures
are accepted for backward compatiblity though they will be removed
in the future.
* src/rdd/workarea.c
* move results of EVALBLOCK() RDD method from Harbour stack return item
to workarea valResult item instead of copping it.
; Warning: This modification may exploit problems in code which
wrongly looks for result of EVALBLOCK() RDD method in
HVM stack return item instead of workarea valResult item.
* 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/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
* src/rdd/dbf1.c
! restored the line with initialization of allocated memory buffer
I deleted by mistake removing my private comments before commit.
Without this line sort could randomly crash on small tables (less
then 65537 sorted records)
* 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.
* src/rdd/dbcmd.c
! fixed __dbArrange() to allow record transfer with the same conditions
as __dbTrans() just like Cl*pper does.
Low level RDD code should respect it, i.e. it should be possible to
sort using fields which exist only in source workarea, the order
and number of fields in source and destination workareas can be
completely different, etc.
Low level DBF* SORT() method is completely broken in such cases and
has to be rewritten.
* contrib/hbtip/smtpcli.prg
! do not execute STARTTLS command if server does not report it's supported
(issue #90)
* src/rdd/dbcmd.c
* use DBI_TRANSREC in __dbTrans() and __dbArrange() (pure record copping
without sorting)
* 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
* src/rdd/dbf1.c
* src/rtl/hbinet.c
* pacified warnings (Thanks to Grigory)
* src/rdd/dbcmd.c
* src/rdd/wafunc.c
* small code simplification and cleanup
! protection against GPF when wrong parameters are passed to __dbArrange()
+ added support for transferring records using __dbArrange() to area with
different fields order (low level driver may refuse to finish such
operation but not it's possible.
* 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
* ChangeLog.txt
* src/compiler/hbmain.c
* src/nortl/nortl.c
! save and restore SETs which can be modified by -fn[:[l|u]|-],
-fd[:[l|u]|-], -fp[:<char>] and -fs[-] compiler flags.
It fixes problem with HBMK2 so now above switches can be used
with HBMK2.
* src/rdd/delim1.c
* src/rdd/sdf1.c
! disabled code which allows to delete just added record.
It was not Cl*pper compatible and caused bad side effects
in COPY TO ... DELIM | SDF - deleted records were nor
copied
* src/rdd/dbf1.c
+ added support for autoincrement fields with counter longer then 4 bytes
Warning: if someone created tables with such fields i.e. { "I:+", 8, 0 }
after my modification which added support for AutoInc flags in
all numeric DBF fields then he should update counters manually
using DBS_COUNTER flag. New code uses 64bit counters for such
field located in different part of DBFFIELD structure.
* src/compiler/cmdcheck.c
! fixed error messages when wrong parameters are passed.
When wrong parameters are taken from HARBOURCMD or CLIPPERCMD
"Bad command line option '%s'"
error is generated and
"Bad command line parameter '%s'"
when wrong parameters are from command line.
New behavior is Cl*pper compatible.
* 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/rtl/mlcfunc.c
! fixed MPosToLC() results for position in last line which have to
be moved after analyzing rest of line due to word wrapping.
* src/rtl/teditor.prg
* rewritten whole internal code critical for basic functionality.
+ resolved the problem with keycode conflicts for GTs which
support extended keycodes.
+ added support missing MemoEdit() editor functionality.
; Number of bugs and mistakes was to big to try to update it.
New code is smaller and simpler. I tried to keep compatibility
with previous version and added to new version most of "helper"
methods which are not used in MemoEdit() at all anyhow I cannot
guaranty that all existing code using TEditor will work without
modifications, i.e. I had to remove :SetPos() and all logic bound
with it because it was to hard for my brain to understand this
idea and/or functionality.
If someone needs strict compatibility with previous version then
he should add to his source code copy of old code.
Current code should addressed most of MemoEdit() problems with
text formatting and editing reported in the past though probably
not all. I have no spare time for precise tests of Cl*pper's
MemoEdit().
* src/rtl/memoedit.prg
* overload :InsertState() method to show <insert> SCOREBOARD message
* changed "Abort Edit? (Y/N)" message position to be Clipper compatible
* removed redundant keycode comparison
* do not ::SetPos HBEditor method - this method has been removed
* src/rtl/mlcfunc.c
* modified unpadded MemoLine() mode to return last blank
character in the line
* src/rtl/teditor.prg
! fixed typo in MemoLine() parameters
+ added lSoftCR parameter to GetText() - when it's true returned
text contains SoftCRs
* src/rtl/memoedit.prg
! return text with SoftCRs - Cl*pper compatible
; Above modifications fix initial and result text formatting
in MemoEdit() (#33)
* 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
* src/rdd/dbf1.c
* moved AutoInc field initialization to separate function
% removed unnecessary AutoInc initialization from RowVer fields
* cleanup few static function names
* src/rdd/dbf1.c
+ finished support for AutoInc flag (+) for all numeric fields (N, F, I, B)
in DBF* RDDs. Now user can define field like:
{ "COUNTER", "I:+", 4, 0 }
and they will work like autoincrement fields but without any assign
restrictions.
* 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).
* src/rtl/hardcr.c
! fixed HardCR() to work with codepages using custom character encoding
in which SoftCR can be part of valid character, i.e. UTF8.
* ChangeLog.txt
* typos in prev my entry
* 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.
* src/rdd/workarea.c
+ added support for field flags in dbCreate()/dbStruct().
Flags can be passed in string with field type after ":", i.e.
"C:U"
means Unicode character field.
The following flags are recognized:
"N" - column can store null values
"B" - binary column
"+" - column is autoincrementing
"Z" - column is compressed
"E" - column is encrypted
"U" - column stores Unicode strings
* src/rdd/dbf1.c
+ added support for field flags in core DBF* RDDs.
; In core DBF* RDDs "N", "B", "U" and "+" flags are supported.
When "N" flag is used then special hidden field with NULL bits
is created. Such implementation is compatible with DBF created
by VFP.
* contrib/rddads/ads1.c
+ added support for field flags in ADS* RDDs
! added missing RTE when wrong field types are passed to dbCreate()
; The old format with long field names corresponding to ADS types is
still supported but I had to rewrite this code so please make real
life test and verify me. In few cases I slightly change the code and
now it can be a little bit more restrictive, i.e. typos in "AtutoInc"
field type will be detected (previous code checked only for 1-st
letter "A").
* src/rtl/hbsocket.c
* added support MAC addreses array returned by hb_socketGetIFaces()
in BSD based systems like FreeBSD or Darwin (Mac OS X)
* src/vm/hvm.c
% small simplification i FOR EACH initial code
* contrib/hbwin/win_bmp.c
* contrib/hbwin/win_prn2.c
* use Harbour FILE IO API instead of local file access
* contrib/hbct/ctstrfil.c
* formatting
* contrib/gtqtc/gtqtc1.cpp
! fixed possible missing initialization for drawing character images
* contrib/hbwin/olecore.c
+ added new PRG function to control empty date conversion to OLE variant:
__oleVariantNullDate( [<lNewNullFlag>] ) -> <lPrevNullFlag>
This is per thread switch and by default initialized to .F. for each
new thread. When set to .T. Harbour empty dates are translated to
VT_NULL.
Warning: it's possible that this function will be removed or replaced
by other solution in the future.
* contrib/gtqtc/gtqtc1.cpp
* emulate CTRL by setting SHIFT + ALT in Android builds
(It's temporary solution - my patch with support for CTRL in
Android QT builds has been accepted so it should be included
in next Qt releases)
% set Qt::WA_NoSystemBackground
* do not change number of rows and cols in maximized and fullscreen mode
when font is changed and resize mode set to HB_GTI_RESIZEMODE_FONT.
It was creating problems when user switched to fullscreen/maximized
mode and application was not ready to dynamically update screen
dimensions.
* activate virtual keyboard on double click instead of click.
It allows to hide virtual keyboard and control program using mouse
and touch events.
* src/rtl/gtwvt/gtwvt.c
+ added support for HB_K_MENU
* src/rtl/gtxwc/gtxwc.c
* use macros instead of constant values
+ added support for HB_K_MENU
* reload font after HB_GTI_FONTSIZE (compatible with other graphic GTs)
* eliminated recursive mutex XLIB locks in HB_GTI_FONTSEL
* discard existing graphics characters and redraw console window contents
after HB_GTI_FONTATTRIBUTE
* tests/gtkeys.prg
+ added support for HB_K_MENU and HB_K_TERMINATE
* src/rtl/memoedit.prg
! fixed repeat condition for ME_INIT initial user function call
(correctly fixes#21)
* src/rtl/mlcfunc.c
* added temporary extension to MemoLine() which will be removed and
replaced in the future
* src/rtl/teditor.prg
! use temporary MemoLine() extension to fix problem with line trailing
spaces I introduced with previous modification
* src/rtl/replic.c
% optimization for Replicate( <cStr>, 1 )
* 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
* src/rtl/hbini.prg
! use hb_ATokens( <cData>, .T. ) to divide .ini file to lines
It's much faster and fixes problem existing from initial version
of this code that .ini files with mixed EOLs cannot be correctly
decoded, i.e. .ini files with LF EOLs was couldn't be decoded if
someone added even single line with CRLF.
* small .ini read code reorganization
* 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