Commit Graph

203 Commits

Author SHA1 Message Date
Viktor Szakats
097ae961f2 2008-08-17 17:00 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* contrib/examples/guestbk/guestbk.ini
   * contrib/examples/guestbk/testcgi.prg
   * contrib/examples/hscript/hscript.prg
   * contrib/examples/pp/hbppdef.h
   * contrib/examples/pp/hbpptbl.c
   * contrib/gtwvg/tests/demowvg.prg
   * contrib/gtwvg/wvgclass.prg
   * contrib/hbapollo/tests/apollo.prg
   * contrib/hbgd/ChangeLog
   * contrib/hbgt/doc/gendoc.bat
   * contrib/hbmisc/doc/gendoc.bat
   * contrib/hbvpdf/hbvpdf.prg
   * contrib/hbvpdf/hbvpdft.prg
   * contrib/hbwhat32/_winclpb.c
   * contrib/hbwhat32/_windate.c
   * contrib/hbwhat32/_windc.c
   * contrib/hbwhat32/_windir.c
   * contrib/hbwhat32/_windraw.c
   * contrib/hbwhat32/_wingdi.c
   * contrib/hbwhat32/_winmisc.c
   * contrib/hbwhat32/_winpen.c
   * contrib/hbwhat32/_winprn.c
   * contrib/hbwhat32/_winrect.c
   * contrib/hbwhat32/_winrgn.c
   * contrib/hbwhat32/_winsock.c
   * contrib/hbwhat32/_wintbar.c
   * contrib/hbwhat32/import.ch
   * contrib/hbwhat32/sqltypes.ch
   * contrib/hbwhat32/windebug.prg
   * contrib/hbwhat32/winerror.prg
   * contrib/hbwhat32/winini.prg
   * contrib/hbwhat32/winrbar.prg
   * contrib/hbwhat32/winstruc.ch
   * contrib/hbwhat32/wintbar.prg
   * contrib/hbziparch/hbziparc.c
   * contrib/rddads/doc/gendoc.bat
   * doc/cmdline.txt
   * doc/dirstruc.txt
   * doc/en/cmdline.txt
   * doc/en/dbstrux.txt
   * doc/en/dir.txt
   * doc/en/file.txt
   * doc/en/rddord.txt
   * doc/es/dbstrux.txt
   * doc/es/file.txt
   * doc/es/hbpplib.txt
   * doc/howtomak.txt
   * doc/hrb_faq.txt
   * doc/windll.txt
   * include/dbinfo.ch
   * source/debug/dbghelp.prg
   * source/vm/classes.c
   * source/vm/hvm.c
   * tests/keywords.ch
   * tests/output.prg
   * tests/statics1.prg
   * tests/statics2.prg
   * tests/test_all.prg
   * tests/testcgi.prg
   * tests/testpre.prg
   * tests/testrdd2.prg
   * utils/hbmake/hbmake.prg
   * utils/hbmake/hbmutils.prg
     ! Some filename casing related fixes, cleanups.
     * Some non-ASCII drawing chars in comments changed to ASCII ones.
2008-08-17 15:04:11 +00:00
Przemyslaw Czerpak
29b52145d1 2008-08-01 03:06 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbpp.h
  * harbour/include/hbexprb.c
  * harbour/source/pp/ppcore.c
  * harbour/source/vm/evalhb.c
  * harbour/source/vm/runner.c
  * harbour/source/vm/hvm.c
  * harbour/source/vm/fm.c
  * harbour/source/vm/eval.c
  * harbour/source/vm/dynlibhb.c
  * harbour/source/vm/classes.c
  * harbour/source/rdd/hbsix/sxord.c
  * harbour/source/compiler/hbmain.c
  * harbour/source/compiler/harbour.y
    * pacified warnings
2008-08-01 01:06:47 +00:00
Przemyslaw Czerpak
0891ca7ddc 2008-07-31 17:41 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/classes.c
    + adding 2-nd parameter to __clsGetProperties()
      When it's TRUE then __clsGetProperties() returns also exported
      messages which have corresponding assign messages (with "_" prefix)

  * harbour/source/rtl/objfunc.prg
    + added __objGetProperties( oObject, [ lAllExported = .F. ] ) ->
                  aMsgAndValues
      This function returns list of PROPERTY message with their values,
      when 2-nd parameter is true it also returns exported messages which
      which have corresponding assign messages (with "_" prefix)
      This function is designed to use in object inspectors.
2008-07-31 15:42:00 +00:00
Viktor Szakats
6723c119b5 2008-06-10 11:10 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* source/rtl/gtwvt/gtwvt.c
     ! Fixed maximized window size.

   * contrib/hbw32/dllcall.c
     * Further cleanup.
     ! MessageBox()es converted to RTE calls.

   * contrib/hbcurl/hbcurl.c
   * contrib/rddads/ads1.c
   * contrib/rddads/adsfunc.c
   * source/rdd/dbcmd.c
   * source/rdd/dbcmd53.c
   * source/rdd/dbcmdx.c
   * source/rdd/dbsql.c
   * source/rdd/wafunc.c
   * source/rdd/workarea.c
   * source/rtl/abs.c
   * source/rtl/at.c
   * source/rtl/cdpapi.c
   * source/rtl/chrasc.c
   * source/rtl/copyfile.c
   * source/rtl/datec.c
   * source/rtl/dateshb.c
   * source/rtl/do.c
   * source/rtl/gtfunc.c
   * source/rtl/hbadler.c
   * source/rtl/hbbit.c
   * source/rtl/hbcrc.c
   * source/rtl/hbhex.c
   * source/rtl/hbinet.c
   * source/rtl/hbregex.c
   * source/rtl/hbregexc.c
   * source/rtl/hbrunfun.c
   * source/rtl/hbtoken.c
   * source/rtl/hbzlib.c
   * source/rtl/left.c
   * source/rtl/len.c
   * source/rtl/math.c
   * source/rtl/minmax.c
   * source/rtl/philes.c
   * source/rtl/philesx.c
   * source/rtl/replic.c
   * source/rtl/round.c
   * source/rtl/run.c
   * source/rtl/set.c
   * source/rtl/space.c
   * source/rtl/str.c
   * source/rtl/strcase.c
   * source/rtl/strpeek.c
   * source/rtl/strtran.c
   * source/rtl/strzero.c
   * source/rtl/substr.c
   * source/rtl/transfrm.c
   * source/rtl/trim.c
   * source/rtl/type.c
   * source/rtl/val.c
   * source/rtl/valtype.c
   * source/rtl/word.c
   * source/vm/arrayshb.c
   * source/vm/classes.c
   * source/vm/debug.c
   * source/vm/eval.c
   * source/vm/evalhb.c
   * source/vm/hashfunc.c
   * source/vm/memvars.c
   * source/vm/runner.c
     * &hb_errFuncName -> HB_ERR_FUNCNAME
     % Using HB_ERR_FUNCNAME wherever possible.
2008-06-10 09:13:33 +00:00
Viktor Szakats
d9fe9a4688 2008-06-01 13:26 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* source/vm/extrap.c
     ! Fixed missing header for OS/2.

   * source/vm/classes.c
     ! Minor fix in internal error text.

   * contrib/hbcurl/make_b32.bat
   * contrib/hbcurl/make_vc.bat
   * contrib/hbcurl/hbcurl.c
   * contrib/hbcurl/hbcurl.ch
   * contrib/hbcurl/tests/ftp_uldl.prg
     ! non-GNU make will also look into the /bin folder 
       for .dlls.
     ! Lots of fixes, too many to mention.
     + Enabled GC pointers. (see TOFIX though)
     + Added all remaining CURL 'easy' API parts and 
       implemented all options existing in 7.18.1:
       + All option values (except bit-level ones) made available in hbcurl.ch
       + All options updated to latest CURL version in hbcurl.ch
       + All error codes made available in hbcurl.ch
       + CURL_EASY_DUPLICATE()
       + CURL_EASY_RESET()
       + CURL_EASY_PAUSE()
       + CURL_EASY_SEND() (not yet available in stable builds)
       + CURL_EASY_RECV() (not yet available in stable builds)
       + CURL_EASY_GETINFO()
       + CURL_ESCAPE() (obsolete)
       + CURL_UNESCAPE() (obsolete)
       + CURL_GETDATE()
     ; TOFIX1: Could someone look at it? In case I call the destructor 
               (curl_easy_cleanup()) manually, the garbage collector 
               will run into an invalid pointer, when terminating the 
               test program.
     ; TOFIX2: The casting to 'curl_off_t' goes wrong. Could someone 
               help?
     ; NOTE1:  Harbour needs at least libcurl 7.17.0. Unfortunately 
               compile time version detection is not working at this time, 
               so try with the latest version 7.18.1.
     ; NOTE2:  Most callback interfaces are not implemented on the 
               Harbour level.
     ; NOTE3:  Harbour is currently not optimizing
               "<const1> ** <const2>" type of expressions at compile time.
               Could we add it? This expression is not widespread, 
               but anyways, it cannot hurt, if isn't too much 
               work to do.
2008-06-01 11:31:48 +00:00
Viktor Szakats
24ec421a42 2008-05-21 17:45 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* harbour.spec
     + Added HU translation (cpwin).

   * source/rtl/gtfunc.c
     % Minor opt.

   * source/rtl/console.c
   * source/rtl/fserror.c
   * source/rtl/strmatch.c
   * source/rtl/padr.c
   * source/rtl/hbhex.c
   * source/rtl/at.c
   * source/rtl/abs.c
   * source/rtl/dates.c
   * source/rtl/padc.c
   * source/rtl/mod.c
   * source/rtl/hbrandom.c
   * source/rtl/filesys.c
   * source/rtl/padl.c
   * source/rtl/val.c
   * source/rtl/hbregex.c
   * source/vm/runner.c
   * source/vm/hashes.c
   * source/vm/itemapi.c
   * source/vm/hvm.c
   * source/vm/maindllp.c
   * source/vm/fm.c
   * source/vm/arrayshb.c
   * source/vm/classes.c
   * source/common/hbtrace.c
     * Formatting (whitespace only)
2008-05-21 15:50:34 +00:00
Przemyslaw Czerpak
1bb3ab7eb9 2008-05-21 11:10 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/rtl/tbrowse.prg
    * updated some comments

  * harbour/source/vm/hvm.c
  * harbour/source/vm/classes.c
    * formtting
2008-05-21 09:10:52 +00:00
Przemyslaw Czerpak
05dd30df9b 2008-04-22 04:50 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapicls.h
  * harbour/source/vm/classes.c
    + added new function hb_dbgObjSendMessage() which allows to
      call messages with given given execution context for proper
      scope checking

  * harbour/source/debug/dbgentry.c
    + added HB_DBG_SENDMSG() for calling messages with given execution
      context

  * harbour/source/debug/dbgtobj.prg
    * removed all __obj*() function calls
    * use HB_DBG_SENDMSG() to access/assign object variables
    ! fixed default value in GET operation called from object
      inspector to always show current object variable value
    ! fixed set for object variables which hold value: "Method"
      they were recognized as method
      Now object variables can be inspected by debugger.
      If object has multiple private messages with the same name
      inherited from parent classes then their context will be
      dynamically changed depending on position in currently
      debugged code.
