Commit Graph

77 Commits

Author SHA1 Message Date
Viktor Szakats
53093e704f 2010-07-08 09:24 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/vm/macro.c
  * src/vm/hashes.c
  * src/vm/itemapi.c
  * src/vm/hvm.c
  * src/vm/arrays.c
  * src/vm/extend.c
  * src/common/expropt1.c
  * src/common/expropt2.c
  * src/rtl/hbgtcore.c
  * src/compiler/hbmain.c
  * include/hbgtcore.h
  * include/hbmacro.h
  * include/hbapi.h
  * include/hbapiitm.h
  * include/hbvm.h
  * include/hbcomp.h
  * include/hbexprop.h
    * Variable name cleanups.
    * Corrections/completions in declarations.
2010-07-08 07:24:58 +00:00
Viktor Szakats
14122cb345 2010-07-07 15:40 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/vm/extend.c
  * include/hbapicdp.h
  * include/hbstack.h
  * include/hbgtcore.h
  * include/hbapifs.h
  * include/hbxvm.h
  * include/hbdefs.h
  * include/hbmacro.h
  * include/hbapi.h
  * include/hbapiitm.h
  * include/hbcomp.h
  * include/hbsxfunc.h
  * include/hbexprop.h
  * include/hbapigt.h
  * include/hbhash.h
  * include/hbregex.h
    * HB_SIZE/HB_ISIZ/some HB_MAXINT variables renamed.
2010-07-07 13:42:39 +00:00
Viktor Szakats
0c2f806800 2010-06-19 14:12 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/vm/itemapi.c
  * src/vm/arrays.c
  * src/vm/extend.c
  * include/hbapi.h
  * include/hbapiitm.h
    * Changed new size API calls to use HB_ISIZ instead of HB_SIZE.
      This is required until we switch HB_SIZE to be signed value,
      and to not step backwards plus keep signedness compatibility
      with 'long' API calls.

  * contrib/xhb/xhbhasha.c
  * contrib/hbcurl/hbcurl.c
    + Using size API.

  * contrib/xhb/xhbhasha.c
    ! HAAGETREALPOS(): Fixed return value to be numeric.
2010-06-19 12:15:22 +00:00
Viktor Szakats
f798129d72 2010-06-19 13:41 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* include/hbapi.h
  * include/hbapiitm.h
  * src/vm/itemapi.c
  * src/vm/arrays.c
  * src/vm/extend.c
    + Added hb_storvns().
    + Added hb_parvns().
    ; TOFIX: hb_itemPutNS() gives these (not quite unexpected) mingw warnings:
             ---
             itemapi.c:993:8: warning: comparison between signed and unsigned integer expressions
             itemapi.c:998:38: warning: comparison between signed and unsigned integer expressions
             itemapi.c:1004:35: warning: comparison between signed and unsigned integer expressions
             itemapi.c:1004:7: warning: comparison is always false due to limited range of data type
             ---

  * src/rtl/philes.c
  * src/rtl/mlcfunc.c
  * src/rtl/rat.c
    + Using size APIs.
    % Also deleting '( HB_SIZE )' casts along the way.

  * src/rtl/oemansi.c
    ! Cast to make Win64 happy. Quite interesting that almost no
      Windows API don't support proper 64-bit strings, so here
      Windows will be the limitation, not Harbour.
2010-06-19 11:49:23 +00:00
Viktor Szakats
8866af5c97 2010-06-19 13:10 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/vm/arrayshb.c
  * src/rtl/replic.c
  * src/rtl/padr.c
  * src/rtl/padc.c
  * src/rtl/len.c
  * src/rtl/padl.c
  * src/rtl/right.c
  * src/rtl/left.c
  * src/rtl/space.c
  * contrib/xhb/xhbat.c
  * contrib/xhb/xhbarr.c
    + Started to use size APIs. Quite random, just to test the
      feeling. Converted functions can properly handle > 4GB
      strings and no. of array elements in .prg code.
      (on Win64)

  * include/hbapiitm.h
    ! Missed to do the renaming in declaration.
2010-06-19 11:18:10 +00:00
Viktor Szakats
23dd5b134d 2010-06-19 09:52 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/vm/runner.c
    ! Minor to prev.

  * include/hbapi.h
  * src/vm/extend.c
    + Added hb_parnsize(), hb_retnsize(), hb_stornsize() functions.
    ; NOTE: These should be used in place of hb_parnl(), hb_retnl(),
            hb_stornl() when passing HB_SIZE types.
    ; TODO: Use them all accross Harbour if they are correct and
            after being finalized.

  * src/vm/itemapi.c
    + Added hb_itemGetNSize(), hb_itemPutNSize() functions.
    * DATETIME stuff in hb_itemGetNL() marked as HB_LEGACY_LEVEL3.
    ; QUESTION: It's marked as to be deleted in the TODO, so maybe we should
                rather delete it.

  * include/hbapiitm.h
  * src/rtl/filesys.c
    + hb_fsReadAt(), hb_fsWriteAt(): Added support for Win64 HB_SIZE.
    ; QUESTION: I assume these functions have the purpose of being
                atomic seek + read without moving the file pointer,
                which means current modification isn't safe. How
                can this be solved given Windows doesn't seem to have
                64-bit read/write API calls?
    ! Fixed old copy-paste typos in Windows OVERLAPPED initialization,
      where the lines were ended with command instead of semicolon,
      they didn't cause any harm though in their former location.
    % Reverted a minor change from prev commit to make it
      possibly a little bit faster, like it was before.

  * src/rtl/hbzlib.c
    + Added casts (at external interface calls) and other fixes to
      make it build for Win64 without warnings.

  * src/rdd/dbfntx/dbfntx1.c
  * src/rdd/dbfnsx/dbfnsx1.c
  * src/rdd/dbfcdx/dbfcdx1.c
  * src/rdd/dbffpt/dbffpt1.c
  * contrib/rddbmcdx/bmdbfcdx.c
    * HB_ULONG -> HB_SIZE where appropriate to avoid Win64 errors
      and some warnings. I'm still not comfortable to touch this
      code, but it could certainly need a type cleanup.

  * include/hbdefs.h
    + Added HB_PFS macro which holds the printf() format string
      for HB_SIZE value.
    ; TODO: Use it all accross Harbour.

  * contrib/hbmysql/mysql.c
  * contrib/sddmy/sddmy.c
  * contrib/hbmzip/hbmzip.c
  * contrib/hbcurl/hbcurl.c
  * contrib/hbhpdf/harupdf.c
  * contrib/hbpgsql/postgres.c
  * contrib/rddads/adsfunc.c
  * contrib/rddads/ads1.c
  * contrib/hbfimage/fi_wrp.c
  * contrib/sddodbc/sddodbc.c
  * contrib/hbgd/gdwrp.c
  * contrib/hbwin/wapi_wingdi.c
  * contrib/hbwin/wapi_winbase.c
  * contrib/hbwin/wapi_winuser.c
  * contrib/hbwin/win_bmp.c
  * contrib/hbwin/win_prn1.c
  * contrib/hbwin/win_regc.c
  * contrib/hbssl/evpciph.c
  * contrib/hbssl/ssl.c
  * contrib/hbssl/bio.c
  * contrib/hbssl/sslctx.c
  * contrib/hbssl/evpenc.c
  * contrib/hbssl/pem.c
  * contrib/hbssl/rand.c
  * contrib/hbssl/evp.c
    + Added necessary casts at external component boundaries to
      make Win64 builds warning-free.

  * contrib/hbct/ctstrfil.c
    + HB_ISIZ -> HB_FOFFSET, hb_fsSeek() usage, other type cleanup
      to handle file offsets correctly.

  * contrib/xhb/hbnxs.h
  * contrib/xhb/hbcrypt.c
    ! Fixed warnings for Win64.

  * contrib/hbwin/win_prn3.c
  * contrib/xhb/dbf2txt.c
  * contrib/xhb/fparse.c
    * int -> HB_ISIZ for Win64.

  * contrib/xhb/freadlin.c
    * hb_fsSeek() -> hb_fsSeekLarge().

  * contrib/sddfb/sddfb.c
    * Minor type cleanup to make Win64 warning-free.

  * contrib/hbsqlit3/hbsqlit3.c
    + Added necessary casts at external interface calls.
    % Deleted one dummy operation from SQLITE3_FILE_TO_BUFF().

  * contrib/rddsql/sqlmix.c
  * contrib/rddads/adsx.c
    * HB_ULONG -> HB_SIZE.

  * contrib/gtwvg/gtwvg.c
  * contrib/gtwvg/wvggui.c
  * contrib/gtwvg/wvgcuig.c
  * contrib/gtwvg/wvgwin.c
  * contrib/gtwvg/wvgutils.c
  * contrib/gtwvg/wvgcore.c
    ! int -> HB_ISIZ/HB_SIZE
    + Added necessary casts at external component boundaries to
      make Win64 warning-free.

  * contrib/rddads/ads1.c
    * HB_ULONG -> HB_SIZE

  * contrib/hbtip/utils.c
    * int -> HB_ISIZ
    ! Fixed to use HB_FOFFSET type to save/restore file position.

  * ChangeLog
    + Added missing item to previous log entry:
      ! Fixed hb_fsCurDirBuff() for Win64.

  ; It's quite large commit, nevertheless I'd highly appreciate
    peer review, and certainly there will be places which need
    better or different solution for Win64.
2010-06-19 08:05:24 +00:00
Viktor Szakats
2fa7ba29cf 2010-06-03 16:43 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* package/winuni/mpkg_win_uni.nsi
    * 2.0 -> 2.1

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

  * include/rdd.api
  * include/clipdefs.h
    + Permanently enabled HB_LEGACY_LEVEL2 related changes.

  * contrib/xhb/bkgtsks.c
    - Deleted HB_OS_WIN_USED. It wasn't used.

  * include/hbapi.h
  * src/vm/cmdarg.c
    * hb_winmainArgGet() changed to not use Windows types.
      This function is declared in hbapi.h and this header
      shouldn't depend on windows.h.

  * include/hbwince.h
  * include/hbsetup.h
    * HB_OS_HAS_DRIVE_LETTER is now configured in central
      place (hbsetup.h) for WinCE platform also.

  * include/hbwince.h
  * include/hbdefs.h
    * Windows (CE and not-CE) specific declarations moved from
      hbwince.h to hbdefs.h.

  * include/hbdefs.h
    % hbwince.h inclusion now better guarded to not include it
      for non WinCE platforms.
    + HB_OS_WIN_USED macro will now autodetected by checking
      whether windows.h was included before this header.
      This is required for hbwince.h. I don't like it, since
      hbapi.h still depends on windows.h for WinCE platform, 
      which still ties us to unnecessary windows.h inclusion 
      rules. Rather, hbwince.h should be included directly
      by .c files when needed and when HB_OS_WIN_CE is defined.
      After all this our little Windows API implementation 
      for compilers which need it.

  * include/hbdefs.h
  * include/hbwmain.c
    + hb_winmainArgInit() declaration moved to hbwmain.c, the
      only place where this is used.
    * Deleted HB_EXPORT from hb_winmainArgInit. Pls speak up if
      this is wrong. It's possible to move this back to hbdefs.h,
      but parameter types should be changed to ANSI ones.

  * contrib/gtwvg/gtwvg.c
  * contrib/gtwvg/gtwvg.h
  * contrib/gtwvg/wvggui.c
  * contrib/gtwvg/wvgcuig.c
  * contrib/gtwvg/wvggui.h
  * contrib/gtwvg/wvgwin.c
  * contrib/gtwvg/wvgutils.c
  * contrib/gtwvg/wvgcore.c
  * contrib/gtwvg/wvgwing.c
    - Deleted HB_OS_WIN_USED. Now it should work without it.
      windows.h was already included in non-official method, so
      it's now okay also.
2010-02-09 01:13:25 +00:00
Viktor Szakats
b1cd0953df 2010-02-08 22:49 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/pp/ppcore.c
  * src/pp/hbpp.c
  * src/vm/macro.c
  * src/vm/runner.c
  * src/vm/estack.c
  * src/vm/itemapi.c
  * src/vm/hvm.c
  * src/vm/cmdarg.c
  * src/vm/maindllp.c
  * src/vm/fm.c
  * src/vm/thread.c
  * src/vm/memvars.c
  * src/vm/eval.c
  * src/vm/extend.c
  * src/vm/classes.c
  * src/debug/dbgentry.c
  * src/common/expropt1.c
  * src/common/expropt2.c
  * src/common/hbhash.c
  * src/nortl/nortl.c
  * src/macro/macrolex.c
  * src/rtl/gtxwc/gtxwc.c
  * src/rtl/gtstd/gtstd.c
  * src/rtl/gtcgi/gtcgi.c
  * src/rtl/errapi.c
  * src/rtl/hbprocfn.c
  * src/rtl/hbsocket.c
  * src/rtl/gtpca/gtpca.c
  * src/rtl/filebuf.c
  * src/rtl/hbproces.c
  * src/rdd/dbfntx/dbfntx1.c
  * src/rdd/dbsql.c
  * src/rdd/hbdbsort.c
  * src/rdd/workarea.c
  * src/rdd/wacore.c
  * src/rdd/sdf1.c
  * src/rdd/dbcmdx.c
  * src/rdd/dbfnsx/dbfnsx1.c
  * src/rdd/dbcmd.c
  * src/rdd/dbfcdx/dbfcdx1.c
  * src/rdd/delim1.c
  * src/rdd/dbf1.c
  * src/rdd/hsx/hsx.c
  * src/rdd/usrrdd/usrrdd.c
  * src/rdd/wafunc.c
  * src/rdd/dbffpt/dbffpt1.c
  * src/rdd/hbsix/sxord.c
  * src/rdd/hbsix/sxfname.c
  * src/rdd/hbsix/sxtable.c
  * src/rdd/hbsix/sxutil.c
  * src/rdd/hbsix/sxcrypt.c
  * src/compiler/ppcomp.c
  * src/compiler/hbmain.c
  * src/compiler/compi18n.c
  * src/compiler/cmdcheck.c
  * src/compiler/hbdbginf.c
  * src/compiler/hbpcode.c
  * src/compiler/genhrb.c
  * src/compiler/hbdead.c
  * src/compiler/complex.c
  * src/compiler/genobj32.c
  * src/compiler/genc.c
  * src/compiler/hbopt.c
  * src/compiler/hbident.c
  * src/compiler/gencc.c
  * src/compiler/hbcmplib.c
  * src/compiler/hblbl.c
  * src/compiler/harbour.yyc
  * src/compiler/harbour.y
  * include/hbpp.h
  * include/hbrdddbf.h
  * include/hbvmpub.h
  * include/hbrddnsx.h
  * include/hbstack.h
  * include/hbgtcore.h
  * include/hbapifs.h
  * include/hbthread.h
  * include/hbdefs.h
  * include/hbmacro.h
  * include/hbinit.h
  * include/hbtypes.h
  * include/hbrddsdf.h
  * include/hbapi.h
  * include/hbapiitm.h
  * include/hbrddntx.h
  * include/hbvm.h
  * include/hbapidbg.h
  * include/hbcomp.h
  * include/hbapirdd.h
  * include/hbcompdf.h
  * include/hbrdddel.h
  * include/hbexpra.c
  * include/hbexprop.h
  * include/hbrddcdx.h
  * include/hbapicls.h
  * include/hbapierr.h
  * include/hbrddfpt.h
  * include/hbhash.h
  * include/hbregex.h
  * include/hbexprb.c
  * contrib/hbct/screen2.c
  * contrib/hbct/token2.c
  * contrib/hbct/dbftools.c
  * contrib/hbct/atadjust.c
  * contrib/hbct/ctwin.c
  * contrib/hbct/files.c
  * contrib/hbct/dattime3.c
  * contrib/hbct/ctstr.c
  * contrib/hbct/screen1.c
  * contrib/hbct/token1.c
  * contrib/hbct/ctc.c
  * contrib/hbct/ct.h
  * contrib/hbct/atnum.c
  * contrib/hbct/asciisum.c
  * contrib/hbct/numat.c
  * contrib/hbct/atrepl.c
  * contrib/xhb/bkgtsks.c
  * contrib/xhb/hbcrypt.c
  * contrib/xhb/fparse.c
  * contrib/xhb/datesxhb.c
  * contrib/xhb/hbnxs.h
  * contrib/hbqt/gtqtc/gtqtc.cpp
  * contrib/xpp/dbcmdx.c
  * contrib/hbnf/dispc.c
  * contrib/hbnf/ftattr.c
  * contrib/hbmemio/memio.c
  * contrib/hbnetio/netiocli.c
  * contrib/rddsql/sddmy/mysqldd.c
  * contrib/rddsql/sddpg/pgsqldd.c
  * contrib/rddsql/sddfb/fbirddd.c
  * contrib/rddsql/sddodbc/odbcdd.c
  * contrib/rddsql/hbrddsql.h
  * contrib/rddsql/sqlbase.c
  * contrib/rddsql/sqlmix.c
  * contrib/rddads/adsx.c
  * contrib/rddads/adsfunc.c
  * contrib/rddads/rddads.h
  * contrib/rddads/ads1.c
  * contrib/rddads/adsmgmnt.c
  * contrib/hbmisc/spd.c
  * contrib/hbtip/utils.c
  * contrib/hbtip/encmthd.c
  * contrib/hbbmcdx/bmdbfcdx.c
  * contrib/hbbmcdx/hbbmcdx.h
  * contrib/hbbtree/hb_btree.h
  * contrib/hbbtree/hb_btree.c
    * ULONG -> HB_ULONG, HB_SIZE
      (except for external (OS) API specific usage)
    * Formatting.

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

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

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

    ; TODO:
          - Verify with grep script
          - Verify with HB_USER_CFLAGS=-DHB_LEGACY_TYPES_OFF
          - Make HB_LEGACY_TYPES_OFF default for Harbour builds.
          - Tie HB_LEGACY_TYPES_OFF to HB_LEGACY_LEVEL3
          - Replace current windows.h inclusion hack with regular method
          - Delete hacks dealing with former type chaos:
               HB_CLIPPER_INT_ITEMS, HB_DONT_DEFINE_BASIC_TYPES, HB_DONT_DEFINE_BOOL, HB_DONT_DEFINE_BYTE, HB_DONT_DEFINE_LONG
          - Retest hbfimage on *nix, delete hacks
          - Normalize HB_BYTE vs. HB_UCHAR usage
          - Type cleanups, f.e. HB_SIZE vs. HB_ULONG
          - Add new special types (see above)
          - Switch HB_SIZE to signed (big project), and delete HB_ISIZ afterwards.
