* src/vm/thread.c
* upped sleep timeout in *nix version of hb_threadReleaseCPU() to 20 ms
it halves CPU consumption. pls revert/comment if you notice
causing this any harm.
* harbour/src/vm/thread.c
* set sleep timeout in *nix version of hb_threadReleaseCPU() to 10 ms
* harbour/src/compiler/hbpcode.c
! fixed typo which could cause compile time crash when debugger code
is generated (-b) and file name with extenssion has only one or
two characters
* harbour/include/hbcompdf.h
* harbour/src/compiler/hbmain.c
* harbour/src/compiler/hbstripl.c
* harbour/src/compiler/harbour.y
* harbour/src/compiler/harbour.yyc
! removed old code designed to optimize line numbers generated in PCODE.
It cannot work correctly and in some cases it was generating HB_P_LINE
pcodes in wrong places.
% enabled new code for HB_P_LINE PCODEs optimization also in debugger (-b)
compilation so it can be used to replaced the old one.
* include/harbour.hbx
* src/vm/runner.c
+ HB_HRBGETFUNLIST() -> <aArray>: New function posted to the
list by Francesco Saverio Giudice
(NOTE: I changed the name a little bit)
* tests/gfx.prg
! fixed console output. Patch by Tamas Tevesz
* changed rest of ? commands to outstd()
* src/vm/set.c
* _SET_EOF default set to .T. on *nix to match other plaforms
(and Clipper I might guess)
CHECKME!
* formatting
! missing 'break;'. it didn't cause error, anyhow pls check me
maybe it was intentional (in 'case HB_SET_PRN_CON:' branch)
CHECKME!
* contrib/hbunix/hbunix.hbp
* contrib/hbunix/hbunix.hbx
+ POSIX_SLEEP( <n> ) -> <n>
* contrib/hbcurl/hbcurl.ch
* contrib/hbcurl/core.c
+ added changes from latest libcurl version (untested with
latest version)
* utils/hbmk2/hbmk2.prg
! fixed symbol names in hbx generation for watcom/{linux|dos|os2}
* harbour/include/hbapi.h
* harbour/src/vm/hashes.c
+ add new public C function: HB_BOOL hb_hashClear( PHB_ITEM pHash )
* do not generate RTE when unexisting key is passed to HB_HDEL()
now code which makes sth like:
if xKey $ hValue
hb_hDel( hValue, xKey )
endif
can be reduced to:
hb_hDel( hValue, xKey )
* harbour/src/vm/hashfunc.c
+ added new PRG function: HB_HCLEAR( <hValue> ) -> <hValue>
* harbour/src/vm/hashes.c
! fixed HB_HMERGE() to work correctly when destination and source hash arrays
are the same
! fixed HB_HASH_INTERSECT in HB_HMERGE()
% two minor optimizations
* harbour/src/vm/procaddr.c
! removed dummy entry at the end of function table
* harbour/src/common/hbstr.c
* harbour/src/rdd/dbfcdx/dbfcdx1.c
* harbour/src/rdd/hsx/hsx.c
* harbour/contrib/xhb/fparse.c
* pacified warnings
* harbour/include/hbsetup.h
* disabled flatten function attribute in ANDROID builds,
it causes that Android_NDK-GCC GPFs compiling src/vm/procaddr.c
* harbour/include/hbdate.h
* enabled localtime_r() in Android builds
* harbour/src/common/hbgete.c
* enabled setenv() in Android builds
* harbour/src/common/hbtrace.c
! fixed ANDROID_LOG_* flags
; QUESTION: why Android log is used instead of syslog?
It causes that harbour has to be linked with
log library (-llog).
* harbour/src/common/hbprintf.c
* disabled modfl() in Android builds
* harbour/src/rtl/filesys.c
* added hack for missing functions in android libc library
* harbour/src/rtl/diskspac.c
* harbour/src/rtl/disksphb.c
* use statfs instead of statvfs in Android builds
* harbour/contrib/hbct/dattime3.c
* disabled stime() in Android builds
* harbour/contrib/hbmzip/3rd/minizip/ioapi.h
* do not use 64bit FILE functions in Android builds
* harbour/contrib/xhb/hbsyslog.c
* disabled using Android log in Android builds - use standard syslog
instead. This code needs deeper modification to switch to Android log.
; I have just recompiled whole Harbour code for android-3, android-5
and android-9 at ARM using standard Harbour Linux build files.
Android does not have pthread and rt libraries (they are merged
with android c library) so to avoid link errors I simply created
soft links from libpthread.a and librt.a to libc.a.
With this hack could use unmodified hbmk2 and linux .mk files.
BTW exporting HB_CPU="arm" was not enough to switch to cross build
in my x86@64 Linux machine so I had to export HB_HOST_BIN and set
HB_BUILD_3RDEXT="no"
* harbour/src/vm/thread.c
* renamed hb_criticalCode() to hb_mutexEval()
* harbour/src/rtl/cdpapi.c
* added HB_CODEPAGE_ANNOUNCE( UTF8 ) so user can use
REQUEST HB_CODEPAGE_UTF8
in PRG code.
* harbour/tests/big5_gen.prg
; added note about characters mapped to U+FFFD REPLACEMENT CHARACTER
in BIG5.TXT and iconv mapping for the same characters.
* harbour/src/vm/thread.c
+ added new function:
hb_criticalCode( <pMtx>, <bCode> | <@sFunc()> ) -> <xCodeResult>
it executes <bCode> or @sFunc() when <pMtx> is locked by this function.
! fixed hb_mutexQueueInfo() to not overwrite RTE subst value.
This function may only return .T. or generate RTE so the logical
return value is useless. I think that it should be removed and this
function should simply return NIL.
* updated syntax of PRG functions
* harbour/src/vm/hvm.c
* extended item references created by hb_vmPushItemRef() so they
can be used to create reference chain and detached in executed
PRG code. Such reference chain is cleanly break when original
reference item is removed from HVM stack.
* harbour/src/vm/itemapi.c
! fixed compilation in MT mode with some C compilers using
HB_STACK_TLS_PRELOAD
* updated also hb_itemParamStore() function to set NIL to item passed
by reference when is called with NULL pItem parameter.
* harbour/src/vm/itemapi.c
* set NIL to item passed by reference when hb_itemParamStoreForward()
or hb_itemParamStoreRelease() is called with NULL pItem parameter.
* harbour/contrib/hbnetio/netiosrv.c
! fixed possible memory leak when
NETIO_SRVSTATUS( ..., NETIO_SRVINFO_PEERADDRESS, ... )
is called without 3-rd parameter passed by reference
* harbour/examples/gtwvw/gtwvw.c
* replaced repeated TONE code with hb_gt_winapi_tone()
+ added MOUSE_GETPOS() method
* harbour/examples/gtwvw/wvwtbar.c
! fixed to compile with Harbour
* harbour/include/hbapi.h
* harbour/src/rtl/hbrandom.c
added new C functions which fills memory block with random values:
void hb_random_block( void * data, HB_SIZE len )
this function should be used with "good enough" random generator
so in the future it may be changed to use internally sth different
then rand().
* harbour/src/vm/thread.c
* pacified minor warning
* harbour/include/hbthread.h
* harbour/src/vm/thread.c
+ added internal functions hb_threadStateClone() and hb_threadStart()
* modified code to use new functions
* harbour/include/hbvm.h
* harbour/src/vm/hvm.c
+ added public function hb_vmThreadStart() which creates new thread
with HVM stack
+ added protection against executing hb_vmThreadRelease() for
not registered thread state
* harbour/include/hbvm.h
* harbour/src/vm/hvm.c
* added new public C function:
HB_BOOL hb_vmRequestReenterExt( void );
hb_vmRequestReenterExt() checks if given thread has registered HVM
stack and if not it creates new one otherwise it makes the same
operations as hb_vmRequestReenter(). It should be also used with
hb_vmRequestRestore() which checks if new stack was allocated and
if yes then it releases it.
For ST HVM hb_vmRequestReenterExt() works exactly like
hb_vmRequestReenter().
* harbour/include/hbthread.h
! typo in comment
* harbour/contrib/hbwin/win_svc.c
! fixed to work with MT HVM
+ accept function symbol (@func()) as 2-nd parameter of
WIN_SERVICESTART() function
* replaced one HB_TCHAR_*() function by Harbour STR API one.
(for full UNICODE support we should eliminate all HB_TCHAR_*()
functions)
* harbour/include/hbthread.h
* harbour/src/vm/hvm.c
* harbour/src/vm/thread.c
* on main thread exit unlock all main thread PRG mutexes before other
thread terminates and EXIT functions are executed.
* wake-up all thread waiting on subscribe operation when main thread
is terminated.
* harbour/include/hbapicls.h
* harbour/src/vm/classes.c
+ added new C function
HB_SIZE hb_clsGetVarIndex( HB_USHORT uiClass, PHB_DYNS pVarSym );
which can be used as hack to speedup accessing some object instance
variables
* harbour/include/hbclass.ch
+ added some class(y) compatible commands for delegated messages
* harbour/include/hboo.ch
* harbour/src/vm/classes.c
* harbour/src/rtl/tclass.prg
* native support for delegated messages - work in progress
* harbour/src/rtl/hbsocket.c
! fixed error checking to eliminate possible error code overload
* harbour/ChangeLog
* marked old TODO as [DONE]
- src/dynlib/mt
* src/dynlib/Makefile
* src/vm/maindllp/dllpcode.c
* package/winuni/mpkg_win_uni.bat
* package/winuni/mpkg_win_uni.nsi
* utils/hbmk2/hbmk2.prg
* config/postinst.hbs
* config/global.mk
* config/bin.mk
* Changed to have only one harbour dll, and this one with MT support.
This means the old MT mode dll named harbourmt/harbourm is no more
and the old ST mode dll vanished also. This will result in much
cleaner layout of Harbour binary tree, smaller distribution size,
and unambigous dll tree when linking an app with dll multiple
components (f.e. contribs).
If someone wants to build an ST mode harbour dll, she can use the
internal build-time option: _HB_BUILD_DYN_ST=yes
; Please test.
; TODO: Do a final cleanup on internal variable names to not have "ST" in them.
* harbour/src/rdd/dbf1.c
! fixed DBI_ENCRYPT to use previously set password if no new one
is given
* harbour/src/rdd/hbsix/sxtable.c
! fixed wrong parameter checking in SX_SETPASS()
! removed wrong comment about optional parameter in SX_DBFENCRYPT()
* harbour/src/vm/cmdarg.c
! added missing OS CP conversion in HB_ARGV()
* harbour/contrib/hbct/ctmisc.prg
* use HB_PROGNAME() instead of HB_ARGV( 0 ) in EXENAME()
* harbour/contrib/hbnetio/readme.txt
! fixed two typos in description
* harbour/src/vm/hashfunc.c
* harbour/src/vm/hashes.c
* moved HB_HASH_RESORT setting to avoid potential problems when some
3-rd party code didn't set it correctly.
* harbour/src/rtl/itemseri.c
! fixed restoring hash arrays with strict order - they were not resorted
* harbour/src/vm/itemapi.c
* do not clear parameter when NULL item is passed to
hb_itemParamStore*() functions
* harbour/contrib/hbnetio/netiosrv.c
* harbour/contrib/hbnetio/readme.txt
- removed NETIO_SRVSOCKET()
* harbour/ChangeLog
* marked TODO as DONE
* harbour/include/hbapiitm.h
* harbour/src/vm/itemapi.c
+ added new C function hb_itemParamStoreRelease()
* modified hb_itemParamStore*() functions to accept NULL items
+ harbour/contrib/hbnetio/hbnetio.ch
* harbour/contrib/hbnetio/netio.h
* harbour/contrib/hbnetio/netiosrv.c
* harbour/contrib/hbnetio/readme.txt
+ extended NETIO_SRVSTATUS() function so now it can be used to
extract some additional information about connection socket:
NETIO_SRVSTATUS( <pConnectionSocket>
[, <nStreamID> | <nSrvInfo>, @<xData> ] )
-> <nStatus>
<nSrvInfo> can be:
NETIO_SRVINFO_FILESCOUNT
NETIO_SRVINFO_BYTESSENT
NETIO_SRVINFO_BYTESRECEIVED
NETIO_SRVINFO_PEERADDRES
; TODO: please eliminate NETIO_SRVSOCKET() from any code using it.
It's too danger so I'll remove this function from HBNETIO soon.
NETIO_SRVOPENFILESCOUNT() is also redundant now and can be
replaced by:
NETIO_SRVSTATUS( pConnSock, NETIO_SRVINFO_FILESCOUNT, @nCount )
so it can be removed too.
* harbour/include/hbapi.h
* harbour/include/hbwmain.c
* harbour/src/vm/cmdarg.c
* moved declaration of hb_winmainArgInit() to header file
* harbour/contrib/hbmxml/3rd/minixml/mxml_fil.c
* harbour/contrib/hbmxml/3rd/minixml/mxml.h
! fixed to compile with WinCE builds
; I cannot regenerate .diff file because
../../../../bin/hb3rdpat.hbs -rediff
generates RT error:
Error BASE/1123 Argument error: HB_ATOKENS
Called from HB_ATOKENS(0)
Called from URL_GETFILENAME(810)
Called from FETCHANDEXTRACT(673)
Called from MAIN(412)
Sorry, probably I'm missing sth what was already discussed
but I was not able to follow all post on the list in last
weeks so I would like to ask Viktor or Tamas for the help.
* include/hbwmain.c
* src/vm/cmdarg.c
! Fixed missing declaration for hb_winmainArgInit()
! Fixed missing HB_EXTERN_* from around hb_winmainArgInit() declaration.
; Patches from Andi. Thank you.
* Added HB_EXPORT to the declaration in hbwmain.c.
* src/vm/cmdarg.c
* Formatting.
* package/winuni/mpkg_win_uni.nsi
+ Added TOFIX to recent HBIDE shortcut addition.
It should only be there if HBIDE component was selected.
- Disabled HBIDE icon until a proper solution is found.
* contrib/hbct/ctnet.c
! NETRMTNAME(): Fixed along the patch sent by vbdasc.
Please test it.
* contrib/hbmxml/3rd/minixml/config.h
! Space at EOL.
* harbour/src/vm/cmdarg.c
+ added support for //F:<nFiles> application runtime switch in DOS
and OS2 Open Watcom builds, code by Lorenzo Fiorini and Maurilio
Longo borrowed from xHarbour.
* harbour/ChangeLog
* marked may last TODO note as DONE - thanks to Viktor and Mindaugas
* harbour/include/hbmacro.h
! added missing const in hb_macroGenPCodeN() declaration
* harbour/include/hbapi.h
* added const to HB_CODEBLOCK.pCode
* harbour/include/hbcompdf.h
! added missing const to HB_MACRO.string
* harbour/src/pp/ppcore.c
* harbour/src/common/hbstr.c
* harbour/src/compiler/hbmain.c
* harbour/src/compiler/hbfix.c
* harbour/src/compiler/complex.c
* harbour/src/compiler/hbdead.c
* harbour/src/compiler/genc.c
* harbour/src/compiler/hbident.c
* harbour/src/compiler/gencc.c
* harbour/src/compiler/hblbl.c
* harbour/src/compiler/harbour.yyc
* harbour/src/compiler/harbour.y
* harbour/src/compiler/harbour.yyh
* harbour/src/vm/macro.c
* harbour/src/vm/codebloc.c
* harbour/src/vm/itemapi.c
* harbour/src/vm/hvm.c
* harbour/src/rtl/hbjson.c
* harbour/src/rtl/sha1.c
* harbour/src/rtl/sha2hmac.c
* harbour/src/rtl/hbsocket.c
* harbour/src/rtl/hbbffnc.c
* harbour/src/rtl/itemseri.c
* harbour/src/rtl/filebuf.c
* harbour/src/rtl/hbbfish.c
* harbour/src/rtl/gttrm/gttrm.c
* harbour/src/rdd/workarea.c
* harbour/src/macro/macrolex.c
* harbour/src/rdd/usrrdd/usrrdd.c
* cleaned const pointer casting
* harbour/src/rdd/usrrdd/usrrdd.c
! fixed very serious bug located during const pointer cleanup
which should cause GPF on user code creating indexes
* harbour/src/rtl/sha2.c
* minor formatting
; TOFIX: Seems that there is sth wrong with src/rtl/sha1.c.
Function SHA1_Transform() wrongly declares 2-nd parameter
buffer[64] as const when in fact it changes it what can be
seen if
BYTE64QUAD16 *block;
is changed to:
const BYTE64QUAD16 *block;
This casting which removes const hides potentially very serious
bug - modifying readonly memory area. SHA1_Transform() changes
the buffer so the 2-nd parameter must be declared without const.
After such modification C compiler should warn when const buffers
are passed to this function and such places should be fixed.
In fact it seems to be only line 136:
SHA1_Transform(context->state, &data[i]);
Viktor can you look at it and fix the code?
* harbour/include/hbpp.h
! removed repeated declaration of hb_pp_eof()
* harbour/include/hbapicdp.h
* harbour/include/hbapilng.h
* harbour/include/hbgtcore.h
* added extern declaration to HB_*_REQUEST() macros to pacify
undeclared global functions warnings
* harbour/include/hbstack.h
! added missing hb_stackDec() declaration
* harbour/include/hbdefs.h
! added missing const in some endian macros
* removed some unnecessary casting which may hide bugs
in the code
* harbour/include/hbapi.h
! removed repeated declaration of hb_strVal()
* harbour/include/hbznet.h
! removed repeated declaration of hb_znetError()
* harbour/include/hbcompdf.h
* minor comment
* harbour/src/vm/hvm.c
! added missing static to hb_vmTSVarClean() declaration
* added extern hb_vmForceLink() declaration to pacify
undeclared global functions warnings
* harbour/src/vm/thread.c
* make hb_threadInit() and hb_threadExit() internal HVM
functions available only in MT mode
* harbour/src/rtl/dates.c
! added missing static to hb_dateUnformatRaw() declaration
* harbour/src/macro/macrolex.c
* added extern hb_macro_yylex() declaration to pacify
undeclared global functions warnings
* harbour/src/rdd/workarea.c
* added extern _hb_rddWorkAreaForceLink() declaration to pacify
undeclared global functions warnings
* harbour/src/compiler/complex.c
* added extern hb_comp_yylex() declaration to pacify
undeclared global functions warnings
* harbour/contrib/hbnetio/netiocli.c
! added missing static to s_fileFlush() declaration
* harbour/contrib/hbct/tempfile.prg
! respect in TmepFile() function default file attributes set by
SetFCreate()
* harbour/contrib/hbct/ctstrfil.h
! added missing declarations for ct_getfcreate() and ct_setfcreate()
* harbour/contrib/hbwin/legacy.prg
* removed dummy RETURN statement
* harbour/contrib/xhb/fparse.c
! added missing static to hb_ParseLine() declaration
* harbour/contrib/xhb/freadlin.c
! added missing static to hb_fsReadLine() declaration
* harbour/contrib/xhb/txtline.c
! added missing static to hb_readLine() and hb_tabexpand() declarations
! fixed uninitialized variable warning exploited by above modification
(static function was automatically inlined increasing optimizations)
* harbour/contrib/xhb/hbserv.c
! removed repeated declaration of hb_isService() and hb_serviceExit()
* harbour/contrib/xhb/cstructc.c
* disabled public C functions hb_retclenAdoptRaw() and hb_retclenStatic()
* harbour/contrib/xhb/xhbat.c
* declare C function hb_AtSkipStrings() as static
Warning: this functions is part of public xHarbour C API.
; TODO: The following functions are declared as public but without
any prototypes in header files so they should be made static
or we should add them to some header files:
hbver.c:143: hb_verHostCPU()
hbjson.c:640: hb_jsonEncode()
hbjson.c:665: hb_jsonDecode()
sha2.c:228: sha256_transf()
sha2.c:445: sha512_transf()
I would like to ask authors to look at them and chose
best solution.
* include/hbvm.h
* src/vm/hvm.c
+ Added hb_vmPushPointerGC().
* contrib/hbqt/qtcore/hbqt_init.cpp
+ Added experimental (not activated) code example to pass GC collected
pointer back from callbacks. This is just intermediate step, as it
should return .prg level class, but at least some room for leaks
can be avoided this way, plus the pointer type is identifiable.
Based on code posted to list by Pritpal.