Commit Graph

80 Commits

Author SHA1 Message Date
Viktor Szakats
59a257f1b2 2010-06-22 05:38 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/vm/estack.c
  * src/vm/debug.c
  * src/vm/hvm.c
  * src/vm/pvalue.c
  * src/vm/arrays.c
  * src/vm/proc.c
  * src/vm/memvars.c
  * src/vm/eval.c
  * src/vm/classes.c
  * include/hbstack.h
  * include/hbapi.h
    + Win64 support for HVM stack and other related internals.
      (HB_ULONG -> HB_SIZE, HB_LONG -> HB_ISIZ, long -> HB_ISIZ)
    + Using size API in debug functions.
    ; TOFIX: These two warnings remain in HVM (not counting dlmalloc):
      ---
      hvm.c(10695) : warning C4244: 'argument' : conversion from 'HB_MAXINT' to 'double', possible loss of data
      macro.c(1315) : warning C4310: cast truncates constant value
      ---

  * src/vm/eval.c
    * HB_FORNEXT() loop value can now be 64-bit values (was 32).

  * src/vm/runner.c
    * Formatting.
2010-06-22 03:39:16 +00:00
Viktor Szakats
2fa7ba29cf 2010-06-03 16:43 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* package/winuni/mpkg_win_uni.nsi
    * 2.0 -> 2.1

  * src/hbextern/hbextern.prg
  * src/pp/pplib.c
  * src/pp/ppcore.c
  * src/pp/pplib2.c
  * src/pp/hbpp.c
  * src/pp/pplib3.c
  * src/main/harbour.c
  * src/debug/dbgtwin.prg
  * src/debug/dbghelp.prg
  * src/debug/dbgtmenu.prg
  * src/debug/dbgtmitm.prg
  * src/debug/dbgtobj.prg
  * src/debug/dbgbrwsr.prg
  * src/debug/dbgmenu.prg
  * src/debug/dbgthsh.prg
  * src/debug/tbrwtext.prg
  * src/debug/dbgwa.prg
  * src/debug/debugger.prg
  * src/debug/dbgtarr.prg
  * src/debug/dbgtinp.prg
  * src/common/hbgete.c
  * src/common/hbffind.c
  * src/common/hbver.c
  * src/common/hbwin.c
  * src/common/hbtrace.c
  * src/common/funcid.c
  * src/common/hbfsapi.c
  * src/common/hbprintf.c
  * src/common/hbverdsp.c
  * src/common/hbwince.c
  * src/common/hbfopen.c
  * src/common/expropt1.c
  * src/common/hbstr.c
  * src/common/expropt2.c
  * src/common/hbdate.c
  * src/common/hbmem.c
  * src/common/strwild.c
  * src/common/hbhash.c
  * src/nortl/nortl.c
  * src/macro/macro.yyc
  * src/macro/macro.y
  * src/macro/macrolex.c
  * src/compiler/compi18n.c
  * src/compiler/hbmain.c
  * src/compiler/ppcomp.c
  * src/compiler/hbfix.c
  * src/compiler/cmdcheck.c
  * src/compiler/hbdbginf.c
  * src/compiler/hbpcode.c
  * src/compiler/genhrb.c
  * src/compiler/complex.c
  * src/compiler/hbdead.c
  * src/compiler/hbcomp.c
  * src/compiler/genobj32.c
  * src/compiler/genc.c
  * src/compiler/hbopt.c
  * src/compiler/hbident.c
  * src/compiler/hbusage.c
  * src/compiler/gencc.c
  * src/compiler/hbcmplib.c
  * src/compiler/hblbl.c
  * src/compiler/harbour.yyc
  * src/compiler/hbstripl.c
  * src/compiler/harbour.y
  * src/compiler/hbfunchk.c
  * src/compiler/hbgenerr.c
  * include/hbpp.h
  * include/set.ch
  * include/achoice.ch
  * include/hbrdddbf.h
  * include/hbstdgen.ch
  * include/hbvmpub.h
  * include/hbgtinfo.ch
  * include/vm.api
  * include/hbpcode.h
  * include/hbset.h
  * include/hbver.h
  * include/hbtrace.h
  * include/extend.api
  * include/hbapicdp.h
  * include/hbrddnsx.h
  * include/button.ch
  * include/hbstack.h
  * include/item.api
  * include/inkey.ch
  * include/hbapilng.h
  * include/hbhrb.ch
  * include/tbrowse.ch
  * include/common.ch
  * include/rdd.api
  * include/gt.api
  * include/hbgtcore.h
  * include/dbinfo.ch
  * include/hbundoc.api
  * include/hbapifs.h
  * include/hbtask.h
  * include/hbsetup.ch
  * include/hbwince.h
  * include/hbvmopt.h
  * include/hb_io.h
  * include/hbthread.h
  * include/hbxvm.h
  * include/setcurs.ch
  * include/hbdefs.h
  * include/hbmsgreg.h
  * include/dbedit.ch
  * include/hblang.ch
  * include/filesys.api
  * include/hbdebug.ch
  * include/hbextcdp.ch
  * include/hbsetup.h
  * include/hbmacro.h
  * include/hbzlib.ch
  * include/hbinit.h
  * include/hbtypes.h
  * include/hbmacro.ch
  * include/hbusrrdd.ch
  * include/hbrddsdf.h
  * include/hbgtreg.h
  * include/hbwinuni.h
  * include/hbapi.h
  * include/simpleio.ch
  * include/hbmemory.ch
  * include/hbpers.ch
  * include/error.ch
  * include/hb.ch
  * include/hbapiitm.h
  * include/hbmath.h
  * include/hbmath.ch
  * include/memoedit.ch
  * include/hbvmint.h
  * include/hbver.ch
  * include/fileio.ch
  * include/rddsys.ch
  * include/hbrddntx.h
  * include/hbapicom.h
  * include/hbatomic.h
  * include/extend.h
  * include/hbznet.h
  * include/hbvm.h
  * include/std.ch
  * include/hbapidbg.h
  * include/hbmemvar.ch
  * include/hbcomp.h
  * include/hbapirdd.h
  * include/hbextlng.ch
  * include/color.ch
  * include/hbcompdf.h
  * include/hbclass.ch
  * include/hbsxdef.ch
  * include/hbmather.h
  * include/dbstruct.ch
  * include/hbsocket.ch
  * include/hbdyn.ch
  * include/hbrdddel.h
  * include/hbtrace.ch
  * include/error.api
  * include/hbapistr.h
  * include/hbwmain.c
  * include/hbexpra.c
  * include/hbexprop.h
  * include/hbiniseg.h
  * include/hbgfx.ch
  * include/hbsocket.h
  * include/hbchksum.h
  * include/hbdbf.h
  * include/hbbfish.h
  * include/hbdbsort.h
  * include/hbcdpreg.h
  * include/hbapigt.h
  * include/hbfloat.h
  * include/hbgfxdef.ch
  * include/hbsix.ch
  * include/hbextern.ch
  * include/hbapicls.h
  * include/hberrors.h
  * include/directry.ch
  * include/clipdefs.h
  * include/hboo.ch
  * include/box.ch
  * include/hbinkey.ch
  * include/hbapierr.h
  * include/hbhash.h
  * include/assert.ch
  * include/hbassert.h
  * include/getexit.ch
  * include/reserved.ch
  * include/hbregex.h
  * include/fm.api
  * include/hbthread.ch
  * include/hbexprb.c
  * include/ord.ch
  * include/hbdate.h
    * Deleted 'www.' from harbour-project.org website name.
      (www.harbour-project.org -> harbour-project.org)
2010-06-03 14:48:23 +00:00
Przemyslaw Czerpak
dbcd987a99 2010-05-24 11:38 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* 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.
2010-05-24 09:39:17 +00:00
Viktor Szakats
a98d098119 2010-05-21 11:45 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* 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.
2010-05-21 09:47:48 +00:00
Przemyslaw Czerpak
8b5b161083 2010-03-26 00:12 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* 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.
2010-03-25 23:12:28 +00:00
Przemyslaw Czerpak
897dda6c79 2010-03-15 12:32 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbstack.h
    * minor cleanup

  * harbour/external/bzip2/bzip2.c
    ! fixed to compile on platforms which do not accept "\" as path delimiter
2010-03-15 11:32:16 +00:00
Przemyslaw Czerpak
12d1e1cc88 2010-03-13 09:02 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbstack.h
  * harbour/src/vm/estack.c
  * harbour/src/vm/hvmall.c
    * moved static HVM stack declarations from header file to .c files
2010-03-13 08:03:03 +00:00
Przemyslaw Czerpak
d6d7154456 2010-03-13 01:25 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* 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
2010-03-13 00:26:30 +00:00
Przemyslaw Czerpak
dfaa306564 2010-03-11 22:16 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbstack.h
    * added HB_EXPORT to some hb_stack*() functions which can be needed
      for non core code
2010-03-11 21:16:27 +00:00
Viktor Szakats
af2d26c015 2010-03-11 11:40 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* 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.
2010-03-11 10:42:09 +00:00
Viktor Szakats
b1cd0953df 2010-02-08 22:49 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/pp/ppcore.c
  * src/pp/hbpp.c
  * src/vm/macro.c
  * src/vm/runner.c
  * src/vm/estack.c
  * src/vm/itemapi.c
  * src/vm/hvm.c
  * src/vm/cmdarg.c
  * src/vm/maindllp.c
  * src/vm/fm.c
  * src/vm/thread.c
  * src/vm/memvars.c
  * src/vm/eval.c
  * src/vm/extend.c
  * src/vm/classes.c
  * src/debug/dbgentry.c
  * src/common/expropt1.c
  * src/common/expropt2.c
  * src/common/hbhash.c
  * src/nortl/nortl.c
  * src/macro/macrolex.c
  * src/rtl/gtxwc/gtxwc.c
  * src/rtl/gtstd/gtstd.c
  * src/rtl/gtcgi/gtcgi.c
  * src/rtl/errapi.c
  * src/rtl/hbprocfn.c
  * src/rtl/hbsocket.c
  * src/rtl/gtpca/gtpca.c
  * src/rtl/filebuf.c
  * src/rtl/hbproces.c
  * src/rdd/dbfntx/dbfntx1.c
  * src/rdd/dbsql.c
  * src/rdd/hbdbsort.c
  * src/rdd/workarea.c
  * src/rdd/wacore.c
  * src/rdd/sdf1.c
  * src/rdd/dbcmdx.c
  * src/rdd/dbfnsx/dbfnsx1.c
  * src/rdd/dbcmd.c
  * src/rdd/dbfcdx/dbfcdx1.c
  * src/rdd/delim1.c
  * src/rdd/dbf1.c
  * src/rdd/hsx/hsx.c
  * src/rdd/usrrdd/usrrdd.c
  * src/rdd/wafunc.c
  * src/rdd/dbffpt/dbffpt1.c
  * src/rdd/hbsix/sxord.c
  * src/rdd/hbsix/sxfname.c
  * src/rdd/hbsix/sxtable.c
  * src/rdd/hbsix/sxutil.c
  * src/rdd/hbsix/sxcrypt.c
  * src/compiler/ppcomp.c
  * src/compiler/hbmain.c
  * src/compiler/compi18n.c
  * src/compiler/cmdcheck.c
  * src/compiler/hbdbginf.c
  * src/compiler/hbpcode.c
  * src/compiler/genhrb.c
  * src/compiler/hbdead.c
  * src/compiler/complex.c
  * src/compiler/genobj32.c
  * src/compiler/genc.c
  * src/compiler/hbopt.c
  * src/compiler/hbident.c
  * src/compiler/gencc.c
  * src/compiler/hbcmplib.c
  * src/compiler/hblbl.c
  * src/compiler/harbour.yyc
  * src/compiler/harbour.y
  * include/hbpp.h
  * include/hbrdddbf.h
  * include/hbvmpub.h
  * include/hbrddnsx.h
  * include/hbstack.h
  * include/hbgtcore.h
  * include/hbapifs.h
  * include/hbthread.h
  * include/hbdefs.h
  * include/hbmacro.h
  * include/hbinit.h
  * include/hbtypes.h
  * include/hbrddsdf.h
  * include/hbapi.h
  * include/hbapiitm.h
  * include/hbrddntx.h
  * include/hbvm.h
  * include/hbapidbg.h
  * include/hbcomp.h
  * include/hbapirdd.h
  * include/hbcompdf.h
  * include/hbrdddel.h
  * include/hbexpra.c
  * include/hbexprop.h
  * include/hbrddcdx.h
  * include/hbapicls.h
  * include/hbapierr.h
  * include/hbrddfpt.h
  * include/hbhash.h
  * include/hbregex.h
  * include/hbexprb.c
  * contrib/hbct/screen2.c
  * contrib/hbct/token2.c
  * contrib/hbct/dbftools.c
  * contrib/hbct/atadjust.c
  * contrib/hbct/ctwin.c
  * contrib/hbct/files.c
  * contrib/hbct/dattime3.c
  * contrib/hbct/ctstr.c
  * contrib/hbct/screen1.c
  * contrib/hbct/token1.c
  * contrib/hbct/ctc.c
  * contrib/hbct/ct.h
  * contrib/hbct/atnum.c
  * contrib/hbct/asciisum.c
  * contrib/hbct/numat.c
  * contrib/hbct/atrepl.c
  * contrib/xhb/bkgtsks.c
  * contrib/xhb/hbcrypt.c
  * contrib/xhb/fparse.c
  * contrib/xhb/datesxhb.c
  * contrib/xhb/hbnxs.h
  * contrib/hbqt/gtqtc/gtqtc.cpp
  * contrib/xpp/dbcmdx.c
  * contrib/hbnf/dispc.c
  * contrib/hbnf/ftattr.c
  * contrib/hbmemio/memio.c
  * contrib/hbnetio/netiocli.c
  * contrib/rddsql/sddmy/mysqldd.c
  * contrib/rddsql/sddpg/pgsqldd.c
  * contrib/rddsql/sddfb/fbirddd.c
  * contrib/rddsql/sddodbc/odbcdd.c
  * contrib/rddsql/hbrddsql.h
  * contrib/rddsql/sqlbase.c
  * contrib/rddsql/sqlmix.c
  * contrib/rddads/adsx.c
  * contrib/rddads/adsfunc.c
  * contrib/rddads/rddads.h
  * contrib/rddads/ads1.c
  * contrib/rddads/adsmgmnt.c
  * contrib/hbmisc/spd.c
  * contrib/hbtip/utils.c
  * contrib/hbtip/encmthd.c
  * contrib/hbbmcdx/bmdbfcdx.c
  * contrib/hbbmcdx/hbbmcdx.h
  * contrib/hbbtree/hb_btree.h
  * contrib/hbbtree/hb_btree.c
    * ULONG -> HB_ULONG, HB_SIZE
      (except for external (OS) API specific usage)
    * Formatting.

    ; NOTE: I converted ULONG to HB_SIZE where I felt it appropriate,
            but didn't touch compiler, codeblock handling, low-level
            RDD (Set/GetVarLen method) and high-level contrib RDDs, so
            this needs to be cleaned.
            Also there may be cases where I didn't change the whole
            call chain to HB_SIZE.

    ; NOTE: It would be probably worthy to add new types for these purposes:
           - line number (HB_USHORT)
           - record number (HB_ULONG)
           - RDD connection (HB_ULONG)
           - parameter count / stack position / class member positions / etc (HB_USHORT, sometimes HB_ULONG)
           - pcode (HB_BYTE and char)
           - flags / modes (HB_USHORT / HB_ULONG)
           - timers (HB_ULONG, HB_MAXINT)
           - GT API character (HB_USHORT)

    ; REQUESTS:
          - Pls don't over-align variable declarations. It makes
            modification much much slower. Sometimes declarations are
            aligned even if there was only one or two of them in a block.
          - Pls always add variable names in declarations, otherwise the purpose
            of the function is very slow to decipher when looking at it.
          - Keep up the nice formatting according to Harbour standards,
            it makes modifications much much easier.

    ; TODO:
          - Verify with grep script
          - Verify with HB_USER_CFLAGS=-DHB_LEGACY_TYPES_OFF
          - Make HB_LEGACY_TYPES_OFF default for Harbour builds.
          - Tie HB_LEGACY_TYPES_OFF to HB_LEGACY_LEVEL3
          - Replace current windows.h inclusion hack with regular method
          - Delete hacks dealing with former type chaos:
               HB_CLIPPER_INT_ITEMS, HB_DONT_DEFINE_BASIC_TYPES, HB_DONT_DEFINE_BOOL, HB_DONT_DEFINE_BYTE, HB_DONT_DEFINE_LONG
          - Retest hbfimage on *nix, delete hacks
          - Normalize HB_BYTE vs. HB_UCHAR usage
          - Type cleanups, f.e. HB_SIZE vs. HB_ULONG
          - Add new special types (see above)
          - Switch HB_SIZE to signed (big project), and delete HB_ISIZ afterwards.