2008-04-22 02:51:18 +00:00
Przemyslaw Czerpak
9cb4e6047d 2008-03-05 19:10 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/contrib/hbct/screen2.c
    ! fixed possible vary bad bug (memory buffer overflow) in SCREENSTR()

  * harbour/source/rtl/hbffind.c
    ! fixed possible GPF in some *nixes

  * harbour/source/vm/classes.c
    ! do not execute the same destructor inherited from different parent
      classes more then once

  * harbour/source/rtl/transfrm.c
    ! fixed bug with '9' used as stop condition of function pattern
      this character cannot be stripped, f.e.:
        ? transform( "abc", "@_99*" )
    ! fixed bug with '*' or '$' used with @), f.e.:
        ? transform( -12345, "@) $999999" )
    ! fixed replacing '.' with ',' when @E is used without picture part, f.e.:
        ? transform( 123.45, "@E" )
    ! fixed ',' conversions
        ? transform( 12.34,"@E ab,cd.ef9,9.99,.--" )
    ! fixed bug with picture starting with ".", f.e.:
	? transform( 0.3456, ".999" )
    ! fixed "@(" and "@)" conversions, f.e.:
        ? transform( -12345, "@) 1999*999" )
    ! fixed late oveflow detection in "@(" and "@)", f.e.:
        ? transtest( -12345, "@( 6798^999" )
    ! fixed "@E" conversion for dates to keep user delimiters set in
      _SET_DATEFORMAT, f.e.:
        set( _SET_DATEFORMAT, "mm:dd:yyyy" ); ? transform( date(), "@E" )
        set( _SET_DATEFORMAT, "yyyy<mm>dd" ); ? transform( date(), "@E" )
      Please note that Harbour is not strictly Clipper compatible here
      because it respects _SET_DATEFORMAT set by user.
    ! fixed 64bit integer conversion by eliminating conversion to
      'double' f.e.:
        ? transform(  1234567890123456789, "99999999999999999999" )
        ? transform( -1234567890123456789, "99999999999999999999" )
    ! some other fixes, see regression test transtst.prg
    % speed improvement in numeric conversions

  + harbour/tests/transtst.prg
    + added regression test for transform function

  * harbour/utils/hbtest/rt_trans.prg
    * disabled transform() tests for "@E" and result smaller then 5 bytes
      CA-Cl*pper do not check result size and always exchanges
      bytes 1-2 with bytes 4-5 for @E conversion. It's buffer overflow
      bug and I do not want to replicate it inside our transform
      implementation. It also causes that the results for for strings
      smaller then 5 bytes behaves randomly.
      In fact precise tests can show that it's not random behavior
      but CA-Cl*pper uses static buffer for result and when current one
      is smaller then 5 bytes then first two bytes are replaced with
      4-5 bytes from previous result which was length enough, f.e.:
               ? transform( "0123456789", "" )
               ? transform( "AB", "@E" )
               ? transform( "ab", "@E" )
      Replicating exact CA-Cl*pper behavior it's trivial (it will be enough
      to use static buffer two and not check the size of current result) but
      IMHO it's bug.

  * harbour/source/rtl/round.c
    * added strictly Clipper compatible code covered by HB_C52_STRICT
      and comment about possible difference in Harbour.

  * harbour/include/hbgtinfo.ch
  * harbour/source/rtl/hbgtcore.c
  * harbour/source/rtl/gtxwc/gtxwc.c
  * harbour/source/rtl/gtsln/gtsln.c
  * harbour/source/rtl/gttrm/gttrm.c
  * harbour/source/rtl/gtwvt/gtwvt.c
    + added HB_GTI_ISUNICODE - it returns logical value with information
      about Unicode mode in active GT driver - it's necessary for proper
      CP initialization in some GTDs which can work in both mode depending
      on client side settings

  * harbour/source/rtl/gttrm/gttrm.c
    * improved UTF-8 detection
    * added automatic PuTTY detection
    * improved PuTTY and some xterm key handling
    * added some missing RXVT keys
2008-03-05 18:10:52 +00:00
Viktor Szakats
80e4b3ae70 2008-01-26 07:53 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* source/pp/pplib.c
   * source/rtl/run.c
   * source/rtl/hbgtcore.c
   * source/rtl/philesx.c
   * source/rtl/strzero.c
   * source/vm/runner.c
   * source/vm/debug.c
   * source/vm/itemapi.c
   * source/vm/arrayshb.c
   * source/vm/classes.c
   * source/rdd/dbfntx/dbfntx1.c
   * source/rdd/dbfcdx/dbfcdx1.c
     ! Replaced 9999 internal and RT error codes with 
       unique ones, in new Harbour ranges:
       RT/PP: 1001-1999
       RT/BASE: 6001-6999
          runner: 6101-6199
       Internal/misc: 6001-6999
       Internal/RDD: 7001-7999
          CDX: 7001-7099
          NTX: 7101-7199
       NOTE: If you find some more 9999s in the core code, 
             pls tell.
