Commit Graph

1806 Commits

Author SHA1 Message Date
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
Viktor Szakats
a1a7c1cb07 Fix to prev 2008-09-23 10:26:19 +00:00
Viktor Szakats
e7fdff1641 2008-09-23 11:24 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* include/hbthread.h
    % Enabled TLS for _MSC_VER compilers.
    ; Tested with MSVS 2008 32-bit. Someone pls test with 
      older/other MSVC compilers (especially MSVC6 and WinCE mode)
      to refine the default setting if needed.
2008-09-23 09:25:33 +00:00
Przemyslaw Czerpak
f05cbbaaaf 2008-09-22 19:32 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/ChangeLog
   ! corrected previous ChangeLog entry: instead of hb_waDetach()/
     hb_waRequest() should be db_dbDetach()/hb_dbRequest()

  * harbour/source/vm/hvm.c
   * disabled PRG tracing in default builds. If someone wants to
     use this feature then he should recompile Harbour with HB_PRG_TRACE
     macro. In such case tracing can be enabled/disabled by __TRACEPRGCALLS()
     function. HB_NO_TRACE macro is not longer usable - it's default in
     current code.

  * harbour/source/vm/classes.c
    + added PRG function __clsPreallocate() which extends the size of
      classes buffer to given value to avoid later RT reallocations.
      It may be useful in some very seldom cases for MT programs which
      will allocate dynamically at runtime more then 16386 classes.
      In practice rather impossible though who knows ;-)

  * harbour/source/rdd/workarea.c
    * set default preallocation size for RDD nodes to 128
    + added PRG function __rddPreallocate() which extends the size of
      RDD nodes buffer to given value to avoid later RT reallocations.
      It may be useful in some very seldom cases for MT programs which
      will register dynamically at runtime more then 128 RDDs when other
      threads are active and may use RDD nodes.

  * harbour/include/hbrddcdx.h
  * harbour/source/rdd/dbfcdx/dbfcdx1.c
    + added ORDLSTDELETE() method.
      Now ordbagClear() should work for DBFCDX.
2008-09-22 17:32:36 +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
a8aac5cae5 2008-09-22 02:34 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbvm.h
  * harbour/source/vm/hvm.c
  * harbour/source/vm/thread.c
    + added .prg function hb_threadSelf() -> <pThID> | NIL
      It returns thread ID pointer variable or NIL when thread was
      registered without it (main thread and some 3-rd party threads
      created by C API)

  * harbour/source/vm/hvm.c
    * protect s_InitFunctions and s_ExitFunctions by mutex

  * harbour/source/common/hbverdsp.c
    * use hb_verBuildDate() instead of __DATE__ and __TIME__ in
      hb_verBuildInfo() function to report the same time in both
      cases.
2008-09-22 00:34:52 +00:00
Przemyslaw Czerpak
c1c574142e 2008-09-21 23:03 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapi.h
  * harbour/source/vm/arrays.c
    + added hb_arrayGetPtrGC(), hb_arrayGetSymbol(), hb_arraySetSymbol()

  * harbour/include/hbapi.h
  * harbour/source/vm/dynsym.c
    + added hb_dynsymProtectEval(). Works like hb_dynsymEval() but
      keeps dynamic symbol table locked during whole execution.
      It's faster then hb_dynsymEval() but user function may not
      access dynamic symbol tbale to not cause recursive locks
    + added protection against possible dynamic symbol table resizing
      during hb_dynsymEval() by other threads.

  * harbour/include/hbapi.h
  * harbour/source/vm/memvars.c
    + added hb_memvarSaveInArray( int iScope, BOOL fCopy ) and
      hb_memvarRestoreFromArray( PHB_ITEM pArray )
    % use hb_dynsymProtectEval() in places where it's safe

  * harbour/include/Makefile
  + harbour/include/hbthread.ch
    + added header file with thread constant definitions:
         HB_THREAD_INHERIT_PUBLIC
         HB_THREAD_INHERIT_PRIVATE
         HB_THREAD_INHERIT_MEMVARS
         HB_THREAD_MEMVARS_COPY

  * harbour/include/hbthread.h
  * harbour/source/vm/hvm.c
  * harbour/source/vm/thread.c
    + added support for inheriting visible memvars from current
      thread when new thread is created. Memvars in child thread
      can be shared with parrent or they can be copied. See HB_THREAD_*
      attributes defined in hbthread.ch, f.e.:
         hb_threadStart( HB_THREAD_INHERIT_PUBLIC, @thFunc() )
      or:
         hb_threadStart( HB_BITOR( HB_THREAD_INHERIT_MEMVARS + ;
                                   HB_THREAD_MEMVARS_COPY ), ;
                          @thFunc() )
      Please note that when child thread creates new PUBLIC variable
      which didn't existed when thread was started then it's visible
      only for this thread and optionally for its child threads but
      not for parent thread.
      Please also remember that write access to shared memvars have
      to be protected by users.

  + harbour/tests/mt/mttest08.prg
    + added test code for thread memvars inheritance
2008-09-21 21:04:47 +00:00
Przemyslaw Czerpak
7cc11cf5e2 2008-09-19 22:27 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/set.c
    ! fixed casting

  * harbour/contrib/xhb/xhbcopyf.c
    * replaced TABs with SPACEs

  * harbour/include/hbapirdd.h
  * harbour/source/rdd/workarea.c
  * harbour/source/rdd/wacore.c
  * harbour/source/rdd/wafunc.c
    + added support for detaching and attaching workareas

  * harbour/source/vm/hvm.c
    % minor cleanup in thread return code

  * harbour/include/hbthread.h
  * harbour/source/vm/thread.c
    * unlock HVM stack during thread join operation
    * added workaround for DosWaitThread() which seems to fail if thread
      terminated before
    ; added TOFIX note for OS2 and join code
2008-09-19 20:28:26 +00:00
Przemyslaw Czerpak
54252ca860 2008-09-18 17:24 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/make_rpm.sh
    * use rpm to test if curl-devel package is installed

  * harbour/include/hbapi.h
  * harbour/source/common/hbstr.c
    + added hb_strduptrim() and hb_strlentrim()

  * harbour/source/rdd/dbfcdx/dbfcdx1.c
    ! control total length of KEY and FOR expression together
      to be compatible with other CDX drivers.
      Total length of both expressions cannot exceed 512 bytes
      (with two trailing ASCII 0 characters)