2010-02-08 21:52:47 +00:00
Viktor Szakats
32f59a1f70 2010-02-08 19:52 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/vm/macro.c
  * src/vm/runner.c
  * src/vm/estack.c
  * src/vm/codebloc.c
  * src/vm/debug.c
  * src/vm/hvm.c
  * src/vm/pvalue.c
  * src/vm/arrays.c
  * src/vm/memvars.c
  * src/vm/eval.c
  * src/vm/classes.c
  * src/common/hbffind.c
  * src/rdd/dbfntx/dbfntx1.c
  * src/rdd/workarea.c
  * src/rdd/sdf1.c
  * src/rdd/dbcmdx.c
  * src/rdd/dbfnsx/dbfnsx1.c
  * src/rdd/dbcmd.c
  * src/rdd/dbfcdx/dbfcdx1.c
  * src/rdd/delim1.c
  * src/rdd/dbf1.c
  * src/rdd/usrrdd/usrrdd.c
  * src/rdd/dbffpt/dbffpt1.c
  * src/rdd/hbsix/sxord.c
  * src/compiler/hbmain.c
  * src/compiler/hbpcode.c
  * src/compiler/genc.c
  * src/compiler/hbopt.c
  * src/compiler/gencc.c
  * src/compiler/hblbl.c
  * tests/bldtest/bldtest.c
  * include/hbstack.h
  * include/hbapifs.h
  * include/hbxvm.h
  * include/hbdefs.h
  * include/hbmacro.h
  * include/hbapi.h
  * include/hbcomp.h
  * include/hbapirdd.h
  * include/hbsxfunc.h
  * include/hbrddcdx.h
  * include/hbexprb.c
  * contrib/hbct/maxline.c
  * contrib/hbct/numcount.c
  * contrib/hbct/addascii.c
  * contrib/xhb/xhbenum.c
  * contrib/xhb/xhbqself.c
  * contrib/xhb/xhbwith.c
  * contrib/xhb/hbcomprs.c
  * contrib/xhb/xhbmsgs.c
  * contrib/hbmzip/hbmzip.c
  * contrib/xpp/dbcmdx.c
  * contrib/hbnetio/netiocli.c
  * contrib/rddsql/sqlbase.c
  * contrib/rddsql/sqlmix.c
  * contrib/rddads/adsx.c
  * contrib/rddads/ads1.c
  * contrib/hbbmcdx/bmdbfcdx.c
  * contrib/hbbmcdx/hbbmcdx.h
  * contrib/hbbtree/hb_btree.h
  * contrib/hbbtree/hb_btree.c
    * LONG -> HB_LONG, long (for dates and extend / item API contexts)
      (except for external (OS) API specific usage)

  * src/vm/maindll.c
    * LONG -> void *
    + Added 'const' to char * parameter.

  * contrib/hbct/numline.c
  * contrib/hbct/ctpad.c
    * LONG -> HB_LONG, HB_ISIZ
    * Formatting.

  * contrib/xhb/hbxml.h
    * LONG -> HB_ISIZ

  * contrib/xhb/freadlin.c
    * LONG, int -> HB_ISIZ
2010-02-08 18:54:32 +00:00
Viktor Szakats
6d2c565fc1 2010-02-07 14:30 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/pp/ppcore.c
  * src/pp/hbpp.c
  * src/vm/macro.c
  * src/vm/evalhb.c
  * src/vm/runner.c
  * src/vm/estack.c
  * src/vm/codebloc.c
  * src/vm/dynsym.c
  * src/vm/garbage.c
  * src/vm/itemapi.c
  * src/vm/hvm.c
  * src/vm/pvalue.c
  * src/vm/maindllp.c
  * src/vm/arrays.c
  * src/vm/fm.c
  * src/vm/extrap.c
  * src/vm/proc.c
  * src/vm/thread.c
  * src/vm/memvars.c
  * src/vm/vm.c
  * src/vm/eval.c
  * src/vm/dynlibhb.c
  * src/vm/classes.c
  * src/common/hbffind.c
  * src/common/expropt1.c
  * src/common/expropt2.c
  * src/nortl/nortl.c
  * src/rtl/gtdos/gtdos.c
  * src/rtl/fscopy.c
  * src/rtl/gtwin/gtwin.c
  * src/rtl/gtxwc/gtxwc.h
  * src/rtl/gtxwc/gtxwc.c
  * src/rtl/gtcrs/gtcrs.c
  * src/rtl/philesx.c
  * src/rtl/do.c
  * src/rtl/gtstd/gtstd.c
  * src/rtl/gttrm/gttrm.c
  * src/rtl/xhelp.c
  * src/rtl/transfrm.c
  * src/rtl/fserr.c
  * src/rtl/gtcgi/gtcgi.c
  * src/rtl/errapi.c
  * src/rtl/copyfile.c
  * src/rtl/errintlo.c
  * src/rtl/gtapi.c
  * src/rtl/filesys.c
  * src/rtl/console.c
  * src/rtl/spfiles.c
  * src/rtl/gtos2/gtos2.c
  * src/rtl/philes.c
  * src/rtl/hbgtcore.c
  * src/rtl/itemseri.c
  * src/rtl/gtsln/mousesln.c
  * src/rtl/gtsln/gtsln.c
  * src/rtl/gtsln/kbsln.c
  * src/rtl/disksphb.c
  * src/rtl/gtpca/gtpca.c
  * src/rtl/trace.c
  * src/rtl/gt_tpl/gt_tpl.c
  * src/rtl/filebuf.c
  * src/rdd/dbfntx/dbfntx1.c
  * src/rdd/dbsql.c
  * src/rdd/hbdbsort.c
  * src/rdd/workarea.c
  * src/rdd/wacore.c
  * src/rdd/sdf1.c
  * src/rdd/dbfnsx/dbfnsx1.c
  * src/rdd/dbcmd.c
  * src/rdd/dbfcdx/dbfcdx1.c
  * src/rdd/delim1.c
  * src/rdd/dbf1.c
  * src/rdd/hsx/hsx.c
  * src/rdd/dbcmd53.c
  * src/rdd/usrrdd/usrrdd.c
  * src/rdd/wafunc.c
  * src/rdd/dbffpt/dbffpt1.c
  * src/rdd/hbsix/sxord.c
  * src/rdd/hbsix/sxtable.c
  * src/rdd/hbsix/sxcompr.c
  * src/compiler/hbmain.c
  * src/compiler/hbfix.c
  * src/compiler/hbdead.c
  * src/compiler/genobj32.c
  * src/compiler/genc.c
  * src/compiler/hbopt.c
  * src/compiler/gencc.c
  * src/compiler/harbour.yyc
  * src/compiler/harbour.y
  * include/hbpp.h
  * include/hbrdddbf.h
  * include/hbvmpub.h
  * include/hbrddnsx.h
  * include/hbstack.h
  * include/hbgtcore.h
  * include/hbapifs.h
  * include/hbxvm.h
  * include/hbdefs.h
  * include/hbinit.h
  * include/hbtypes.h
  * include/hbrddsdf.h
  * include/hbapi.h
  * include/hbapiitm.h
  * include/hbrddntx.h
  * include/hbvm.h
  * include/hbcomp.h
  * include/hbapirdd.h
  * include/hbcompdf.h
  * include/hbrdddel.h
  * include/hbexpra.c
  * include/hbexprop.h
  * include/hbdbsort.h
  * include/hbapigt.h
  * include/hbrddcdx.h
  * include/hbapicls.h
  * include/hbapierr.h
  * include/hbrddfpt.h
  * include/hbexprb.c
  * contrib/hbct/bitnum.c
  * contrib/hbct/screen2.c
  * contrib/hbct/strdiff.c
  * contrib/hbct/token2.c
  * contrib/hbct/charonly.c
  * contrib/hbct/atadjust.c
  * contrib/hbct/ctmath.c
  * contrib/hbct/ctwin.c
  * contrib/hbct/charsort.c
  * contrib/hbct/charmix.c
  * contrib/hbct/charevod.c
  * contrib/hbct/wordrepl.c
  * contrib/hbct/charrepl.c
  * contrib/hbct/strswap.c
  * contrib/hbct/trig.c
  * contrib/hbct/charswap.c
  * contrib/hbct/charop.c
  * contrib/hbct/charone.c
  * contrib/hbct/num1.c
  * contrib/hbct/pos1.c
  * contrib/hbct/ascpos.c
  * contrib/hbct/ctstr.c
  * contrib/hbct/screen1.c
  * contrib/hbct/token1.c
  * contrib/hbct/charmirr.c
  * contrib/hbct/ctc.c
  * contrib/hbct/ctwfunc.c
  * contrib/hbct/relation.c
  * contrib/hbct/atnum.c
  * contrib/hbct/count.c
  * contrib/hbct/ctcrypt.c
  * contrib/hbct/posdiff.c
  * contrib/hbct/finan.c
  * contrib/hbct/range.c
  * contrib/hbct/addascii.c
  * contrib/hbct/ctmath2.c
  * contrib/hbct/tab.c
  * contrib/hbct/replace.c
  * contrib/hbct/asciisum.c
  * contrib/hbct/pos2.c
  * contrib/hbct/numat.c
  * contrib/hbct/atrepl.c
  * contrib/hbct/wordtoch.c
  * contrib/hbct/ctpad.c
  * contrib/hbct/print.c
  * contrib/hbct/justify.c
  * contrib/hbct/remove.c
    * USHORT -> HB_USHORT (except where BYTE was used in OS-specific context)
2010-02-08 13:52:23 +00:00
Przemyslaw Czerpak
88bac63295 2010-02-03 03:45 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/vm/hvm.c
  * harbour/src/vm/itemapi.c
  * harbour/src/rtl/errapi.c
  * harbour/contrib/xhb/cstructc.c
    * changed HB_TRACE_STEALTH() to HB_TRACE()

  * harbour/include/hbtrace.h
  * harbour/include/hbstack.h
  * harbour/src/vm/estack.c
  * harbour/src/nortl/nortl.c
    + added hb_traceset() and hb_traceinfo()

  * harbour/include/hbtrace.h
  * harbour/src/common/hbtrace.c
    * use hb_traceset()/hb_traceinfo() instead of hb_tr_file_, hb_tr_line_,
      hb_tr_level_
    - removed hb_tr_file_, hb_tr_line_, hb_tr_level_
    + added hb_tr_stealth() function and modified HB_TRACE_STEALTH()
      macro to not touch any of hb_tr_*_ global variables
    + added HB_TR_FM macro which can be used to infrom FM statistic
      module that it should take filename and line number from hb_tr_*_
      global variables

  * harbour/src/vm/fm.c
    - removed dummy code with HB_TR_LEVEL setting - HB_TR_LEVEL is
      always defined by hbtrace.h
    * use hb_traceset()/hb_traceinfo() instead of hb_tr_file_, hb_tr_line_,
      hb_tr_level_
    * respect HB_TR_FM

  * harbour/src/rtl/gttrm/gttrm.c
    * formatting

  * harbour/src/vm/itemapi.c
  * harbour/src/vm/extend.c
  * harbour/src/rtl/descend.c
  * harbour/src/rtl/hbgtcore.c
  * harbour/src/rtl/mtran.c
  * harbour/src/rtl/samples.c
  * harbour/src/common/hbstr.c
  * harbour/src/common/hbdate.c
    ! fixed possible GPF traps in HB_TRACE() messages caused by %s used
      for not \0 terminated strings or uninitialized buffers
2010-02-03 02:45:32 +00:00
Viktor Szakats
003fd7c41e 2010-01-14 18:01 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/rtl/strclear.c
    + HB_STRCLEAR() return value will now precisely inform about
      successful clear operation. Thanks to Mindaugas.

  * src/vm/hashfunc.c
  * src/vm/macro.c
  * src/vm/strapi.c
  * src/vm/runner.c
  * src/vm/estack.c
  * src/vm/codebloc.c
  * src/vm/hashes.c
  * src/vm/maindll.c
  * src/vm/dynsym.c
  * src/vm/debug.c
  * src/vm/itemapi.c
  * src/vm/garbage.c
  * src/vm/asort.c
  * src/vm/hvm.c
  * src/vm/cmdarg.c
  * src/vm/mainstd.c
  * src/vm/maindllp.c
  * src/vm/arrays.c
  * src/vm/task.c
  * src/vm/fm.c
  * src/vm/proc.c
  * src/vm/thread.c
  * src/vm/memvars.c
  * src/vm/arrayshb.c
  * src/vm/eval.c
  * src/vm/extend.c
  * src/vm/dynlibhb.c
  * src/vm/set.c
  * src/vm/classes.c
  * src/debug/dbgentry.c
  * src/common/hbgete.c
  * src/common/hbffind.c
  * src/common/hbver.c
  * src/common/hbprintf.c
  * src/common/hbfsapi.c
  * src/common/hbstr.c
  * src/common/expropt1.c
  * src/common/expropt2.c
  * src/common/hbdate.c
  * src/common/strwild.c
  * src/common/hbhash.c
  * src/rtl/gtdos/gtdos.c
  * src/rtl/fscopy.c
  * src/rtl/run.c
  * src/rtl/gtwin/gtwin.c
  * src/rtl/gtxwc/gtxwc.h
  * src/rtl/gtxwc/gtxwc.c
  * src/rtl/math.c
  * src/rtl/empty.c
  * src/rtl/gtcrs/gtcrs.c
  * src/rtl/trim.c
  * src/rtl/filehb.c
  * src/rtl/hbtoken.c
  * src/rtl/fstemp.c
  * src/rtl/gtchrmap.c
  * src/rtl/strmatch.c
  * src/rtl/gtstd/gtstd.c
  * src/rtl/gttrm/gttrm.c
  * src/rtl/padr.c
  * src/rtl/hbstrfmt.c
  * src/rtl/transfrm.c
  * src/rtl/fserr.c
  * src/rtl/minmax.c
  * src/rtl/hbfeof.c
  * src/rtl/dates.c
  * src/rtl/padc.c
  * src/rtl/gtcgi/gtcgi.c
  * src/rtl/errapi.c
  * src/rtl/version.c
  * src/rtl/hbregexc.c
  * src/rtl/hbrandom.c
  * src/rtl/strtran.c
  * src/rtl/hbprocfn.c
  * src/rtl/hbsocket.c
  * src/rtl/hbinet.c
  * src/rtl/copyfile.c
  * src/rtl/errintlo.c
  * src/rtl/gtapi.c
  * src/rtl/filesys.c
  * src/rtl/padl.c
  * src/rtl/hbregex.c
  * src/rtl/hbbit.c
  * src/rtl/isprint.c
  * src/rtl/saverest.c
  * src/rtl/diskspac.c
  * src/rtl/console.c
  * src/rtl/spfiles.c
  * src/rtl/gtos2/gtos2.c
  * src/rtl/philes.c
  * src/rtl/hbbffnc.c
  * src/rtl/hbgtcore.c
  * src/rtl/cdpapi.c
  * src/rtl/dirdrive.c
  * src/rtl/hbi18n1.c
  * src/rtl/gtclip.c
  * src/rtl/mlcfunc.c
  * src/rtl/gtapiu.c
  * src/rtl/accept.c
  * src/rtl/idle.c
  * src/rtl/itemseri.c
  * src/rtl/hbrunfun.c
  * src/rtl/setcolor.c
  * src/rtl/setkey.c
  * src/rtl/gtsln/mousesln.c
  * src/rtl/gtsln/gtsln.c
  * src/rtl/gtsln/kbsln.c
  * src/rtl/gtsln/gtsln.h
  * src/rtl/disksphb.c
  * src/rtl/strc.c
  * src/rtl/gtpca/gtpca.c
  * src/rtl/gtgui/gtgui.c
  * src/rtl/hbhex.c
  * src/rtl/trace.c
  * src/rtl/gt_tpl/gt_tpl.c
  * src/rtl/inkeyapi.c
  * src/rtl/filebuf.c
  * src/rtl/gete.c
  * src/rtl/setcurs.c
  * src/rtl/hbproces.c
  * src/rtl/langapi.c
  * src/rtl/gtwvt/gtwvt.h
  * src/rtl/gtwvt/gtwvt.c
  * src/rtl/mouse53.c
  * src/rtl/fssize.c
  * src/rtl/hbbyte.c
  * src/rtl/mouseapi.c
  * src/rtl/memofile.c
  * src/rtl/valtostr.c
  * src/rtl/file.c
  * src/rtl/val.c
  * src/rtl/rat.c
  * src/rdd/hbsix/sxcompr.c
  * include/hbvmpub.h
  * include/hbset.h
  * include/hbapicdp.h
  * include/hbstack.h
  * include/hbapilng.h
  * include/hbgtcore.h
  * include/hbapifs.h
  * include/hbthread.h
  * include/hbxvm.h
  * include/hbmacro.h
  * include/hbtypes.h
  * include/hbapi.h
  * include/hbapiitm.h
  * include/hbznet.h
  * include/hbvm.h
  * include/hbapidbg.h
  * include/hbcomp.h
  * include/hbsxfunc.h
  * include/hbcompdf.h
  * include/hbmather.h
  * include/hbapistr.h
  * include/hbwmain.c
  * include/hbexpra.c
  * include/hbexprop.h
  * include/hbsocket.h
  * include/hbapigt.h
  * include/hbapicls.h
  * include/hbhash.h
  * include/hbregex.h
  * include/hbexprb.c
  * include/hbdate.h
  * contrib/gtalleg/gtalleg.c
  * contrib/xhb/hboutdbg.c
  * contrib/xhb/hbserv.h
  * contrib/xhb/bkgtsks.c
  * contrib/xhb/dbf2txt.c
  * contrib/xhb/xhbis.c
  * contrib/xhb/fparse.c
  * contrib/xhb/xhb.h
  * contrib/xhb/xhbsave.c
  * contrib/xhb/xhbmsgs.c
  * contrib/xhb/freadlin.c
  * contrib/xhb/txtline.c
  * contrib/xhb/dbgfxc.c
  * contrib/xhb/xhberrc.c
  * contrib/xhb/filestat.c
  * contrib/xhb/xhbcopyf.c
  * contrib/xhb/hbnxs.h
  * contrib/xhb/hbserv.c
  * contrib/xhb/cstructc.c
  * contrib/xhb/xhbfunc.c
  * contrib/hbmzip/hbmzip.c
  * contrib/gtqtc/gtqtc.cpp
  * contrib/gtwvg/gtwvg.c
  * contrib/gtwvg/gtwvg.h
  * contrib/gtwvg/wvggui.c
  * contrib/gtwvg/wvgcuig.c
  * contrib/gtwvg/wvggui.h
  * contrib/gtwvg/wvgwin.c
  * contrib/gtwvg/wvgutils.c
  * contrib/gtwvg/wvgcore.c
  * contrib/gtwvg/wvgwing.c
  * contrib/hbmisc/hb_f.c
  * contrib/hbmisc/dates2.c
  * contrib/hbwin/hbwapi.h
  * contrib/hbbtree/tests/ctest.c
    * BOOL  -> HB_BOOL
    * TRUE  -> HB_TRUE
    * FALSE -> HB_FALSE
    ; If possible please try to verify me, at least your own are of interest
      or expertise. Look for HB_BOOL/HB_TRUE/HB_FALSE usage in WINAPI calls,
      if you see such thing, it's wrong. Also some, HB_BOOL WINAPI BOOL
      implicit conversions may need to be cleaned.
    ; I didn't touch PP, RDD, SDD and compiler parts yet.
    ; In few places it's possible that some in-line comments are disaligned
      after this operation.
