Commit Graph

993 Commits

Author SHA1 Message Date
Przemyslaw Czerpak
66cc29e162 2007-04-16 11:45 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/compiler/hbmain.c
  * harbour/source/compiler/ppcomp.c
    ! fixed file name in errors/warnings generated from PP just after
      including some file
2007-04-16 09:44:17 +00:00
Przemyslaw Czerpak
2bb711b6c8 2007-04-15 14:35 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/compiler/hbmain.c
  * harbour/source/vm/dbgentry.c
  * harbour/source/vm/hvm.c
    ! fixed GPF in debugger
2007-04-15 12:37:15 +00:00
Viktor Szakats
56267f28dd 2007-04-14 12:40 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* harbour/include/hbstdgen.ch
   * harbour/include/box.ch
   * harbour/include/hbclass.ch
   * harbour/include/hbcommon.ch
   * harbour/include/hbextern.ch
   * harbour/include/hbgetcmt.ch
   * harbour/include/hbsetup.ch
   * harbour/include/ord.ch
   * harbour/source/rdd/dbdelim.prg
   * harbour/source/rdd/dbfuncs.prg
   * harbour/source/rdd/dbjoin.prg
   * harbour/source/rdd/dblist.prg
   * harbour/source/rdd/dbsort.prg
   * harbour/source/rdd/dbstrux.prg
   * harbour/source/rdd/dbtotal.prg
   * harbour/source/rdd/dbupdat.prg
   * harbour/source/rdd/rddord.prg
   * harbour/source/rtl/alert.prg
   * harbour/source/rtl/browdb.prg
   * harbour/source/rtl/browdbx.prg
   * harbour/source/rtl/checkbox.prg
   * harbour/source/rtl/dircmd.prg
   * harbour/source/rtl/getsys.prg
   * harbour/source/rtl/input.prg
   * harbour/source/rtl/mssgline.prg
   * harbour/source/rtl/pushbtn.prg
   * harbour/source/rtl/radiobtn.prg
   * harbour/source/rtl/radiogrp.prg
   * harbour/source/rtl/setfunc.prg
   * harbour/source/rtl/setta.prg
   * harbour/source/rtl/tbcolumn.prg
   * harbour/source/rtl/tget.prg
   * harbour/source/rtl/tgetint.prg
   * harbour/source/rtl/tmenuitm.prg
   * harbour/source/rtl/tpopup.prg
   * harbour/source/rtl/ttopbar.prg
   * harbour/source/rtl/typefile.prg
   * harbour/source/vm/harbinit.prg
   * harbour/utils/hbrun/external.prg
   * harbour/utils/hbtest/rt_main.ch
     + Following #defines are now available by default without
       the need to #include "hbsetup.ch". These are of course
       also available for applications as defined at Harbour
       build time:
       HB_EXTENSION
       HB_C52_UNDOC
       HB_C52_STRICT
       HB_COMPAT_C53
       HB_COMPAT_XPP
       HB_COMPAT_VO
       HB_COMPAT_FLAGSHIP
       HB_COMPAT_FOXPRO
       HB_COMPAT_DBASE
       HB_COMPAT_CLIP
       HB_COMPAT_XHB
       HB_SHORTNAMES
       HB_FILE_VER_STATIC

   * harbour/source/compiler/hbusage.c
     * Mail address update.
2007-04-14 10:41:54 +00:00
Przemyslaw Czerpak
b7094ed42f 2007-04-13 03:00 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapi.h
  + harbour/include/hbapidbg.h
  * harbour/include/hbcomp.h
  * harbour/include/hbcompdf.h
  * harbour/include/hbdebug.ch
  * harbour/include/hbdefs.h
  * harbour/source/compiler/Makefile
  * harbour/source/compiler/genc.c
  + harbour/source/compiler/hbdbginf.c
  * harbour/source/compiler/hbmain.c
  * harbour/source/debug/debugger.prg
  * harbour/source/rtl/altd.prg
  * harbour/source/vm/Makefile
  + harbour/source/vm/dbgentry.c
  * harbour/source/vm/debug.c
  * harbour/source/vm/hvm.c
    + added xHarbour compatible low level debugger code
      Without some small exceptions like my hbdbginf.c most of
      the code created by Phil Krylov <phil a t newstar.rinet.ru>
      and borrowed from xHarbour with some small modifications.

  * harbour/source/rtl/gete.c
    ! fixed memory leak in GETENV()

  * harbour/source/compiler/hbmain.c
    ! fixed memory leak when -build or -credit switches were used
2007-04-13 01:06:01 +00:00
Przemyslaw Czerpak
23bc767460 2007-04-12 13:55 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbpp.h
  * harbour/include/hbcomp.h
  * harbour/source/compiler/hbgenerr.c
  * harbour/source/compiler/ppcomp.c
  * harbour/source/pp/ppcore.c
  * harbour/source/pp/pplib.c
  * harbour/utils/hbpp/hbpp.c
  * harbour/utils/hbpp/hbppcore.c
  * harbour/utils/hbpp/hbppdef.h
    * changed error and warning messages to const char *

  * harbour/source/compiler/genhrb.c
    * rewritten to work on memory buffers and with new compiler code

  * harbour/include/hbcomp.h
  * harbour/include/hbcompdf.h
  * harbour/source/compiler/hbmain.c
  * harbour/source/main/harbour.c
    + added LANG_PORT_OBJ_BUF which allow to generate .hrb files into
      memory buffers

  * harbour/source/compiler/hbcmplib.c
    + added HB_COMPILEBUF() functions which returns compiled .hrb file
      as string item

  * harbour/source/vm/runner.c
    + added support for executing compiled .hrb files stored in string
      items in __HRBRUN() function - it works just like in __HRBLOAD()

  * harbour/harbour.spec
  * harbour/utils/hbrun/hbrun.prg
    + added default include directories to hbrun
    * use HB_COMPILEBUF() instead of HB_COMPILE() to eliminate temporary
      files
2007-04-12 11:57: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
Viktor Szakats
9d1de9cdfa 2007-04-11 15:25 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* harbour/contrib/libnf/mouse1.prg
     ! Fixed unused variable.

   * harbour/source/compiler/genc.c
     % Compact compiler output (-gc0) made even more compact
       (~20% size reduction).
2007-04-11 13:26:46 +00:00
Przemyslaw Czerpak
339996cfbe 2007-04-03 13:00 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyc
    ! fixed false warning about unreachable code in
         switch ...; case ...; exit; case ...
      statement
    * disabled some error messages about illegal pass by reference
      now HVM should not allow to create cyclic reference chain
