Commit Graph

63 Commits

Author SHA1 Message Date
Viktor Szakats
2832c55881 2009-07-09 23:14 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* include/hbvmpub.h
  * include/extend.api
  * include/hbwince.h
  * include/hb_io.h
  * include/hbdefs.h
  * include/hbsetup.h
  * include/hbinit.h
  * include/clipdefs.h
  * include/hbmath.h
  * include/hbzlib.h
  * include/hbregex.h
  * include/hbexprb.c
  * source/pp/hbpp.c
  * source/lang/msgrukoi.c
  * source/lang/msgzhgb.c
  * source/lang/msgruwin.c
  * source/lang/msgelwin.c
  * source/lang/msgro.c
  * source/lang/msghriso.c
  * source/lang/msgcskam.c
  * source/lang/msggl.c
  * source/lang/msges.c
  * source/lang/msgde.c
  * source/lang/msgru866.c
  * source/lang/msgcs852.c
  * source/lang/msgplmaz.c
  * source/lang/msgpliso.c
  * source/lang/msgplwin.c
  * source/lang/msgid.c
  * source/lang/msgel.c
  * source/lang/msgdewin.c
  * source/lang/msghr437.c
  * source/lang/msghr852.c
  * source/lang/msgcsiso.c
  * source/lang/msgcswin.c
  * source/lang/msgeswin.c
  * source/vm/macro.c
  * source/vm/mainwin.c
  * source/vm/maindll.c
  * source/vm/itemapi.c
  * source/vm/hvm.c
  * source/vm/cmdarg.c
  * source/vm/mainstd.c
  * source/vm/maindllp.c
  * source/vm/fm.c
  * source/vm/extrap.c
  * source/vm/thread.c
  * source/vm/main.c
  * source/vm/break.c
  * source/vm/dynlibhb.c
  * source/vm/set.c
  * source/vm/classes.c
  * source/debug/dbgtwin.prg
  * source/debug/dbgtmenu.prg
  * source/debug/dbgmenu.prg
  * source/debug/dbgthsh.prg
  * source/debug/dbgwa.prg
  * source/common/hbgete.c
  * source/common/hbver.c
  * source/common/hbprintf.c
  * source/common/hbfsapi.c
  * source/common/hbverdsp.c
  * source/common/hbwince.c
  * source/common/hbfopen.c
  * source/common/hbdate.c
  * source/macro/macroa.c
  * source/macro/macrob.c
  * source/rtl/lennum.c
  * source/rtl/gtdos/gtdos.c
  * source/rtl/setposbs.c
  * source/rtl/gtwin/gtwin.c
  * source/rtl/typefile.prg
  * source/rtl/math.c
  * source/rtl/getsys53.prg
  * source/rtl/tobject.prg
  * source/rtl/gtcrs/gtcrs.c
  * source/rtl/gtcrs/gtcrs.h
  * source/rtl/philesx.c
  * source/rtl/filehb.c
  * source/rtl/hbtoken.c
  * source/rtl/fstemp.c
  * source/rtl/ampm.c
  * source/rtl/maxrow.c
  * source/rtl/hbstrfmt.c
  * source/rtl/transfrm.c
  * source/rtl/gttone.c
  * source/rtl/datec.c
  * source/rtl/fserr.c
  * source/rtl/pushbtn.prg
  * source/rtl/memvarbl.prg
  * source/rtl/hbregexc.c
  * source/rtl/profiler.prg
  * source/rtl/hbini.prg
  * source/rtl/dbedit.prg
  * source/rtl/filesys.c
  * source/rtl/lang.c
  * source/rtl/einstv52.prg
  * source/rtl/hbbit.c
  * source/rtl/isprint.c
  * source/rtl/altd.prg
  * source/rtl/diskspac.c
  * source/rtl/console.c
  * source/rtl/gtos2/gtos2.c
  * source/rtl/adir.prg
  * source/rtl/gui.prg
  * source/rtl/hbgtcore.c
  * source/rtl/dirdrive.c
  * source/rtl/wait.prg
  * source/rtl/mlcfunc.c
  * source/rtl/scrollbr.prg
  * source/rtl/gtapiu.c
  * source/rtl/tbrowsys.prg
  * source/rtl/oemansi.c
  * source/rtl/philes53.c
  * source/rtl/color53.prg
  * source/rtl/xsavescr.c
  * source/rtl/tgetlist.prg
  * source/rtl/gtsln/mousesln.c
  * source/rtl/gtsln/kbsln.c
  * source/rtl/gtsln/gtsln.h
  * source/rtl/disksphb.c
  * source/rtl/tlabel.prg
  * source/rtl/radiogrp.prg
  * source/rtl/scrrow.c
  * source/rtl/net.c
  * source/rtl/stuff.c
  * source/rtl/checkbox.prg
  * source/rtl/filebuf.c
  * source/rtl/mtran.c
  * source/rtl/gete.c
  * source/rtl/hbproces.c
  * source/rtl/gtwvt/gtwvt.c
  * source/rtl/fssize.c
  * source/rtl/memofile.c
  * source/rtl/hbffind.c
  * source/rtl/tmenuitm.prg
  * source/rtl/gtsys.c
  * source/rtl/devoutp.prg
  * source/codepage/uckoi8.c
  * source/codepage/uckoi8u.c
  * source/codepage/cphu852s.c
  * source/codepage/cpes850c.c
  * source/codepage/cphuisos.c
  * source/codepage/ucmaz.c
  * source/codepage/cptr857.c
  * source/codepage/ucmik.c
  * source/codepage/cphr437.c
  * source/codepage/cphuwins.c
  * source/rdd/dbjoin.prg
  * source/rdd/dbnubs.c
  * source/rdd/dbfuncs.prg
  * source/rdd/dbtotal.prg
  * source/rdd/dbstrux.prg
  * source/rdd/dbsort.prg
  * source/rdd/dbfcdx/dbfcdx1.c
  * source/rdd/hbsix/sxcompr.c
  * source/compiler/hbmain.c
  * source/compiler/expropta.c
  * source/compiler/exproptb.c
  * source/compiler/fixflex.c
  * source/compiler/compi18n.c
  * source/compiler/gencobj.c
  * source/compiler/hbopt.c
  * source/compiler/hbgenerr.c
  * utils/hbtest/rt_main.h
  * utils/hbtest/rt_main.ch
  * utils/hbtest/rt_trans.prg
  * utils/hbtest/rt_misc.prg
  * utils/hbtest/rt_vars.ch
  * contrib/gtalleg/gtalleg.c
  * contrib/gtalleg/ssf.h
  * contrib/hbmysql/mysqlold.c
  * contrib/hbmysql/mysql.c
  * contrib/hbct/charlist.c
  * contrib/hbct/ctnet.c
  * contrib/hbct/charonly.c
  * contrib/hbct/ctset.c
  * contrib/hbct/ctset.h
  * contrib/hbct/cterror.ch
  * contrib/hbct/ftoc.c
  * contrib/hbct/charevod.c
  * contrib/hbct/exponent.c
  * contrib/hbct/dattime3.c
  * contrib/hbct/ct.prg
  * contrib/hbct/cursor.c
  * contrib/hbct/color.c
  * contrib/hbct/charone.c
  * contrib/hbct/numconv.prg
  * contrib/hbct/cttime.prg
  * contrib/hbct/ctstr.h
  * contrib/hbct/atnum.c
  * contrib/hbct/disk.c
  * contrib/hbct/misc1.c
  * contrib/hbct/print.c
  * contrib/xhb/hblog.ch
  * contrib/xhb/bkgtsks.c
  * contrib/xhb/wintypes.ch
  * contrib/xhb/classex.ch
  * contrib/xhb/hbcomprs.c
  * contrib/xhb/ttable.ch
  * contrib/xhb/hbcompat.ch
  * contrib/xhb/arrayblk.prg
  * contrib/xhb/hbctypes.ch
  * contrib/xhb/xhbextrn.ch
  * contrib/xhb/filestat.c
  * contrib/xhb/hblogdef.ch
  * contrib/xhb/xhbcopyf.c
  * contrib/xhb/hbserv.c
  * contrib/xhb/xhbfunc.c
  * contrib/hbodbc/odbcold.c
  * contrib/hbtpathy/telepath.ch
  * contrib/hbmzip/hbmzip.c
  * contrib/hbblat/hbblat.ch
  * contrib/hbxbp/xbpfiledialog.prg
  * contrib/hbxbp/gra.ch
  * contrib/hbxbp/xbpwindow.prg
  * contrib/hbxbp/xbp.ch
  * contrib/hbxbp/xbphtmlviewer.prg
  * contrib/hbxbp/xbptoolbar.prg
  * contrib/hbxbp/appevent.ch
  * contrib/hbxbp/xbpgeneric.prg
  * contrib/xpp/philesx.c
  * contrib/hbnf/acctyear.prg
  * contrib/hbnf/byteneg.prg
  * contrib/hbnf/isshare.prg
  * contrib/hbnf/kspeed.c
  * contrib/hbnf/prtscr.c
  * contrib/hbnf/ftshadow.c
  * contrib/hbnf/descendn.c
  * contrib/hbnf/scancode.prg
  * contrib/hbnf/vidmode.prg
  * contrib/hbnf/acctadj.prg
  * contrib/hbnf/vidcur.prg
  * contrib/hbnf/iamidle.c
  * contrib/hbnf/acctmnth.prg
  * contrib/hbnf/madd.prg
  * contrib/hbnf/fttext.c
  * contrib/hbnf/mouse1.prg
  * contrib/hbnf/settime.prg
  * contrib/hbnf/page.prg
  * contrib/hbnf/setkeys.c
  * contrib/hbnf/month.prg
  * contrib/hbnf/acctweek.prg
  * contrib/hbnf/acctqtr.prg
  * contrib/hbnf/dosver.prg
  * contrib/hbnf/metaph.prg
  * contrib/hbnf/menu1.prg
  * contrib/hbnf/byteand.prg
  * contrib/hbnf/bytexor.prg
  * contrib/hbnf/byteor.prg
  * contrib/hbnf/asum.prg
  * contrib/hbnf/wda.prg
  * contrib/hbnf/aavg.prg
  * contrib/hbnf/mouse.c
  * contrib/hbnf/setdate.prg
  * contrib/hbnf/amedian.prg
  * contrib/hbnf/blink.prg
  * contrib/hbnf/getvid.c
  * contrib/hbnf/getver.c
  * contrib/hbnf/nwuid.prg
  * contrib/hbnf/aemaxlen.prg
  * contrib/hbnf/bitset.prg
  * contrib/hbnf/nwlstat.prg
  * contrib/hbnf/tempfile.prg
  * contrib/hbnf/diskfunc.prg
  * contrib/hbnf/d2e.prg
  * contrib/hbnf/mouse2.prg
  * contrib/hbnf/firstday.prg
  * contrib/hbnf/menutonf.prg
  * contrib/hbnf/pvid.prg
  * contrib/hbnf/isbit.prg
  * contrib/hbnf/datecnfg.prg
  * contrib/hbnf/putkey.c
  * contrib/hbnf/getenvrn.c
  * contrib/hbnf/bytenot.prg
  * contrib/hbnf/aeminlen.prg
  * contrib/hbnf/year.prg
  * contrib/hbnf/ftmenuto.ch
  * contrib/hbnf/rmdir.c
  * contrib/hbnf/sysmem.prg
  * contrib/hbnf/bitclr.prg
  * contrib/hbnf/setlastk.c
  * contrib/hbnf/clrsel.prg
  * contrib/hbcurl/hbcurl.ch
  * contrib/gtwvg/gtwvg.c
  * contrib/gtwvg/wvgax.prg
  * contrib/gtwvg/gtwvg.h
  * contrib/gtwvg/wvggui.c
  * contrib/gtwvg/wvggui.h
  * contrib/gtwvg/wvgwin.c
  * contrib/gtwvg/wvgutils.c
  * contrib/gtwvg/wvgcore.c
  * contrib/gtwvg/wvgtabpg.prg
  * contrib/gtwvg/wvgsink.c
  * contrib/gtwvg/wvgwing.c
  * contrib/hbclipsm/num.c
  * contrib/hbclipsm/stack.c
  * contrib/rddads/rddads.h
  * contrib/rddads/ads1.c
  * contrib/hbfimage/fi_winfu.c
  * contrib/hbfimage/fi_wrp.c
  * contrib/hbgd/gd.ch
  * contrib/hbgd/gdchart.prg
  * contrib/hbgd/gdimage.prg
  * contrib/hbgd/gdwrp.c
  * contrib/hbmisc/nconvert.prg
  * contrib/hbmisc/stringsx.c
  * contrib/hbmisc/spd.c
  * contrib/hbmisc/stringp.prg
  * contrib/hbwin/win_prn2.c
  * contrib/hbwin/wapi_commctrl.c
  * contrib/hbwin/wapi_winbase.c
  * contrib/hbwin/wapi_winuser.c
  * contrib/hbwin/hbwinole.h
  * contrib/hbwin/win_dll.c
  * contrib/hbwin/axfunc.prg
  * contrib/hbwin/win_prn1.c
  * contrib/hbvpdf/hbvpdf.ch
  * examples/hboleold/win_ole.c
    * Formatting:
       - Removing EOL whitespaces.
       - Removing extra empty lines at EOF.
       - Adding EOL at EOF if missing.
      (except in foreign code)