2010-01-14 17:59:30 +00:00
Przemyslaw Czerpak
e1ba8c6f23 2009-11-26 03:45 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapi.h
  * harbour/include/hbvm.h
  * harbour/include/hbvmpub.h
  * harbour/include/hbstack.h
  * harbour/src/vm/hvm.c
  * harbour/src/vm/estack.c
  * harbour/src/vm/fm.c
  * harbour/src/vm/garbage.c
    + added new function hb_xclean() executed by GC just before resuming
      suspended threads - it can be used by memory manager to clean
      internal structures and release unused memory to OS.
    % release unused memory to OS in hb_xclean() when DLMALLOC is used
    % release unused memory in all mspaces to OS in hb_xclean() when
      HB_FM_DLMT_ALLOC is used
    % release unused memory in mspace when last thread detach it
    % balance used mspaces between threads in hb_xclean() when
      HB_FM_DLMT_ALLOC is used
2009-11-26 02:46:11 +00:00
Przemyslaw Czerpak
33ac359145 2009-11-24 16:48 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/vm/dlmalloc.c
    % use harbour spin locks if available by default in all builds

  * harbour/include/hbatomic.h
    * removed HB_SPINLOCK_SLEEP macro and enable code to always yield
      the processor in spin locks
    * cover double spin lock setting by HB_SPINLOCK_REPEAT

  * harbour/src/vm/garbage.c
    * removed unused HB_SPINLOCK_SLEEP macro

  * harbour/include/hbstack.h
  * harbour/src/vm/estack.c
    + added new internal function hb_stackAllocator()
    * disable hb_stackTotalItems() stack macro so this function can be
      used also in internal HVM code to check if stack is initialized

  * harbour/src/vm/fm.c
    ! use hb_stackAllocator() to access pointer to DLMALLOC mspace
      It should fix GPF when DLMT was used in OS2 builds - please test.
2009-11-24 15:49:02 +00:00
Przemyslaw Czerpak
f111e35a0c 2009-11-18 16:33 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbthread.h
     * minor cleanup in comment

  * harbour/src/vm/dlmalloc.c
    * use harbour spinlocks in windows builds to eliminate calling
      InterlockedCompareExchange[Pointer]() function

  * harbour/include/hbstack.h
    ! disabled TLS ASM inline code which seems to not work with Win9x.
2009-11-18 15:33:38 +00:00
Viktor Szakats
fdc4505247 2009-11-16 11:26 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/common/hbffind.c
  * src/rtl/fscopy.c
  * src/rtl/fserr.c
  * src/rtl/hbfeof.c
  * src/rtl/errapi.c
  * src/rtl/hbsocket.c
  * src/rtl/filesys.c
  * src/rtl/philes.c
  * src/rtl/dirdrive.c
  * src/rtl/filebuf.c
  * src/rtl/hbproces.c
  * include/hbstack.h
  * include/hbapifs.h
  * include/hbapierr.h
    * Changed USHORT type for error codes to HB_ERRCODE.
    + More or less changed int type of Extend/Item API call to 
      long type to prepare for HB_ERRCODE change to ULONG.
    ; TODO: Rename variables to reflect new type.
    ; TODO: Change internal error code from ULONG to HB_ERRCODE.
    ; TODO: Inspect rest of Harbour like above. I've only dealt with 
            rtl, vm.
    ; TODO: hbnetio protocol needs to be modified to pass errcode 
            as 32 bit value.
    ; NOTE: There is still disagreement in code in few places 
            in error type and 'int' is used internally, f.e. 
            sockets, some internal OS code conversion funtions.
    ; TODO: Different topic, but we use a lot of USHORTs to 
            store modes, tries, severity, operation, flags and
            few other things which would better be stored as 
            simple int probably.
    ; Please review me.
2009-11-16 10:32:49 +00:00
Przemyslaw Czerpak
6e6ff8c9e7 2009-09-08 12:03 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbstack.h
  * harbour/source/vm/estack.c
    * small cleanup in some macros definitions

  * harbour/source/vm/hvm.c
    * pacified ICC++ warnings

  * harbour/source/vm/mainstd.c
    ! do not force main() declaration as extern "C"

  * harbour/include/hbdefs.h
  * harbour/include/hbsetup.h
    * modified HB_FUNC*() macros declarations to respect global extern "C"
      settings

  * harbour/source/vm/classes.c
    * use HB_FUNC*() macros to declare harbour functions

  * harbour/source/common/hbprintf.c
    * added workaround for some missing C99 math macros in SunOS GCC used in
      C++ mode. Warning C++ mode in SunOS-GCC disables C99 extensions.

  * harbour/contrib/gtalleg/gtalleg.c
    * hack for compilation with SunPRO C
2009-09-08 10:03:24 +00:00
Przemyslaw Czerpak
2abefe1b3e 2009-07-27 23:43 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbstack.h
    + added socket error codes to HB_IOERRORS

  * harbour/include/Makefile
  + harbour/include/hbsocket.ch
  + harbour/include/hbsocket.h
  * harbour/source/rtl/Makefile
  + harbour/source/rtl/hbsocket.c
    + added new BSD socket functions: hb_socket*(). They should be quite
      close to low level C socket interface with few modifications which
      help to hide some platform differences. Unfortunately we do not use
      autoconf so I had to arbitrary set which features are available
      on some platforms. In practice it means that it reduces portability
      to older OS-es, i.e. it should work with current Linux versions
      but it will not without some modifications in macros used to control
      supported features with older Linuxes using kernel 2.2 or 2.0.
      The same can happen with other *nix ports like Darwin, SunOS, HP-UX
      or with different versions of some Windows compilers. I also do not
      know which functionality is available in OS2 GCC ports and I would
      like to ask OS2 users to make tests and disable not working features.
      We also need tests with HP-UX, Darwin and SunOS.
      IP6 support is enabled only in *nixes. If Windows users are interested
      in IP6 then please add support for it. Most of Windows compilers do
      not support standard POSIX functions so I do not want to make it
      myself using unknown for me API without testing.
      In *nix builds PF_UNIX/PF_LOCAL sockets are also supported.
      Support for other socket types can be easy added if someone is
      interested in them.
      The constant values used in hbsocket.ch are equal to original BSD
      socket definitions. If it's necessary then it's possible to enable
      their translation inside hbsocket.c code though I do not think we
      will find such OS.
      The list of hb_socket*() functions was designed to cover all existing
      functionality in hbinet.c and socket.c. Most of functions supports
      timeout parameter what effectively allows to hide direct select()
      usage.
      Please make test with real applications and report any problems
      with hb_inet*() functions you will find.

  * harbour/source/vm/hvm.c
    * minor cleanup

  * harbour/source/rtl/hbi18n1.c
    * cleaned variable name

  * harbour/source/rtl/hbinet.c
  * harbour/examples/uhttpd2/socket.c
  * harbour/contrib/hbssl/hbssl.c
    * updated to use hb_socket*() functions

  * harbour/include/hbextern.ch
    * enabled HB_INET*() functions in DOS builds - they will simply return
      errors

  - harbour/include/hbapinet.h
    - removed old header file

  * harbour/source/pp/ppcore.c
    ! modified ENDTEXT marker to work also with comments in the same line
      It's more closer to Clipper though intentionally we are not fully
      CA-Cl*pper compatible here.
2009-07-27 21:43:31 +00:00
Viktor Szakats
a77f478287 2009-07-01 08:35 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* source/rtl/gtwvt/gtwvt.c
    ! Fixed maximize button state when HB_GTI_RESIZABLE is set to .T.
      before the window is drawn.
      Please test.
    % Cleaned windows style definitions in source.

  * include/hbstack.h
  * include/hbapi.h
    * Formatting in comment.
