* *
* 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/hbdefs.h
+ added macros HB_CAST_*( double ) for conversions of double values
to integer types - they are designed to hide some differences
between C compilers and platforms in such conversions
* src/common/expropt2.c
* src/vm/extend.c
* src/vm/itemapi.c
* use new HB_CAST_*() macros
* 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.
* doc/cmpopt.txt
* enumeration
! typos
* src/codepage/uckam.c
+ added info about Kamenicky codepage number: CP895
* include/hbapi.h
* src/common/hbstr.c
+ added new C function:
char * hb_dblToStr( char * szBuf, HB_SIZE nSize,
double dNumber, int iMaxDec );
it converts numeric value to string trying to keep all significant
digits in double numbers
* include/harbour.hbx
* src/rtl/hbntos.c
+ added new PRG function:
hb_ntoc( <nValue> ) -> cValue
it converts numeric value to string trying to keep all significant
digits in double numbers
* src/rtl/hbsocket.c
+ added support for error codes returned by
getaddrinfo() / getnameinfo() and gethostbyname() / gethostbyaddr()
* src/rtl/hbinet.c
+ set HB_SOCKET_ERR_WRONGADDR error code if hb_socketResolveAddr()
returns NULL without setting error code
* src/vm/arrays.c
* src/vm/hashfunc.c
! fix hb_HScan(), AScan(), hb_AScan() and hb_RAScan() for very large
integers with more then 53 significant bits. Such bits were lost
after conversion to double value used in scan process
* src/vm/itemapi.c
* formatting
* src/rtl/gtwvt/gtwvt.c
! do not convert characters received with ALTGR or ALT+CTRL flags to
extended keycodes - some national keyboards may use such combination
for national characters and even pure ASCII ones
* contrib/hbnetio/hbnetio.hbx
* contrib/hbnetio/netiocli.c
* contrib/hbnetio/readme.txt
+ added new client side function:
netio_SetPath( <pConnection> [, <cPath>] ) -> [<cPrevPath>]
It set/get path prefix for automatic file redirection to HBNETIO.
If automatic redirection is activated then <cPath> is removed
from file name passed to HBNETIO server, i.e.:
netio_SetPath( netio_GetConnection(), "//myserver/myshare" )
[...]
/* open "/data/table" on HBNETIO server */
use "//myserver/myshare/data/table"
* allow to pass filename to netio_Decode() with "net:" prefix
* allow to pass to use "net:" prefix in function names passed
to netio_{Proc|Func}*() when <pConnection> parameter is not used
! fixed possible GPF trap when connection cannot be set
* src/vm/memvars.c
% do not create reference chain when memvars are passed by reference
and called function uses PARAMETERS statement
! do not return references from __mvDbgInfo() but destination values
* doc/xhb-diff.txt
! typo
* src/vm/itemapi.c
! typo in debug trace message
* *
% 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/hbmysql/tmysql.prg
* added support for nFlags in TMySQLServer constructor as
suggested by Fernando Athayde
* src/rtl/gtcgi/gtcgi.c
% replaced hb_cdpnDup() with hb_cdpnDup3() to eliminate unnecessary
memory block duplicating when translation is not activated.
* src/vm/itemapi.c
* removed old ugly hack used to mark infinite or undefined double
value using double item length field. The code which created such
item have been eliminated many years ago.
* use HB_DEFAULT_WIDTH instead of hardcoded 99 to force numeric value
length recalculation.
* include/hbserial.ch
* src/rtl/itemseri.c
+ added HB_SERIALIZE_IGNOREREF flag.
This flag fully disables logic used to detect multireferences to the
same complex (sub)items like arrays or hashes. It increses the speed
of serialization but serialized data does not contain any information
about refences, i.e. aVal[ 1 ] and aVal[ 2 ] in code below:
aSub := { 1, 2, 3 }
aVal := { aSub, aSub }
are serialized as separated arrays. Additionally items with cyclic
references like:
aSub[ 2 ] := aSub
cannot be serialized at all with HB_SERIALIZE_IGNOREREF flag because
it will create infinite serialization loop and crash with out of
memory message.
* src/rtl/itemseri.c
% rewritten algorithm used to detect cyclic and multi references in
serialized items. The original algorithm has very high overhead when
huge arrays were serialized, i.e. serialization of array with 1'000'000
of subarrays needed about 30 minutes on my i5@3.30GHz. Now it needs
less then a second and this time is only a little bit bigger then
used by serialization with HB_SERIALIZE_IGNOREREF flag.
This modification improve performance also in other code using Harbour
serialization mechanism like I18N files, HBNETIO, GTNET, ... when large
arrays or hashes are saved or transmitted.
* include/hbapi.h
* include/hbapicls.h
* src/vm/arrays.c
* src/vm/classes.c
* src/vm/hashes.c
* src/vm/itemapi.c
* replaced algorithm used to detect cyclic and multi references in
array and hash clone operations with new one similar to current
item serial code. The speed improvement for very large arrays is
the same as in case of serialization code.
* src/rtl/gtsln/mousesln.c
! typo in while loop - synced with Viktor's branch
* contrib/hbtip/mail.prg
! fixed missing 1-st adress in CC and BCC parameters - many
for information about the bug and patch
* contrib/hbtip/sendmail.prg
! typo in comment - thanks to Heinz V Bergen too
* src/rtl/gtwvt/gtwvt.c
* some minor modification to sync code with Vitkor's branch
* src/vm/hvm.c
* src/vm/itemapi.c
* small optimization in string comparison
* (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