2007-04-03 11:01:58 +00:00
Przemyslaw Czerpak
96561eeae0 2007-03-31 12:40 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/Makefile
  + harbour/include/hbchksum.h
  * harbour/source/rtl/Makefile
  + harbour/source/rtl/hbadler.c
  + harbour/source/rtl/hbcrc.c
  + harbour/source/rtl/hbmd5.c
    + added functions to calculate different checksums
         HB_ADLER( <cValue> [, <nStart> ] ) -> <nCC>
         HB_CRC32( <cValue> [, <nStart> ] ) -> <nCRC>
         HB_CRC16( <cValue> [, <nStart> ] ) -> <nCRC>
         HB_CRC  ( <cValue> [, <nStart> ] [, <nPolynomial> ] ) -> <nCRC>
         HB_CRCCT( <cValue> [, <nStart> ] [, <nPolynomial> ] ) -> <nCRC>
         HB_MD5( <cString> ) -> <cMD5>
         HB_MD5FILE( <cFileName> ) -> <cMD5>
      HB_CRC() is general CRC function which can be used for any polynomial
      given as second argument, f.e.: 0x104C11DB7 is CRC32 polynomial,
      0x18005 -> CRC16, 0x11021 -> CRC16 X.26, 0x1393 -> CRC12, 0x101 -> LCR8
      HB_CRCCT() makes exactly the same job but it uses broken algorithm.
      Unfortunately it seems that this broken version is widely used by many
      other projects, f.e. HB_CRCCT() gives exactly the same results as
      COM_CRC() from CT3. Generated results are usually "good enough" but
      if you do not need compatibility with some other tools which uses
      broken CRC algorithm then I suggest to not use it.
      HB_ADLER() is ADLER32 check sum - this function gives the same results
      as HB_CHECKSUM in xHarbour.
      HB_MD5*() functions are from Dmitry V. Korzhov code modified a
      little bit by me for other then x86@32 machines files and buffers
      longer then 2^32. I also fixed possible problems with wrong results
      in some cases.

  * harbour/source/compiler/hbmain.c
    * increase number of optimization passes

  * harbour/source/pp/ppcore.c
    * cleaned C compiler warning
2007-03-31 10:42:19 +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
0ef0f1aab9 2007-03-13 19:40 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapi.h
  * harbour/include/hbapiitm.h
  * harbour/source/vm/garbage.c
  * harbour/source/vm/extend.c
  * harbour/source/vm/itemapi.c
    + added hb_gcFunc(), hb_parptrGC(), hb_itemGetPtrGC()
      hb_parptrGC() and hb_itemGetPtrGC() uses GC cleanup function address
      to validate if pointer item points to expected memory block type

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

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

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

  * harbour/source/rdd/dbfcdx/dbfcdx1.c
  * harbour/source/rdd/dbfntx/dbfntx1.c
    * enabled code to seek in index using regular expressions
      (DBOI_SKIPREGEX[BACK])
2007-03-13 18:40:56 +00:00
Przemyslaw Czerpak
9569027809 2007-03-12 14:30 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbexpra.c
    * emulate xHarbour HB_ENUMINDEX() inside FOR EACH loop when
      HB_COMPAT_XHB macro is set
      It's only for compatibility - I strongly suggest to use
            <unumvar>:__enumIndex()
      which is more flexible and allow to chose the enumerator
      variable not only the one from last loop

  * harbour/include/hbexprb.c
    * added comment removed from hbexpra.c

  * harbour/source/compiler/hbmain.c
    ! fixed GPF which can appear when -b option is used in line numbering
      inside codeblocks
2007-03-12 13:42:10 +00:00
Przemyslaw Czerpak
4f10cc035a 2007-03-12 14:30 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbexpra.c
    * emulate xHarbour HB_ENUMINDEX() inside FOR EACH loop when
      HB_COMPAT_XHB macro is set
      It's only for compatibility - I strongly suggest to use
            <unumvar>:__enumIndex()
      which is more flexible and allow to chose the enumerator
      variable not only the one from last loop

  * harbour/include/hbexprb.c
    * added comment removed from hbexpra.c

  * harbour/source/compiler/hbmain.c
    ! fixed GPF which can appear when -b option is used in line numbering
      inside codeblocks
2007-03-12 13:37:49 +00:00
Przemyslaw Czerpak
3ea271f158 2007-03-09 13:00 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/compiler/hbmain.c
    * removed #include "hbmemory.ch"
  * harbour/source/main/harbour.c
    * added #include "hbmemory.ch"
2007-03-09 11:59:58 +00:00
Przemyslaw Czerpak
8ce0d03aa0 2007-03-09 04:40 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/common.mak
  * harbour/makefile.bc
  * harbour/makefile.vc
  * harbour/bin/hb-func.sh
  * harbour/config/global.cf
  * harbour/include/error.ch
  * harbour/include/hbcomp.h
  * harbour/include/hbcompdf.h
  * harbour/include/hbexpra.c
  * harbour/include/hbexprb.c
  - harbour/include/hbexprc.c
  * harbour/include/hbexprop.h
  * harbour/include/hbmacro.h
  * harbour/source/Makefile
  * harbour/source/common/expropt1.c
  * harbour/source/common/expropt2.c
  * harbour/source/compiler/Makefile
  - harbour/source/compiler/exproptc.c
  - harbour/source/compiler/harbour.c
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyc
  * harbour/source/compiler/hbcomp.c
  * harbour/source/compiler/hbgenerr.c
  + harbour/source/compiler/hbmain.c
  * harbour/source/compiler/hbpcode.c
  * harbour/source/macro/Makefile
  * harbour/source/macro/macro.y
  * harbour/source/macro/macro.yyc
  - harbour/source/macro/macroc.c
  + harbour/source/main/Makefile
  + harbour/source/main/harbour.c
  * harbour/source/vm/macro.c
    * resolved name conflicts between compiler and macro compiler.
      Now new compiler library is created.
      There are some things which can be improved and cleaned yet
      but it's enough to create single binaries with compiler+HVM+RTLs.
      I updated non GNU make files but I cannot tested the modifications
      - please check and fix me if necessary
2007-03-09 03:44:42 +00:00
Przemyslaw Czerpak
61800e95cc 2007-03-05 23:30 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbcompdf.h
  * harbour/include/hbexprb.c
  * harbour/source/compiler/hbgenerr.c
    * do not generate warnings about meaningless expression usage
      in code optimized by short logical expression evaluation, f.e.:
         proc main()
         (f1() .or. (f2(), .t.))
         return
2007-03-05 22:30:50 +00:00
Przemyslaw Czerpak
f9452a8f85 2007-03-04 14:00 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapifs.h
  * harbour/include/hbcompdf.h
  * harbour/include/hbpp.h
  * harbour/source/common/hbfsapi.c
  * harbour/source/compiler/cmdcheck.c
  * harbour/source/compiler/harbour.c
  * harbour/source/compiler/hbusage.c
  * harbour/source/compiler/ppcomp.c
  * harbour/source/pp/ppcore.c
    * cleanup .ppo file creation
    + new compiler switch: p+ to enable preprocessor tracing
      when used information about applied rules is stored in .ppt file
  * harbour/include/hbdefs.h
  * harbour/source/rtl/gtos2/gtos2.c
    * OS2 build cleanup