2008-01-26 06:54:55 +00:00
Przemyslaw Czerpak
4d9930caa6 2008-01-09 15:03 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/estack.c
    * added missing static to s_initSymbol declaration

  * harbour/include/hbgtinfo.ch
  * harbour/source/rtl/scroll.c
    * formatting

  * harbour/common.mak
    * added empty line necessary for some make systems (f.e. wmake)

  * harbour/bin/hb-func.sh
    * changed system libs order to avoid problems on some platforms

  * harbour/bin/pack_src.sh
    * collect information about repository files using 'svn status -v'
      command instead of scanning .svn/entries files to avoid problems
      with different formats used by SVN

  * harbour/include/hbchksum.h
  * harbour/include/hbset.h
    ! added missing extern in few function prototypes

  * harbour/include/hbclass.ch
    * use HB_CLS_PARAM_LIST macro instead of ... for strict C52 mode

  * harbour/source/common/hbfsapi.c
    + added missing const to one declaration

  * harbour/source/common/hbstr.c
    * minor cleanup in hb_stricmp()

  * harbour/source/rtl/inkey.c
    ! casting to avoid negative values during char to int translation

  * harbour/source/rtl/mouse53.c
    * added one internal definition

  * harbour/source/rtl/philes.c
    * removed unnecessary #include(s)
    * added missing const to one declaration

  * harbour/source/rtl/valtype.c
  * harbour/source/vm/hashfunc.c
    * cleanup RT error call to eliminate hb_paramError() function

  * harbour/source/pp/pplib.c
  * harbour/source/vm/runner.c
  * harbour/source/vm/debug.c
  * harbour/source/vm/arrayshb.c
  * harbour/source/vm/classes.c
  * harbour/source/vm/hvm.c
  * harbour/source/rtl/hbgtcore.c
  * harbour/source/rtl/gtfunc.c
  * harbour/source/rtl/hbinet.c
  * harbour/source/rtl/hbregex.c
  * harbour/source/rtl/idle.c
  * harbour/source/rtl/errorapi.c
  * harbour/source/rtl/hbtoken.c
  * harbour/source/rtl/direct.c
  * harbour/source/rdd/dbcmd.c
  * harbour/source/rdd/dbcmd53.c
  * harbour/source/rdd/fieldhb.c
  * harbour/source/rdd/hbsix/sxcompr.c
  * harbour/source/rdd/hbsix/sxcrypt.c
  * harbour/source/compiler/hbcmplib.c
  * harbour/contrib/hbrddads/adsfunc.c
  * harbour/contrib/hbrddads/adsmgmnt.c
    - removed unnecessary calls to hb_ret()
    % replaced hb_itemRelease( hb_itemReturn( pItem ) ) with
      hb_itemReturnRelease( pItem )
    % replaced hb_itemPut*( hb_arrayGetItemPtr( pArray, ... ), ... ) with
      hb_arraySetNI( pArray, ... )

  * harbour/source/macro/macro.y
  * harbour/source/macro/macro.yyc
  * harbour/contrib/xhb/cstructc.c
  * harbour/contrib/hbw32/w32_ole.c
  * harbour/contrib/hbgtwvg/wvtcore.c
    * cleaned typos with double ;;

  * harbour/source/vm/extend.c
  * harbour/source/rtl/math.c
    * cleaned HB_EXPORT usage

  * harbour/source/pp/ppcore.c
    ! fixed Harbour extension which allows to use match marker
      at the beginning of rule definition

  * harbour/source/main/harbour.c
    ! fixed hex conversion in FM log module - fix done by Phil Krylov
      in xHarbour

  * harbour/source/rdd/nulsys/nulsys.c
    + added dummy version of DBEVAL() and DBFILTER() - these functions
      are used in RTL

  * harbour/contrib/hbct/bitnum.c
    + added INTNEG(), INTPOS()

  + harbour/contrib/hbct/ctrand.prg
    + added RANDOM(), RAND() - borrowd from xHarbour by Pavel Tsarenko

  + harbour/contrib/hbct/setrc.c
    + added SETRC()

  * harbour/contrib/hbct/getinput.prg
    % minor optimization

  * harbour/contrib/hbct/Makefile
  * harbour/contrib/hbct/common.mak
    * updated for new files

  * harbour/contrib/hbnf/tempfile.prg
    * use HB_FTempCreate() - modification borrowed from xHarbour
      TOFIX this function uses hb_isbyref() which does not exist
      in Harbour

  * harbour/config/w32/msvc.cf
    + added -nologo flag for cl.exe (Phil Krylov's modification borrowed
      from xHarbour

  * harbour/config/w32/mingw32.cf
    - removed repeated definitions

  * harbour/config/w32/install.cf
    ! added alternative install rule for command.com with max line size limit
2008-01-09 14:04:12 +00:00
Przemyslaw Czerpak
a3fc484d14 2007-11-07 13:53 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/pp/ppcore.c
  * harbour/source/rtl/hbgtcore.c
  * harbour/source/rtl/cdpapi.c
  * harbour/source/rtl/mlcfunc.c
  * harbour/source/vm/classes.c
  * harbour/source/common/reserved.c
  * harbour/source/compiler/hbpcode.c
  * harbour/source/compiler/gencc.c
  * harbour/source/compiler/hbfunchk.c
    * cleaned possible dangerous code reported by Chen - many thanks
2007-11-07 12:53:20 +00:00
Przemyslaw Czerpak
7aa8292529 2007-11-04 19:20 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbcomp.h
  * harbour/include/hbmacro.h
  * harbour/source/compiler/hbmain.c
  * harbour/source/compiler/harbour.y
  * harbour/source/vm/macro.c
  * harbour/source/vm/garbage.c
  * harbour/source/vm/hvm.c
  * harbour/source/vm/classes.c
  * harbour/source/rdd/dbf1.c
  * harbour/source/rdd/dbffpt/dbffpt1.c
  * harbour/source/rtl/binnum.c
  * harbour/source/rtl/gtwvt/gtwvt.c
    * added explicit casting or changed some declarations to avoid
      warning about possible data lost in conversions
  * harbour/source/rtl/direct.c
    % optimized directory array creation and fixed one TOFIX note

   I left few warnings intentionally to mark places which should be
   updated in the future (f.e. HB_SYMBOLSCOPE translations).
   Victor, if you can please make build test with MSVC builds and
   send the list of warnings which still exist to harbour-devel.
2007-11-04 18:21:17 +00:00
Przemyslaw Czerpak
b5d010fbeb 2007-10-01 19:42 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/rtl/errorapi.c
    + added protection against possible GPF when some assign methods
      were called without parameters

  * harbour/source/rdd/workarea.c
    * initialize uiFalgs also when DBS_FLAGS is not set

  * harbour/contrib/bmdbfcdx/bmdbfcdx1.c
    * fixed hb_cdxSkipFilter() declaration - it should be 'static' function

  * harbour/source/pp/ppcore.c
  * harbour/source/compiler/ppcomp.c
    + added support for changing all -k? switches by #pragma, f.e.;
         #pragma -ks+
         #pragma -kM-
         #pragma -kx1
         #pragma -kJ0

  * harbour/source/compiler/hbusage.c
    * changed -ks description

  * harbour/include/hbexpra.c
  * harbour/include/hbexprb.c
    * do not generate error message for negative indexes and
      [] operators are used for simple types when -ks option
      is used

  * harbour/include/hbvmpub.h
  * harbour/include/hbapi.h
  * harbour/source/vm/hvm.c
  * harbour/source/vm/extend.c
  * harbour/source/vm/itemapi.c
  * harbour/source/vm/memvars.c
    + added HB_IT_DEFAULT flags - it allows to check if item was changed

  * harbour/source/vm/memvars.c
  * harbour/include/hbvm.h
    ! fixed HB_IT_MEMOFLAG updating to be Clipper compatible. Here we are
      not Clipper compatible in one place: in clodeblock local parameters
      with memo values are marked as MEMO but if you leave function where
      codeblock were created then Clipper during detaching removes MEMO
      flag. In Harbour memo flag is kept.

  * harbour/include/hbvm.h
  * harbour/source/vm/classes.c
  * harbour/source/vm/hvm.c
    % improved speed of extended references used for SETGET methods
      and overloaded [] operators

  * harbour/include/hbapi.h
  * harbour/include/hbsetup.ch
  * harbour/source/compiler/hbcomp.c
  * harbour/source/vm/hvm.c
  * harbour/source/vm/macro.c
  * harbour/source/vm/cmdarg.c
    * removed HB_COMPAT_XHB flags - only one HB_COMPAT_XHB still exist
      in HVM in hashes.c - it will be removed soon.

  * harbour/source/common/hbverdsp.c
    * removed information about xHarbour compatibility mode - it's not
      longer used. We are emulating xHarbour behavior using external
      XHB library and standard compiler/HVM features

  * harbour/contrib/xhb/xhb.ch
  * harbour/contrib/xhb/xhbfunc.c
  * harbour/source/vm/arrayshb.c
    * moved XHB_AINS(), XHB_ADEL() from XHB lib to HVM as HB_AINS(), HB_ADEL()

  * harbour/contrib/xhb/xhb.ch
    + added #pragma -ks+
    + added transaltion for hb_enumindex( <enumvar> )

  + harbour/contrib/xhb/xhbenum.c
    + added emulation for HB_EUMMINDEX()

  * harbour/contrib/xhb/xhbfunc.c
    * do not add INET*() function wrappers for DOS builds or when
      HB_NO_DEFAULT_INET macro is set

  * harbour/contrib/xhb/xhbmsgs.c
    * added comment

  * harbour/contrib/Makefile
    + added TIP and XHB

  * harbour/make_rpm.sh
  * harbour/harbour.spec
    * removed HB_COMPAT_XHB, --with tip, --with xhb
      they are not longer necessary
2007-10-01 17:43:52 +00:00
Przemyslaw Czerpak
af5038b272 2007-09-28 14:08 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapi.h
  * harbour/source/vm/itemapi.c
  * harbour/source/vm/garbage.c
    + added extended item references - it's universal reference which
      can be used by HVM for many different things without introducing
      new item types

  * harbour/include/hbexprb.c
    * respect -ks compiler also with <op>=, --, ++ operators

  * harbour/include/hbvm.h
  * harbour/source/vm/hvm.c
  * harbour/source/vm/classes.c
    + added extended references for SETGET methods used as object
      item references
    * use extended references to respect overloaded [] operator in
      object item references
    + added support for passing indexes to string item characters
      ( @cValue[n] ) by reference using extended references - extension
      enabled by -ks compiler switch and //flags:s RT switch. 
    + added hb_vmPushItemRef()

  * harbour/source/rdd/dbf1.c
  * harbour/source/rdd/usrrdd/usrrdd.c
    * use hb_vmPushItemRef()

  * harbour/contrib/xhb/xhbcomp.prg
  * harbour/contrib/xhb/xhbmsgs.c
    * overload +, -, *, %, ^, ++, -- in string and numeric scalar
      classes to emulated xHarbour behavior when 1 byte string is
      used as numeric value.
      Note: <nun> + <char1> in XHB lib gives numeric value when in
            xHarbour character. But because <nun> <anyOtherOper> <char1>
            in xHarbour gives numeric value then I guess that it's
            xHarbour bug and I should not replicate it, f.e.:
               proc main()
                  ? 1+"A", 131-"A", 33 * 2, 132 / chr(2), 133 % "C"
               return
    * overload +, - in hash scalar class to emulated xHarbour behavior
      for <hash> + <hash> and <hash> - <hash>
      Seems that now we can remove HB_COMPAT_XHB flag from HVM and keep
      Harbour compatibility only with -ks compile time switch and XHB
      library. Please make some tests with Harbour compiled without
      HB_COMPAT_XHB and xHarbour code using REQUEST XHB_LIB. It's possible
      that I missed sth but some basic test shows that our emulation is
      better then original and addresses places where xHarbour does not
      work at all or gives strange results, f.e.:

         #ifndef __XHARBOUR__
            request XHB_LIB
         #endif
         proc main()
            local h:={"ABC"=>123.45}
            ? h:abc
            h:abc+=1000   ; ? h:abc
            h["ABC"]+=1000; ? h:abc
            p(@h:abc)     ; ? h:abc
            p(@h["ABC"])  ; ? h:abc
         return
         proc p(x)
            x+=1000
         return

      or:

         #ifndef __XHARBOUR__
            request XHB_LIB
         #endif
         #include "hbclass.ch"
         proc main()
            local o:=myClass():new()
            o:setget:="ABC"; ? o:setget
            o:setget[2]:=42; ? o:setget
            o:setget[2]+=42; ? o:setget
            ? o:setget[2]+=42; ? o:setget
            ?
            o:var:="ABC"; ? o:var
            o:var[2]:=42; ? o:var
            o:var[2]+=42; ? o:var
            ? o:var[2]+=42; ? o:var
         return
         CREATE CLASS myClass
            VAR    var
            METHOD setget SETGET
         END CLASS
         METHOD setget( xNewVal ) CLASS myClass
            IF pcount() > 0
               ::var := xNewVal
            ENDIF
         RETURN ::var

  * harbour/include/hbapirdd.h
  * harbour/source/rdd/dbcmd.c
  * harbour/source/rdd/workarea.c
  * harbour/source/rdd/dbf1.c
  * harbour/source/rdd/dbffpt/dbffpt1.c
  * harbour/source/rdd/dbfcdx/dbfcdx1.c
  * harbour/source/rdd/dbfdbt/dbfdbt1.c
  * harbour/source/rdd/usrrdd/usrrdd.c
  * harbour/contrib/rdd_ads/ads1.c
    * changed second parameter in RELTEXT() method to PHB_ITEM
      Now RELTEXT() works like FILTERTEXT() and the size of
      expression is not limited. It's a modification I wanted
      to make for a long time and I think that now is a good
      moment to make it together with HB_FT_* modifications
    - rmoved not longer necessary HARBOUR_MAX_RDD_RELTEXT_LENGTH

  * harbour/source/rtl/gttrm/gttrm.c
    * small cleanup
2007-09-28 12:08:46 +00:00
Przemyslaw Czerpak
d8813e5b29 2007-09-26 02:30 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbclass.ch
    + added:
         ON ERROR FUNCTION <FuncName>
         OPERATOR <op> FUNCTION <FuncName> <scope>

  * harbour/include/hbapicls.h
  * harbour/source/vm/classes.c
  * harbour/source/vm/hvm.c
    + added support for overloading right side $ operator

  * harbour/contrib/xhb/xhbfunc.c
    * rewritten xhb_ains() and xhb_adel() in C

  * harbour/contrib/xhb/xhb.ch
    * changed AINS() conversion to be xHarbour compatible

  * harbour/contrib/xhb/Makefile
    + added xhb.ch to PRG_HEADERS so it's installed automatically
      during 'make install'

  * harbour/contrib/xhb/Makefile
  + harbour/contrib/xhb/xhbmsgs.c
  * harbour/contrib/xhb/xhbcomp.prg
    + added support for $ operator used with hashes and arrays
      on right side working _exactly_ like in xHarbour.
    + added support for negative indexes in used in [] operator
      for array and strings.
      Please remember that standard harbour build (without
      HB_COMPAT_XHB flag) generate warning for negative indexes,
      if you wan to pacify them then instead of var[-1] use var[(-1)]
    + added support for assign string characters with [] index.
      Please remember that for standard harbour build (without
      HB_COMPAT_XHB flag) you have to use -ks compile time switch
      if you want to assign strings in such way because this feature
      needs different PCODE, f.e. try to compile this code:
         proc main()
            local s:="ABC"
            s[(-1)] := "*"
            ? s
         return
      with and without -ks switch
    + added support for accessing hash items using OO interface, f.e.:
         proc main()
            local h:={"ABC"=>123.45,"XYZ"=>567.89}
            ? h["ABC"], h["XYZ"]
            ? h:ABC, h:XYZ
            h:ABC+=1000
            h:XYZ:=-2000
            ? h:ABC, h:XYZ
         return

      All of the above extensions are written in C code so the speed
      overhead is very small. Harbour evaluates PCODE faster then xHarbour
      so in speed tests where above operators are executed in loop without
      any other code the xHarbour results with native support are comparable
      with Harbour ones where above operators are overloaded using scalar
      classes so in normal code you should not find any difference with
      one exception for assigning characters in very long strings.
2007-09-26 00:30:47 +00:00
Przemyslaw Czerpak
3ea86f8269 2007-09-25 03:20 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbset.h
  * harbour/source/rtl/set.c
    * changed recently added hb_set*() functions to hb_setGet*()
      Please do not use these functions yet - it's possible that
      they will be removed soon.
    + added hb_setGetL(), hb_setGetCPtr(), hb_setGetNI(), hb_setGetNL()

  * harbour/contrib/libct/dattime2.c
  * harbour/contrib/samples/date.c
    * use hb_setGetCentury() instead of hb_setGetL( hb_set_century )
      we do not have hb_set_century SET switch so hb_setGetL() cannot
      be used

  * harbour/harbour.spec
  * harbour/bin/hb-func.sh
  * harbour/bin/pack_src.sh
  * harbour/contrib/Makefile
  + harbour/contrib/xhb
  + harbour/contrib/xhb/hboutdbg.c
  + harbour/contrib/xhb/cstruct.ch
  + harbour/contrib/xhb/hblog.prg
  + harbour/contrib/xhb/hblog.ch
  + harbour/contrib/xhb/hblognet.prg
  + harbour/contrib/xhb/hbxml.c
  + harbour/contrib/xhb/hbxml.h
  + harbour/contrib/xhb/hbxml.ch
  + harbour/contrib/xhb/hblogdef.ch
  + harbour/contrib/xhb/hbctypes.ch
  + harbour/contrib/xhb/wintypes.ch
  + harbour/contrib/xhb/txml.prg
  + harbour/contrib/xhb/hbsyslog.c
  + harbour/contrib/xhb/cstructc.c
  + harbour/contrib/xhb/Makefile
  + harbour/contrib/xhb/cstruct.prg
  + harbour/contrib/xhb/xhbfunc.c
    + added XHB library with xharbour compatible functions borrowed from
      xHarbour. Now it contains HBLOG, HBXML, HBCSTRUCT, HASH, INET*()
      functions and classes.

  * harbour/source/rtl/itemseri.c
  * harbour/source/rtl/strmatch.c
  * harbour/source/rtl/hbinet.c
  * harbour/source/vm/hashfunc.c
     * moved xHarbour compatible functions to XHB library

  * harbour/source/vm/classes.c
     + added support for ERROR HANDLER message in scalar classes

  * harbour/contrib/tip/mail.prg
  * harbour/contrib/tip/ftpcln.prg
    + added #include "hbcompat.ch"

  * harbour/include/hbdbferr.h
    + added new RT errors: EDBF_CREATE_TEMP, EDBF_WRITE_TEMP, EDBF_READ_TEMP

  * harbour/include/dbinfo.ch
    + added DBI_ENCRYPT, DBI_DECRYPT, DBI_MEMOPACK, DBI_DIRTYREAD
    + added DBOI_INDEXTYPE, DBOI_USECURRENT
    + added RDDI_LOCKRETRY, RDDI_DIRTYREAD

  * harbour/include/dbinfo.ch
  * harbour/include/hbrdddbf.h
  * harbour/include/hbrddfpt.h
  * harbour/include/hbrddcdx.h
  * harbour/include/hbrddntx.h
  * harbour/source/rdd/dbf1.c
  * harbour/source/rdd/dbffpt/dbffpt1.c
  * harbour/source/rdd/dbfntx/dbfntx1.c
  * harbour/source/rdd/dbfcdx/dbfcdx1.c
    + added support for MEMOPACK, table ENCRYPT/DECRYPT, index DIRTYREAD

  * harbour/include/hbapirdd.h
  * harbour/include/dbstruct.ch
  * harbour/include/hbusrrdd.ch
  * harbour/contrib/rdd_ads/ads1.c
  * harbour/contrib/rdd_ads/ace.h
  * harbour/source/rdd/dbfdbt/dbfdbt1.c
  * harbour/source/rdd/dbffpt/dbffpt1.c
  * harbour/source/rdd/dbcmd.c
  * harbour/source/rdd/wafunc.c
  * harbour/source/rdd/workarea.c
  * harbour/source/rdd/dbf1.c
  * harbour/source/rdd/sdf1.c
  * harbour/source/rdd/delim1.c
    * changed HB_IT_* as field type to HB_FT_*
    + added field flags HB_FF_*
    + added support for new field types to core code

  * harbour/source/rdd/dbf1.c
    + added support for AUTOINC (+), ROWVERSION (^), TIME (T), DAYTIME (@)
      and MODTIME (=) fields

  * harbour/contrib/rdd_ads/ads1.c
  * harbour/contrib/rdd_ads/ace.h
    + added support for ROWVERSION (^), and MODTIME (=) fields

  ! harbour/source/rdd/dbcmd.c
    * fixed bug in dbSkipper() reported by Viktor

  + harbour/include/hbsix.ch
  * harbour/source/rdd/hbsix/Makefile
  * harbour/source/rdd/hbsix/sxdate.c
  * harbour/source/rdd/hbsix/sxcompr.c
  * harbour/source/rdd/hbsix/sxcrypt.c
  + harbour/source/rdd/hbsix/sxsem.c
  + harbour/source/rdd/hbsix/sxord.c
  + harbour/source/rdd/hbsix/sxredir.c
  + harbour/source/rdd/hbsix/sxfname.c
  + harbour/source/rdd/hbsix/sxtable.c
  + harbour/source/rdd/hbsix/sxutil.c
  + harbour/source/rdd/hbsix/sxcompat.prg
  + harbour/source/rdd/hbsix/sxtrig.prg
  + harbour/source/rdd/hbsix/sxini.prg
    + added SIx3 compatible functions:
         RDD_Count(), RDD_Name(), RDD_Info(), SetRDD(),
         sxChar(), sxNum(), sxDate(), sxLog(),
         Sx_DToP(), Sx_PToD(),
         Sx_BLOB2File(), Sx_File2BLOB(),
         Sx_Compress(), Sx_Decompress(),
         Sx_FCompress(), Sx_FDecompress(),
         Sx_AutoOpen(), Sx_AutoShare(),
         Sx_MemoExt(), Sx_MemoBlk(), Sx_SetMemoBlock(), Sx_MemoPack(),
         Sx_SetTrigger(), Sx_SetTrig(), Sx_DefTrigger(), 
         Sx_INIheader(), _sx_INIinit(), _sxOpenInit(),
         Sx_SetPass(),
         Sx_Encrypt(), Sx_Decrypt(), Sx_DBFdecrypt(), Sx_DBFencrypt(),
         sx_MakeSem(), sx_KillSem(), sx_IsSem(),
         Sx_ClrScope(), Sx_SetScope(),
         Sx_Freeze(), Sx_Warm(), Sx_Chill(), Sx_Thermometer(),
         Sx_IsReindex(), Sx_Step(), Sx_KeysIncluded(),
         Sx_I_IndexName(), Sx_I_TagName(),
         Sx_IndexCount(), Sx_IndexName(), Sx_IndexType(), Sx_IndexFilter(),
         Sx_ROXLock(), Sx_ROXUnLock(), Sx_IsMyROX(), Sx_IsROXLock(),
         Sx_KeyAdd(), Sx_KeyDrop(), Sx_KeyData(),
         Sx_KeySkip(), Sx_KeyCount(), Sx_KeyNo(), Sx_KeyGoto(),
         Sx_WildSeek(), Sx_WildMatch(),
         Sx_IsFLocked(), Sx_IsReadOnly(), Sx_IsShared(),
         Sx_IsLocked(), Sx_IsDBT(),
         Sx_IDtype(), Sx_TableType(), Sx_TableName(),
         Sx_SetTurbo(), Sx_TurboArea(), Sx_SetDirty(), Sx_DirtyArea(),
         Sx_RLock(), Sx_UnLock(), Sx_GetLocks(), Sx_LockRetry(),
         Sx_SeekLast(), Sx_FindRec(),
         Sx_SkipUnique(), Sx_TagUnique(),
         Sx_TagCount(), Sx_TagOrder(), Sx_TagNo(), Sx_TagName(),
         Sx_TagInfo(), Sx_Tags(),
         Sx_SetTag(), Sx_SetTagOrder(), Sx_SetTagNo(),
         Sx_KillTag(),
         Sx_FileOrder(), Sx_SetFileOrd(), Sx_ClearOrder(),
         Sx_VSigLen(), Sx_VFGet(),
         Sx_dbCreate(), Sx_StrxCheck(), Sx_Rollback(), Sx_SortOption(),
         _sxCondSet(),
         Sx_FNameParser(), Sx_SlimFast(),
         Sx_Version(), Sx_Error(),

    + added SIx3 compatible commands:
         SET DIRTYREAD ON|OFF
         USE ... [TRIGGER <cTrigger>] [PASSWORD <cPassword>]
         SORT ... USECURRENT
         WILDSEEK <str>
         WILDSEEKNEXT <str>
         CLEAR ORDER <order>
         SET TAGORDER TO [<order>]
         SET ORDER TO TAG <(tag)> [OF <(bag)>]
         SET TAG TO [<tag> [OF <(bag)>]]
         REINDEX OPTION <eval> [STEP <step>]
         DELETE TAG <(tag1)> [OF <(bag1)>] [, <(tagN)> [OF <(bagN)>]]
         DELETE TAG ALL [OF <(bag)>]
         CLEAR SCOPE
         SET SCOPETOP TO [<value>]
         SET SCOPEBOTTOM TO [<value>]
         SET SCOPE TO [<value>]
         SET TURBOREAD ON|OFF
         MEMOPACK [BLOCK <size>] [OPTION <opt> [STEP <step>]]
         SET MEMOBLOCK TO <value>
         SUBINDEX ON <key> TO <(file)> ;
               [OPTION <eval> [STEP <every>]] [FILTERON] [EMPTY]
         SUBINDEX ON <key> TAG <(tag)> [OF <(bag)>] [TO <(bag)>] ;
               [OPTION <eval> [STEP <every>]] [FILTERON] [EMPTY]
         INDEX ON <key> [TAG <(tag)>] TO <(bag)> ;
               [OPTION <eval> [STEP <every>]] [FILTERON] [EMPTY] [SUBINDEX]
         INDEX ON <key> TAG <(tag)> [OF <(bag)>] [TO <(bag)>] ;
               [OPTION <eval> [STEP <every>]] [FILTERON] [EMPTY] [SUBINDEX]

      Unlike Ads*() functions the Sx_*() ones can be used with any RDD
      and will work if RDD supports necessary functionality.

      The global settings in SIx3 are RDD dependent in Harbour, f.e.
      in SIx3 Sx_MemoExt() change MEMO file extensions in all SIX* RDDs
      but in Harbour only in default RDD driver.
      In Harbour default trigger function "Sx_DefTrigger" is not
      enabled by default. If user needs such functionality then he
      has to enable it himself using
         rddInfo( RDDI_TRIGGER, "SX_DEFTRIGGER", [<cRDD>] )
      f.e. this code:
         init procedure sx_inittrig()
            local aRDDs := { "DBF", "DBFNTX", "DBFCDX", "SIXCDX", ;
                             "RMDBFNTX", "RMDBFCDX" }
            local aRDDList := RddList(), cRdd

            for each cRdd in aRDDs
               if ascan( aRDDList, { |x| x == cRdd } ) != 0
                  rddInfo( RDDI_TRIGGER, "SX_DEFTRIGGER", cRDD )
               endif
            next
         return
      sets SX_DEFTRIGGER as default trigger in DBF* based RDDs.

      I still do not allow to encrypt tables with memo fields to not
      replicate SIx3 bugs which may cause data corruption.
2007-09-25 01:21:03 +00:00
Przemyslaw Czerpak
f2b0c25e87 2007-09-18 14:40 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbclass.ch
    + added new commands for scalar classes:
         ASSOCIATE CLASS <ClassName> WITH TYPE
                           ARRAY|BLOCK|CHARACTER|DATE|HASH|LOGICAL|NIL|
                           NUMERIC|POINTER|SYMBOL
         ENABLE CLASS TYPE ALL
         ENABLE TYPE CLASS ARRAY|BLOCK|CHARACTER|DATE|HASH|LOGICAL|NIL|
                           NUMERIC|POINTER|SYMBOL
      Please remeber that:
          ENABLE CLASS TYPE ALL
      and:
          ENABLE TYPE CLASS ...
      can be used in any place of code - this commands are translated to
          REQUEST HB<TYPENAME>
      so are not executed

  * harbour/source/vm/classes.c
    + added __clsAssocType( <hClass>, <cType> ) => <lOK>

  * harbour/common.mak
  * harbour/source/rtl/tscalar.prg
  * harbour/source/rtl/Makefile
  + harbour/source/rtl/tscalars.c
  + harbour/source/rtl/tscalard.c
  + harbour/source/rtl/tscalarh.c
  + harbour/source/rtl/tscalarl.c
  + harbour/source/rtl/tscalarp.c
  + harbour/source/rtl/tscalara.c
  + harbour/source/rtl/tscalaru.c
  + harbour/source/rtl/tscalarb.c
  + harbour/source/rtl/tscalarn.c
  + harbour/source/rtl/tscalarc.c
    + added scalar classes for basic types,
      Now it's possible to define messages also for basic item types.
      It's even possible to overload some not defined in HVM operators,
      f.e. in this example we overload operator "+" so it makes
        AADD( <aValue>, <xValue> )
      for code like <aValue> + <xValue>:
        #include "hbclass.ch"
        PROC MAIN()
            LOCAL a:={}
            ASSOCIATE CLASS MyArray WITH TYPE ARRAY
            a := a + "elem1"
            a += "elem2"
            a := a + "elem3"
            a += "elem4"
            ? a:asString, a:isScalar
            AEVAL(a,{|x,i|QOUT(i,x)})
        RETURN
        CREATE CLASS MyArray INHERIT __HBArray
           OPERATOR "+" ARG xValue INLINE AADD( Self, xValue ), Self
        ENDCLASS
      Operators which have default actions for given types defined in HVM
      cannot be overloaded.
2007-09-18 12:40:49 +00:00
Przemyslaw Czerpak
9d4258aa47 2007-09-18 00:45 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapicls.h
  * harbour/source/vm/hvm.c
    + added hb_clsDoInit() function to initialize classy .prg functions

  * harbour/source/compiler/complex.c
    * allow to use NIL as class name

  * harbour/source/compiler/harbour.yyc
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyh
    % optimize automatically var[0] declaration and generate the same
      PCODE as for var:={}

  * harbour/source/rtl/tscalar.prg
    + added HASH, POINTER and SYMBOL scalar classes
    * changed NIL class to not use any instance variables

  * harbour/source/vm/classes.c
    + added support for scalar classes. Now at startup classy code looks
      for hb<TYPENAME> functions and try to execute them to register
      scalar classes. It's Class(y) compatible behavior and only the prefix
      of scalar ceases class function is different: 'CSY' in class(y) and
      'HB' in Harbour, f.e.: hbNumeric()
      If you prefer xHarbour like not automatic scalar class registration
      with some PP commands:
         ASSOCIATE CLASS <ClassName> WITH TYPE
                           ARRAY|BLOCK|CHARACTER|DATE|HASH|LOGICAL|NIL|
                           NUMERIC|POINTER|SYMBOL
         ENABLE CLASS TYPE ALL
         ENABLE TYPE CLASS ARRAY|BLOCK|CHARACTER|DATE|HASH|LOGICAL|NIL|
                           NUMERIC|POINTER|SYMBOL
         EXTEND [TYPE] ARRAY|BLOCK|CHARACTER|DATE|HASH|LOGICAL|NIL|
                       NUMERIC|POINTER|SYMBOL WITH METHOD <SomeFunc>
      Then I can replace current code with it. If not then we should
      divide scalar cases definitions into separated files to allow
      easier overloading. I'm interesting in your opinions.
2007-09-17 22:48:39 +00:00
Przemyslaw Czerpak
72eca3d3e9 2007-09-18 00:45 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapicls.h
  * harbour/source/vm/hvm.c
    + added hb_clsDoInit() function to initialize classy .prg functions

  * harbour/source/compiler/complex.c
    * allow to use NIL as class name

  * harbour/source/compiler/harbour.yyc
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyh
    % optimize automatically var[0] declaration and generate the same
      PCODE as for var:={}

  * harbour/source/rtl/tscalar.prg
    + added HASH, POINTER and SYMBOL scalar classes
    * changed NIL class to not use any instance variables

  * harbour/source/vm/classes.c
    + added support for scalar classes. Now at startup classy code looks
      for hb<TYPENAME> functions and try to execute them to register
      scalar classes. It's Class(y) compatible behavior and only the prefix
      of scalar ceases class function is different: 'CSY' in class(y) and
      'HB' in Harbour, f.e.: hbNumeric()
      If you prefer xHarbour like not automatic scalar class registration
      with some PP commands:
         ASSOCIATE CLASS <ClassName> WITH TYPE
                           ARRAY|BLOCK|CHARACTER|DATE|HASH|LOGICAL|NIL|
                           NUMERIC|POINTER|SYMBOL
         ENABLE CLASS TYPE ALL
         ENABLE TYPE CLASS ARRAY|BLOCK|CHARACTER|DATE|HASH|LOGICAL|NIL|
                           NUMERIC|POINTER|SYMBOL
         EXTEND [TYPE] ARRAY|BLOCK|CHARACTER|DATE|HASH|LOGICAL|NIL|
                       NUMERIC|POINTER|SYMBOL WITH METHOD <SomeFunc>
      Then I can replace current code with it. If not then we should
      divide scalar cases definitions into separated files to allow
      easier overloading. I'm interesting in your opinions.
2007-09-17 22:45:30 +00:00
Przemyslaw Czerpak
69f897a26e 2007-08-02 12:25 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapifs.h
  * harbour/source/rtl/file.c
    + added xHarbour compatible C function hb_fsIsDirectory()

  * harbour/contrib/libct/color.c
  * harbour/contrib/libct/screen1.c
    + added UNTEXTWIN(), CHARWIN(), COLORWIN(), COLORREPL()
    * changed CLEARWIN(), INVERTWIN() to use common helper functions

  + harbour/contrib/libct/screen2.c
    + added SAYDOWN(), SAYSPREAD(), SAYMOVEIN()

  + harbour/contrib/libct/cursor.c
    + added SAVECURSOR(), RESTCURSOR()

  * harbour/contrib/libct/Makefile
  * harbour/contrib/libct/makefile.bc
  * harbour/contrib/libct/makefile.vc
    * updated for new files

  * harbour/contrib/libct/ctmisc.prg
    ! fixed CSETCURS() when called with non logical parameter

  * harbour/source/vm/classes.c
    + added basic version for executing all known inherited destructors
      final version in the future after some testes

  * harbour/source/codepage/cpsv850.c
  * harbour/source/codepage/cpsk852.c
  * harbour/source/codepage/ucmik.c
  * harbour/source/codepage/cpbgmik.c
  * harbour/source/codepage/cpsvwin.c
  * harbour/source/codepage/cpskiso.c
  * harbour/source/codepage/cpskwin.c
  * harbour/source/codepage/cpsvclip.c
    * removed hardcoded CHR(13)+CHR(10) EOLs
2007-08-02 10:25:46 +00:00
Przemyslaw Czerpak
20719c1cf1 2007-07-31 21:00 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbexprb.c
    * disable CTOD("") optimization when -kc switch is used

  * harbour/source/macro/macro.yyc
  * harbour/source/macro/macro.y
    * fixed typo reported by Mindaugas

  * harbour/source/vm/classes.c
    * fixed typo reported by Lost
2007-07-31 19:01:07 +00:00
Przemyslaw Czerpak
7d44a4b1d9 2007-07-04 04:45 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/classes.c
   * do not allocate self calss casting method when class name cannot
     be used as method
2007-07-04 02:45:11 +00:00
Przemyslaw Czerpak
266aeecc82 2007-07-04 04:35 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/classes.c
   ! fixed typo in adding messages with HB_OO_MSG_PROPERTY flag
   ! fixed __clsDelMsg() to be safe with later dictionary resizing
2007-07-04 02:35:24 +00:00
Przemyslaw Czerpak
effd14c344 2007-06-26 23:55 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/bin/hb-func.sh
  * harbour/harbour.spec
    * added description for -L<path> in hb* scripts

  * harbour/include/hbapicls.h
  * harbour/source/vm/classes.c
    * changed hb_objSendMsg() and hb_objSendMessage() to return
      hb_stackReturnItem() - xHarbour users asked about it. It does
      not change binary compatibility with existing code.

  * harbour/common.mak
    * replaced some hard coded values like file extensions with variables
      for future use on other platforms

  * harbour/contrib/mysql/mysql.c
    * changed code to not use non standard function filelength()
      and optimized

  * harbour/source/compiler/cmdcheck.c
    * recognize --version on platforms where '-' is option separator

  * harbour/source/compiler/hbusage.c
    * changed syntax description from:
         Syntax:  harbour <file[s][.prg]> [options]
      to:
         Syntax:  harbour <file[s][.prg]|@file> [options]
2007-06-26 21:55:46 +00:00
Przemyslaw Czerpak
0724963ab3 2007-05-26 09:05 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/pp/ppcore.c
    ! fixed bug reported by Lorenzo

  * harbour/contrib/rdd_ads/ads1.c
    * changed static variable name from iSetListenerHandle to
      s_iSetListenerHandle to keep common naming convention

  * harbour/include/hbapi.h
  * harbour/source/vm/hashes.c
  * harbour/source/vm/hashfunc.c
  * harbour/source/vm/hvm.c
    + added new 3-rd parameter to hb_hashGetItemPtr() to control
      independently hash autoadd behavior in access/assign operation

  * harbour/include/hbrdddbf.h
  * harbour/include/hbrddntx.h
  * harbour/source/rdd/dbfntx/dbfntx1.c
    * moved static variables holding RDDI_* settings to RDDNODE data so
      they can be set separately for each RDD which inherits from DBFNTX

  * harbour/source/vm/classes.c
    + added disabled code to access hash items using messages

  * harbour/source/vm/garbage.c
    * comment
2007-05-26 07:06:07 +00:00
Przemyslaw Czerpak
487aa9c20e 2007-05-23 11:55 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/Makefile
    + added hbapidbg.h

  * harbour/source/vm/classes.c
    - removed one unused debug function

  * harbour/source/vm/debug.c
    * formatting
2007-05-23 09:55:32 +00:00
Przemyslaw Czerpak
75bd21860c 2007-05-22 01:45 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapi.h
  * harbour/include/hbapicls.h
  * harbour/include/hbcomp.h
  * harbour/include/hbvm.h
  * harbour/include/hbvmpub.h
  * harbour/source/compiler/genc.c
  * harbour/source/compiler/gencc.c
  * harbour/source/compiler/gencli.c
  * harbour/source/compiler/hbdead.c
  * harbour/source/compiler/hbfix.c
  * harbour/source/compiler/hblbl.c
  * harbour/source/compiler/hbopt.c
  * harbour/source/compiler/hbpcode.c
  * harbour/source/compiler/hbstripl.c
  * harbour/source/debug/dbgentry.c
  * harbour/source/rdd/wafunc.c
  * harbour/source/rtl/itemseri.c
  * harbour/source/rtl/gtsln/gtsln.c
  * harbour/source/vm/classes.c
  * harbour/source/vm/dynsym.c
  * harbour/source/vm/hvm.c
  * harbour/source/vm/memvars.c
  * harbour/source/vm/runner.c
    * casting: changed some 'char *' to 'const char *', added const to some
      other declarations, added workaround for GCC warnings about
      dereferencing pointer with strict-aliasing optimization, etc.
2007-05-21 23:45:41 +00:00
Przemyslaw Czerpak
96526823f3 2007-05-06 20:30 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/rdd/wacore.c
  * harbour/source/vm/classes.c
  * harbour/include/hbapirdd.h
  * harbour/source/compiler/hbmain.c
    * updated HB_TRACE messages and some minor cleanups

  * harbour/source/rdd/dbcmd.c
    ! fixed initialisation of DBRELINFO dbSetRelation() - thanks to Antonio
      for locating the problem

  * harbour/source/rtl/idle.c
   * increase timeout in nanosleep() from 1 microsecond to 1 millisecond
   - removed some wrong comment
2007-05-06 18:35:11 +00:00
Przemyslaw Czerpak
0433f879a4 2007-05-06 16:15 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/classes.c
    * changed __cls_IncData() to return index to newly allocated instance
      item and __cls_DecData() to return number of local (not inherited)
      instance items
2007-05-06 14:16:19 +00:00
Przemyslaw Czerpak
74adc6f86c 2007-04-23 18:25 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbcomp.h
  * harbour/include/hbcompdf.h
  * harbour/include/hbexpra.c
  * harbour/include/hbexprb.c
  * harbour/include/hbexprop.h
  * harbour/source/common/expropt1.c
  * harbour/source/compiler/genc.c
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/hbmain.c
  * harbour/source/compiler/hbopt.c
    ! reverted fix for unnecessary -W2 warning:
         Function '...' does not end with RETURN statement
      in code like:
            func f(v)
            if v
               return "TRUE"
            else
               return "FALSE"
            endif
      Sorry but I had to make it because this fix was wrong and causes
      that code like:
            func f(v)
            if v
               ? v
            else
               return "FALSE"
            endif
      was compiled without any warnings but wrong PCODE was generated.
      In some spare time I'll try to implement valid RETURN detection,
      now simply add RETURN NIL at the end of such functions - it will
      be removed by dead code eliminator.
    ! fixed memory leak when more then one .prg file was given as compiler
      parameter
    + cleaned some code for future modifications

  * harbour/source/macro/macro.y
    + added small hack for two BCC/OW warnings
  * harbour/source/compiler/harbour.yyc
  * harbour/source/compiler/harbour.yyh
  * harbour/source/macro/macro.yyc
  * harbour/source/macro/macro.yyh
    * regenerated with modified Bison version which should give code
      without BCC warnings - I cannot promise I'll keep it in the
      future but I will try.

  * harbour/source/rdd/dbcmd.c
    ! use default RDD instead of current one in COPY TO and APPEND FROM

  * harbour/source/vm/classes.c
    * added support for (@func()):eval(...)
2007-04-23 16:27:57 +00:00
Przemyslaw Czerpak
c9e8fc84b9 2007-04-17 04:10 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapi.h
  * harbour/source/vm/dynsym.c
    * changed some declarations from 'char *' to 'const char *'

  * harbour/include/hbapicls.h
  * harbour/source/vm/classes.c
    * changed some declarations from 'char *' to 'const char *'
    + added hb_clsFuncName(), hb_clsFindClass(), hb_objSetClass()

  * harbour/source/rtl/itemseri.c
    ! fixed some stupid typos in previous commit
    * added support for serialization of object variables - I'm
      not sure it's good idea anyhow people ask about it so we
      have it. Probably we should add some special method like
      OnError(), f.e.: OnRestore() or sth like that and execute
      it after deserialization or object cloning.
2007-04-17 02:13:04 +00:00
Przemyslaw Czerpak
046d1ea4d7 2007-04-11 22:00 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyc
    ! fixed some possible false warning messages

  * harbour/include/hboo.ch
  * harbour/source/vm/classes.c
    + added support for HB_OO_MSG_PROPERTY and HB_OO_MSG_CLASSPROPERTY
      to make some xHarbour users happy ;-)

  * harbour/common.mak
  * harbour/harbour.spec
  * harbour/include/hbcompdf.h
  * harbour/source/compiler/Makefile
  + harbour/source/compiler/hbcmplib.c
    + added HB_COMPILE() function - it accepts exactly the same parameters
      as harbour compiler and makes the same job :-)

  * harbour/utils/hbrun/Makefile
  * harbour/utils/hbrun/hbrun.prg
    + added support for compilation and direct execution of .prg files
      Now hbrun can accept as first parameter .hrb or .prg file and if
      it's .prg file it's compiled and then executed just like .hrb one.
      In *nixes if you copy compiled hbrun to /usr/bin directory then
      you can add to your .prg files as first line:
         #!/usr/bin/hbrun
      and then after setting executable attribute you can directly
      execute them, f.e.:
         ./test.prg
      If you are using Linux then you can also chose default gt driver
      by dding to above line: //gt<name>
      F.e.
         #!/usr/bin/hbrun //gtstd
