* src/vm/itemapi.c
- hb_itemGetNL() no longer works for date types.
INCOMPATIBLE. If you used it to retrieve date/time,
use hb_itemGetDL() instead.
! Fixed typo in prev addition.
* include/hbapi.h
* src/vm/arrays.c
+ Added hb_arrayGetNSize(), hb_arraySetNSize().
! Fixed old typo in TRACE() call of hb_arrayGetNInt().
* src/vm/extend.c
! Fixed typo in prev addition.
* src/rtl/filesys.c
! Applied fixed from Przemek to hb_fsReadAt()/hb_fsWriteAt()
code to be MT safe plus fix other problems.
; QUESTION: Shouls the same applied to hb_fsWriteLarge()/hb_fsReadLarge()
loops? (BTW inactive in 32-bit Harbour builds)
* contrib/hbct/screen2.c
! Type cleanup.
* contrib/hbct/pack.c
* contrib/xhb/hbxml.c
* contrib/xhb/hbxml.h
* contrib/hbgt/charmixg.c
* contrib/hbgt/charodd.c
* contrib/hbgt/strexpan.c
* contrib/hbgt/asciisgt.c
* contrib/hbgt/strright.c
* contrib/hbgt/strasint.c
* contrib/hbgt/strdiffg.c
* contrib/hbgt/chrtotal.c
* contrib/hbgt/strcount.c
* contrib/hbgt/strleft.c
* contrib/hbgt/chrfirst.c
* contrib/hbgt/chrcount.c
* contrib/hbgt/strpbrk.c
* contrib/hbgt/chareven.c
* contrib/hbgt/bitflags.c
* contrib/hbgt/strcspn.c
* contrib/hbgt/atdiff.c
* contrib/hbnf/proper.c
* contrib/hbnf/getenvrn.c
! Fixed to use Harbour size types.
* contrib/hbnf/dispc.c
! Started using Harbour type, but this is code is
deadly and needs further work. I still wonder how
to create code which mixes properly HB_FOFFSET and
HB_SIZE.
* contrib/xhb/cstructc.c
* Formatting.
* src/vm/runner.c
! Minor to prev.
* include/hbapi.h
* src/vm/extend.c
+ Added hb_parnsize(), hb_retnsize(), hb_stornsize() functions.
; NOTE: These should be used in place of hb_parnl(), hb_retnl(),
hb_stornl() when passing HB_SIZE types.
; TODO: Use them all accross Harbour if they are correct and
after being finalized.
* src/vm/itemapi.c
+ Added hb_itemGetNSize(), hb_itemPutNSize() functions.
* DATETIME stuff in hb_itemGetNL() marked as HB_LEGACY_LEVEL3.
; QUESTION: It's marked as to be deleted in the TODO, so maybe we should
rather delete it.
* include/hbapiitm.h
* src/rtl/filesys.c
+ hb_fsReadAt(), hb_fsWriteAt(): Added support for Win64 HB_SIZE.
; QUESTION: I assume these functions have the purpose of being
atomic seek + read without moving the file pointer,
which means current modification isn't safe. How
can this be solved given Windows doesn't seem to have
64-bit read/write API calls?
! Fixed old copy-paste typos in Windows OVERLAPPED initialization,
where the lines were ended with command instead of semicolon,
they didn't cause any harm though in their former location.
% Reverted a minor change from prev commit to make it
possibly a little bit faster, like it was before.
* src/rtl/hbzlib.c
+ Added casts (at external interface calls) and other fixes to
make it build for Win64 without warnings.
* src/rdd/dbfntx/dbfntx1.c
* src/rdd/dbfnsx/dbfnsx1.c
* src/rdd/dbfcdx/dbfcdx1.c
* src/rdd/dbffpt/dbffpt1.c
* contrib/rddbmcdx/bmdbfcdx.c
* HB_ULONG -> HB_SIZE where appropriate to avoid Win64 errors
and some warnings. I'm still not comfortable to touch this
code, but it could certainly need a type cleanup.
* include/hbdefs.h
+ Added HB_PFS macro which holds the printf() format string
for HB_SIZE value.
; TODO: Use it all accross Harbour.
* contrib/hbmysql/mysql.c
* contrib/sddmy/sddmy.c
* contrib/hbmzip/hbmzip.c
* contrib/hbcurl/hbcurl.c
* contrib/hbhpdf/harupdf.c
* contrib/hbpgsql/postgres.c
* contrib/rddads/adsfunc.c
* contrib/rddads/ads1.c
* contrib/hbfimage/fi_wrp.c
* contrib/sddodbc/sddodbc.c
* contrib/hbgd/gdwrp.c
* contrib/hbwin/wapi_wingdi.c
* contrib/hbwin/wapi_winbase.c
* contrib/hbwin/wapi_winuser.c
* contrib/hbwin/win_bmp.c
* contrib/hbwin/win_prn1.c
* contrib/hbwin/win_regc.c
* contrib/hbssl/evpciph.c
* contrib/hbssl/ssl.c
* contrib/hbssl/bio.c
* contrib/hbssl/sslctx.c
* contrib/hbssl/evpenc.c
* contrib/hbssl/pem.c
* contrib/hbssl/rand.c
* contrib/hbssl/evp.c
+ Added necessary casts at external component boundaries to
make Win64 builds warning-free.
* contrib/hbct/ctstrfil.c
+ HB_ISIZ -> HB_FOFFSET, hb_fsSeek() usage, other type cleanup
to handle file offsets correctly.
* contrib/xhb/hbnxs.h
* contrib/xhb/hbcrypt.c
! Fixed warnings for Win64.
* contrib/hbwin/win_prn3.c
* contrib/xhb/dbf2txt.c
* contrib/xhb/fparse.c
* int -> HB_ISIZ for Win64.
* contrib/xhb/freadlin.c
* hb_fsSeek() -> hb_fsSeekLarge().
* contrib/sddfb/sddfb.c
* Minor type cleanup to make Win64 warning-free.
* contrib/hbsqlit3/hbsqlit3.c
+ Added necessary casts at external interface calls.
% Deleted one dummy operation from SQLITE3_FILE_TO_BUFF().
* contrib/rddsql/sqlmix.c
* contrib/rddads/adsx.c
* HB_ULONG -> HB_SIZE.
* contrib/gtwvg/gtwvg.c
* contrib/gtwvg/wvggui.c
* contrib/gtwvg/wvgcuig.c
* contrib/gtwvg/wvgwin.c
* contrib/gtwvg/wvgutils.c
* contrib/gtwvg/wvgcore.c
! int -> HB_ISIZ/HB_SIZE
+ Added necessary casts at external component boundaries to
make Win64 warning-free.
* contrib/rddads/ads1.c
* HB_ULONG -> HB_SIZE
* contrib/hbtip/utils.c
* int -> HB_ISIZ
! Fixed to use HB_FOFFSET type to save/restore file position.
* ChangeLog
+ Added missing item to previous log entry:
! Fixed hb_fsCurDirBuff() for Win64.
; It's quite large commit, nevertheless I'd highly appreciate
peer review, and certainly there will be places which need
better or different solution for Win64.
* src/rtl/filesys.c
* include/hbapifs.h
+ Added support for 64-bit HB_SIZE to hb_fsWriteLarge(),
hb_fsReadLarge().
* Some HB_SIZE variables renamed to have 'n' prefix.
* Minor cleanups in code layout in hb_fsWriteLarge(),
hb_fsReadLarge().
; Please review, I didn't make any real tests. Most code
was copied and adapted from similar code existing for
16-bit systems to support 32-bit HB_SIZE.
* src/vm/runner.c
% Adjusted scope of recently added variable.
* ChangeLog
! Fixed HB_COMPILER_VER values for MSVC for pre < 1000 versions
(requires zero prefix to work right) in:
2010-06-06 00:50 UTC+0200 Viktor Szakats
* src/rtl/filesys.c
* include/hbapifs.h
! hb_fsLock()/hb_fsSeek() to use HB_ULONG/HB_LONG, instead of
HB_SIZE/HB_ISIZ.
* Cleaned some casting in hb_fsLock(). Please check me.
* include/hbdefs.h
! Fixed one intentional typo I put in to test legacy types.
* src/compiler/hbmain.c
* src/compiler/genhrb.c
* src/compiler/gencc.c
* src/compiler/hbcmplib.c
* include/hbcomp.h
* include/hbcompdf.h
* HB_ULONG -> HB_SIZE, where I could find out from warnings.
+ Added parameter names to some function declarations where they
were missing.
; Przemek, please check me. I feel I will mess this up if continuing
beyond this point, so I'd appreciate if you could take a look at
HB_ULONG to HB_SIZE conversion from an intrinsic perspective,
there seem to be places where it needs further tweaks to get us
full Win64 support. [ I've also intentionally left this area
more or less intact when doing the previous pass of conversion. ]
; There are places where simple 'int' is used, while it should be
HB_SIZE (or maybe size_t? in some places).
; Also, Win64 conversion will need some more work f.e. in filesys.c
where WinAPI file I/O functions can't accept a 64-bit value.
First I will report these and if they seem complicated I'll
revert to HB_SIZE = HB_ULONG for Win64 in the being.
* src/compiler/hbgenerr.c
* Formatting.
* src/pp/ppcore.c
* src/vm/strapi.c
* src/vm/debug.c
* src/vm/itemapi.c
* src/vm/cmdarg.c
* src/vm/set.c
* src/debug/dbgentry.c
* src/common/hbgete.c
* src/common/hbstr.c
* src/common/strwild.c
* src/nortl/nortl.c
* src/rtl/lennum.c
* src/rtl/strmatch.c
* src/rtl/gtstd/gtstd.c
* src/rtl/hbstrfmt.c
* src/rtl/transfrm.c
* src/rtl/gtcgi/gtcgi.c
* src/rtl/direct.c
* src/rtl/filesys.c
* src/rtl/console.c
* src/rtl/hbgtcore.c
* src/rtl/cdpapi.c
* src/rtl/mlcfunc.c
* src/rtl/itemseri.c
* src/rtl/gtpca/gtpca.c
* src/rtl/trace.c
* src/rtl/samples.c
* src/rtl/gete.c
* src/rdd/workarea.c
* src/rdd/hsx/hsx.c
* src/rdd/hbsix/sxsem.c
* src/rdd/hbsix/sxfname.c
* contrib/hbct/tab.c
* contrib/xhb/dbf2txt.c
* contrib/xhb/datesxhb.c
* contrib/xhb/dbgfxc.c
* contrib/hbmzip/hbmzip.c
* contrib/hbnf/fttext.c
* contrib/hbnetio/netiocli.c
* contrib/hbpgsql/postgres.c
* contrib/hbclipsm/num.c
* contrib/rddads/ads1.c
* contrib/sddsqlt3/sddsqlt3.c
* contrib/hbfimage/fi_wrp.c
* contrib/sddodbc/sddodbc.c
* contrib/sddoci/sddoci.c
* contrib/hbwin/win_svc.c
* contrib/hbwin/win_prn2.c
* '( HB_SIZE ) strlen(' -> 'strlen('
* include/hbdefs.h
+ HB_SIZE/HB_ISIZ set to 64-bit value on Win64 targets.
This change should finally fix the many casting errors appearing
in Win64 builds of Harbour, plus it enables to use proper 64-bit
sizes for strings and arrays.
; TODO: Test and fix and places where this may cause a problem.
Delete all now unnecessary casting from size_t to HB_SIZE.
(f.e. '( HB_SIZE ) strlen(')
* include/hbdefs.h
+ Rearranged types to first define base Harbour types, then
abstract Harbour types and then legacy types. This removes
some redundancy and contains all legacy handling in one
common block. It also fixes 16-bit legacy types not being
defined in some cases.
+ Changed so that legacy type are referring to Harbour types
instead of replicating them using native C types.
* harbour/include/hbdefs.h
* harbour/include/hbvmpub.h
* harbour/src/common/expropt1.c
* harbour/src/common/expropt2.c
* harbour/src/common/hbstr.c
* harbour/src/compiler/gencc.c
* harbour/src/vm/hvm.c
* harbour/src/vm/itemapi.c
* harbour/src/vm/task.c
* harbour/src/rtl/abs.c
* harbour/src/rtl/hbdyn.c
* harbour/src/rdd/dbsql.c
* harbour/contrib/hbwin/olecore.c
* harbour/contrib/sddoci/sddoci.c
* harbour/contrib/sddsqlt3/sddsqlt3.c
* renamed HB_LONG_{MIN,MAX} to HB_VMLONG_{MIN,MAX} and
HB_INT_{MIN,MAX} to HB_VMINT_{MIN,MAX} to not confuse users
after renaming HB_LONG to HB_MAXINT and LONG to HB_LONG.
They could expect that HB_LONG_{MIN,MAX} are for HB_LONG type.
* src/vm/dynlibhb.c
* include/hbthread.h
+ Added QNX support.
* src/rtl/hbzlib.c
! Added hack to fix missing zlibVersion() and zError()
functions from the zlib lib shipped with QNX 6.2.1.
+ config/qnx/libs.mk
+ Added QNX specific lib configuration.
* utils/hbmk2/hbmk2.prg
+ Added (untested) list of system libs for qnx/gcc.
* INSTALL
+ Added QNX reference to one more place.
; NOTE on QNX:
All binaries build cleanly, hbtest works.
; TOFIX/TODO:
- hbrun seems to misdetect the width of the terminal
- Clean some hack in QNX port
- platform autodetection
- retest whole port from vanilla SVN source, test MT
linkage.
; So now Harbour can run in cars, planes and spaceships.
* src/common/hbffind.c
* src/rtl/fstemp.c
* src/rtl/filesys.c
* src/rtl/fssize.c
! Fixed to use '#define _LARGEFILE64_SOURCE 1' instead of
'define _LARGEFILE64_SOURCE' to fix compilation on QNX.
This replaced previously added hack for stat64 in two
locations.
* src/rtl/hbzlibgz.c
! Protected gzungetc() and gzclearerr() calls with 'ZLIB_VERNUM >= 0x1202'
; QNX 6.2.1 ships with zlib 1.1.3.
* src/rtl/gttrm/gttrm.c
! Added fix to compile when SA_RESTART is not available (in QNX).
; TOFIX: Replace this with some more meaningful solution.
* src/rtl/hbzlib.c
! Fixed to compile when compressBound() is not available.
The detection is hackish because proper zlib version detection
is not available here yet.
* src/rtl/hbznet.c
! Fixed to build with older zlib versions where Z_RLE and/or
Z_FIXED are not available.
* include/hbdefs.h
! Fixed stdint handling for QNX.
* INSTALL
* include/hbsetup.h
* utils/hbmk2/hbmk2.prg
+ Added experimental support for QNX operating systems.
Tested with 6.2.1.
+ config/qnx
+ config/qnx/gcc.mk
+ config/qnx/global.mk
+ Added qnx GNU make files. For now this is a simple copy
of linux ones.
* src/common/hbgete.c
* src/common/hbprintf.c
+ HB_OS_QNX tweaks.
* src/common/hbffind.c
* src/rtl/fssize.c
! Disabled stat64 for HB_OS_QNX.
* src/common/hbffind.c
! Fixed very old error in default (todo) branch
where hbrtl function was mistakenly referenced.
* external/Makefile
* contrib/Makefile
* contrib/sddoci/Makefile
* config/none.mk
* config/global.mk
* config/bin.mk
* config/dir.mk
+ Since QNX has GNU Make 3.79.1, I had to re-xmastree
the GNU Make files (though I didn't restore the xmas
indentation), plus restore all logic that dealt
with older GNU Make versions. Also added some new logic.
+ Changed to give warning only when using older than
3.81 make versions. Some feature are disabled in this case,
f.e. HB_BUILD_PKG (win/dos specific feature)
; TOFIX: host platform and cpu detection relies on $(eval)
which is not present on pre 3.80.
; habour and hbpp builds fine, but there are several remaining
problems in rtl and vm.
* mpkg_nightly.sh
+ Added feeback about what the script does.
+ Using -q for zip to lessen large amount of unnecessary feedback
* external/pcre/pcre.dif
* external/pcre/Makefile
! Tweak to make PCRE build on djgpp 2.3
Patch by Tamas Tevesz (2nd version posted on dev list)
* include/hbcom.ch
* Changed functions names to use proper camelcasing so that
they also hold true for C level API.
* include/hbsocket.ch
+ Readded .prg level function names to address array constant
comment.
+ Added 'this is also used in C file' comment.
* contrib/hbsms/hbsms.prg
! Fixed COM port reading function after last update.
I finally restored original defaulting logic (instead of
FETCHCHARS() method) which by default waits for 64 bytes
and 5 seconds. Pls check me.
* utils/hbmk2/hbmk2.prg
+ Quite big commit aiming to clean path forming in different
situations. After this is change it should be more or less
true that internally hbmk2 always uses native path format,
it should accept _any_ format regardless of platform,
and it should convert filenames to proper format only when
calling external compiler tools, according to their specific
taste.
F.e. this should fix problems when doing Windows cross-build
on *nix systems, with watcom, or other compilers (except
mingw) which has native compiler. It should continue to
work with WINE based on compilers in similar situations.
There is one specific exception when passing around
filenames as part of options. In this case hbmk2 cannot do
too much magic, so try to avoid it.
Though I never actualluy tried this latter case.
Please test it, regressions are possible. I'd be happy to
see stress tests with passing various combination of pathseps
and watching -trace output whether everything is properly
converted to right format.
+ Will now convert filenames to Cygwin format for Cygwin
targets.
! Fixed to accept .hbi files without '@' prefix.
* config/postinst.prg
% Do not add '@' prefix when referring to .hbi files.
* src/vm/extend.c
! Fixed TRACE message of new hb_parnintdef() function.
* src/rtl/hbcomhb.c
* Minor correction to one function description in comment.
* src/rtl/hbsocket.c
* Minor formatting.
* include/hbcom.ch
+ Added comments.
* Formatting.
+ Added comment that code is used by .c code.
* contrib/hbtpathy/telepath.prg
* Rewritten to use native HB_COM*() API (instead of hbct
specific COM_() one).
+ tp_send() code rewritten to use core timeout functionality.
+ Implemented formerly disabled tp_ctrldtr() function.
(pls review it)
% FetchChars() internal function simplified.
* contrib/hbcomm/hbcomm.prg
* Rewritten to use native HB_COM*() API (instead of hbct
specific COM_() one).
* contrib/hbsms/hbsms.prg
* Rewritten to use native HB_COM*() API (instead of hbct
specific COM_() one).
* Receive code rewritten to rely on core timeout functionality
instead of rolling local implementation.
; I didn't make any tests with API converted COM code, so please
review and test these changes.
* contrib/hbtpathy/hbtpathy.hbc
* contrib/hbcomm/hbcomm.hbc
* contrib/hbsms/hbsms.hbc
- Deleted hbct dependency.
* INSTALL
* package/winuni/RELNOTES
* QT 4.6.2 -> 4.6.3
* harbour/src/rtl/hbsockhb.c
* changed return values of some functions: nSuccess to lSuccess
* HB_SOCKET_PF_* changed to HB_SOCKET_AF_*
- hb_parnintdef() (moved to extend.c)
! some bug fixes
! some typo in documentation
* harbour/examples/udpds/udpds.prg
* sychronized with hb_socket*() changes
* changed server thread exit condition (proposed by Przemek)
* harbour/include/hbapi.h
* harbour/src/vm/extend.c
+ hb_parnintdef()
* harbour/src/rtl/hbsocket.c
* harbour/include/hbsocket.ch
! cleaned a little bit HB_SOCKET_AF_*/HB_SOCKET_PF_* usage to not confuse
other developers and users.
* include/hbsetup.h
* Renamed HB_OS_IPHONE -> HB_OS_IOS
(naming will become ambiguous once Harbour will support
Cisco IOS, which may not happen tomorrow, well Apple iOS
is also a pending question)
* include/hbextern.ch
+ Added new HB_SOCKET*() functions.
* config/postinst.prg
! Fixed to exclude whole extra shared binary creation for
all platforms except win/wce/os2.
+ examples/udpds/udpds.hbp
+ Added hbmk2 make file.
* src/rtl/hbregexc.c
* Changed to not throw RTE, just gracefully return
error value when invalid PCRE expression is used.
It will continue to throw RTE only for user-controllable
error situations, f.e. when wrong argument type is passed.
! Fixed to not contain English text hard-coded in RTE message.
* src/rtl/hbregex.c
* HB_ATX() changed to fill parameters passed by reference with
error values (zeros) in case of error.
* HB_REGEX(), HB_REGEXSPLIT(), HB_REGEXATX(), HB_REGEXALL()
functions changed to consistently return arrays. If there
is no match, the array will be empty. This gives a more
natural (and Clipper/Harbour-like) interface (f.e. return
value can be passed to FOR EACH loop without extra checks
and extra local variable).
Slight INCOMPATIBILITY for those who did 'r == NIL' check
to verify non-match and something special in this case.
For code simply evaluating the returned matches, the NIL
check can be deleted, and for code which wants to be
backward/forward compatible _and_ to specifically check
for no match situation it's suggested to use 'EMPTY( r )'.
Please check me.
* HB_REGEXMATCH() marked as HB_LEGACY_LEVEL4. (this leaves
quite some headstart to change it)
* include/hbextern.ch
- Deleted HB_REGEXMATCH().
* utils/hbmk2/hbmk2.prg
% Simplified regex usage after above changes.
+ Will now show an internal error in case the used
regex is invalid in current Harbour context
(f.e. when no PCRE engine was forced by user, or
the one used doesn't support the expression used by
hbmk2). I don't know how special current expression
is (it doesn't seem very much so), but it can be
streamlined to something more compatible if current
is deemed not ideal.
* src/compiler/hbusage.c
* Changed to enclose e-mails between '()' instead of '<>'.
* include/hbsetup.h
! Patch by Tamas Tevesz for SunPro compiler.
* ChangeLog
- Deleted my personal exception from ChangeLog license.
* utils/hbmk2/hbmk2.prg
+ Added experimental support for filters containing string
comparisons, f.e.: '{MY_VAR='hello'}-cflag=-DMY_FLAG'
; NOTE: It's not guaranteed yet that this feature will stay.
* include/hbzlib.ch
+ Added HB_ZLIB_RES_* zlib result values.
* contrib/xhb/Makefile
- contrib/xhb/hbcomprs.c
+ contrib/xhb/hbcomprs.prg
+ contrib/xhb/tests/compress.prg
+ Rewritten xhb compatiblity compression functions in .prg.
The main reason was to avoid dependence on zlib.h on C level.
This simplifies the build layout.
! This fixes last zip error to work in MT programs.
+ Added test/demo program from xhb. Work by Giancarlo Niccolai.
; NOTE: Tested only with xhb test/demo program.
* contrib/xhb/hbcomprs.ch
+ Changed to use HB_ZLIB_* constants. So it's now only a wrapper
instead of replicating values.
* include/hbapifs.h
+ Added some more HB_EXPORT flags. Pls check me.
* contrib/hbwin/hbolesrv.hbc
+ Added reference to hbwin.hbc, so that it can be used
standalone accompanied by -hbdynvm option to create
OLE servers easily: 'hbmk2 -hbdynvm hbolesrv.hbc ...'
* contrib/hbwin/hbolesrv-watcom.def
! Fixed comments to watcom format.
* utils/hbmk2/hbmk2.prg
! Fixed RTE when parsing certain rarer Windows file types
in sources= directive in .hbc files in *nix hbmk2 builds.
(could only kick in when using hbmk2 under *nix to cross
compile for Windows). Thanks Przemek for the report.
- Deleted doubly added support for .def file parsing in sources=
directive.
* include/hbapi.h
! Added HB_EXPORT to hb_memvarGet() and hb_memvarSetValue()
used by new OLE server code in hbwin when created -shared
OLE server .dlls.
+ contrib/hbwin/hbolesrv.hbc
+ Added .hbc file to help creating OLE servers.
* contrib/hbwin/tests/olesrv1.hbp
* contrib/hbwin/tests/olesrv2.hbp
* contrib/hbwin/tests/olesrv3.hbp
% Changed to use hbolesrv.hbc.
- Deleted '-static' option to also allow to build -shared
OLE servers. (I tested them OK)
* contrib/hbwin/tests/olesrv2.prg
+ Tweak to allow case-insensitive access of OLE functions.
* utils/hbmk2/hbmk2.prg
+ Added support for .def files in source= .hbc line.
* src/common/hbprintf.c
* include/hbsetup.h
* config/global.mk
* config/bsd/libs.mk
* config/detect.mk
+ Applied patch by Tamas Tevesz, making it possible to build
Harbour for DragonFly BSD systems.
Thanks a bunch.
* utils/hbmk2/hbmk2.prg
+ Applied above change to hbmk2 code, so now it should also
support DragonFly BSD. (pls test it)
* harbour/include/hbapi.h
* harbour/src/vm/hashes.c
* harbour/src/vm/hashfunc.c
+ added support for keeping strict assign order in hash arrays. It's
enabled optionally by setting HB_HASH_KEEPORDER hash array flag.
It gives the same functionality as associative arrays in xHarbour
(enabled by HSETAACOMPATIBILITY()) but this implementation is
internally completely different. It does not introduce linear
scan in add operation so enabling it should not reduce the
performance in this operation. It can even improve it on some
hardware reducing number of memory bytes which have to be moved.
Only delete operation will force linear index scan. The most
important in this implementation is that it does not need any
additional functions like HAA*() in xHarbour. Just simply all
existing functions operating on position indexes like HB_HPOS(),
HB_HKEYAT(), HB_HVALUEAT(), HB_HPAIRAT(), HB_HDELAT(), HB_HSCAN()
use as index natural order in which items were added to hash array.
Also HB_HKEYS(), HB_HVALUES() and FOR EACH iterations respect it.
+ added new PRG functions
HB_HKEEPORDER( <hValue> [, <lNewSetting> ] ) -> <lPrevSetting>
HB_HSETORDER( <hValue> [, <lNewSetting> ] ) -> <hValue>
which cam be used to enable/disable strict order in hash array.
Enabling strict order for non empty hash arrays accept the order
created after sorting existing item not the original assign order.
Disabling strict order for non empty hash arrays may change the
items order.
; TODO: add translation for xHarbour's HAA*() functions to hbcompat.ch
and/or xhb library.
* harbour/contrib/hbnetio/netiocli.c
* harbour/contrib/hbnetio/netiosrv.c
% reenabled TCP_NODELAY on client and server side
I had to be really tired when I was making tests and I mixed
hb_socketSetNoDelay() with hb_socketSetBlockingIO().
Thanks to Aleksander Czajczynski who noticed the delay in his
tests.
* harbour/contrib/hbwin/olecore.c
* minor cleanup
* harbour/include/hbapi.h
* harbour/include/hbvmint.h
* harbour/include/hbvmopt.h
* harbour/include/hbstack.h
* harbour/include/hbvmpub.h
* harbour/include/hbtypes.h
* harbour/src/vm/estack.c
* harbour/src/vm/hvmall.c
* slightly modified the names of HB_{API|STACK}_MACROS.
These are internal macros in current Harbour code but they are
still defined in some old user build scripts used to compiled
user or core code what could cause unpredictable results for
final binaries. AFAIR default xMate configuration enables them.
* include/hbdefs.h
+ Added HB_EXTERN macro to eventually replace 'extern' keyword.
* include/hbstack.h
* include/hbsocket.h
* include/hbapicls.h
* contrib/xhb/hbserv.h
* contrib/gtwvg/gtwvg.h
* contrib/hbcairo/hbcairo.h
* examples/gtwvw/gtwvw.c
* examples/gtwvw/hbgtwvw.h
! Fixed declarations to use 'extern HB_EXPORT' keyword order.
! Fixed declarations where 'extern' keyword was missing.
; TODO: To fix watcom .dll support 'extern HB_EXPORT <type> <func()>'
will have to be changed to 'extern <type> HB_EXPORT <func()>'
or even better to 'HB_EXTERN <type> HB_EXPORT <func()>' to
also stay future-proof.
* harbour/src/rdd/dbf1.c
* minor cleanup
* harbour/include/hbapi.h
+ added new macro HB_IS_EVALITEM() - returns true for items which can
understand EVAL message i.e. CODEBLOCK and SYMBOL items.
* harbour/contrib/hbwin/axcore.c
* harbour/contrib/hbwin/olecore.c
* harbour/contrib/hbwin/hbwinole.h
* modified hb_oleDispInvoke() function to accept as additional
parameter pointer to HVM item instead of pointer to DISPID.
Such version is more universal.
* include/hbthread.h
! Added missing HB_EXPORT, and in some place 'extern'
qualifier to thread/atomic Harbour API declarations.
* ChangeLog
! Fixed entry header in previous commit (again).
* harbour/include/hbapi.h
* harbour/src/vm/hashes.c
+ added new C function hb_hashGetCItemPos()
* harbour/src/rtl/hbcom.c
! fixed typo located by Bisz István
* harbour/include/hbvm.h
* harbour/src/vm/hvm.c
+ added new C function hb_vmIsActive()
* harbour/src/rtl/memvarhb.prg
! fixed procedure returning value
! store only simple variables in HB_MVSAVE() just like __MSAVE()
Possible extension: add option to store also NIL, arrays, hashes
and maybe object variables.
! restore variables in HB_MVRESTORE() as private ones just like
__MVRESTORE()
* harbour/contrib/hbwin/oleinit.c
* harbour/contrib/hbwin/olecore.c
* updated to compile and link in WinCE builds. Now code using OLE
can be linked with MinGWCE builds without any errors but I have
no idea if it works. Can someone check it?
* include/hbextern.ch
* src/rtl/Makefile
+ src/rtl/memvarhb.prg
+ Added:
HB_MVSAVE( <cFileName>, [<cMask>], [<lIncludeMask>] )
HB_MVRESTORE( <cFileName>, [<lAdditive>], [<cMask>], [<lIncludeMask>] )
They serve the same purpose with same interface
and similar behavior to __MVSAVE()/__MVRESTORE()
(and __MSAVE()/__MRESTORE(), and 'SAVE TO' command),
only that they support longer than 10 char variable names.
It is not possible to add such support in Clipper-style
.mem files, so these functions will create an incompatible
file format with default '.hbv' extension.
; TOFIX: __MVRESTORE() restores variables as PRIVATEs
while HB_MVRESTORE() as PUBLIC.
; NOTE: GETLIST exclusion is solved with simple trick,
as I couldn't find how it's solved in __MVSAVE().
; Consider this experimental solution to the problem.
* contrib/hbmysql/tmysql.prg
% STOD( "" ) -> STOD()
* contrib/hbide/ideprojmanager.prg
! -hbexec -> -hbexe
* src/rtl/typefile.prg
! __TYPEFILE(): Fixed both RTEs to be Clipper compatible.
* harbour/include/hbapi.h
* harbour/src/vm/dynsym.c
+ added to C functions:
int hb_dynsymToNum( PHB_DYNS pDynSym );
PHB_DYNS hb_dynsymFromNum( int iSymNum );
which can be used to make conversion between dynamic symbols and
numbers
* include/inkey.ch
+ Added new special GT events (over existing HB_K_RESIZE):
HB_K_CLOSE
HB_K_GOTFOCUS
HB_K_LOSTFOCUS
+ Added new Harbour specific INKEY() event filter:
HB_INKEY_GTEVENT
* INKEY() codes below marked as compatibility:
K_MMLEFTDOWN, K_MMRIGHTDOWN, K_MMMIDDLEDOWN
* src/rtl/hbgtcore.c
! Fixed to only return HB_K_RESIZE/CLOSE/GOTFOCUS/LOSTFOCUS
events when allowed via HB_INKEY_GTEVENT filter.
; INCOMPATIBILITY: HB_K_RESIZE will now only be returned
by INKEY() if this filter is added.
* src/rtl/gtwvt/gtwvt.c
- Deleted code protected by __HB_GTWVT_GEN_K_MMDOWN_EVENTS guard.
+ Will now generate INKEY() event:
HB_K_LOSTFOCUS
HB_K_GOTFOCUS
and
HB_K_CLOSE.
; TOFIX: HB_K_CLOSE doesn't work yet. Probably some rearrengement
of window close control will be needed.
; The goal is to be able to keep "fireevent" feature in a Clipper/Harbour
and thread friendly manner, so it becomes possible to move OS level
UI event into separate thread.
* harbour/include/hbapicom.h
* minor modification in defined names
* harbour/src/rtl/hbcom.c
+ added some very seldom (in practice only on Linux kernels >= 2.4
and not by all hardware drivers) supported termios extensions
* harbour/include/hbatomic.h
! fixed typo in non x86 and non MinGW GCC>=4.1 builds reported
on SF bug tracker
* harbour/external/minizip/ioapi.h
! fixed FreeBSD and HAIKU builds
* harbour/src/rtl/fserr.c
* added translation for EPERM
* harbour/include/Makefile
+ harbour/include/hbapicom.h
* harbour/src/rtl/Makefile
+ harbour/src/rtl/hbcom.c
+ added Harbour multiplatform serial port C API (hb_com*() functions).
implemented code for *nixes, MS-Windows and OS2. DOS is not supported
yet. Please make test on different platforms.
; few notes about this code:
termios (*nix) based builds:
- reading LSR is not supported
- duration in break signal is fixed (at least 0.25 seconds, and not
more that 0.5 seconds)
- DTR/DSR hardware flow control is not supported
- setting error character is not supported
- discard card is supported only on few platforms
- checking input/output flow state is not supported
- if some platforms do not support some termio extensions then
compile time warnings TODO_* should be generated.
MS-Windows builds:
- discard card is not supported
OS2 builds:
- checking for input flow state is not supported
- discard card is not supported
In all builds not all RS-232 hardware flags/state are available.
OS2 build supports most of them,
This code needs to be extensively tested. I wrote it without any
serious tests. Especially OS2 builds should be verified by OS2
users. I wrote this port using only documentation which OS2 API
available in the Internet.
DOS is not supported yet though it's possible to compile termio code
for *nixes with DJGPP. Anyhow it would be very nice if we can add
our own DOS serial port code. I would like to ask if any of you
has low level serial port code in C for DOS (i.e. used with Clipper)
and can send it to us so we can use it with Harbour. I have my
own serial port library for Clipper but it's written in assembler
and it's much wider then sth what we need so it cannot be easy
adopted for Harbour.
* harbour/contrib/hbct/Makefile
+ harbour/contrib/hbct/ctcom1.c
+ harbour/contrib/hbct/ctcom.ch
+ harbour/contrib/hbct/ctcom2.c
+ added CT3 compatible COM_*() functions.
+ added CT3 compatible XMOBLOCK(), XMOCHECK(), ZEROINSERT() and
ZEROREMOVE() functions.
+ added new CT COM function:
COM_DEVNAME( <nComPort> [, <cNewName> ] ) -> <cPrevName>
which can be used to specify device name for given port in modern
systems which do not give direct hardware access for the process.
; few notes about CT3 COM_*() functions in Harbour.
In COM_OPEN() only 1-st parameter is significant, input/output buffer
sizes and trap mode parameters are ignored. In modern OS-es such
functionality is controlled by OS and usually buffered read/write
is always enabled. The sizes of IO buffers can be used only as
suggested IO buffer size for OS in some systems. It's possible that
these additional parameters will be used in DOS builds in the future.
COM_READ() does not support 2-nd parameter <lNoDelete>. It can be
implemented but because we do not have direct access to OS buffers
then we will have to emulate it ourselves what is rather inefficient.
Anyhow I can implement it if users think it's critical.
In COM_CRC() I fixed few CT3 bugs so it's not bug compatible with CT3,
i.e. it works correctly for 8 bit and smaller polynomials instead of
returning 0 or supports much larger polynomials up to 64bits.
For 16/17 bit polynomials it gives the same results as CT3 so for most
common usage it should be binary compatible with CT3.
In ZEROREMOVE() I fixed decoding some wrong CCITT strings which does
not have trailing 0 so it returns empty string "" for such corrupted
data. If someone needs original CT3 behavior for some broken code then
is can be enabled by HB_CT3_ZEROREMOVE_BUG macro.
I haven't implemented few functions.
COM_GETIO(), COM_SETIO(), COM_GETIRQ(), COM_SETIRQ() are not portable
and can be implemented only for really few platforms, i.e. for DOS
when/if we add support for serial ports to Harbour DOS builds.
Similar functionality for all other platforms gives our new function
COM_DEVNAME().
COM_KEY(), COM_SKEY() and COM_EVENT() are also not implemented.
To make them well we should add support for asynchronous events to HVM
and such extension is still unavailable. Some simulation can be
implemented using idle tasks but this can be done also by final
Harbour users so I decided to not make it.
Please test it - I've never used CT3 COM_*() API with Clipper.
* harbour/contrib/hbct/dummy.c
* removed dummy CT3 serial communication functions
; such files with dummy functions introduces very serious problems for
user code because they do not respect original module granularity
effectively breaking overloading only chosen functions so it breaks
also some real Clipper code.
* INSTALL
+ Added Ubuntu 10.4 as tested version.
* include/common.ch
+ Added HB_HMERGE_* constant for HB_HMERGE() function.
* package/winuni/mpkg_win_uni_extra_copy.bat
* Commented line not necessary for official mingw build.
* contrib/hbsqlit3/tests/hooks.prg
* contrib/hbsqlit3/tests/authoriz.prg
* contrib/hbsqlit3/tests/backup.prg
+ Added missing '()'s from :__enum* accesses.
* config/win/mingw.mk
! Fixed after last minute change breaking it when HB_COMPILER_VER
is not set.
* examples/httpsrv/uhttpd.prg
% Replaced 'var:__enumValue()' with 'var' in FOR EACH loops.
* include/hbsetup.h
+ Added detection for HB_OS_IPHONE. Name tentative,
completely experimental.
+ Minor addition to ARM CPU detection.
* src/common/hbprintf.c
! Config modfl() accordingly when HB_OS_IPHONE is detected.
* harbour/src/rtl/Makefile
* harbour/src/rtl/hbznet.c
+ harbour/src/rtl/hbinetz.c
* moved HB_INETCOMPRESS() function to separate file
* harbour/include/hbexprb.c
! fixed my very bad C&P typo (2010-02-04 19:14 UTC+0100) which caused
that dummy value was left on HVM stack after post decrementation used
as statement. This dummy value could break construciton like FOR EACH,
WITH OBJECT, BEGIN SEQUENCE. Here is self contain example which can
be used to exploit the problem:
proc main()
begin sequence
p()
end sequence
return
proc p()
local nTemp := 0
begin sequence
nTemp--
end sequence
return
Many thanks to Heinz Bergen who reduced his code to similar small
example.