2007-03-04 13:11:36 +00:00
Przemyslaw Czerpak
1cba971155 2007-02-28 08:10 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbpp.h
  * harbour/source/compiler/complex.c
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyc
  * harbour/source/pp/ppcore.c
    * updated lexer to recognize IF(<exp1>,<exp2>,<exp3>) in expressions like
      IF(<exp,...>) - it allow to make some grammar rules much more simple.
2007-02-28 07:11:17 +00:00
Przemyslaw Czerpak
d4f042a2a5 2007-02-27 12:10 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbcomp.h
  * harbour/include/hbexpra.c
  * harbour/include/hbexprb.c
  * harbour/include/hbexprc.c
  * harbour/include/hbmacro.h
  * harbour/include/hbpcode.h
  * harbour/include/hbxvm.h
  * harbour/source/common/hbdate.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/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/rtl/abs.c
  * harbour/source/rtl/at.c
  * harbour/source/rtl/chrasc.c
  * harbour/source/rtl/datec.c
  * harbour/source/rtl/dateshb.c
  * harbour/source/rtl/diskspac.c
  * harbour/source/rtl/disksphb.c
  * harbour/source/rtl/gtfunc.c
  * harbour/source/rtl/left.c
  * harbour/source/rtl/len.c
  * harbour/source/rtl/math.c
  * harbour/source/rtl/minmax.c
  * harbour/source/rtl/mod.c
  * harbour/source/rtl/philes.c
  * harbour/source/rtl/philesx.c
  * harbour/source/rtl/replic.c
  * harbour/source/rtl/round.c
  * harbour/source/rtl/set.c
  * harbour/source/rtl/space.c
  * harbour/source/rtl/strcase.c
  * harbour/source/rtl/strpeek.c
  * harbour/source/rtl/transfrm.c
  * harbour/source/rtl/trim.c
  * harbour/source/rtl/type.c
  * harbour/source/rtl/val.c
  * harbour/source/rtl/word.c
  * harbour/source/vm/hvm.c
  * harbour/source/vm/macro.c
    * added some PCODEs to cover all possible combination of ++, --, <op>=
      operations in the same way and keep Clipper compatible RT errors.
    * added some other PCODEs to optimize some commonly used expressions/
      statements
    * use HB_ERR_ARGS_BASEPARAMS instead of hb_paramError()
    * some other cleanups and minor optimizations
  * harbour/utils/hbtest/rt_math.prg
    * update expected result for MOD() - it was not Clipper compatible and
      it will be hard to make it compatible without introducing some Clipper's
      side effects
2007-02-27 11:03:59 +00:00
Przemyslaw Czerpak
fb4d3ca4b8 2007-02-25 17:10 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbstdgen.ch
    * added #undef HB_COMPAT_XHB
  * harbour/source/common/hbstr.c
    * indenting
  * harbour/source/compiler/ppcomp.c
    * updated line numbering in #pragma dump code and error messages
      executed for disabled code
  * harbour/source/pp/ppcore.c
    * changed the precedence of #pragma BEGINDIUMP/ENDDUMP - now
      it has higher precedence then conditional compilation with
      #IF[DEF]/#ENDIF
    * added support for defined() pseudo function in #IF / #ELIF
      directives, f.e.:
         #if defined( __HARBOUR__ ) .and. !defined( HB_COMPAT_XHB )
            #stdout "Harbour compiler compiled without xHarbour extensions."
         #endif
2007-02-25 16:20:22 +00:00
Przemyslaw Czerpak
384087848a 2007-02-22 08:40 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbexprop.h
  * harbour/source/common/expropt1.c
    + added hb_compExprAsNumSign()

  * harbour/include/hbexprc.c
    * optimize lValue++ and ++lValue

  * harbour/source/common/hbdate.c
    * minor optimization

  * harbour/source/compiler/cmdcheck.c
    * maximum supported warning level should be 3 not 4

  * harbour/include/hbxvm.h
  * harbour/source/compiler/gencc.c
  * harbour/source/vm/hvm.c
    * use separate functions for equal and exactly equal operations
    * cleanup and some other minor optimizations

  * harbour/source/compiler/hbopt.c
    * optimize PCODEs for code like: lVar:=lVar, sVar:=sVar, mVar:=mVar, ...
  * harbour/include/common.ch
    * changed HB_SYMBOL_UNUSED( symbol ) to ( symbol := ( symbol ) )
      It's a little bit simpler version and now it's also stripped by
      PCODE optimizer

  * harbour/source/compiler/harbour.c
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyc
    * eliminated some redundant rules
    * optimized PCODEs generated for FOR/NEXT code and removed some old
      hardcoded optimization for local variables - if it will be worth
      to optimize then such optimization will be done by expression
      optimizer
    * chaned a little bit WITHOBJECT syntax.
      Now WITHOBJECT somefunc(); END is not silently ignored and call
      to somefunc() is left. This optimization also works when there
      are empty line between WITHOBJECT and END

  * harbour/source/rdd/dbf1.c
    ! fixed for GPF in DBRI_RAWDATA, DBRI_RAWMEMOS (Peter Rees fix in
      xHarbour)
2007-02-22 07:39:21 +00:00
Przemyslaw Czerpak
26617b2472 2007-02-18 12:40 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/common.mak
  * harbour/source/compiler/Makefile
  * harbour/source/compiler/hbfix.c
  + harbour/source/compiler/hbopt.c
    * divided hbfix.c into two separated functions:
      - hb_compFixFuncPCode() which only fix generated PCODE updating
        local parameters numbers when PARAMETERS is used
      - hb_compOptimizePCode() which makes PCODE optimization
      It allows to not execute hb_compFixFuncPCode() when PARAMETERS
      is not use and execute hb_compOptimizePCode() more then once in
      optimization process.

  * harbour/hbgtmk.sh
    * updated CVS server name

  * harbour/include/hbcomp.h
  * harbour/include/hbcompdf.h
  * harbour/source/compiler/complex.c
  * harbour/source/compiler/harbour.c
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyc
  * harbour/source/compiler/hbcomp.c
  * harbour/source/compiler/hbgenerr.c
  * harbour/source/compiler/hbident.c
    * changed code for generating in PCODE line numbers and module names
      there was serious problem with line numbers and module names in old
      code - in many cases line numbers were not generated at all or
      generated in wrong places. Also file module name was not updated
      when inside of function some code was included with #include
      For such situation now modified version of HB_P_MODULE is generated
      with module name only but without function name, f.e.:
         HB_P_MODULE    "test.prg:"
      exactly the same form of HB_P_MODULE is used in xHarbour.
      Debugger code should be updated to recognize such HB_P_MODULE version
      Ryszard any chance that you can look at it?
      And what about syncing with xHarbour debugger?
      I can add some missing functions to compiler and HVM but I do not
      want to update next peace of code myself. Sorry but I do not have
      enough time. I'd prefer to finish some other things I'm working.
      If Ryszard is busy can someone else try to port xHarbour debugger
      to Harbour?
