Commit Graph

35 Commits

Author SHA1 Message Date
Ryszard Glab
4aeac1e509 2006-09-20 14:15 UTC+0100 Ryszard Glab <rglab//imid.med.pl>
* include/hbpcode.h
      + added new pcode HB_P_VFRAME

   * include/hbapi.h
      + added USHORT paramdeclcnt to asSymbol structure

   * include/hbstack.h
   * source/vm/estack.c
      + added hb_stackLocalVariable() to acces local variables

   * source/compiler/genc.c
   * source/compiler/gencc.c
   * source/compiler/harbour.c
   * source/compiler/harbour.l
   * source/compiler/harbour.y
   * source/compiler/hbdead.c
   * source/compiler/hbfix.c
   * source/compiler/hblbl.c
   * source/compiler/hbpcode.c
   * source/compiler/hbstripl.c
   * source/vm/hvm.c
      + added support for variable number of parameters in
      functions/procedures

   + tests/varparam.prg
      * example usage of new syntax for variable number of
      parameters

   * source/vm/arrayshb.c
      * changed HB_APARAMS() to use current stack frame if no
      arguments are passed ( HB_APARAMS() == HB_APARAMS(0) )

  SYNTAX for variable number of parameters
   1) [FUNCTION|PROCEDURE] name( ... )
   or
   2) [FUNCTION|PROCEDURE] name( var1, var2, varN, ... )

   To access passed parameters use the following:
   PCOUNT() - returns number of passed parameters
   HB_PVALUE( iParamNum ) - returns <iParamNum> parameter
   HB_APARAMS() - returns array with all passed parameters
   or usual name of parameter variable in case of syntax 2)
2006-09-20 12:28:58 +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
cb87fbf546 2006-07-26 22:00 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapi.h
  * harbour/include/hbexpra.c
  * harbour/include/hbexprb.c
  * harbour/include/hbexprop.h
  * 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/gencli.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
  * harbour/source/vm/macro.c
    * changed support for XBASE++ extended syntax in expressions like:
         v:="1,2,3"
         x := a[ &v ]
         a := { &v }
         f( &v )
      Now all data is stored on HV  * stack without any external registers
      which have to be saved/restored or updated in chosen operation.
      This modification was necessary to make HV  * reentrant safe and it
      also eliminated some small overhead caused by old code.
      I hope I haven't break anything in compiler - Ryszard please fix me
      if I made sth wrong.

  * harbour/source/vm/hvm.c
  * harbour/source/compiler/harbour.y
    * revert FOR/NEXT stop condition to be Clipper compatible

   PCODE table has been updated and all .prg code which used modified PCODEs
   has to be recompiled
2006-07-26 19:59:02 +00:00
Ryszard Glab
912b301c85 2006-07-14 16:00 UTC+0100 Ryszard Glab <rglab//imid.med.pl>
* include/hbcomp.h
   * include/hberrors.h
   * include/hbexpra.c
   * include/hbexprb.c
   * include/hbexprc.c
   * include/hbmacro.h
   * include/hbpcode.h
   * include/hbpp.h
   * include/hbxvm.h
   * source/common/expropt1.c
   * source/compiler/cmdcheck.c
   * source/compiler/expropta.c
   * source/compiler/exproptb.c
   * source/compiler/exproptc.c
   * source/compiler/genc.c
   * source/compiler/gencc.c
   * source/compiler/gencli.c
   * source/compiler/genhrb.c
   * source/compiler/genjava.c
   * source/compiler/genobj32.c
   * source/compiler/harbour.c
   * source/compiler/harbour.l
   * source/compiler/harbour.y
   * source/compiler/hbdead.c
   * source/compiler/hbfix.c
   * source/compiler/hbfunchk.c
   * source/compiler/hbgenerr.c
   * source/compiler/hblbl.c
   * source/compiler/hbpcode.c
   * source/compiler/hbstripl.c
   * source/macro/macroa.c
   * source/macro/macrob.c
   * source/macro/macroc.c
   * source/vm/hvm.c
   * source/vm/macro.c
      * fixed compilation of code that uses '@' pass by
       reference. The following syntax is no longer supported:
       var := IIF( .T., @var, var )
       however you can still use the following:
       funcall( IIF( bPassbyRef, @someVar, someVar ) )
      +added support for the following statement:
         WITH OBJECT <objexpression>
            ...
         END
       inside this statement you can use simplified form of sending
       messages to the object specified by <objexpression>
         :message( )    instead objexpression:message()
         :property      instead objexpression:property
       The runtime error will be generated at the time of message
       sending (or property access/assign) if <objexpression>
       is not a value of type object.
       You can use the reserved property:
         :__withobject
       to access/assign the controlling object.
      *fixed support for command line response file (@file.clp)
       to be compatible with Clipper (Clipper genertes a single
       obj file)
      *fixed memory leaks when there is a fatal error in autoopened
       module (using DO ... statement)
      *implicit startup functions are removed from the list of
       functions before generation of output code

   * source/pp/ppcomp.c
   * source/pp/pplib.c
   * source/pp/ppcore.c
      * redefinition of #define no longer causes a memory leak
      * fixed repeatable optional clauses
         #xcommand SET <var1> [, <varN>] WITH <val> =>
          <var1>:=<val>[; <varN>:=<val>]
      * fixed compilation of optional clauses (when used in different
        order then declared) -this fixes the following long
        waiting bug:
         #command MYCOMMAND [<mylist,...>] [MYCLAUSE <myval>] => ;
            MyFunction( {<mylist>} [, <myval>] )
         MYCOMMAND MYCLAUSE 321 "HELLO"
      * fixed restricted macro match marker <x:&>

   * tests/Makefile
   - tests/pretest.prg
   + utils/hbpptest
   + utils/hbpptest/Makefile
   + utils/hbpptest/pretest.prg
      * moved file 'pretest.prg' from tests to separate directory
        to make easier validation of the preprocessor

   * TODO
      * added note to fix hb_objGetMethod() so it will not generate
        error if there is no method

   * doc/en/clipper.txt
      * added documentation for WITH OBJECT usage