2010-02-08 21:52:47 +00:00
Viktor Szakats
6d2c565fc1 2010-02-07 14:30 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/pp/ppcore.c
  * src/pp/hbpp.c
  * src/vm/macro.c
  * src/vm/evalhb.c
  * src/vm/runner.c
  * src/vm/estack.c
  * src/vm/codebloc.c
  * src/vm/dynsym.c
  * src/vm/garbage.c
  * src/vm/itemapi.c
  * src/vm/hvm.c
  * src/vm/pvalue.c
  * src/vm/maindllp.c
  * src/vm/arrays.c
  * src/vm/fm.c
  * src/vm/extrap.c
  * src/vm/proc.c
  * src/vm/thread.c
  * src/vm/memvars.c
  * src/vm/vm.c
  * src/vm/eval.c
  * src/vm/dynlibhb.c
  * src/vm/classes.c
  * src/common/hbffind.c
  * src/common/expropt1.c
  * src/common/expropt2.c
  * src/nortl/nortl.c
  * src/rtl/gtdos/gtdos.c
  * src/rtl/fscopy.c
  * src/rtl/gtwin/gtwin.c
  * src/rtl/gtxwc/gtxwc.h
  * src/rtl/gtxwc/gtxwc.c
  * src/rtl/gtcrs/gtcrs.c
  * src/rtl/philesx.c
  * src/rtl/do.c
  * src/rtl/gtstd/gtstd.c
  * src/rtl/gttrm/gttrm.c
  * src/rtl/xhelp.c
  * src/rtl/transfrm.c
  * src/rtl/fserr.c
  * src/rtl/gtcgi/gtcgi.c
  * src/rtl/errapi.c
  * src/rtl/copyfile.c
  * src/rtl/errintlo.c
  * src/rtl/gtapi.c
  * src/rtl/filesys.c
  * src/rtl/console.c
  * src/rtl/spfiles.c
  * src/rtl/gtos2/gtos2.c
  * src/rtl/philes.c
  * src/rtl/hbgtcore.c
  * src/rtl/itemseri.c
  * src/rtl/gtsln/mousesln.c
  * src/rtl/gtsln/gtsln.c
  * src/rtl/gtsln/kbsln.c
  * src/rtl/disksphb.c
  * src/rtl/gtpca/gtpca.c
  * src/rtl/trace.c
  * src/rtl/gt_tpl/gt_tpl.c
  * src/rtl/filebuf.c
  * src/rdd/dbfntx/dbfntx1.c
  * src/rdd/dbsql.c
  * src/rdd/hbdbsort.c
  * src/rdd/workarea.c
  * src/rdd/wacore.c
  * src/rdd/sdf1.c
  * src/rdd/dbfnsx/dbfnsx1.c
  * src/rdd/dbcmd.c
  * src/rdd/dbfcdx/dbfcdx1.c
  * src/rdd/delim1.c
  * src/rdd/dbf1.c
  * src/rdd/hsx/hsx.c
  * src/rdd/dbcmd53.c
  * src/rdd/usrrdd/usrrdd.c
  * src/rdd/wafunc.c
  * src/rdd/dbffpt/dbffpt1.c
  * src/rdd/hbsix/sxord.c
  * src/rdd/hbsix/sxtable.c
  * src/rdd/hbsix/sxcompr.c
  * src/compiler/hbmain.c
  * src/compiler/hbfix.c
  * src/compiler/hbdead.c
  * src/compiler/genobj32.c
  * src/compiler/genc.c
  * src/compiler/hbopt.c
  * src/compiler/gencc.c
  * src/compiler/harbour.yyc
  * src/compiler/harbour.y
  * include/hbpp.h
  * include/hbrdddbf.h
  * include/hbvmpub.h
  * include/hbrddnsx.h
  * include/hbstack.h
  * include/hbgtcore.h
  * include/hbapifs.h
  * include/hbxvm.h
  * include/hbdefs.h
  * include/hbinit.h
  * include/hbtypes.h
  * include/hbrddsdf.h
  * include/hbapi.h
  * include/hbapiitm.h
  * include/hbrddntx.h
  * include/hbvm.h
  * include/hbcomp.h
  * include/hbapirdd.h
  * include/hbcompdf.h
  * include/hbrdddel.h
  * include/hbexpra.c
  * include/hbexprop.h
  * include/hbdbsort.h
  * include/hbapigt.h
  * include/hbrddcdx.h
  * include/hbapicls.h
  * include/hbapierr.h
  * include/hbrddfpt.h
  * include/hbexprb.c
  * contrib/hbct/bitnum.c
  * contrib/hbct/screen2.c
  * contrib/hbct/strdiff.c
  * contrib/hbct/token2.c
  * contrib/hbct/charonly.c
  * contrib/hbct/atadjust.c
  * contrib/hbct/ctmath.c
  * contrib/hbct/ctwin.c
  * contrib/hbct/charsort.c
  * contrib/hbct/charmix.c
  * contrib/hbct/charevod.c
  * contrib/hbct/wordrepl.c
  * contrib/hbct/charrepl.c
  * contrib/hbct/strswap.c
  * contrib/hbct/trig.c
  * contrib/hbct/charswap.c
  * contrib/hbct/charop.c
  * contrib/hbct/charone.c
  * contrib/hbct/num1.c
  * contrib/hbct/pos1.c
  * contrib/hbct/ascpos.c
  * contrib/hbct/ctstr.c
  * contrib/hbct/screen1.c
  * contrib/hbct/token1.c
  * contrib/hbct/charmirr.c
  * contrib/hbct/ctc.c
  * contrib/hbct/ctwfunc.c
  * contrib/hbct/relation.c
  * contrib/hbct/atnum.c
  * contrib/hbct/count.c
  * contrib/hbct/ctcrypt.c
  * contrib/hbct/posdiff.c
  * contrib/hbct/finan.c
  * contrib/hbct/range.c
  * contrib/hbct/addascii.c
  * contrib/hbct/ctmath2.c
  * contrib/hbct/tab.c
  * contrib/hbct/replace.c
  * contrib/hbct/asciisum.c
  * contrib/hbct/pos2.c
  * contrib/hbct/numat.c
  * contrib/hbct/atrepl.c
  * contrib/hbct/wordtoch.c
  * contrib/hbct/ctpad.c
  * contrib/hbct/print.c
  * contrib/hbct/justify.c
  * contrib/hbct/remove.c
    * USHORT -> HB_USHORT (except where BYTE was used in OS-specific context)
2010-02-08 13:52:23 +00:00
Viktor Szakats
f9336a957b 2010-02-07 16:34 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/rtl/cdpapi.c
    ! Fixed type when manually correcting 'unsigned char' to UCHAR
      to sync with declaration.

  * contrib/gtwvg/gtwvg.c
    ! Fixed wrong casts (HB_LONG instead of long)

  * src/pp/ppcore.c
  * src/vm/macro.c
  * src/vm/hashes.c
  * src/vm/itemapi.c
  * src/vm/hvm.c
  * src/vm/arrays.c
  * src/vm/task.c
  * src/vm/thread.c
  * src/vm/extend.c
  * src/common/hbwince.c
  * src/common/expropt1.c
  * src/common/hbstr.c
  * src/common/expropt2.c
  * src/common/hbdate.c
  * src/macro/macro.yyc
  * src/macro/macro.y
  * src/macro/macro.yyh
  * src/macro/macrolex.c
  * src/rtl/gttrm/gttrm.c
  * src/rtl/hbstrfmt.c
  * src/rtl/hbcrc.c
  * src/rtl/minmax.c
  * src/rtl/hbrandom.c
  * src/rtl/hbsocket.c
  * src/rtl/hbbit.c
  * src/rtl/hbgtcore.c
  * src/rtl/cputime.c
  * src/rtl/idle.c
  * src/rtl/itemseri.c
  * src/rtl/gtsln/gtsln.c
  * src/rtl/gtpca/gtpca.c
  * src/rtl/hbznet.c
  * src/rtl/hbhex.c
  * src/rtl/seconds.c
  * src/rtl/abs.c
  * src/rtl/gtwvt/gtwvt.c
  * src/rtl/hbbyte.c
  * src/rtl/val.c
  * src/rdd/dbfntx/dbfntx1.c
  * src/rdd/dbsql.c
  * src/rdd/sdf1.c
  * src/rdd/delim1.c
  * src/rdd/dbf1.c
  * src/rdd/dbffpt/dbffpt1.c
  * src/compiler/hbmain.c
  * src/compiler/complex.c
  * src/compiler/harbour.yyc
  * src/compiler/harbour.y
  * src/compiler/harbour.yyh
  * include/hbvmpub.h
  * include/hbgtcore.h
  * include/hbthread.h
  * include/hbdefs.h
  * include/hbmacro.h
  * include/hbapi.h
  * include/hbapiitm.h
  * include/hbznet.h
  * include/hbvm.h
  * include/hbcomp.h
  * include/hbcompdf.h
  * include/hbexprop.h
  * include/hbsocket.h
  * include/hbchksum.h
  * include/hbexprb.c
  * include/hbdate.h
  * contrib/hbct/bitnum.c
  * contrib/hbct/dbftools.c
  * contrib/hbct/files.c
  * contrib/hbct/disk.c
  * contrib/xhb/xhbfunc.c
  * contrib/hbcurl/hbcurl.c
  * contrib/hbnetio/netiocli.c
  * contrib/hbnetio/netiosrv.c
  * contrib/gtwvg/gtwvg.c
  * contrib/gtwvg/wvggui.c
  * contrib/gtwvg/wvgcore.c
  * contrib/rddads/ads1.c
  * contrib/hbwin/olecore.c
    * HB_LONG  -> HB_MAXINT
    * HB_ULONG -> HB_MAXUINT
2010-02-07 15:37:24 +00:00
Viktor Szakats
e2e2c4587e 2010-02-07 14:53 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/vm/itemapi.c
  * src/vm/hvm.c
  * src/vm/arrays.c
  * src/vm/extend.c
  * src/common/hbstr.c
  * src/common/hbdate.c
  * src/rdd/dbfcdx/dbfcdx1.c
  * src/compiler/gencc.c
  * tests/bldtest/bldtest.c
  * include/hbxvm.h
  * include/hbdefs.h
  * include/hbapi.h
  * include/hbapiitm.h
  * contrib/hbwin/olecore.c
  * contrib/hbbmcdx/bmdbfcdx.c
    * LONGLONG  -> HB_LONGLONG
    * ULONGLONG -> HB_ULONGLONG
2010-02-07 13:53:35 +00:00
Viktor Szakats
f435054ba7 2010-02-05 13:54 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/rtl/gttone.c
    + Using ANSI C types.
    ! ULONG -> DWORD for Windows API calls.

  * src/rtl/direct.c
    ! ULONG -> HB_FATTR

  * src/rtl/itemseri.c
  * include/hbapiitm.h
    * ULONG -> HB_SIZE

  * src/rtl/samples.c
    + Using ANSI C types. This fixes possible
      incompatibilities with original .prg implementation
      in Clipper.

  * contrib/hbhpdf/harupdf.c
    * Conversion to libharu BOOL value cleaned.

  * include/hbapicdp.h
  * utils/hbmk2/hbmk2.prg
    * Formatting.
2010-02-05 12:55:25 +00:00
Viktor Szakats
003fd7c41e 2010-01-14 18:01 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/rtl/strclear.c
    + HB_STRCLEAR() return value will now precisely inform about
      successful clear operation. Thanks to Mindaugas.

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

  * include/hbapiitm.h
  * include/hbvm.h
    + ULONG -> HB_SIZE (missed from prev)

  * contrib/hbbmcdx/bmdbfcdx.c
    ! Fixed another legacy call.
2010-01-14 12:36:49 +00:00
Przemyslaw Czerpak
12dc010686 2009-12-11 04:13 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapiitm.h
  * harbour/src/vm/classes.c
    * added new internal HVM macro

  * harbour/src/vm/thread.c
    + added new function
         hb_threadOnceInit( @<item> <value> ) -> <lInitialized>
      It assigns <value> to <item> if <item> is NIL in MT safe way so it's
      assigned only once. It's reduced but faster version of hb_threadOnce()

  * harbour/include/hbapicdp.h
    * define HB_WCHAR as wchar_t on Windows platforms for compilers which
      refuse to make conversions between types using the same base type.

  * harbour/contrib/hbwin/win_dll.c
    * code cleanup
2009-12-11 03:13:24 +00:00
Viktor Szakats
f6515c6b1d 2009-11-23 00:46 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/vm/arrays.c
  * src/debug/dbgentry.c
  * contrib/xhb/xhbarr.c
  * contrib/xhb/xhberrc.c
  * contrib/xhb/cstructc.c
    * Changed to use native Harbour API function names instead of
      xhb compatibility ones:
         hb_itemForwardValue() -> hb_itemMove()
         hb_itemPutCStatic()   -> hb_itemPutCConst()

  * contrib/hbbmcdx/bmdbfcdx.c
  * contrib/rddsql/sqlbase.c
  * contrib/rddads/adsfunc.c
  * contrib/hbwin/wce_simc.c
  * contrib/hbwin/win_prn1.c
  * contrib/hbwin/win_prn2.c
    % hb_itemNew() + hb_arrayNew() combination replaced
      with single hb_itemArrayNew() call.

  * include/hbapi.h
  * include/hbapiitm.h
    * Marked some legacy/compatibility functions with HB_LEGACY_LEVEL2.
      This means they will be deleted in next major release version:
        LEGACY/DEPRECATED        RECOMMENDED EQUIVALENT
        ----------------------   -----------------------
        hb_retcAdopt()           hb_retc_buffer()
        hb_retclenAdopt()        hb_retclen_buffer()
        hb_retcStatic()          hb_retc_const()
        hb_storclenAdopt()       hb_storclen_buffer()
        hb_itemPutCRawStatic()   hb_itemPutCLConst()
        hb_itemForwardValue()    hb_itemMove()
        hb_itemPutCStatic()      hb_itemPutCConst()
        hb_arraySetCPtr()        hb_arraySetCLPtr()

  * contrib/hbwin/win_tprn.prg
    * Minor formatting.

  * contrib/hbwin/win_osc.c
    * Using HB_BOOL.
    * Varible type notation fixed.
2009-11-22 23:46:57 +00:00
Przemyslaw Czerpak
a70ce60954 2009-10-23 09:24 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/rdd/dbfnsx/dbfnsx1.c
    ! fixed bug reported by Jaroslav Janik (many thanks) - if index FOR
      expression excluded all records from non empty table then root page
      was not initialized and DBFNSX generated corruption RTE.

  * harbour/utils/hbi18n/hbi18n.prg
    * set default GT to CGI

  * harbour/src/common/hbgete.c
    ! fixed memory leak in non UNICODE Windows hb_getenv_buffer()
    ! add C stack buffers to eliminate memory allocation in UNICODE
      Windows hb_getenv_buffer() - they are used if envvar name and
      passed buffer are not too large. It fixes HB_FM_STATISTICS
      Windows builds.

  * harbour/contrib/hbwin/wapi_winuser.c
    + added WAPI_DESTROYWINDOW function

  * harbour/contrib/xhb/traceprg.prg
  * harbour/contrib/xhb/hbcompat.ch
    ! fixed typo in TraceLog() condition - was always disabled
    + added emulation for xHarbour Set( _SET_TRACE* [, <params,...> ] )
      settings

  * harbour/src/vm/hvmall.c
    ! define _GNU_SOURCE to fix compilation with HB_FM_DL_ALLOC in Linux
      builds

  * harbour/include/hbdefs.h
    * declare HB_FOFFSET as LONG instead of LONGLONG on platforms where
      LONG is 64bit integer to be compatible with C RTL file API

  * harbour/src/vm/maindllh.c
  * harbour/src/vm/maindllp.c
  * harbour/contrib/hbct/ctstr.c
    ! casting in HB_TRACE() massages

  * harbour/include/hbapi.h
  * harbour/include/hbapiitm.h
  * harbour/src/vm/arrays.c
  * harbour/src/vm/hashes.c
  * harbour/src/vm/itemapi.c
    + added hb_arrayCloneTo(), hb_hashCloneTo(), hb_itemCloneTo()

  * harbour/src/vm/arrayshb.c
  * harbour/src/vm/classes.c
  * harbour/src/vm/hashes.c
  * harbour/src/vm/hashfunc.c
  * harbour/src/vm/hvm.c
    % use hb_*CloneTo() instead of hb_*Clone()

  * harbour/include/hbapi.h
  * harbour/src/vm/garbage.c
    - removed hb_gcRegisterSweep() function and support for user defined
      sweep mark functions in GC blocks
    - removed hb_gcAlloc() function
    + added new function hb_gcAllocate() which work in similar way to removed
      hb_gcAlloc() function but it accepts as second parameter HB_GC_FUNCS
      structure instead of HB_GARBAGE_FUNC_PTR and returned GC blocks are
      locked so programmer does not have to worry that they can be removed
      by GC.
    + added new internal function hb_gcAllocRaw() which works like
      hb_gcAllocate() but returned GC blocks are not locked. They can
      be used only in HVM in places well known that cannot activate
      automatic GC scan. It should not be used by 3-rd party code.

  * harbour/include/hbapi.h
  * harbour/include/hbapiitm.h
  * harbour/src/vm/extend.c
  * harbour/src/vm/itemapi.c
    * modified hb_parptrGC(), hb_parvptrGC(), hb_arrayGetPtrGC(),
      hb_itemGetPtrGC() functions to use HB_GC_FUNCS structure instead
      of HB_GARBAGE_FUNC_PTR
    * modified hb_itemPutPtrGC() and indirectly related functions like
      hb_arraySetPtrGC() or hb_stor[v]ptrGC() to automatically unlock
      passed GC block just after attaching to known HVM item.

  * harbour/include/hbregex.h
  * harbour/src/rtl/hbregexc.c
    * declare GC block detractor as static function
    + added hb_regexIs() function
    * updated to work with new GC API
    * removed unnecessary in new GC API hb_gcLock() call - GC blocks
      allocated by hb_gcAllocate() are already locked and they mustn't
      be locked explicitly by programmer (until he does not exactly knows
      what he does ;))

  * harbour/src/rtl/hbregex.c
    * use hb_regexIs() instead of using regex GC destructor
    * removed unnecessary in new GC API hb_gcUnlock() call - GC blocks
      stored in HB_IT_POINTER item are automatically unlocked

  * harbour/src/rtl/hbinet.c
  * harbour/contrib/hbcurl/hbcurl.c
    * updated to work with new GC API
    % unlock items storing callback codeblocks and use GC mark functions
      to mark them as used in GC passes

  * harbour/src/pp/pplib.c
  * harbour/src/vm/runner.c
  * harbour/src/vm/codebloc.c
  * harbour/src/vm/hashes.c
  * harbour/src/vm/hvm.c
  * harbour/src/vm/arrays.c
  * harbour/src/vm/thread.c
  * harbour/src/vm/dynlibhb.c
  * harbour/src/rtl/hbzlibgz.c
  * harbour/src/rtl/hbregex.c
  * harbour/src/rtl/hbregexc.c
  * harbour/src/rtl/hbgtcore.c
  * harbour/src/rtl/hbi18n1.c
  * harbour/src/rdd/wacore.c
  * harbour/contrib/hbsqlit3/hbsqlit3.c
  * harbour/contrib/hbnetio/netiosrv.c
  * harbour/contrib/hbmzip/hbmzip.c
  * harbour/contrib/hbhpdf/harupdf.c
  * harbour/contrib/hbwin/olecore.c
  * harbour/contrib/hbwin/win_prn1.c
  * harbour/contrib/hbwin/win_dll.c
    * updated code which was using hb_gcAlloc() to work with new GC API.

  * harbour/contrib/hbwin/axcore.c
    * updated syntax description

   TODO: update contrib code: hbqt, hbssl, ... to work with new GC API.
         I would like to ask authors of above libraries to do it.
   TODO: defined when and how we should free AX control and user callback
         handler and update AX code to respect new definition