2007-02-18 11:40:22 +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
71acb177c3 2007-01-24 10:25 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/config/w32/bcc32.cf
  * harbour/include/hbexprb.c
  * 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/rtl/set.c
  * harbour/source/rtl/gtsln/gtsln.c
  * harbour/source/vm/hvm.c
    * recent fixes from Beta1

  * harbour/contrib/libct/Makefile
  - harbour/contrib/libct/bit1.c
  - harbour/contrib/libct/bit2.c
  - harbour/contrib/libct/bit3.c
  + harbour/contrib/libct/bitnum.c
    ! rewritten bit functions

  * harbour/contrib/libct/addascii.c
    * cleanup

  * harbour/contrib/odbc/Makefile
  * harbour/contrib/odbc/odbc.c
  * harbour/contrib/odbc/sql.ch
  - harbour/contrib/odbc/sql.h
  - harbour/contrib/odbc/sqlext.h
  - harbour/contrib/odbc/sqltypes.h
  * harbour/contrib/odbc/todbc.prg
    ! synced with xHarbour

  * harbour/contrib/rdd_ads/ads1.c
    ! fixed typo in DBI_GETHEADERSIZE

  * harbour/contrib/rdd_ads/adsfunc.c
    + added ADSDDREMOVEINDEXFILE - borrowed from xHarbour

  * harbour/source/rtl/alert.prg
    * minor cleanup

  * harbour/source/rtl/gtfunc.c
    * use HB_ERR_ARGS_BASEPARAMS in error messages

  * harbour/source/rtl/transfrm.c
    * casting
2007-01-24 09:27:02 +00:00
Przemyslaw Czerpak
e2fde5133c 2007-01-17 13:50 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/compiler/gencc.c
  * harbour/source/vm/hvm.c
    ! fixed typo in hb_xvmGreaterEqualThenIntIs() - <= was used instead
      of >=
    ! fixed :&macro() messages used in WITH OBJECT structure and -gc3
      output
    + added some missing optimizations in -gc3 output
2007-01-17 12:49:25 +00:00
Przemyslaw Czerpak
c13da799ef 2007-01-17 03:55 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/contrib/libct/ctc.c
  * harbour/contrib/libct/files.c
  * harbour/contrib/libnf/ftattr.c
  * harbour/contrib/libnf/n2color.c
    * cleaned some BCC warnings

  * harbour/include/hbapi.h
  * harbour/include/hbexpra.c
  * harbour/include/hbexprb.c
  * harbour/include/hbsetup.ch
  * harbour/source/common/expropt1.c
  * harbour/source/common/expropt2.c
  * harbour/source/common/hbver.c
  * harbour/source/common/hbverdsp.c
  * harbour/source/compiler/hbcomp.c
  * harbour/source/vm/arrays.c
  * harbour/source/vm/arrayshb.c
  * harbour/source/vm/cmdarg.c
  * harbour/source/vm/hvm.c
    ! fixed Harbour support for accessing string characters with array
      index operators []
    + added support for #define HB_COMPAT_XHB - it's disabled by default.
      When set it enables some of xHarbour features like negative array
      indexes calculated from tail, accessing string characters with []
      operators (warning it's not compatible with default Harbour version
      enabled by -ks during compilation and //flags:s at runtime - in
      xHarbour compatibility mode "ABC"[2] returns "B" when in Harbour 66)
      and some other minor features.

  * harbour/source/compiler/cmdcheck.c
    * added support for optional setting C output type in -go switch
      Now it accepts optional digit [0123] after -go in the same way
      as -gc, f.e.: -go3

  * harbour/source/compiler/harbour.c
    * call hb_compExprLstDealloc() only when errors appeared during
      compilation - it disable automatic freeing all allocated expressions
      in clean compilation. I make it intentionally for easier detecting
      problems one some expressions are not freed. So far the final cleanup
      code always deallocated expressions what can hide some real bugs.

  * harbour/source/vm/hvm.c
    ! fixed very serious bug in HVM closing. The s_uiActionRequest flag
      was not cleared before hb_rddShutDown() so when RDD buffers were
      hot and flushing required some PCODE evaluation (f.e. index KEY
      or FOR expression) then they were not properly evaluated.

  * harbour/source/vm/macro.c
    * minor improvement

  * harbour/utils/hbtest/rt_misc.prg
    ! fixed one of expected result, it was neither Harbour nor Clipper
      result (I've just made some test with Clipper), I do not know why
      it existed
2007-01-17 02:55:14 +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
30f56abce2 2007-01-09 15:10 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/compiler/hbusage.c
    * update the year in hb_compPrintLogo() from 2006 to 2007

  * harbour/source/vm/garbage.c
    ! fixed potentially very serious bug - when I added array items
      references I forgot to update GC. Fortunately it was caught
      by code to detect bugs in object destructors so only RT error
      was reported instead of internal HVM memory corruption

  * harbour/tests/hbinline.prg
    * updated comments
2007-01-09 14:10:22 +00:00
Przemyslaw Czerpak
e4c865436e 2007-01-08 00:50 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbexpra.c
    ! fixed GPF which can appear on syntax error during compilation
      one of enumerator message

  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyc
    * accept the folowing syntax: (@var):msg
      With this modification FOR EACH overloading is completed.
2007-01-07 23:52:41 +00:00
Przemyslaw Czerpak
3fd903247e 2007-01-07 05:00 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbcomp.h
  * harbour/include/hbexpra.c
  * harbour/include/hbexprb.c
  * harbour/include/hbexprc.c
  * harbour/include/hbexprop.h
  * harbour/source/common/expropt1.c
  * harbour/source/common/expropt2.c
  * harbour/source/compiler/Makefile
  * harbour/source/compiler/cmdcheck.c
  * harbour/source/compiler/harbour.c
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyc
  * harbour/source/compiler/harbour.yyh
  * harbour/source/compiler/hbcomp.c
  * harbour/source/compiler/hbusage.c
  * harbour/source/compiler/ppcomp.c
  * harbour/source/macro/Makefile
  * harbour/source/macro/macro.y
  * harbour/source/macro/macro.yyc
  * harbour/source/macro/macro.yyh
  * harbour/source/vm/macro.c
  * harbour/source/vm/memvars.c
  * harbour/source/vm/memvclip.c
    * keep prefix definition for bison public symbols in *.y files instead
      of passing them as bison arguments to avoid possible mistakes during
      *.yy[hc] file generation
    ! fixed iif() reduction when used as single function parameter
    + add -kM compiler switch - turn off macrotext substitution
    * updated <string> + <string> optimization and other macrotext usage
      to keep more Clipper compatible behavior
    ! fixed typo in expression type checking in IIF() reduction - it was
      working because wrongly used macros has the same values as the valid
      ones
    - removed compiler switches and macros for old HB_INLINE() syntax - it
      was not supported after last months modifications. Only:
         HB_INLINE([params,...]) { C code }
      is supported.
    ! fixed passing parameters by reference in IIF() statement and macro
      compiler. The following valid Clipper code:
         &("myfunc(<exp>, @var1, @var2)")
      was not supported
    ! do not allow to use references or empty expressions in expression list
      AFAIK it's Clipper compatible. If I'm wrong then please fix me but
      Clipper allows to use references only as function arguments, 2-nd and
      3-rd IIF() argument and as directly created array items ( {...@var...} )
      DO ... WITH ... is a special case of function call.
    ! Changed grammar rules to accept only Clipper compatible parameters.
    ! fixed typo in macro name in hb_memvarNewParameter() function.
    * use HB_FUNC_EXEC(...) instead of HB_FUNCNAME(...)()
2007-01-07 04:09:09 +00:00
Przemyslaw Czerpak
386c27f01f 2007-01-05 16:00 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbexprb.c
    * make function call optimizations only when hb_compFunCallCheck()
      do not report errors

  * harbour/source/common/reserved.c
    + added VALTYPE to list of reserved words and shortcuts (Clipper
      compatible)

  * harbour/source/compiler/hbfunchk.c
    * checking for number of parameters in FILE() function call is Harbour
      extension - do not enable it when HB_C52_STRICT macro is set

  * harbour/source/rtl/filehb.c
    * formatting
2007-01-05 15:01:11 +00:00
Przemyslaw Czerpak
9d263b1141 2007-01-05 08:00 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbcompdf.h
     + added comment

  * harbour/include/hbexpra.c
     * change expression type for <exp> = <exp> from HB_EO_EQUAL
       to HB_EO_ASSIGN in hb_compExprGenStatement() function so
       later we can safely make all optimization in hb_compExprUseEqual()
       during reduce process - optimization only when PCODE is generated
       is too late and causes that expressions like:
         iif( 1 = 1, <exp>, <exp> )
       are not reduces (Clipper reduce them)
     * do not execute hb_compFunCallCheck() in hb_compExprNewFunCall()
       to avoid repeating the same error message in hb_compExprUseFunCall()

  * harbour/include/hbexprb.c
     * enabled reduction for hb_compExprUseEqual() and generate errors
       when it's used as statement

  * harbour/source/common/expropt2.c
     * added some missing reductions for expressions like: NIL == NIL

  * harbour/source/common/reserved.c
     % very basic optimization: use binary search instead of linear
       scanning for reserved words and shortcuts - it gives noticeable
       speed improvement in macro compiler

  * harbour/source/compiler/complex.c
     * changed the order of special keywords to keep alphabetic sorting

  * harbour/source/compiler/harbour.c
     % some minor optimizations in aliased expressions
     ! added protection in hb_compIsJump() to avoid possible problems
       when this function is executed after replacing some code with
       jumps by series of NOOPs in optimizations process

  * harbour/source/compiler/hbfix.c
     * better optimization of PCODE generated for logical expressions

  * harbour/source/compiler/hbfunchk.c
     % use binary search instead of linear scan

  * harbour/source/rtl/minmax.c
     ! fixed GPF when MIN() or MAX() function is called with less then
       two parameters

  * harbour/source/vm/itemapi.c
     * minor optimization and formatting
2007-01-05 07:41:20 +00:00
Przemyslaw Czerpak
647e9281bf 2006-12-30 22:45 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbcomp.h
  * harbour/include/hbcompdf.h
  * harbour/include/hbexpra.c
  * harbour/include/hbexprb.c
  * harbour/source/common/expropt1.c
  * harbour/source/compiler/harbour.c
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyc
  * harbour/source/compiler/hbgenerr.c
  * harbour/source/macro/macro.l
  * harbour/source/macro/macro.y
  * harbour/source/macro/macro.yyc
  * harbour/source/macro/macro.yyh
  * harbour/source/macro/macrolex.c
  * harbour/source/vm/macro.c
    * final grammar cleanup: removed unused and/or unnecessary grammar
      expressions in *.y files, fixed some differences between compiler
      and macrocompiler, fixed some other bugs, typos, clipper
      incompatibilities, etc.
      It's end of year, it's late and sorry but I'd like to begin making
      something absolutely differ then creating detail description ;-)
      If you will have any questions then I'll answer in new year.

  * harbour/source/rdd/dbffpt/Makefile
    * small hack for XCC compilation