2006-07-14 13:47:17 +00:00
Przemyslaw Czerpak
4ee1406dd5 2006-03-21 02:25 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/make_gnu.bat
  * harbour/make_gnu.cmd
  * harbour/make_gnu.sh
    * added information about GTWVT to GT description for Windows

  * harbour/contrib/rdd_ads/ads1.c
  * harbour/contrib/rdd_ads/adsfunc.c
  * harbour/source/rdd/dbf1.c
    * synced with xHarbour

  * harbour/source/rtl/console.c
    ! fixed PROW() updating to be Clipper compatible when row number
      exceed 16bit integer value

  * harbour/source/rtl/filesys.c
    ! fixed possible GPF when hb_fsCurDirBuff()

  * harbour/source/rtl/str.c
  * harbour/source/rtl/strzero.c
    * minor optimizations

  * harbour/source/rtl/strpeek.c
    ! fixed accessing the last character in STRPEEK() and STRPOKE()

  * harbour/include/hbgtinfo.ch
  * harbour/source/rtl/gtwin/gtwin.c
    + synced with recent xHarbour modifications

  * harbour/source/rtl/gtwvt/gtwvt.c
    * cleaned BCC warning

  * harbour/include/hbapi.h
  * harbour/source/vm/codebloc.c
    * declare BYTE * passed to hb_codeblockNew() as const

  * harbour/include/hbpcode.h
    ! fixed the PCODE numbers in PCODE description, 122 was repeated for
      two different PCODEs: HB_P_ONE and HB_P_MACROLIST

  * harbour/source/compiler/genc.c
    ! fixed hb_p_functionshort pcode size returned by genc function
    ! fixed double value presented in verbose genc mode for HB_P_PUSHDOUBLE
    ! fixed number of cases presented in verbose genc mode for HB_P_SWITCH

  * harbour/source/compiler/hbdead.c
    + added support for dead code elimination in functions which uses
      SWITCH ...; CASE ...; ...; END syntax

  * harbour/source/compiler/harbour.c
  * harbour/source/compiler/hbfix.c
    ! fixed optimization for HB_P_PUSHLOCALNEAR and HB_P_POPLOCALNEAR.
      It was a long existing bug not reported so far because 0, 1 and 2
      PCODEs uses only one BYTE and bad PCODE tracing in hbfix.c didn't
      caused bad side effects as long as number of locals in function
      was smaller then 768. Now for functions HB_P_PUSHLOCAL and
      HB_P_POPLOCAL is used and later changed to NEAR version in hbfix.c
      if possible.

  * harbour/source/compiler/hbfix.c
    * join sequential jumps to optimize constructions like:
         while ...
            ...
            if ...
               exit
            endif
         enddo

  * harbour/source/compiler/hbdead.c
    * remove HB_P_END PCODE also at the and of function if is repeated
      just before, f.e. in code like (source/rtl/color53.prg):
         Function RADGRDEFCO( cColor )
            if isdefcolor()
               Return applydefau( cColor, "W/N", "W/N", "W+/N")
            Else
               Return applydefau( cColor, 3, 1, 4)
            endif
         Return nil
      Now such redundant constructions like above are fully stripped by
      compiler anyhow if someone has time and think is important then can
      clean also this .prg code.


  * harbour/include/Makefile
  * harbour/include/hbcomp.h
  + harbour/include/hbxvm.h
  * harbour/source/compiler/Makefile
  * harbour/source/compiler/cmdcheck.c
  * harbour/source/compiler/genc.c
  + harbour/source/compiler/gencc.c
  + harbour/source/compiler/hblbl.c
  * harbour/source/compiler/hbpcode.c
  * harbour/source/vm/hvm.c
    + added support for generating real C code not PCODE in .c files.
      Now with  -gc3 Harbour will generate .c files with real .c code
      which is later compiled to real machine code.
      I left PCODE only for code block definitions though it's also
      possible to have even code block compiled to machine code but
      we will have to add a flag to codeblock structure which will
      be checked at runtime and proper method of execution in EVAL
      will be chosen. If you think it's worth of afford then I can
      add it too in some spare time.
      The final binaries are noticable longer then the one which has
      only PCODE but they are faster. The speed improvement depends
      on type of operations. The pure Clipper code which does not
      execute any external time consuming C functions compiled with
      -gc3 is from 10% to 50% faster.
      The side effect of generating pure machine code is also harder
      recompilation but it does not mean that is impossible. If sth
      can be executed by some machines (virtual or hardware) then it
      can always be decompiled by definition.
      This modification opens door for farther optimization, f.e. when
      we will have fully working strong type support then we can add
      using native .c types.
      In fact this module is PCODE to .c translater not part of compiler
      and can be used as separate module to translate generated PCODE,
      f.e. .hrb files.
      Maybe in the future we will change the compiler to generate meta
      code not directly PCODE and it will be possible to make optimizations
      on this meta code which will depend on selected output type:
      VHM PCODE, C code, .NET code, etc. but at this moment adding support
      for .c compilation directly into compiler will make the compiler code
      too much complicated for me - IMHO it's better to invest time into
      clear separation to FRONT_END->REAL_COMPILER->BACK_END
      Please make test with your code. I rebuild whole Harbour code with
      -gc3 set in HB_FLAGS in harbour/config/rules.cf and all seems to
      work correctly. hbtest returns exactly the same results.
      I also made tests with my programs and they work correctly but
      I had to define actions for all PCODEs and it's possible that made
      some typos in some of them which are very seldom used so your tests
      will be very important.