2008-09-18 15:25:37 +00:00
Przemyslaw Czerpak
86333ba271 2008-09-18 07:21 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbthread.h
    * use assembler version of atomic inc/dec operation in all x86 based
      GCC builds - it should noticeable improve OS2 MT build speed,
      please test.

  * harbour/include/hbcomp.h
  * harbour/include/hbapicdp.h
  * harbour/include/hbcompdf.h
  * harbour/include/hbgtcore.h
  * harbour/include/hbapifs.h
  * harbour/include/hbwince.h
  * harbour/include/hbexpra.c
  * harbour/include/hbexprop.h
  * harbour/include/hbmacro.h
  * harbour/include/hbapigt.h
  * harbour/include/hbapi.h
  * harbour/include/hbapiitm.h
  * harbour/include/hbexprb.c
  * harbour/source/pp/ppcore.c
  * harbour/source/pp/hbpp.c
  * harbour/source/vm/macro.c
  * harbour/source/vm/cmdarg.c
  * harbour/source/vm/arrays.c
  * harbour/source/vm/extrap.c
  * harbour/source/vm/memvars.c
  * harbour/source/vm/eval.c
  * harbour/source/vm/extend.c
  * harbour/source/vm/set.c
  * harbour/source/main/harbour.c
  * harbour/source/common/hbfsapi.c
  * harbour/source/common/reserved.c
  * harbour/source/common/expropt1.c
  * harbour/source/macro/macro.yyc
  * harbour/source/macro/macro.y
  * harbour/source/macro/macro.yyh
  * harbour/source/macro/macrolex.c
  * harbour/source/rtl/gtdos/gtdos.c
  * harbour/source/rtl/gtwin/gtwin.c
  * harbour/source/rtl/gtxwc/gtxwc.c
  * harbour/source/rtl/gtos2/gtos2.c
  * harbour/source/rtl/hbgtcore.c
  * harbour/source/rtl/cdpapi.c
  * harbour/source/rtl/gtcrs/gtcrs.c
  * harbour/source/rtl/hbtoken.c
  * harbour/source/rtl/gtchrmap.c
  * harbour/source/rtl/gtstd/gtstd.c
  * harbour/source/rtl/gtsln/mousesln.c
  * harbour/source/rtl/gtsln/gtsln.c
  * harbour/source/rtl/gtsln/kbsln.c
  * harbour/source/rtl/gttrm/gttrm.c
  * harbour/source/rtl/gtpca/gtpca.c
  * harbour/source/rtl/hbhex.c
  * harbour/source/rtl/gtgui/gtgui.c
  * harbour/source/rtl/gt_tpl/gt_tpl.c
  * harbour/source/rtl/gtcgi/gtcgi.c
  * harbour/source/rtl/gtwvt/gtwvt.c
  * harbour/source/rtl/strtran.c
  * harbour/source/rtl/hbinet.c
  * harbour/source/rtl/gtapi.c
  * harbour/source/rtl/filesys.c
  * harbour/source/rdd/dbfntx/dbfntx1.c
  * harbour/source/rdd/dbsql.c
  * harbour/source/rdd/dbfcdx/dbfcdx1.c
  * harbour/source/rdd/dbffpt/dbffpt1.c
  * harbour/source/rdd/hbsix/sxfname.c
  * harbour/source/compiler/ppcomp.c
  * harbour/source/compiler/hbmain.c
  * harbour/source/compiler/cmdcheck.c
  * harbour/source/compiler/hbdbginf.c
  * harbour/source/compiler/genc.c
  * harbour/source/compiler/hbident.c
  * harbour/source/compiler/hbusage.c
  * harbour/source/compiler/gencc.c
  * harbour/source/compiler/harbour.yyc
  * harbour/source/compiler/harbour.y
  * harbour/contrib/gtalleg/gtalleg.c
  * harbour/contrib/hbct/charlist.c
  * harbour/contrib/hbct/charmix.c
  * harbour/contrib/hbct/screen1.c
  * harbour/contrib/hbct/atrepl.c
  * harbour/contrib/xhb/hboutdbg.c
  * harbour/contrib/xhb/hbxml.c
  * harbour/contrib/xhb/hbxml.h
  * harbour/contrib/hbgt/strexpan.c
  * harbour/contrib/hbsqlit3/sqlite3/sqlite3.c
  * harbour/contrib/gtwvg/gtwvg.c
  * harbour/contrib/hbclipsm/status.c
  * harbour/contrib/hbclipsm/gauge.c
  * harbour/contrib/hbmisc/stringsx.c
  * harbour/contrib/hbtip/utils.c
  * harbour/contrib/hbgf/hbgfgtk/msginfo.c
  * harbour/contrib/hbgf/hbgfgtk/harbgtk.h
  * harbour/contrib/hbbmcdx/bmdbfcdx.c
  * harbour/utils/hbmake/hbmgauge.c
    * use const char * instead of char * in places which should be marked
      as const
2008-09-18 05:23:49 +00:00
Przemyslaw Czerpak
ab02c791d5 2008-09-17 18:38 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbthread.h
    + added macros to disable default native compiler TLS support:
      HB_NO_TLS

  * harbour/source/vm/set.c
    ! fixed GPF when set listeners were removed
2008-09-17 16:39:24 +00:00
Przemyslaw Czerpak
ca5637d31c 2008-09-16 15:57 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbthread.h
    * do not use native TLS support in BCC builds when CodeGuard
      is enabled
2008-09-16 13:58:37 +00:00
Przemyslaw Czerpak
61647d6776 2008-09-16 14:49 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbthread.h
    + added DMC to list of compilers which can use __declspec( thread )
    + automatically use TLS for Linux and GLIBC >= 2.6 on x86* machines

  * harbour/include/hbthread.h
  * harbour/source/vm/estack.c
  * harbour/source/vm/thread.c
    ! clean up typos in OS2 builds
2008-09-16 12:49:50 +00:00
Viktor Szakats
56b4afff23 2008-09-16 05:14 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* doc/gmake.txt
   * doc/gtapi.txt
   * doc/hbmake.txt
   * doc/windll.txt
     * Useless changes.

   * make_vc.mak
     * Some untested MT support for MSVC.

   * include/hbdefs.h
     ! Removed mistakenly committed experiment to pull in 
       MT related libs. This caused the strange build problem due 
       to empty lib name passed to #pragma. This could work 
       in case someone wanted to deal with it in the future.
2008-09-16 03:18:31 +00:00
Przemyslaw Czerpak
04523710aa 2008-09-15 23:08 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
+ harbour/tests/memtst.prg
    + added some simple tests for memory manager

  * harbour/tests/speedtst.prg
    * reduced the size of allocated block size to not test C-RTL
      memory manager but HVM speed

  * harbour/include/hbthread.h
    * added for x86@32 PTHREADS builds HB_ATOM_GET() and HB_ATOM_SET()
      so they can be used together with HB_ATOM_INC()/HB_ATOM_DEC()
      also for x86@64 but with reduced to 32bit reference counter.
2008-09-15 21:09:27 +00:00
Viktor Szakats
21d7545e12 2008-09-15 20:54 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* tests/multifnc/Makefile
  * doc/gmake.txt
  * bin/hb-func.sh
  * bin/postinst.sh
  * include/hbdefs.h
  * source/vm/Makefile
  * source/vm/vmmt/Makefile
    ! Changed mingw32 to mingw in remaining places.
2008-09-15 18:55:03 +00:00
Przemyslaw Czerpak
36ed679f92 2008-09-15 17:53 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbthread.h
    + added assembler MT version of HB_ATOM_INC/HB_ATOM_DEC operation
      for x86@32

  * harbour/source/vm/fm.c
    ! removed #undef HB_ATOM_INC/HB_ATOM_DEC I left by mistake