best regards and happy new year,
Przemek
2006-12-30 21:51:33 +00:00
Przemyslaw Czerpak
40999edb49 2006-12-28 16:40 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbcomp.h
  * harbour/include/hbcompdf.h
  * harbour/include/hbexprb.c
  * harbour/include/hbexprc.c
  * harbour/include/hbpcode.h
  * harbour/include/hbpp.h
  * harbour/include/hbxvm.h
  * harbour/source/compiler/genc.c
  * harbour/source/compiler/gencc.c
  * harbour/source/compiler/gencli.c
  * harbour/source/compiler/harbour.c
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyc
  * harbour/source/compiler/hbgenerr.c
  * harbour/source/compiler/hbpcode.c
  * harbour/source/vm/hvm.c
  * harbour/source/vm/macro.c
    * changed HB_P_MACROPUSHINDEX PCODE behavior - now it does not evaluated
      macro expression
    * eliminated HB_ET_MACRO_INDEX - HB_ET_MACRO_LIST can be used instead
    * accept ... in codeblocks only when codeblocks parameters are defined
      as variables, f.e: {|a,b,...|qout(a+b,...)}
    ! fixed error in a[&s]:=100
    + added support for a[...] - now ... can be used in the same context as
      xbase++ like multivalue macro (a[&s])
    * disabled ++, --, <op>= optimizations when -kc (strict Clipper
      compatibility mode) compiler switch is used
2006-12-28 15:44:41 +00:00
Przemyslaw Czerpak
88716ffc11 2006-12-27 21:12 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbcompdf.h
    * removed not longer used pFunCall from asMacro expression.
      This item was used only in a very old s:="1,2";f(&s) implementation.

  * harbour/include/hbexpra.c
  * harbour/include/hbexprb.c
  * harbour/include/hbexprop.h
  * harbour/source/common/expropt1.c
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyc
    * a little bit more simple implementation of passing optional arguments
      and simplified some code. Now they can be used in any place in argument
      list (also repeated). It's also possible to create arrays using "..."
      as array element(s), f.e.: func f(...); return { "{", ..., "}" }
      If you think it will be usable then I can also add support for accessing
      array items with optional parameters, f.e.: ? a[ ... ]
      so it can be used in the same context as xbase++ like macro lists
      but for this I will need new PCODE so I'd like to hear your opinion
      ASAP - I'm closing any extensions today.