2006-03-21 01:25:32 +00:00
Ryszard Glab
6f0e36f665 2006-02-14 11:40 UTC+0100 Ryszard Glab <rglab@imid.med.pl>
* include/hbapiitm.h
   * include/hbcomp.h
   * include/hbexpra.c
   * include/hbexprb.c
   * include/hbexprc.c
   * include/hbexprop.h
   * include/hbpcode.h
   * source/common/expropt1.c
   * source/common/hbfsapi.c
   * source/compiler/expropta.c
   * source/compiler/exproptb.c
   * source/compiler/exproptc.c
   * source/compiler/genc.c
   * source/compiler/harbour.c
   * source/compiler/harbour.l
   * source/compiler/harbour.y
   * source/compiler/hbdead.c
   * source/compiler/hbfix.c
   * source/compiler/hbpcode.c
   * source/compiler/hbstripl.c
   * source/macro/macro.y
   * source/macro/macroa.c
   * source/macro/macrob.c
   * source/macro/macroc.c
   * source/pp/ppcore.c
   * source/vm/hvm.c
   * source/vm/itemapi.c
      * fixed many more memory leaks in the compiler
        (the Harbour code compiles itself with no memory leaks).
        However there are still leaks when the compiler aborts
        compilation due to errors.
      + added optimalization of '+=' '-=' '*=' '/=' operators
      + added hb_itemGetNDDec(),
        hb_itemPutHBLong(),
        hb_itemPutNumType()
        borrowed from xHarbour

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

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

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

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

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

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

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

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

  * harbour/include/Makefile
    * added new header files

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

   *** Please updated non GNU make files ***
2006-02-04 16:16:48 +00:00
Viktor Szakats
54ef385941 2005-11-24 23:24 UTC+0100 Viktor Szakats (viktor.szakats/syenar.hu)
* include/hbpcode.h
    + Comment added about adding new pcodes at the end of
      the list for compatibility.

  * source/rtl/filesys.c
    + Added hb_fsSetDevMode() Unix branch added (thx Przemek)

  * tests/mathtest.prg
  * source/rtl/math.c
    ! Fixed prev commit to comply with 10char function name
      rule:
      HB_MATHERRMODE()    -> HB_MATHERMODE()
      HB_MATHERRORBLOCK() -> HB_MATHERBLOCK()

  * source/rtl/seconds.c
    ! hb_secondsCPU() move inside FlagShip guard instead
      of HB_EXTENSION.
    * hb_secondsCPU() made static (Harbour level function
      helper only with non-std name).

  * source/vm/dynlibhb.c
  * include/hbextern.ch
    * LIBLOAD(), LIBFREE() moved (back) to Harbour namespace:
      HB_LIBLOAD(), HB_LIBFREE()
    + Added these functions to hbextern.ch

  * source/rtl/symbol.prg
  * source/vm/dynsym.c
  * include/hbextern.ch
    * Internal function names renamed to comply and to
      not collide with existing ones (mistake in prev
      commit).

  + tests/symbolt.prg
    ; Missed from prev commit.
2005-11-24 22:35:36 +00:00
Ryszard Glab
dde0793b53 2005-11-14 11:00 UTC+0100 Ryszard Glab <rglab@imid.med.pl>
* include/hbcomp.h
   * include/hberrors.h
   * include/hbexpra.c
   * include/hbexprb.c
   * include/hbexprop.h
   * include/hbhash.h
   * include/hbmacro.h
   * include/hbpcode.h
   * source/common/Makefile
   * source/common/expropt1.c
   * source/common/expropt2.c
   * source/common/hbhash.c
   * source/compiler/expropta.c
   * source/compiler/exproptb.c
   * source/compiler/genc.c
   * source/compiler/harbour.c
   * source/compiler/harbour.l
   * source/compiler/harbour.y
   * source/compiler/hbfix.c
   * source/compiler/hbgenerr.c
   * source/compiler/hbident.c
   * source/compiler/hbpcode.c
   * source/macro/macro.l
   * source/macro/macro.y
   * source/macro/macroa.c
   * source/macro/macrob.c
   * source/rtl/dates.c
   * source/vm/hvm.c
   * source/vm/macro.c
   + source/common/hbdate.c
   + tests/ddate.prg
   + tests/switch.prg
      +added support for DATE type constants in the following format:
         0dYYYYMMDD
      for example (see tests/ddate.prg for more):
      IF( dDate > 0d20051112 )

      +added support for SWITCH command (see tests/switch.prg)
         SWITCH <expr>
         CASE <integer_expression>
            ...
            [EXIT]
         CASE <string_expression>
            ...
            [EXIT]
         [OTHERWISE]
            ...
         END

   Notice:
      - Integer and string expressions can be mixed in a single
        SWITCH command with no runtime errors;
      - CASE expression have to be resolved at compile time and
        the result has to be either an integer or string constant
      - if there is no EXIT statement then next CASE is executed
        (or OTHERWISE for the last CASE)
      For example:
      CASE 1+32+2*4
      CASE CHR(64)
      CASE ASC('A')
      CASE "A"+CHR(13)

   Notice:
      The above changes apply only to FLEX version!
