* source/debug/dbgtobj.prg
* source/debug/dbgbrwsr.prg
* source/debug/dbgtwin.prg
* source/debug/dbgmenu.prg
* source/debug/dbgthsh.prg
* source/debug/tbrwtext.prg
* source/debug/dbgwa.prg
* source/debug/debugger.prg
* source/debug/dbghelp.prg
* source/debug/dbgtarr.prg
* source/debug/dbgtmenu.prg
* source/debug/dbgtmitm.prg
+ Added '#pragma DEBUGINFO=OFF' to debugger
sources. Otherwise compiling full Harbour with
-b was causing an infinite loop. (this is now
the default when building with
'HB_BUILD_DEBUG=yes'.
* source/rdd/nulsys/nulsys.c
! Added DBSELECTAREA(), DBSTRUCT(), HEADER(),
RECSIZE(), LUPDATE()
so that programs can be built with -b and
hbnulrdd.lib. hbdebug.lib/dgbwa.prg uses
symbols above.
* harbour/contrib/hbwin/win_tole.prg
! Fixed assignment to oErr:Operation from "+" to "-" in
OleValueMinus() method - fix by Luis Krause Mantilla borrowed
from xHarbour
* harbour/source/rdd/wacore.c
; updated comments about xbase++ behavior in dbRelease()
* harbour/include/hbvm.h
* harbour/source/vm/hvm.c
* harbour/source/vm/dynlibhb.c
* harbour/source/vm/runner.c
! added MT protection for HB_LIBLOAD()/HB_LIBFREE() and
HB_HRBLOAD()/HB_HRBUNLOAD(). Please remember that you should
not use any external LoadLibrary() functions because they are
not protected for clean PCODE modules loading/unloading even
in ST mode. Using them can cause HVM internal structure corruption.
If we have such functions in contrib then they should be redirected
to our HVM ones.
There is still one problem in MT mode which has to be resolved yet.
When dynamic library containing PCODE using static variables
is loaded 1-st time then it will force resizing of internal array
with static variables. If in exactly the same moment some other
thread operates on static variable then it may cause corruption.
To resolve this problem we will have to divide continuous memory
block common for all modules where we store all static variables
into separated blocks bound with each PCODE module (symbol table).
* harbour/source/vm/dynlibhb.c
+ added support for DLL loading/unloading in OS2 builds.
Based on xHarbour code by Maurilio Longo - please test.
* harbour/source/vm/thread.c
+ added small description for hb_threadOnce() .prg function
* harbour/include/hbthread.h
! do not set TLS in POCC and XCC builds when _MSC_VER macro is set
This compilers also have this macro but dllspec( thread) does
not work for them (at least in version 4.50.15)
* harbour/utils/hbtest/rt_hvm.prg
+ added few tests which exploit by DMC bug. Be careful with
this compiler. In some cases it gives buggy final code, f.e.
try this:
#include <stdio.h>
typedef struct
{
double dd;
long long int ll;
} UN;
const char * cmp( UN * pU )
{
return pU->dd >= pU->ll ? "OK" : "ERRROR";
}
int main( void )
{
UN u = { 10.50, 10 };
printf( "%s\n", cmp( &u ) );
return 0;
}
The same bug can be exploited also by final Harbour binaries
compiled by DMC in code like:
? iif( 10.50 >= 10, "OK", "ERROR" )
I used DMC 8.42n. As long as such things will not be fixed by
DMC developers this compiler is not supported by Harbour and
reported problems with DMC Harbour builds will have to be
ignored by us.
* harbour/include/hbclass.ch
* harbour/source/vm/classes.c
* harbour/source/rtl/tobject.prg
* harbour/source/rtl/tclass.prg
! fixed race condition when class function is called 1-st time
and new class is created. It was possible that more then one
thread execute this function simultaneously and two classes
identical classes but with different handles were created
and registered in HVM
* harbour/contrib/xhb/xhbcomp.prg
* updated hack with optional inheritance for new class code
* harbour/source/compiler/gencc.c
! fixed thread static variable offsets generated in .c code when
-gc3 is used
* harbour/source/vm/hvm.c
% removed unnecessary call to HB_STACK_TLS_PRELOAD
* source/rtl/teditor.prg
+ Added :LineCount(), :ExitState() methods.
* Changed to use hb_MemoWrit() to write text content to
disk, to avoid Chr(26) to be appended.
! Fixed :InsertState() to also modify physical cursor state.
! Fixed :BrowseText() to not go into an infinite loop in
view mode.
* source/rtl/memofile.c
! Minor formatting.
* ChangeLog
! Fixed yesterday's entry dates.
* harbour/source/vm/hvm.c
! execute hb_vmThreadQuit() after hb_vmStackRelease()
* harbour/source/vm/thread.c
* do not destroy critical sections on exit
* make_b32.mak
* make_vc.mak
* make_gcc.mak
! Minor formatting.
* include/hbapierr.h
! Fixed casting in macro HB_ERR_FUNCNAME, as it was
generating a new warning with MSVC in 64-bit mode.
'( ( char * ) 1 )' -> '( ( const char * ) NULL + 1 )'
('const' keyword was not enough to silence it)
* include/hbapierr.h
* source/rtl/errorapi.c
- Disabled (marked with HB_LEGACY_LEVEL) hb_errFuncName
symbol. No longer supported, pls use HB_ERR_FUNCNAME
instead.
* harbour/include/hbthread.h
* casting cleanup
* harbour/include/hbapigt.h
* harbour/source/rtl/gtapi.c
* harbour/source/rtl/scroll.c
* harbour/source/rtl/console.c
* harbour/source/rtl/box.c
* changed hb_gtDrawBox() and hb_gtPutText() to operate on color
number (index in some GTs) instead of color string
* use int as color number (index) in hb_gtScrollEx() hb_gtBoxEx()
* harbour/source/rtl/box.c
% changed DISPBOX() with color and frame string to work as one
GT atomic operation
* harbour/source/vm/classes.c
! fixed profiler usage
* bin/bld.bat
* bin/bld_os2.cmd
+ Enabled cleanup of .c/object/.tds files after build.
+ Under Windows NT OSes, it's now possible to pass full .prg
name with extension.
! Few minor fixes.
* Formatting, cleanup and help update.
; Please test.
* harbour/source/rtl/tget.prg
! fixed cursor positioning when new get item is added.
; added note about possible modification - Viktor, please verify it
* harbour/source/common/expropt2.c
* formatting and minor cleanup
* harbour/source/rtl/gtapi.c
% do not set and restore default color set in hb_gtPutText() and
hb_gtDrawBox() but decode colors from passed string
* include/hbextern.ch
+ New functions added.
* source/rtl/alert.prg
% Minor optimization.
; NOTE: Found yet another hidden extension in Alert() code :(
* source/rtl/radiobtn.prg
! Fix and optimization in recent modification.
* harbour/include/hbapigt.h
* harbour/source/rtl/gtapi.c
+ added C functions hb_gtLock() and hb_gtUnlock()
They block current GT for other threads
* harbour/source/rtl/gtfunc.c
+ added PRG functions hb_gtLock() and hb_gtUnlock()
They block current GT for other threads - be careful using them
and always unlock locked GT
* harbour/source/rtl/scroll.c
+ added HB_SCROLL() function - it works like SCROLL() but supports
2 additional parameters: color and erase char. It's stateless and
atomic in GT access
* harbour/source/rtl/tbrowse.prg
* use HB_SCROLL() instead of SCROLL(). Now whole TBROWSE class
does not depend on other thread screen output and does not
set any GT variables except of cursor positioning to active
cell when it's enabled
* harbour/source/rtl/memoedit.prg
* harbour/source/rtl/tgetlist.prg
* harbour/source/rtl/tlabel.prg
* harbour/source/rtl/listbox.prg
* harbour/source/rtl/tmenusys.prg
* harbour/source/rtl/achoice.prg
* harbour/source/rtl/profiler.prg
* harbour/source/rtl/teditor.prg
* use atomic stateless functions when possible - this code should
be checked and updated by some who know it.
* harbour/source/rtl/scrollbr.prg
* harbour/source/rtl/getsys.prg
* harbour/source/rtl/tpopup.prg
* harbour/source/rtl/tgetlist.prg
* harbour/source/rtl/radiogrp.prg
* harbour/source/rtl/listbox.prg
* harbour/source/rtl/checkbox.prg
* harbour/source/rtl/browse.prg
* harbour/source/rtl/tget.prg
* harbour/source/rtl/ttopbar.prg
* harbour/source/rtl/pushbtn.prg
* harbour/source/rtl/tmenusys.prg
* harbour/source/rtl/achoice.prg
* harbour/source/rtl/teditor.prg
* harbour/source/rtl/radiobtn.prg
* harbour/source/rtl/tbrowse.prg
* replaced DispOut() with hb_dispOut()
* replaced DispBox() with hb_dispBox()
% removed saving and restoring of cursor position in places where
it's not longer necessary due to hb_dispOut()/hb_dispBox() usage
% removed saving and restoring of SetColor() value in places where
it's not longer necessary due to hb_dispOut()/hb_dispBox() usage
% removed saving and restoring of MSetCursor(). If it's necessary
low GT driver should hide and redraw mouse cursor before and after
screen update. We do not have to make it manually
The above modification gives faster code and allow to access screen
from different threads simultaneously because functions like
hb_dispOut() and hb_dispBox() are stateless and atomic in screen
access. Not all .prg code has been updated yet. If someone is
familiar with this code then please help. I'll add yet HB_SCROLL()
function which will support additionally colors.
Viktor if possible please verify this modifications.
* harbour/include/hbapigt.h
* harbour/source/rtl/gtapi.c
+ added hb_gtDrawBox() works like hb_gtBox() but does not change cursor
posiion and support colors
+ added support for color parameter to hb_gtPutText()
* harbour/source/rtl/console.c
* use new hb_gtPutText() format in HB_DISPOUTAT()
Now all screen operations inside this function is one atomic
operation for other threads
* harbour/source/rtl/box.c
+ added HB_DISPBOX() function - works like DISPBOX() bit does not
change cursor position and is atomic for other threads
* harbour/include/hbapigt.h
* harbour/include/hbgtcore.h
* harbour/source/rtl/hbgtcore.c
* harbour/source/rtl/gtclip.c
* harbour/source/rtl/gtdos/gtdos.c
* harbour/source/rtl/gtwin/gtwin.c
* harbour/source/rtl/gtxwc/gtxwc.c
* harbour/source/rtl/gtcrs/gtcrs.c
* harbour/source/rtl/gtstd/gtstd.c
* harbour/source/rtl/gtsln/gtsln.c
* harbour/source/rtl/gttrm/gttrm.c
* harbour/source/rtl/gtpca/gtpca.c
* harbour/source/rtl/gtcgi/gtcgi.c
* harbour/source/rtl/gtwvt/gtwvt.c
* harbour/contrib/gtalleg/gtalleg.c
* harbour/contrib/gtalleg/ssf.h
* harbour/contrib/gtalleg/ssf.c
* harbour/contrib/gtwvg/gtwvg.c
* cleanup char * casting
* harbour/source/rtl/filesys.c
! do not use pread()/pwrite() in OpenWatcom Linux builds
* harbour/source/vm/hvm.c
* reduced the mutex lock time in thread exit state
* harbour/source/vm/thread.c
; added note about possible behavior of hb_threadSelf() function
in one very specific situation. It's documented and expected
behavior
* harbour/source/rtl/hbgtcore.c
+ added support for retrieving current HB_GTI_NOTIFIERBLOCK code block
+ added support for removing HB_GTI_NOTIFIERBLOCK code block without
setting the new one
* harbour/source/vm/garbage.c
* unblock HVM before executing destructors and releasing blocks
* harbour/source/vm/fm.c
! do not call internal error with active lock when FM statistic
is enabled
* harbour/source/vm/thread.c
! stop other threads in hb_threadOnce() if the 1-st one
executes bAction block to be sure that it will be completed
before thread leave hb_threadOnce() function
* harbour/source/vm/set.c
! do not call hb_inkeyReset() in set release. It's not necessary
and it could change keyboard buffer size for other threads using
the same GT driver.
* harbour/source/vm/hvm.c
% allocate new thread stack without lock
* harbour/source/rtl/hbgtcore.c
* harbour/source/rtl/gtapi.c
* moved clipboard resetting from hbgtcore.c to gtapi.c
* harbour/source/rtl/filesys.c
! do not use read/write operations with given file offset in Win9X
which seems to not support such functionality
* make_b32.mak
* make_vc.mak
* make_gcc.mak
* Removed special 'set HB_GT_LIB=gtXXX' support. For the exact
same effect - in case you want to modify default GT at
build time, which is not recommended -, pls use this:
'set C_USR=-DHB_GT_LIB=XXX' where XXX is 'wvt', 'std', etc.
- Removed HARBOURFLAGSDLL, LDFLAGSDLL, CFLAGSDLL as public options.
It's better to keep these settings common IMO, and handle
all DLL subtleties in our make files.
+ L_USR is now respected for .dlls, too.
! Fixed make_gcc.mak internal HARBOURFLAGSDLL to be in sync
with the other .mak files (removed -l switch).
- Removed HB_BUILD_MODE for VC builds. Now C/C++ is left to
the default value (which is C mode for core), and it's possible
to override using:
'set C_USR=-TP' for C++ mode (or -TC for forced C mode).
% Other minor cleanups.
* contrib/mtpl_b32.mak
* contrib/mtpl_vc.mak
- Removed HB_BUILD_MODE undocumented options from contrib
make files. For Borland C++ mode, use 'set C_USR=-P'.
For VC, see above.
- Removed HB_BUILD_ST undocumented option.
% Other minor cleanups.
* contrib/xhb/hbcompat.ch
* contrib/xhb/xhb.ch
! Moved __COPYFILE() translation to xhb.ch.
* common.mak
* make_b32.mak
* make_vc.mak
* make_gcc.mak
- Removed option HB_BUILD_ST to build another version
of Harbour MT build [for non-GNU builds], or forced
SingleThreaded (non -tWM) Harbour builds.
* Modified to not allow CFLAGSMT to be tweaked from the
outside [for non-GNU builds].
* harbour/include/hbvm.h
* harbour/source/vm/hvm.c
+ added hb_vmProcessDynLibSymbols() which works like
hb_vmProcessSymbolsEx() but always mark registered modules as
dynamic
* harbour/source/vm/maindllp.c
* redirect hb_vmProcessSymbolsEx() to hb_vmProcessDynLibSymbols()
* harbour/source/vm/thread.c
* disabled some low level locking code in non MT HVM mode
* harbour/include/hbgtcore.h
* harbour/source/rtl/hbgtcore.c
* harbour/source/rtl/gtapi.c
+ added new GT methods: LOCK() and UNLOCK()
* serialize GT access in MT mode - please remember that it's only
low level serialization to protect access to low GT resources.
It has nothing to application level screen output from different
threads which has to be serialized by programmer if necessary.
* harbour/source/rtl/tthreadx.prg
* use HB_THREAD_INHERIT_PUBLIC as thread attribute for thread
started by oThread:start() to emulate xbase++ PUBLIC variables
behavior
* harbour/include/hbapigt.h
* harbour/source/rtl/gtapi.c
+ added hb_gtPutText() C function
* harbour/source/rtl/console.c
+ added HB_DISPOUTAT() which works like DISPOUTAT but does not change
cursor position. xBase++ users can use
#xtranslate DispOutAt( <x,...> ) => hb_dispOutAt( <x> )
for xBase++ compatible code
* harbour/common.mak
* harbour/source/rtl/Makefile
+ added thfuncx.prg
* harbour/source/rtl/thfuncx.prg
+ added ThreadObject() function
* harbour/source/rtl/tthreadx.prg
+ added xBase++ compatible TThread class.
Special thanks to Pritpal Bedi for class skeleton with info about
xbase++.
Now only basic functionality is supported though it was enough to
compile and execute examples Pritpal sent. I'm leaving rest for
xBase++ users.
BTW The examples suggest that in xbase++ DispOutAt() does not change
cursor position. It's not Clipper compatible so I cannot make it
in Harbour though I can add new function which will work in such way.
! harbour/bin/bld.bat
+ Added _C_MT=-tWM if HB_MT==MT
BCC32 includes cw32mt.lib if -tWM is present as a switch.
Now setting HB_MT=MT will allow to compile and link a prg in MT mode.
- bin/hb_flst.tmp
* bin/pack_src.sh
- removed the temporary file list from SVN.
* Added code to retrieve the source file list when SVN info is not available