* harbour/src/vm/strapi.c
* harbour/include/hbapistr.h
+ added new C function hb_wstrnlen()
* harbour/include/hbdefs.h
* harbour/src/common/hbwin.c
! fixed possible buffer overflows in hb_mb*() and hb_wc*() functions
* removed danger hb_mb*() and hb_wc*() functions which were wrongly
used in core code and corresponding HB_TCHAR_*() macros
+ added hb_mbntowccpy() function and HB_TCHAR_COPYTO() macro
it always sets trailing 0 after passed buffer just like hb_strncpy()
+ added hb_wcntombcpy() function and HB_TCHAR_COPYFROM() macro
it always sets trailing 0 after passed buffer just like hb_strncpy()
* harbour/src/rtl/gtclip.c
! fixed wrongly calculated size of string extracted from clipboard
(when unicode string was in clipboard then number of unicode characters
were used instead of number of multibyte ones)
! added protection against possible memory corruption if some external
process sets clipboard text without trailing 0
* changed hb_gt_winapi_[sg]etClipboard() functions parameters to use
PHB_ITEM as buffer
Question to windows users: different Win GTs use different encoding
for the clipboard buffer. Maybe you want to normalize it?
* harbour/src/vm/cmdarg.c
* harbour/src/vm/extrap.c
* harbour/src/common/hbgete.c
* harbour/src/common/hbffind.c
* harbour/src/common/hbtrace.c
* harbour/src/rtl/gtwin/gtwin.c
* harbour/src/rtl/fstemp.c
* harbour/src/rtl/filesys.c
* harbour/src/rtl/gtgui/gtgui.c
* harbour/src/rtl/gtwvt/gtwvt.c
* harbour/include/hbgtcore.h
* harbour/include/hbapistr.h
* harbour/include/hbwmain.c
* harbour/contrib/gtwvg/gtwvg.c
* harbour/contrib/gtwvg/wvggui.c
* harbour/contrib/gtwvg/wvgcuig.c
* harbour/contrib/gtwvg/wvgutils.c
* harbour/contrib/gtwvg/wvgcore.c
* harbour/contrib/gtwvg/wvgwing.c
* harbour/examples/gtwvw/gtwvw.c
! fixed possible buffer overflows and GPF traps due to wrongly used
HB_TCHAR_*() macros and/or corresponding hb_mb*()/hb_wc*() functions
Seems that some problems were potentially exploited even in non UNICODE
builds.
* src/rtl/Makefile
* src/rtl/getsys.prg
+ src/rtl/getsyshb.prg
! Moved HB_GETREADVAR() to separate source file.
! HB_GETREADVAR() fixed to use HB_ASCIIUPPER() like
TGETLIST():GETREADVAR() instead of UPPER().
* src/rtl/tgetlist.prg
% TGETLIST():GETREADVAR() now can use HB_GETREADVAR()
instead of duplicating the code locally.
* INSTALL
+ Added sort of "disclaimer" note to HB_BUILD_IMPLIB option.
* include/hbextern.ch
+ Added missing TBREADER().
* harbour/include/hbthread.h
* harbour/src/vm/thread.c
% use thread local memory to optimize _hb_gettid()
% use _hb_gettid() instead of _gettid() in OS2 GCC builds
* harbour/src/vm/hvm.c
% minor speed improvement
* harbour/src/vm/memvars.c
! cleaned local vars detaching code
* contrib/hbmisc/Makefile
+ contrib/hbmisc/blinker.prg
+ Added Blinker compatible functions.
Not tested functionally. Many of the functions are dummies, since
many of them is highly MS-DOS specific, but they should help
porting Clipper apps.
+ Added extra functions to control link-time burn in of some
values in original Blinker. In Harbour they can be set using
these function calls, f.e. called from an INIT PROC:
HB_BLIVERNUM( cString )
HB_BLIDEMDTE( dDate )
HB_BLIDEMMIN( nValue )
* include/hbmemory.ch
! Typo in comment.
* harbour/src/vm/hvmall.c
* harbour/include/hbstack.h
* reactivated for tests inline ASM code which can be used to access
HVM stack pointer in MT HVM builds. It can be enabled in 32bit
desktop windows Harbour builds by setting HB_ASM_TLS build time macro.
* harbour/include/hbsetup.h
+ use FORCEINLINE defined in compiler header files
* harbour/src/vm/fm.c
* do not redefine FORCEINLINE if it's already defined in compiler
header files
* harbour/include/hbsetup.h
+ added HB_FORCEINLINE macro
* harbour/include/hbatomic.h
* use HB_FORCEINLINE instead of _HB_INLINE_
* harbour/src/vm/fm.c
* define for DLMALLOC FORCEINLINE macro as HB_FORCEINLINE
* harbour/src/vm/dlmalloc.c
* removed some cleanup in FORCEINLINE declaration and _HB_INLINE_
usage reducing number of local Harbour modifications.
* include/hbapirdd.h
! Typos in comments.
* contrib/hbct/print.c
+ Rewritten PRINTREADY() to work on all platforms the core
supports.
* contrib/sddoci/sddoci.c
+ Added 'nullable' flag support. By the name it's right,
but it's foggy which flag constants belong to which
structure and rdd code suggest this flag does something
else depsite the name. Pls look at it.
* harbour/include/hbatomic.h
* removed unnecessary parenthesis
* renamed HB_SPINLOCK_INIT_R macro to HB_SPINLOCK_INITVAL_R
+ added HB_SPINLOCK_INIT_R(l) macro
* harbour/src/vm/fm.c
* harbour/src/vm/dlmalloc.c
+ updated to DLMALLOC 2.8.4
* added OS2 support from our previous DLMALLOC version
+ updated to use our own recursive locks when available
* disabled hack which breaks strict aliasing
! added some fixes to new DLMALLOC code
TODO: Test it with MSVC win and wince builds and add _MSC_VER
based protection for __forceinline usage (I do not know
in which MSVC version it was added).
Test it with OS2 GCC and OpenWatcom builds.
Test it Darwin and some other *nixes.
* harbour/contrib/sddfb/sddfb.c
! fixed missing reference operator in isc_detach_database()
! fixed NULL used to clear connection handles
* keep references to connection handlers passed to isc_*() functions
* minor formatting
* harbour/include/hbstack.h
* harbour/src/vm/estack.c
% declare hb_stack TLS pointer in MT HVM as static when HVM is compiled
with HB_HVM_ALL=yes
* harbour/src/compiler/hbcomp.c
! added protection against multiple freeing the same expression on
some errors in compiled code. It's necessary after removing reference
counters which made such protection indirectly. It fixed bug reported
by Teo.
* harbour/include/hbsetup.h
! check GCC version for hot and cold function attribute macros
* src/vm/estack.c
* include/hbstack.h
% hb_stackDispLocal() internal debug function made static,
and guarded with HB_VM_DEBUG (pls change it to something
better if there is one), so it's not included in every
regular build and final executable.
* harbour/src/compiler/hbmain.c
* harbour/src/compiler/harbour.y
* harbour/src/compiler/harbour.yyc
* use hb_compGetFuncID() to detect reserved function names
* harbour/include/hbapi.h
* harbour/src/common/Makefile
- harbour/src/common/reserved.c
- removed not longer used hb_compReservedName() function
* harbour/include/hbcomp.h
* harbour/include/hbcompdf.h
* harbour/include/hbexprop.h
* harbour/include/hbexpra.c
* harbour/include/hbexprb.c
* harbour/src/common/expropt1.c
* harbour/src/compiler/hbcomp.c
* harbour/src/compiler/harbour.y
* harbour/src/compiler/harbour.yyc
* harbour/src/macro/macro.y
* harbour/src/macro/macro.yyc
* harbour/src/macro/macro.yyh
+ added new type of expression: SETGET
% eliminated reference counter in expressions
(this code was never fully safe because expression optimizer was not
respecting multiple references)
% replaced all HB_COMP_EXPR_DELETE() macro usage with HB_COMP_EXPR_FREE()
and deleted HB_COMP_EXPR_DELETE() macro
- removed not longer used hb_compExprClone()
Above modifications reduce a little bit total memory consumed by
compiler and macrocompiler giving also some minor speed improvement.
* harbour/ChangeLog
* marked TODO for above modification as DONE.
* src/rtl/hbini.prg
* Deleted several unnecessary empty lines at EOF.
* INSTALL
* Minor.
* include/dbinfo.ch
* Formatting.
+ include/hb.ch
* include/Makefile
+ Added Harbour header which #includes commonly used in
applications.
It also enables us to easily extend standard set of macros
and constants.
* contrib/hbide/idesaveload.prg
* "hbide.set" -> "hbidewnd.ini". At least it uses standard
extension. Still wrong solution and a remaining TOFIX.
* include/hbapi.h
* src/common/hbver.c
+ Added hb_iswin2k() low-level function to detect
if running under Windows 2000 or newer.
* include/hbextern.ch
* src/rtl/version.c
+ Added HB_OSISWIN2K() .prg level function.
* src/rtl/gtwin/gtwin.c
* src/rtl/gtwvt/gtwvt.c
* contrib/gtwvg/gtwvg.c
* contrib/gtwvg/wvggui.c
* examples/gtwvw/gtwvw.c
* contrib/hbwin/win_prn2.c
* contrib/hbwin/win_prn3.c
% Changed to use hb_iswin*() API instead of implementing
version detection locally.
* contrib/hbmysql/mysql.c
* contrib/hbpgsql/postgres.c
+ Added my partial copyright.
* contrib/hbpgsql/tests/tstpgrdd.prg
* Formatting.
* contrib/hbpgsql/postgres.c
! Fixed to define all .prg level functions regardless
of pgsql lib it's built against. They return
permanent failure in this case.
! Fixed PQCREATETRACE() to return NULL pointer instead
of NIL for static builds.
! PQFREECANCEL() marked with HB_LEGACY_LEVEL3.
* contrib/hbwin/win_os.prg
+ Using HB_OSISWIN2K() core API.
* contrib/hbide/ideprojmanager.prg
* Minor alignment.
* src/vm/hvm.c
* include/hbapi.h
* Marked hb_synEval public symbol with HB_LEGACY_LEVEL3
* src/rtl/gtwin/gtwin.c
! Copyright header update.
* src/rtl/objfunc.prg
* include/hboo.ch
* Minor cleanup and formatting.
* INSTALL
* Minor refinement in wording.
* contrib/hbide/hbide.prg
* contrib/hbide/ideactions.prg
* contrib/hbide/idedocks.prg
! "Codec" -> "Encoding" in a few more places.
! "..." added to some more menu items.
! Double "(.ext)" text in filetypes in open project dialog.
; Please review me.
* harbour/include/hbxvm.h
* harbour/src/compiler/gencc.c
* harbour/src/vm/hvm.c
% added few functions increasing the execution speed of some PRG code
compiled with -gc3 switch
* src/common/hbver.c
* include/hbapi.h
+ Added hb_iswinvista() to detect Vista and newer Windows versions.
* src/rtl/version.c
* include/hbextern.ch
+ Added HB_OSISWINVISTA() .prg level function with above meaning.
* contrib/hbwin/win_os.prg
% Changed to use HB_OSISWINVISTA() instead of hbwin specific
WIN_OSISVISTAORUPPER().
* harbour/include/hbcompdf.h
* harbour/src/vm/macro.c
% changed HB_PCODE_INFO structure to eliminate one memory allocation
in macro compiler
* harbour/include/hbapi.h
* harbour/include/hbvm.h
* harbour/src/vm/codebloc.c
* harbour/src/vm/itemapi.c
* harbour/src/vm/hvm.c
* changed second parameter in hb_codeblockGet*() function to 'int'
* merged codeblock execution context setting into one function
hb_vmDoBlock() and removed hb_codeblockEvaluate()
+ added new internal function hb_vmEval()
* harbour/src/vm/arrays.c
% use hb_vmEval()
* harbour/src/macro/macrolex.c
* added missing const to maro text declaration
* harbour/tests/speedtst.prg
! fixed to work with CLIP and xHarbour after we changed
SECONDSCPU() to HB_SECONDSCPU() - all these compilers and FlagShip
have SECONDSCPU() function
* include/hbsetup.h
* Bumped pcode version to 3 (mininum kept at 2)
* contrib/rddsql/sddodbc/sddodbc.c
! Fixed missing UNICODE conversion for field names.
* contrib/rddsql/sddoci/sddoci.c
* contrib/rddsql/sddsqlt3/sddsqlt3.c
! Fixed to limit field length to the one supported by RDD engine.
* harbour/include/hbcomp.h
* harbour/include/hbcompdf.h
* harbour/include/hbmacro.h
* harbour/include/hbexpra.c
* harbour/include/hbexprb.c
* harbour/src/common/funcid.c
* harbour/src/common/expropt1.c
* harbour/src/compiler/hbmain.c
* harbour/src/compiler/harbour.y
* harbour/src/compiler/harbour.yyc
* harbour/src/compiler/harbour.yyh
* harbour/src/vm/macro.c
+ added all reserved and restricted in Clipper functions to
hb_compGetFuncID()
+ extended hb_compGetFuncID() to expand short names of reserved functions
+ extended hb_compGetFuncID() to set function flags
* store expanded function name, ID and flags in HB_ET_FUN* expressions
% modified compiler and macrocompiler code to use function flags and
expanded names set by hb_compGetFuncID(). It allowed to eliminate
calling hb_compReservedName() for function call expressions giving
some small but noticeable speed improvement i.e. in macrocompiler.
* contrib/hbodbc/odbc.c
* contrib/rddsql/sddodbc/sddodbc.c
+ Added support for UNICODE mode on non-Windows systems.
This also means that by now HB_TCHAR_* macros aren't used
in non-win/wce code anymore.
NOTE: Since the translation functions have been changed,
now _SET_OSCODEPAGE setting are honored in these
calls. We may change this later to some lib specific cp.
; TOFIX: Warnings are showing up in non-UNICODE mode:
odbc.c:438: warning: pointer targets in passing argument 2 of 'hb_storstr' differ in signedness
Couldn't find an optimal way to pacify them (also in sddodbc).
Can someone help?
* include/hbdefs.h
+ HB_TCHAR_* macros are again only defined for win/wce targets.
This will make sure these won't get used in non-win/wce specific code.
* contrib/hbmysql/tmysql.prg
! Fixed old buggy code which started to throw errors
after introducing strict parameter evaluation in
lower-level code.
For now I replaced the code with old behavior.
Pls make further to replicate original _intent_.
* harbour/src/vm/macro.c
* minor simplification
* harbour/src/common/reserved.c
* minor cleanup
* harbour/src/vm/eval.c
* inherit execution context (OOP scope) in HB_EXECFROMARRAY() function
* harbour/include/hbcomp.h
* harbour/include/hbcompdf.h
+ harbour/src/common/funcid.c
* harbour/src/common/Makefile
+ added new [macro]compiler function: hb_compGetFuncID() which can be
used for function name hashing reducing strcmp() comparisons
* harbour/include/hbexpra.c
* harbour/include/hbexprb.c
% use hb_compGetFuncID() to improve code for HB_ET_FUNCALL expressions
* contrib/hbziparc/hbziparc.prg
! Fixed HB_ZIPFILE() not working properly with a password set.
* include/hbgtinfo.ch
! Fixed comment for HB_GTI_PALETTE.
* src/pp/ppcore.c
* src/compiler/cmdcheck.c
* src/compiler/hbusage.c
* include/hbpp.h
- Deleted -kl option. "multiline strings" converted back
to build-time option. It's not a documented option anymore,
usage is not recommended. See 2010-02-24 20:04 UTC+0100
for valid alternatives.
* src/pp/ppcore.c
* src/compiler/cmdcheck.c
* src/compiler/hbusage.c
* include/hbpp.h
+ Marked "multiline strings" feature as deprecated,
with HB_LEGACY_LEVEL3.
It's recommended to fix such code to be compatible
with Clipper (and other compatible) languages.
F.e.:
---
cVar := "line 1;
line 2;
line 3"
---
to standard:
--- F.e.:
cVar := "line 1" +;
"line 2" +;
"line 3"
---
or to another Harbour extension:
---
#pragma __cstream|cVar := %s
line 1
line 2
line 3
ENDTEXT
---
('+' operator will be optimized out by the compiler,
so there won't be any performance drop.)
* utils/hbmk2/hbmk2.prg
* Formatting.
* src/pp/ppcore.c
* src/compiler/cmdcheck.c
* src/compiler/hbusage.c
* include/hbpp.h
* include/hbsetup.h
* HB_USER_CFLAGS=-DHB_PP_MULTILINE_STRING feature converted
to compiler switch '-kl'.
INCOMPATIBLE. Users needing this feature now can use
standard Harbour builds by simply adding -kl Harbour
compiler flag. Old build-time macro is not supported
anymore.
* include/hbdefs.h
* include/hbapigt.h
* src/rtl/fstemp.c
* src/rtl/fserr.c
* src/rtl/filesys.c
* src/rtl/console.c
* src/rtl/hbproces.c
* HB_IO_WIN -> HB_OS_WIN
* src/rtl/fserr.c
- Deleted code sections which could only be active
in 16-bit MS-DOS (MSC and BCC) compilers, or
never.
* src/rtl/hbdyn.c
! Fixed signedness warning shown by Cygwin.
* src/rtl/filesys.c
% Cleaned double inclusion of windows.h.
! Fixed for Cygwin. Latest Cygwin allows to enable
some previously inactivated code sections. Also
avoiding some new warnings on this target.
- Deleted code section which is superfluous after
merging HB_OS_WIN and HB_IO_WIN modes.
; TODO: Clean the rest.
; TODO: Use native Windows API in the remaining places.
* include/hbdefs.h
! Disabled drive letter for __CYGWIN__.
Latest version don't define the related
CRTL functions, so it was giving warnings in
filesys.c.
* src/rtl/hbproces.c
- Deleted code section which was now redundant
(covering non-HB_IO_WIN && HB_OS_WIN case)
* contrib/hbwin/win_prn1.c
* Formatting.
* src/vm/estack.c
* src/vm/garbage.c
* src/vm/fm.c
* src/vm/thread.c
+ Readded those OS/2 INCL_ macros which were needed
in C++ mode.
* include/hbdefs.h
+ <windows.h>/<os2.h> header inclusion (along with HB_OS_WIN_USED
macro) is now guarded with HB_LEGACY_LEVEL3.
* include/hbsetup.ch
* include/hbdefs.h
* include/clipdefs.h
+ HB_LEGACY_OFF will now turn off legacy types as well.
This means that HB_LEGACY_TYPES_OFF macro usage
is now clean.
* utils/hbmk2/examples/contribf.hbc
! hbbmcdx -> rddbmcdx
* include/Makefile
- Deleted hbzlib.h (wrapper for zlib.h)
(INCOMPATIBLE, if someone used this, should be fixed by
replacing hbzlib.h with zlib.h in #include directive)
* src/rtl/gtwvt/gtwvt.h
* src/rtl/gtwvt/gtwvt.c
! Fixed to use standard VGA RGB values, just like in GTXWC.
! Fixed color constant names (no "bright white" anymore).
* include/hbdefs.h
% Minor cleanup.
* include/hbdefs.h
! Fixed to not #include <dos.h> unconditionally. This should
be done by specific source code, if needed. INCOMPATIBLE,
if source code relied on this behavior. From now on it,
should include dos.h manually.
* src/vm/thread.c
* src/common/hbver.c
* src/rtl/gtdos/gtdos.c
* src/rtl/isprint.c
* src/rtl/diskspac.c
* src/rtl/disksphb.c
* src/rtl/net.c
* contrib/hbct/print.c
! Fixed to #include <dos.h> manually.
* src/rtl/fstemp.c
! Fixed recent warning for dos targets.
* contrib/hbct/video.c
! Fixed old unused variable warning for dos/watcom targets.
* INSTALL
+ Documented that OS/2 Warp 4 is supported (instead of generic OS/2).