2005-11-14 09:47:46 +00:00
Ryszard Glab
d947f68c8e 2005-11-07 14:35 UTC+0100 Ryszard Glab <rglab@imid.med.pl>
* include/hbapi.h
   * include/hbapiitm.h
   * include/hbcomp.h
   * include/hberrors.h
   * include/hbexpra.c
   * include/hbpcode.h
   * include/hbsetup.h
   * source/common/expropt1.c
   * source/compiler/expropta.c
   * source/compiler/genc.c
   * source/compiler/gencli.c
   * source/compiler/harbour.c
   * source/compiler/harbour.l
   * source/compiler/harbour.y
   * source/compiler/hbfix.c
   * source/compiler/hbgenerr.c
   * source/compiler/hbpcode.c
   * source/macro/macroa.c
   * source/vm/hvm.c
   * source/vm/itemapi.c
   + tests/foreach.prg
      + added support for FOR EACH loop
         FOR EACH var1 [,var255] IN expr1 [,expr255] [DESCEND]
         NEXT

         Note:
            -expr can be a string or an array
               if it is a string then assigments to the control
               variable does not change the string
            -after the loop the controlling variable(s) store the
             value which they had before entering the loop
            -the controlling variable supports the following properties
             :__enumindex - the loop counter for variable
             :__enumbase  - the value that is being traversed
             :__enumvalue - the value of variable
            -see tests/foreach.prg for examples

      + added warnings in cases of duplicated loop variables
       eg. FOR i:=1 TO 5
            FOR i:=i TO i+5

      -removed strong typing in the compiler (xHarbour too)
      (reactivate it by compiling with -DHB_COMP_STRONG_TYPES)

NOTE:
   The new pcodes were added - rebuild everything