2009-07-09 21:22:22 +00:00
Przemyslaw Czerpak
9169e0e94f 2009-07-03 08:28 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
+ harbour/include/hbtask.h
  + harbour/source/vm/task.c
  * harbour/include/hbthread.h
  * harbour/include/hbatomic.h
  * harbour/source/vm/thread.c
  * harbour/source/vm/hvm.c
  * harbour/source/vm/fm.c
  * harbour/source/rtl/idle.c
  * harbour/source/rtl/filesys.c
    + implemented OS independent task switching system - it gives PTHREAD
      compatible basic API so it can be used in HVM as alternative MT support
      which does not use any OS threads. As long as Harbour does not call
      any blocking OS function then it's possible to create and execute
      simultaneously many threads though only one CPU is used and switched
      between HVM threads. It gives similar scalability to xbase++ threads
      and also similar behavior in item protection at .prg level.
      Now it's possible to use HVM threads in any OS.
      Of course it does not mean that Harbour adds in some magic way
      thread support to OS-es which does not support threads like DOS.
      It only means that HVM supports threads for .prg code just like
      in native MT environment as long as some C code does not block
      task switching or process execution will not be frozen by sth, i.e.
      executing other process (__run()) in single process OS like DOS.
      In some cases it can be interesting alternative even in OS which
      have native thread support.
      All tests/mttest*.prg programs and speedtst --thread=<n> --scale
      are executed correctly with new task switching just like with
      OS native MT support.
      Compilation with task switching in hbvmmt library can be forced
      by HB_TASK_THREAD macro which also disable native OS threads
      support.
      For task context switching two alternative methods are used:
         1) getcontext()/makecontext()/swapcontext() (SUSv2, POSIX.1-2001)
            which is preferable because does not need any additional
            hacks but not all OS-es supports these functions.
            It's enabled by default in Linux builds.
         2) setjmp()/longjmp() (POSIX, ISO 9899 (C99)) otherwise.
            These functions are supported by most of C compilers
            but there is no function to set new stack in saved context
            so it's necessary to introduce for each architecure/C compiler
            peace of code which makes it. Macro HB_TASK_STACK_INIT() in
            task.c makes it. I defined this macro for x86@32 in DJGPP
            Linux GCC and OpenWatcom builds. I tested OpenWatcom builds only
            in DOS and Linux but probably it works in all x86@32 builds.
            If someone is interesting in adding support for some other
            platforms which does not support ucontext.h and 1-st methods
            then please define above macro for them.

      Have a fun with new toy ;-)

  * harbour/source/vm/Makefile
    * enabled hbvmmt in DJGPP and OpenWatcom DOS builds. It works well.
      Viktor if possible please add support for -mt switch in hbmk2
      in all builds even if we do not compile hbvmmt by default so
      it can be used with DJGPP and OW and any other builds for which
      someone enable hbtask.c though OS does not support threads.

  * harbour/contrib/hbmzip/hbmzip.c
    ! fixed '[const] char|BYTE *' casting in DOS and OS2 builds