2006-12-27 20:17:22 +00:00
Przemyslaw Czerpak
7a13cae5e3 2006-12-27 15:00 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbcomp.h
  * harbour/include/hbcompdf.h
  * harbour/include/hberrors.h
  * harbour/include/hbexpra.c
  * harbour/include/hbexprb.c
  * harbour/include/hbpcode.h
  * harbour/include/hbxvm.h
  * harbour/source/common/expropt1.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/hbdead.c
  * harbour/source/compiler/hbfix.c
  * harbour/source/compiler/hbgenerr.c
  * harbour/source/compiler/hblbl.c
  * harbour/source/compiler/hbpcode.c
  * harbour/source/compiler/hbstripl.c
  * harbour/source/vm/hvm.c
    + added support for passing optional parameters to called function, f.e.:
         proc p( a, b, ... )
         qout( a, b, "X", ... )
    * forbid creating function pointer when function is used with parameters,
      f.e.: x:=@f1(1,2,3)

  * harbour/source/compiler/complex.c
    * cleaned all restrictions on reserved words I've found - if I missed
      sth then please inform me. The previous behavior and some error
      messages are used with -kc compiler switch

  * harbour/source/rtl/symbol.prg
  * harbour/source/rtl/tobject.prg
    ! eliminated limitations in number of constructor parameters
      (new syntax with passing optional parameters used)