2005-11-07 13:28:40 +00:00
Przemyslaw Czerpak
ef0883bf02 2004-10-11 21:40 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/Makefile
  + harbour/make_bsd.sh
  + harbour/make_drw.sh
  * harbour/make_tgz.sh
  + harbour/bin/hb-func.sh
  * harbour/bin/pack_src.sh
  + harbour/bin/postinst.bat
  + harbour/bin/postinst.sh
  * harbour/config/dir.cf
  * harbour/config/bsd/gcc.cf
  * harbour/config/bsd/global.cf
  + harbour/config/darwin/dir.cf
  + harbour/config/darwin/gcc.cf
  + harbour/config/darwin/global.cf
  + harbour/config/darwin/install.cf
  * harbour/config/dos/dir.cf
  * harbour/config/dos/global.cf
  * harbour/config/dos/install.cf
  * harbour/config/dos/owatcom.cf
  * harbour/config/dos/watcom.cf
  * harbour/config/linux/gcc.cf
  * harbour/config/linux/global.cf
  * harbour/contrib/Makefile
  * harbour/contrib/dot/pp_harb.ch
  * harbour/contrib/libct/Makefile
  * harbour/contrib/libct/bit1.c
  * harbour/contrib/libct/bit2.c
  * harbour/contrib/libct/bit3.c
  * harbour/contrib/libct/files.c
  * harbour/contrib/libct/ftoc.c
  - harbour/contrib/libct/invertwin.prg
  + harbour/contrib/libct/invrtwin.prg
  * harbour/contrib/libct/keyset.c
  * harbour/contrib/libct/makefile.bc
  * harbour/contrib/libmisc/dates2.c
  * harbour/contrib/rdd_ads/ads1.c
  * harbour/contrib/rdd_ads/adsfunc.c
  * harbour/contrib/samples/date.c
  * harbour/include/dbinfo.ch
  * harbour/include/hbapi.h
  * harbour/include/hbapicdp.h
  * harbour/include/hbapifs.h
  * harbour/include/hbapigt.h
  * harbour/include/hbapiitm.h
  * harbour/include/hbcomp.h
  * harbour/include/hbdate.h
  * harbour/include/hbdbf.h
  * harbour/include/hbdbferr.h
  * harbour/include/hbdefs.h
  * harbour/include/hbexprb.c
  * harbour/include/hbexprc.c
  * harbour/include/hbexprop.h
  * harbour/include/hbmacro.h
  * harbour/include/hbmath.h
  * harbour/include/hbpcode.h
  * harbour/include/hbrddcdx.h
  * harbour/include/hbrdddbf.h
  * harbour/include/hbrdddbt.h
  * harbour/include/hbrddfpt.h
  * harbour/include/hbrddntx.h
  * harbour/include/hbset.h
  * harbour/include/hbsetup.h
  * harbour/include/set.ch
  * harbour/source/common/Makefile
  * harbour/source/common/expropt1.c
  * harbour/source/common/expropt2.c
  - harbour/source/common/hbffind.c
  * harbour/source/common/hbfsapi.c
  * harbour/source/common/hbstr.c
  * harbour/source/common/hbver.c
  + harbour/source/common/hbverdsp.c
  * harbour/source/compiler/genc.c
  * harbour/source/compiler/gencli.c
  * harbour/source/compiler/harbour.c
  * harbour/source/compiler/harbour.l
  * harbour/source/compiler/harbour.slx
  * harbour/source/compiler/harbour.sly
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/hbfix.c
  * harbour/source/compiler/hbpcode.c
  * harbour/source/compiler/hbusage.c
  * harbour/source/compiler/simplex.c
  * harbour/source/macro/macro.l
  * harbour/source/macro/macro.slx
  * harbour/source/macro/macro.y
  * harbour/source/pp/ppcore.c
  * harbour/source/rdd/dbcmd.c
  * harbour/source/rdd/dbf1.c
  * harbour/source/rdd/dbfcdx/dbfcdx1.c
  - harbour/source/rdd/dbfcdx/dbfcdx1.h
  * harbour/source/rdd/dbffpt/dbffpt1.c
  * harbour/source/rdd/dbfntx/dbfntx1.c
  * harbour/source/rtl/Makefile
  * harbour/source/rtl/abs.c
  * harbour/source/rtl/at.c
  * harbour/source/rtl/datec.c
  * harbour/source/rtl/dates.c
  * harbour/source/rtl/dateshb.c
  * harbour/source/rtl/datesx.c
  * harbour/source/rtl/empty.c
  * harbour/source/rtl/errorapi.c
  * harbour/source/rtl/errorint.c
  * harbour/source/rtl/filesys.c
  * harbour/source/rtl/fstemp.c
  + harbour/source/rtl/hbffind.c
  * harbour/source/rtl/hbrandom.c
  * harbour/source/rtl/idle.c
  * harbour/source/rtl/inkey.c
  * harbour/source/rtl/math.c
  * harbour/source/rtl/minmax.c
  * harbour/source/rtl/pad.c
  * harbour/source/rtl/padc.c
  * harbour/source/rtl/padl.c
  * harbour/source/rtl/padr.c
  * harbour/source/rtl/philes.c
  * harbour/source/rtl/round.c
  * harbour/source/rtl/soundex.c
  * harbour/source/rtl/str.c
  * harbour/source/rtl/strcase.c
  * harbour/source/rtl/strmatch.c
  * harbour/source/rtl/strtran.c
  * harbour/source/rtl/strzero.c
  * harbour/source/rtl/substr.c
  * harbour/source/rtl/val.c
  * harbour/source/rtl/gtcrs/gtcrs.c
  * harbour/source/rtl/gtcrs/kbdcrs.c
  * harbour/source/rtl/gtdos/gtdos.c
  * harbour/source/rtl/gtsln/gtsln.c
  * harbour/source/rtl/gtsln/kbsln.c
  * harbour/source/rtl/gtsln/keytrans.c
  * harbour/source/vm/arrays.c
  * harbour/source/vm/codebloc.c
  * harbour/source/vm/estack.c
  * harbour/source/vm/eval.c
  * harbour/source/vm/extend.c
  * harbour/source/vm/hvm.c
  * harbour/source/vm/itemapi.c
  * harbour/source/vm/macro.c
  * harbour/source/vm/memvars.c
  * harbour/source/vm/runner.c
  * harbour/tests/bldtest/bldtest.c
  * harbour/utils/hbtest/hbtest.prg
  * harbour/utils/hbtest/rt_misc.prg
  * harbour/utils/hbtest/rt_str.prg
   * Sorry but it's too much modification for full description
     cvs diff gives file 785982 bytes length. So I only count the
     main things:
   ! cleand the code (no more warning messages under Linux and GCC and
     DOS OpenWatcom) - some of them were real bugs
   ! cleaned all endian dependend code I've found - now Harbour can be
     compiled on LITLE and BIG endian machines - for some other like
     PDP ENDIAN it's enough to define proper macros in hbdefs.h
   + added macros for to get/put values in chosen byte order:
         HB_GET_LE_[U]INT{16,24,32,64}( pPtr )
         HB_GET_BE_[U]INT{16,24,32,64}( pPtr )
         HB_PUT_LE_[U]INT{16,24,32,64}( pPtr, nVal )
         HB_PUT_BE_[U]INT{16,24,32,64}( pPtr, nVal )
   + added macro HB_CAST_BYTE_NUMBERS_OFF which disables casting in
     HB_{GET|PUT}_{LE|BE}_* macros - it's necessary for some platforms
     like ALPHA DEC.
   ! cleaned the code for 64bit machines
   * changed all parameters in hb_date* functions (day, month, year, week)
     from LONG to int - it doesn't change binary compatibility for 32bit
     machines but can cause troubles with compiling the old source
   + changed HB_IT_LONG type to HB_LONG which is mapped to long long
     by default for 32 bit machines.
   + change HB_IT_INTEGER to be real 'int' C type not 'short int'
   + added HB_IS_NUMINT() macro
   + added hb_parnll, hb_stornll, hb_retnll, hbretnlllen, hb_itemPutNLL,
     hb_itemPutNLLLen, hb_itemGetNLL which operates on LONGLONG
   + added hb_parnint, hb_stornint, hb_retnint, hb_retnintlen,
     hb_itemPutNInt, hb_itemPutNIntLen, hb_itemGetNInt which operates on
     HB_LONG
   + added HB_PUSHLONGLONG pcode
   + changed compiler and optimizer to use HB_LONG numbers and reduce
     conversion from to double which may damage the 64bit number.
   + common functions for string to number conversions for compiler, RTL
     and RDD to reduce problems with differ FL values for the same number:
     hb_compStrToNum(), hb_valStrnToNum(), hb_strToNum(), hb_strnToNum()
   + common function hb_numRoun() which uses exactly the same algorithms
     as string to number conversion for the same reason - please keep
     this functions together.
   + hack inside hb_numRound() similar to the one used by CL5.3
   + hb_numInt() which uses uses the same hack as hb_numRound()
   + rewritten number to string conversion
   + some new string manipulation functions hb_strncpy(), hb_strncat(), ...
     They works differ the the C one - always set 0 at the end, the buffer
     has to be n+1 bytes length, the n is total size of buffer not the
     left free space.
   ! cleaned some code which operates on ASCIIZ string to avoid potential
     buffer overflow
   + updated RDD code - it's the first part - in few days I plan to change
     workarea structure in both projects - it will break any 3rd party RDDs
     so they have to be updated. I want to add SUPERTABLE into workarea
     to allow creating new RDD on-line.
   ! cleaned the bugs with negating integers - on most machines (like x86)
     the integers are not 0 symmetric - it means that x = -x does not work
     for {INT,LONG,LONGLONG}_MIN (hb_vmNegate, ABS())
   + cleaned error messages to be Clipper compatible.
   + updated build process for .DEB packages - now hb* scripts and shared
     libs are created by standard make install
   * added new .prg #defines: __PLATFORM__<cPlatfrom>,
     __ARCH{16|32|64}BIT__, __LITTLE_ENDIAN__|__BIG_ENDIAN__|__PDP_ENDIAN__
     !!! cPlatfrom can have lower letters (for xHarbour compatibility)
     If you do not like it please change it.
   * others ...