2009-10-23 07:25:36 +00:00
Viktor Szakats
03caef2ec2 2009-07-02 15:48 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* include/hbcomp.h
  * include/hbcompdf.h
  * include/hbapifs.h
  * include/hbexprop.h
  * include/hbmacro.h
  * include/hbapi.h
  * include/hbapiitm.h
  * include/hbdate.h
  * source/pp/ppcore.c
  * source/vm/itemapi.c
  * source/vm/arrays.c
  * source/vm/extend.c
  * source/common/expropt1.c
  * source/rtl/philes.c
  * source/rtl/empty.c
  * source/rtl/minmax.c
  * source/rtl/dates.c
  * source/rtl/filesys.c
  * source/rdd/dbfnsx/dbfnsx1.c
  * source/rdd/dbfcdx/dbfcdx1.c
  * source/rdd/dbf1.c
  * source/rdd/dbffpt/dbffpt1.c
  * source/rdd/hbsix/sxdate.c
  * source/compiler/hbmain.c
  * source/compiler/complex.c
  * source/compiler/harbour.yyc
  * source/compiler/harbour.y
  * contrib/hbct/files.c
  * contrib/hbct/dattime2.c
  * contrib/hbct/datetime.c
  * contrib/xhb/filestat.c
  * contrib/hbtip/utils.c
  * examples/hboleold/win_ole.c
    * LONG -> long for date/time related values
      (julian, date, type, millisec)
    ; This is an effort to clean Harbour sources from
      Windows/legacy-Clipper basic types and replace
      them with own or ANSI C ones.
      In the above case, usage wasn't consistent,
      LONG and long were mixed.

  * source/main/harbour.c
  * source/vm/fm.c
    * LONG -> long for some stat counters.
2009-07-02 14:18:06 +00:00
Viktor Szakats
340fc1f1de 2009-06-25 02:58 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* INSTALL
  * make_gnu.bat
    + Added support for Cygwin builds (passes call to make_gnu.sh).
    + Added Cygwin build starter example.
    + Cygwin mentioned as a requirement for mingwarm builds,
      also added to PATH.
    ! Fixed cygwin autodetection.
    ! Fixed wrong PATH order in 'MinGW GCC + MSYS' example.
    * Merged mingw+msys and cygwin bash based build methods,
      and titled as "alternate" method.
      Now all supported compilers work by starting up make_gnu.bat.

  * utils/hbmk2/hbmk2.prg
    ! Change compiler autodetection to work for cygwin.

  * mpkg_dos.bat
  * mpkg_win.bat
  * make_gnu.bat
    ! Fixed build process to work in paths containing spaces.
      I didn't test the batch in pure DOS, so I may have broken it.

  * config/win/install.cf
  * config/wce/install.cf
    ! Fixed 'install' to work when there is a space in install path.

  * make_gnu.bat
  * INSTALL
    + Added support for HB_BUILD_LOG envvar. If set to 'yes',
      it will automatically set log output filename to:
         'log-<arch>-<comp>.txt'
      if set to 'no' it will no make any extra redirection,
      if set to any other value, it will be used for output
      (both std and err). The batch will set HB_BUILD_LOGFILE
      to the filename used for output for processing.
      This feature requires Windows NT or upper host.
      I didn't enable this feature yet by default to not break
      existing user setups, but maybe I'll do it before the
      final release.
    * Modified text shown (+ beep thrown) when build failed.
    * Messages now all start with 'Harbour'.
    * Do not do the second build pass if the first one failed.

  * contrib/hbwin/legacy.prg
    ! Fixed CreateObject() not working due to typo.
      Thanks to Itamar Lins for the report.

  * mpkg_dos.bat
  * mpkg_win.bat
  * mpkg_win.nsi
    + Enabled HB_BUILD_LOG=yes.
    * Silenced copy, zip, makensis commands.
    + Added message about failed build process.
    * Changed to use 'copy' instead of 'xcopy'
    * Changed internals so now they don't require HB_COMPILER
      and HB_ARCHITECTURE to be set. This means that now
      we can rely on autodetection even for mpkg_*.bat files.
      Creating an installer is very easy now for most cases.
      Just type:
         mpkg_gnu.bat

  * source/vm/set.c
    + Added file commit support to __MVSAVE(), if Set( _SET_HARDCOMMIT )
      is set to .T.. This is the default which means by default we aren't
      CA-Cl*pper compatible. Addition protected by HB_C52_STRICT.

  * source/rdd/dbf1.c
    ! Minor typo in comment.

  * doc/en-EN/hb_apiit.txt
  * include/hbapi.h
  * include/hbapiitm.h
  * source/vm/itemapi.c
  * source/vm/extend.c
  * source/rtl/gtwvt/gtwvt.c
  * source/rdd/dbf1.c
  * contrib/gtqtc/gtqtc.cpp
  * contrib/gtwvg/gtwvg.c
  * contrib/gtwvg/wvggui.c
  * contrib/hbwin/olecore.c
  * examples/hboleold/win_ole.c
    * Finishing long planned function renames to clear up
      a very (10 years) old naming inconsistency.
      To adapt you code to this, please do changes below:
         1) hb_itemPutCPtr() (with three parameters) -> hb_itemPutCLPtr()
         2) hb_itemPutCPtr2() -> hb_itemPutCPtr()
      Unmodified code will generate compile time errors, so it's easy
      to spot where the modifications need to be done. For most users,
      only case 1) will need to be dealt with.
    ; INCOMPATIBLE. Please update your code.

  * source/rtl/hbi18n1.c
  * source/rdd/dbfnsx/dbfnsx1.c
    * hb_itemPutCPtr() (with three parameters) -> hb_itemPutCLPtr()

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

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

   TODO: please make build tests. Especially in OS2 - not tested at all.
2009-06-26 00:33:38 +00:00
Viktor Szakats
e569ecf8b4 2009-06-24 22:36 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* include/hbapi.h
  * include/hbapiitm.h
  * source/vm/itemapi.c
  * source/vm/arrays.c
  * source/vm/extend.c
    ; Started addition of 'const' keywords where applicable.
    * First pass:
      extern HB_EXPORT const char * hb_parc( int iParam );
      extern HB_EXPORT const char * hb_parcx( int iParam );
      extern HB_EXPORT const char * hb_itemGetCPtr( PHB_ITEM pItem );
      extern HB_EXPORT const char * hb_arrayGetCPtr( PHB_ITEM pArray, ULONG ulIndex );
    ; NOTE: This modification will break code in most compilers,
            especially in C++ mode.
            As a next steps source code will have to be modified
            according to this change. Be patient, don't report all
            errors to the developers. You can join the code cleanup.

  * source/vm/dynsym.c
  * source/vm/itemapi.c
  * source/vm/arrays.c
  * source/vm/memvars.c
  * source/vm/extend.c
  * source/vm/set.c
  * source/vm/classes.c
    * 'const's added to caller code.
2009-06-24 20:37:05 +00:00
Viktor Szakats
f5904ca848 2009-06-23 19:21 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* include/hbapi.h
  * include/hbapiitm.h
  * source/vm/itemapi.c
  * source/vm/arrays.c
  * source/vm/extend.c
    * Clean alternative for: 2009-06-23 18:15 UTC+0200
      (now change is local to extend.c)
      Thanks Przemek.
2009-06-23 17:23:22 +00:00
Viktor Szakats
7de9ca92fe 2009-06-23 18:15 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* include/hbapi.h
  * include/hbapiitm.h
  * source/vm/itemapi.c
  * source/vm/arrays.c
  * source/vm/extend.c
    ! Fixed hb_parvc() function to return NULL in case an array 
      is passed as Harbour level parameter. This makes this function 
      (and _parc()) fully CA-Cl*pper compatible.
    ; Please review maybe there is a lighter patch to achieve this 
      goal. I had to add NULL versions for two functions downstream.

  * utils/hbmk2/hbmk2.prg
    * Formatting.
2009-06-23 16:16:52 +00:00
Przemyslaw Czerpak
15bd32ec79 2009-04-23 17:46 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapiitm.h
  * harbour/source/vm/itemapi.c
    * declared return value of hb_itemTypeStr() as const

  * harbour/harbour.spec
    * removed hbsqlite3 from default builds - it has to be optional due
      to external dependencies in current version