2006-12-27 14:01:52 +00:00
Przemyslaw Czerpak
3df896f666 2006-12-24 16:54 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbcompdf.h
  * harbour/include/hbexprb.c
  * harbour/source/common/expropt1.c
  * harbour/source/compiler/harbour.c
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyc
  * harbour/source/compiler/hbcomp.c
    - removed not longer used fExternal from compiler structure
    * allow to pass array items by reference ( func(@a[1]) ) and some
      cleanups in reference rules. Probably we should also block using:
         @func(param1 [,param2,[,...paramN]])
      and accept only @func()
    ! fixed using statements in codeblocks used to initialize static
      variables and some other cleanups (f.e. allow to use as static
      initializers any functions which are later eliminated by expression
      optimizer.
2006-12-24 16:12:13 +00:00
Przemyslaw Czerpak
4efdbba99b 2006-12-23 06:00 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbexprb.c
    * do not generate HB_P_FUNCPTR - it's not longer necessary
    + added optimization for <exp> + 1, <exp> - 1 - disabled by default
      because it changes error messages in hbtest, code like NIL + 1
      generates 'argument error ++' instead of 'argument error +'. I'd like
      you will decide what you prefer - faster code or strict Clipper error
      messaged.

  * harbour/source/common/expropt2.c
    + added optimizations for <num> + <date>
    + added ooptimizations for <exp> + 0, 0 + <exp>, <exp> - 0
      This is also sth what may interact with operators overloading in object
      system. When we will have strong typing then we should think about an
      option which will optionally disable some optimizations - someone may
      want to define arithmetic where <obj> + 0 gives differ then <obj>
      results.

  * harbour/include/hbcomp.h
  * harbour/source/compiler/harbour.c
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyc
  * harbour/source/compiler/harbour.yyh
    + added hb_compStatmentStart()
    ! restrict MEMVAR and FIELD usage - now they have to be located before
      executable statements like in Clipper.
    ! generate error when PARAMETERS is used as file wide declaration.
    ! generate errors when different executable statements are used before
      first procedure - now such code was simply ignored without any errors.
    ! generate valid error messages when some declarations are used in
      wrong places
    ! fixed setting begin of executable statement flag in different .prg
      constructions.
2006-12-23 05:00:33 +00:00
Przemyslaw Czerpak
4b5017e7e2 2006-12-22 11:00 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/contrib/rdd_ads/adsfunc.c
    * do not use hb_param( pItem, HB_IT_BYREF ) but ISBYREF() macro

  * harbour/include/hbdefs.h
    * formatting

  * harbour/include/hbexprb.c
    ! fixed code generated for logical expressions when shortcutting
      is enabled to be Clipper compatible

  * harbour/source/compiler/cmdcheck.c
    ! added missing break in -z compiler switch decoding

  * harbour/source/compiler/hbfix.c
    % added optimizations for code generated for logical expressions,
      it strips a chain of HB_P_DUPLICATE -> HB_P_JUMP[TRUFALES] ->
      HB_P_DUPLICATE -> HB_P_JUMP[TRUFALES] -> ...
      In fact it should not be done here but because we do not have
      any metacode level where such optimizations should be done and
      PCODE is generated online then it will have to be here. Maybe
      in the future we will add metacode.

  * harbour/source/rdd/dbcmd.c
    * make "M" alias Clipper compatible. After some thoughts I decided
      that in some cases it can be usable so now "M" will set WA number
      to 65535 like in Clipper.

  * harbour/source/rdd/dbf1.c
    * allow to open VFP DBFs with _NullFlags system command

  * harbour/source/rdd/delim1.c
  * harbour/source/rdd/sdf1.c
    ! updated field size calculation for some some extended types.

  * harbour/source/rdd/workarea.c
    * generate RT error when CREATEFIELD() method does not accept some
      parameters to avoid silent DBCREATE() failing.

  * harbour/source/vm/macro.c
    * removed hb_compMemvarCheck() - this function was not dooing
      anything - only slows the TYPE() by calling hb_dynsymFind()
      one or two times.
    + added TODO note: memvars create by TYPE() have PUBLIC scope
      in Clipper. Clipper also always tries to evaluate valid expressions
      inside TYPE even if the contain UDF. UDF only stops evaluation
      so:
         TYPE( "(val:=1) + f() + (val2:=2)" )
      creates in clipper public variable VAL but not VAL2.
2006-12-22 11:25:28 +00:00
Przemyslaw Czerpak
2cdb32d6c3 2006-12-22 11:00 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/contrib/rdd_ads/adsfunc.c
    * do not use hb_param( pItem, HB_IT_BYREF ) but ISBYREF() macro

  * harbour/include/hbdefs.h
    * formatting

  * harbour/include/hbexprb.c
    ! fixed code generated for logical expressions when shortcutting
      is enabled to be Clipper compatible

  * harbour/source/compiler/cmdcheck.c
    ! added missing break in -z compiler switch decoding

  * harbour/source/compiler/hbfix.c
    % added optimizations for code generated for logical expressions,
      it strips a chain of HB_P_DUPLICATE -> HB_P_JUMP[TRUFALES] ->
      HB_P_DUPLICATE -> HB_P_JUMP[TRUFALES] -> ...
      In fact it should not be done here but because we do not have
      any metacode level where such optimizations should be done and
      PCODE is generated online then it will have to be here. Maybe
      in the future we will add metacode.

  * harbour/source/rdd/dbcmd.c
    * make "M" alias Clipper compatible. After some thoughts I decided
      that in some cases it can be usable so now "M" will set WA number
      to 65535 like in Clipper.

  * harbour/source/rdd/dbf1.c
    * allow to open VFP DBFs with _NullFlags system command

  * harbour/source/rdd/delim1.c
  * harbour/source/rdd/sdf1.c
    ! updated field size calculation for some some extended types.

  * harbour/source/rdd/workarea.c
    * generate RT error when CREATEFIELD() method does not accept some
      parameters to avoid silent DBCREATE() failing.

  * harbour/source/vm/macro.c
    * removed hb_compMemvarCheck() - this function was not dooing
      anything - only slows the TYPE() by calling hb_dynsymFind()
      one or two times.
    + added TODO note: memvars create by TYPE() have PUBLIC scope
      in Clipper. Clipper also always tries to evaluate valid expressions
      inside TYPE even if the contain UDF. UDF only stops evaluation
      so:
         TYPE( "(val:=1) + f() + (val2:=2)" )
      creates in clipper public variable VAL but not VAL2.
2006-12-22 10:07:21 +00:00
Przemyslaw Czerpak
f63975287b 2006-12-18 19:30 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/config/w32/bcc32.cf
    * cleanup
  + harbour/config/w32/xcc.cf
    + added XCC support

  * harbour/contrib/btree/hb_btree.c
    * use hb_vmAtInit()/hb_vmAtExit() instead of INIT/EXIT functions defined
      from C code

  * harbour/contrib/libct/tab.c
    * casting

  * harbour/contrib/odbc/odbc.c
    ! removed #include <malloc.h> - it should not be used with new C
      compilers
      I think that we should replace this library with hbodbc from xHarbour.

  * harbour/contrib/ole/ole2.c
    * updated for XCC

  * harbour/include/hbdefs.h
    * include stdint.h if available

  * harbour/source/compiler/complex.c
    ! fixed yet another stupid mistake in WITHOBJECT token

  * 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/hvm.c
    + added HB_P_SWAP <n> PCODE

  * harbour/include/hbcompdf.h
  * harbour/include/hbexpra.c
  * harbour/include/hbexprb.c
  * harbour/include/hbexprc.c
  * harbour/include/hbexprop.h
    ! fixed GPF during compilation of @:var, @:&var, @o:&var
    + added support for @o:&var and @:var, @:&var inside WITH OBJECT
      statement
    * changed PCODE generated of ++,--,+=,-=,...
      Now left side expression is evaluated _ONLY_ once and when object
      messages are used it's guarantied that exactly the same object
      variable will be used. It also fixes some problems which exists
      in Clipper. This optimization is enabled by -kh flag (by default)
      and can be disabled with -kc.
    % optimize ald macros in ++,--,+=,-=,... operations
    * add automatically "_" prefix when macro message is used in assignment
      context, f.e.:
         s:="osCode"
         o:=errorNew()
         ? o:&s
         o:&s := 100
         ? ++o:&s
         ? o:&s *= 5

  * harbour/include/hblang.ch
    - removed #xtranslate - this file is included by C code and some C
      compiler do not like unknown directives

  * harbour/utils/hbtest/rt_math.prg
    + added test code for <op>assign and (pre/post)(inc/dec)rementation,
      macro messages and WITH OBJECT

  * harbour/source/compiler/harbour.c
  * harbour/source/rdd/dbf1.c
  * harbour/source/rtl/errorapi.c
  * harbour/source/rtl/hbgtcore.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
    * casting and warning cleanup

  * harbour/utils/Makefile
    + added $(HB_UTILS)

  - harbour/utils/hbpp/hbpp.h
  + harbour/utils/hbpp/hbppdef.h
  * harbour/utils/hbpp/hbpp.c
  * harbour/utils/hbpp/hbppcomp.c
  * harbour/utils/hbpp/hbppcore.c
  * harbour/utils/hbpp/hbpplib.c
  * harbour/utils/hbpp/hbpptbl.c
  * harbour/utils/hbpp/pragma.c
    * renamed hbpp.h to hbppdef.h to avoid possible conflict with hbpp.h
      in include directory
    * casting and warning cleanup
2006-12-18 18:34:44 +00:00
Ryszard Glab
c018b6bf9a 2006-12-18 18:20 UTC+0100 Ryszard Glab <rglab//imid.med.pl>
* include/hbcomp.h
      + added extern BOOL hb_compCheckUnclosedStru( HB_COMP_DECL )

   * include/hbcompdf.h
      + added 'int iLastLineErr' to HB_COMP structure

   * include/hbpp.h
      + added extern BOOL hb_pp_eof( PHB_PP_STATE )

   * source/compiler/harbour.c
   * source/compiler/harbour.y
   * source/compiler/harbour.yyc
   * source/compiler/harbour.yyh
   * source/compiler/hbgenerr.c
      * fixed reporting errors in cases of unclosed delimiters or
      unclosed control structures IF/WHILE/FOR/etc

   * source/pp/ppcore.c
      + added hb_pp_eof() function
2006-12-18 17:22:06 +00:00
Przemyslaw Czerpak
bdb38dde43 2006-12-15 16:55 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapi.h
  * harbour/include/hbcomp.h
  * harbour/include/hbcompdf.h
  * harbour/include/hbdefs.h
  * harbour/include/hberrors.h
  * harbour/include/hbexpra.c
  * harbour/include/hbexprb.c
  * harbour/include/hbexprc.c
  * harbour/include/hbpcode.h
  * harbour/include/hbxvm.h
  * harbour/source/common/expropt1.c
  * harbour/source/common/expropt2.c
  * harbour/source/common/hbstr.c
  * harbour/source/compiler/cmdcheck.c
  * harbour/source/compiler/genc.c
  * harbour/source/compiler/gencc.c
  * harbour/source/compiler/gencobj.c
  * harbour/source/compiler/harbour.c
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyc
  * harbour/source/compiler/hbdead.c
  * harbour/source/compiler/hbfix.c
  * harbour/source/compiler/hbgenerr.c
  * harbour/source/compiler/hblbl.c
  * harbour/source/compiler/hbpcode.c
  * harbour/source/compiler/hbstripl.c
  * harbour/source/macro/macro.y
  * harbour/source/macro/macro.yyc
  * harbour/source/rtl/console.c
  * harbour/source/rtl/isprint.c
  * harbour/source/rtl/left.c
  * harbour/source/rtl/right.c
  * harbour/source/rtl/strtran.c
  * harbour/source/vm/codebloc.c
  * harbour/source/vm/hvm.c
  * harbour/source/vm/macro.c
    * general PCODE cleanup and address most of TODO/TOFIX notes in
      source code:
      ! fixed GPF traps when too long string or codeblock is generatd
      + added support for 16MB codeblocks and strings
      ! removed macrocompiler limitation for jumps range
      ! fixed GPF when more then 255 local variables is used and added
        support for 2^15 locals
      ! removed all strtok() functions
      % added optimization for all +=, -=, *=, %=, ^=, **= operations
        when left side of expression is variable or array item
      % added optimization for all +=, -=, *=, %=, ^=, **= operations
        when left side of expression is object method and updated ++, --
        for new code. It's still disabled until we will not add support
        for late evaluated reference items to HVM
      ! fixed a[++i]++ and similar operations (a[++i]*=2, ...). Now ++i is
        executed only once. It's not Clipper compatible but it was in
        TODO note in source code. It can be disabled by -kc option
      * finished support to xHarbour like #pragma TEXTHIDDEN(1)
      ! fixed local add int optimization when PARAMETERS used after
        optimization changed local variable number over 255
      ! fixed GPF trap when in HB_P_<op>EQ PCODEs when executed for
        direct values
      * others
    ! fixed problems reported by Chen
    * optimized strtran(), left(), right() to not create new string copy
      when the same value is returned
2006-12-15 15:54:28 +00:00
Przemyslaw Czerpak
93e0db5a23 2006-12-09 17:10 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/config/bsd/gcc.cf
  * harbour/config/darwin/gcc.cf
  * harbour/config/dos/bcc16.cf
  * harbour/config/dos/djgpp.cf
  * harbour/config/dos/owatcom.cf
  * harbour/config/dos/rsx32.cf
  * harbour/config/hpux/gcc.cf
  * harbour/config/linux/gcc.cf
  * harbour/config/linux/owatcom.cf
  * harbour/config/os2/gcc.cf
  * harbour/config/os2/icc.cf
  * harbour/config/sunos/gcc.cf
  * harbour/config/w32/bcc32.cf
  * harbour/config/w32/gcc.cf
  * harbour/config/w32/mingw32.cf
  * harbour/config/w32/msvc.cf
  * harbour/config/w32/rsxnt.cf
  * harbour/config/w32/watcom.cf
    * added respecting HB_GT_DEFAULT, though it's quite possible that I'll
      remove it at all soon.
    * some other cleanup

  * harbour/source/compiler/complex.c
    ! fixed wrongly replicated from FLEX lexer condition used to DECLARE.
      Now they should be the same as in FLEX lexer but IMHO they are not
      Clipper compatible.

  * harbour/source/compiler/gencli.c
  * harbour/source/compiler/gencobj.c
  * harbour/source/compiler/genhrb.c
  * harbour/source/compiler/genjava.c
  * harbour/source/compiler/genobj32.c
  * harbour/source/compiler/harbour.c
  * harbour/source/rtl/hbffind.c
  * harbour/source/pp/ppcore.c
  * harbour/source/rdd/workarea.c
    ! fixed sizes of some C stack buffers and strncpy() parameters
    * use hb_strn*() instead of strn*() in few places to be sure that 0
      is always stored in destination buffer

  * harbour/source/rtl/gtcgi/gtcgi.c
    * change reported GT name from "Standard stream console" to
      "Raw stream console" to make it differ then GTSTD one.
2006-12-09 16:11:10 +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
4dfc616250 2006-12-01 18:55 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/bin/pack_src.sh
    + added packing *.yy[ch] files

  * harbour/makefile.bc
  * harbour/makefile.vc
  * harbour/include/hbcomp.h
  * harbour/include/hbcompdf.h
  * harbour/include/hbexpra.c
  * harbour/include/hbexprb.c
  * harbour/include/hbexprc.c
  * harbour/include/hbexprop.h
  * harbour/include/hbpp.h
  * harbour/source/common/expropt1.c
  * harbour/source/common/expropt2.c
  * harbour/source/compiler/Makefile
  * harbour/source/compiler/complex.c
  * harbour/source/compiler/harbour.c
  * harbour/source/compiler/harbour.l
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyc
  * harbour/source/compiler/harbour.yyh
  * harbour/source/compiler/hbgenerr.c
  * harbour/source/macro/macro.y
  * harbour/source/macro/macro.yyc
  * harbour/source/pp/ppcore.c
    + added hb_comp prefix to grammar/lexer compiler public functions to
      reduce possible conflict with 3-rd party code which may use default
      yy prefix.
    ! do not use bison destructors for expressions. Internal bison logic
      cannot properly detect if expression was used or not in some of our
      grammar rules and it's possible that some expressions will not be freed
      and some other freed twice.
    ! added protection against multiple destructors execution for CBSTART
      and LITERAL tokens
    * added small garbage collector for deallocating expressions which were
      not freed (such situation can happen in syntax errors)
    % some optimizations in used structures to reduce their sizes
    + added protection against execution PCODE optimizations for functions
      which were not cleanly compiled.

  * harbour/source/rtl/idle.c
    * use const in nanosec() timeout declaration
2006-12-01 18:00:53 +00:00
Przemyslaw Czerpak
1808aec080 2006-11-30 03:50 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbcompdf.h
  * harbour/source/compiler/harbour.l
  * harbour/source/compiler/harbour.c
  * harbour/source/compiler/harbour.y
    * removed declaration and all references to global variable hb_comp_data
      it's not longer necessary after last modifications

  * harbour/source/compiler/harbour.yyc
    * synced compiler grammar parser

  * harbour/source/macro/macro.yyc
    ! regenerated macro compiler grammar parser with -p hb_macro - I forgot
      about this prefix before last commit
2006-11-30 02:54:29 +00:00
Przemyslaw Czerpak
390affe026 2006-11-28 16:00 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/Makefile
    + added hbcompdf.h and hbstdgen.ch

  * harbour/source/compiler/harbour.y
  * harbour/source/macro/macro.y
    + added #define __STDC__ as workaround for __BORLANDC__ which seems
      to not properly understand ANSI C declarations. It should pacify
      some of BCC warning messages about undeclared functions
  * harbour/source/compiler/harbour.yyc
  * harbour/source/compiler/harbour.yyh
  * harbour/source/macro/macro.yyc
  * harbour/source/macro/macro.yyh
    * updated generated grammar parser files for above modification
      in parser definition files (.y)
2006-11-29 15:06:27 +00:00
Przemyslaw Czerpak
9967551273 2006-11-28 19:30 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/compiler/harbour.y
    * use HB_COMP_PARAM macro in expression destructor instead of
      direct accessing hb_comp_data global variable to make compiler
      code MT safe

  + harbour/source/compiler/harbour.yyc
  + harbour/source/compiler/harbour.yyh
  + harbour/source/macro/macro.yyc
  + harbour/source/macro/macro.yyh
    + added generated by bison 2.3 grammar parsers for compiler and
      macro compiler

  * harbour/config/dos/global.cf
  * harbour/config/dos/install.cf
  * harbour/config/w32/global.cf
    * changed CP definition for COMMAND.COM so it can work as standalone
      command and added DIRSEP macro

  * harbour/config/c.cf
    + added support for HB_REBUILD_PARSER=no environment variable.
      When it's set then during build process grammars parsers
      will not be generated from grammar definitions files (.y)
      but instead the predefined ones (.yyc) used.
      Tested and works well in Linux and DOS

  * harbour/makefile.bc
    + added support for HB_REBUILD_PARSER=no environment variable.
      Not tested. It's even possible that I've just broken the BCC
      compilation with this modification. Please check it and fix
      me if necessary.
2006-11-28 18:29:44 +00:00
Przemyslaw Czerpak
e79392e512 2006-11-28 05:40 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/compiler/harbour.c
    ! fixed typo in last modification which caused memory leak

  * harbour/source/vm/codebloc.c
    + initialize freed codeblock structure with pointer to static PCODE
      which returns NIL for buggy .prg destructors.

  * harbour/ChangeLog
    ! fixed date of my last commit
2006-11-28 04:41:45 +00:00