2007-04-11 20:01:18 +00:00
Przemyslaw Czerpak
3fe91afe15 2007-04-10 14:35 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/Makefile
    + added hbregex.h

  * harbour/include/hbclass.ch
    + added support for ENDCLASS LOCK[ED]
    + := <clasname> { <constructorParams,...> }

  * harbour/source/debug/tbrwtext.prg
  * harbour/source/rtl/memoedit.prg
  * harbour/utils/hbdoc/ffile1.prg
  * harbour/utils/hbmake/ffile1.prg
    * changed code with:
         super:<msg>
      to
         ::super:<msg>
      I will want to remove lines with:
         [ ; #translate Super( <SuperClassN> ): => ::<SuperClassN>: ] ;
         [ ; #translate Super( <SuperClass1> ): => ::<SuperClass1>: ] ;
         [ ; #translate Super(): => ::<SuperClass1>: ] ;
         [ ; #translate Super: => ::<SuperClass1>: ] ;
         [ ; #translate ::Super : => ::<SuperClass1>: ]
      from our hbclass.ch (at least the last three ones) because they beaks
      code which uses SUPER identifier

  * harbour/source/rtl/philes.c
    * changed FSEEK() to use hb_fsSeekLarge() for OSes which supports
      large (64bit) files

  * harbour/source/vm/classes.c
    ! updated some comments about function syntax
2007-04-10 12:35:47 +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
48f8dba263 2007-02-08 23:55 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbgtinfo.ch
  * harbour/contrib/libct/ctwin.c
  * harbour/source/rtl/gtalleg/gtalleg.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
    + added support for GTI_FULLSCREEN, GTI_KBDSUPPORT, GTI_ISCTWIN

  * harbour/source/rtl/hbgtcore.c
    ! fixed line and box drawing when the coordinates are out of screen size

  * harbour/include/hbapi.h
  * harbour/include/hbcomp.h
  * harbour/include/hbpcode.h
  * harbour/include/hbstack.h
  * harbour/include/hbvm.h
  * harbour/include/hbxvm.h
  * harbour/source/compiler/complex.c
  * harbour/source/compiler/genc.c
  * harbour/source/compiler/gencc.c
  * harbour/source/compiler/harbour.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/hbpcode.c
  * harbour/source/compiler/hbstripl.c
  * harbour/source/vm/classes.c
  * harbour/source/vm/estack.c
  * harbour/source/vm/hvm.c
  * harbour/source/vm/itemapi.c
    ! added protection against cyclic references in arrays
    * eliminated action parameter from hb_vmRequestReenter() /
      hb_vmRequestRestore()
    * moved s_lRecoverBase and s_uiActionRequest to HB_STACK structure
      for future MT HVM version
    + added internal item structure hb_struRecover - it's not real item
      but this structure is used to keep information about BEGIN SEQUENCE
      data - it reduce HB_STACK usage
    + added support for ALWAYS clause in BEGIN SEQUENCE
      The syntax is:
         BEGIN SEQUENCE
            <code>
         [ RECOVER [ USING oErr ] ]
            <recoverCode>
         [ ALWAYS ]
            <alwaysCode>
         END [ SEQUENCE ]
      It's guaranteed that <alwaysCode> is _ALWAYS_ executed even if
      inside <code> or <recoverCode> some new exceptions like RETURN,
      BREAK or QUIT will appear.
      Please note that when the following code is executed:
         BEGIN SEQUENCE
            <code>
         ALWAYS
            <alwaysCode>
         END
      (without RECOVER clause) then BREAK exception inside <code> is not
      recovered, <alwaysCode> is executed and then BREAK exception is
      passed to outer BEGIN SEQUENCE. This is the same semantic as
      used in TRY / [ CATCH ] / FINALLY / END
      Those of you who prefer to use TRY / CATCH / FINALLY / END instead
      of BEGIN SEQUENCE / RECOVER / ALWAYS / END can simply add to your
      source code:
         #command TRY               => BEGIN SEQUENCE
         #command CATCH [ oErr ]    => RECOVER [ USING <oErr> ]
      and:
         errorBlock( {|oErr| break( oErr ) } )
      Though instead of 'break( oErr )' I suggest to use some small function
      which will support some basic recovery/substitute operations like in
      default errorsys() and LockErrHandler() to not break existing code
      which may depends on the default behavior.
      If you want I can add direct support for TRY / CATCH / FINALLY / END
      but I'm not sure it's really necessary.
      Please note also that in Harbour ALWAYS code is execute even for QUIT
      excpetion.
      When <alwaysCode> is executed current exception is stored and restored
      when is finished. If new exception appears inside <alwaysCode> then
      restored exception depends on the priority in the following order:
         QUIT     // highest priority
         BREAK
         RETURN
      If both exceptions have the same priority and contain additional value
      (error object in BREAK or return value in RETURN) then the recently set
      one is restored. It's similar behavior to destructor code.

  * harbour/source/common/hbstr.c
    * moved one character length string table (hb_szAscii) from hvm.c
      to use it also in compiler and preprocessor

  * harbour/source/compiler/ppcomp.c
  * harbour/source/pp/ppcore.c
  * harbour/source/pp/pplib.c
    * tuned error messages to be more Clipper compatible
    % use static strings from hb_szAscii

  * harbour/source/rtl/alert.prg
    * use hb_gtInfo( GTI_FULLSCREEN ) to detect type of GT driver
    ! some minor fixes
      TOFIX: we have to also use GTI_ISCTWIN or add window allocation
             to standard GT drivers to be Clipper compatible when CTWIN
	     is used - In Clipper Tools ALERT() works in differ way then
	     the standard one. It creates separate window box to display
	     data, supports SETKEY(), etc. I'll think about adding some
	     extended support for ALERT() and similar operations (f.e.
	     separate debugger windows) to GT API so it will be also
	     possible to overload standard alert() command by GUI message
	     box in GTGUI and similar GT drivers.

  * harbour/source/rtl/binnumx.c
    ! fixed U2BIN() - wrong casting
2007-02-08 22:56:31 +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
b86b5a8fe7 2006-12-08 05:55 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/bin/hb-func.sh
  * harbour/bin/hb-mkslib.sh
  * harbour/bin/postinst.sh
  * harbour/config/bsd/gcc.cf
  * harbour/config/darwin/gcc.cf
  * harbour/config/dos/owatcom.cf
  * harbour/config/hpux/gcc.cf
  * harbour/config/linux/gcc.cf
  * harbour/config/linux/owatcom.cf
  * harbour/config/os2/gcc.cf
  * harbour/config/sunos/gcc.cf
  * harbour/config/w32/watcom.cf
  * harbour/contrib/rdd_ads/ads1.c
  * harbour/contrib/rdd_ads/adsfunc.c
  * harbour/include/hbapifs.h
  * harbour/include/hbexprc.c
  * harbour/include/hbsetup.h
  * harbour/source/common/expropt2.c
  * harbour/source/common/hbdate.c
  * harbour/source/common/hbgete.c
  * harbour/source/common/hbstr.c
  * harbour/source/common/hbver.c
  * harbour/source/common/hbverdsp.c
  * harbour/source/compiler/cmdcheck.c
  * harbour/source/compiler/fixflex.c
  * harbour/source/compiler/gencobj.c
  * harbour/source/compiler/genobj32.c
  * harbour/source/compiler/harbour.c
  * harbour/source/compiler/harbour.l
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyc
  * harbour/source/compiler/hbfix.c
  * harbour/source/compiler/hbfunchk.c
  * harbour/source/pp/ppcore.c
  * harbour/source/pp/ppgen.c
  * harbour/source/pp/pplib.c
  * harbour/source/rdd/dbcmd.c
  * harbour/source/rdd/workarea.c
  * harbour/source/rdd/dbfcdx/dbfcdx1.c
  * harbour/source/rdd/dbffpt/dbffpt1.c
  * harbour/source/rdd/hsx/hsx.c
  * harbour/source/rtl/accept.c
  * harbour/source/rtl/ampm.c
  * harbour/source/rtl/console.c
  * harbour/source/rtl/defpath.c
  * harbour/source/rtl/errorint.c
  * harbour/source/rtl/filesys.c
  * harbour/source/rtl/fkmax.c
  * harbour/source/rtl/fstemp.c
  * harbour/source/rtl/hbffind.c
  * harbour/source/rtl/hbgtcore.c
  * harbour/source/rtl/langapi.c
  * harbour/source/rtl/seconds.c
  * harbour/source/rtl/set.c
  * harbour/source/rtl/tobject.prg
  * harbour/source/rtl/transfrm.c
  * harbour/source/rtl/gtcrs/chrmap.c
  * harbour/source/rtl/gtcrs/gtcrs.c
  * harbour/source/rtl/gtcrs/gtcrs.h
  * harbour/source/rtl/gtpca/gtpca.c
  * harbour/source/rtl/gtwvt/gtwvt.c
  * harbour/source/rtl/gtxwc/gtxwc.c
  * harbour/source/vm/classes.c
  * harbour/source/vm/cmdarg.c
  * harbour/source/vm/debug.c
  * harbour/source/vm/estack.c
  * harbour/source/vm/fm.c
  * harbour/source/vm/hvm.c
  * harbour/source/vm/macro.c
  * harbour/source/vm/proc.c
  * harbour/source/vm/runner.c
  * harbour/utils/hbmake/hbmlang.c
  * harbour/utils/hbpp/hbpp.c
  * harbour/utils/hbpp/hbppcomp.c
  * harbour/utils/hbpp/hbppcore.c
  * harbour/utils/hbpp/hbpplib.c
  * harbour/utils/hbpp/pragma.c
  * harbour/utils/hbver/hbverfix.c
    * general code cleanup: all strcpy() and strcat() replaced hb strn*()
      and hb_strn*(), sprintf() by snprintf(), etc.
      It fixed some possible buffer overflow but it's also possible that
      it will exploit some some hidden so far problems but I strongly
      prefer to know about them ASAP to fix them before final 1.0 release.
    ! fixed bug I introduce in codeblock falgs which disabled early macro
      evaluation in codeblocks.
    ! added missing protection against execution by bison destructor for
      used CBSTART token on syntax error.
    % use PP stringify logik added for FLEX support to remove all redundant
      spaces in stringified for early macro evaluation codeblocks and add
      spaces between operators if after preprocessing they were removed.
      Now we are supporting also some code which cannot be compiled by
      Clipper.
    % cleaned and improved the speed of printer redirecting in console code.
      Chen please check if CG still reports problems and if not ubdate
      TODO/TOFIX or inform me about them.
    * some cleanups in building process for different *nixes: MacOSX, SunOS,
      *BSD, etc.
    * removed not longer necessary (I hope) compiler flag to force default
      'char' type as signed. Now Harbour should work with signed and unsigned
      char without any problems. To other developers: please remember that
      when you are using 'char' as 8 bytes signed integer then it's a bug.
      Always explicitly use: 'signed char' in such case. On some platforms
      it's not possible to set default type for 'char' so if you hardcode
      that 'char' is signed or unsigned somewhere then code will not be
      portable. Chen if you will find a while to also rebuild Harbour with
      BCC and -K switch to make some tests with CG then I'll be thankful.
2006-12-08 05:03:58 +00:00
Przemyslaw Czerpak
ef48cb6d96 2006-11-08 17:20 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/classes.c
    ! fixed type checking for "string" type. It should be translate
      to character not symbol item type.
2006-11-08 16:19:59 +00:00
Przemyslaw Czerpak
0fae2fdd2c 2006-10-07 04:25 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbclass.ch
    + added validation for class data names. As additional preprocessor
      rule to not use <!marker!>

  * harbour/include/hboo.ch
  * harbour/source/rtl/tclass.prg
  * harbour/source/vm/classes.c
    + added delegate messages

  * harbour/include/hbstack.h
  * harbour/source/vm/arrays.c
  * harbour/source/vm/estack.c
  * harbour/source/vm/hvm.c
  * harbour/source/vm/proc.c
    + added startup symbol to hb_stack. It gives very good stop
      condition for all procedures which trace stack calls and
      resolves the problem with hb_stack.pBase which was never
      pointing to valid function/procedure symbol when no symbol
      was put on HVM stack. Now after hb_stackInit() the first
      item is allocated for "hb_stackInit()" symbol so hb_stack.pBase
      is always a pointer to valid function/procedure symbol.
    * changed the guard condition for buggy code in hb_stackPop()
      and similar code from:
         hb_stack.pPos < hb_stack.pItems
      to:
         hb_stack.pPos <= hb_stack.pBase
      The old condition was generating usable error message only in the
      startup function. In deeply called functions it was only waste of
      CPU time on one of the most often call functions. Before it was
      activated internal stack structures were corrupted.
      If we were leaving for many years without really working stack
      underflow protection then maybe we should think about disabling
      it at when HB_STACK_MACROS are used and keep it only in real
      stack functions for HVM developers. Single protection in
      hb_stackOldFrame() I've just added is enough for basic C code
      validation.
      I created the second version of stack macros without it in
      hbstack.h but I would like to hear other developers opinion.
2006-10-07 02:35:52 +00:00
Przemyslaw Czerpak
e47d291938 2006-10-04 02:30 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbclass.ch
    * most of the rules rewritten
    ! fixed some wrong rules and general cleanup
    + added additional code validation
    ! fixed compilation of more then one class in single file.
      Now it's even possible to declare all classes at beginning of
      single file and then implementing their methods in any order
    ! fixed using static classes and classes
    ! fixed compilation without <ClassName>_ prefix in method names
    + added support for HB_CLS_NO_DECORATION macro which disable
      adding <ClassName>_ prefix to method names - this macro is
      set by default when HB_SHORTNAMES is set.
    + added support for declared parameters validation - it can be
      disabled with HB_CLS_NO_PARAMS_ERR and I had to disable it
      by default due to problems with our preprocessor.
      Ryszard seems that our PP has serious problems with decoding
      directives when there is no space between symbol and some other
      non symbol character. I had to add some workarounds and even
      introduce buggy rules to make it working. Please look at it.
      You can remove #define HB_CLS_NO_PARAMS_ERR from hbclass.ch
      and try to rebuild Harbour core code to see the problem.

  * harbour/include/hboo.ch
  * harbour/source/vm/classes.c
    + added support for new primitive message: HB_OO_MSG_PERFORM

  * harbour/source/rtl/tclass.prg
    - removed <lPersistent> parameter from HBClass messages and
      internals data. Persistent is supported as scope bit and
      separate variable was redundant.
    - removed stripping of () from message names. Here is not a place
      to fix wrong preprocessor rules.

  * harbour/utils/hbtest/rt_class.prg
    * use: METHOD PROCEDURE ... CALSS ...
      instead of: PROCEDURE ... CALSS ...
      The first version is preferable syntax.

  * harbour/source/debug/dbgtmenu.prg
  * harbour/source/rtl/checkbox.prg
    ! fixed some parameters in method declaration - global cleanup
      will have to wait for preprocessor fixes

   Hi all,
   Please make test with current hbclass.ch code.
   I hope that I haven't broken too much things ;-) but I rewrite
   from scratch most rules and it's possible that I missed sth or
   made some stupid typos. Current version is much shorter and should
   be easier to updated. For sure I've intentionally changed one thing.
   CLASSDATA was ignoring SHARED attribute and always created shared
   class variables. Seems that it was long existing typo but the fix
   may interact with already existing code which needs SHARED class
   variables but does not use SHARED clause in CLASSDATA declaration.
   In such case please update it and add missing SHARED.
   Also in the end of CLASS declaration we have:
      [ ; #translate Super( <SuperClassN> ): => ::<SuperClassN>: ] ;
      [ ; #translate Super( <SuperClass1> ): => ::<SuperClass1>: ] ;
      [ ; #translate Super(): => ::<SuperClass1>: ] ;
      [ ; #translate Super: => ::<SuperClass1>: ] ;
      [ ; #translate ::Super : => ::<SuperClass1>: ]
   These rules introduce very serious bug - they are breaking supercasting
   in code which makes sth like:
      ::super:super:super:msg
   or in any other code which sends SUPER message to some other class
   objects. I will have to remove them. At least the last three ones.
   There were some other things I wanted to write about but it's too late
   and I'm to tired - sorry. If you will have any question please ask. if
   you will notice some problems with current rules please inform me.
2006-10-04 00:33:00 +00:00
Przemyslaw Czerpak
bb8804e7ac 2006-09-29 22:50 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/classes.c
    * allow to access object variables using assign messages without
      parameter. I do not want to add symmetric behavior for access messages
      though it's technically possible but such things should be controlled
      by programmer because access messages can have less restricted scoping
      then assign ones (READONLY) so I'll add new rule for it in hbclass.ch

  * harbour/source/vm/hvm.c
    * fixed warning message when object variable reference is
      generated using macro compiler without '_' as prefix.
2006-09-29 20:51:46 +00:00
Przemyslaw Czerpak
8deba76fc3 2006-09-28 14:30 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/common.ch
    + added ISSYMBOL()

  * harbour/include/hbextern.ch
    - removed __CLS_PARAM()

  * harbour/include/hbclass.ch
  * harbour/source/rtl/tclass.prg
  * harbour/source/vm/classes.c
    * replaced __CLS_PAR00() and __CLS_PARAM() functions by preprocessor
      rules. These functions are not longer necessary though I left them
      in classes.c for backward binary compatibility. Probably they will
      be removed in the future.
    ! use function pointers (@<funcname>()) instead of function names
      with REQUEST for super classes ID. It fixes using STATIC class
      functions.
2006-09-28 12:29:24 +00:00
Przemyslaw Czerpak
9aaaadbc6f 2006-09-28 00:40 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/make_rpm.sh
    * check for rpmbuild also when BUGGY_RPM is set

  * harbour/make_tgz.sh
    * removed rebuild hbpptest with shared libraries

  * harbour/include/hbapicls.h
    + added definitions for hb_clsCreate(), hb_clsAdd(), hb_clsAssociate()

  * harbour/include/hbapierr.h
  * harbour/source/rtl/errorapi.c
    + added hb_errFuncName - pseudo function name which can be used as
      operation description in new error object. It should help to simplify
      some code and fix function names when RT error is generated from C
      function which can be executed from different .prg functions.

  * harbour/include/hbclass.ch
    + added some missing Classy(y) compatible object variable type
      descriptions: Int, Integer, Block

  * harbour/source/rdd/dbfcdx/dbfcdx1.c
    ! disabled early retrieving from the cache key position and key count

  * harbour/include/hbvm.h
  * harbour/source/vm/hvm.c
    + added: void hb_vmPushEvalSym( void ) for the code which do not
      want to access any [P]HB_SYMB structures
    * changed symbol name in hb_symEval from __EVAL to EVAL and modified
      hb_symEval registration method to not register hb_vmDoBlock as global
      function. Having PHB_DYNS address for "EVAL" in hb_symEval.pDynSym
      allows to eliminate some strcmp() when we are looking for EVAL public
      symbol.
    ! fixed symbol table updating in PCODE functions for future multi module
      .hrb files

  * harbour/source/vm/proc.c
    * use hb_symEval.pDynSym instead of strcmp()

  * harbour/source/vm/arrays.c
  * harbour/source/vm/debug.c
    * minor code cleanup

  * harbour/source/rtl/tclass.prg
  * harbour/source/vm/classes.c
    % separate message hash table from methods table - it will cause farther
      reduction of allocated memory - many thanks to all people who send
      me statistics about number of used classes and symbols from their code.
    % use hb_symEval.pDynSym
    + added support for object variable type scope checking like in Class(y).
    ! fixed typo in pushing object class variables by reference
    % s_pClasses is now indexed directly by class handle
    % some other optimiztions
    ! make hidden and non virtual invisible in child classes if it overloaded
      some other non hidden method. In such case the overloaded method is used
      and can be accessed.
    ! make friend functions real method class oriented not (super)object for
      hidden messages
2006-09-27 22:39:06 +00:00
Przemyslaw Czerpak
8ef38acb75 2006-09-23 14:35 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/itemapi.c
    * minor modification in function order to group together the ones
      which can operate on reference counters
    + added additional stop condition in hb_itemUnRef() - we will have
      to make some modifications for the code which execute hb_itemUnRef()
      to resolve some possible conflicts with operators overloading and
      compiler optimizations

  * harbour/source/vm/classes.c
    * do not inherit friends - seems that our classes code was too
      friendly ;-)
      It also effectively resolves logical problem with accessing
      overloaded non virtual methods from friends.
    + added __clsLock( <hClass> ) - it locks any farther class
      modifications and can be used if programmer wants to be sure
      that no one will try to hack his class definition. It's very
      important when programmers work in a team on bigger project.
      Please do not add to CVS any __clsUnLock() functions - if someone
      needs it then he can create his own custom HVM build.
    * code cleanup

  * harbour/source/vm/eval.c
    + added hb_execFromArray() - idea and syntax borrowed from xHarbour's
      HB_ExecFromArray() by Giancarlo Niccolai though it's independent
      implementation. Now when we have support for functions with variable
      number of parameters then we need sth like this function to fully
      benefit from new feature. The following syntax is supported:
         hb_execFromArray( <cFuncName> [, <aParams> ] )
         hb_execFromArray( @<funcName>() [, <aParams> ] )
         hb_execFromArray( <bCodeBlock> [, <aParams> ] )
         hb_execFromArray( <oObject> , <cMethodName> [, <aParams> ] )
         hb_execFromArray( <oObject> , @<msgName>() [, <aParams> ] )
      or:
         hb_execFromArray( <aExecArray> )
      where <aExecArray> is in one of the following format:
         { <cFuncName> [, <params,...>] }
         { @<funcName>() [, <params,...>] }
         { <bCodeBlock> [, <params,...>] }
         { <oObject> , <cMethodName> [, <params,...>] }
         { <oObject> , @<msgName>() [, <params,...>] }

  * harbour/source/rtl/symbol.prg
    * removed C code inside #pragma BEGINDUMP/ENDDUMP
      now it's only .prg code which uses variable parameters function
      and hb_execFromArray()
2006-09-23 12:39:22 +00:00
Przemyslaw Czerpak
1202be4471 2006-09-22 23:00 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbclass.ch
  * harbour/include/hbvm.h
  * harbour/source/rtl/tclass.prg
  * harbour/source/vm/classes.c
  * harbour/source/vm/hvm.c
    ! fixed bug in real codeblock scoping which was exploited by
      dictionary resizing
    * changed ACCESS messages to ASSIGN ones when object item
      reference is created for proper READONLY scope checking.
      The reference to object variable can be created only when
      caller has sufficient ASSIGN privileges.
    + added FRIEND CLASS and FRIEND FUNCTION support.
      It's enough to add class definition:
         FRIEND CLASS <classFunc1> [, <classFuncN> ]
      and/or:
         FRIEND FUNCTION <FuncName1> [, <FuncNameN> ]
      and all methods of given class or given function will be able
      to access private variables.
      Warning!!! Friends cannot access overloaded non virtual methods.
                 This feature is available _ONLY_ for real class members.
    + added MODULE FRIENDLY to class definition. It causes that all other
      functions and classes defined in the same .prg module will have
      friend privileges. In such way works xHarbour and there is now way
      to disable this "feature" what is IMHO bug. In Harbour programmer
      has to explicitly enable it (until he will not change / add new
      preprocessor rule and set it as default ;-)). Syntax:
         CREATE CLASS .... MODULE FRIENDLY
            ...
         END CLASS

  * harbour/source/vm/proc.c
  * harbour/source/vm/runner.c
    * updated function symbols processing

  * harbour/source/compiler/harbour.c
    * added note in hb_compOptimizeFrames() about exceeding maximum number
      of local variables (255). We should add new pcode(s) HB_P_LARGE[V]FRAME
      or generate compile time error.

  * harbour/source/vm/macro.c
    % minor optimizations
2006-09-22 21:02:17 +00:00
Przemyslaw Czerpak
b6bed767c0 2006-09-20 18:40 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/contrib/rdd_ads/ads1.c
    * synced with recent xHarbour fixes

  * harbour/include/hbdefs.h
    * indenting

  * harbour/include/hbexprb.c
  * harbour/include/hbexprop.h
  * harbour/source/common/expropt2.c
    + added compile time optimization for STOD(cConstDateString)
      covered by -kh compiler extension (default)
      It allows to keep the same source code for Clipper and
      Harbour and benefits from data constants without using
      0dYYYYMMDD values

  * harbour/source/vm/classes.c
    * restored the original 3-rd parameter in  hb_clsAdd to void(void) -
      PHB_FUNC - and added translation for PHB_SYMB to not force using
      [P]HB_SYMB in 3-rd party code

  * harbour/source/vm/estack.c
    * added protection against possible GPF after executing
      hb_stackBaseProcOffset() when first item on the stack
      was not HB_IT_SYMBOL - it can happen in some seldom
      cases. Probably some more general solution like leaving
      first dummy item on HVM stack for breaking stack scan
      loops will be better. I'll think about it.

  * harbour/source/vm/itemapi.c
    ! fixed clearing enumerators
2006-09-20 16:42:12 +00:00
Przemyslaw Czerpak
18f74581d1 2006-09-19 11:50 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapi.h
  * harbour/include/hbapicls.h
  * harbour/include/hbpcode.h
  * harbour/include/hbxvm.h
  * harbour/source/compiler/genc.c
  * harbour/source/compiler/gencc.c
  * harbour/source/compiler/hbdead.c
  * harbour/source/compiler/hbfix.c
  * harbour/source/compiler/hblbl.c
  * harbour/source/compiler/hbpcode.c
  * harbour/source/compiler/hbstripl.c
  * harbour/source/vm/arrays.c
  * harbour/source/vm/classes.c
  * harbour/source/vm/codebloc.c
  * harbour/source/vm/hvm.c
  * harbour/source/vm/itemapi.c
   + added three new PCODEs:
      HB_P_MACROSEND    - to use for: s:=1,2,3"; o:=send(&s)
      HB_P_PUSHOVARREF  - to create references to object variables: @o:var
      HB_P_ARRAYPUSHREF - to create references to array items, it can be used
                          in some optimization, f.e.: a[ <exp1> ] += <exp2>
                          or directly by: func( @a[ <exp> ] )
                          if we add passing array elements by reference
     Implemented in HVM and PCODE generation, the compiler has to be
     modified yet to use them.
   * changed last parameter in hb_codeblockGetRef() - I'd like to have
     all variables in hb_struRefer structure in one place: hb_itemUnRefOnce()
     for easier modifications in the future.
   * replaced in hb_struRefer 'itemsbase' with 'array'.
   + added hb_arrayGetItemRef() to create references to array elements.
     Such reference updates array reference counters.
   * changed STATICs passed by reference to use new array item references.
   ! block destructor execution after classy releasing on HVM exit
2006-09-19 09:59:42 +00:00
Przemyslaw Czerpak
dc9ebdf37c 2006-09-17 02:00 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/classes.c
    + added hb_clsRealMethodName() function which I'm using in some
      test code

  * harbour/tests/clsscast.prg
    * updated to use __CLS_CNTSHRDATA() instead of __CLS_CNTCLSDATA()

  * harbour/utils/hbtest/rt_class.prg
    + added tests for class and shared class variables/allocating
2006-09-18 00:01:53 +00:00
Przemyslaw Czerpak
24159987a2 2006-09-17 18:45 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* xharbour/include/hbvm.h
  * xharbour/source/vm/hvm.c
    + added hb_vmPushDynSym( PHB_DYNS )
      It should allow most applications to not use [P]HB_SYMB at all.
      Removing PHB_SYMB from 3-rd party .c code may allow us to add
      freeing unused symbol tables from HVM in the future.

  * harbour/source/vm/classes.c
    * temporary restored hb_objGetpMethod()
    + added __ClsCntClasses()
    ! allocated real methods for OnError and Destructor to keep
      the same behavior in these methods as in any others, f.e.
      scoping checking or debugging.

  * harbour/common.mak
  * harbour/utils/hbtest/Makefile
  * harbour/utils/hbtest/hbtest.prg
  + harbour/utils/hbtest/rt_class.prg
    + added tests for our classy code. Now destructors and instance
      area allocating/casting. Some other in the future.
2006-09-17 16:54:04 +00:00