2009-04-23 15:39:27 +00:00
Przemyslaw Czerpak
26a11bd859 2009-03-21 16:07 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/bin/hb-func.sh
    ! restored default optimization flag (-O3) in hb* scripts

  * harbour/harbour.spec
    ! fixed recent modification

  * harbour/contrib/rddads/ads1.c
  * harbour/contrib/rddads/adsfunc.c
  * harbour/contrib/hbmisc/strfmt.c
  * harbour/contrib/hbcrypt/sha1.c
    ! fixed wrongly used C reference operator

  * harbour/contrib/hbwin/win_prn2.c
  * harbour/contrib/hbwin/wapi_commctrl.c
  * harbour/source/vm/maindllp.c
    ! fixes for unicode builds

  * harbour/include/std.ch
    + added SET TIME FORMAT [TO] <f>

  * harbour/include/set.ch
  * harbour/include/hbset.h
  * harbour/source/vm/set.c
    + added _SET_TIMEFORMAT
      The folowing modifiers are supported:
         hh - hours
         mm - minutes
         ss - seconds
         fff - fraction part of seconds
         p - 1-st letter from PM / AM signature. When used time is shown
             in 12 hour format otherwise 24 hour format is used
      ex: Set( __SET_TIMEFORMAT, "hh:mm pm" )
      default _SET_TIMEFORMAT value is "hh:mm:ss:fff"
    + added C function: char * hb_setGetTimeFormat( void );

  * harbour/include/hbpp.h
  * harbour/source/pp/ppcore.c
    + added support for timestamp constant values in the form:
         t"YYYY-MM-DD HH:MM:SS.fff"
      The exact accepted timestamp pattern is is:
         YYYY-MM-DD [H[H][:M[M][:S[S][.f[f[f[f]]]]]]] [PM|AM]
      i.e.:
         tValue := t"2009-03-21 5:31:45.437 PM"
      or:
         YYYY-MM-DDT[H[H][:M[M][:S[S][.f[f[f[f]]]]]]] [PM|AM]
      with literal "T" as date and time part delimiters (XML timestamp
      format), i.e.:
         tValue := t"2009-03-21T17:31:45.437"
      The folowing characters can be used as date delimiters: "-", "/", "."
      if PM or AM is used HH is in range < 1 : 12 > otherwise
      in range < 0 : 23 >

  * harbour/source/compiler/complex.c
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyc
  * harbour/source/compiler/harbour.yyh
    + added support for t"YYYY-MM-DD HH:MM:SS.fff" time stamp constant
      to compiler
    + added support for VFP datetime constant values:
         { ^ [ YYYY-MM-DD [,] ] [ HH[:MM[:SS][.FFF]] [AM|PM] ] }
      The following characters can be used as date delimiters: "-", "/".
      Dot "." as date delimiter is not supported.
      There is no limit on number of characters in YYYY, MM, DD, HH, MM,
      SS, FFF parts. Important is only their value. This is the format
      in semi PP notation:
         { ^ <YEAR> <sep:/-> <MONTH> <sep:/-> <DAY> [[<sep2:,>]
           [ <HOUR> [ : <MIN> [ : <SEC> [ . <FRAQ> ] ] ] [AM|PP] ] }
      In practice it allows to also parse xHarbour datetime constant
      values with compatible conditions though xHarbour support onlu "/"
      as date delimiter.
      NOTE: there is one important difference to VFP and xHarbour in
      decoding above format. In VFP and xHarbour when date part is
      missing then it's set by default to: 1899-12-30 so this code:
         { ^ 12:00 }
      gived the same results as:
         { ^ 1899/12/30 12:00 }
      Harbour does not set any default date value when timestamp
      constant value contains only time part.
      If you want we can change it for strict VFP compatiblity.
      Now this extension is enabled by default for testing. In the future
      it will be probably covered by HB_COMPAT_FOXPRO macro.

  * harbour/source/macro/macro.yyc
  * harbour/source/macro/macro.y
  * harbour/source/macro/macro.yyh
  * harbour/source/macro/macrolex.c
    + added support for t"YYYY-MM-DD HH:MM:SS.fff" time stamp constant
      to macro compiler

  * harbour/include/hbmacro.h
  * harbour/source/vm/macro.c
    + added new function:
      void hb_macroGenPushTimeStamp( LONG lDate, LONG lTime, HB_COMP_DECL );

  * harbour/include/hberrors.h
  * harbour/source/compiler/hbgenerr.c
    + added new compile time error: "Invalid timestamp constant '%s'"

  * harbour/source/compiler/cmdcheck.c
    * use Harbour API timestamp functions instead of calling system
      functions

  * harbour/include/hbpcode.h
  * harbour/source/compiler/hbfix.c
  * harbour/source/compiler/hbpcode.c
  * harbour/source/compiler/hbdead.c
  * harbour/source/compiler/genc.c
  * harbour/source/compiler/gencc.c
  * harbour/source/compiler/hblbl.c
  * harbour/source/compiler/hbstripl.c
  * harbour/source/compiler/hbopt.c
    + added new PCODE HB_P_PUSHTIMESTAMP (replaced one unused PCODE value)
      to store timestamp constant values in the PCODE

  * harbour/include/hbcomp.h
  * harbour/source/compiler/hbmain.c
    + added new function:
      void hb_compGenPushTimeStamp( LONG lDate, LONG lTime, HB_COMP_DECL );

  * harbour/include/hbexprop.h
  * harbour/source/common/expropt1.c
    + added new C functions:
      HB_EXPR_PTR hb_compExprNewTimeStamp( LONG, LONG, HB_COMP_DECL );

  * harbour/include/hbexprb.c
  * harbour/include/hbcompdf.h
  * harbour/source/common/expropt2.c
    + added timestamp expressions support
    + added compile time optimization for timestamp expressions
    * updated function optimization for timestamp expressions

  * harbour/include/hbdate.h
  * harbour/source/common/hbdate.c
    * changed hb_dateMilliSeconds() to return UTC julian timestamp in
      milliseconds
    * changed existing seconds, time and timestamp functions to operate
      on common OS specific functions to eliminate possible problems
      with different OS time counters
    + added new functions to operates on time and timestamp values.
      See source code for details.

  + harbour/source/rtl/cputime.c
    * moved double hb_secondsCPU( int n ) function to separate file

  * harbour/source/rtl/seconds.c
    - removed old version of date/seconds functions

  * harbour/source/vm/hashes.c
  * harbour/source/vm/arrays.c
    + added support for timestamp values as hash item indexes

  * harbour/source/vm/hashfunc.c
    + added support for find timestamp values in hash and array items
      by simple date value in AScan(), hb_HScan(), hb_AScan() and hb_RAScan()
      functions when exact comparison is not used.

  * harbour/source/vm/asort.c
    + added support for sorting timestamp values

  * harbour/source/vm/classes.c
    + added support for timestamp scallar classes
    + added support for timestamp typed instance variables

  * harbour/source/vm/memvars.c
    + added support for timestamp values in .mem files

  * harbour/source/vm/estack.c
    + show timestamp values in stack dump

  * harbour/include/hbapi.h
  * harbour/source/vm/arrays.c
    + added new C functions:
      double hb_arrayGetTD( PHB_ITEM pArray, ULONG ulIndex );
      BOOL hb_arraySetTD( PHB_ITEM pArray, ULONG ulIndex, double dTimeStamp )
      BOOL hb_arrayGetTDT( PHB_ITEM pArray, ULONG ulIndex,
                           LONG * plJulian, LONG * plMilliSec );
      BOOL hb_arraySetTDT( PHB_ITEM pArray, ULONG ulIndex,
                           LONG lJulian, LONG lMilliSec );

  * harbour/include/hbapi.h
  * harbour/source/vm/extend.c
    + accept timestamp items in date functions - use only date part of
      timestamp value
    + added new C functions:
      double hb_partd( int iParam, ... );
      BOOL hb_partdt( LONG * plJulian, LONG * plMilliSec , int iParam, ... );
      void hb_rettd( double dTimeStamp );
      void hb_rettdt( LONG lJulian, LONG lMilliSec );
      int hb_stortd( double dTimeStamp, int iParam, ... );
      int hb_stortdt( LONG lJulian, LONG lMilliSec, int iParam, ... );

  * harbour/include/hbapiitm.h
  * harbour/source/vm/itemapi.c
    + accept timestamp items in date functions - use only date part of
      timestamp value
    + added new C functions:
      char * hb_itemGetTS( PHB_ITEM pItem, char * szDateTime );
      PHB_ITEM hb_itemPutTS( PHB_ITEM pItem, const char * szDateTime );
      double hb_itemGetTD( PHB_ITEM pItem );
      PHB_ITEM hb_itemPutTD( PHB_ITEM pItem, double dTimeStamp )
      BOOL hb_itemGetTDT( PHB_ITEM pItem, LONG * plJulian, LONG * plMilliSec );
      PHB_ITEM hb_itemPutTDT( PHB_ITEM pItem, LONG lJulian, LONG lMilliSec );
    + support for timestamp items in hb_itemString(), hb_itemPadConv() and
      hb_itemTypeStr() functions

  * harbour/include/hbvm.h
  * harbour/include/hbxvm.h
  * harbour/include/hbapi.h
  * harbour/source/vm/hvm.c
    + added HB_IT_TIMESTAMP items
    * modified HB_IT_DATE internal item structure to use common structure
      with HB_IT_TIMESTAMP - it  simplifies HVM code and eliminates additional
      RT conditions.
    + added HB_IS_TIMESTAMP() and ISTIMESTAMP() macros
    + added HB_IS_DATETIME() and ISDATETIME() macros - they return true
      if item/parameter is DATE or TIMESTAMP type.
    + added void hb_vmPushTimeStamp( long lJulian, long lMilliSec );
      and xhb_vmPushTimeStamp()
    + added support for timestamp values in relational operators:
         <, <=, >, >=, =, ==
      When two timestamp values are compared then VM compares date and
      time parts in both values.
      When date and timestamp values are used in <, <=, >, >=, = operations
      then VM compares only date part in both values.
      When date and timestamp values are used in == operation then VM
      compares date part in both values and then check if time part
      of timestamp value is 0.
    + added support for timestamp values in + and - math operations.
      The following rules are used in timestamp arithmetic:
         <t> + <t> => <t>
         <t> - <t> => <n>
         <t> + <n> => <t>
         <n> + <t> => <t>
         <t> - <n> => <t>
         <d> + <t> => <t>
         <t> + <d> => <t>
         <d> - <t> => <n>
         <t> - <d> => <n>
      When number is result or argument of timestamp operation then the
      its integer part is a number of day and fractional part is the time.

  * harbour/source/rtl/dateshb.c
    + added new .prg functions to mange date and timestamp values:
      HB_DATETIME() -> <tTimeStamp>
      HB_CTOD( <cDate> [, <cDateFormat> ] ) -> <dDate>
      HB_DTOC( <dDate> [, <cDateFormat> ] ) -> <cDate>
      HB_NTOT( <nValue> ) -> <tTimeStamp>
      HB_TTON( <tTimeStamp> ) -> <nValue>
      HB_TTOC( <tTimeStamp>, [ <cDateFormat> ] [, <cTimeFormat> ] ) ->
                                                            <cTimeStamp>
      HB_CTOT( <cTimeStamp>, [ <cDateFormat> ] [, <cTimeFormat> ] ) ->
                                                            <tTimeStamp>
      HB_TTOS( <tTimeStamp> ) -> <cYYYYMMDDHHMMSSFFF>
      HB_STOT( <cDateTime> ) -> <tTimeStamp>
         <cDateTime> should be in one of the above form:
            - "YYYYMMDDHHMMSSFFF"
            - "YYYYMMDDHHMMSSFF"
            - "YYYYMMDDHHMMSSF"
            - "YYYYMMDDHHMMSS"
            - "YYYYMMDDHHMM"
            - "YYYYMMDDHH"
            - "YYYYMMDD"
            - "HHMMSSFFF"
            - "HHMMSSF"
            - "HHMMSS"
            - "HHMM"
            - "HH"
         Important is number of digits.
      HB_TSTOSTR( <tTimeStamp> ) -> <cTimeStamp> // YYYY-MM-DD HH:MM:SS.fff
      HB_STRTOTS( <cTimeStamp> ) -> <tTimeStamp>
         <cTimeStamp> should be in one of the above form:
            YYYY-MM-DD [H[H][:M[M][:S[S][.f[f[f[f]]]]]]] [PM|AM]
            YYYY-MM-DDT[H[H][:M[M][:S[S][.f[f[f[f]]]]]]] [PM|AM]
         The folowing characters can be used as date delimiters: "-", "/", "."
         T - is literal "T" - it's for XML timestamp format
         if PM or AM is used HH is in range < 1 : 12 > otherwise
         in range < 0 : 23 >
      HB_HOUR( <tTimeStamp> ) -> <nHour>
      HB_MINUTE( <tTimeStamp> ) -> <nMinute>
      HB_SEC( <tTimeStamp> ) -> <nSeconds>   // with milliseconds

  * harbour/source/rtl/datec.c
    + accept timestamp parameters in CMONTH() and CDOW() functions

  * harbour/source/rtl/empty.c
    + added support for timestamp items

  * harbour/source/rtl/itemseri.c
    + added support for timestamp items serialization

  * harbour/source/rtl/minmax.c
    + added support for timestamp values to MIN() and MAX() functions.
      when only one of given parameters is timestamp value and other
      is date value and date parts are equal then always date item
      is returned as both MIN() or MAX() value.

  * harbour/source/rtl/dates.c
    + added new C functions: hb_timeFormat(), hb_timeUnformat(),
      hb_timeStampFormat(), hb_timeStampUnformat()

  * harbour/source/rtl/valtype.c
    + added .prg functions: HB_ISDATETIME(), HB_ISTIMESTAMP()

  * harbour/source/rtl/transfrm.c
    + added support for timestamp items formatting.
    + added new function modifier @T.
      When @T is used without @D then only time part of timestamp value
      is formatted and return.
      When @D is used without @T then only date part of timestamp value
      is formatted and return.

  * harbour/source/rtl/tbrowse.prg
    + display timestamp values

  * harbour/source/rtl/philes.c
    + accept timestamp value as second parameter of HB_FSETDATETIME()
      function
    + store file data and time in second parameter of HB_FGETDATETIME()
      as timestamp value.
    Old parameters (2-dDate, 3-cTime) are still supported but please think
    about removing them - they are redundant.

  * harbour/source/rtl/filesys.c
    * updated function names


  * harbour/source/rdd/dbf1.c
    + added native support for time and timestamp fields

  * harbour/include/hbrddcdx.h
  * harbour/include/hbrddnsx.h
  * harbour/source/rdd/dbfntx/dbfntx1.c
  * harbour/source/rdd/dbfcdx/dbfcdx1.c
  * harbour/source/rdd/dbfnsx/dbfnsx1.c
  * harbour/source/rdd/dbffpt/dbffpt1.c
    + added support for indexing timestamp fields
    + added support for using DATE values with timestamp fields
      which replicate HVM behavior.
      SEEK and SEEKLAST with date value when active index is on
      timestamp positions to 1-st or last record where date part
      of indexed timesamp value is equal.
      Settings scopes to date values when active index is on timestamp
      value reduce the visible record range to these ones which have
      date part of timestamp value in the range of dates values used
      for scopes. It possible to mix date and timestamp values in scope
      and set one scope to date value and the second to timesamp.

  * harbour/source/rdd/sdf1.c
  * harbour/source/rdd/delim1.c
    + added support for exporting timestamp fields

  * harbour/source/rdd/dbsql.c
    ! fixed typo in logical value export
    + export timestamp fields.
      Please update the format to given SQL syntax.


  * harbour/contrib/hbct/files.c
    + changed SETFDATI() to optionally accept timestamp parameter
      instead of two parameters dDate and cTime

  * harbour/contrib/hbct/misc1.c
    + added timestamp support to XTOC() function

  * harbour/contrib/hbct/misc2.c
    + added timestamp support to COMPLEMENT() function

  * harbour/contrib/hbct/dattime2.c
    + accept timestamp values in ADDMONTH(), DOY(), ISLEAP(), QUARTER()
      LASTDAYOM(), WEEK() functions

  * harbour/contrib/hbmzip/hbmzip.c
    + updated HB_ZipFileCreate( hZip, cZipName, tDateTime, cTime, ... )
      functions to optionaly accept timestamp value in 3-rd parameter
      instead od dDate, and cTime in 3-rd and 4-th parameters.
    + updated HB_UnzipFileInfo( hUnzip, @cZipName, @tDateTime, @cTime, ... )
      to return timestamp value in 3-rd parameter instead of date value.
      TODO: Please think about removing 4-th parameter from:
               HB_ZipFileCreate( hZip, cZipName, tDateTime, cTime, ... )
               HB_UnzipFileInfo( hUnzip, @cZipName, @tDateTime, @cTime, ... )
            Now it's redundant.
  * harbour/contrib/hbmzip/readme.txt
    * updated parameters description for above functions

  * harbour/contrib/hbnf/descendn.c
    + added timestamp support to FT_DESCEND() function

  * harbour/contrib/hbclipsm/date.c
    + accept timestamp values in DATEASAGE(), DATEASARRAY() and DATEISLEAP()
      functions

  * harbour/contrib/hbmisc/dates2.c
    + accept timestamp values in ISLEAPYEAR(), DAYSINMONTH(), EOM(), BOM(),
      WOM(), WOY(), EOY() and BOY() functions


   The following contrib files should be updated but I'm leaving it to
   other developers who want to keep this code alive:
         contrib/hbtip/utils.c
         contrib/hbvpdf/hbvpdf.prg
         contrib/hbvpdf/hbvpdft.prg
         contrib/hbwin/win_dll.c
            some minor cleanups if necessary and authors will find
            timestamp values usable

         contrib/hbole/ole2.c
         contrib/hbwin/win_ole.c
            add support for timestamp values in OLE

         contrib/rddado/adordd.prg
         contrib/rddads/ads1.c
         contrib/rddads/adsx.c
         contrib/rddsql/...
            add support for timestamp values in RDDs

   Warning: this implementation is not xHarbour compatible. There are many
   important differences. Mostly on C level and used API. Please be careful
   in porting xHarbour source code to Harbour.
2009-03-21 15:04:43 +00:00
Viktor Szakats
897a02e44a 2009-02-10 01:39 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* doc/whatsnew.txt
  * include/clipdefs.h
  * include/filesys.api
  * include/gt.api
  * include/hbapi.h
  * include/hbapierr.h
  * include/hbapifs.h
  * include/hbapigt.h
  * include/hbapiitm.h
  * include/hbapirdd.h
  * include/hbdefs.h
  * include/hbgfxdef.ch
  * include/hbgtinfo.ch
  * include/hbsetup.ch
  * include/hbsetup.h
  * include/item.api
  * include/rdd.api
  * source/rtl/errorapi.c
  * source/rtl/filesys.c
  * source/vm/cmdarg.c
  * common.mak
  - source/vm/debugold.c
  * source/vm/Makefile
  * source/vm/vmmt/Makefile
    - Permanently disabled HB_LEGACY_LEVEL support.
    + Added HB_LEGACY_LEVEL2 support to protect some
      recently made incompatible changes. Old methods
      are supported until Harbour 1.2. Please update
      your code until then. To test your code for
      compatibility with recent changes, you can turn
      off legacy support manually by #defining HB_LEGACY_OFF.
      (HB_USER_CFLAGS=-DHB_LEGACY_OFF)
      This is recommended on local systems for all
      Harbour developers.
2009-02-10 00:47:50 +00:00
Przemyslaw Czerpak
65644f22a1 2008-12-27 15:31 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbstack.h
  * harbour/include/hbapi.h
  * harbour/include/hbapiitm.h
  * harbour/source/vm/hashes.c
    * small modifications in order of some structure members for better
      alignment

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

         proc main()
            local pI18N, i

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

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

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


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

  * harbour/include/hbextern.ch
    - removed old __i18n_*() functions
    + added current i18n functions
2008-12-11 18:47:46 +00:00
Przemyslaw Czerpak
16f9a67e9f 2008-12-02 11:27 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/contrib/xhb/Makefile
  * harbour/contrib/xhb/common.mak
  + harbour/contrib/xhb/xhbarr.c
    + added aSplice(), aRemove() and aMerge() functions - code borrowed
      from xHarbour by Ron Pinkas.
    ! fixed GPF trap in these functions

  * harbour/contrib/xhb/xhbfunc.c
    + added CSTR()

  * harbour/contrib/xhb/hbcompat.ch
    ! changed name of xHarbour include files - they where changed few
      months ago and now they are the same as in Harbour.
      To xHarbour users: please update hbcompat.ch in xHarbour CVS

  * harbour/contrib/xhb/filestat.c
    ! fixed UNICODE compilation

  * harbour/contrib/xhb/hblognet.prg
  * harbour/contrib/xhb/hblog.prg
    * formatting

  * harbour/contrib/hbnf/tempfile.prg
    ! do not use HB_ISBYREF() .prg function - this function does not
      exist in Harbour and does not work correctly in xHarbour

  * harbour/include/hbapiitm.h
  * harbour/source/vm/macro.c
  * harbour/source/vm/codebloc.c
  * harbour/source/vm/hashes.c
  * harbour/source/vm/garbage.c
  * harbour/source/vm/itemapi.c
  * harbour/source/vm/memvars.c
    * cleanup

  * harbour/contrib/gtwvg/Makefile
    ! fixed typo

  * harbour/contrib/gtwvg/hbgtwvg.ch
    * added new line at the end of file and changed non ANSI C // comments
      to /* */ - this file is included by C code too.

  * harbour/contrib/gtwvg/wvgwin.c
  * harbour/contrib/gtwvg/wincallb.c
    * pacified some warnings and fixed possible access to uninitialized data

  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyc
    ! fixed possible double freeing of memory blocks in #line directives
      TOMERGE[1.0]

  * harbour/common.mak
  * harbour/source/compiler/hbmain.c
  + harbour/source/compiler/compi18n.c
    * moved hb_compI18n*() functions to separate file covered by GPL with
      Harbour exception - Thank to Mindaugas

  * harbour/include/hbcomp.h
  * harbour/include/hbcompdf.h
  * harbour/include/hbexpra.c
  * harbour/include/hbexprop.h
  * harbour/include/hbexprb.c
  * harbour/source/common/expropt1.c
  * harbour/source/compiler/Makefile
  * harbour/source/compiler/ppcomp.c
    * added support for plural forms:
         hb_i18n_ngettext[_noop|_strict]( <nExp>, <cText> | <acText> ;
                                          [, <cContext> )
      <acText> is accepted only as array of literal strings even if
      _strict suffix is missing - if it's a problem then we can change it.
      hb_i18n_ngettext_noop() is reduced only when it has valid parameters
      The default plural index expression used for reduction at compile
      time is: iif( <nExp> == 1, 1, 2 )
      If second parameter of hb_i18n_ngettext_noop() is <cText> or <acText>
      length is 1 then it's reduced to <cText> or acText[1] else if second
      parameter is <acText> with more then 1 item then it's reduced to
         <acText>[ iif( <nExp> == 1, 1, 2 ) ]
      and if <nExp> is literal numeric expression is farther reduced to
      given array item. Otherwise is not reduced and warning is generated.
      The plural forms in .pot files are generated as:
         msgid ""
         msgid_plural ""
         msgid_plural2 ""
         [...]
         msgid_pluralN ""
         msgstr[0] ""
      Then real message ID is only msgid (with context if any) and
      msgid_plural* is used only for information. When the same msgid
      is used more then once in different hb_i18n_ngettext*() calls then
      plural messages are merged.
      Please remember that for strict gettext compatibility only two plural
      forms are allowed.
    * extended i18n warnings for simple types validation, f.e.:
         hb_i18n_gettext( .t. )
    * do not generate empty .pot file when source code does not contain any
      hb_i18n_*() functions
    * store in .pot files references to real source file names with paths
      respecting #include directives
    * use hb_compIdentifierNew() to hash i18n messages at compile time
    ! fixed possible bad escape encoding of i18n strings
    + added support to control -j[01] flag using #pragma directive

      Before I'll begin to work on runtime support please test these
      modifications and inform me about problems you can see with the
      above version and missing functionality.
2008-12-02 10:26:51 +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
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
e708033e0e 2008-06-13 19:19 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* source/rtl/gtwvt/gtwvt.h
   * source/rtl/gtwvt/gtwvt.c
   * tests/wvtext.prg
     + Added hb_gtInfo( HB_GTI_SELECTCOPY, <cMenuText> )
       to set the menu text ("Mark and Copy" on startup).
       cMenuText mustn't be zero length. Setting the menu text 
       also enables select&copy automatically. The call 
       will return the previously set menu text. To get 
       the menu text without setting a new one, use: 
       hb_gtInfo( HB_GTI_SELECTCOPY, "" )
       This is good if someone wants to adapt the menu 
       text to the OS's or app's language.

   * doc/en/hb_apiit.txt
   * include/hbapi.h
   * include/hbapiitm.h
   * source/rtl/gtwin/gtwin.c
   * source/rtl/hbgtcore.c
   * source/rtl/gtgui/gtgui.c
   * source/rtl/gtwvt/gtwvt.c
   * source/vm/macro.c
   * source/vm/debug.c
   * source/vm/itemapi.c
   * source/vm/hvm.c
   * source/vm/arrays.c
   * source/vm/extend.c
   * source/rdd/dbfntx/dbfntx1.c
   * source/rdd/sdf1.c
   * source/rdd/dbfcdx/dbfcdx1.c
   * source/rdd/delim1.c
   * source/rdd/dbf1.c
   * source/rdd/dbffpt/dbffpt1.c
   * contrib/hbw32/w32_ole.c
   * contrib/gtwvg/gtwvg.c
   * contrib/rddads/ads1.c
   * contrib/hbmisc/spd.c
   * contrib/hbbmcdx/bmdbfcdx1.c
   * contrib/examples/rdddbt/dbfdbt1.c
     * I did a mistake in 1999 by giving the name hb_itemPutCPtr() 
       to the function which would have to be correctly named 
       hb_itemPutCLPtr() (notice the 'L' for 'length').
       So, now this was renamed to hb_itemPutCLPtr(), and stub was 
       added with the old name, and Harbour code was changed to use 
       the new one. I've also added hb_itemPutCPtr2() as a version 
       not requiring len parameter, the proper name would be hb_itemPutCPtr() 
       for this, but we cannot use without breakin compatiblity.

       IMPORTANT: I'd strongly suggest all 3rd parties to update 
       their code to use the call hb_itemPutCLPtr() instead of 
       hb_itemPutCLPtr().

       The final goal would be to have hb_itemPutCPtr() with two 
       parameters instead of the hakish looking hb_itemPutCPtr2().

       I'd welcome any opinions how to reach this goal. I didn't want to 
       break compatiblity with 3rd parties this time, but IMO we may do 
       it in 1.1, or even before 1.0.

     ! The above also fixes the (potential) problem when hb_retc_buffer()'s 
       szText parameter was evaluated twice if HB_API_MACROS was #defined.
2008-06-13 17:26:48 +00:00
Przemyslaw Czerpak
74e6b4f63f 2008-01-12 13:19 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/ChangeLog
  * harbour/include/hbapiitm.h
  * harbour/source/vm/itemapi.c
    - removed hb_itemLockReadCPtr()/hb_itemLockWriteCPtr()/hb_itemUnLockCPtr()
      Whole modification which will address all different aspects it to
      complex to introduce it now. I'll return to this problem after
      1.0 release
2008-01-12 12:20:12 +00:00
Przemyslaw Czerpak
3611daa5a2 2008-01-11 18:01 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapiitm.h
  * harbour/source/vm/itemapi.c
    + added new functions:
         BOOL hb_itemParamStore( USHORT uiParam, PHB_ITEM pItem )
         BOOL hb_itemParamStoreForward( USHORT uiParam, PHB_ITEM pItem )
      They copy/move pItem body to parameter passed by reference and
      return TRUE when operation was done successfully (uiParam was passed
      by reference)
    + added new functions for string manipulation:
         char * hb_itemLockReadCPtr( PHB_ITEM pItem, ULONG * pulLen );
         char * hb_itemLockWriteCPtr( PHB_ITEM pItem, ULONG * pulLen );
         void   hb_itemUnLockCPtr( char * pszString );
      It's recommended to use them instead of hb_itemGetCPtr().
      Pointer to string buffer returned by hb_itemLockReadCPtr() will
      be always valid even if source item will be cleared, destroyed or
      overwritten until hb_itemUnLockCPtr() is called. Each locked string
      has to be unlocked to avoid memory leaks. After unlocking the string
      pointer cannot be longer used.
      hb_itemLockWriteCPtr() works like hb_itemLockReadCPtr() but string
      pointer returned by this function is writable so user can change
      the body of string item. It's the _ONLY_ one way when it's possible.
      Modifying string items using pointers returned by hb_parc() or
      hb_itemGetCPtr() or extracted directly from HB_ITEM body is _FORBIDDEN_
      and can cause unpredictable results (GPF when constant/readonly memory
      pages are changed, changing many different items which share the same
      memory buffer, etc.).
      This is code illustrates how to use hb_itemLockReadCPtr()/
      hb_itemUnLockCPtr() and it's also good example why hb_itemGetCPtr()
      is very danger function and cannot be used in such case - if you
      replace hb_itemLockReadCPtr() with hb_itemGetCPtr() and remove
      hb_itemUnLockCPtr() then you will have buggy code.

         HB_FUNC( MYFUNC )
         {
            PHB_ITEM pObject = hb_param( 1, HB_IT_OBJECT )
            if( pObject )
            {
               char * pszName1, * pszName2;
               PHB_ITEM pResult;

               pResult = hb_objSendMsg( pObject, "POP", 0 );
               pszName1 = hb_itemLockReadCPtr( pResult, NULL );
               pResult = hb_objSendMsg( pObject, "POP", 0 );
               pszName2 = hb_itemLockReadCPtr( pResult, NULL );
               if( pszName1 && pszName2 )
                  hb_retc_buffer( hb_xstrcpy( NULL,
                              "[", pszName1, "]-[", pszName2, "]", NULL ) );
               hb_itemUnLockCPtr( pszName1 );
               hb_itemUnLockCPtr( pszName2 );
            }
         }

      This code shows how to use hb_itemLockWriteCPtr():
         proc main()
            local cVal, cVal2
            cVal := cVal2 := "ABC"
            STRPUT( @cVal2, 2, 42 )
            ? cVal, cVal2
         return
         #pragma begindump
         #include "hbapiitm.h"
         HB_FUNC( STRPUT )
         {
            PHB_ITEM pString = hb_param( 1, HB_IT_STRING );
            ULONG ulAt = hb_parnl( 2 );
            if( pString && ulAt && ISNUM( 3 ) )
            {
               ULONG ulLen;
               char * pszValue;
               pszValue = hb_itemLockWriteCPtr( pString, &ulLen );
               if( pszValue )
               {
                  if( ulAt <= ulLen )
                     pszValue[ ulAt - 1 ] = ( char ) hb_parni( 3 );
                  hb_itemUnLockCPtr( pszValue );
               }
            }
         }
         #pragma enddump

  * harbour/include/hbcompdf.h
  * harbour/include/hbexprop.h
  * harbour/include/hbexprb.c
  * harbour/source/compiler/hbmain.c
  * harbour/source/compiler/cmdcheck.c
  * harbour/source/compiler/hbusage.c
    * removed HB_I18N_SUPPORT macro and enabled I18N code in default build
2008-01-11 17:01:34 +00:00
Viktor Szakats
6b9e24dd93 2007-11-17 03:08 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* make_vcce.bat
   * make_vcce.mak
     ! Minor corrections (syncing with existing files).

   * doc/genhtm.bat
     ! Minor fix to make it work out of the box.
     - Some obsolete stuff removed from it.

   * include/hbapiitm.h
   * include/hbapi.h
   * source/vm/itemapi.c
     + Added hb_itemPutCLConst() which is the same as 
       hb_itemPutCConst() but the buffer length can be passed.
       Same as xhb hb_itemPutCRawStatic().

   + contrib/xhb/hbcompat.h
     + Added C level compatibility header file.

   * contrib/win32/w32_ole.c
     ! hb_itemPutCRawStatic() -> hb_itemPutCLConst()
     ! Some more xhb API calls changed to Harbour ones.
     ! TraceLog() -> HB_TRACE()
     ! HB_ITEM s_OleAuto -> PHB_ITEM s_pOleAuto
       TOFIX (new): s_pOleAuto is not freed on app exit.
     ! Fixed a few more internal accesses by using API 
       calls.
     ; NOTE: There are four more complicated problems here 
             to be solved:
             1) hb_stackSetActionRequest() call
             2) Passing direct references to HB_ITEM .value 
                members to external functions.
             3) Storing "hidden" information in string ITEMs 
                prepended after the strings' actual content.
             4) Not freeing s_pOleAuto (this var BTW is used in 
                one static function only)

   * source/rtl/hbinet.c
   * source/rdd/dbcmd.c
     ! Changed some xhb C level API calls to Harbour ones.

   * contrib/xhb/Makefile
   * contrib/freeimage/Makefile
   * contrib/apollo/Makefile
   * contrib/firebird/Makefile
   * contrib/libct/Makefile
   * contrib/telepath/Makefile
   * contrib/pgsql/Makefile
   * contrib/gd/Makefile
   * contrib/libnf/Makefile
   * contrib/tip/Makefile
   * contrib/adordd/Makefile
   * contrib/rdd_ads/Makefile
   * contrib/btree/Makefile
   * contrib/samples/Makefile
   * contrib/mysql/Makefile
   * contrib/odbc/Makefile
   * contrib/pdflib/Makefile
     ! Added C and Harbour public headers to GNU makefiles.
     ! Added one missing SVN header.

   * contrib/pdflib/pdfhbdoc.ch
   * contrib/pdflib/pdf.ch
     ! Added missing SVN headers.

   - contrib/pdflib/pdflib.h
     - Removed this file which belongs to the pdflib 
       package. This package is needed anyway to use 
       this contrib. (but the contrib is badly broken)

   * contrib/pdflib/make_b32.bat
   * contrib/pdflib/make_vc.bat
     ! Minor typo.

   * source/rtl/persist.prg
     ! Prefixed static var name with "s_"