2004-10-11 20:44:30 +00:00
Ryszard Glab
0fcf861638 2004-03-09 13:50 UTC+0100 Ryszard Glab <rglab@imid.med.pl>
+ source/rtl/altd.prg
      +new file with ALTD() procedure code

   * hrbdll.bc
   * hrbdll.vc
   * makefile.bc
   * makefile.nt
   * makefile.vc
   * source/rtl/Makefile
      *added a reference to rtl/altd.prg

   * source/common/hbffind.c
      *fixed to compile correctly with HB_OS_UNIX

   * include/hbcomp.h
   * include/hbexpra.c
   * include/hbexprb.c
   * include/hbexprop.h
   * include/hbpcode.h
   * source/common/expropt1.c
   * source/compiler/expropta.c
   * source/compiler/exproptb.c
   * source/compiler/genc.c
   * source/compiler/harbour.c
   * source/compiler/harbour.y
   * source/compiler/hbfix.c
   * source/compiler/hbgenerr.c
   * source/compiler/hbpcode.c
   * source/macro/macro.y
   * source/macro/macroa.c
   * source/macro/macrob.c
   * source/vm/hvm.c
      +added missing support for @&macro and @M->memvar
      +added new pcode HB_MACROPUSHREF (all sources have to be
       recompiled)

   * source/debug/dbgtwin.prg
   * source/debug/debugger.prg
      *fixed procedures callstack when modules with/without debug info
      are linked together
      *fixed the debugger activation when ALTD() is used in
      a module with no debug info (the debugger shows up
      on the first line with debug info after the ALTD()
      is called)

   NOTICE:
      Some compilers may require that the debug library has to
      be specified as an object file in order to get the
      debugger linked in.
2004-03-09 13:51:50 +00:00
Alexander S.Kresin
19b7448ef1 2003-01-29 22:05 UTC+0300 Alexander Kresin <alex@belacy.belgorod.su> 2003-01-29 19:05:30 +00:00
Tomaz Zupan
4f0fbc05d4 2002-02-17 20:20 UTC+0100 Tomaz Zupan <tomaz.zupan@orpo.si> 2002-02-17 19:22:02 +00:00
Antonio Linares
fa0ea9268b See changelog for description 2002-01-30 10:46:51 +00:00
Dave Pearson
0893716db6 2002-01-24 17:53 UTC+0000 Dave Pearson <davep@davep.org>
* include/hbpcode.h
     * Fixed some spelling errors in the pcode comments.
2002-01-24 17:55:29 +00:00
Ron Pinkas
054dc4ed08 2001-08-07 01:10 UTC-0800 Ron Pinkas <ron@profit-master.com>
+ doc/en/clipper.txt
     + New file describing Harbour features that are different from Clipper.

   * include/hbpcode.h
     * Corrected typo in comment /* Thanks to Dave for info. */
2001-08-07 08:11:51 +00:00
Ron Pinkas
f089898c00 2001-08-02 10:00 UTC-0800 Ron Pinkas <ron@profit-master.com>
* contrib/dot/pp.txt
     * Corrected typos.

   * include/hbpcode.h
     * Corrected comments for HB_P_MACROLIST and HB_P_MACROLISTEND
2001-08-02 16:56:42 +00:00
Ron Pinkas
fc7c28a6b3 2001-07-23 04:15 UTC-0800 Ron Pinkas <ron@profit-master.com>
* include/hbexprop.h
     + Added #define  HB_ET_MACRO_PARE    64

   * source/vm/hvm.c
   * source/vm/macro.c
   * source/macro/macro.y
   * include/hbexprb.c
     + Added support for HB_P_MACROPUSHPARE aand HB_P_MACROPUSHINDEX

   * include/hbmacro.h
     + Added #define HB_MACRO_GEN_PARE     16  /* generate parentesized list */

   * source/common/expropt1.c
   * source/common/expropt2.c

   * include/hbpcode.h
   * source/compiler/genc.c
   * source/compiler/hbfix.c
   * source/compiler/hbpcode.c
     + Added new opcode HB_P_MACROPUSHPARE

   /* This should complete macro list support for ( &cMacro ) and aArray[ &cMacro ] syntaxes. */