2008-09-15 15:54:46 +00:00
Przemyslaw Czerpak
ca21165e4b 2008-09-14 22:15 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbsetup.h
    * accept both settings: HB_FM_STATISTICS and HB_FM_STATISTICS_OFF
      without errors

  * harbour/bin/postinst.sh
    * added small trick to make HBFM lib compilation not  dependent on
      default HB_FM_STATISTIC settings

  * harbour/include/hbvm.h
  * harbour/source/vm/hvm.c
    + added C function hb_vmIsMt()

  * harbour/source/vm/cmdarg.c
    * report MT HVM status when program is executed with //INFO
      parameter

  * harbour/source/vm/fm.c
    ! fixed memory statistic MT protection in hb_xrealloc() operation

  * harbour/config/w32/owatcom.cf
    * use echo instead of echo. for non empty output.

  * harbour/include/hbextern.ch
  * harbour/source/vm/thread.c
    + added .prg function hb_threadTerminateAll() - it sends QUIT request
      to each HVM thread and waits for their termination. Can be executed
      only by main HVM thread.
2008-09-14 20:16:03 +00:00
Viktor Szakats
3b262ebaaa 2008-09-14 20:18 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* include/common.ch
    % IS*() macros now using hb_Is*() functions instead of 
      ValType() calls.
2008-09-14 18:19:09 +00:00
Viktor Szakats
96dd4b861f 2008-09-14 15:56 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* include/hbsetup.ch
    * Turned off HB_LEGACY_LEVEL by default.

  * doc/whatsnew.txt
    * Synced with 1.0.1.

  * make_vc.mak
  * contrib/mtpl_vc.mak
    * MSVS warning level changed to -W4 (with one warning 
      type manually excluded).
    ; NOTE/TOFIX: This will still generate quite some warnings, 
                  hopefully we can fix these until the next major 
                  release.
2008-09-14 14:01:51 +00:00
Viktor Szakats
dd31acbb20 2008-09-14 12:28 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* harbour-ce-spec
  * harbour-w32-spec
  * harbour.spec
  * common.mak
  * include/hbver.h
    * Changed version number to 1.1.0

  * include/hbextern.ch
    + Added new thread functions.

  * harbour-ce-spec
  * harbour-w32-spec
  * contrib/Makefile
  * contrib/make_b32_all.bat
  * contrib/make_gcc_all.sh
  * contrib/make_vc_all.bat
  - contrib/hbw32
  + contrib/hbwin
  * contrib/hbwin/win_reg.prg
  * contrib/hbwin/win_os.prg
  * contrib/hbwin/win_tprt.prg
  * contrib/hbwin/common.mak
  - contrib/hbwin/hbw32.ch
  + contrib/hbwin/hbwin.ch
  - contrib/hbwin/tests/testw32p.prg
  + contrib/hbwin/tests/testprn.prg
  * contrib/hbwin/tests/testreg.prg
  * contrib/hbwin/tests/bld_b32.bat
  * contrib/hbwin/tests/testprt1.prg
  * contrib/hbwin/tests/bld_vc.bat
  * contrib/hbwin/tests/testprt2.prg
  * contrib/hbwin/Makefile
    * Renamed hbw32 to hbwin.
    * Renamed hbw32.ch to hbwin.ch.
    ; INCOMPATIBLE.
2008-09-14 10:36:50 +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
Teo Fonrouge
ac4c1a5547 2008-09-08 13:59 UTC-0500 Teo Fonrouge (teo/at/windtelsoft/dot/com)
* include/hbclass.ch
    ! added missing MESSAGE <MessageName> TO <oObject>
      ; this also fixes DELEGATE command
2008-09-08 18:29:12 +00:00
Viktor Szakats
1e6b733289 2008-09-04 09:43 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* make_vc.mak
   * contrib/mtpl_vc.mak
     + -w34701 VC flag added to enabled warning 4701 (uninitialized vars) on -W3 level.
     % -FD VC flag removed. This is only needed for IDEs.
     % -Gs VC flag moved to the common section.
     % VC flags synced in contrib with core.
     + TOFIX added for WinCE command line. It's full of stuff which is _probably_ not needed.
     + NOTE added about MSDN page explaining VC switches.
     ; NOTE: -W4 and -Wp64 are recommended for MSVC.
     ; TOFIX: There are still a few uninit vars warnings:
              harboury.c(7226) : warning C4701: potentially uninitialized local variable 'hb_complval' used
              macroy.c(3095) : warning C4701: potentially uninitialized local variable 'hb_macrolval' used
              dbffpt1.c(2671) : warning C4701: potentially uninitialized local variable 'ulType' used
              dbffpt1.c(2614) : warning C4701: potentially uninitialized local variable 'ulSize' used
              dbffpt1.c(3073) : warning C4701: potentially uninitialized local variable 'ulOldSize' used
              dbffpt1.c(3083) : warning C4701: potentially uninitialized local variable 'ulBlock' used
              dbffpt1.c(3652) : warning C4701: potentially uninitialized local variable 'pBlock' used

   * source/rdd/workarea.c
     ! Fixed DBI_POSITIONED value returned.

   * include/hbsetup.h
   * source/vm/pvalue.c
   * source/rtl/fserror.c
   * source/rtl/accept.c
   * source/rtl/descend.c
   * source/rtl/inkey.c
   * source/rtl/dates.c
   * source/rtl/fkmax.c
   * source/rtl/natmsg.c
   * source/rtl/hbinet.c
   * source/rtl/dates.c
     ! Fixed some MSVS2008 -W4 warnings (we use -W3 as the default).
     ; NOTE: There is a lot more of these.

   * source/rtl/dates.c
     * Formatting.
2008-09-04 13:28:49 +00:00
Viktor Szakats
ffdf363493 2008-08-30 11:58 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* include/hbsetup.ch
     + Added HB_LEGACY_OFF macro to turn off HB_LEGACY_LEVEL.

   * utils/hbmake/hbmake.prg
     * Two minor cleanups.

   * doc/en/hb_apiit.txt
   * source/vm/eval.c
     * PEVALINFO -> PHB_EVALINFO
     * EVALINFO -> HB_EVALINFO

   * contrib/hbct/ctwin.c
   * contrib/hbct/keyset.c
   * contrib/hbct/misc3.c
   * contrib/hbnf/numlock.c
   * contrib/hbnf/shift.c
   * contrib/hbnf/alt.c
   * contrib/hbnf/ctrl.c
   * contrib/hbnf/caplock.c
     * GTI_* -> HB_GTI_*

   * source/rtl/spfiles.c
     * FHANDLE -> HB_FHANDLE
2008-08-30 10:21:22 +00:00
Przemyslaw Czerpak
0b684e3379 2008-08-29 11:29 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbcompdf.h
  * harbour/source/compiler/hbmain.c
  * harbour/source/compiler/harbour.yyc
  * harbour/source/compiler/harbour.y
    ! removed all classes and functions static declarations
    ! fixed cleanup code for classes and functions declarations