2007-11-17 02:26:51 +00:00
Przemyslaw Czerpak
85ffaae73a 2007-07-30 18:00 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbcompat.ch
    + added #xtranslate ISPOINTER( <xValue> )
    * simplified bit operator translations

  * harbour/include/hbapi.h
    + added #define hb_itemPutCStatic(...) hb_itemPutCConst(...)

  * harbour/include/hbapiitm.h
    - removed #define hb_retclenAdoptRaw(...) hb_retclen_buffer(...)
      it's not _exactly_ the same and in some cases it cannot be
      replaced so users should know what exactly they are doing

  * harbour/source/rtl/gttrm/gttrm.c
    + added some #ifdef OS_UNIX_COMPATIBLE for future non *nix ports

  * harbour/source/rdd/dbf1.c
    ! added RT error when someone tires to create DBF with more then
      2046 fields - without it corrupted files were created or GPF
      appeared

  * harbour/contrib/ole2/w32ole.c
    * changed hb_retclenAdoptRaw() to hb_retclen_buffer()
2007-07-30 16:00:32 +00:00
Przemyslaw Czerpak
5c85215870 2007-06-12 23:40 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/contrib/rdd_ads/ads1.c
    * cleaned BCC warning

  * harbour/include/hbapi.h
  * harbour/source/vm/arrays.c
    + added set of hb_arraySet*() functions - I hope they will help 3-rd
      party developers to eliminate using C stack level HB_ITEM and
      reduce usage of potentially danger function like hb_arrayGetItemPtr()

  * harbour/include/hbapiitm.h
  * harbour/source/vm/itemapi.c
    + added hb_itemReturnRelease()

  * harbour/include/hbcompat.ch
    + added hb_pvalue() <-> pvalue() translations

  * harbour/source/vm/pvalue.c
    + added support for 2-nd parameter for assugb operation, f.e. now
         hb_pvalue( 3, "abc" )
      sets "abc" to 3-rd function parameter

  * harbour/source/compiler/gencc.c
  * harbour/source/compiler/hbopt.c
    ! fixed two buggy optimizations
2007-06-12 21:41:58 +00:00
Przemyslaw Czerpak
88cda3200d 2007-03-22 12:55 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/common.mak
    * updated for new files - please check

  * harbour/harbour.spec
    * added compiler library

  * harbour/bin/pack_src.sh
  * harbour/bin/hb-func.sh
    * updated for new files and libraries

  * harbour/config/w32/mingw32.cf
  * harbour/config/w32/watcom.cf
  * harbour/config/w32/xcc.cf
    * added winsock libraries

  * harbour/include/hbapicdp.h
  * harbour/source/rtl/cdpapi.c
    + added hb_cdpicmp() - not case sensitive version of hb_cdpcmp()

  * harbour/include/hbapiitm.h
  * harbour/source/vm/itemapi.c
    + hb_itemStrICmp(), hb_itemCopyFromRef(), hb_itemMoveFromRef()

  * harbour/include/hbapi.h
  * harbour/include/hbcomp.h
  * harbour/include/hbcompdf.h
  * harbour/include/hbexpra.c
  * harbour/include/hbexprb.c
  * harbour/include/hbexprop.h
  * harbour/include/hbmacro.h
  * harbour/include/hbpcode.h
  * harbour/include/hbvmpub.h
  * harbour/include/hbxvm.h
  * harbour/source/common/expropt1.c
  * harbour/source/compiler/complex.c
  * harbour/source/compiler/genc.c
  * harbour/source/compiler/gencc.c
  * harbour/source/compiler/gencli.c
  * harbour/source/compiler/genhrb.c
  * harbour/source/compiler/genobj32.c
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyc
  * harbour/source/compiler/harbour.yyh
  * harbour/source/compiler/hbdead.c
  * harbour/source/compiler/hbfix.c
  * harbour/source/compiler/hblbl.c
  * harbour/source/compiler/hbmain.c
  * harbour/source/compiler/hbopt.c
  * harbour/source/compiler/hbpcode.c
  * harbour/source/compiler/hbstripl.c
  * harbour/source/macro/macro.y
  * harbour/source/macro/macro.yyc
  * harbour/source/macro/macro.yyh
  * harbour/source/macro/macrolex.c
  * harbour/source/vm/Makefile
  * harbour/source/vm/arrays.c
  * harbour/source/vm/asort.c
  * harbour/source/vm/classes.c
  * harbour/source/vm/eval.c
  * harbour/source/vm/garbage.c
  * harbour/source/vm/hvm.c
  * harbour/source/vm/itemapi.c
  * harbour/source/vm/macro.c
  + harbour/source/vm/hashes.c
  + harbour/source/vm/hashfunc.c
    + added hash items, f.e.:
         local h1 := {=>}, h2 := { "a"=>1.234, "b"=>2.345 }
         ? h2[ "a" ], h2[ "b ]
    + added support for DYNAMIC function declaration - it allow to define
      functions which are lately bound at runtime, f.e.:
         /*** t01.prg ***/
         dynamic func1
         proc main()
         local h:=__hrbload("t02.hrb")
         ? func1()
         return

         /*** t02.prg ***/
         func func1
         return "Hello!!!"

    % use new FUNCALL structure to hold EXTERNAL and DYNAMIC functions,
      it reduce memory usage, FUNCALL is much smaller then FUNCTION
    % use symbol scope bits when possible instead of making some linear scan
    + added new enumarator message: __ENUMKEY - it allow to access
      key value when hash item is base enumerator value, f.e.:
         proc main()
         local v, h:={"a"=>1.000,"b"=>2.000,"c"=>3.000}
         heval( h, { |k,v,i| qout( k, v, i ) } ); ?
         for each v in h
            ? v, "=>", v:__enumKey(), v:__enumValue(), v:__enumIndex(), ;
                       valtype(v:__enumBase())
            v += 0.123
         next
         ? ;heval( h, { |k,v,i| qout( k, v, i ) } )
         return
    + added C level hb_hash*() functions
    + added support for full HASH item cloning and updated array cloning
      to also clone nested hashes - please note that xHarbour does not do
      that, in xHarbour ACLONE() clones _ONLY_ nested arrays and HCLONE()
      _DOES_NOT_ clone _ANY_ nested items.

  * harbour/include/hbextern.ch
    + added hash functions HB_H*()
    * changed INET*() functions to HB_INET*()
    + added hash functions H*() and socket functions INET*() when
      HB_COMPAT_XHB is set

  * harbour/include/hbtypes.h
    + added missing HB_EXTERN_BEGIN / HB_EXTERN_END

  * harbour/include/hbpp.h
  * harbour/source/pp/ppcore.c
    ! added protection against automatic word concatenation in some cases
    ! fixed preprocessing expressions when match marker matches ';' token

  * harbour/source/rtl/Makefile
  + harbour/source/rtl/itemseri.c
    + added functions for item serialization: HB_SERIALIZE() and
      HB_DESERIALIZE() - these function are not binary compatible
      with xHarbour functions with the same names but make very
      similar job with the exception to serialization of codeblock
      and object variables - Harbour does not allow to serialize
      codeblocks and serialize objects as arrays.
      In most cases these functions can replace the xHarbour ones
    + added HB_DESERIALBEGIN() and HB_DESERIALIZE() functions covered
      by HB_COMPAT_XHB macro - this functions are only for compatibility
      with existing xHarbour code, In Harbour HB_DESERIALBEGIN() is
      dummy function which returns first parameter and HB_DESERIALNEXT()
      is a simple wrapper to HB_DESERIALIZE() so it's not necessary to
      use them.

  * harbour/source/rtl/hbinet.c
    * changed INET*() functions to HB_INET*() and enable them for default
      build
    + added INET*() functions wrappers covered by HB_COMPAT_XHB macro

  * harbour/source/rtl/hbrandom.c
    + added HB_RANDOMINT() - xHarbour compatible

  * harbour/source/rtl/len.c
    + added support for HASHes

  * harbour/source/rtl/valtype.c
    + added support for HASHes
    + added set of HB_IS*() functions - they are a little bit faster then
      calling VALTYPE( v ) == <cVal>
    - removed HB_ISBYREF() - this function cannot longer work, it was using
      a Clipper incompatible anomalies in passing variables by reference I
      fixed so it has to stop to work. If it will be realy necessary to
      implement HB_ISBYREF() function then please inform me - it will have
      to be done at compiler level or with some much deeper HVM stack
      checking.

  * harbour/source/vm/extend.c
    ! fixed hb_extIsArray() and hb_extIsObject() to work well with
      parameters passed by reference.
      Please note that now hb_extIsArray() return TRUE only for pure arrays
      not object values.

  * harbour/contrib/Makefile
  + harbour/contrib/tip/Changelog
  + harbour/contrib/tip/Makefile
  + harbour/contrib/tip/atokens.c
  + harbour/contrib/tip/base64x.c
  + harbour/contrib/tip/cgi.prg
  + harbour/contrib/tip/client.prg
  + harbour/contrib/tip/credent.prg
  + harbour/contrib/tip/cstr.prg
  + harbour/contrib/tip/encb64.prg
  + harbour/contrib/tip/encmthd.c
  + harbour/contrib/tip/encoder.prg
  + harbour/contrib/tip/encqp.prg
  + harbour/contrib/tip/encurl.prg
  + harbour/contrib/tip/ftpcln.prg
  + harbour/contrib/tip/hbhex2n.c
  + harbour/contrib/tip/httpcln.prg
  + harbour/contrib/tip/mail.prg
  + harbour/contrib/tip/popcln.prg
  + harbour/contrib/tip/smtpcln.prg
  + harbour/contrib/tip/tip.ch
  + harbour/contrib/tip/url.prg
  + harbour/contrib/tip/utils.c
    + added TIP library - code borrowed from xHarbour



   Please test - a lot of above code is not well tested, also some peaces
   were written over year ago for different things (f.e. serialization for
   NETRDD) and now I collected them and committed.
   The TIP library was not tested at all. It can be compiled but I cannot
   say if it works - I hope that people familiar with it can make necessary
   test and fixes.
   It's also not the final version of low level HASH item code. I'm working
   on more efficient structure which uses binary tries but I cannot say when
   I'll finish it (maybe in this weekend or maybe in next year) so I committed
   working version now even if I'm not happy with overall performance (BTW
   not worser then in xHarbour)