2001-07-23 11:13:06 +00:00
Ron Pinkas
e2e1eeb028 2001-07-22 14:30 UTC-0800 Ron Pinkas <ron@profit-master.com>
* include/hbapi.h
     * Changed 2nd parameter to BYTE iContext in hb_macroGetValue( HB_ITEM_PTR pItem, BYTE iContext )

   * include/hbexprop.h
     + Added #define  HB_ET_MACRO_LIST    16   /* &variable used as in literal arrays or parentesised expressions. */
     + Added #define  HB_ET_MACRO_INDEX   32   /* &variable used as arrays index. */

   * include/hbexprb.c
     + Added macro list support logic to hb_compExprUseArray()
     + Added generation of HB_P_MACROLIST,  HB_P_MACROPUSHLIST, HB_P_MACROLISTEND, and HB_P_MACROPUSHINDEX in hb_compExprUseMacro()

       /* HB_P_MACROLIST and HB_P_MACROLISTEND are only generated as an enevelope if array contains a one or more macro element
          which will generate an HB_P_MACROPUSHLIST. */

   * include/hbpcode.h
   * source/compiler/genc.c
   * source/compiler/hbfix.c
   * source/compiler/hbpcode.c
     + Added: new opcodes HB_P_MACROLIST, HB_P_MACROPUSHLIST, HB_P_MACROLISTEND, and HB_P_MACROPUSHINDEX.

   * source/vm/hvm.c
   * source/vm/macro.c
     + Added: support for new opcodes HB_P_MACROLIST, HB_P_MACROPUSHLIST, HB_P_MACROLISTEND, and HB_P_MACROPUSHINDEX.

       /* HB_P_MACROPUSHINDEX not completed yet.*/

   /* NOTE: This implements macro as literal array arguments list syntax <{ &cMacro }>.
           ( &Cmacro ) and Array[ &cMacro ] are not completed yet.

      *** All prgs must be recompiled due to new opcodes !!!
   */
2001-07-23 06:31:41 +00:00
Ron Pinkas
3928d386a1 2001-07-18 16:10 UTC-0800 Ron Pinkas <ron@profit-master.com>
* source/vm/macro.c
   * source/vm/hvm.c
     % Simplified logic for suppoting macro lists. Removed global variables:
          int hb_vm_iFunCalls = 0, *hb_vm_aiMacroListParameters = NULL, hb_vm_iMacroListAllocated
       which are no longer needed. No longer using any logic in any PCODE case, other than HB_P_PUSHMACROARG.
       No longer using any arrays, or memory allocations.

   * include/hbexpra.c
   * include/hbexprb.c
     * HB_P_PUSHMACROARG will now be followed with a push symbol sequence, indicating its parrent function call.

   * include/hbpcode.h
     * Added decimal values into the description comments for readability.
2001-07-18 23:11:05 +00:00
Ron Pinkas
8abc351c51 2001-07-17 18:25 UTC-0800 Ron Pinkas <ron@profit-master.com>
* utils/hbpp/hbpp.c
     * Commented an exit() call in hb_compGenError() to continue processing after an error just like Harbour does.

   * include/hbapi.h
     + Added 2nd parameter BOOL bArg to hb_macroGetValue()

   * include/hbexpra.c
     + Added global BOOL hb_exp_bArgList = FALSE;

   * include/hbexprb.c
     + Added logic to generate HB_P_MACROPUSHARG rather than HB_MACROPUSH when pushed macro is a function call argument.

   * include/hbpcode.h
   * source/compiler/genc.c
   * source/compiler/hbfix.c
   * source/compiler/hbpcode.c
     + Added new HB_P_MACROPUSHARG

   * source/macro/macro.y
     + Added logic to generate an error if macro expression is list, unless servicing an HB_MACROPUSHARG.

   * source/vm/hvm.c
     + Added support for new HB_P_MACROPUSHARG calling hb_macroGetValue() with TRUE for bArg.

   * source/vm/macro.c
     + Added 2nd parameter BOOL bArg to hb_macroGetValue() to signify servicing of HB_P_MACROPUSHARG.

   * contrib/dot/pp.prg
     + Added bSplit 4th paramater to PP_PreProLine() defaulting to .T.. - Calls from PP_PreProFile() set it to .F..