2009-07-03 06:29:26 +00:00
Przemyslaw Czerpak
68c738b9ba 2009-06-20 22:24 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapi.h
  * harbour/source/vm/extend.c
    * renamed existing hb_par*() and hb_stor*() functions which supports
      variable number of parameters (...) into hb_parv*() and hb_storv*()
    * added new hb_par*() and hb_stor*() functions which use strict number
      of parameters. New hb_par*() functions do not make hidden conversion
      between types, f.e. hb_parl() returns 1 only for logical parameters
      which contain .T.

  * harbour/include/extend.api
    * map Clipper _par*() functions to hb_parv*()
    * map Clipper _stor*() functions to hb_storv*()

  * harbour/source/vm/dynsym.c
  * harbour/source/vm/hvm.c
  * harbour/source/vm/maindllp.c
  * harbour/source/vm/thread.c
  * harbour/source/vm/classes.c
  * harbour/source/rtl/cdpapi.c
  * harbour/source/rtl/mlcfunc.c
  * harbour/contrib/hbnf/dispc.c
  * harbour/contrib/hbnf/mouse.c
  * harbour/contrib/hbnf/getenvrn.c
  * harbour/contrib/hbhpdf/harupdf.c
  * harbour/contrib/gtwvg/wvgcuig.c
  * harbour/contrib/gtwvg/wvgwin.c
  * harbour/contrib/gtwvg/wvgutils.c
  * harbour/contrib/gtwvg/wvgcore.c
  * harbour/contrib/gtwvg/wvgwing.c
  * harbour/contrib/rddads/adsfunc.c
  * harbour/contrib/rddads/ads1.c
  * harbour/contrib/rddads/adsmgmnt.c
  * harbour/contrib/hbmisc/hb_f.c
  * harbour/contrib/hbwin/wapi_commctrl.c
    * replaced hb_par*() and hb_stor*() calls used with additional parameters
      by hb_parv*() and hb_storv*()
    TODO: update examples/hbwhat/*.c files

  * harbour/examples/uhttpd2/socket.c
  * harbour/examples/httpsrv/socket.c
    * changed hb_parni() to hb_parnidef()

  * harbour/source/vm/itemapi.c
    * removed some conversion which are not necessary for CA-Cl*pper
      compatibility

  * harbour/source/macro/macrolex.c
    * replaced HB_LEX_IS*() macros by by HB_IS*() ones
2009-06-20 20:25:26 +00:00
Viktor Szakats
0a25e75b8f 2009-06-16 15:03 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* utils/hbmk2/hbmk2.prg
    + Added preliminary support for autosetup for several more
      compilers: win/watcom, win/pocc, win/pocc64, wce/poccarm,
      dos/djgpp, dos/watcom.
      Only these were tested: dos/djgpp, win/watcom, win/pocc.
      This means it's now possible to "bundle" DJGPP, watcom or
      pocc _compiler tools_ with Harbour and hbmk2 will be able
      to detect them, or user can choose between them using
      -arch/-comp switches, then hbmk2 will just be able to use
      them "as is", without the need to change anything on the
      environment. zero-conf usage in essence, just like we
      already had for mingw family.
    ; NOTE: Before the release I'll rethink placement of these 
            tools inside the Harbour directory tree. Currently 
            they are detected in the Harbour root dir, but with 
            multiple compilers this is not ideal.

  * source/vm/thread.c
    ! Fixed compile error after 2009-06-16 08:55 UTC+0200.
2009-06-16 13:05:23 +00:00
Viktor Szakats
d234bc24f5 2009-06-16 08:55 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* source/vm/thread.c
    * HB_MUTEXQUEUEINFO() returning logical var.
    ! HB_MUTEXQUEUEINFO() resetting ref params with 0 in case of error.
2009-06-16 06:55:21 +00:00
Viktor Szakats
4dbccf8ead 2009-06-16 08:50 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* include/hbextern.ch
  * source/vm/thread.c
  * examples/uhttpd2/umain.prg
    * Replaced HB_MUTEXWAITERSCOUNT() with 
      HB_MUTEXQUEUEINFO( hMutex, [ @nWaitersCount ], [ @nQueueLength ] )
    ; Please review.
2009-06-16 06:51:12 +00:00
Viktor Szakats
c73804dc7a 2009-06-15 20:44 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* include/hbextern.ch
  * source/vm/thread.c
    + Added HB_MUTEXWAITERSCOUNT() to core.
      (slightly rewritten using local functions)

  - examples/uhttpd2/umutex.c
    - No longer needed.
2009-06-15 18:45:17 +00:00
Viktor Szakats
e4ddd5f914 2009-06-13 23:51 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbxbp/hbxbp.hbc
    + Added gtgui as default GT on win/wce systems.

  * include/extend.api
  * include/hbsetup.ch
  * include/hbapi.h
    + Added new HB_LEGACY_LEVEL3 macro to wrap legacy
      constructs to be deprecated in the next major release.
      Currently legacy IS*() parameter type checking macros
      are marked as such, ones present in CA-Cl*pper retained
      in extend.api even when this macro off.

    ; NOTE: It's recommended for 3rd party developers to
            start using new HB_IS*() macros. They work
            the same as Clipper compatible IS*() macros,
            but got a HB_ prefix: ISNUM( 1 ) -> HB_ISNUM( 1 )
            (not to be confused with HB_IS_*() macros which
            accept a PHB_ITEM)
            Here's a little batch which helps this process:
            ---
            gsar -o -s:x20ISNUM(       -r:x20HB_ISNUM(       *.c *.cpp
            gsar -o -s:x20ISCHAR(      -r:x20HB_ISCHAR(      *.c *.cpp
            gsar -o -s:x20ISLOG(       -r:x20HB_ISLOG(       *.c *.cpp
            gsar -o -s:x20ISARRAY(     -r:x20HB_ISARRAY(     *.c *.cpp
            gsar -o -s:x20ISBYREF(     -r:x20HB_ISBYREF(     *.c *.cpp
            gsar -o -s:x20ISDATE(      -r:x20HB_ISDATE(      *.c *.cpp
            gsar -o -s:x20ISDATETIME(  -r:x20HB_ISDATETIME(  *.c *.cpp
            gsar -o -s:x20ISNIL(       -r:x20HB_ISNIL(       *.c *.cpp
            gsar -o -s:x20ISTIMESTAMP( -r:x20HB_ISTIMESTAMP( *.c *.cpp
            gsar -o -s:x20ISBLOCK(     -r:x20HB_ISBLOCK(     *.c *.cpp
            gsar -o -s:x20ISPOINTER(   -r:x20HB_ISPOINTER(   *.c *.cpp
            gsar -o -s:x20ISSYMBOL(    -r:x20HB_ISSYMBOL(    *.c *.cpp
            gsar -o -s:x20ISOBJECT(    -r:x20HB_ISOBJECT(    *.c *.cpp
            gsar -o -s:x20ISHASH(      -r:x20HB_ISHASH(      *.c *.cpp
            gsar -o -s!ISNUM(          -r!HB_ISNUM(          *.c *.cpp
            gsar -o -s!ISCHAR(         -r!HB_ISCHAR(         *.c *.cpp
            gsar -o -s!ISLOG(          -r!HB_ISLOG(          *.c *.cpp
            gsar -o -s!ISARRAY(        -r!HB_ISARRAY(        *.c *.cpp
            gsar -o -s!ISBYREF(        -r!HB_ISBYREF(        *.c *.cpp
            gsar -o -s!ISDATE(         -r!HB_ISDATE(         *.c *.cpp
            gsar -o -s!ISDATETIME(     -r!HB_ISDATETIME(     *.c *.cpp
            gsar -o -s!ISNIL(          -r!HB_ISNIL(          *.c *.cpp
            gsar -o -s!ISTIMESTAMP(    -r!HB_ISTIMESTAMP(    *.c *.cpp
            gsar -o -s!ISBLOCK(        -r!HB_ISBLOCK(        *.c *.cpp
            gsar -o -s!ISPOINTER(      -r!HB_ISPOINTER(      *.c *.cpp
            gsar -o -s!ISSYMBOL(       -r!HB_ISSYMBOL(       *.c *.cpp
            gsar -o -s!ISOBJECT(       -r!HB_ISOBJECT(       *.c *.cpp
            gsar -o -s!ISHASH(         -r!HB_ISHASH(         *.c *.cpp
            ---

  * source/rtl/hbinet.c
    * Formatting.
    % Minor optimizations.

  * source/debug/dbgentry.c
  * source/rdd/dbcmd.c
  * source/rdd/dbcmd53.c
  * source/rdd/dbcmdx.c
  * source/rdd/dbdetach.c
  * source/rdd/dbsql.c
  * source/rdd/hbsix/sxfname.c
  * source/rdd/hbsix/sxord.c
  * source/rdd/hbsix/sxtable.c
  * source/rdd/usrrdd/usrrdd.c
  * source/rtl/at.c
  * source/rtl/box.c
  * source/rtl/cdpapi.c
  * source/rtl/chrasc.c
  * source/rtl/colorind.c
  * source/rtl/console.c
  * source/rtl/copyfile.c
  * source/rtl/dateshb.c
  * source/rtl/dirdrive.c
  * source/rtl/diskspac.c
  * source/rtl/disksphb.c
  * source/rtl/errapi.c
  * source/rtl/filesys.c
  * source/rtl/fscopy.c
  * source/rtl/fssize.c
  * source/rtl/fstemp.c
  * source/rtl/gete.c
  * source/rtl/gtfunc.c
  * source/rtl/gx.c
  * source/rtl/hbbit.c
  * source/rtl/hbgtcore.c
  * source/rtl/hbhex.c
  * source/rtl/hbi18n1.c
  * source/rtl/hbinet.c
  * source/rtl/hbprocfn.c
  * source/rtl/hbrandom.c
  * source/rtl/hbregex.c
  * source/rtl/hbstrsh.c
  * source/rtl/hbtoken.c
  * source/rtl/hbzlib.c
  * source/rtl/hbzlibgz.c
  * source/rtl/inkey.c
  * source/rtl/itemseri.c
  * source/rtl/left.c
  * source/rtl/math.c
  * source/rtl/maxrow.c
  * source/rtl/mlcfunc.c
  * source/rtl/mouse53.c
  * source/rtl/mousex.c
  * source/rtl/mtran.c
  * source/rtl/natmsg.c
  * source/rtl/padc.c
  * source/rtl/padl.c
  * source/rtl/padr.c
  * source/rtl/philes.c
  * source/rtl/philes53.c
  * source/rtl/rat.c
  * source/rtl/replic.c
  * source/rtl/right.c
  * source/rtl/round.c
  * source/rtl/run.c
  * source/rtl/saverest.c
  * source/rtl/scroll.c
  * source/rtl/setcolor.c
  * source/rtl/setcurs.c
  * source/rtl/setpos.c
  * source/rtl/shadow.c
  * source/rtl/strc.c
  * source/rtl/strmatch.c
  * source/rtl/strpeek.c
  * source/rtl/strtoexp.c
  * source/rtl/strtran.c
  * source/rtl/stuff.c
  * source/rtl/substr.c
  * source/rtl/tone.c
  * source/rtl/trace.c
  * source/rtl/transfrm.c
  * source/rtl/valtype.c
  * source/rtl/word.c
  * source/vm/arrayshb.c
  * source/vm/asort.c
  * source/vm/classes.c
  * source/vm/cmdarg.c
  * source/vm/eval.c
  * source/vm/hashfunc.c
  * source/vm/hvm.c
  * source/vm/memvars.c
  * source/vm/proc.c
  * source/vm/thread.c
    * IS*() -> HB_IS*() macro rename.
      (pass 1 - sf.net SVN works badly today, so I've split 
      the commit to raise the chances of a successfully 
      finished one)
2009-06-13 22:44:34 +00:00
Przemyslaw Czerpak
68225e9ad1 2009-06-09 10:38 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/eval.c
    * update number of parameters in HB_EXECMSG() to keep the HVM stack
      clean for any external code which can try to make some HVM stack
      tracing/scanning

  * harbour/source/vm/evalhb.c
    ! use hb_vmSend() instead of hb_vmDo()

  * harbour/source/pp/pplib.c
  * harbour/source/pp/pplib3.c
  * harbour/source/vm/runner.c
  * harbour/source/vm/hvm.c
  * harbour/source/vm/thread.c
  * harbour/source/vm/eval.c
  * harbour/source/vm/dynlibhb.c
  * harbour/source/vm/classes.c
  * harbour/source/rtl/do.c
  * harbour/source/rtl/xhelp.c
  * harbour/source/rdd/workarea.c
  * harbour/source/rdd/dbf1.c
    % use hb_vmProc() instead of hb_vmDo() in all places where context is
      well known as function or procedure call
2009-06-09 08:28:40 +00:00
Przemyslaw Czerpak
6b88ee5fac 2009-06-06 14:31 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbvm.h
  * harbour/source/vm/hvm.c
    + added hb_vmProc() function - it's hb_vmDo() but without hack to send
      messages.
      TODO: remove from hb_vmDo() support for messages so it can replace
            new hb_vmProc() function or if we really need such mixed common
            execution function then replace in HVM calls to hb_vmDo() with
            hb_vmProc()

  * harbour/source/vm/classes.c
    * replaced hb_vmFunction() call by hb_vmDo()

  * harbour/source/vm/arrays.c
  * harbour/source/vm/thread.c
    ! cleaned hb_vmDo()/hb_vmSend() usage

  * harbour/source/vm/eval.c
    ! replaced hb_vmFunction() calls by hb_vmSend()
    + added .prg function hb_execMsg( <sFuncSym>, <object>, [<params,...>] )
      which executes <sFuncSym> with <object> set as QSELF() value.
      Mindaugas, you can use it in your HashObject to execute functions
      like pseudo messages.
2009-06-06 12:21:43 +00:00
Przemyslaw Czerpak
3590aa01e1 2009-06-05 10:10 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/thread.c
    * minor cleanup
  * harbour/source/hbzlib/crc32.c
    * casting
2009-06-05 08:01:30 +00:00
Przemyslaw Czerpak
8e70525b66 2009-06-05 06:10 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbclass.ch
    + extended support for xbase++ compatible method declaration:
         [SYNC] METHOD <methodName1>[([<params>])] ;
                       [ , <methodNameN>[([<params>])] ]

  * harbour/include/hbthread.h
  * harbour/source/vm/thread.c
  * harbour/source/vm/classes.c
    + added alternative support for SYNC method which does not use
      sync mutexes. The old method is still present. I'll remove it
      when xbase++ users confirm that the new one exactly emulates
      xbase++ behavior.

  * harbour/source/vm/classes.c
  * harbour/source/rtl/tthreadx.prg
    * switch to alternative SYNC method implementation which seems to be
      xbase++ compatible - please test
    ! fixed missing thread interrupt in recent modification for ::setInterval
2009-06-05 04:01:40 +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
Viktor Szakats
52410317a6 2009-03-17 12:22 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
+ tests/server.prg
  * tests/Makefile
    + Added inet example from xhb.

  * source/vm/thread.c
    ! Fixed nested comment.

  * contrib/xhb/hbcompat.ch
  * contrib/xhb/xhb.ch
    ! Moved xhb.lib dependent translation to xhb.ch.

  * contrib/examples/hbdoc/examples/core_es/Makefile
  * contrib/examples/hbdoc/examples/core_en/genhtm.bat
  - contrib/examples/hbdoc/examples/core_en/genhtm.sh
    * Cleanup.
2009-03-17 11:23:27 +00:00
Viktor Szakats
708076ce5a 2009-03-17 09:26 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* utils/hbdoc/genos2.prg
  * utils/hbdoc/genng.prg
  * utils/hbdoc/genasc.prg
  * utils/hbdoc/genchm.prg
  * utils/hbdoc/genhpc.prg
  * utils/hbdoc/ft_funcs.prg
  * utils/hbdoc/hbdoc.prg
  * utils/hbdoc/genhtm.prg
  * utils/hbdoc/genpdf1.prg
  * utils/hbdoc/gentrf.prg
  * utils/hbdoc/genrtf.prg
    + Enabled line number for all files to aid finding crashes.
    ! Few crashes fixed. Still far from usable state.

  * source/vm/thread.c
    + Added short Harbour level API description. (from Przemek)

  * contrib/xhb/Makefile
  * contrib/xhb/hbcompat.ch
  + contrib/xhb/xhbmt.prg
    + Added translation for all xhb MT functions.
      (Thanks a lot Przemek)
2009-03-17 08:28:01 +00:00
Przemyslaw Czerpak
37b8779b1e 2009-03-09 14:08 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbpp.h
    ! changed the NOT operator precedence - it should be bigger then
      logical .and./.or. operators in #if expressions

  * harbour/source/vm/thread.c
    ! fixed typo HB_OS_WIM -> HB_OS_WIN - thanks to Francesco.
2009-03-09 13:02:51 +00:00
Przemyslaw Czerpak
016078ef85 2009-03-09 00:19 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbthread.h
  * harbour/source/vm/thread.c
    * emulate POSIX thread conditional variables in Windows builds.
      It should fix some possible bad behavior in MS-Windows Harbour
      MT programs.

  * harbour/source/rtl/hbinet.c
    ! fixed typo in HB_INETDATAREADY() - the second parameter (timeout)
      was ignored.

  * harbour/contrib/examples/uhttpd/uhttpdc.c
    * fixed typo in conditional iMsec usage.

  * harbour/contrib/examples/uhttpd/uhttpd.prg
    * set default timeout for socket operations to 3 sec.
    * use timeout parameter in HB_INETDATAREADY() and
      increased default timeout for accept to 250 millisecs.
      Please correct this modification if you prefer different values.
2009-03-08 23:15:18 +00:00
Przemyslaw Czerpak
4f7bb3e481 2009-02-25 03:37 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
+ harbour/config/linux/icc.cf
  * harbour/config/linux/gcc.cf
  * harbour/bin/hb-func.sh
  * harbour/bin/postinst.sh
  * harbour/source/common/hbver.c
    + added support for Intel(R) C/C++ compiler

  * harbour/bin/postinst.sh
    % use hb-mkdyn symlink instead of regenerating it as hb-mkslib
      It will work also in DOS/Windows (MSys/DJGPP emulates ln -s ...)

  * harbour/source/vm/thread.c
    * removed all references to HB_THREAD_EQUAL()/HB_THREAD_SELF() in
      non MT builds

  * harbour/source/rtl/console.c
    ! fixed default color setting in hb_dispOutAtBox()

  * harbour/contrib/gtwvg/wvggui.h
  * harbour/contrib/gtwvg/wvgwin.c
  * harbour/contrib/gtwvg/wincallb.c
  * harbour/contrib/gtwvg/wvgsink.c
    ! fixes for C++ compilation:
      - this is reserved word in C++ - do not use it as variable name
      - class is reserved word in C++ - do not use it as variable name
      - use macros to hide differences between C and C++ WinAPI
      - casting
2009-02-25 02:32:40 +00:00
Przemyslaw Czerpak
ca1d6300c6 2009-02-19 20:13 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/thread.c
    * pacified warning
2009-02-19 19:08:14 +00:00
Przemyslaw Czerpak
d98d210e0f 2009-02-19 15:37 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/thread.c
    ! fixed yest another stupid typo in new OS2 conditional variable
      code
2009-02-19 14:31:59 +00:00
Przemyslaw Czerpak
abbb2d5240 2009-02-19 14:18 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/thread.c
    ! fixed very stupid and also vary bad typo in my last OS2 modification.
2009-02-19 13:13:36 +00:00
Przemyslaw Czerpak
faf7a49cff 2009-02-19 12:49 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/thread.c
    ! fixed the typo in order of sending signals in _hb_thread_cond_signal()
      _hb_thread_cond_broadcast() for OS2. By mistake it was LIFO instead of
      FIFO.
2009-02-19 11:44:36 +00:00
Przemyslaw Czerpak
844cf0e16b 2009-02-18 20:00 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbthread.h
  * harbour/source/vm/thread.c
    ! added support for conditional variables working like in PTHREADS
      in OS2 builds - it fixes the problem with possible dead lock or
      starvation effect which can also cause dead lock in some cases.
      OS2 users please test current code.
2009-02-18 18:55:32 +00:00
Przemyslaw Czerpak
21881669c3 2009-02-16 15:03 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/thread.c
    ! fixed typo in PTHREAD (*nixes) version of hb_threadMutexTimedLock()
      (.prg HB_MUTEXLOCK() with timeout parameter)
    ! unlock HVM in *nix version of hb_threadWait()
    ; added TODO note
2009-02-16 13:59:06 +00:00
Maurilio Longo
a05c032678 2009-02-13 11:15 UTC+0100 Maurilio Longo (maurilio.longo@libero.it)
* harbour/include/hbthread.h
  * harbour/source/vm/thread.c
    ! fixed a bug on OS/2 MT implementation adding a new function,
      _hb_cond_timed_wait() because when a semaphore gets posted it has
      to be reset, otherwise it does not stop new threads entering it in a wait.
2009-02-13 10:18:28 +00:00
Viktor Szakats
1d13959a7b 2009-02-04 01:09 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* include/extend.api
  * include/hbgtcore.h
  * include/hbwince.h
  * include/hbthread.h
  * include/hbdefs.h
  * include/hbsetup.h
  * include/hbapi.h
  * include/clipdefs.h
  * include/hbatomic.h
  * contrib/hbmysql/mysql.c
  * contrib/hbct/ctnet.c
  * contrib/hbct/files.c
  * contrib/hbct/dattime3.c
  * contrib/hbct/disk.c
  * contrib/hbodbc/odbc.c
  * contrib/xhb/hboutdbg.c
  * contrib/xhb/hbsyslog.c
  * contrib/xhb/filestat.c
  * contrib/hbmsql/msql.c
  * contrib/hbole/ole2.c
  * contrib/hbmzip/hbmzip.c
  * contrib/hbapollo/apollo.c
  * contrib/hbfbird/firebird.c
  * contrib/hbnf/descendn.c
  * contrib/hbnf/getenvrn.c
  * contrib/rddsql/sqlmix.c
  * contrib/gtwvg/gtwvg.c
  * contrib/gtwvg/wvggui.c
  * contrib/gtwvg/wvgwin.c
  * contrib/gtwvg/wvgutils.c
  * contrib/gtwvg/wvgcore.c
  * contrib/rddads/adsx.c
  * contrib/rddads/rddads.h
  * contrib/rddads/adsmgmnt.c
  * contrib/rddads/adsfunc.c
  * contrib/rddads/ads1.c
  * contrib/hbfimage/fi_winfu.c
  * contrib/hbfimage/fi_wrp.c
  * contrib/hbgd/gd.ch
  * contrib/hbgd/gdwrp.c
  * contrib/hbgf/hbgfwin/winapi.c
  * contrib/hbtip/utils.c
  * contrib/hbtip/ChangeLog
  * contrib/hbwin/win_prn2.c
  * contrib/hbwin/win_osc.c
  * contrib/hbwin/win_misc.c
  * contrib/hbwin/win_prt.c
  * contrib/hbwin/win_dll.c
  * contrib/hbwin/win_ole.c
  * contrib/hbwin/win_prn1.c
  * contrib/hbwin/win_regc.c
  * contrib/hbssl/sslsess.c
  * contrib/hbssl/sslrand.c
  * contrib/hbwhat/whtdate.c
  * contrib/hbwhat/whtini.c
  * contrib/hbwhat/whtcret.c
  * contrib/hbwhat/whthead.c
  * contrib/hbwhat/whtilst.c
  * contrib/hbwhat/whtreg.c
  * contrib/hbwhat/whtclpb.c
  * contrib/hbwhat/whtmous.c
  * contrib/hbwhat/whtrgn.c
  * contrib/hbwhat/whtmeta.c
  * contrib/hbwhat/whttbar.c
  * contrib/hbwhat/whtrect.c
  * contrib/hbwhat/whtbrsh.c
  * contrib/hbwhat/whtgdi.c
  * contrib/hbwhat/whtdlg.c
  * contrib/hbwhat/whtview.c
  * contrib/hbwhat/whtsys.c
  * contrib/hbwhat/whtmain.c
  * contrib/hbwhat/whtwnd.c
  * contrib/hbwhat/whtmmcap.c
  * contrib/hbwhat/whtfont.c
  * contrib/hbwhat/whtdir.c
  * contrib/hbwhat/whtbmp.c
  * contrib/hbwhat/whtkbrd.c
  * contrib/hbwhat/whtpen.c
  * contrib/hbwhat/whttext.c
  * contrib/hbwhat/whtdc.c
  * contrib/hbwhat/whtdraw.c
  * contrib/examples/uhttpd/socket.c
  * contrib/examples/uhttpd/uhttpdc.c
  * source/vm/mainwin.c
  * source/vm/maindll.c
  * source/vm/maindllh.c
  * source/vm/hvm.c
  * source/vm/cmdarg.c
  * source/vm/maindllp.c
  * source/vm/fm.c
  * source/vm/extrap.c
  * source/vm/thread.c
  * source/vm/dynlibhb.c
  * source/vm/set.c
  * source/common/hbgete.c
  * source/common/hbver.c
  * source/common/hbfsapi.c
  * source/common/hbwince.c
  * source/common/hbdate.c
  * source/rtl/diskspac.c
  * source/rtl/console.c
  * source/rtl/gtwin/gtwin.c
  * source/rtl/fserror.c
  * source/rtl/hbgtcore.c
  * source/rtl/gtclip.c
  * source/rtl/fstemp.c
  * source/rtl/idle.c
  * source/rtl/oemansi.c
  * source/rtl/disksphb.c
  * source/rtl/net.c
  * source/rtl/gtgui/gtgui.c
  * source/rtl/seconds.c
  * source/rtl/gttone.c
  * source/rtl/hbproces.c
  * source/rtl/gtkeycod.c
  * source/rtl/version.c
  * source/rtl/gtwvt/gtwvt.c
  * source/rtl/hbrandom.c
  * source/rtl/hbinet.c
  * source/rtl/hbffind.c
  * source/rtl/gtsys.c
  * source/rtl/filesys.c
  * source/rtl/gtkbstat.c
  * source/rtl/isprint.c
  * source/compiler/cmdcheck.c
  * utils/hbmake/hbmlang.c
    * #defines renamed to be bitwidth-independent.
      - HB_OS_WIN_32_USED -> HB_OS_WIN_USED
      - HB_OS_WIN_32      -> HB_OS_WIN
    ; Please modify your code accordingly.

  * include/hbdefs.h
  * include/hbsetup.h
    + Added compatibility to still understand HB_OS_WIN_32_USED,
      and to #define HB_OS_WIN_32 in addition to HB_OS_WIN.
      This means that old code will still work, but these
      compatibility features will be removed in the future,
      so it's recommended to change the code as above.
2009-02-04 00:18:56 +00:00
Przemyslaw Czerpak
834efe7a11 2009-02-03 18:51 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/thread.c
    * casting to pacify warning. The code is correct.
2009-02-03 17:46:58 +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
de26bf0591 2008-11-04 02:08 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/thread.c
    * removed casting to void* thread startup function passed
      as _beginthread() parameter in OS2 builds. It should be checked if
      it does not breaks GCC builds.

  * harbour/source/rtl/seconds.c
    * use getpid() instead of _getpid() in non GCC OS2 builds
2008-11-04 01:07:55 +00:00
Przemyslaw Czerpak
3fba5f0231 2008-11-03 14:08 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbthread.h
  * harbour/source/vm/thread.c
    + added ULONG _hb_gettid( void ) to OS2 builds - thanks to Maurilio

  * harbour/source/rtl/hbinet.c
    * changed a little bit the order of including header files in OS2 builds
      (blink fix for OpenWatcom OS2 builds).
2008-11-03 13:08:04 +00:00
Przemyslaw Czerpak
b89516b58d 2008-11-03 00:56 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/thread.c
    + added temporary workaround for non GCC OS2 ST builds

  * harbour/source/rtl/hbmd5.c
    * casting cleanup
2008-11-02 23:55:26 +00:00
Przemyslaw Czerpak
1ad4e9c53a 2008-10-24 12:00 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/rtl/gtxwc/gtxwc.c
    * added hack for problems with some XLIB versions in heavy stress
      MT tests

  * harbour/include/hbapigt.h
  * harbour/source/vm/thread.c
    * added parameter to hb_gtAlloc() C function

  * harbour/include/hbapigt.h
  * harbour/source/rtl/hbgtcore.c
    + added hb_gtCreate() and hb_gtSwap() C functions
    + added new .prg functions:
         HB_GTCREATE( <cGtName> ) -> <pGT>
         HB_GTSELECT( <pGT> ) -> <pPrevGT>
      Using this functions is possible to create many console window
      if GT supports such possibilities (f.e. GTXWC or GTWVT) even in
      single thread programs and switch between them.

  * harbour/source/rtl/box.c
    ! fixed one of recent DISPBOX() modifications - it should use:
      hb_gtBoxEx() instead of hb_gtDrawBox() to set cursor position.

  + harbour/tests/gtwin.prg
    + added demonstration/test code for using more then one console window
      also in single thread programs.
2008-10-24 10:00:30 +00:00
Przemyslaw Czerpak
63cccbddfa 2008-10-22 19:13 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/thread.c
    ! fixed memory allocation in HB_THREADWAIT() when more then 16
      threads were specified
2008-10-22 17:13:27 +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
b0a88e24ff 2008-10-15 00:31 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbxvm.h
  * harbour/source/vm/hvm.c
    - removed to unused functions

  * harbour/source/vm/thread.c
    - removed unnecessary casting
2008-10-14 22:32:03 +00:00
Przemyslaw Czerpak
7d8c51e71a 2008-10-13 18:01 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/thread.c
    + added small description for hb_threadOnce() .prg function

  * harbour/include/hbthread.h
    ! do not set TLS in POCC and XCC builds when _MSC_VER macro is set
      This compilers also have this macro but dllspec( thread) does
      not work for them (at least in version 4.50.15)

  * harbour/utils/hbtest/rt_hvm.prg
    + added few tests which exploit by DMC bug. Be careful with
      this compiler. In some cases it gives buggy final code, f.e.
      try this:

            #include <stdio.h>
            typedef struct
            {
               double         dd;
               long long int  ll;
            } UN;
            const char * cmp( UN * pU )
            {
               return pU->dd >= pU->ll ? "OK" : "ERRROR";
            }
            int main( void )
            {
               UN u = { 10.50, 10 };
               printf( "%s\n", cmp( &u ) );
               return 0;
            }

      The same bug can be exploited also by final Harbour binaries
      compiled by DMC in code like:

         ? iif( 10.50 >= 10, "OK", "ERROR" )

      I used DMC 8.42n. As long as such things will not be fixed by
      DMC developers this compiler is not supported by Harbour and
      reported problems with DMC Harbour builds will have to be
      ignored by us.
2008-10-13 16:01:44 +00:00
Przemyslaw Czerpak
abfc488c1a 2008-10-12 20:31 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/hvm.c
    ! execute hb_vmThreadQuit() after hb_vmStackRelease()

  * harbour/source/vm/thread.c
    * do not destroy critical sections on exit
2008-10-12 18:31:41 +00:00
Przemyslaw Czerpak
5964eac44c 2008-10-10 22:46 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/hvm.c
    * reduced the mutex lock time in thread exit state

  * harbour/source/vm/thread.c
    ; added note about possible behavior of hb_threadSelf() function
      in one very specific situation. It's documented and expected
      behavior

  * harbour/source/rtl/hbgtcore.c
    + added support for retrieving current HB_GTI_NOTIFIERBLOCK code block
    + added support for removing HB_GTI_NOTIFIERBLOCK code block without
      setting the new one
2008-10-10 20:46:50 +00:00
Przemyslaw Czerpak
f51b6c2f24 2008-10-10 21:22 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/garbage.c
    * unblock HVM before executing destructors and releasing blocks

  * harbour/source/vm/fm.c
    ! do not call internal error with active lock when FM statistic
      is enabled

  * harbour/source/vm/thread.c
    ! stop other threads in hb_threadOnce() if the 1-st one
      executes bAction block to be sure that it will be completed
      before thread leave hb_threadOnce() function

  * harbour/source/vm/set.c
    ! do not call hb_inkeyReset() in set release. It's not necessary
      and it could change keyboard buffer size for other threads using
      the same GT driver.

  * harbour/source/vm/hvm.c
    % allocate new thread stack without lock

  * harbour/source/rtl/hbgtcore.c
  * harbour/source/rtl/gtapi.c
    * moved clipboard resetting from hbgtcore.c to gtapi.c

  * harbour/source/rtl/filesys.c
    ! do not use read/write operations with given file offset in Win9X
      which seems to not support such functionality
2008-10-10 19:23:11 +00:00
Przemyslaw Czerpak
d4b61aece8 2008-10-10 06:26 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbvm.h
  * harbour/source/vm/hvm.c
    + added hb_vmProcessDynLibSymbols() which works like
      hb_vmProcessSymbolsEx() but always mark registered modules as
      dynamic

  * harbour/source/vm/maindllp.c
    * redirect hb_vmProcessSymbolsEx() to hb_vmProcessDynLibSymbols()

  * harbour/source/vm/thread.c
    * disabled some low level locking code in non MT HVM mode
2008-10-10 04:26:42 +00:00
Przemyslaw Czerpak
a9ed741e26 2008-10-09 00:17 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbtypes.h
  * harbour/source/vm/maindllp.c
    ! updated casting for current SVN code
      [TOMERGE 1.0]

  * harbour/include/hbthread.h
  * harbour/source/vm/hvm.c
  * harbour/source/vm/thread.c
    + added .prg function
         hb_threadWait( <pThID> | <apThID>, [ <nTimeOut> ] [, <lAll> ] )
               => <nThInd> | <nThCount> | 0
      This function wait for <nTimeOut> seconds (default infinite wait)
      until one or all (controlled by <lAll> parameter) of given HVM threads
      will have finished execution in HVM area. It does not join the threads.
      It returns index to 1-st thread which has finished execution (default)
      or number of threads which has finished in given time period when lAll
      is .T.
2008-10-08 22:18:09 +00:00
Przemyslaw Czerpak
1ec50a7d81 2008-10-06 21:50 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/hvm.c
    ! fixed last commit typo in thread number allocating - all threads
      where using 0 number

  * harbour/source/vm/thread.c
    ! fixed return value in recursive call to hb_mutexLock() - was FALSE
    ! fixed typo in timeout parameter number
      should be 2 instead of 1

  * harbour/source/rtl/tobject.prg
    ! fixed init() return value - it should be ignored and current
      object should be returned

  * harbour/source/rtl/tthreadx.prg
    ! probably fixed timeout parameter use in signal:wait() method
      I guess that like other xbase++ functions it's in 1/100th of
      a second

  * harbour/include/hboo.ch
  * harbour/include/hbclass.ch
  * harbour/source/vm/classes.c
  * harbour/source/rtl/tclass.prg
    + added support for SYNC object and CLASS messages working like
      in xBase++. Please remember that all locked by thread SYNC messages
      objects and classes are unblocked automatically for the time which
      thread spends in hb_subscribe[Now]() or signal:wait()
2008-10-06 19:50:53 +00:00
Przemyslaw Czerpak
67cc2f7ebe 2008-10-06 15:30 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbthread.h
  * harbour/source/vm/thread.c
  * harbour/source/vm/hvm.c
    + add numeric HVM thread identifiers to thread structure. Now
      HB_THREADID() returns numbers in all OSes

  * harbour/include/hbexprop.h
  * harbour/include/hbexprb.c
  * harbour/source/common/expropt2.c
    + added compile time optimization for MIN() and MAX() functions

  * harbour/source/rtl/minmax.c
    * removed trailing spaces from source code
2008-10-06 13:30:47 +00:00
Przemyslaw Czerpak
3dc7a9f679 2008-10-06 11:17 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/thread.c
    ! fixed typo in recent modification
2008-10-06 09:17:27 +00:00
Przemyslaw Czerpak
423391977e 2008-10-06 02:18 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/tests/speedtst.prg
    * marked T054 as memory tests

  * harbour/source/vm/hvm.c
  * harbour/source/vm/thread.c
    * added hb_threadOnce( @<onceControl> [, <bAction> ] ) -> <lFirstCall>
      This function allow to execute some code only once. It's usefull in
      MT environment for initialization.
      <onceControl> is variable which holds the execution status and have
      to be initialized to NIL. In most of cases it will be simple static
      variable in user code.
      <bAction> is optional codeblock which is executed only once (on 1-st
      call with given <onceControl>)

  * harbour/source/rtl/filesys.c
    ! do not make any file name conversions in hb_fsNameConv() if HVM stack
      is not allocated

  * harbour/source/rtl/gtcrs/gtcrs.c
    * casting
2008-10-06 00:19:10 +00:00
Przemyslaw Czerpak
38684fe9c1 2008-10-05 15:53 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/thread.c
    ! fixed hb_mutexSubscribe*() in ST mode
2008-10-05 13:53:36 +00:00
Viktor Szakats
738b3391e8 2008-10-02 20:25 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* contrib/hbct/Makefile
  * contrib/hbct/common.mak
  * contrib/hbct/ctmisc.prg
  + contrib/hbct/ctdummy.prg
    * Recently added dummy CT functions moved to a separate file.

  * source/vm/thread.c
    ! Fixed warning in HB_THREADID().
2008-10-02 18:30:09 +00:00
Maurilio Longo
f25e456ddb 2008-10-02 15:54 UTC+0200 Maurilio Longo (maurilio.longo@libero.it)
* harbour/source/vm/thread.c
    * hb_ThreadID() returns 0 when built in ST mode.
2008-10-02 13:53:54 +00:00
Maurilio Longo
c2f6b15424 2008-10-02 15:50 UTC+0200 Maurilio Longo (maurilio.longo@libero.it)
* harbour/source/vm/thread.c
    + added hb_ThreadID() function which returns thread ID of current thread.
2008-10-02 13:47:59 +00:00
Przemyslaw Czerpak
cce3e73961 2008-09-29 11:18 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbvm.h
  * harbour/include/hbthread.h
  * harbour/source/vm/hvm.c
  * harbour/source/vm/thread.c
    + added hb_vmThreadRegister() funtion which allows to register new
      thread in HVM without HVM stack allocation
    + added hb_vmThreadRelease() which removes registered thread which
      does not have allocated HVM stack yet
    + added hb_threadStateNew() which returns new thread control state
      which can be used as parameter to hb_vmThreadInit(),
      hb_vmThreadRegister(), hb_vmThreadRelease()
    * register thread control state also for main thread
      Now hb_threadSelf() returns thread pointer also for main thread
    ! fixed possible race condition in hb_threadWaitForAll() and
      hb_threadTerminateAll() by using hb_vmThreadRegister() before
      starting thread.

  * harbour/source/rtl/idle.c
    * interrupt hb_idleSleep() on QUIT or BREAK requests

  * harbour/tests/mt/mttest09.prg
    * small cleanup
2008-09-29 09:19:46 +00:00