2007-03-22 12:28:14 +00:00
Przemyslaw Czerpak
a193cd605d 2007-03-14 14:45 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapiitm.h
  * harbour/source/vm/eval.c
    + added C function hb_execFromArray()

  * harbour/common.mak
  * harbour/source/rtl/Makefile
  + harbour/source/rtl/hbinet.c
    + added xHarbour compatible INET*() functions - code borrowed
      from xHarbour with some minor modifications and fixes

  * harbour/include/hbextern.ch
    + added regex functions
    + added INET*() functions when compiled with HB_COMPAT_XHB
2007-03-14 13:47:39 +00:00
Przemyslaw Czerpak
0ef0f1aab9 2007-03-13 19:40 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapi.h
  * harbour/include/hbapiitm.h
  * harbour/source/vm/garbage.c
  * harbour/source/vm/extend.c
  * harbour/source/vm/itemapi.c
    + added hb_gcFunc(), hb_parptrGC(), hb_itemGetPtrGC()
      hb_parptrGC() and hb_itemGetPtrGC() uses GC cleanup function address
      to validate if pointer item points to expected memory block type

  * harbour/source/common/hbhash.c
  * harbour/source/compiler/hbident.c
    * formatting and minor modifications

  * harbour/source/pp/pplib.c
  * harbour/source/pp/pplib2.c
    * use hb_parptrGC() to be sure that given pointer item points
      to PP structure

  + harbour/include/hbregex.h
  + harbour/source/rtl/hbregex.c
  * harbour/source/rtl/Makefile
  * harbour/common.mak
    + added support for regular expressions. Now it's enabled by default
      only in *nixes (POSIX regex) and BCC 5.5 (PCRE regex). Setting
      HB_PCRE_REGEX macro enables Perl-Compatible Regular Expressions
      and HB_POSIX_REGEX - POSIX regular expressions. In xHarbour regex
      support is enabled for all builds because PCRE source code is stored
      in CVS. If you will want we can make the same.
    + the following C functions are available:
      hb_regexCompile(), hb_regexGet(), hb_regexFree(), hb_regexMatch()
    + the following PGR functions are available:
      HB_REGEXCOMP(), HB_ISREGEX(), HB_ATX(), HB_REGEX(), HB_REGEXMATCH(),
      HB_REGEXSPLIT(), HB_REGEXATX(), HB_REGEXALL()
      They are working in similar way to the ones in xHarbour with the
      exception to some bug fixes and form of compiled regular expression.
      In Harbour it's pointer item for which HB_ISREGEX() returns TRUE when
      in xHarbour it's binary string.

  * harbour/source/rdd/dbfcdx/dbfcdx1.c
  * harbour/source/rdd/dbfntx/dbfntx1.c
    * enabled code to seek in index using regular expressions
      (DBOI_SKIPREGEX[BACK])
2007-03-13 18:40:56 +00:00
Przemyslaw Czerpak
071fef7612 2007-01-13 14:05 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/contrib/rdd_ads/adsfunc.c
  * harbour/source/rdd/workarea.c
    * formatting

  * harbour/include/hbapi.h
  * harbour/source/vm/extend.c
    + added missing hb_storptrGC()

  * harbour/include/hbapicdp.h
  * harbour/source/rtl/cdpapi.c
    + added parameter to unicode translation function to protect control
      code translation
    * formatting

  * harbour/source/rtl/gtsln/kbsln.c
  * harbour/source/rtl/gtxwc/gtxwc.c
    * use new unicode translation function format. It also fixes problem
      with space translation in GTLSN used in UTF8 mode

  * harbour/include/hbapiitm.h
  * harbour/source/vm/itemapi.c
    + added hb_itemCopyToRef(), hb_itemMoveToRef(), hb_itemMoveRef(),
      hb_itemUnRefWrite()

  * harbour/include/hbexprb.c
    ! use HB_P_DUPLUNREF instead of HB_P_DUPLICATE when assign is used in
      push context - Clipper compatible behavior, see:
         x:=10
         f(y:=iif(.t.,@x,))
         ? x, y
         func f(x)
         x+=100
         return nil

  * harbour/include/hbver.h
  * harbour/source/common/hbver.c
    * changed status to "devel"

  * harbour/source/common/expropt2.c
    * disabled setting NIL when iif(.t.,,sth()) is optimized to avoid
      warning when iif() is used as statement - to fix number of parameters
      passed to function in code like f(iif(.t.,,sth())) we will need a
      little bit deeper modification

  * harbour/source/compiler/complex.c
    * added hack for potential problems caused by WITH OBJECT syntax, f.e.
      in code like:
         proc p(obj,x)
         case:=myCaseClass():new()
         retu:=myCaseClass():new()
         WITH OBJECT obj
            do case
               case x==nil
               case:value()
               case:action()
                  retu:sth()
            end
         END
         case:action()
         retu:sth()
         return
      case:action(), case:value(), retu:sth() can means two different things
      and compiler cannot guess which one should use. It cannot be fixed
      because it's caused by bad WITH OBJECT syntax. In xHarbour constractions
      like case:value() or retu:sth() are always used as in  WITH OBJECT
      context what is not Clipper compatible. I do not want to introduce
      such limitations. We have two choices: change WITH OBJECT syntax or
      add some hack to "hide" the problem a little bit. Now I intorduce
      ugly hack which check number of spaces between ':' so
         case :action()
      is compiled as case condition using WITH OBJECT message and
      case:action() as sending message to object in case variable

  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyc
    + added support for passing base value to FOR EACH by reference.

  * harbour/source/vm/arrays.c
    * use hb_itemMoveRef() in AINS()/ADEL() to avoid creation of cyclic
      reference chains

  * harbour/source/vm/debug.c
  * harbour/source/vm/memvars.c
    * use hb_itemCopyToRef() to avoid creation of cyclic reference chains

  * harbour/source/vm/classes.c
  * harbour/source/vm/hvm.c
    * use hb_itemMoveToRef() to avoid creation of cyclic reference chains
    + added support for for writable string enumerators, f.e.:
         proc main()
         local s, c
         s:="abcdefghijklmnopqrst"
         for each c in @s
            if c$"aeio"
               c:="*"
            endif
         next
         ? s // "*bcd*fgh*jklmn*pqrst"
         return
2007-01-13 13:18:35 +00:00
Przemyslaw Czerpak
68cb7f510b 2006-08-17 12:40 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/contrib/rdd_ads/ads1.c
  * harbour/include/hbapi.h
  * harbour/include/hbapigt.h
  * harbour/include/hbapiitm.h
  * harbour/include/hbdefs.h
  * harbour/include/hbrdddbf.h
  * harbour/include/hbstack.h
  * harbour/include/hbsxfunc.h
  * harbour/source/common/expropt1.c
  * harbour/source/common/hbstr.c
  * harbour/source/compiler/harbour.c
  * harbour/source/compiler/hbident.c
  * harbour/source/pp/ppcore.c
  * harbour/source/rdd/hbdbsort.c
  * harbour/source/rdd/dbffpt/dbffpt1.c
  * harbour/source/rdd/hbsix/sxcompr.c
  * harbour/source/rtl/hardcr.c
  * harbour/source/rtl/inkey.c
  * harbour/source/rtl/isprint.c
  * harbour/source/rtl/math.c
  * harbour/source/rtl/mtran.c
  * harbour/source/rtl/natmsg.c
  * harbour/source/rtl/gtcrs/chrmap.c
  * harbour/source/rtl/gtcrs/gtcrs.c
  * harbour/source/rtl/gtsln/gtsln.c
  * harbour/source/rtl/gtsln/gtsln.h
  * harbour/source/rtl/gtsln/kbsln.c
  * harbour/source/rtl/gtsln/keytrans.c
  * harbour/source/rtl/gtsln/mousesln.c
  * harbour/source/vm/estack.c
  * harbour/source/vm/extend.c
  * harbour/source/vm/runner.c
  * harbour/utils/hbver/hbverfix.c
    * general code cleanup, public functions declared in header files,
      local changed to static, added mising void for functions without
      parameters, etc.
      We still have some public functions which are not used by core code
      and not declared in header files, like:
         hb_memvarValueBaseAddress(), hb_memvarGetVarHandle(),
         hb_memvarGetValueByHandle(), hb_clsCreate(), hb_clsAdd(),
         hb_clsAssociate(), hb_hashTableDel(), hb_hashTableSize(),
      I haven't touched them yet though we will have to keep in mind that
      we should make sth with them.
2006-08-17 11:05:09 +00:00
Przemyslaw Czerpak
fe67521514 2006-07-06 23:05 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/Makefile
    + added usrrdd.ch

  * harbour/include/hbapiitm.h
  * harbour/source/vm/itemapi.c
    + added hb_itemPutSymbol()

  * harbour/source/vm/hvm.c
    ! fixed HB_P_POPVARIABLE - it should work like HB_P_POPMEMVAR
      This Ron's code which illustrates it:
            PROCEDURE Main()
               USE Test
               First := First
               CLOSE
               ? First
            RETURN
      In practice it means that we do not need this PCODE at all and
      we should replace it in compiler by HB_P_POPMEMVAR and reuse
      it in the future for differ things.

  * harbour/source/vm/memvars.c
    * code cleanup

  * harbour/source/vm/runner.c
    ! fixed possible memory leaks when corrupted .hrb file is loaded
2006-07-06 21:07:38 +00:00
Przemyslaw Czerpak
1d3ba3a5a1 2006-06-14 13:30 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapiitm.h
    + added missing declaration of hb_itemPutPtrGC()
2006-06-14 11:29:00 +00:00
Przemyslaw Czerpak
917c8057e6 2006-06-14 13:05 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/config/linux/dir.cf
  * harbour/config/linux/gcc.cf
    * formatting

  * harbour/config/linux/global.cf
  * harbour/config/linux/install.cf
    * added -ldl to linked library list and RANLIB executing after library
      creation

  * harbour/contrib/ole/ole2.c
    * added #include "hbapicls.h"

  + harbour/include/hbapicls.h
  * harbour/include/hbapi.h
    + added HB_IT_ENUM item
    + added collect member to HB_IT_POINTER structure for POINTER items
      inspected by GC
    * changed the order of HB_CODEBLOCK members to safe few bytes on
      alignment
    * removed counters from HB_CODEBLOCK and HB_BASEARRAY structure
    + added hb_xRefInc(), hb_xRefDec(), hb_xRefFree(), hb_xRefCount(),
      hb_xRefResize() functions. They are internal Harbour VM functions
      and covered by internal API macro. Should not be used by 3-rd
      party code because we may change them in the future or even remove.
    + added hb_gcRefInc(), hb_gcRefDec(), hb_gcRefFree(), hb_gcRefCount()
      functions. These are also internal function which corresponds to the
      above hb_x*() ones.
    - removed hb_arrayRelease() function. This function is not longer
      necessary and it should never be public function - it was implemented
      in very dangerous way.
    - removed hb_codeblockDelete() function.
    - removed hb_memvarValueDecGarbageRef()
    + added USHORT usLen parameter to hb_codeblockMacroNew() - when sets
      to non 0 value it informs that PCODE should be copied to dynamically
      allocated buffer.
    * moved all classes/object functions to separate file: hbapicls.h
    + added hb_retptrGC()
    + added internal function hb_memvarGetItem()

  * harbour/include/hbapiitm.h
    - removed hb_itemForwardValue() and added macro which translates
      hb_itemForwardValue() to hb_itemMove()
    + added hb_itemUnShareString() and hb_itemReSizeString() functions
    + added hb_itemSetNil() macro

  * harbour/include/hbdefs.h
    * some cleanups in macro definitions

  * harbour/include/hbexprb.c
    * indenting

  * harbour/include/hbvm.h
  * harbour/include/hbinit.h
    + added hb_vmProcessSymbolsExt(), hb_vmRegisterSymbols(),
      hb_vmFreeSymbols(), hb_vmBeginSymbolGroup(),
      hb_vmInitSymbolGroup(), hb_vmExitSymbolGroup()
    * changed hb_vmProcessSymbols() to return address of register symbol
      table. For normal code it's the same address as given in parameter
      so it does not break backward binary compatibility.
    * changed symbol init macros to work correctly with modified address
      of symbol table

  * harbour/include/hbsetup.h
    * added support for HB_USE_PROFILER macro. Now profiler code is
      is disable in HVM by default
    * commented out HB_ASORT_OPT_ITEMCOPY - it's not longer used - see note.

  * harbour/include/hbstack.h
    * added missing parenthesis in hb_stackItem() macro

  * harbour/include/hbtypes.h
    * updated VM_PROCESS_DLL_SYMBOLS definition
    + added VM_PROCESS_SYMBOLS_EXT
    - removed HB_ARRAYRELEASE

  * harbour/include/hbver.h
    * changed revision number to 2

  * harbour/include/hbvmpub.h
    - remove pFunPtr from HB_DYNS and cover profiler member by
      #ifndef HB_NO_PROFILER
    + added HB_PCODEFUNC structure
    + added HB_FS_PCODEFUNC, HB_FS_DYNCODE and HB_FS_LOCAL - the last one
      is not used yet.

  * harbour/include/hbxvm.h
    * added some multipcode functions for some speed optimization in -gc3
      output

  * harbour/include/hbapicdp.h
  * harbour/source/codepage/cpbg866.c
  * harbour/source/codepage/cpbgiso.c
  * harbour/source/codepage/cpbgwin.c
  * harbour/source/codepage/cpeldos.c
  * harbour/source/codepage/cpelwin.c
  * harbour/source/codepage/cpesdos.c
  * harbour/source/codepage/cpesmwi.c
  * harbour/source/codepage/cpeswin.c
  * harbour/source/codepage/cpgedos.c
  * harbour/source/codepage/cpgewin.c
  * harbour/source/codepage/cphu852.c
  * harbour/source/codepage/cphuiso.c
  * harbour/source/codepage/cphuwin.c
  * harbour/source/codepage/cppl852.c
  * harbour/source/codepage/cppliso.c
  * harbour/source/codepage/cpplmaz.c
  * harbour/source/codepage/cpplwin.c
  * harbour/source/codepage/cppt850.c
  * harbour/source/codepage/cpptiso.c
  * harbour/source/codepage/cpru866.c
  * harbour/source/codepage/cprukoi.c
  * harbour/source/codepage/cpruwin.c
  * harbour/source/codepage/cpsl437.c
  * harbour/source/codepage/cpsl852.c
  * harbour/source/codepage/cpsliso.c
  * harbour/source/codepage/cpslwin.c
  * harbour/source/codepage/cpsrwin.c
  * harbour/source/common/hbfhnd.c
  * harbour/source/common/hbstr.c
  * harbour/source/common/hbver.c
  * harbour/source/compiler/gencli.c
  * harbour/source/rtl/fstemp.c
  * harbour/source/rtl/hbgtcore.c
  * harbour/source/rtl/langapi.c
  * harbour/source/rtl/gtalleg/gtalleg.c
  * harbour/source/rtl/gtalleg/ssf.h
  * harbour/source/rtl/gtcgi/gtcgi.c
  * harbour/source/rtl/gtcrs/gtcrs.c
  * harbour/source/rtl/gtdos/gtdos.c
  * harbour/source/rtl/gtos2/gtos2.c
  * harbour/source/rtl/gtpca/gtpca.c
  * harbour/source/rtl/gtsln/gtsln.c
  * harbour/source/rtl/gtstd/gtstd.c
  * harbour/source/rtl/gtwin/gtwin.c
  * harbour/source/rtl/gtwvt/gtwvt.c
  * harbour/source/rtl/gtxwc/gtxwc.c
    * cleaned the code to avoid warnings for some non ANSI C constructions

  * harbour/source/compiler/cmdcheck.c
    * formatting

  * harbour/source/compiler/gencc.c
    * added some multipcode optimizations

  * harbour/source/compiler/genc.c
    * keep function name set by compiler for static initstatics

  * harbour/source/compiler/harbour.c
    * extend init statics name with the number of used static variables
    * formatting

  * harbour/source/compiler/hbusage.c
    + added my name to developers list - I hope that there is enough
      of my code in Harbour (BTW for quite long time) ;-)

  * harbour/source/rdd/dbcmd.c
    - removed DBF2TEXT() function

  * harbour/source/rdd/dbf1.c
  * harbour/source/rdd/dbffpt/dbffpt1.c
    * generate RT error when someone tries to create DBF with memo fields
      without MEMO RDD linked.

  * harbour/source/rtl/errorapi.c
    * replace all hb_vmDo() with hb_vmSend()

  * harbour/source/rtl/math.c
    * use hb_errPutArgs() to pass parameters to error object

  * harbour/source/rtl/philes.c
  * harbour/source/rtl/space.c
  * harbour/source/rtl/strpeek.c
    * some minor optimizations

  * harbour/source/vm/arrays.c
    - removed hb_arrayRelease() function.
    * changed hb_arrayReleaseGarbage() to be safe for recursive call
    * updated to use GC counters

  * harbour/source/vm/arrayshb.c
    * use stack function/macros instead of direct accessing HB_STACK members

  * harbour/source/vm/asort.c
    * removed unused HB_ASORT_OPT_ITEMCOPY

  * harbour/source/vm/classes.c
    * added class code from HVM
    % added fast overloaded operator detection and execution
    + added hb_objHasOperator(), hb_objOperatorCall()
    + added separated overloading of "=" and "==" operators
    * operate on PHB_SYMB not PHB_FUNC - support for pure PCODE function
      without any machine code
    * use stack function/macros instead of direct accessing HB_STACK members
    * separated profiler code
    * some code cleaning

  * harbour/source/vm/codebloc.c
    + added USHORT usLen parameter to hb_codeblockMacroNew() - when sets
      to non 0 value it informs that PCODE should be copied to dynamically
      allocated buffer.
    * updated to use GC counters
    - removed hb_codeblockDelete() function.
    * changed hb_codeblockDeleteGarbage() to be safe for recursive call
    - removed restoring statics base in hb_codeblockEvaluate()

  * harbour/source/vm/debug.c
    * cleaned and optimized some code

  * harbour/source/vm/dynlibhb.c
    + added support for loading and unloading dynamic libraries with PCODE
    + added support for dynamic libraries in Linux (.so)
    + added HB_LIBERROR() - returns error string with last error in
      HB_LIBLOAD() - now works only in Linux

  * harbour/source/vm/dynsym.c
    * separated profiler code
    + use pDynSym->pSymbol->value.pFunPtr instead of pDynSym->pFunPtr

  * harbour/source/vm/estack.c
    + added #include "hbapicls.h"
    + added hb_stackPushReturn(), hb_stackPopReturn()

  * harbour/source/vm/eval.c
  * harbour/source/vm/extend.c
    * use stack function/macros instead of direct accessing HB_STACK members
    + added hb_retptrGC()

  * harbour/source/vm/fm.c
    + added hb_xRefInc(), hb_xRefDec(), hb_xRefFree(), hb_xRefCount(),
      hb_xRefResize() functions. They are internal Harbour VM functions
      and covered by internal API macro. Should not be used by 3-rd
      party code because we may change them in the future or even remove.

  * harbour/source/vm/garbage.c
    + added hb_gcRefInc(), hb_gcRefDec(), hb_gcRefFree(), hb_gcRefCount()
      functions. These are also internal function which corresponds to the
      above hb_x*() ones.
    * changed Step 3 of GC pass and execution of clean-up function to be
      safe for recursive calls and additional activity.
      Ryszard see my note and s_pDeletedBlock
    + added GC inspected HB_IT_POINTER items.

  * harbour/source/vm/hvm.c
    * separated profiler code
    * separated class code from HVM
    + added support for loading and unloading libraries with PCODE modules
    + added support for pure PCODE functions
    + added support for string item resizing and preallocating string buffer
    + added some new multipcode functions for -gc3 optimization
    + added hb_vmProcessSymbolsExt(), hb_vmRegisterSymbols(),
      hb_vmFreeSymbols(), hb_vmBeginSymbolGroup(),
      hb_vmInitSymbolGroup(), hb_vmExitSymbolGroup()
    * changed hb_vmProcessSymbols() to return address of register symbol
      table. For normal code it's the same address as given in parameter
      so it does not break backward binary compatibility.
    + use new code for operator overloading
    * changed FOR EACH to dynamically check iteration scope in
      hb_vmEnumNext()/hb_vmEnumPrev() and remove max number of iteration
      stored on HVM stack
    * temporary use hb_itemUnRefOnce() instead of hb_itemUnRefRefer() as
      workaround for possible GPF. I'd like Ryszard will chose the final
      version

  * harbour/source/vm/itemapi.c
    + added support for preallocating string buffer size
    + added hb_itemUnShareString() and hb_itemReSizeString()
    * updated string items to use counters allocated with each
      memory block by xh_xgrab()/hb_xalloc()
    * updated codeblock and array items to use GC reference counters
    + added GC inspected HB_IT_POINTER items.
    * generate RT error in hb_itemUnreOnce() for enumerator items
      out of scope
    + added hb_itemPutPtrGC()

  * harbour/source/vm/macro.c
    * use pDynSym->pSymbol->value.pFunPtr instead of pDynSym->pFunPtr

  * harbour/source/vm/maindllp.c
    * updated usage of hb_vmProcessSymbols()
    * added hb_vmProcessSymbolsExt()

  * harbour/source/vm/memvars.c
    + added hb_memvarGetItem()
    - removed hb_memvarValueDecGarbageRef()

  * harbour/source/vm/proc.c
    + added #include "hbapicls.h"

  * harbour/source/vm/pvalue.c
    * do not access stack structure directly but use hb_stack*()
      functions (macros)

  * harbour/source/vm/runner.c
    * synced with xHarbour

  * harbour/utils/hbtest/rt_misc.prg
   * added overloading "=" operator. Now "==" and "=" can be overloaded
     with different methods

   All names I used for new functions/macros can be changed. Please look at
   it and if you will some better propositions then we can use it.
   hb_vmProcessSymbolsExt() is added but not used yet.