2008-08-29 09:30:15 +00:00
Viktor Szakats
be82d17256 2008-08-28 12:20 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* make_vc.bat
     * Updated usage text.

   * include/hbwince.h
     ! Fix for Pelles C 5.0 in WinCE/ARM mode.

   * include/hbsetup.h
     + Detecting Pelles C 5.0 in ARM mode as HB_WINCE.

   * ChangeLog
     - Removed some advices not valid anymore from previous entry.

   * contrib/mtpl_b32.bat
   * contrib/mtpl_vc.bat
     * Synced with /make_*.bat so that the name of the .mak 
       file is now hard-wired instead of being HB_CC_NAME dependent.
       This way contribs may be built for WinCE in the future 
       (this still needs adding WinCE support to mtpl_vc.mak).

   * contrib/mtpl_gcc.sh
     + Darwin autodetection was missing.

   * contrib/hbfimage/fi_winfu.c
     ! Added CBM_INIT definition for Pellec C in WinCE mode.

   * source/rtl/gtclip.c
     + Added GMEM_MOVEABLE definiction for Pelles C in WinCE mode.

   + config/w32/poccce.cf
     + Added Pellec C WinCE make file.

   + config/w32/msvcce.cf
     + Added WinCE GNU make file for MSVC. Untested, probably not working, 
       this is just a small step to make the GNU-make equal in feature 
       with the non-GNU make one.

   * config/w32/bcc32.cf
     * Minor sync of C options with non-GNU make file.

   * config/w32/msvc.cf
     * Attempt to sync C options with non-GNU make file.

   * contrib/hbfbird/firebird.c
     * Minor formatting.

   ; NOTE1: For better consistency I'd like to rename GNU make compiler names
            'mingw32' to 'mingw' (they've dropped '32' long ago), and 
            'cemgw' to 'mingwce'.
   ; NOTE2: Pelles C WinCE build still generates following errors:
       POLINK: error: Unresolved external symbol 'GetModuleFileNameA'.
       POLINK: error: Unresolved external symbol 'RegOpenKeyExA'.
       ../../math.c(605): error #3120: [asm] Symbol 'inf' is undefined.
       contrib\gtwvg\gtwvg.h(78): fatal error #1035: Can't find include file <olectl.h>.
       ../../ctmath2.c(324): error #3120: [asm] Symbol 'inf' is undefined.
       ../../win32.c(70): error #2048: Undeclared identifier 'CS_OWNDC'.
       ../../win32.c(75): error #2048: Undeclared identifier 'IDI_APPLICATION'.
       ../../win32.c(75): error #2140: Type error in argument 2 to 'LoadIconA'; found 'int', expected 'const char *'.
       ../../win32.c(181): error #2048: Undeclared identifier 'MFS_DISABLED'.
       ../../win32.c(194): warning #2027: Missing prototype for 'InsertMenuItem'.
       ../../win32.c(219): warning #2027: Missing prototype for 'SetMenu'.
       ../../odbc.c(94): fatal error #1035: Can't find include file <sql.h>.
       contrib\hbsqlit3\sqlite3\sqlite3.c(9936): warning #2027: Missing prototype for 'localtime'. [ ... ]
       ../../w32_ole.c(403): error #2152: Unknown field 'pllVal' of 'union (no name)'.
       ../../w32_ole.c(403): error #2168: Operands of = have incompatible types 'int' and 'long long int *'.
       ../../w32_ole.c(408): error #2152: Unknown field 'llVal' of 'union (no name)'.
       ../../w32_ole.c(786): error #2152: Unknown field 'pllVal' of 'union (no name)'.
       ../../w32_ole.c(786): error #2144: Type error: pointer expected.
       ../../w32_ole.c(792): error #2152: Unknown field 'llVal' of 'union (no name)'.
       ../../hbsyslog.c(31): error #2140: Type error in argument 2 to 'RegisterEventSourceW'; found 'const char *', expected 'const wchar_t *'.
       ../../hbsyslog.c(97): error #2140: Type error in argument 8 to 'ReportEventW'; found 'const char * *', expected 'const wchar_t * *'.
       ../../firebird.c(448): error #2149: Undefined size for 'times' with type '(incomplete) struct tm'.
       ../../firebird.c(479): error #2152: Unknown field 'tm_year' of '(incomplete) struct tm'.
       ../../firebird.c(480): error #2152: Unknown field 'tm_mon' of '(incomplete) struct tm'.
       ../../firebird.c(481): error #2152: Unknown field 'tm_mday' of '(incomplete) struct tm'.
       ../../firebird.c(482): error #2152: Unknown field 'tm_hour' of '(incomplete) struct tm'.
       ../../firebird.c(483): error #2152: Unknown field 'tm_min' of '(incomplete) struct tm'.
       ../../firebird.c(484): error #2152: Unknown field 'tm_sec' of '(incomplete) struct tm'.
       ../../firebird.c(493): error #2152: Unknown field 'tm_year' of '(incomplete) struct tm'.
       ../../firebird.c(493): error #2152: Unknown field 'tm_mon' of '(incomplete) struct tm'.
       ../../firebird.c(493): error #2152: Unknown field 'tm_mday' of '(incomplete) struct tm'.
       ../../firebird.c(502): error #2152: Unknown field 'tm_hour' of '(incomplete) struct tm'.
       ../../firebird.c(503): error #2152: Unknown field 'tm_min' of '(incomplete) struct tm'.
       ../../firebird.c(504): error #2152: Unknown field 'tm_sec' of '(incomplete) struct tm'.
       ../../fi_winfu.c(97): warning #2027: Missing prototype for 'CreateDIBitmap'.
       ../../fi_winfu.c(98): error #2048: Undeclared identifier 'CBM_INIT'.
       ../../fi_winfu.c(99): error #2168: Operands of = have incompatible types 'HBITMAP' and 'int'.
       ../../fi_winfu.c(150): warning #2027: Missing prototype for 'GetDIBits'.
       [ lots of them with hbmysql ]
2008-08-28 10:22:54 +00:00
Viktor Szakats
7066d1f40b Minor cleanup to _MSC_VER comment 2008-08-27 01:12:27 +00:00
Viktor Szakats
fd4c743825 2008-08-27 00:54 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* include/hbinit.h
   * source/rtl/gtwin/gtwin.c
   * source/rtl/gtwvt/gtwvt.c
   * source/compiler/genc.c
     + Enabled init functions for MSVC 64-bit in C mode.
     ; NOTE: You get the idea, please comment. If there is 
             no simpler/easier/shorter way to achieve this, 
             I'll update the rest 150 files, too.
2008-08-26 23:03:56 +00:00
Viktor Szakats
c7200cdcf7 2008-08-26 13:24 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* source/compiler/hbmain.c
     ! Text casing fixed in some warning messages.
     ! Attempted to update hardcoded declarations for TGET methods.
       Some of the were removed, for some of them the parameter list 
       was updated to be in sync with current tget.prg.

   * contrib/gtalleg/gtalleg.c
   * contrib/gtwvg/gtwvg.c
   * contrib/hbbmcdx/bmdbfcdx.c
   * contrib/hbbmcdx/hbbmcdx.h
   * contrib/hbbtree/hb_btree.c
   * contrib/hbct/ctnet.c
   * contrib/hbct/ctstrfil.c
   * contrib/hbct/ctwin.c
   * contrib/hbcurl/hbcurl.c
   * contrib/hbgd/gdwrp.c
   * contrib/hbmzip/hbmzip.c
   * contrib/hbnf/fttext.c
   * contrib/hbtip/utils.c
   * contrib/xhb/freadlin.c
   * contrib/xhb/hbxml.c
   * contrib/xhb/hbxml.h
   * doc/codestyl.txt
   * doc/en/garbage.txt
   * doc/en/hb_apifs.txt
   * include/hbapigt.h
   * include/hbchksum.h
   * include/hbdbsort.h
   * include/hbgtcore.h
   * include/hbrddcdx.h
   * include/hbrdddbf.h
   * include/hbrdddel.h
   * include/hbrddntx.h
   * include/hbrddsdf.h
   * include/hbset.h
   * include/hbsxfunc.h
   * source/rdd/dbf1.c
   * source/rdd/dbfcdx/dbfcdx1.c
   * source/rdd/dbffpt/dbffpt1.c
   * source/rdd/dbfntx/dbfntx1.c
   * source/rdd/dbsql.c
   * source/rdd/hbsix/sxcompr.c
   * source/rdd/hbsix/sxsem.c
   * source/rdd/hsx/hsx.c
   * source/rtl/console.c
   * source/rtl/copyfile.c
   * source/rtl/fssize.c
   * source/rtl/fstemp.c
   * source/rtl/gt_tpl/gt_tpl.c
   * source/rtl/gtapi.c
   * source/rtl/gtcgi/gtcgi.c
   * source/rtl/gtcrs/gtcrs.c
   * source/rtl/gtdos/gtdos.c
   * source/rtl/gtos2/gtos2.c
   * source/rtl/gtpca/gtpca.c
   * source/rtl/gtsln/gtsln.c
   * source/rtl/gtstd/gtstd.c
   * source/rtl/gttrm/gttrm.c
   * source/rtl/gtwin/gtwin.c
   * source/rtl/gtwvt/gtwvt.c
   * source/rtl/gtxwc/gtxwc.c
   * source/rtl/hbgtcore.c
   * source/rtl/hbmd5.c
   * source/rtl/isprint.c
   * source/rtl/memofile.c
   * source/rtl/philes.c
   * source/rtl/set.c
   * source/vm/memvars.c
   * source/vm/runner.c
   * utils/hbdoc/hbdfrdln.c
   * utils/hbmake/hbmfrdln.c
     * FHANDLE -> HB_FHANDLE
     * hbct: HB_ITEM_PTR -> PHB_ITEM
2008-08-26 11:33:03 +00:00
Viktor Szakats
0004a67873 2008-08-26 10:35 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
- source/rtl/gtalleg
   + contrib/gtalleg
   * TODO
   * doc/dirstruc.txt
   * include/hbgtcore.h
   * contrib/gtalleg/Makefile
   * contrib/gtalleg/make_b32.bat
   * contrib/gtalleg/make_vc.bat
   * contrib/gtalleg/make_gcc.sh
   * contrib/make_b32_all.bat
   * contrib/make_vc_all.bat
   * contrib/make_gcc_all.sh
   * contrib/Makefile
   * config/hpux/gcc.cf
   * config/hpux/global.cf
   * config/darwin/gcc.cf
   * config/darwin/global.cf
   * config/dos/global.cf
   * config/linux/gcc.cf
   * config/linux/global.cf
   * config/sunos/gcc.cf
   * config/sunos/global.cf
   * config/bsd/gcc.cf
   * config/bsd/global.cf
   * config/w32/global.cf
   * harbour-ce-spec
   * harbour-w32-spec
   * harbour.spec
     * GTALLEG moved to contrib to make it possible to build 
       using the non-GNU make system, also to align the build 
       process with other 3rd party package dependent parts 
       of Harbour.
       HB_INC_ALLEGRO or HB_DIR_ALLEGRO may be used to point 
       to Allegro package directory. This is generally necessary 
       on non-*nix systems.
     ; NOTE: Review and test build processes and modified files, 
             and unmodified, but potentially related files:
             bin/hb-func.sh
             make_gnu.sh
             make_rpm.sh
             make_rpmce.sh
             make_rpmw32.sh
2008-08-26 08:51:11 +00:00
Viktor Szakats
afc82fc905 2008-08-26 09:00 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* include/hbsetup.h
     + Added small table (partly from MS KB) about _MSC_VER 
       values and MS product names, as we know them.

   * common.mak
   * utils/hbdoc/Makefile
   * utils/hbdoc/bld_b32.bat
   * utils/hbdoc/bld_vc.bat
   * utils/hbdoc/hbdoc.prg
   * utils/hbdoc/genasc.prg
   * utils/hbdoc/genchm.prg
   * utils/hbdoc/genhpc.prg
   * utils/hbdoc/genhtm.prg
   * utils/hbdoc/genng.prg
   * utils/hbdoc/genos2.prg
   * utils/hbdoc/genpdf1.prg
   * utils/hbdoc/genrtf.prg
   * utils/hbdoc/gentrf.prg
   - utils/hbdoc/rtf.prg
   - utils/hbdoc/os2.prg
   - utils/hbdoc/teeasc.prg
   - utils/hbdoc/ng.prg
   - utils/hbdoc/html.prg
   - utils/hbdoc/troff.prg
     ! Removed non-ASCII drawing chars from comments.
     % Removed STATIC var from THTML class.
     % Merged separate support classes to their gen*.prg.
2008-08-26 07:01:56 +00:00
Viktor Szakats
a0dbcc4b5b 2008-08-25 22:49 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* include/hbsetup.h
     ! Fixed OS_UNIX_COMPATIBLE
     + Small comments added.
     ; NOTE: I'd like to do the following global renames:
             HB_WINCE     -> HB_OS_WIN_CE
             HB_OS_WIN_32 -> HB_OS_WIN
             Opinions? Especially on the latter.

   * include/hbdefs.h
   * include/hbinit.h
   * contrib/hbodbc/odbc.c
     * _WIN64 -> HB_OS_WIN_64
2008-08-25 21:06:51 +00:00
Viktor Szakats
90207c5539 2008-08-25 22:49 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* make_vcce.mak
     ! Do not explicitly #define HB_WINCE. This should be 
       autodetected in hbsetup.h.

   * include/hbsetup.h
     % Minor cleanup.
2008-08-25 20:49:54 +00:00
Viktor Szakats
7eedaf89c6 2008-08-25 22:35 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* include/hbsetup.h
   * source/common/hbver.c
     - Removed HB_OS_MAC support. It was nothing more than a simple
       detection and a static version string, so we didn't lose much.
2008-08-25 20:36:31 +00:00
Viktor Szakats
d90dfb210c 2008-08-25 19:49 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* include/hbsetup.h
     ! Fixed problem where Darwin autodetection went wrong 
       between 1.0.0rc2 -> 1.0.0.
     * HB_OS_DARWIN added to the HB_OS_UNIX detection list.
       (no functional difference, just makes it more clear.)
     % HB_OS_OS2_EMX removed. It was unused.

   * source/compiler/gencobj.c
   * include/hbsetup.h
     % Removed OS_DOS_COMPATIBLE.
       It's equivalent to !defined(HB_OS_UNIX_COMPATIBLE).
2008-08-25 18:04:02 +00:00
Przemyslaw Czerpak
c9fde7451a 2008-08-25 16:01 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/macro.c
  * harbour/source/vm/hvm.c
    ! fixed _FIELD indirectly used as alias, f.e.:
         ? ("_FIELD")->NAME
      or:
         M->var := "_FIELD"
         ? ("&var")->NAME

  * harbour/include/hbclass.ch
  * harbour/include/common.ch
    * use a little bit simpler form for HB_SYMBOL_UNUSED()

  * harbour/contrib/hbw32/w32_ole.c
  * harbour/contrib/hbole/ole2.c
    ! fixed numeric to pointer casting
    * accept both pointer and numeric values as window handle
      for easier code migration
2008-08-25 14:02:59 +00:00
Viktor Szakats
5c3718eeba 2008-08-23 16:40 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* contrib/hbgt/Makefile
   * contrib/hbgt/common.mak
   - contrib/hbgt/strdiff.c
   + contrib/hbgt/strdiffg.c
   - contrib/hbgt/charmix.c
   + contrib/hbgt/charmixg.c
   - contrib/hbgt/asciisum.c
   + contrib/hbgt/asciisgt.c
   - contrib/hbgt/ascpos.c
   + contrib/hbgt/ascposgt.c
   * contrib/hbgf/hbgfos2/Makefile
   - contrib/hbgf/hbgfos2/tmenuitm.prg
   + contrib/hbgf/hbgfos2/tmenuit.prg
     ! Some files renamed to collide with each other on 
       non-GNU make systems.

   * contrib/examples/hscript/cgi.ch
   * contrib/examples/hscript/dir.hs
   * contrib/examples/hscript/multiply.hs
   * contrib/examples/hscript/ugly.hs
   * contrib/examples/hscript/hello.hs
   * contrib/examples/guestbk/guestbk.ini
     + Added SVN headers.

   + source/rtl/gtalleg/common.mak
   + source/rtl/gtalleg/make_gcc.sh
   + source/rtl/gtalleg/make_b32.bat
   + source/rtl/gtalleg/make_vc.bat
     + Added non-GNU make file as an ugly hack to 
       build them on Windows systems.

   - tests/altd.prg
   + tests/altdtest.prg
     * Rename.

   * include/hbver.h
   * harbour-ce-spec
   * harbour-w32-spec
   * harbour.spec
     * Version changed to '1.0.1dev'.
       Trunk will need to be synced to tag/1.0.

   * common.mak
     + Added version to harbour.dll: harbour-101-b32/vc.dll
     ; Work in progress. Pls comment.
2008-08-23 14:46:28 +00:00
Viktor Szakats
8235137004 2008-08-21 14:11 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* include/hbcomp.h
     * Minor formatting (alignment).

   * ChangeLog
     ! Added missing file from previous entry.

   * contrib/hbclipsm/gauge.c
     ! Fixed very old bug (too small buffer for snprintf()).
     * Minor adjustment to Harbour percentage var retrieval.

   * common.mak
   * utils/hbmake/Makefile
   * utils/hbmake/bld_b32.bat
   * utils/hbmake/bld_vc.bat
   - utils/hbmake/checkdef.ch
   - utils/hbmake/checks.ch
   - utils/hbmake/checks.prg
   * utils/hbmake/fclass1.prg
   * utils/hbmake/ffile1.prg
   * utils/hbmake/ft_funcs.prg
   - utils/hbmake/hbdocdef.ch
   * utils/hbmake/hbmake.prg
   * utils/hbmake/hbmlang.c
   * utils/hbmake/hbmutils.prg
   * utils/hbmake/Makefile
   * utils/hbmake/pickfile.prg
   * utils/hbmake/prb_stak.prg
   - utils/hbmake/radiodef.ch
   - utils/hbmake/radios.ch
   - utils/hbmake/radios.prg
   * utils/hbmake/readline.c
   * utils/hbmake/tmake.prg
   * utils/hbdoc/fclass1.prg
   * utils/hbdoc/ffile1.prg
   * utils/hbdoc/ft_funcs.prg
   * utils/hbdoc/genasc.prg
   * utils/hbdoc/genchm.prg
   * utils/hbdoc/genhpc.prg
   * utils/hbdoc/genhtm.prg
   * utils/hbdoc/genng.prg
   * utils/hbdoc/genos2.prg
   * utils/hbdoc/genpdf1.prg
   * utils/hbdoc/genrtf.prg
   * utils/hbdoc/gentrf.prg
   * utils/hbdoc/hbdoc.prg
   * utils/hbdoc/hbdocdef.ch
     * Cleanups.
     % Removed unused parts.
     ! GAUGE*() functions synced with hbclipsm.lib.
     * Removed hbclip.ch requirement when compiled 
       with CA-Cl*pper. (not tested)
2008-08-21 12:53:11 +00:00
Viktor Szakats
4c4120985a 2008-08-21 10:28 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* include/dbinfo.ch
   * include/dbstruct.ch
   * include/hbgtinfo.ch
   * include/hblang.ch
   * include/setcurs.ch
     ! Added "also used from C code" comments.

   * utils/hbmake/ffile1.prg
     ! Minor cleanup.

   * include/hbgfxdef.ch
   * include/hbgtinfo.ch
     * Marked old GTI_*, GFX_* macros with HB_LEGACY_LEVEL.
       (Old macro HB_GT_NO_XHB no longer works)

   * include/hbsetup.ch
     + Added HB_LEGACY_LEVEL macro. Currently turned on.
       Will be turned off later, and completely removed 
       as a final step. Times are not defined for these 
       yet. Please prepare to modify your code to not 
       use old legacy stuff.
       NOTE: C code using legacy Clipper (.api) headers are
             unaffected.

   * include/hbapirdd.h
     * Marked HARBOUR_* macros with HB_LEGACY_LEVEL

   * include/hbsetup.h
     * Marked OS_UNIX_COMPATIBLE, OS_PATH_DELIMITER 
       macros with HB_LEGACY_LEVEL.

   * include/hbapifs.h
   * source/rtl/filesys.c
     * Marked hb_fileNameConv() as HB_LEGACY_LEVEL.
     ; 3rd party and app developers should switch to 
       hb_fsNameConv().

   * source/rtl/box.c
   * source/rtl/console.c
   * source/rtl/filesys.c
   * source/rtl/gtapi.c
   * source/rtl/hbgtcore.c
   * contrib/hbclipsm/gauge.c
   * contrib/hbclipsm/status.c
   * contrib/hbct/ctwin.c
   * source/rtl/set.c
   * utils/hbmake/hbmlang.c
     * Updated core/contrib sources to use non-legacy names:
       HB_CLRSTR_LEN, HB_EVALINFO, PHB_EVALINFO, HB_FHANDLE
     ; TODO: FHANDLE -> HB_FHANDLE is incomplete yet.

   * include/hbdefs.h
     * Minor formatting.

   * include/hbmath.h
     ! #include <hbmath.ch> -> #include "hbmath.ch"

   * contrib/hbmysql/mysql.c
     + function SQLFETCHR() updated to allow fetching binary (BLOB) 
       fields. [Thanks to Mitja Podgornik]

   * include/hbapifs.h
   * include/hbapigt.h
   * include/hbapiitm.h
   * include/hbdefs.h
   * include/item.api
   * include/filesys.api
   * include/gt.api
     * FHANDLE      -> HB_FHANDLE
     * EVALINFO     -> HB_EVALINFO
     * PEVALINFO    -> PHB_EVALINFO
     * EVALINFO_PTR -> marked as legacy
     * CLR_STRLEN   -> HB_CLRSTR_LEN
     ; Old names are still working if HB_LEGACY_LEVEL 
       is #defined, and by default now it is.
     ; It's highly recommended to change all 3rd party and 
       app C code to use the new #defines/types/functions.
     ; NOTE1: There are some more names which are still 
              in the legacy "namespace", and gradually 
              I'd like to clean some of these as well. The most 
              important would be the type names, as these 
              are currently colliding with multiple external 
              packages, like windows.h, and it also makes it 
              impossible to compile hbfimage on certain systems.
     ; NOTE2: I'd also like to move the *_PTR (like HB_ITEM_PTR) 
              names to legacy status as we don't really use 
              them except in a few VM files, and we have PHB_* 
              as a wide-spread (and shorter) replacement.
     ; NOTE3: We may also use HB_LEGACY_LEVEL to obolete other 
              legacy or unsafe functions, with better new 
              alternatives.
     ; NOTE4: Here's a more or less complete list of names 
              that _may_ cause such problems:
              ; Type related stuff
                - TRUE, FALSE
                - BOOL, BYTE, SCHAR, UINT, USHORT
                - INT_MAX, INT_MIN
                - INT16, INT16_MAX, INT16_MIN
                - INT24_MAX, INT24_MIN
                - INT32, INT32_MAX, INT32_MIN
                - INT64, INT64_MAX, INT64_MIN
                - LONG, LONG_MAX, LONG_MIN
                - LONGLONG, LONGLONG_MAX, LONGLONG_MIN
                - SHORT, SHRT_MAX, SHRT_MIN
                - UCHAR, UCHAR_MAX
                - UINT16, UINT16_MAX
                - UINT24_MAX
                - UINT32, UINT32_MAX
                - UINT64, UINT64_MAX
                - ULONG, ULONG_MAX
                - ULONGLONG, ULONGLONG_MAX
                - assert()
              ; Some hacks currently used:
                - HB_DONT_DEFINE_BASIC_TYPES
                - HB_DONT_DEFINE_BOOL
                - HB_OS_WIN_32_USED ->
                  (include <windows.h> locally where needed)
              ; Compiler related stuff:
                - VS_*, VU_*, VT_*, FUN_*
                - *COMDECLARED, *COMCLASS, *COMSYMBOL
                - VAR, PVAR
                - _FUNC, PFUNCTION
                - _INLINE, PINLINE
                - _FUNCALL, PFUNCALL
                - _EXTERN, PEXTERN
                - AUTOOPEN, PAUTOOPEN
                - FUNCTIONS
                - INLINES
                - FUNCALLS
                - SYMBOLS
              ; Clipper compatibility #defines,
                better be moved behind a compatibility layer:
                - F_ERROR, FS_ERROR
                - IS*()
                - E_*, EF_*
                - FL_*, FLX_*, FO_*, FXO_*
                - _B_*
                - FC_*, FS_*, FD_*
                - INKEY_*, K_*
                - ES_*, EG_*
                - SC_*
                - DBS_*
              ; + All RDD related stuff, including "dbinfo.ch" constants.
2008-08-21 09:12:17 +00:00
Viktor Szakats
ef0acc114a Removed TODOs 2008-08-19 15:22:50 +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
Viktor Szakats
56e978010a 2008-08-17 17:30 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* include/hbstack.h
   * include/hbsetup.h
   * include/hbapi.h
   * source/rtl/filesys.c
   * contrib/gtwvg/tests/demowvg.prg
   * contrib/hbct/tests/ctwtest.prg
   * contrib/hbgd/ChangeLog
   * contrib/hbodbc/sql.ch
   * contrib/rddads/ads.ch
   * contrib/rddads/ads1.c
     ! Some more filename casing related cleanups.
2008-08-17 15:48:25 +00:00
Viktor Szakats
097ae961f2 2008-08-17 17:00 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* contrib/examples/guestbk/guestbk.ini
   * contrib/examples/guestbk/testcgi.prg
   * contrib/examples/hscript/hscript.prg
   * contrib/examples/pp/hbppdef.h
   * contrib/examples/pp/hbpptbl.c
   * contrib/gtwvg/tests/demowvg.prg
   * contrib/gtwvg/wvgclass.prg
   * contrib/hbapollo/tests/apollo.prg
   * contrib/hbgd/ChangeLog
   * contrib/hbgt/doc/gendoc.bat
   * contrib/hbmisc/doc/gendoc.bat
   * contrib/hbvpdf/hbvpdf.prg
   * contrib/hbvpdf/hbvpdft.prg
   * contrib/hbwhat32/_winclpb.c
   * contrib/hbwhat32/_windate.c
   * contrib/hbwhat32/_windc.c
   * contrib/hbwhat32/_windir.c
   * contrib/hbwhat32/_windraw.c
   * contrib/hbwhat32/_wingdi.c
   * contrib/hbwhat32/_winmisc.c
   * contrib/hbwhat32/_winpen.c
   * contrib/hbwhat32/_winprn.c
   * contrib/hbwhat32/_winrect.c
   * contrib/hbwhat32/_winrgn.c
   * contrib/hbwhat32/_winsock.c
   * contrib/hbwhat32/_wintbar.c
   * contrib/hbwhat32/import.ch
   * contrib/hbwhat32/sqltypes.ch
   * contrib/hbwhat32/windebug.prg
   * contrib/hbwhat32/winerror.prg
   * contrib/hbwhat32/winini.prg
   * contrib/hbwhat32/winrbar.prg
   * contrib/hbwhat32/winstruc.ch
   * contrib/hbwhat32/wintbar.prg
   * contrib/hbziparch/hbziparc.c
   * contrib/rddads/doc/gendoc.bat
   * doc/cmdline.txt
   * doc/dirstruc.txt
   * doc/en/cmdline.txt
   * doc/en/dbstrux.txt
   * doc/en/dir.txt
   * doc/en/file.txt
   * doc/en/rddord.txt
   * doc/es/dbstrux.txt
   * doc/es/file.txt
   * doc/es/hbpplib.txt
   * doc/howtomak.txt
   * doc/hrb_faq.txt
   * doc/windll.txt
   * include/dbinfo.ch
   * source/debug/dbghelp.prg
   * source/vm/classes.c
   * source/vm/hvm.c
   * tests/keywords.ch
   * tests/output.prg
   * tests/statics1.prg
   * tests/statics2.prg
   * tests/test_all.prg
   * tests/testcgi.prg
   * tests/testpre.prg
   * tests/testrdd2.prg
   * utils/hbmake/hbmake.prg
   * utils/hbmake/hbmutils.prg
     ! Some filename casing related fixes, cleanups.
     * Some non-ASCII drawing chars in comments changed to ASCII ones.
2008-08-17 15:04:11 +00:00
Viktor Szakats
01630ab48c 2008-08-17 09:48 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* include/hbapirdd.h
   * include/hbsetup.h
     + Added the most commonly used old #defines for compatibility:
       - HARBOUR_MAX_RDD_DRIVERNAME_LENGTH
       - HARBOUR_MAX_RDD_ALIAS_LENGTH
       - OS_UNIX_COMPATIBLE
       - OS_PATH_DELIMITER
       Please try not to use these anymore, as they will be removed 
       in version 1.1.
2008-08-17 07:48:39 +00:00
Viktor Szakats
3a41ed1d2b 2008-08-17 08:59 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* doc/dirstruc.txt
     * Updated to reflect current state. [Chen Kedem]

   * contrib/examples/pp/hbppcore.c
   * contrib/examples/pp/pp.c
   * contrib/hbct/disk.c
   * contrib/hbct/files.c
   * contrib/hbnf/getenvrn.c
   * contrib/hbw32/tprinter.c
   * contrib/hbziparch/hbxdirec.c
   * contrib/hbziparch/hbziparc.c
   * contrib/rddads/ads1.c
   * contrib/rddads/adsfunc.c
   * doc/en/terminal.txt
   * include/hb_io.h
   * include/hbapifs.h
   * include/hbapirdd.h
   * include/hbdefs.h
   * include/hbsetup.h
   * include/hbwince.h
   * source/common/hbfsapi.c
   * source/compiler/gencobj.c
   * source/compiler/hbcomp.c
   * source/compiler/hbusage.c
   * source/debug/dbgentry.c
   * source/main/harbour.c
   * source/pp/hbpp.c
   * source/pp/ppcore.c
   * source/rdd/dbcmd.c
   * source/rdd/dbf1.c
   * source/rdd/delim1.c
   * source/rdd/sdf1.c
   * source/rdd/usrrdd/usrrdd.c
   * source/rdd/wacore.c
   * source/rdd/wafunc.c
   * source/rdd/workarea.c
   * source/rtl/console.c
   * source/rtl/copyfile.c
   * source/rtl/defpath.c
   * source/rtl/direct.c
   * source/rtl/disksphb.c
   * source/rtl/file.c
   * source/rtl/filesys.c
   * source/rtl/fssize.c
   * source/rtl/fstemp.c
   * source/rtl/gtos2/gtos2.c
   * source/rtl/gtpca/gtpca.c
   * source/rtl/gtstd/gtstd.c
   * source/rtl/gttrm/gttrm.c
   * source/rtl/hbffind.c
   * source/rtl/hbinet.c
   * source/rtl/memofile.c
   * source/rtl/philes.c
   * source/rtl/seconds.c
   * source/rtl/set.c
   * source/vm/hvm.c
   * source/vm/main.c
     * Changed some macros to be in the HB_ namespace, to be 
       possibly shorter, more unified and clearer.
       OS_UNIX_COMPATIBLE                -> HB_OS_UNIX_COMPATIBLE
       OS_PATH_LIST_SEPARATOR            -> HB_OS_PATH_LIST_SEP_CHR
       OS_PATH_DELIMITER                 -> HB_OS_PATH_DELIM_CHR
       OS_PATH_DELIMITER_STRING          -> HB_OS_PATH_DELIM_STR
       OS_PATH_DELIMITER_LIST            -> HB_OS_PATH_DELIM_LIST
       OS_FILE_MASK                      -> HB_OS_ALLFILE_MASK
       OS_DRIVE_DELIMITER                -> HB_OS_DRIVE_DELIM_CHR
       OS_HAS_DRIVE_LETTER               -> HB_OS_HAS_DRIVE_LETTER
       OS_OPT_DELIMITER_LIST             -> HB_OS_OPT_DELIM_LIST
       OS_EOL_LEN                        -> HB_OS_EOL_LEN
       HARBOUR_GCC_OS2                   -> HB_OS_OS2_GCC
       HARBOUR_START_PROCEDURE           -> HB_START_PROCEDURE
       HARBOUR_MAIN_STD                  -> HB_MAIN_STD
       HARBOUR_MAIN_WIN                  -> HB_MAIN_WIN
       HARBOUR_MAX_RDD_DRIVERNAME_LENGTH -> HB_RDD_MAX_DRIVERNAME_LEN
       HARBOUR_MAX_RDD_ALIAS_LENGTH      -> HB_RDD_MAX_ALIAS_LEN
       HARBOUR_MAX_RDD_AREA_NUM          -> HB_RDD_MAX_AREA_NUM
     ; INCOMPATIBLE change, please update your sources, a simple 
       case-sensitive search and replace on .c/.cpp/.h/.hpp files 
       will be enough for most sources.
2008-08-17 07:39:25 +00:00
Viktor Szakats
6bfdf01a17 2008-08-16 16:16 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* make_b32.mak
   * make_gcc.mak
   * make_vc.mak
   * make_vcce.mak
   * include/hbdefs.h
   * source/vm/mainwin.c
   * source/vm/hvm.c
   * source/hbpcre/_hbconf.h
   * source/hbzlib/ChangeLog
   * source/hbzlib/zconf.h
   * utils/hbmake/hbmake.prg
     * __EXPORT__ -> HB_DYNLIB
2008-08-16 14:23:37 +00:00
Viktor Szakats
3c38398a5d 2008-08-16 02:19 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* contrib/hbmzip/hbmzip.c
     ! Fixed potential GPF in executable type detection.
       Fixes GCC 4.3.1 warnings in openSUSE 11.

   * tests/debugtst.prg
   * tests/funcarr.prg
   * tests/inherit.prg
   * tests/objarr.prg
   * tests/objasign.prg
   * doc/en/hvm.txt
   * doc/es/hvm.txt
   * include/hbextern.ch
   * source/vm/debug.c
   * source/vm/hvm.c
   * source/debug/dbgtobj.prg
   * source/debug/debugger.prg
   * source/rtl/altd.prg
     * Harbour level HB_DBG_*() functions renamed to __DBG*() to 
       reflect their internal nature.
     - Removed old __VM*() synonyms to Harbour level __DBG*() functions.
       INCOMPATIBLE.
     ! Fixed a few minor doc bugs along the way.
2008-08-16 00:21:13 +00:00