2009-07-01 06:37:45 +00:00
Przemyslaw Czerpak
c3e1436da0 2009-06-26 02:22 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbvm.h
  * harbour/include/hbrdddbf.h
  * harbour/include/hbapidbg.h
  * harbour/include/hbset.h
  * harbour/include/hbcomp.h
  * harbour/include/hbapirdd.h
  * harbour/include/hbstack.h
  * harbour/include/hbsxfunc.h
  * harbour/include/hbapilng.h
  * harbour/include/hbgtcore.h
  * harbour/include/hbapifs.h
  * harbour/include/hbdbsort.h
  * harbour/include/hbapigt.h
  * harbour/include/hbapi.h
  * harbour/include/hbapierr.h
  * harbour/include/hbapiitm.h
  * harbour/include/hbrddfpt.h
  * harbour/contrib/hbmysql/mysql.c
  * harbour/contrib/hbct/bitnum.c
  * harbour/contrib/hbct/token2.c
  * harbour/contrib/hbct/charsprd.c
  * harbour/contrib/hbct/ctnet.c
  * harbour/contrib/hbct/charonly.c
  * harbour/contrib/hbct/atadjust.c
  * harbour/contrib/hbct/ctwin.c
  * harbour/contrib/hbct/charsort.c
  * harbour/contrib/hbct/ctwin.h
  * harbour/contrib/hbct/charmix.c
  * harbour/contrib/hbct/charevod.c
  * harbour/contrib/hbct/maxline.c
  * harbour/contrib/hbct/wordrepl.c
  * harbour/contrib/hbct/charrepl.c
  * harbour/contrib/hbct/files.c
  * harbour/contrib/hbct/video.c
  * harbour/contrib/hbct/charswap.c
  * harbour/contrib/hbct/dattime3.c
  * harbour/contrib/hbct/charop.c
  * harbour/contrib/hbct/misc2.c
  * harbour/contrib/hbct/charone.c
  * harbour/contrib/hbct/ctstr.c
  * harbour/contrib/hbct/screen1.c
  * harbour/contrib/hbct/token1.c
  * harbour/contrib/hbct/ctstr.h
  * harbour/contrib/hbct/charmirr.c
  * harbour/contrib/hbct/relation.c
  * harbour/contrib/hbct/atnum.c
  * harbour/contrib/hbct/like.c
  * harbour/contrib/hbct/count.c
  * harbour/contrib/hbct/disk.c
  * harbour/contrib/hbct/ctstrfil.c
  * harbour/contrib/hbct/posdiff.c
  * harbour/contrib/hbct/addascii.c
  * harbour/contrib/hbct/tab.c
  * harbour/contrib/hbct/numline.c
  * harbour/contrib/hbct/dattime2.c
  * harbour/contrib/hbct/asciisum.c
  * harbour/contrib/hbct/expand.c
  * harbour/contrib/hbct/pos2.c
  * harbour/contrib/hbct/numat.c
  * harbour/contrib/hbct/atrepl.c
  * harbour/contrib/hbct/wordtoch.c
  * harbour/contrib/hbct/print.c
  * harbour/contrib/hbct/justify.c
  * harbour/contrib/xhb/hbxml.c
  * harbour/contrib/xhb/dbf2txt.c
  * harbour/contrib/xhb/xhbis.c
  * harbour/contrib/xhb/fparse.c
  * harbour/contrib/xhb/xstrdel.c
  * harbour/contrib/xhb/hbcomprs.c
  * harbour/contrib/xhb/datesxhb.c
  * harbour/contrib/xhb/xhbmsgs.c
  * harbour/contrib/xhb/freadlin.c
  * harbour/contrib/xhb/txtline.c
  * harbour/contrib/xhb/xhbtrim.c
  * harbour/contrib/xhb/xhbcopyf.c
  * harbour/contrib/xhb/cstructc.c
  * harbour/contrib/xhb/xhbfunc.c
  * harbour/contrib/hbtpathy/tplinux.c
  * harbour/contrib/hbgt/charmixg.c
  * harbour/contrib/hbgt/strexpan.c
  * harbour/contrib/hbgt/charodd.c
  * harbour/contrib/hbgt/strright.c
  * harbour/contrib/hbgt/asciisgt.c
  * harbour/contrib/hbgt/strdiffg.c
  * harbour/contrib/hbgt/chrtotal.c
  * harbour/contrib/hbgt/strcount.c
  * harbour/contrib/hbgt/strleft.c
  * harbour/contrib/hbgt/ascposgt.c
  * harbour/contrib/hbgt/chrfirst.c
  * harbour/contrib/hbgt/chrcount.c
  * harbour/contrib/hbgt/strpbrk.c
  * harbour/contrib/hbgt/chareven.c
  * harbour/contrib/hbgt/strcspn.c
  * harbour/contrib/hbgt/atdiff.c
  * harbour/contrib/hbsqlit3/hbsqlit3.c
  * harbour/contrib/hbmzip/hbmzip.c
  * harbour/contrib/hbnf/proper.c
  * harbour/contrib/hbnf/fttext.c
  * harbour/contrib/hbnf/chdir.c
  * harbour/contrib/hbnf/getver.c
  * harbour/contrib/hbnf/ftattr.c
  * harbour/contrib/hbnf/mkdir.c
  * harbour/contrib/hbnf/rmdir.c
  * harbour/contrib/Makefile
  * harbour/contrib/hbcurl/hbcurl.c
  * harbour/contrib/rddsql/sddmy/mysqldd.c
  * harbour/contrib/rddsql/sddpg/pgsqldd.c
  * harbour/contrib/rddsql/sddfb/fbirddd.c
  * harbour/contrib/rddsql/sddodbc/odbcdd.c
  * harbour/contrib/rddsql/sqlmix.c
  * harbour/contrib/hbhpdf/harupdf.c
  * harbour/contrib/rddads/adsx.c
  * harbour/contrib/rddads/adsfunc.c
  * harbour/contrib/rddads/rddads.h
  * harbour/contrib/rddads/ads1.c
  * harbour/contrib/hbmisc/hb_f.c
  * harbour/contrib/hbmisc/strfmt.c
  * harbour/contrib/hbmisc/stringsx.c
  * harbour/contrib/hbmisc/spd.c
  * harbour/contrib/hbtip/utils.c
  * harbour/contrib/hbwin/wapi_winbase.c
  * harbour/contrib/hbwin/win_misc.c
  * harbour/contrib/hbbtree/hb_btree.h
  * harbour/contrib/hbbtree/hb_btree.c
  * harbour/source/pp/hbpp.c
  * harbour/source/vm/runner.c
  * harbour/source/vm/estack.c
  * harbour/source/vm/itemapi.c
  * harbour/source/vm/hvm.c
  * harbour/source/vm/cmdarg.c
  * harbour/source/vm/memvars.c
  * harbour/source/vm/dynlibhb.c
  * harbour/source/vm/set.c
  * harbour/source/main/harbour.c
  * harbour/source/debug/dbgentry.c
  * harbour/source/common/hbfsapi.c
  * harbour/source/common/hbfopen.c
  * harbour/source/rtl/gtdos/gtdos.c
  * harbour/source/rtl/diskspac.c
  * harbour/source/rtl/console.c
  * harbour/source/rtl/chrasc.c
  * harbour/source/rtl/fscopy.c
  * harbour/source/rtl/run.c
  * harbour/source/rtl/spfiles.c
  * harbour/source/rtl/defpath.c
  * harbour/source/rtl/philes.c
  * harbour/source/rtl/oldbox.c
  * harbour/source/rtl/math.c
  * harbour/source/rtl/hbgtcore.c
  * harbour/source/rtl/cdpapi.c
  * harbour/source/rtl/gtcrs/gtcrs.c
  * harbour/source/rtl/dirdrive.c
  * harbour/source/rtl/hbi18n1.c
  * harbour/source/rtl/trim.c
  * harbour/source/rtl/hbzlibgz.c
  * harbour/source/rtl/philesx.c
  * harbour/source/rtl/mlcfunc.c
  * harbour/source/rtl/filehb.c
  * harbour/source/rtl/fstemp.c
  * harbour/source/rtl/is.c
  * harbour/source/rtl/hbrunfun.c
  * harbour/source/rtl/ampm.c
  * harbour/source/rtl/setcolor.c
  * harbour/source/rtl/oemansi.c
  * harbour/source/rtl/disksphb.c
  * harbour/source/rtl/hbzlib.c
  * harbour/source/rtl/strpeek.c
  * harbour/source/rtl/replic.c
  * harbour/source/rtl/stuff.c
  * harbour/source/rtl/hbstrfmt.c
  * harbour/source/rtl/transfrm.c
  * harbour/source/rtl/hbhex.c
  * harbour/source/rtl/trace.c
  * harbour/source/rtl/hbadler.c
  * harbour/source/rtl/samples.c
  * harbour/source/rtl/filebuf.c
  * harbour/source/rtl/hbcrc.c
  * harbour/source/rtl/gete.c
  * harbour/source/rtl/hbmd5.c
  * harbour/source/rtl/langapi.c
  * harbour/source/rtl/gtcgi/gtcgi.c
  * harbour/source/rtl/errapi.c
  * harbour/source/rtl/hbregexc.c
  * harbour/source/rtl/natmsg.c
  * harbour/source/rtl/fssize.c
  * harbour/source/rtl/hbinet.c
  * harbour/source/rtl/colorind.c
  * harbour/source/rtl/copyfile.c
  * harbour/source/rtl/mouseapi.c
  * harbour/source/rtl/soundex.c
  * harbour/source/rtl/memofile.c
  * harbour/source/rtl/hbffind.c
  * harbour/source/rtl/gtapi.c
  * harbour/source/rtl/direct.c
  * harbour/source/rtl/filesys.c
  * harbour/source/rtl/file.c
  * harbour/source/rtl/val.c
  * harbour/source/rtl/hbregex.c
  * harbour/source/rtl/rat.c
  * harbour/source/rtl/isprint.c
  * harbour/source/rdd/dbfntx/dbfntx1.c
  * harbour/source/rdd/dbsql.c
  * harbour/source/rdd/workarea.c
  * harbour/source/rdd/wacore.c
  * harbour/source/rdd/sdf1.c
  * harbour/source/rdd/dbdetach.c
  * harbour/source/rdd/dbcmdx.c
  * harbour/source/rdd/dbfnsx/dbfnsx1.c
  * harbour/source/rdd/dbcmd.c
  * harbour/source/rdd/dbfcdx/dbfcdx1.c
  * harbour/source/rdd/delim1.c
  * harbour/source/rdd/dbf1.c
  * harbour/source/rdd/hsx/hsx.c
  * harbour/source/rdd/dbcmd53.c
  * harbour/source/rdd/usrrdd/usrrdd.c
  * harbour/source/rdd/wafunc.c
  * harbour/source/rdd/dbffpt/dbffpt1.c
  * harbour/source/rdd/hbsix/sxsem.c
  * harbour/source/rdd/hbsix/sxord.c
  * harbour/source/rdd/hbsix/sxfname.c
  * harbour/source/rdd/hbsix/sxtable.c
  * harbour/source/rdd/hbsix/sxdate.c
  * harbour/source/rdd/hbsix/sxutil.c
  * harbour/source/rdd/hbsix/sxcompr.c
  * harbour/source/compiler/hbmain.c
  * harbour/source/compiler/cmdcheck.c
  * harbour/source/compiler/hbpcode.c
  * harbour/source/compiler/genc.c
  * harbour/source/compiler/gencc.c
  * harbour/source/compiler/hbcmplib.c
  * harbour/source/compiler/ppcomp.c
    * changed 'char *' and changed 'BYTE *' to 'const char *' in
      the following functions:
         const char * hb_vmFindModuleSymbolName( PHB_SYMB pSym );
         void  hb_vmInitSymbolGroup( void * hNewDynLib, int argc,
                                     const char * argv[] );
         void hb_dbgEntry( int nMode, int nLine, const char *szName,
                           int nIndex, PHB_ITEM pFrame );
         void hb_dbgAddBreak( void *handle, const char *cModule,
                              int nLine, const char *szFunction );
         void hb_dbgAddWatch( void *handle, const char *szExpr, BOOL bTrace );
         PHB_ITEM hb_dbgGetExpressionValue( void *handle,
                                            const char *expression );
         BOOL hb_dbgIsValidStopLine( void *handle, const char *szModule,
                                     int nLine );
         void hb_dbgSetToCursor( void *handle, const char *szModule,
                                 int nLine );
         void hb_dbgSetWatch( void *handle, int nWatch,
                              const char *szExpr, BOOL bTrace );
         const char * hb_setGetCPtr( HB_set_enum set_specifier );
         const char * hb_setGetAltFile( void );
         const char * hb_setGetDateFormat( void );
         const char * hb_setGetTimeFormat( void );
         const char * hb_setGetDefault( void );
         const char * hb_setGetDelimChars( void );
         const char * hb_setGetDevice( void );
         const char * hb_setGetExtraFile( void );
         const char * hb_setGetPath( void );
         const char * hb_setGetMFileExt( void );
         const char * hb_setGetPrintFile( void );
         const char * hb_setGetEOL( void );
         const char * hb_setGetHBOUTLOG( void );
         const char * hb_setGetHBOUTLOGINFO( void );
         const char * hb_setGetOSCODEPAGE( void );
         void hb_compInitPP( HB_COMP_DECL, int argc,
                             const char * const argv[] );
         void hb_compGenPCodeN( const BYTE * pBuffer, ULONG ulSize,
                                HB_COMP_DECL );
         int  hb_compMain( int argc, const char * const argv[],
                           BYTE ** pBufPtr, ULONG * pulSize,
                           const char * szSource );
         void hb_compChkCompilerSwitch( HB_COMP_DECL, int,
                                        const char * const args[] );
         void hb_compChkDefines( HB_COMP_DECL, int iArg,
                                 const char * const args[] );
         void hb_compGenCString( FILE * yyc, const BYTE * pText, ULONG ulLen );
         AREAP hb_rddRequestArea( const char * szAlias, PHB_ITEM pCargo,
                                  BOOL fNewArea, BOOL fWait );
         char * hb_stackDirBuffer( void );
         LONG hb_sxPtoD( const char * pDate );
         const char * hb_langID( void );
         const char * hb_langSelectID( const char * pszID );
         const char * hb_langDGetItem( int iIndex );
         const char * hb_langDGetErrorDesc( ULONG ulIndex );
         BOOL       hb_fsChDir( const char * pszDirName );
         HB_FHANDLE hb_fsCreate( const char * pszFileName, ULONG ulAttr );
         HB_FHANDLE hb_fsCreateEx( const char * pszFilename, ULONG ulAttr,
                                   USHORT uiFlags );
         HB_FHANDLE hb_fsCreateTemp( const char * pszDir,
                                     const char * pszPrefix,
                                     ULONG ulAttr, char * pszName );
         HB_FHANDLE hb_fsCreateTempEx( char * pszName, const char * pszDir,
                                       const char * pszPrefix,
                                       const char * pszExt, ULONG ulAttr );
         const char * hb_fsCurDir( USHORT uiDrive );
         USHORT     hb_fsCurDirBuff( USHORT uiDrive, char * pbyBuffer,
                                     ULONG ulLen );
         void       hb_fsBaseDirBuff( char * pbyBuffer );
         BOOL       hb_fsDelete( const char * pszFileName );
         BOOL       hb_fsFile( const char * pszFileName );
         BOOL       hb_fsIsDirectory( const char * pszFilename );
         HB_FOFFSET hb_fsFSize( const char * pszFileName, BOOL bUseDirEntry );
         HB_FHANDLE hb_fsExtOpen( const char * pszFileName,
                                  const char * pDefExt,
         char *     hb_fsExtName( const char * pFilename,
                                  const char * pDefExt, USHORT uiExFlags,
                                  const char * pPaths );
         BOOL       hb_fsMkDir( const char * pszDirName );
         HB_FHANDLE hb_fsOpen( const char * pszFileName, USHORT uiFlags );
         BOOL       hb_fsRmDir( const char * pszDirName );
         BOOL       hb_fsRename( const char * pszOldName,
                                 const char * pszNewName );
         BOOL       hb_fsGetFileTime( const char * pszFileName,
                                      LONG * plJulian, LONG * plMillisec );
         BOOL       hb_fsSetFileTime( const char * pszFileName,
                                      LONG lJulian, LONG lMillisec );
         BOOL       hb_fsGetAttr( const char * pszFileName, ULONG * pulAttr );
         BOOL       hb_fsSetAttr( const char * pszFileName, ULONG ulAttr );
         HB_FHANDLE hb_fsPOpen( const char * pFilename, const char * pMode );
         BOOL       hb_fsCopy( const char * pSource, const char * pDest );
         BOOL       hb_spFile( const char * pFilename, char * pRetPath );
         BOOL       hb_spFileExists( const char * pFilename, char * pRetPath );
         HB_FHANDLE hb_spOpen( const char * pFilename, USHORT uiFlags );
         HB_FHANDLE hb_spCreate( const char * pFilename, ULONG ulAttr );
         HB_FHANDLE hb_spCreateEx( const char * pFilename,
                                   ULONG ulAttr, USHORT uiFlags );
         PHB_FILE   hb_fileExtOpen( const char * pFilename,
                                    const char * pDefExt, USHORT uiExFlags,
                                    const char * pPaths, PHB_ITEM pError );
         PHB_FILE   hb_fileCreateTemp( const char * pszDir,
                                       const char * pszPrefix,
                                       ULONG ulAttr, char * pszName );
         PHB_FILE   hb_fileCreateTempEx( char * pszName, const char * pszDir,
                                         const char * pszPrefix,
                                         const char * pszExt, ULONG ulAttr );
         HB_ERRCODE hb_gtBox( SHORT uiTop, SHORT uiLeft, SHORT uiBottom,
                              SHORT uiRight, const BYTE * pbyFrame );
         HB_ERRCODE hb_gtDrawBox( SHORT uiTop, SHORT uiLeft, SHORT uiBottom,
                                  SHORT uiRight, const BYTE * pbyFrame,
                                  int iColor );
         HB_ERRCODE hb_gtWrite( const BYTE * pbyStr, ULONG ulLen );
         HB_ERRCODE hb_gtWriteAt( USHORT uiRow, USHORT uiCol,
                                  const BYTE * pbyStr, ULONG ulLen );
         HB_ERRCODE hb_gtWriteCon( const BYTE * pbyStr, ULONG ulLen );
         HB_ERRCODE hb_gtPutText( USHORT uiRow, USHORT uiCol,
                                  const BYTE * pStr, ULONG ulLength,
                                  int iColor );
         HB_ERRCODE hb_gtOutStd( const BYTE * pbyStr, ULONG ulLen );
         HB_ERRCODE hb_gtOutErr( const BYTE * pbyStr, ULONG ulLen );
         HB_ERRCODE hb_gtBoxEx( int iTop, int iLeft, int iBottom, int iRight,
                                const BYTE * pbyFrame, int iColor );
         void       hb_mouseRestoreState( const BYTE * pBuffer );
         const char * hb_strLTrim( const char * szText, ULONG * ulLen );
         const char * hb_conNewLine( void );
         const char * hb_conSetColor( const char * szColor );
         const char * hb_errGetDescription( PHB_ITEM pError );
         const char * hb_errGetFileName( PHB_ITEM pError );
         const char * hb_errGetOperation( PHB_ITEM pError );
         const char * hb_errGetSubSystem( PHB_ITEM pError );
         int hb_ctwAddWindowBox( int iWindow, const BYTE * szBox, int iColor );
         const char *ct_at_exact_forward
                              ( const char *pcString, size_t sStrLen,
                                const char *pcMatch, size_t sMatchLen,
                                size_t *psMatchStrLen );
         const char *ct_at_exact_backward
                              ( const char *pcString, size_t sStrLen,
                                const char *pcMatch, size_t sMatchLen,
                                size_t *psMatchStrLen );
         const char *ct_at_wildcard_forward
                              ( const char *pcString, size_t sStrLen,
                                const char *pcMatch, size_t sMatchLen,
                                char cWildCard, size_t *psMatchStrLen );
         const char *ct_at_wildcard_backward
                              ( const char *pcString, size_t sStrLen,
                                const char *pcMatch, size_t sMatchLen,
                                char cWildCard, size_t *psMatchStrLen );
         const char *ct_at_charset_forward
                              ( const char *pcString, size_t sStrLen,
                                const char *pcCharSet, size_t sCharSetLen,
                                size_t *psMatchedCharPos );
         const char *ct_at_charset_backward
                              ( const char *pcString, size_t sStrLen,
                                const char *pcCharSet, size_t sCharSetLen,
                                size_t *psMatchedCharPos );
         char * hb_adsOemToAnsi( const char * pcString, ULONG ulLen );
         char * hb_adsAnsiToOem( const char * pcString, ULONG ulLen );
         struct hb_BTree * hb_BTreeNew( const char *FileName,
                                        USHORT usPageSize, USHORT usKeySize,
                                        ULONG ulFlags, USHORT usBuffers );
         struct hb_BTree * hb_BTreeOpen( const char *FileName, ULONG lFlags,
                                         USHORT usBuffers );
         BOOL hb_BTreeInsert( struct hb_BTree * pBTree, const char * szKey,
                              PHB_ITEM pData );
         BOOL hb_BTreeDelete( struct hb_BTree * pBTree, const char * szKey,
                              LONG lData );
         BOOL hb_BTreeSeek( struct hb_BTree * pBTree, const char * szKey,
                            LONG lData, BOOL bSoftSeek );
         const char * hb_BTreeKey( struct hb_BTree * pBTree );

    * modified RDD methods:
         HB_ERRCODE PUTVALUEFILE( AREAP, USHORT, const char *, USHORT );
         HB_ERRCODE GETVALUEFILE( AREAP, USHORT, const char *, USHORT );
    * modified GT methods:
         void REST( HB_GT_PTR, int, int, int, int, const BYTE * );
         void PUTTEXT( HB_GT_PTR, int, int, BYTE, const BYTE *, ULONG );
         void WRITEAT( HB_GT_PTR, int, int, const BYTE *, ULONG );
         void WRITE( HB_GT_PTR, const BYTE *, ULONG );
         void WRITECON( HB_GT_PTR, const BYTE *, ULONG );
         void BOX( HB_GT_PTR, int, int, int, int, const BYTE *, BYTE );
         void BOXD( HB_GT_PTR, int, int, int, int, const BYTE *, BYTE );
         void BOXS( HB_GT_PTR, int, int, int, int, const BYTE *, BYTE );
         void OUTSTD( HB_GT_PTR, BYTE *, ULONG );
         void OUTERR( HB_GT_PTR, BYTE *, ULONG );
         void MOUSERESTORESTATE( HB_GT_PTR, const BYTE * );
    * modified RDD structers:
         DBFIELDINFO, DBOPENINFO, DBORDERCONDINFO, DBCONSTRAINTINFO,
         DBORDERCREATEINFO
    + modified parameters and behevior:
         const char * hb_fsNameConv( const char * szFileName, char ** pszFree );
         const char * hb_osEncode( const char * szFileName, char ** pszFree );
         const char * hb_osDecode( const char * szFileName, char ** pszFree );
      Please look at implementation and current usage of these functions.
    + added new function:
         BOOL hb_itemGetWriteCL( PHB_ITEM pItem,
                                 char ** pszValue, ULONG * pulLen );
      which converts item string buffer to writable state to use with
      functions like FREAD() instead of hb_itemUnShare*()
    * updatd other code to respect above modifications
    ! fixed bugs (also GPF traps) located by above modifications

   TODO: please make build tests. Especially in OS2 - not tested at all.
2009-06-26 00:33:38 +00:00
Przemyslaw Czerpak
d7af0eb431 2009-04-11 13:04 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbstack.h
  * harbour/source/vm/macro.c
  * harbour/source/vm/codebloc.c
  * harbour/source/vm/hashes.c
  * harbour/source/vm/dynsym.c
  * harbour/source/vm/itemapi.c
  * harbour/source/vm/garbage.c
  * harbour/source/vm/arrays.c
  * harbour/source/vm/thread.c
  * harbour/source/vm/memvars.c
  * harbour/source/vm/extend.c
  * harbour/source/vm/set.c
  * harbour/source/vm/classes.c
    * updated to optionally compile with HB_STACK_PRELOAD

  * harbour/source/vm/hvm.c
    % small cleanup
2009-04-11 10:57:29 +00:00
Przemyslaw Czerpak
cd8b1824fc 2009-04-10 22:54 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/contrib/hbqt/Makefile
    * added /usr/include to list of directories scanned for QT header files

  * harbour/contrib/hbole/olecore.c
    ! added missing return
    * formatting and minor cleanup

  * harbour/source/vm/arrays.c
    * formatting

  * harbour/source/vm/asort.c
    ! minor CA-Cl*pper compatibility fix - if sort codeblock returns
      numeric value then it should be used as logical one (0 means FALSE)

  * harbour/include/hbstack.h
  * harbour/source/vm/estack.c
    + added macro to force static hb_stack declaration even if
      HB_STACK_MACROS is internally used

  * harbour/source/vm/initsymb.c
  * harbour/source/vm/hashfunc.c
  * harbour/source/vm/evalhb.c
  * harbour/source/vm/pcount.c
  * harbour/source/vm/runner.c
  * harbour/source/vm/debug.c
  * harbour/source/vm/pvalue.c
  * harbour/source/vm/cmdarg.c
  * harbour/source/vm/proc.c
  * harbour/source/vm/eval.c
  * harbour/source/vm/dynlibhb.c
    * do not use hbvmopt.h if it's not necessary or use hbvmint.h instead
      to clean all direct references to hb_stack variable
2009-04-10 20:47:46 +00:00
Przemyslaw Czerpak
3672e94c50 2009-04-01 22:10 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/doc/Makefile
    ! removed unexisting license.txt file

  * harbour/include/hbapidbg.h
    * do not export Harbour debugger functions. If someone wants to create
      3-rd party debugger then we should agree the list of functions which
      should be public.

  * harbour/include/hbstack.h
    * minor cleanup in some definitions

  * harbour/include/hbdefs.h
    + added HB_DLL_ENTRY_POINT macro to set default DLL entry point for
      different Windows compilers

  * harbour/source/vm/maindllh.c
  * harbour/source/vm/maindllp.c
    * use HB_DLL_ENTRY_POINT macro

  * harbour/include/hbsetup.h
    * added internal macro to disable flatten optimization

  * harbour/include/hbmath.h
  * harbour/source/rtl/math.c
    * make default math error handler function static

  * harbour/include/hbatomic.h
    + added atomic inc/dec inline asm code to OW x86 builds

  * harbour/source/rtl/console.c
    * small code reorganization to not mix public and private function calls

  * harbour/source/rtl/hbregex.c
  * harbour/source/hbpcre/_hbpcreg.c
    * do not use hb_xfree() function pointer directly to avoid problems
      with different calling conventions.

  * harbour/config/win/owatcom.cf
  * harbour/config/os2/owatcom.cf
    * removed unnecessary in recent OpenWatcom versions explicit wlink.lnk
      including.
2009-04-01 20:04:37 +00:00
Przemyslaw Czerpak
7f1dcb2a81 2009-03-29 19:20 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapi.h
  * harbour/include/hbstack.h
  * harbour/source/vm/estack.c
  * harbour/source/vm/fm.c
    + added support for thread local memory allocators by using MSPACE
      mechanism in DLALLOC.
      It can be enabled by compiling Harbour with HB_FM_DLMT_ALLOC macro.
      By default up to 16 (HB_MSPACE_COUNT macro) independent memory
      allocators is dynamically created for new threads. When more threads
      is used then allocators are shared between them and HVM tries to
      balance used allocators to reduce number of threads using the
      same allocator.
      It should give noticeable scalability improvement in some OS-es
      where default memory manages has pure MT performance.
      Please try to compiler speedtst.prg with Harbour compiled with
      and without HB_FM_DLMT_ALLOC and compare results in this test:
         speedtst --thread=2 --scale
      using real multiCPU machine.

  * harbour/source/vm/dlmalloc.c
    * pacified warning when FOOTERS are enabled

  * harbour/source/vm/garbage.c
    * cleanup comment
2009-03-29 17:13:52 +00:00
Przemyslaw Czerpak
455e6e201f 2009-03-25 12:30 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbstack.h
    ! disabled inline assembler code to retrieve HVM stack pointer from TLS
      in Win64 builds. In summary I do not even know if Win64 uses the same
      memory addresses for TLS as Win32 so it's not safe to enable such code
      now. Maybe in the future though I hope that new 64 bit compilers will
      have fast enough native TLS support.
2009-03-25 11:23:35 +00:00
Przemyslaw Czerpak
1834b0d653 2009-03-22 18:16 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbstack.h
    * added alternative asm inline function to __MINGW32__ builds which
      operates on 64bit pointers. It's used when __MINGW64__ macro is
      defined. I do not know if such macro existing in 64bit MinGW version.

  * harbour/include/hbdefs.h
    + added HB_PTRUINT

  * harbour/source/common/hbprintf.c
    * used HB_PTRUINT for %p casting
2009-03-22 17:10:43 +00:00
Przemyslaw Czerpak
d56e5a98c8 2009-03-01 13:58 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapi.h
  * harbour/include/hbstack.h
  * harbour/source/vm/hvm.c
  * harbour/source/vm/estack.c
  * harbour/source/vm/memvars.c
    ! fixed __M[V]CLEAR()/ __M[V]RESTORE() to be exactly Clipper compatible
      and do not release PUBLIC GetList value. Here it's small example
      which illustrates current behavior and exploits bug in previous
      version:
         memvar getlist
         proc main()
            getlist:="public:getlist"
            ? getlist
            private getlist:="private:getlist"
            ? getlist
            CLEAR MEMORY
            ? getlist
         return

  * harbour/source/compiler/gencc.c
    + added Harbour exception to the license - it's mine code with
      few lines added/modified by Ryszard and Viktor. I hope they do
      not have anything against.

  * harbour/source/compiler/hbmain.c
  * harbour/source/compiler/hbident.c
    * minor formatting
2009-03-01 12:53:15 +00:00
Przemyslaw Czerpak
5dbddbeb1a 2009-02-06 00:05 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbstack.h
  * harbour/source/vm/estack.c
    ! fixed typo in one internal function name

  * harbour/include/hbapi.h
  * harbour/include/hbstack.h
  * harbour/source/vm/estack.c
  * harbour/source/vm/dynsym.c
  * harbour/source/vm/memvars.c
    % changed code used for memvars clear in MT mode - it greatly 
      reduce the cost of HVM thread exit
    % changed code for memvars copping/sharing when thread is started
      it greatly reduce the time of thread creation when existing memvars
      are shared or copied
   Both modifications reduced the cost of simple
      hb_threadJoin( hb_threadCreate( {|| NIL } ) )
   few times depending on number of symbols and memvars.

  * harbour/source/rtl/gttrm/gttrm.c
  * harbour/source/rtl/gtsln/gtsln.c
  * harbour/source/rtl/gtsln/gtsln.h
  * harbour/source/rtl/gtpca/gtpca.c
    % added better initial cursor position detection and eliminated sscanf()

  * harbour/source/Makefile
    ! fixed concurrent dependencies in cross builds
2009-02-05 23:01:40 +00:00
Przemyslaw Czerpak
77df7fd78f 2009-02-02 11:02 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/fm.c
    ! fixed typo in default FM module setting/

  * harbour/include/hbapicls.h
  * harbour/source/vm/classes.c
  * harbour/source/debug/dbgentry.c
    * renamed hb_dbgObjSendMessage() to hb_dbg_objSendMessage() to keep
      naming convention used for other C debugger functions

  * harbour/source/vm/debug.c
    * added information about existing debugger functions and where they
      are used.

  * harbour/include/hbvm.h
  * harbour/include/hbapidbg.h
  * harbour/include/hbvmpub.h
  * harbour/include/hbstack.h
  * harbour/include/hbapi.h
  * harbour/source/vm/codebloc.c
  * harbour/source/vm/estack.c
  * harbour/source/vm/hvm.c
  * harbour/source/debug/dbgentry.c
    * changed the method of static variable handling. Now we do not
      have centralized array of all statics used by application (s_aStatics)
      but each module uses it's own array to keep statics. The old
      s_aStatics has been removed. It means that loading new PCODE module
      from .hrb file or shared/dynamic library does not cause any static
      table reallocation so it does not creates potential GPF trap for MT
      code which may operate on static vars.
      This modification changed a little bit the debugger interface.
      I also updated some unused by us debug functions like __DBGVMVARSLIST()
      or __DBGVMVARSLEN() anyhow any 3-rd party debuggers should be
      updated for new API and modified hb_dbgEntry() syntax.
2009-02-02 09:58:22 +00:00
Przemyslaw Czerpak
65644f22a1 2008-12-27 15:31 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbstack.h
  * harbour/include/hbapi.h
  * harbour/include/hbapiitm.h
  * harbour/source/vm/hashes.c
    * small modifications in order of some structure members for better
      alignment

  * harbour/source/vm/hvm.c
    * pacified BCC warnings

  * harbour/contrib/rddsql/Makefile
  * harbour/contrib/rddsql/sddpg/Makefile
  + harbour/contrib/rddsql/sddfb/Makefile
    * updated GNU make files for new SQL RDDs - many thanks to
      Mindaugas
2008-12-27 14:29:30 +00:00
Przemyslaw Czerpak
fa31aa6f70 2008-12-11 19:48 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbthread.h
  * harbour/source/vm/thread.c
    + added hb_atomic_set(), hb_atomic_get(), hb_atomic_inc() and
      hb_atomic_dec() functions which operates on HB_COUNTER or smaller
      type if it's necessary for some platforms which can be access/assign
      increment/decrement in MT safe atom operations.
      hb_atomic_dec() returns true if counter is 0 after decrementation

  * harbour/include/hbatomic.h
    ! fixed compilation in Linux and OpenWatcom

  * harbour/include/hbapiitm.h
  * harbour/source/rtl/itemseri.c
    + make hb_itemSerialize() and hb_itemDeserialize() public functions
    ! fixed serialization items with internal item references

  * harbour/source/vm/hvm.c
    * release memvars after closing RDDs

  * harbour/source/debug/dbgentry.c
    ! fixed buffer overflow reported by Rodrigo

  * harbour/source/vm/macro.c
  * harbour/source/compiler/hbmain.c
    * formatting

  * harbour/include/hbexprb.c
    ! fixed wrongly recognized functions with HB_I18N_ prefix as
      HB_I18N_GETTEXT()

  * harbour/include/hbapi.h
  * harbour/include/hbstack.h
  * harbour/include/hbthread.h
  * harbour/source/vm/estack.c
  * harbour/source/vm/thread.c
  * harbour/source/vm/hvm.c
    + added support for I18N in HVM.
      Each thread can have it's own i18n set.
      When new thread is created then it inherits i18n set from parent
      thread and both uses the same set (please remember about it if you
      will want to make some direct modifications on active i18n set
      internals).
      When thread change active i18n set then it effects only this thread
      and new threads which will be create later. It does not change i18n
      in other existing threads.
    + added functions to set/get pointer to active i18n set in HVM
         void * hb_vmI18N( void )
         void   hb_vmSetI18N( void * )

  * harbour/include/hbapi.h
  * harbour/source/rtl/hbi18n.c
    + added i18n module. Now only for internal Harbour usage without support
      for optional switching to alternative implementations.
      I'll add such functionality later when I will work on native gettext
      support.

      The following public .prg functions has been added:
         HB_I18N_GETTEXT[_STRICT]( <cMsgID> [, <cContext> ] )
               -> <cTranslatedMsgID> | <cMsgID>
         HB_I18N_NGETTEXT[_STRICT]( <nValue>, <cMsgID> | <acMsgID> ;
                                    [, <cContext> ] )
               -> <cTranslatedMsgID> | <cMsgID> | <acMsgID>[ <nIndex> ]
      This is minimal support necessary for .prg code which has to exists
      in each i18n module working with Harbour.

      The following functions had been added as public C API:
         PHB_ITEM hb_i18n_gettext( PHB_ITEM pMsgID, PHB_ITEM pContext )
         PHB_ITEM hb_i18n_ngettext( PHB_ITEM pNum,
                                    PHB_ITEM pMsgID, PHB_ITEM pContext )

      The following functions had been added as private HVM C API:
         void   hb_i18n_init( void )
         void   hb_i18n_exit( void )
         void   hb_i18n_release( void * cargo )
         void * hb_i18n_alloc( void * cargo )
      They have to be supported by alternative i18n modules

      The following functions has been added to manage Harbour i18n
      translations sets:

         HB_I18N_CREATE()
                  -> <pI18N>
            Creates new empty I18N translation set

         HB_I18N_CODEPAGE( [<pI18N>,] [<cNewCP>], [<lBase>], [<lTranslate>] )
                  -> <cOldCP>
            Gets or sets Harbour codepage used by translation set
            <pI18N> - I18N translation set,
                      if it's not given then currently active I18N set is used
            <cNewCP> - new CP ID. Must be linked with application
            <lBase> - when it's .T. then get/set base massages CP instead of
                      translated massages CP
            <lTranslate> - if it's .T. then translate base (<lBase>==.T.) or
                           final messages in I18N set from previous CP to
                           given one. Base messages translation in synced
                           with context ID translation.

         HB_I18N_PLURALFORM( [<pI18N>,] [<cNewForm>|<bNewForm>], [<lBase>] )
                  -> <cOldForm>|<bOldForm>
            Gets or sets plural form used for final or base messages
            <pI18N> - I18N translation set,
                      if it's not given then currently active I18N set is used
            <cNewForm> - language ID of plural form, f.e.: "EN", "PL", "LT".
                         Now only three above are supported. Please add rules
                         for other languages to source/rtl/hbi18n.c.
            <bNewForm> - codeblock used to calculate plural form indexes.
                         can be used instead of character representation but
                         it's not storred in serialized I18N set
            <lBase> - when it's .T. then get/set base massages plural form
                      instead of translated massages one.

         HB_I18N_DESCRIPTION( [<pI18N>,] [<cNewDescription>] )
                  -> <cOldDescription>
            Gets or sets translation set description. After serialization
            up to 32 bytes is stored in header which can be easy used to
            determinate type of translation file.
            <pI18N> - I18N translation set,
                      if it's not given then currently active I18N set is used
            <cNewDescription> - new description

         HB_I18N_ADDTEXT( <pI18N>, <cMsgID>, <cTrans> | <acTrans> [, <cContext> ] )
                  -> NIL
            Adds new message with translation to i18n translation set
            <pI18N> - I18N translation set
            <cMsgID> - original message
            <cTrans> - translated message
            <acTrans> - array with translated messages used for plural forms
            <cContext> - message context

         HB_I18N_SET( [ <pI18N> | NIL ] )
                  -> <lActive>
            Sets given I18N translation set as default one used by
            HB_I18N_[N]GETTEXT[_STRICT]() functions or remove translation
            set for calling thread when passed parameter is NIL
            <pI18N> - I18N translation set
            Returns logical value which is .T. when i18n set is active

         HB_I18N_SAVETABLE( [<pI18N>] )
                  -> <cTable>
            Returns I18N translation as string item which can be stored
            in file or database
            <pI18N> - I18N translation set, if it's not given then currently
                      active I18N set is used

         HB_I18N_RESTORETABLE( <cTable> )
                  -> <pI18N> | NIL
            Restores I18N translation set from strin item.
            <cTable> - I18N translation set in string representation
            On success it returns new <pI18N> set otherwise NIL if <cTable>
            is not valid item created by HB_I18N_SAVETABLE() or it's corrupted.

         HB_I18N_HEADERSIZE()
                  -> <nHeaderSize>
            Returns size of header used by i18n serialized version

         HB_I18N_CHEK( <cTable> | <cHeader> [, @<cDescription> ] )
                  -> <lValid>
            <cTable> - i18n translation set serialized by HB_I18N_SAVETABLE
            <cHeader> - header of i18n translation set
                        ( LEFT( <cTable>, HB_I18N_HEADERSIZE() )
            <cDescription> - optional parameter passed by reference where
                             will be sored i18n translation set description
                             extracted from valid header
            Returns logical value indicating if given table or header is
            valid serialized by HB_I18N_SAVETABLE() data. It does not
            decode the table though it validates size and control sums.

      These functions are optional and some future alternative implementations
      may not support all of them and/or may provide some other functions.

    + added unofficial .prg function __I18N_HASHTABLE() which allows to
      access hash table used by i18n translation set or create new translation
      set with given hash table. It's helper functions for developers which
      will work on Harbour i18n tools and should not be used by Harbour users.

      Unlike original gettext Harbour allows to use language with many
      plural forms as base one. In such case programmer should activate
      at application startup default i18n translation set with base plural
      form valid for base application language, f.e. by:
         pI18N := hb_i18n_create()
         hb_i18n_pluralForm( pI18N, <cLangID> | <bForm>, .t. )
         hb_i18n_set( pI18N )
      .prg code example:

         #xtranslate _( <x,...> ) => hb_i18n_gettext_strict( <x> )
         #xtranslate _N( <x,...> ) => hb_i18n_ngettext_strict( <x> )

         proc main()
            local pI18N, i

            pI18N := hb_i18n_create()
            hb_i18n_pluralForm( pI18N, "PL", .t. )
            hb_i18n_set( pI18N )

            for i := 0 to 30
               ? i, _N( i, {"grosz", "grosze", "groszy"} )
               if i > 0 .and. i % 10 == 0
                  wait
               endif
            next
         return

      In .pot files created during compilation by Harbour with -j option
      for above code we have the following entries for message with plural
      forms:
            msgid "grosz"
            msgid_plural "grosze"
            msgid_plural2 "groszy"
            msgstr[0] ""
      The msgid_plural2 (and others if language has more plural forms)
      is Harbour extension which is not gettext compatible.


      The above implementation is base version but should be fully functional.
      Now we will need functions to safe/read i18n files and tools to mange
      .pot files: merge them, edit translations, create final binary i18n
      translation sets. Because we are using gettext compatible .pot files
      then for some of such jobs we can use original gettext tools but we
      need at least function which will create translation set from one or
      more .pot files.
      We should also agree some default localization(s) for files containing
      translated data, their name convention and environment variable(s)
      to set default language. It's not strictly necessary and each user
      can have his own implementation but it would help in adding new
      translations by final users to any Harbour application which will
      respect them. We can use LANG envvar to extract preferred language
      and use the same path as executed application looking for files
      <appname>-<lang>.hil files though it may create some problems for
      OSes which support only 8.3 file names so we can also define that
      HB_I18N envvar has higher priority and points to expected translation
      file.

  * harbour/include/hbextern.ch
    - removed old __i18n_*() functions
    + added current i18n functions
2008-12-11 18:47:46 +00:00
Przemyslaw Czerpak
c6fab64db4 2008-11-09 15:16 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbstack.h
    * do not define hb_stack_ptr_from_tls() in BCC builds when
      HB_STACK_PRELOAD macro is not defined to pacify BCC warning
2008-11-09 14:15:45 +00:00
Przemyslaw Czerpak
e9657ea9d8 2008-10-28 20:08 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbstack.h
  * harbour/source/vm/estack.c
    + added hb_stackReleaseTSD() function - this function can be called
      only in HVM cleanup state when all threads except the main one are
      released

  * harbour/source/rdd/dbf1.c
  * harbour/source/rdd/dbffpt/dbffpt1.c
  * harbour/source/rdd/dbfntx/dbfntx1.c
  * harbour/source/rdd/dbfcdx/dbfcdx1.c
    * make RDDINFO settings in BDF* based RDDs thread local

  * harbour/include/hbclass.ch
    * minor modification
2008-10-28 19:08:28 +00:00
Przemyslaw Czerpak
591fe064a4 2008-10-28 15:56 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbstack.h
    ! fixed fDebugRequest declaration
2008-10-28 14:56:29 +00:00
Przemyslaw Czerpak
520a0a0206 2008-10-22 05:03 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbstack.h
  * harbour/include/hbgtcore.h
  * harbour/include/hbthread.h
  * harbour/include/hbapigt.h
  * harbour/source/vm/estack.c
  * harbour/source/vm/hvm.c
  * harbour/source/vm/thread.c
  * harbour/source/rtl/hbgtcore.c
    + added support for optional allocating independent console window by
      each thread. By default new thread inherits console Window from
      parent thread. But each thread can allocate its own console window
      by calling hb_gtReload( <cGtName> ) function, f.e. by:
         hb_gtReload( hb_gtVersion() )
      If GT driver supports such functionality then new it will allocate
      new console windows.
      Each console window has reference counter which is increased when
      new thread starts and decreased when hb_gtReload() is executed or
      thread terminates. When counter reach zero give console window is
      destroyed.

  * harbour/source/rtl/gtwvt/gtwvt.c
    ! use SendNotifyMessage() instead of SendMessage() to not block
      threads which inherited GT from parent thread. Why non of MS-Win
      users reported this problem?
    + added reference counter to window class for multi GT support

  + harbour/tests/mt/mttest10.prg
    + added demonstration/test code for using independent console window
      in different threads. It needs GT driver which supports such
      functionality, f.e GTXWC in *nixes or GTWVT in MS-Windows

  * harbour/tests/mt/mttest09.prg
    ! fixed typo in comment
2008-10-22 03:03:58 +00:00
Przemyslaw Czerpak
e76017d28c 2008-10-20 01:18 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbstack.h
    ! added HB_EXPORT to hb_stack*() functions used in -gc3 code
2008-10-19 23:18:33 +00:00
Przemyslaw Czerpak
3ed8136c80 2008-10-15 17:50 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbstack.h
  * harbour/source/vm/estack.c
  * harbour/source/vm/hvm.c
  * harbour/source/debug/dbgentry.c
  * harbour/source/debug/debugger.prg
    * moved debugRequest flag and debugger internal structure
      pointer to HVM stack
    * allocate debugger internal structure dynamically in thread
      thread local area when PCODE with debug information is executed
    * changed STATIC s_oDebugger to THREAD STATIC
    * send HB_DBG_VMQUIT after each thread termination when
      debugger is activated
      Now debugger can be used in MT programs and each thread can be
      debugged separately (each has its own debuger). Please only
      remember that thread sharing console window can overwrite other
      threads debugger screen. There is also one limitation which I'll
      try to remove later: only main thread debugger keeps information
      about file wide STATIC names and line numbers with possible break
      point places. This data should be shared between debuggers.
2008-10-15 15:51:02 +00:00
Przemyslaw Czerpak
f6eb3cfb17 2008-10-07 18:32 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbstack.h
  * harbour/source/vm/estack.c
  * harbour/source/vm/hvm.c
    % moved static USHORT uiPolls to HVM stack to not reduce the HVM
      performance in MT mode. In multi CPU environment if many threads
      try to change the same memory variable in the same time the overall
      performance is strongly reduced on most of tested hardware - probably
      some random CPU delay used to resolve the conflict.
2008-10-07 16:33:02 +00:00
Przemyslaw Czerpak
c16b13e573 2008-10-02 21:12 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/rdd/sdf1.c
    ! fixed stupid typo (missing !) in last modification which broke
      SDF RDD read mode. Thanks to Marco for information and example.

  * harbour/include/hbstack.h
  * harbour/source/vm/estack.c
    * small cleanup in used macros
2008-10-02 19:12:30 +00:00
Przemyslaw Czerpak
ffd9b480a4 2008-10-02 14:33 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbstack.h
    % enable assembler inline function to access HVM thread stack pointer
      without native compiler TLS support even if HB_STACK_PRELOAD is not
      defined in MinGW builds. It gives some additional small speed
      improvement in MT mode

  * harbour/source/rtl/idle.c
    * unlock HVM inside hb_releaseCPU() function

  * harbour/contrib/hbwin/win_ole.c
    ! fixed casting and C++ compilation in some compilers

  * harbour/include/Makefile
  + harbour/contrib/examples/rdddbt/hbrdddbt.h
  - harbour/include/hbrdddbt.h
    ! moved hbrdddbt.h to correct location

  * harbour/include/Makefile
    ! added missinf hbthread.h

  * harbour/tests/rddtest/rddmktst.prg
  * harbour/tests/rddtest/adscl52.prg
  * harbour/tests/rddtest/adscl53.prg
  * harbour/tests/rddtest/ntxcl52.prg
  * harbour/tests/rddtest/ntxcl53.prg
  * harbour/tests/rddtest/cdxcl52.prg
  * harbour/tests/rddtest/rddtst.prg
  * harbour/tests/rddtest/cdxcl53.prg
    ! fixed description in header I wrongly copied without updating
      from other files

  + harbour/tests/hsxtest.prg
    + added test code for HiPer-SEEK indexes

  * harbour/source/rtl/filesys.c
    + added new functions: hb_fsExtName(), hb_fsReadAt(), hb_fsWriteAt(),
      hb_fsTruncAt() to use with shared file handles.
      Please test it in other *nixes. I used pread[64]()/pwrite[64]()
      POSIX functions but I do not know if they are available by default
      in other supported platforms like MacOSX, BSD, HPUX, SunOS.
      If not they I will have to implement some workaround.

  * harbour/common.mak
  * harbour/source/rtl/Makefile
  * harbour/include/hbapifs.h
  + harbour/source/rtl/filebuf.c
    + added set of new file functions (hb_file*()) which are designed to
      use with shared file handles and locks (buffers in the future):
      hb_fileExtOpen(), hb_fileCreateTemp(), hb_fileClose(), hb_fileLock(),
      hb_fileReadAt(), hb_fileWriteAt(), hb_fileTruncAt(), hb_fileSize(),
      hb_fileCommit(), hb_fileHandle()
      These functions operate on PHB_FILE structure instead of HB_FHANDLE.
      Now in POSIX systems they share file handle between aliased or
      simultaneously open by other thread work areas. It resolves the
      problem with releasing all process FCNTL locks by any close()
      operation even on duplicated or open() separately handle.
      Now DOS deny flags emulation works in single process even if
      BSD locks are disabled (non Linux *nixes).
      They also keep internal file lock list what allows to synchronize
      threads and aliases with file locks in POSIX systems. In the future
      it will be used also for internal locking to synchronize threads
      without OS level locks - pseudo exclusive mode in cloned WA.
      Finally these structures will be used also for file buffers
      which will be shared between aliased WA and threads.

  * harbour/include/hbrdddbf.h
  * harbour/include/hbrddcdx.h
  * harbour/include/hbrddntx.h
  * harbour/include/hbrdddel.h
  * harbour/include/hbrddsdf.h
  * harbour/source/rdd/dbf1.c
  * harbour/source/rdd/delim1.c
  * harbour/source/rdd/sdf1.c
  * harbour/source/rdd/dbffpt/dbffpt1.c
  * harbour/source/rdd/dbfntx/dbfntx1.c
  * harbour/source/rdd/dbfcdx/dbfcdx1.c
  * harbour/source/rdd/hsx/hsx.c
  * harbour/contrib/hbbmcdx/bmdbfcdx.c
  * harbour/contrib/hbbmcdx/hbbmcdx.h
    * use PHB_FILE and hb_file*() functions instead of HB_FHANDLE (hb_fs*())
      to access files.

  + harbour/tests/aliaslck.prg
    + added test code for file lock synchronization between aliased
      work areas
2008-10-02 12:34:36 +00:00
Przemyslaw Czerpak
893c372e0b 2008-09-26 19:34 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbstack.h
  * harbour/source/vm/estack.c
    + added assembler inline macros for TLS access in BCC and MinGW32
      They are enabled when Harbour is compiled with -DHB_NO_TLS.
      Please check the speed difference. If it will be noticeable
      then we keep them probably as default. Otherwise they will be
      removed.
2008-09-26 17:35:37 +00:00
Przemyslaw Czerpak
c8d341cefb 2008-09-23 15:38 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/codebloc.c
    * updated old and not longer valid comment

  * harbour/source/vm/memvars.c
    * minor code formatting

  * harbour/source/common/expropt2.c
    ! fixed bug in power math expression optimization caused
      by two lines left in the code by mistake. Many thanks to
      Maurilio for locating the problem.

  * harbour/include/hbstack.h
  * harbour/source/vm/estack.c
  * harbour/source/vm/hvm.c
    % added support for buffering hb_stack TLS access be preloading
      the stack pointer into C stack function local variables.
      Please make speed tests for MT mode with different C compilers
      and different platforms.
2008-09-23 13:39:35 +00:00
Przemyslaw Czerpak
d9e592e202 2008-09-22 16:14 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbstack.h
  * harbour/source/vm/estack.c
    + added support for using stack macros without native compiler TLS
      support in MT mode.
    * enabled stack macros by default for OS2 MT builds
      David, if possible please try speedtst.prg with current MT HVM
2008-09-22 14:15:18 +00:00
Przemyslaw Czerpak
b34b792443 2008-09-22 03:49 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbstack.h
  * harbour/source/vm/estack.c
  * harbour/source/vm/hvm.c
    + added support for nested hb_vmUnlock()/hb_vmLock() calls

  * harbour/source/rtl/hbinet.c
    * encapsulated all potentially slow inet functions inside
      hb_vmUnlock()/hb_vmLock() calls
2008-09-22 01:50:21 +00:00
Przemyslaw Czerpak
d99fdee163 2008-09-14 03:25 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/harbour-ce-spec
  * harbour/harbour-w32-spec
  * harbour/harbour.spec
    + added harbour MT libraries: libfmmt and libhbvmmt

  * harbour/include/hbstack.h
    ! respect HB_USE_TLS defined in hbthread.h

  * harbour/bin/hb-func.sh
    * always create harbourmt shared library in non DOS builds

  * harbour/bin/postinst.sh
    * always create libfmmt in non DOS builds

  * harbour/source/vm/Makefile
    * always create libhbvmmt in non DOS builds
2008-09-14 01:26:34 +00:00
Przemyslaw Czerpak
64f97582d9 2008-09-13 18:49 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbpp.h
  * harbour/include/hbvm.h
  * harbour/include/hbcomp.h
  * harbour/include/hbcompdf.h
  * harbour/include/hbtrace.h
  * harbour/include/hbapilng.h
  * harbour/include/hbinit.h
  * harbour/source/rtl/langapi.c
  * harbour/source/pp/ppcore.c
  * harbour/source/pp/hbpp.c
  * harbour/source/vm/itemapi.c
  * harbour/source/vm/hvm.c
  * harbour/source/common/hbver.c
  * harbour/source/common/hbtrace.c
  * harbour/source/common/expropt2.c
  * harbour/source/compiler/complex.c
  * harbour/source/compiler/hbident.c
  * harbour/source/compiler/hbfunchk.c
    * changed some declarations from 'char *' to 'const char *' and
      fixed casting for some more pedantic compilers

  * harbour/source/pp/ppcore.c
    ! fixed one typo which could cause memory leak and even GPF

  * harbour/common.mak
  * harbour/source/vm/Makefile
  * harbour/source/rtl/Makefile
  - harbour/source/rtl/set.c
  + harbour/source/vm/set.c
  * harbour/include/hbstack.h
  * harbour/source/vm/estack.c
    * moved from RTL to HVM
    * eliminated hb_set global structure
    * moved set structure to HVM stack
    + added internal function hb_setClone() which is used to create
      copy of SET structure for child threads
    * hidden HB_SET_STRUCT declaration - 3-rd part code must not access it
      directly. Dedicated hb_set*() functions should be used instead.
    + added new function:
         BOOL hb_setSetItem( HB_set_enum set_specifier, PHB_ITEM pItem )
      which allow to change some set by 3-rd party code.
      TODO: not all SETs can be changed yet - if someone have a while
            then please add code for missing ones.

  * harbour/include/set.ch
  * harbour/include/hbset.h
    + added _SET_CODEPAGE which works like _SET_LANGUAGE giving common
      interface

  * harbour/include/hbsetup.h
    + added HB_CODEPAGE_DEFAULT which works like HB_LANG_DEFAULT

  * harbour/source/vm/hvm.c
    ! fixed builds which uses non EN lang or code page modules
      by forcing linking the chosen ones

  * harbour/include/hbstack.h
  * harbour/source/vm/estack.c
  * harbour/include/hbapicdp.h
  * harbour/source/rtl/cdpapi.c
    - removed global code page variable: hb_cdp_page and moved
      code page settings to HVM stack
    + added new function hb_cdpID() which returns current code page
      character ID
    + added new functions hb_vmCDP() and hb_vmSetCDP() to get/set
      active for given thread code page structure

  * harbour/include/hbstack.h
  * harbour/source/vm/estack.c
  * harbour/include/hbapilng.h
  * harbour/source/rtl/langapi.c
    + moved lang setting to HVM stack
    + added new functions hb_vmLang() and hb_vmSetLang() to get/set
      active for given thread language module

  * harbour/include/hbvmpub.h
  * harbour/include/hbstack.h
  * harbour/include/hbapi.h
  * harbour/source/vm/estack.c
  * harbour/source/vm/dynsym.c
  * harbour/source/vm/itemapi.c
  * harbour/source/vm/memvars.c
    * changed memvar handles for HB_HANDLE to void * which is directly
      casted to PHB_ITEM - new memvar references
    * changed HB_DYNS declarations for MT mode. In MT mode HB_DYNS does
      not contain area and memvar handles which are moved to thread
      local HVM stack
    + added array for thread local memvar and area handles to HVM stack
    % eliminated global continues array with all memvars and detached locals
    % changed HB_IT_MEMVAR to use pointers to HB_ITEM directly - it resolve
      synchronization problems in MT mode and should also improve the speed
      and reduce memory usage. It should be well visible in applications which
      uses lot of detached locals.
    - removed hb_memvarsInit() and hb_memvarsFree() - they are not necessary
      now because we do not longer use array with all allocated memvars
      and detached local and private stack initialization is made
      automatically
    + added internal functions hb_dynsymGetMemvar()/hb_dynsymSetMemvar()
    + added hb_memvarGetValueBySym() for debugger
    * moved PRIVATE variable stack to HVM stack
    * eliminated all static variables in memvars module

  * harbour/include/hbstack.h
  * harbour/source/vm/estack.c
  * harbour/source/rtl/fserror.c
    * moved IO errors to HVM stack
    + added special IO error handling which works without HVM stack
      It allows to use hb_fs*() functions without allocated stack
      by 3-rd party threads.

  * harbour/source/rtl/filesys.c
    * moved hb_fsCurDir() to HVM stack with special handling to work
      with HVM stack like IO errors

  * harbour/source/rdd/workarea.c
    * allocated RDD node array in bigger peaces to reduce later RT
      reallocations in MT mode. If user want to add dynamically more
      then 64 RDDs then it should synchronize this operation himself.

  * harbour/source/rdd/wacore.c
    * moved WA list, current WA, default RDD and neteer() flag to HVM stack

  * harbour/include/hbdefs.h
    - removed HB_HANDLE declaration

  * harbour/include/hbapi.h
    - removed HB_VALUE structure - it's not longer used due to different
      memvar handling
    * updated hb_struMemvar to new memvar handling
    * replaced hb_vmIsLocalRef() and hb_memvarsIsMemvarRef() with
      hb_vmIsStackRef() which respect multiple stack and new memvar
      and static structures and location in GC mark pass.

  * harbour/include/hbstack.h
  * harbour/source/vm/estack.c
  * harbour/source/vm/hvm.c
    + added support for thread specific data located on HVM stack
      Now it's possible to allocate static variables which are
      local to thread. Such variables are allocated on HVM stack
      and automatically destroyed. To declare new TSD variable use:
         HB_TSD_NEW( <name>, <size>, <init>, <destruct> )
      <name> - name of variable which holds TSD handler
      <size> - size of TSD are which has to be allocated
      <init> - init function, executed when new TSD is allocated by thread
               (thread access given TSD 1-st time). This function receives
               void * pointer to allocated area.
      <destruct> - destructor function executed when HVM stack is destroyed
      f.e.:
         static HB_TSD_NEW( s_scrData, sizeof( HB_SCRDATA ),
                            NULL, hb_xSaveRestRelease );
      To initialize dynamically allocated TSD variable use:
         HB_TSD_INIT( <name>, <size>, <init>, <destruct> )
      Pointer to TSD can be accessed using hb_stackGetTSD( &<name> )
      where <name> is name of variable which holds TSD handler, f.e.:
         PHB_SCRDATA pScrData = ( PHB_SCRDATA ) hb_stackGetTSD( &s_scrData );
      See source/rtl/xsavescr.c as an example
      It's also possible to test if data has been already allocated for
      current thread by:
         hb_stackTestTSD( &<name> ) => pData
      it works like hb_stackGetTSD() but return NULL if current thread data
      has not been allocated yet.

  * harbour/include/hbstack.h
  * harbour/source/vm/estack.c
    * changed hb_stack location to thread local storage in MT mode
    + added functions and macros to access/assign new HVM stack members
    + changed garbage collection mark functions to work with multiple
      stacks, thread local static and memvar variables

  * harbour/source/rtl/xsavescr.c
    * use TSD data for screen buffer to make __XSAVESCREEN()/__XRESTSCREEN()
      thread independent

  * harbour/source/rtl/idle.c
    * use TSD data for idle task settings and codeblocks
    - removed hb_idleShutDown() - it's not longer necessary

  * harbour/source/rtl/setkey.c
    * use TSD data for allocated keys to make SETKEY() thread independent

  * harbour/source/rtl/math.c
    * moved math error handler, math error block, math error mode and
      math error structure to TSD

  * harbour/source/rtl/errorapi.c
    * moved error handler, error block, error launch counter and DOS error
      value to TSD

  * harbour/source/rtl/inkey.c
    * moved inkey "before" and "after" blocks to TSD

  * harbour/source/rdd/hsx/hsx.c
    * moved HSX handles array to TSD

  * harbour/include/hbapigt.h
  * harbour/source/rtl/console.c
    - removed hb_setkeyInit() and hb_setkeyExit() - they are not longer
      necessary, allocated resources will be freed by TSD destructor
      function

  * harbour/include/hbapi.h
  * harbour/source/rtl/console.c
    * removed hb_conXSaveRestRelease() - it's not longer necessary,
      allocated resources will be freed by TSD destructor function

  * harbour/source/vm/macro.c
    * moved s_macroFlags to TSD

  * harbour/source/rtl/accept.c
    * moved accept buffer to TSD

  * harbour/include/hbcomp.h
  * harbour/include/hbcompdf.h
  * harbour/include/hbxvm.h
  * harbour/source/compiler/hbmain.c
  * harbour/source/compiler/hbfix.c
  * harbour/source/compiler/hbpcode.c
  * harbour/source/compiler/hbdead.c
  * harbour/source/compiler/complex.c
  * harbour/source/compiler/genc.c
  * harbour/source/compiler/gencc.c
  * harbour/source/compiler/hbopt.c
  * harbour/source/compiler/hblbl.c
  * harbour/source/compiler/hbstripl.c
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyc
  * harbour/source/compiler/harbour.yyh
  * harbour/source/vm/hvm.c
    + added new PCODE HB_P_THREADSTATICS
    + added support for static variables which are local to thread:
         THREAD STATIC <varname [:= <exp>], ...>
      They work like normal static variables but each thread operates
      on its own copy.
    * added protection against possible double call to hb_xfree()
      It can happen due to wrong marking expressions as used by bison
      and executing destructors after our free code when syntax error
      appear.

  * harbour/source/rtl/perfuncs.prg
  * harbour/source/rtl/menuto.prg
  * harbour/source/rtl/getlist.prg
  * harbour/source/rtl/readvar.prg
  * harbour/source/rtl/text.prg
    * use THREAD STATIC variables to make above code MT safe

  * harbour/include/hbgtcore.h
  * harbour/source/rtl/hbgtcore.c
    + added hb_gt_BaseFree() which will release current GT pointer
      locked by hb_gt_Base() function. This function will be used
      to optional automatic GT access synchronization when threads
      share the same GT.

  * harbour/source/rtl/gtapi.c
  * harbour/source/rtl/inkeyapi.c
  * harbour/source/rtl/mouseapi.c
  * harbour/contrib/hbct/ctwin.c
    * free GT pointer by hb_gt_BaseFree()
      TODO: CTWIN is not MT safe yet - it will be updated together
            with core GT when we add multi window interface for
            thread with own console window.

  * harbour/bin/hb-func.sh
  * harbour/config/linux/gcc.cf
    + added rt lib to Linux builds

  * harbour/bin/postinst.sh
    * create MT safe version of FM stat library: fmmt

  * harbour/bin/pack_src.sh
    + added support for ZIP packing

  * harbour/include/hbapi.h
  * harbour/include/hbvm.h
  * harbour/source/vm/hvm.c
    + added hb_vmThreadInit()/hb_vmThreadQuit() functions - they initialize
      HVM for calling thread so it can execute .prg code and call HVM
      functions. They can be used by 3-rd party code threads.
    + added hb_vmUnlock()/hb_vmLock() functions which informs that
      thread will not operate on HVM structures for some time allowing
      to execute single thread only processes like GC.
    + added hb_vmThreadQuitRequest() which sends stop request to given
       thread
    + added hb_vmWaitForThreads() which stops main thread execution waiting
      for other threads
    + added hb_vmSuspendThreads() and hb_vmResumeThreads() used be GC
      to stop all HVM threads before mark/swap scan
    + added linked list of HVM stacks
    + added hb_vmTerminateThreads() used by main HVM thread in QUIT state
    * moved EXIT procedures execution from QUIT request to HVM QUIT state
      in MT mode. It may effects some non structural code which tries to
      access private variables in EXIT functions but it's much cleaner
      and understandable for user. Please remember that we guaranties
      that ALWAYS code in BEGIN SEQUENCE is _always_ executed even after
      HVM QUIT request just like destructs. Personally I think that we
      should move EXIT procedures execution also in ST mode.
    * changed startup and cleanup code for new internal structures
    * changes startup and cleanup code for MT mode
    % removed some redundant HB_ITEM type settings
    ! eliminated non MT safe code which was using reference counters
      without protection

  * harbour/common.mak
  * harbour/source/vm/Makefile
  + harbour/include/hbthread.h
  + harbour/source/vm/thread.c
    + added C level functions to manage threads and synchronization objects
      See hbthread.h for detail description. They are based on PTHREAD API
      and PTHREAD documentation can be used as reference. I intentionally
      keep this list small for easier multiplatform porting.
      Now they have been implemented for PTHREADS (POSIX threads supported by
      many different OSes), MS-Win32/64 and OS2. The OS2 version is not tested
      at all. I do not even know if it can be compiled so please make tests.
      I used Internet resources and some part of xHarbour code as documentation
      for OS2 MT API. It should be quite easy to add other platforms if necessary.
      Harbour core code needs non recursive mutexes, conditional variables and
      TLS for one pointer. If platforms does not support conditional variables
      (f.e. MS-Win or OS2) then they can be emulated using multistate semaphores.
    + added .prg functions to manage threads and synchronization objects:
         hb_threadStart( <@sStart()> | <bStart> [, <params,...> ] ) -> <pThID>
         hb_threadJoin( <pThID> [, @<xRetCode> ] ) -> <lOK>
         hb_threadDetach( <pThID> ) -> <lOK>
         hb_threadQuitRequest( <pThID> ) -> <lOK>
         hb_threadWaitForAll() -> NIL
         hb_mutexCreate() -> <pMtx>
         hb_mutexLock( <pMtx> [, <nTimeOut> ] ) -> <lLocked>
         hb_mutexUnlock( <pMtx> ) -> <lOK>
         hb_mutexNotify( <pMtx> [, <xVal>] ) -> NIL
         hb_mutexNotifyAll( <pMtx> [, <xVal>] ) -> NIL
         hb_mutexSubscribe( <pMtx>, [ <nTimeOut> ] [, @<xSubscribed> ] ) -> <lSubscribed>
         hb_mutexSubscribeNow( <pMtx>, [ <nTimeOut> ] [, @<xSubscribed> ] ) -> <lSubscribed>
      The function list should give similar to xHarbour API but they are not exactly
      the same and except of hb_mutex*() functions which should replicate xHarbour behavior.

  + harbour/source/vm/vmmt
  + harbour/source/vm/vmmt/Makefile
    + added hbvmmt library to GNU make builds.
      Non GNU make builds should be updated.

  * harbour/contrib/hbct/pos1.c
  * harbour/contrib/gtwvg/gtwvg.c
  * harbour/contrib/rddads/ads1.c
  * harbour/contrib/hbmisc/spd.c
  * harbour/contrib/hbbmcdx/bmdbfcdx.c
  * harbour/contrib/examples/rdddbt/dbfdbt1.c
  * harbour/source/vm/runner.c
  * harbour/source/vm/itemapi.c
  * harbour/source/vm/hvm.c
  * harbour/source/rtl/console.c
  * harbour/source/rtl/strcase.c
  * harbour/source/rtl/spfiles.c
  * harbour/source/rtl/defpath.c
  * harbour/source/rtl/hbgtcore.c
  * harbour/source/rtl/dateshb.c
  * harbour/source/rtl/mlcfunc.c
  * harbour/source/rtl/fstemp.c
  * harbour/source/rtl/is.c
  * harbour/source/rtl/setcolor.c
  * harbour/source/rtl/errorint.c
  * harbour/source/rtl/transfrm.c
  * harbour/source/rtl/dates.c
  * harbour/source/rtl/filesys.c
  * harbour/source/rtl/gtdos/gtdos.c
  * harbour/source/rtl/gtwin/gtwin.c
  * harbour/source/rtl/gtwvt/gtwvt.c
  * harbour/source/rtl/gtxwc/gtxwc.c
  * harbour/source/rtl/gttrm/gttrm.c
  * harbour/source/rtl/gtpca/gtpca.c
  * harbour/source/rtl/gtcgi/gtcgi.c
  * harbour/source/rtl/gtcrs/gtcrs.c
  * harbour/source/rtl/gtstd/gtstd.c
  * harbour/source/rtl/gtsln/gtsln.c
  * harbour/source/rtl/gtsln/gtsln.h
  * harbour/source/rdd/dbf1.c
  * harbour/source/rdd/sdf1.c
  * harbour/source/rdd/delim1.c
  * harbour/source/rdd/dbcmd.c
  * harbour/source/rdd/hbdbsort.c
  * harbour/source/rdd/workarea.c
  * harbour/source/rdd/dbffpt/dbffpt1.c
  * harbour/source/rdd/dbfcdx/dbfcdx1.c
  * harbour/source/rdd/dbfntx/dbfntx1.c
  * harbour/source/rdd/hsx/hsx.c
  * harbour/source/rdd/hbsix/sxfname.c
    * use API functions instead of direct accessing to hb_cdp_page or hb_set

  * harbour/source/rtl/fstemp.c
  * harbour/source/rtl/fssize.c
  * harbour/source/rtl/hbffind.c
  * harbour/source/rtl/filesys.c
    * encapsulate potentially slow IO operation inside
      hb_vmUnlock()/hb_vmLock() calls to allow other thread GC
      activation

  * harbour/contrib/hbnf/fttext.c
    ! fixed casting

  * harbour/contrib/gtwvg/gtwvg.h
    - removed #include <comctl32.h> - my MinGW and MinGW/CE instalations do
      not have them. If it exists in some newer ones then it has to be
      covered by #if version checking.

  * harbour/source/vm/dynsym.c
    - removed hb_dynsymLog() and hb_dynsymMemvarHandle()
    * modified code to be MT safe and improved speed of some operations
    * added MUEXT protection for global dynamic table access

  * harbour/include/hbapi.h
  * harbour/source/vm/garbage.c
    * changed to work with MT HVM
    * changed to work with new memvar structures and thread local static and
      memvar variables
    * added MUEXT protection for linked block lists
    + added parameter to hb_gcCollectAll() which will force GC activation
      in MT mode by temporary suspending all executed threads.
    + added logical parameter to HB_GCALL() functions which is passed to
      hb_gcCollectAll()

  * harbour/source/vm/fm.c
    * added MUEXT protection for FM statistic module
    * added MT protection for reference counters. For platforms
      which supports atomic incrmenetation/decrementation (f.e.
      Interlocked*() functions in MS-Win) such operations are
      used. For other it's MUTEX protection. It gives MT safe
      readonly access for HVM complex variables without user
      synchronization. The MUTEX protection can cause some speed
      overhead so it's good to define MT safe version of
      HB_ATOM_INC()/HB_ATOM_DEC() in hbthread.h if given platform
      has them. Now they are defined only for Windows. For other
      platforms We can define can define them in assembler for some
      most popular CPUs in the future.

  * harbour/source/vm/classes.c
    * changed class definition array. Now it keeps pointers to class
      structures.
    * In MT mode allocated at HVM startup big enough array for class
      definitions to avoid later RT reallocations. It effectively eliminates
      MUTEX synchronization for class structure access.
    * protect by MUTEX code for new class creation

  * harbour/source/debug/dbgentry.c
    * eliminated hbvmopt.h and direct accessing to HVM structures

  * harbour/source/rtl/gtclip.c
    * protect with MUTEX access to internal clipboard data

  * harbour/source/rdd/nulsys/nulsys.c
    + added hb_rddCloseAll()

  + harbour/tests/mt
  + harbour/tests/mt/mttest01.prg
  + harbour/tests/mt/mttest02.prg
  + harbour/tests/mt/mttest03.prg
  + harbour/tests/mt/mttest04.prg
  + harbour/tests/mt/mttest05.prg
  + harbour/tests/mt/mttest06.prg
  + harbour/tests/mt/mttest07.prg
    + added some demonstration/test small MT programs written
      using Harbour language. Some of them can be also compiled
      by xHarbour but xHarbour does not pass any of my tests in
      real multi-CPU machine so do not expect they will work
      correctly.

   Harbour threads needs OS threads support. Each Harbour thread is directly
   mapped to OS thread. It's not very efficient on some older system where
   cost of thread creation and/or task switching is very expensive but it
   should not be bigger problem for modern OS-es which can support threads
   in practice nearly in user space only.
   I haven't touched Harbour function calling convention which comes from
   Clipper. It means that we do not pass pointer to VM to each functions
   like CLIP or xBase++. To resolve the problem I have to use thread local
   storage (TLS) where such pointer is kept. If platform does not support
   TLS then it can be emulated by us. Anyhow the speed of accessing TLS
   data and extracting HB_STACK poitner is critical for performance.
   Some compilers depending on used hardware and OS give native support
   for TLS (f.e. __thread keyword in GCC/BCC or __declspec( thread ) in MSVC).
   This should give optimal performance. On other Harbour uses TLS functions
   like TlsGetValue() (MS-WIN) or pthread_getspecific() (PTHREAD) are used.
   OS2 gives quite interesting TLS functionality which seems to be quite fast
   though it will be interesting to know how it is iplemented internally for
   real multi CPU machines (if it depends on CPU exception then the
   performance will be bad). We need TLS only for one pointer to HB_STACK
   structure.
   I haven't added any tricks like HB_THREAD_STUB in xHarbour to reduce
   the cost of TLS access. If it will be necessary for some platform the we
   can add it.
   Except TLS Harbour threads needs OS support for non recursive mutexes or
   critical sections and conditional variables. If platforms does not support
   conditional variables (f.e. MS-Win or OS2) then they can be emulated using
   multistate semaphores. I intentionally didn't create code which may need
   recursive mutexes. The non recursive ones are often faster and some
   platforms may not support recursive mutexes so they will have to be
   emulated by us.
   Harbour uses reference counters for complex variables. It means that even
   readonly access to complex item causes internal write operations necessary
   to increment/decrement its reference counter. To make such readonly access
   MT safe we have to make incrementation and decrementation with result
   checking atomic. By default it's done by mutex inside vm/fm.c but some
   platforms have native support for atomic inc/dec operations, f.e. 
   Interlocked*() functions in MS-Win. If they are available then such
   functions should be used to not reduce the performance by mutex call
   very often used functions. For many CPUs it should be quite easy to
   implement such atomic inc/dec functionality in assembler. F.e. for
   GCC and x86@32 it may looks like:

      static __inline__ void hb_atomic_inc32( volatile int * p )
      {
         __asm__ __volatile__(
            "lock incl %0"
            :"=m" (*p) :"m" (*p)
         );
      }

      static __inline__ int hb_atomic_dec32( volatile int * p )
      {
         unsigned char c;
         __asm__ __volatile__(
            "lock decl %0"
            "sete %1"
            :"=m" (*p), "=qm" (c) :"m" (*p) : "memory"
         );
         return c == 0;
      }

   and then it's enough to define in hbthreads.h:
      #define HB_ATOM_INC( p )    hb_atomic_inc32( ( volatile int * ) p )
      #define HB_ATOM_DEC( p )    hb_atomic_dec32( ( volatile int * ) p )

   Probably I'll make it for some most popular CPUs in the future.
   In Harbour each thread which wants to call HVM functions have to allocate
   it's own HVM stack. It's done hb_vmThreadInit(). The HVM stack is freed
   by calling hb_vmThreadQuit(). This functions can be called also by 3-rd
   party threads if they want to call HVM functions or execute .prg code.
   Calling HVM functions without allocated stack will cause GPF.
   I moved most of static variables to HVM stack to make them thread
   local. But some of them like FS errors have their own alternative
   copy which is used when thread does not allocate HVM stack. It allows
   to use hb_fs*() functions without HVM stack but programmer have to
   know that error codes return by hb_fs*Error() functions can be
   overwritten by other threads which also didn't allocated HVM stack.
   To execute garbage collector scan and mark pass it's necessary to
   stop other HVM threads. Otherwise the scan may give false results.
   It's also possible to not stop threads but protect with mutex all
   operations on GC items but it will probably cause performance reduction
   and will force some other modifications. Maybe I'll implement it
   in the future.
   I didn't use any OS level thread KILL or CANCEL calls. All HVM threads
   have to be cleanly removed without any resource leaks.
   QUIT command terminate only calling thread. If main (startup) HVM
   thread call QUIT then it sends QUIT request to all existing threads.
   In QUIT state ALWAYS statements and destructors are executed.
   New thread is created by:
      hb_threadStart( <@sStart()> | <bStart> [, <params,...> ] ) -> <pThID>
   The returned value is a pointer to internal thread structure which
   can be used in JOIN or DETACH operations. Each thread should be Joined
   or DETACHED to avoid resource leaks. If programmer does not store
   <pThID> or all instances of <pThID> are destroyed then thread is
   automatically detached. I do not know clear method of thread detaching
   in OS2. If some OS2 users knows it then plase update vm/hbthread.c.
   When thread terminates then all locked by this thread mutexes are
   released.
   Each thread uses its own memvars (PRIVATEs and PUBLICs) and work areas.
   When new thread is created then it inherits from parent thread:
      - code page
      - language
      - SETs
      - default RDD
   error block is initialized to default value by calling ERRORSYS()
   and PUBLIC variable GetList := {} is created.
   The following objects are initialized to default value:
         - error block
         - math error handler and math error block
         - macro compiler features setting (hb_setMacro())
           or move them to SETs.
   We can think about inheriting them. It's also possible to add
   inheriting of all visible memvars but I do not know it's good
   idea.

   Compilation and linking:
   For MT mode HVM library should be compiled with HB_MT_VM macro.
   GNU make automatically creates hbvmmt library which should be
   linked with Harbour MT programs instead of hbvm.
   Non GNU make files should be updated.
   If given compiler support TLS then you can try to set HB_USE_TLS
   to force using native compiler TLS support. Now it's enabled by
   default only for BCC. For Linux and GCC builds it may depend also
   on used GLIBC version. In older system there is no TLS support
   at all or TLS works only for shared binaries so I haven't enabled
   it. If you will test some other compiler then please add default
   native TLS support for them in hbthread.h
   Users using hb* scripts can simply use -mt switch when they want
   to create MT program, f.e.:
      hbmk -n -w3 -es2 -mt mttest01.prg

   There are still some minor things which should be done but I'll
   do them later. Current state seems to be fully functional.
   The most important and still missing is our own file lock server
   for RDD synchronization in POSIX systems. Kernel internally
   recognize POSIX locks by PID and file i-node - not PID and file
   handle. It means that the same file open more then once by one
   process shares locks. Because POSIX locks can be overwritten
   then we do not have any synchronization between aliased workareas
   or threads using the same table in *nixes. We have to make
   synchronization ourselves. I'll create such lock server ASAP.

   Please test and enjoy using Harbour threads.
2008-09-13 16:53:45 +00:00
Viktor Szakats
b2594752b3 2008-08-19 14:58 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* make_deb.sh
     * Removed wrong comment recently added.
       (we will need to fix hbfimage compilation anyway)

   * harbour-ce-spec
   * harbour-w32-spec
   * harbour.spec
   * debian/control
   * include/vm.api
   * include/extend.api
   * include/button.ch
   * include/hbstack.h
   * include/item.api
   * include/rdd.api
   * include/gt.api
   * include/dbinfo.ch
   * include/error.api
   * include/filesys.api
   * include/hbapigt.h
   * include/clipdefs.h
   * include/assert.ch
   * include/fm.api
   * include/extend.h
   * source/compiler/genhrb.c
   * config/os2/install.cf
   * tests/db_brows.prg
   * tests/debugtst.prg
   * tests/ac_test.prg
   * tests/testhtml.prg
   * tests/tstcolor.prg
   * doc/hdr_tpl.txt
   * doc/man/harbour.1
   * doc/dirstruc.txt
   * doc/howtobld.txt
   * doc/en/diskspac.txt
   * doc/en/string.txt
   * doc/en/rddord.txt
   * doc/en/math.txt
   * doc/en/error.txt
   * doc/en/treport.txt
   * doc/en/memvar2.txt
   * doc/en/terminal.txt
   * doc/en/dir.txt
   * doc/en/rddmisc.txt
   * doc/en/var.txt
   * doc/en/nation.txt
   * doc/en/dbstrux.txt
   * doc/en/datetime.txt
   * doc/en/memo.txt
   * doc/en/tgetlist.txt
   * doc/en/tlabel.txt
   * doc/en/hb_compa.txt
   * doc/en/array.txt
   * doc/en/rdddb.txt
   * doc/en/dbsdf.txt
   * doc/en/tbrowse.txt
   * doc/en/hvm.txt
   * doc/en/input.txt
   * doc/en/dbdelim.txt
   * doc/en/browse.txt
   * doc/en/menu.txt
   * doc/en/file.txt
   * doc/en/binnum.txt
   * doc/en/tclass.txt
   * doc/en/set.txt
   * doc/en/misc.txt
   * doc/en/sayget.txt
   * doc/en/readme.txt
   * doc/es/diskspac.txt
   * doc/es/tlabel.txt
   * doc/es/array.txt
   * doc/es/dbsdf.txt
   * doc/es/tbrowse.txt
   * doc/es/math.txt
   * doc/es/hvm.txt
   * doc/es/treport.txt
   * doc/es/input.txt
   * doc/es/dbdelim.txt
   * doc/es/browse.txt
   * doc/es/memvar2.txt
   * doc/es/command.txt
   * doc/es/dir.txt
   * doc/es/file.txt
   * doc/es/eval.txt
   * doc/es/binnum.txt
   * doc/es/nation.txt
   * doc/es/var.txt
   * doc/es/tclass.txt
   * doc/es/dbstrux.txt
   * doc/es/misc.txt
   * doc/es/datetime.txt
   * doc/es/sayget.txt
   * doc/es/memo.txt
   * doc/es/readme.txt
   * doc/es/tgetlist.txt
   * doc/readme.txt
   * contrib/hbct/ctnet.c
   * contrib/hbct/video.c
   * contrib/hbct/dattime3.c
   * contrib/hbct/color.c
   * contrib/hbnf/acctyear.prg
   * contrib/hbnf/byteneg.prg
   * contrib/hbnf/isshare.prg
   * contrib/hbnf/sinkey.prg
   * contrib/hbnf/dhkey.h
   * contrib/hbnf/kspeed.c
   * contrib/hbnf/prtscr.c
   * contrib/hbnf/descendn.c
   * contrib/hbnf/peek.c
   * contrib/hbnf/scancode.prg
   * contrib/hbnf/vidmode.prg
   * contrib/hbnf/nwsem.prg
   * contrib/hbnf/acctadj.prg
   * contrib/hbnf/week.prg
   * contrib/hbnf/vidcur.prg
   * contrib/hbnf/iamidle.c
   * contrib/hbnf/prtesc.prg
   * contrib/hbnf/miltime.prg
   * contrib/hbnf/proper.c
   * contrib/hbnf/acctmnth.prg
   * contrib/hbnf/savearr.prg
   * contrib/hbnf/rand1.prg
   * contrib/hbnf/madd.prg
   * contrib/hbnf/dispmsg.prg
   * contrib/hbnf/settime.prg
   * contrib/hbnf/restsets.prg
   * contrib/hbnf/page.prg
   * contrib/hbnf/byt2bit.prg
   * contrib/hbnf/setkeys.c
   * contrib/hbnf/month.prg
   * contrib/hbnf/byt2hex.prg
   * contrib/hbnf/findith.prg
   * contrib/hbnf/at2.prg
   * contrib/hbnf/acctweek.prg
   * contrib/hbnf/dispc.c
   * contrib/hbnf/gcd.prg
   * contrib/hbnf/pegs.prg
   * contrib/hbnf/min2dhm.prg
   * contrib/hbnf/acctqtr.prg
   * contrib/hbnf/numlock.c
   * contrib/hbnf/dosver.prg
   * contrib/hbnf/nooccur.prg
   * contrib/hbnf/dayofyr.prg
   * contrib/hbnf/metaph.prg
   * contrib/hbnf/ontick.c
   * contrib/hbnf/menu1.prg
   * contrib/hbnf/byteand.prg
   * contrib/hbnf/sqzn.prg
   * contrib/hbnf/bytexor.prg
   * contrib/hbnf/ftidle.c
   * contrib/hbnf/workdays.prg
   * contrib/hbnf/byteor.prg
   * contrib/hbnf/asum.prg
   * contrib/hbnf/shift.c
   * contrib/hbnf/sleep.prg
   * contrib/hbnf/wda.prg
   * contrib/hbnf/aavg.prg
   * contrib/hbnf/woy.prg
   * contrib/hbnf/origin.c
   * contrib/hbnf/any2any.prg
   * contrib/hbnf/chdir.c
   * contrib/hbnf/adessort.prg
   * contrib/hbnf/setdate.prg
   * contrib/hbnf/netpv.prg
   * contrib/hbnf/amedian.prg
   * contrib/hbnf/blink.prg
   * contrib/hbnf/stod.c
   * contrib/hbnf/vertmenu.prg
   * contrib/hbnf/qtr.prg
   * contrib/hbnf/linked.prg
   * contrib/hbnf/n2color.c
   * contrib/hbnf/aredit.prg
   * contrib/hbnf/alt.c
   * contrib/hbnf/xbox.prg
   * contrib/hbnf/ftround.prg
   * contrib/hbnf/hex2dec.prg
   * contrib/hbnf/nwuid.prg
   * contrib/hbnf/dectobin.prg
   * contrib/hbnf/bitset.prg
   * contrib/hbnf/aemaxlen.prg
   * contrib/hbnf/nwlstat.prg
   * contrib/hbnf/invclr.prg
   * contrib/hbnf/ctrl.c
   * contrib/hbnf/lastday.prg
   * contrib/hbnf/tempfile.prg
   * contrib/hbnf/diskfunc.prg
   * contrib/hbnf/scregion.prg
   * contrib/hbnf/mouse2.prg
   * contrib/hbnf/d2e.prg
   * contrib/hbnf/ftisprn.c
   * contrib/hbnf/pickday.prg
   * contrib/hbnf/firstday.prg
   * contrib/hbnf/daytobow.prg
   * contrib/hbnf/anomatch.prg
   * contrib/hbnf/pvid.prg
   * contrib/hbnf/isbiton.prg
   * contrib/hbnf/color2n.c
   * contrib/hbnf/isbit.prg
   * contrib/hbnf/putkey.c
   * contrib/hbnf/cntryset.prg
   * contrib/hbnf/datecnfg.prg
   * contrib/hbnf/getenvrn.c
   * contrib/hbnf/easter.prg
   * contrib/hbnf/bytenot.prg
   * contrib/hbnf/ntow.prg
   * contrib/hbnf/poke.c
   * contrib/hbnf/aeminlen.prg
   * contrib/hbnf/floptst.prg
   * contrib/hbnf/pchr.prg
   * contrib/hbnf/savesets.prg
   * contrib/hbnf/mkdir.c
   * contrib/hbnf/year.prg
   * contrib/hbnf/caplock.c
   * contrib/hbnf/rmdir.c
   * contrib/hbnf/calendar.prg
   * contrib/hbnf/e2d.prg
   * contrib/hbnf/elapsed.prg
   * contrib/hbnf/sysmem.prg
   * contrib/hbnf/bitclr.prg
   * contrib/hbnf/eltime.prg
   * contrib/hbnf/aading.prg
   * contrib/hbnf/dfile.prg
   * contrib/hbnf/elapmil.prg
   * contrib/hbnf/setlastk.c
   * contrib/hbnf/pending.prg
   * contrib/hbnf/clrsel.prg
   * contrib/rddads/doc/en/adsfuncs.txt
   * contrib/rddads/doc/en/readme.txt
   * contrib/hbclip/hbclip.ch
   * contrib/hbclip/readme.txt
   * contrib/hbmisc/doc/en/ht_dbf.txt
   * utils/hbdoc/rtf.prg
   * utils/hbdoc/fclass1.prg
   * utils/hbdoc/genos2.prg
   * utils/hbdoc/genng.prg
   * utils/hbdoc/genasc.prg
   * utils/hbdoc/genchm.prg
   * utils/hbdoc/os2.prg
   * utils/hbdoc/ng.prg
   * utils/hbdoc/genhpc.prg
   * utils/hbdoc/html.prg
   * utils/hbdoc/ffile1.prg
   * utils/hbdoc/ft_funcs.prg
   * utils/hbdoc/hbdoc.prg
   * utils/hbdoc/troff.prg
   * utils/hbdoc/genhtm.prg
   * utils/hbdoc/genpdf1.prg
   * utils/hbdoc/gentrf.prg
   * utils/hbdoc/genrtf.prg
   * utils/hbmake/fclass1.prg
   * utils/hbmake/prb_stak.prg
   * utils/hbmake/ffile1.prg
   * utils/hbmake/ft_funcs.prg
   * utils/hbmake/pickfile.prg
   * utils/hbmake/hbmutils.prg
     * More cleanups, formatting (filename casing, CA-Cl*pper, etc).
2008-08-19 13:11:22 +00:00