2006-06-14 11:21:26 +00:00
Ryszard Glab
e92af8dbd2 2006-02-14 16:10 UTC+0100 Ryszard Glab <rglab@imid.med.pl>
* include/hbapiitm.h
   * include/hbexpra.c
   * include/hbexprc.c
   * include/hbexprop.h
   * source/compiler/expropta.c
   * source/compiler/exproptb.c
   * source/compiler/exproptc.c
   * source/macro/macroa.c
   * source/macro/macrob.c
   * source/macro/macroc.c
   * source/vm/hvm.c
   * source/vm/itemapi.c
      * fixed code for adding date and numeric values (introduced
        in my last commits)
      * removed hb_itemPutBHLong (use hb_itemPutNInt instead)
      * added more optimization for localvar+=integer
        using HB_P_LOCALNEARADDINT pcode
        (borrowed from xHarbour)
2006-02-14 15:12:07 +00:00
Ryszard Glab
6f0e36f665 2006-02-14 11:40 UTC+0100 Ryszard Glab <rglab@imid.med.pl>
* include/hbapiitm.h
   * include/hbcomp.h
   * include/hbexpra.c
   * include/hbexprb.c
   * include/hbexprc.c
   * include/hbexprop.h
   * include/hbpcode.h
   * source/common/expropt1.c
   * source/common/hbfsapi.c
   * source/compiler/expropta.c
   * source/compiler/exproptb.c
   * source/compiler/exproptc.c
   * source/compiler/genc.c
   * source/compiler/harbour.c
   * source/compiler/harbour.l
   * source/compiler/harbour.y
   * source/compiler/hbdead.c
   * source/compiler/hbfix.c
   * source/compiler/hbpcode.c
   * source/compiler/hbstripl.c
   * source/macro/macro.y
   * source/macro/macroa.c
   * source/macro/macrob.c
   * source/macro/macroc.c
   * source/pp/ppcore.c
   * source/vm/hvm.c
   * source/vm/itemapi.c
      * fixed many more memory leaks in the compiler
        (the Harbour code compiles itself with no memory leaks).
        However there are still leaks when the compiler aborts
        compilation due to errors.
      + added optimalization of '+=' '-=' '*=' '/=' operators
      + added hb_itemGetNDDec(),
        hb_itemPutHBLong(),
        hb_itemPutNumType()
        borrowed from xHarbour

      NOTE: new pcodes:
      HB_[PLUS|MINUS|MULT|DIV]EQ
      HB_[PLUS|MINUS|MULT|DIV]EQPOP
      recompile all sources.