2001-07-18 01:29:53 +00:00
David G. Holm
0e07837322 See ChangeLog entry 2001-04-12 15:00 UTC-0400 David G. Holm <dholm@jsd-llc.com> 2001-04-12 18:56:30 +00:00
Antonio Linares
e6b4263eef HB_P_STATICNAME opcode added 2001-02-05 09:22:02 +00:00
Viktor Szakats
4f4de292f3 20000502-10:41 GMT+1 Victor Szakats <info@szelvesz.hu> 2000-05-02 08:41:18 +00:00
Viktor Szakats
d2baf5dbfc 20000501-18:48 GMT+1 Victor Szakats <info@szelvesz.hu> 2000-05-01 16:49:56 +00:00
Viktor Szakats
778c316fa5 20000501-16:08 GMT+1 Victor Szakats <info@szelvesz.hu> 2000-05-01 14:05:47 +00:00
Viktor Szakats
94ffc45414 20000425-03:38 GMT+1 Victor Szakats <info@szelvesz.hu> 2000-04-25 01:38:22 +00:00
Ryszard Glab
2fb49392b4 ChangeLog 20000424-19:15 GMT+1 2000-04-24 17:09:30 +00:00
Viktor Szakats
2d7f222ed0 20000422-21:36 GMT+1 Victor Szakats <info@szelvesz.hu> 2000-04-22 19:33:37 +00:00
Viktor Szakats
12fcab20d5 20000422-18:41 GMT+1 Victor Szakats <info@szelvesz.hu> 2000-04-22 16:38:48 +00:00
Ron Pinkas
220b114c3e 20000421-14:20 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* source/compiler/hvm.c
     + Added support for new PCodes HB_P_PUSHBYTE, and HB_P_PUSHONE
     + Added void hb_vmPushOne( void ), void hb_vmPushZero( void ) and void hb_vmPushByte( BYTE )
     * Optimized HB_P_ZERO by using hb_vmPushZero()

   * source/compiler/harbour.c
     - REMMED not used hb_compGenPushInteger()
     * Optimized hb_compGenPushLong() to USE HB_P_ZERO, HB_P_ONE, HB_P_PUSHBBYTE, HB_P_PUSHBINT, or , HB_P_PUSHLONG as needed.
     * Optimized few pairs of hb_compGenPCode1() to use hb_compGenPCode2() instead.

   * source/compiler/genc.c
     + Added support for PCodes HB_P_PUSHBYTE, and HB_P_PUSHONE

   * source/compiler/hbpcode.c
     + Added hb_compGenPCode2( BYTE, BYTE )

   * source/compiler/harbour.y
     * Optimized few pairs of hb_compGenPCode1() to use hb_compGenPCode2() instead.

   * source/include/hbpcode.h
     + Added PCodes HB_P_PUSHBYTE, and HB_P_PUSHONE

   * source/include/hbvm.h
     + Added:
        extern void    hb_vmPushOne( void ); /* pushes a 0 onto the stack */
        extern void    hb_vmPushZero( void ); /* pushes a 1 onto the stack */
        extern void    hb_vmPushByte( BYTE bNumber ); /* pushes a integer number onto the stack */

   * include/hbcomp.h
     - Removed #ifef of GenObj32
2000-04-21 21:51:21 +00:00
Ron Pinkas
68f8243cbe 20000419-05:30 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* source/compiler/hvm.c
     + Added PCodes HB_P_JAMPSHORT, HB_P_JAMPSHORTFALSE and HB_P_JAMPSHORTTRUE

   * source/compiler/harbour.c
     + Added hb_compOptimizeJumps() - Jumps Optimizer.
     + Added hb_compSort_ULONG() Call back function for qsort - used in the Jump Optimizer.
     + Added support for new elements of _FUNC.
     * Modified hb_compGen*Jump*() to support Short Normal and Far Jumps.

   * source/include/hbexprb.c
     * Reverted handling of .OR. .AND. and IIF() to use default (FAR) JUMPs - note the use of (0) when calling hb_compGenJump*().

   * source/compiler/genc.c
     + Added support for HB_P_JAMPSHORT, HB_P_JAMPSHORTFALSE and HB_P_JAMPSHORTTRUE

   * source/compiler/cmdcheck.c
     + Added support for new switch -J[0|1] default is J1 which enables the Jump Optimizer - Use -J0 to disable.

   * source/compiler/hbgenerr.c
     - Removed following errors:
        "Jump offset too long for HB_P_JUMP needed HB_P_JUMPFAR",
        "Jump offset too long for HB_P_JUMPTRUE needed HB_P_JUMPFARTRUE",
        "Jump offset too long for HB_P_JUMPFALSE needed HB_P_JUMPFARFALSE",

     * Changed "HB_P_JUMPx not found when fixing offset" to "Jump PCode not found"

   * source/include/hberrors.h
     - Removed following defines:
   	#define HB_COMP_ERR_INVALID_JUMPTRUE            46
   	#define HB_COMP_ERR_INVALID_JUMPFALSE           47
   	#define HB_COMP_ERR_JUMP_NOT_FOUND              48

   * source/include/hberrors.h
     + Added following to __FUNC
   	ULONG  * pNOOPs;                 /* pointer to the NOOP array */
   	ULONG  * pJumps;                 /* pointer to the Jumps array */
   	int    iNOOPs;                   /* NOOPs Counter */
   	int    iJumps;                   /* Jumps Counter */

   * source/include/hbpcode.h
     + Added HB_P_JAMPSHORT, HB_P_JAMPSHORTFALSE and HB_P_JAMPSHORTTRUE
2000-04-18 12:41:08 +00:00
Ron Pinkas
be8587e794 20000413-01:30 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* source/include/hbpcode.h
     + Added HB_P_JUMPFAR, HB_P_JUMPFARFALSE, and HB_P_JUMPFARTRUE

   * source/compiler/hvm.c
     + Added support for HB_P_JUMPFAR, HB_P_JUMPFARFALSE, and HB_P_JUMPFARTRUE to support longer than 2^15 jumps.

   * source/compiler/harbour.c
     * Enhanced hb_compGenJump(), hb_compGenJumpFalse(), hb_compGenJumpTrue(), hb_compGenJumpHere() and hb_compGenJumpThere()
       to utilize HB_P_JUMPFAR, HB_P_JUMPFARFALSE, and HB_P_JUMPFARTRUE to support longer than 2^15 jumps.

   * source/compiler/genc.c
     + Added support for HB_P_JUMPFAR, HB_P_JUMPFARFALSE, and HB_P_JUMPFARTRUE to support longer than 2^15 jumps.
2000-04-13 09:46:07 +00:00
Viktor Szakats
3e3819e705 20000302-11:21 GMT+1 Victor Szakats <info@szelvesz.hu> 2000-03-02 11:58:22 +00:00