2006-02-14 10:26:58 +00:00
Przemyslaw Czerpak
a290c984e7 2006-02-04 17:05 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/harbour.spec
  * harbour/make_bsd.sh
  * harbour/make_drw.sh
  * harbour/make_gnu.sh
  * harbour/make_rpm.sh
  * harbour/make_tgz.sh
  * harbour/bin/hb-func.sh
  * harbour/bin/pack_src.sh
  * harbour/config/c.cf
  * harbour/config/global.cf
  * harbour/config/rules.cf
  * harbour/config/darwin/gcc.cf
  * harbour/config/darwin/global.cf
  * harbour/config/dos/djgpp.cf
  * harbour/config/dos/global.cf
  * harbour/config/dos/install.cf
  * harbour/config/dos/owatcom.cf
  * harbour/config/hpux/gcc.cf
  * harbour/config/hpux/global.cf
  * harbour/config/linux/gcc.cf
  * harbour/config/linux/global.cf
  * harbour/config/linux/owatcom.cf
  * harbour/config/sunos/gcc.cf
  * harbour/config/w32/watcom.cf
    * include ADSRDD by default in RPMs
    * updated for new RPM which does not accept some old tags
    * set -fPIC on 64bit platforms
    + added /etc/harbour/hb-charmap.def
    * updated for new GT system and drivers

  * harbour/contrib/dot/pp.prg
  * harbour/contrib/dot/pp_harb.ch
    * use _APMAIN as startup function
    * cleaned direct access to item internals

  * harbour/contrib/libct/Makefile
  + harbour/contrib/libct/ctwfunc.c
  + harbour/contrib/libct/ctwin.c
  + harbour/contrib/libct/ctwin.h
    * added CT3 like Window System - it's a GT driver which inherits
      from the existing one and adds CTW functionality

  * harbour/contrib/libct/screen1.c
    * updated for GTAPI modifications

  * harbour/contrib/libnf/Makefile
  * harbour/contrib/libnf/chdir.c
  * harbour/contrib/libnf/mkdir.c
  * harbour/contrib/libnf/rmdir.c
    * use hb_fs*() API functions instead of calling DOS interrupts
      Now NF dir functions works on all platforms - it will be nice
      to update other functions too.

  * harbour/contrib/libnf/dispc.c
  * harbour/contrib/libnf/ftattr.c
    * updated for GT API modifications, some of this code still depends
      on EGA/VGA video buffer so will work only if user will force in GT
      using it - it will be nice to rewrite them

  * harbour/contrib/odbc/odbc.c
  * harbour/contrib/ole/ole2.c
    * casting and cleaning direct access to item internals

  * harbour/contrib/rdd_ads/ads1.c
  * harbour/contrib/rdd_ads/adsfunc.c
  * harbour/contrib/rdd_ads/adsmgmnt.c
    * synced with xHarbour

  * harbour/include/Makefile
    * added new header files

  + harbour/include/hbgtinfo.ch
    + added GTI_* defintions for hb_gtInfo() function.
      This function works in similar way to dbInfo() in RDD.
      The GTI_* definitions are taken from xHarbour "as is" and
      they should be cleaned - not all functionality are supported
      in Harbour and some others should be implemented in differ
      way then in xHarbour.

  + harbour/include/hbgtcore.h
  * harbour/include/hbapigt.h
    * new GTAPI
      hbgtcore.h file should not be included by user code
      it's only for internal use in GT drivers
    * HB_inkey_enum changed to int - this is bit field not enumerated type.
      Many of C/C++ compilers forbid bit operations on enum types and
      forcing it by casting which finally exceeds the enum range is defined
      as bug because it may badly interacts with some compiler optimizations

  * harbour/include/hbapi.h
  * harbour/include/hbapicdp.h
  * harbour/include/hbapierr.h
  * harbour/include/hbapifs.h
  * harbour/include/hbapiitm.h
  * harbour/include/hbapilng.h
  * harbour/include/hbapirdd.h
  * harbour/include/hbdate.h
  * harbour/include/hbdefs.h
  * harbour/include/hbinit.h
  * harbour/include/hbpcode.h
  * harbour/include/hbrdddbf.h
  * harbour/include/hbset.h
  * harbour/include/hbstack.h
  * harbour/include/hbvm.h
  * harbour/include/hbvmopt.h
  * harbour/include/hbvmpub.h
    * separated internal and external API. Now the definitions for
      internal HVM structures and functions are excluded by default
      they could be enabled if user include hbvmopt.h before other
      header files. Such operation should be done _ONLY_ by core
      code - if 3-rd party developers make sth like that then it's
      for their own risk and such code may stop to work with next
      Harbour versions. Without hbvmopt.h the internal structures
      like HB_ITEM, HB_DYNS, ... are  mapped to 'void' so there is
      no way to access their members so we can modify them in the
      future without afford for 3-rd party code.
      There is one small exception 'type' should be the first member
      for HB_ITEM structure because I used a small ugly hack in
      HB_IS_*() macros with castin PHB_ITEM to HB_TYPE* - it works
      without speed overhead but if you think that it will be
      better/cleaner to not use such tricks then it's enough to
      change HB_ITEM_TYPE() definitions in hbvmpub.h - see note.
    * cleared the usage of HB_EXPORT - to avoid problems with some C/C++
      compilers we agreed that the only one common way of using HB_EXPORT
      is adding it ad begining of declaration - please keep this convention
      in the future.
    + added new functions:
      hb_extIsObject(), hb_codeblockId(), hb_idleSleep(),
      hb_fsGetOsHandle(),
      hb_dynsymFindSymbol(), hb_dynsymGetSymbol(),
      hb_dynsymSymbol(), hb_dynsymName(),
      hb_dynsymMemvarHandle(), hb_dynsymAreaHandle(), hb_dynsymSetAreaHandle()
    * changed hb_arrayClone() declaration to:
         PHB_ITEM hb_arrayClone( PHB_ITEM pArray )
    * changed hb_arrayFromParams() declaration to:
         PHB_ITEM hb_arrayFromParams( int iLevel )
      The previous version needed a pointer to stack relocatable area
      so any stack resizing could cause GPF.

  * harbour/include/inkey.ch
    * added definitions for extended mouse keys/events and some key
      combinations

  * harbour/source/codepage/uc1250.c
  * harbour/source/codepage/uc1251.c
  * harbour/source/codepage/uc1253.c
  * harbour/source/codepage/uc1257.c
  * harbour/source/codepage/uc737.c
  * harbour/source/codepage/uc850.c
  * harbour/source/codepage/uc852.c
  * harbour/source/codepage/uc866.c
  * harbour/source/codepage/uc88591b.c
  * harbour/source/codepage/uc8859_1.c
  * harbour/source/codepage/uc8859_2.c
  * harbour/source/codepage/uc8859_5.c
  * harbour/source/codepage/uckoi8.c
  * harbour/source/codepage/uckoi8u.c
  * harbour/source/codepage/ucmaz.c
    * updated unicode values for characters in rabge 1-31 to keep
      DOS compatibility

  * harbour/source/common/expropt1.c
  * harbour/source/common/hbarch.c
  * harbour/source/common/hbdate.c
  * harbour/source/common/hbstr.c
  * harbour/source/common/hbver.c
    * keep HB_EXPORT at the beginning of function declaration

  * harbour/include/hbpcode.h
  * harbour/include/hbcomp.h
  * harbour/source/compiler/harbour.c
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/hbfix.c
  + harbour/source/compiler/hbdead.c
  * harbour/source/compiler/hbpcode.c
  + harbour/source/compiler/hbstripl.c
    % rewritten jump optimization
      ! fixed some minor problems
      * do not optimize jumps and local variable access by shorter
        PCODE version and HB_P_NOOP when jump optimization is
        disabled, this is a note I left in source code in few places:
         /*
          * optimizing jumps here by shorting them and setting HB_P_NOOPs
          * only slow down the compilation process for three reasons:
          * 1. When it's dummy jump to next instruction we need two passes
          *    in hb_compOptimizeJumps() to fully remove it
          * 2. hb_compOptimizeJumps() also make jump shortcutting in each pass
          * 3. When Jump Optimization is disabled (-kJ) then it cause slowness
          *    at runtime because we will have more HVM loops: first  for the
          *    shorter jump and next for the HB_P_NOOP PCODE(s)
          * [druzuz]
          */

      + added support for multi passes in jump/dead code elimination
        (hb_compOptimizeJumps())
        By default is set upto three passes.
        Now hb_compOptimizeJumps() keeps all compiler internal data clean
        on exist and can be called any times and does not change other
        compiler's functions behaviors
      + added dummy jumps elimination
      + added optimization for:
            IF .T.
            IF .F.
            WHILE .T.
            WHILE .F.
         etc.
      * restored empty BEGIN/RECOVER sequence block elimination
        if Jump Optimization is enabled then it marks the block
        with HB_P_NOOPS else it cut the generated PCODE
      + added dead code eliminator (new functions hb_compCodeTraceMarkDead()/
        hb_compPCodeTrace() - it works only when Jump Optimization is
        not disabled)
      As a result of the above we have smaller and faster PCODE.

      I do not think that we will have meta code support in the reasonable
      time and because I need some valid compiler data/structures like
      updated table of all jumps for real C code (not PCODE in .c files)
      generation then I decide to make some modifications and the above
      is in practice a side effect of this work.

  * harbour/source/rdd/dbcmd.c
  * harbour/source/rdd/dbf1.c
  * harbour/source/rdd/rddord.prg
  * harbour/source/rdd/workarea.c
  * harbour/source/rdd/dbfcdx/dbfcdx1.c
  * harbour/source/rdd/dbffpt/dbffpt1.c
  * harbour/source/rdd/dbfntx/dbfntx1.c
  * harbour/source/rdd/nulsys/nulsys.c
    * synced with my modifications in xHarbour
    * updated for API modifications

  * harbour/source/rtl/Makefile
    + added gtsys.c, gtfunc.c, hbgtcore.c

  * harbour/source/rtl/accept.c
  * harbour/source/rtl/alert.prg
  * harbour/source/rtl/cdpapi.c
  * harbour/source/rtl/console.c
  * harbour/source/rtl/dates.c
  * harbour/source/rtl/do.c
  * harbour/source/rtl/errorapi.c
  * harbour/source/rtl/errorsys.prg
  * harbour/source/rtl/file.c
  * harbour/source/rtl/fserror.c
  * harbour/source/rtl/fstemp.c
  * harbour/source/rtl/hbffind.c
  * harbour/source/rtl/idle.c
  * harbour/source/rtl/math.c
  * harbour/source/rtl/oldclear.c
  * harbour/source/rtl/strmatch.c
  * harbour/source/rtl/strpeek.c
  * harbour/source/rtl/valtype.c
  * harbour/source/rtl/xsavescr.c
    * updated for API modifications
    * cleaned some compiler warnings

  * harbour/source/rtl/filesys.c
    + added hb_fsGetOsHandle()
    * updated for API modifications

  * harbour/source/rtl/gt.c
  * harbour/source/rtl/gtapi.c
  * harbour/source/rtl/gtapiu.c
  + harbour/source/rtl/gtfunc.c
  + harbour/source/rtl/gtsys.c
  + harbour/source/rtl/hbgtcore.c
  * harbour/source/rtl/inkey.c
  * harbour/source/rtl/maxrow.c
  * harbour/source/rtl/mouseapi.c
  * harbour/source/rtl/setcolor.c
  * harbour/source/rtl/setposbs.c
  * harbour/source/rtl/shadow.c
    * new GT API code

  * harbour/source/rtl/saverest.c
    * changed default behavior in SEVESCREEN/RESTSCREEN with parameters
      out of screen range to be Clipper compatible. Added last logical
      parameter to keep previous behavior for programs which begins to
      use it.

  * harbour/source/rtl/seconds.c
    * include missing header file to fix C++ compilation
    * make hb_secondsCPU global function

  * harbour/source/rtl/set.c
    * make HB_SET_TYPEAHEAD Clipper compatible

  * harbour/source/rtl/gtcgi/Makefile
  * harbour/source/rtl/gtcgi/gtcgi.c
  - harbour/source/rtl/gtcgi/mousecgi.c
    * rewritten for new GT API
      some detail behaviors has been changed but I think the current
      implementation is better for CGI programs output - please check
      and fix me if necessary

  * harbour/source/rtl/gtcrs/Makefile
  - harbour/source/rtl/gtcrs/charmap.prg
  + harbour/source/rtl/gtcrs/chrmap.c
  - harbour/source/rtl/gtcrs/debug.map
  - harbour/source/rtl/gtcrs/eterm.map
  * harbour/source/rtl/gtcrs/gtcrs.c
  + harbour/source/rtl/gtcrs/gtcrs.h
  + harbour/source/rtl/gtcrs/hb-charmap.def
  - harbour/source/rtl/gtcrs/kbdcrs.c
  - harbour/source/rtl/gtcrs/keymap.prg
  - harbour/source/rtl/gtcrs/linux.map
  - harbour/source/rtl/gtcrs/mousecrs.c
    * new GTCRS based on my xHarbour and Flagship curses code
      Please not that at runtime it looks for a file
      /etc/harbour/hb-charmap.def where user can fully tune output
      for his terminal. This file is included with proper path in
      binaries created by make_rpm.sh and make_tgz.sh
      Ryszard I've removed some of your extensions which are no longer
      necessary and some other (keyboard sequence redefinition) should
      be done in a little bit differ way. I would like to talk about it
      when you test current code.
      Added support for extended mouse keys (middle button and wheel).

  * harbour/source/rtl/gtdos/Makefile
  * harbour/source/rtl/gtdos/gtdos.c
  - harbour/source/rtl/gtdos/mousedos.c
    * rewritten for new GT API
      Fixed some small problems, finished mouse code which for DJGPP
      is fully Clipper compatible with real mouse SAVE/RESTORE code.
      For other compilers it should be updated depending on memory
      model and used DPMI driver (if any).

  * harbour/source/rtl/gtos2/Makefile
  * harbour/source/rtl/gtos2/gtos2.c
  - harbour/source/rtl/gtos2/mouseos2.c
    * rewritten for new GT API
      Fixed some problems and finished the mouse code.
      Please test it - I made all modifications without OS2 and
      I was not able to make any test. I'm interesting in information
      if it works and the speed difference - f.e. results from
      tests/vidtest.prg run with previous and current version.

  * harbour/source/rtl/gtpca/Makefile
  * harbour/source/rtl/gtpca/gtpca.c
  - harbour/source/rtl/gtpca/kbdos2.gcc
  - harbour/source/rtl/gtpca/mousepca.c
    * rewritten for new GT API
      and finished so now it's full functional GT driver
      I'm interesting in keyboard sequences used by PC-ANSI drivers
      in DOS so it will be possible to implement also support for
      extended keys input.

  * harbour/source/rtl/gtsln/Makefile
  * harbour/source/rtl/gtsln/gtsln.c
  + harbour/source/rtl/gtsln/gtsln.h
  * harbour/source/rtl/gtsln/kbsln.c
  * harbour/source/rtl/gtsln/keytrans.c
  * harbour/source/rtl/gtsln/mousesln.c
    * rewritten for new GT API basing on current xHarbour code
      added support for slang 1.4x patched for UNICODE (Debian
      patches used by most of current Linux distributions) and
      slang 2.x - It's unicode ready, tries to detect terminal mode
      (utf-8/iso) at startup and switch the internal logic to
      iso/unicode mode. When compiled with slang 1.4x or 2.x
      and terminal is in UTF-8 it can display all characters like
      in DOS if only used font have them or good fall-back table is
      loaded (f.e. the one created by QRCZAK)
      Added support for extended mouse keys (middle button and wheel).

  * harbour/source/rtl/gtstd/Makefile
  * harbour/source/rtl/gtstd/gtstd.c
  - harbour/source/rtl/gtstd/mousestd.c
    * rewritten for new GT API
      Now it can work as full screen GT driver redrawing the previous
      screen contents from internal GT core buffers. I run with this
      GT some of my programs and they work quite well ;-) of course
      without colors.

  * harbour/source/rtl/gtwin/Makefile
  * harbour/source/rtl/gtwin/gtwin.c
  - harbour/source/rtl/gtwin/mousewin.c
    * updated for new GT API

  + harbour/source/rtl/gtxwc/Makefile
  + harbour/source/rtl/gtxwc/gtxwc.c
  + harbour/source/rtl/gtxwc/gtxwc.h
    * new XWindow Console GT driver based on my and Giancarlo Niccolai
      code form xHarbour - this GT can work in XWindow environment only
      and create its own window for  console output. It delays the
      initialization to the moment when user try to display anything on
      the screen so even without X Window system programs which uses this
      GT can work as long as use only outstd/outerr output.

  * harbour/source/vm/arrays.c
    * updated for API modifications
    + added hb_arrayId(),
    * changed hb_arrayClone() declaration to:
         HB_EXPORT PHB_ITEM hb_arrayClone( PHB_ITEM pSrcArray )
    * changed hb_arrayFromParams() declaration to:
         PHB_ITEM hb_arrayFromParams( int iLevel )

  * harbour/source/vm/arrayshb.c
    * updated for API modifications
    + added new parameter iLevel to function HB_APARAMS()

  * harbour/source/vm/classes.c
  * harbour/source/vm/cmdarg.c
  * harbour/source/vm/dynlibhb.c
  * harbour/source/vm/estack.c
  * harbour/source/vm/fm.c
  * harbour/source/vm/garbage.c
  * harbour/source/vm/maindll.c
  * harbour/source/vm/maindllh.c
  * harbour/source/vm/maindllp.c
  * harbour/source/vm/mainstd.c
  * harbour/source/vm/mainwin.c
  * harbour/source/vm/memvars.c
  * harbour/source/vm/pcount.c
  * harbour/source/vm/proc.c
    * updated for API modifications

  * harbour/source/vm/codebloc.c
    * updated for API modifications
    + added hb_codeblockId()

  * harbour/source/vm/dynsym.c
    * updated for API modifications
    + added new functions:
      hb_dynsymFindSymbol(), hb_dynsymGetSymbol(),
      hb_dynsymSymbol(), hb_dynsymName(),
      hb_dynsymMemvarHandle(), hb_dynsymAreaHandle(), hb_dynsymSetAreaHandle()

  * harbour/source/vm/eval.c
    * updated for API modifications
    * call hb_vmPushState()/hb_vmPopState() in hb_itemDo()/hb_itemDoC()
      functions - it's necessary to make HVM reentrant safe.

  * harbour/source/vm/extend.c
    * updated for API modifications
    + added hb_extIsObject() similar to existing hb_extIsArray()

  * harbour/source/vm/hvm.c
    * updated for API modifications
    + added new functions: hb_vmPushState(), hb_vmPopState()
      which save/restore HVM state (the top stack value which can be
      processed and return item and maybe sth else in the future) making
      HVM ready for reentrant.

  * harbour/source/vm/itemapi.c
    * updated for API modifications
    + added new function:
         HB_EXPORT PHB_SYMB hb_itemGetSymbol( PHB_ITEM pItem );
    ! fixed bug in hb_itemPutNInt()

  * harbour/tests/Makefile
  * harbour/utils/hbdoc/Makefile
  * harbour/utils/hbextern/Makefile
  * harbour/utils/hbmake/Makefile
  * harbour/utils/hbrun/Makefile
  * harbour/utils/hbtest/Makefile
    - removed badly added: dbfntx, dbfcdx, dbffpt, hbsix libraries.
      what broke GNU make compilation for some compilers
      This libraries should be included automatically when RDD lib
      is included by *.cf files

   Summary:
      The whole patch (cvs diff -uN) is ~1.5MB length and I cannot describe
      everything in details - sorry but it was too much modifications in
      one commit so now just some of general notes.
      The header files included as is does not have any information about
      internal HVM structures and some functions. In practice only HB_SYMB
      is public and it has to be public for .c files generated from .prg
      so I force the fixed size of this structure (alignment independent)
      by redefining some members to union with void * - it's a little bit
      ugly trick but it effectively eliminates the problem of linking
      binaries compiled with differ alignment C compiler switches.
      The structures like HB_ITEM, HB_CODEBLOCK, HB_STACK, HB_DYNS are not
      longer defined and pointers to the defined as void * - like in Clipper
      the ITEM structure. It caused that I had to add some new functions
      to make some operation still possible to implement. If I missed sth
      and any of you will have a problem with your code then please inform
      me about it and after a small discussion on Harbour developers list
      we can decide if other functions should be added.
      The internal API is still accessible. It's enough to include "hbvmopt.h"
      file before other header files to enable it. Now only files in
      source/vm directory include it.
      The 3-rd party code which does not include hbvmopt.h (or tries to
      set some internals macros) should be safe for future HVM modifications
      and will work also with new binaries so 3-rd party library developers
      should remember about it. If they won't then it's only their and
      their clients problem not Harbour developers.
      With this modifications I also create new GT model which is similar
      to the one used by RDD with multi inheritance. It can be quite easy
      extended to simultaneously load more then one GT subsystem (sth like
      work areas in RDD) but I left it for the future when someone may
      need it. hbapigt.h file now contains only information about public
      functions and does not have any code which depends on current
      internal implementation - it should be backword compatible as long
      as somone did not try to use internal GT functions.
      The internal GT system use hbgtcore.h file which should not be
      included by 3-rd party code as long as someone will not make new
      GT driver. The internal GT code is new so I expect that it will
      be changed yet in the nearest future (I'm waiting for other developers
      feedback) and in such case any 3-rd party GTs will have to be updated.
      How it works:
         The base GT driver (GTNUL) is fully functional GT driver which
         makes all operations on memory buffer. After each screen write
         Flush() method is called which check for dispcount() and if
         it's 0 then call Refresh() method to update modified area by
         Redraw() method. This method is dummy in GTNUL and external
         output with this GT can be reached by outstd()/outerr() which
         are now redirected to GT methods. A simple GT driver may overload
         only Refresh() method to give full screen output.
         Application can use only this GT driver and it seems to be very
         good choice for GUI and background daemon/service programs.
         This GT is loaded at startup then all other GTs can be loaded
         later and inherit from the previously loaded GT drivers.
         The new GT driver can overload as much method as wants/needs.
         Now all GT operations are implemented as GT method so GT driver
         can easy change their default behavior, f.e. it may fully overload
         color parsing methods and use differ or extended to Clipper color
         definitions.
         I rewrote all existing GTs to work with new GT model.
         OS2 users - please test GTOS2 which I was not able to test and
         see the note in Redraw() method. If possible please make some
         speed tests.
         In fact now there is much more internal operations then it was
         before but because they are done on memory only then current
         code is much faster in this GT drivers which so far makes all
         operations on real video area. I made some tests with GTNUL
         and tests/vidtest.prg and the total overhead is minimal. Now
         dipbegin()/dispend() in practice does not cost anything so it
         gives additional speed improvement in application which extensively
         use it.
         More then one GT driver can be linked with final binaries and
         chose on application startup by //GT<NAME> switch and/or environment
         variable HB_GT=<name>
         In the RTL is new GT function GTSYS() which works in similar way
         to RDDSYS() in RDD subsystem and for linking default GT driver
         for given platform. When RTL is compiled the default GT driver
         is set to HB_GT_DEFAULT envvar and if not exist to HB_GT_LIB
         envvar and if it also does not exist to hard coded platfom GTs
         (see source/rtl/gtsys.c and source/rtl/Makefile for rules)
         Adding to source code:
            ANNOUNCE GTSYS
         disable linking the default GT driver and:
            REQUEST HB_GT_<name>
         for linking given (<name>) GT driver, f.e.: REQUEST HB_GT_WIN
         If you are working in SH environment (Linux and other *nixes users,
         DJGPP bash, MinGW shell then it's possible to use -gt<name> switch
         in hblnk / hbmk scripts to force linking GT drivers (it could be
         repeated with different <name>) and the first one becomes the default
         one. F.e.:
            xhbmk -m -n -w -es2 -gtcrs -gtsln -gtstd -gtpca vidtest.prg
         Usually the GT driver are loaded at HVM startup but it's possible
         to load it later. I created new GT driver CTW which gives full
         CT3 like Window system. The CT3 extended driver change the behavior
         of some function in Clipper extended driver, f.e WRITECON() or
         SETPOS() with parameters out of screen range. So I implemented it
         CTW as RT GTs which is loaded when some of CTWIN function is used
         (f.e. WOPEN()/WBOARD()) and inherits from any existing GT driver.
         This is full CT3 WIN implementation with all detail behaviors I
         found (with some CT3 bug fixes). It does not have any CT3 limitations
         and can be used for any virtual screen/window size though I hardcoded
         CT3 limitation for backword compatibility. If somone will want to
         remove it then it will be enough to delete few lines from ctwin.c
         file. I'm not CTWIN Clipper user so maybe I missed some side effects
         in this driver and was not able to well test it so if you will find
         any incompatibilities then please inform me.
         THe default GT buffer uses 32bit character cell internally but
         in savescreen/restscreen it uses VGA compatible two bytes character
         cell. Some GT drivers may want to use differ character cell.
         Now GTCRS and GTSLN use 32bit character cell by default. They
         need additional information about character set (box/normal) to
         properly display box characters. It is possible to force in this
         GT drivers using Clipper compatible character cell by calling:
            hb_gtInfo( GTI_COMPATBUFFER, <lCompat> ) -> <lPreviousSeting>
         but in may cause that box drawing characters will be lost in
         some countries after RESTSCREEN(). It will depend on used code
         page.
         HB_GTINFO() is new function which works in similar way to DBINFO()
         in RDD. It allows to retrieve/change some of GT driver settings.
         GTI_* actions are defined in hbgtinfo.ch - it has all GTI_*
         definitions used in xHarbour. Now in Harbour only few of them
         are implemented.
         The new three .prg functions:
            HB_SETKEYCP( <cTermCP> [,<cHostCP>] )
            HB_SETDISPCP( <cTermCP> [,<cHostCP>] [,<lBoxChar>] )
            HB_SETTERMCP( <cTermCP> [,<cHostCP>] [,<lBoxChar>] )
         have been added. They set automatic input (HB_SETKEYCP)
         and output (HB_SETDISPCP) (or both: HB_SETTERMCP) character
         translation. They are also important for some GTs which
         informing them about used internal code page for unicode
         translation (GTXWC, GTSLN) and/or chosing proper character
         set (standard/alternate) for letters and other (f.e. box
         drawing characters) (GTCRS, GTSLN),
            <cTermCP> is encoding used on external (terminal) side
            <cHostCP> is encoding used internally, if not given then
                      current code page set HB_SETCODEPAGE() is used.
                      some of GTs which uses unicode output may
                      ignore <cTermCP>
            <lBoxChar> is optional parameter which interacts with dispbox()
                       output disabling switching to alternate character
                       set in some GTs. It effectively causes that if internal
                       (host) code page contains some letters on the box char
                       positions then they will be shown also by box drawing
                       functions like dispbox() instead of CP437 characters.
                       In some cases it could be useful. By default lBoxChar
                       is not set and GTs which can switch between standard
                       and alternate character set (GTCRS, GTSLN) will try to
                       use alternate character set for box drawing functions.

      Victor: I removed some of your functions. They can be very easy
      implemented with hb_gt_GetChar()/hb_gt_PutChar() but I do not want to
      make them part of documented external API because some GT drivers may
      want to use absolutely differ color definitions and they will stop to
      work so I do not want to make this functions documented external API.

      Ryszard: Setting alternative debug keys does not longer work.
      I like such possibilities but it should be implemented in differ
      way to f.e. using HB_GTINFO interface to allow low level GT driver
      extensions, f.e. in *nixes using CTRL+[A-Z] and SIGINT, SIGQUIT,
      SIGTSTP signals for real asynchronous setting of debug/cancel flag
      without keyboard polling from main HVM loop. I would like to discus
      about such more general solution.

   *** Please updated non GNU make files ***
2006-02-04 16:16:48 +00:00
Przemyslaw Czerpak
473b620290 2005-11-22 01:51 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbsetup.ch
    * enable HB_COMPAT_FLAGSHIP by default
      I hope it will not be a problem - if it does then I can disable it
      but in *nixes for a long time FlagShip was the only one Clipper
      alternative and some of its functions are quite often used in
      Clipper/FoxPro programs ported to *nixes so I'd want to keep it
      enabled at least when HB_OS_LINUX/HB_OS_UNIX is defined.


  * harbour/include/hbvm.h
    + added missing extern in hb_vmAtInit() and hb_vmAtExit() declarations

  * harbour/include/hbvmpub.h
    * formatting

  * harbour/source/rdd/dbcmd.c
    ! fixed the problem with fieldput(<n>,nil) at phantom recrod reported
      by Victor
    * do not use C level HB_ITEM

  * harbour/source/rdd/dbf1.c
  * harbour/source/rdd/dbfcdx/dbfcdx1.c
  * harbour/source/rdd/dbfntx/dbfntx1.c
    ! fixed possible GPF when "/an/existing/path/" was used as file name.
      No in DOS in such case it will casue RT error that file:
         /an/existing/path/.<ext>
      cannot be created (like in Clipper) but in other systems (f.e. Linux)
      which allow to use such file names it will work without any problems.

  * harbour/source/rdd/dbffpt/dbffpt1.c
    * do not use C level HB_ITEM

  * harbour/source/rtl/Makefile
  + harbour/source/rtl/strpeek.c
    + added STRPEEK and STRPOKE FS functions covered by HB_COMPAT_FLAGSHIP
      macro

  * harbour/source/rtl/philes.c
    ! fixed GPF when unshareing string item buffer with embedded 0 by using
      hb_itemUnShare()

  * harbour/include/hbapiitm.h
  * harbour/source/vm/itemapi.c
    + added hb_itemUnShare() - /* un-share given string item */
      and hb_itemClone() - /* clone the given item */
2005-11-22 00:55:51 +00:00