Commit Graph

137 Commits

Author SHA1 Message Date
Przemyslaw Czerpak
7a7a4856c9 2008-12-30 12:02 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbcomp.h
  * harbour/include/hbcompdf.h
  * harbour/include/hbexprb.c
  * harbour/source/common/expropt2.c
  * harbour/source/compiler/hbmain.c
  * harbour/source/compiler/hbcomp.c
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyc
    ! fixed <cConst1> == <cConst2> => <lConst> optimizations if
      <cConst1> or <cConst2> contains valid &macro. Such expressions
      cannot be optimized if -kM compiler switch is not used, f.e.:
         M->V := "ABC"
         ? "[&V]" == "[ABC]"
    ! fixed <cConst1> $ <cConst2> => <lConst> optimizations if
      <cConst1> or <cConst2> contains valid &macro. Such expressions
      cannot be optimized if -kM compiler switch is not used, f.e.:
         M->V := "ABC"
         ? "[&V]" $ " [ABC] "
    % do not disable <cConst1> + <cConst2> => <cConst> and
      <cConst1> - <cConst2> => <cConst> optimization when <cConst1> or
      <cConst2> contains valid &macro but -kM compiler switch is used.

  * harbour/include/hbexprb.c
    * cover ! ! <exp> => <exp> optimization by -ko compile time switch

  * harbour/doc/cmpopt.txt
    * updated compiler optimization description
2008-12-30 10:59:43 +00:00
Przemyslaw Czerpak
1624a58420 2008-12-29 19:20 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbcomp.h
  * harbour/include/hbmacro.ch
  * harbour/source/compiler/ppcomp.c
  * harbour/source/compiler/hbusage.c
  * harbour/source/compiler/cmdcheck.c
    + added -ko (allow operator optimizations) compiler switch
      It's disabled by default.

  * harbour/include/hbexprb.c
    * removed HB_ADD_SUB_ONE_OPT macro and enable optimizations covered
      by it when -ko switch is used.

  * harbour/source/common/expropt2.c
    * disabled <exp> + 0 => <exp>, <exp> + "" => <exp>, - - <exp> => <exp>
      optimizations for default compiler settings. They can be enabled by
      -ko compiler switch
    + added optimizations for numeric values and + operator which uses
      standard mathematical + behavior for real numbers:
         a + b + c == a + ( b + c )
         a + b == b + a
      It's disabled by default and can be enabled by -ko compiler switch.
      There are also other similar optimizations which can be added in
      this way.

  * harbour/include/hbapi.h
  * harbour/source/vm/itemapi.c
  * harbour/source/vm/fm.c
    ! fixed redundant call to hb_xrealloc() in string resize operation.
      Thanks to Mindaugas for locating it.
2008-12-29 18:17:45 +00:00
Przemyslaw Czerpak
fa31aa6f70 2008-12-11 19:48 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbthread.h
  * harbour/source/vm/thread.c
    + added hb_atomic_set(), hb_atomic_get(), hb_atomic_inc() and
      hb_atomic_dec() functions which operates on HB_COUNTER or smaller
      type if it's necessary for some platforms which can be access/assign
      increment/decrement in MT safe atom operations.
      hb_atomic_dec() returns true if counter is 0 after decrementation

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

         proc main()
            local pI18N, i

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

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

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


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

  * harbour/include/hbextern.ch
    - removed old __i18n_*() functions
    + added current i18n functions
2008-12-11 18:47:46 +00:00
Przemyslaw Czerpak
b46a548172 2008-12-08 16:30 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/bin/hb-mkslib.sh
    ! fixed last modification

  * harbour/doc/Makefile
  + harbour/doc/cmpopt.txt
    + added small description for Harbour compile time optimization

  * harbour/include/hbexpra.c
    + allow to use hb_mutexCreate() as static variable initializer, f.e.:
         static s_mtxarr := { "MTX1" => hb_mutexCreate(), ;
                              "MTX2" => hb_mutexCreate(), ;
                              "MTX3" => hb_mutexCreate() }
  * harbour/include/hbexprb.c
    % comment

  * harbour/source/common/expropt2.c
    + added some missing optimizations for date constants
    + added optimization for multiple negate expressions
2008-12-08 15:28:49 +00:00
Przemyslaw Czerpak
16f9a67e9f 2008-12-02 11:27 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/contrib/xhb/Makefile
  * harbour/contrib/xhb/common.mak
  + harbour/contrib/xhb/xhbarr.c
    + added aSplice(), aRemove() and aMerge() functions - code borrowed
      from xHarbour by Ron Pinkas.
    ! fixed GPF trap in these functions

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

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

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

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

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

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

  * harbour/contrib/gtwvg/Makefile
    ! fixed typo

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

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

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

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

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

      Before I'll begin to work on runtime support please test these
      modifications and inform me about problems you can see with the
      above version and missing functionality.
2008-12-02 10:26:51 +00:00
Przemyslaw Czerpak
962bc260b9 2008-11-02 13:36 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbexprb.c
    ! fixed possible GPF/internal memory corruption in code like:
         ? HB_I18N_GETTEXT_NOOP( "Ala ma kota" + " !!!" )
      Mindaugas, the fix is also the answer for the question you left
      in TODO.
2008-11-02 12:35:30 +00:00
Przemyslaw Czerpak
a398da282e 2008-10-29 17:06 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbcompdf.h
  * harbour/include/hbexprb.c
  * harbour/source/common/expropt1.c
  * harbour/source/common/expropt2.c
    ! change the expressions precedence - references to variables were
      wrongly marked as simple expressions

  * harbour/include/hbexpra.c
    ! fixed protection against wrong static initializers. Now code like:
         static s_var := { { func(), M->var } }
      or:
         static s_var := { "A" => { func() => M->var } }
      or:
         static s_var := { @M->var }
      or:
         static s_var := QSelf()
      is not accepted by compiler and error is generated at compile
      time instead of crashing at HVM startup when static variables
      are initialized
2008-10-29 16:06:31 +00:00
Viktor Szakats
c4636942ec 2008-10-27 21:43 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* contrib/Makefile
  * contrib/make_vc_all.bat
  * contrib/make_b32_all.bat
  * contrib/make_gcc_all.sh
    + Added rddsql to default builds.
      Please test.

  * contrib/hbdbgfx/dbgfxc.c
    * Added TODO. (multiplatform support in one the functions)

  * include/hbsetup.h
  * include/hbexprb.c
  * contrib/hbct/ctnet.c
  * contrib/hbct/color.c
  * contrib/hbct/dattime2.c
  * contrib/xhb/hboutdbg.c
  * contrib/hbtpathy/tpwin32.c
  * contrib/hbmzip/hbmzip.c
  * contrib/hbsqlit3/hbsqlit3.c
  * contrib/hbfbird/firebird.c
  * contrib/hbziparc/hbzipcpp.old
  * contrib/hbnf/getver.c
  * contrib/hbpgsql/postgres.c
  * contrib/hbclipsm/gauge.c
  * contrib/rddads/adsfunc.c
  * contrib/rddads/ads1.c
  * contrib/hbgd/gdwrp.c
  * contrib/hbmisc/spd.c
  * contrib/hbtip/utils.c
  * contrib/hbwin/win_prt.c
  * contrib/examples/pp/hbppcore.c
  * contrib/examples/pp/hbppcomp.c
  * source/pp/pplib.c
  * source/pp/ppcore.c
  * source/pp/hbpp.c
  * source/vm/estack.c
  * source/vm/debug.c
  * source/vm/itemapi.c
  * source/vm/hvm.c
  * source/vm/cmdarg.c
  * source/vm/fm.c
  * source/vm/extrap.c
  * source/vm/classes.c
  * source/main/harbour.c
  * source/common/hbver.c
  * source/common/hbverdsp.c
  * source/common/hbstr.c
  * source/common/hbdate.c
  * source/rtl/gtxwc/gtxwc.c
  * source/rtl/hbgtcore.c
  * source/rtl/gtcrs/gtcrs.c
  * source/rtl/errorint.c
  * source/rtl/gtsln/gtsln.c
  * source/rtl/gttrm/gttrm.c
  * source/rtl/gtpca/gtpca.c
  * source/rtl/fkmax.c
  * source/rtl/langapi.c
  * source/rtl/hbffind.c
  * source/rdd/workarea.c
  * source/rdd/sdf1.c
  * source/rdd/delim1.c
  * source/rdd/dbf1.c
  * source/rdd/wafunc.c
  * source/compiler/hbmain.c
  * source/compiler/cmdcheck.c
  * source/compiler/hbpcode.c
  * source/compiler/genhrb.c
  * source/compiler/gencobj.c
  * source/compiler/genobj32.c
  * source/compiler/genc.c
  * source/compiler/hbusage.c
  * source/compiler/hbfunchk.c
  * source/compiler/hbgenerr.c
  * utils/hbmake/hbmgauge.c
    * Changed snprintf() calls to hb_snprintf().
    ; TODO: Finish the mappings in headers.

  * tests/wvtext.prg
  * include/inkey.ch
  * source/rtl/gtwvt/gtwvt.c
    * Changed K_HB_RESIZE to HB_K_RESIZE. The reason is 
      that we already got a HB_K_MULTICODE code (few lines 
      below, I didn't know about it before), and it's better 
      to keep consistency with that.
2008-10-27 20:55:24 +00:00
Viktor Szakats
005bc1d9f7 2008-10-13 22:27 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* tests/transtst.prg
  * doc/en/string.txt
  * doc/en/compiler.txt
  * doc/en/macro.txt
  * doc/en/browse.txt
  * doc/en/binnum.txt
  * doc/es/macro.txt
  * doc/es/browse.txt
  * doc/es/binnum.txt
  * doc/transfrm.txt
  * doc/whatsnew.txt
  * include/hbclass.ch
  * include/hbmacro.ch
  * include/hbexprb.c
  * ChangeLog
  * contrib/hbvpdf/hbvpdft.prg
  * contrib/hbwhat/import.ch
  * source/vm/macro.c
  * source/rtl/tobject.prg
  * source/rtl/tthreadx.prg
  * source/rtl/transfrm.c
  * source/rtl/tget.prg
  * source/rtl/isprint.c
  * source/rtl/tbrowse.prg
  * source/rdd/wacore.c
  * source/rdd/dbdetach.c
  * utils/hbtest/rt_trans.prg
    * Xbase++ name references cleaned.

  * common.mak
  * source/rdd/Makefile
  * source/rdd/dbdetach.c
  + source/rdd/dbdetacx.c
    * Moved XBase++ compatibility functions to separate file.
2008-10-13 20:33:26 +00:00
Przemyslaw Czerpak
67cc2f7ebe 2008-10-06 15:30 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbthread.h
  * harbour/source/vm/thread.c
  * harbour/source/vm/hvm.c
    + add numeric HVM thread identifiers to thread structure. Now
      HB_THREADID() returns numbers in all OSes

  * harbour/include/hbexprop.h
  * harbour/include/hbexprb.c
  * harbour/source/common/expropt2.c
    + added compile time optimization for MIN() and MAX() functions

  * harbour/source/rtl/minmax.c
    * removed trailing spaces from source code
2008-10-06 13:30:47 +00:00
Przemyslaw Czerpak
86333ba271 2008-09-18 07:21 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbthread.h
    * use assembler version of atomic inc/dec operation in all x86 based
      GCC builds - it should noticeable improve OS2 MT build speed,
      please test.

  * harbour/include/hbcomp.h
  * harbour/include/hbapicdp.h
  * harbour/include/hbcompdf.h
  * harbour/include/hbgtcore.h
  * harbour/include/hbapifs.h
  * harbour/include/hbwince.h
  * harbour/include/hbexpra.c
  * harbour/include/hbexprop.h
  * harbour/include/hbmacro.h
  * harbour/include/hbapigt.h
  * harbour/include/hbapi.h
  * harbour/include/hbapiitm.h
  * harbour/include/hbexprb.c
  * harbour/source/pp/ppcore.c
  * harbour/source/pp/hbpp.c
  * harbour/source/vm/macro.c
  * harbour/source/vm/cmdarg.c
  * harbour/source/vm/arrays.c
  * harbour/source/vm/extrap.c
  * harbour/source/vm/memvars.c
  * harbour/source/vm/eval.c
  * harbour/source/vm/extend.c
  * harbour/source/vm/set.c
  * harbour/source/main/harbour.c
  * harbour/source/common/hbfsapi.c
  * harbour/source/common/reserved.c
  * harbour/source/common/expropt1.c
  * harbour/source/macro/macro.yyc
  * harbour/source/macro/macro.y
  * harbour/source/macro/macro.yyh
  * harbour/source/macro/macrolex.c
  * harbour/source/rtl/gtdos/gtdos.c
  * harbour/source/rtl/gtwin/gtwin.c
  * harbour/source/rtl/gtxwc/gtxwc.c
  * harbour/source/rtl/gtos2/gtos2.c
  * harbour/source/rtl/hbgtcore.c
  * harbour/source/rtl/cdpapi.c
  * harbour/source/rtl/gtcrs/gtcrs.c
  * harbour/source/rtl/hbtoken.c
  * harbour/source/rtl/gtchrmap.c
  * harbour/source/rtl/gtstd/gtstd.c
  * harbour/source/rtl/gtsln/mousesln.c
  * harbour/source/rtl/gtsln/gtsln.c
  * harbour/source/rtl/gtsln/kbsln.c
  * harbour/source/rtl/gttrm/gttrm.c
  * harbour/source/rtl/gtpca/gtpca.c
  * harbour/source/rtl/hbhex.c
  * harbour/source/rtl/gtgui/gtgui.c
  * harbour/source/rtl/gt_tpl/gt_tpl.c
  * harbour/source/rtl/gtcgi/gtcgi.c
  * harbour/source/rtl/gtwvt/gtwvt.c
  * harbour/source/rtl/strtran.c
  * harbour/source/rtl/hbinet.c
  * harbour/source/rtl/gtapi.c
  * harbour/source/rtl/filesys.c
  * harbour/source/rdd/dbfntx/dbfntx1.c
  * harbour/source/rdd/dbsql.c
  * harbour/source/rdd/dbfcdx/dbfcdx1.c
  * harbour/source/rdd/dbffpt/dbffpt1.c
  * harbour/source/rdd/hbsix/sxfname.c
  * harbour/source/compiler/ppcomp.c
  * harbour/source/compiler/hbmain.c
  * harbour/source/compiler/cmdcheck.c
  * harbour/source/compiler/hbdbginf.c
  * harbour/source/compiler/genc.c
  * harbour/source/compiler/hbident.c
  * harbour/source/compiler/hbusage.c
  * harbour/source/compiler/gencc.c
  * harbour/source/compiler/harbour.yyc
  * harbour/source/compiler/harbour.y
  * harbour/contrib/gtalleg/gtalleg.c
  * harbour/contrib/hbct/charlist.c
  * harbour/contrib/hbct/charmix.c
  * harbour/contrib/hbct/screen1.c
  * harbour/contrib/hbct/atrepl.c
  * harbour/contrib/xhb/hboutdbg.c
  * harbour/contrib/xhb/hbxml.c
  * harbour/contrib/xhb/hbxml.h
  * harbour/contrib/hbgt/strexpan.c
  * harbour/contrib/hbsqlit3/sqlite3/sqlite3.c
  * harbour/contrib/gtwvg/gtwvg.c
  * harbour/contrib/hbclipsm/status.c
  * harbour/contrib/hbclipsm/gauge.c
  * harbour/contrib/hbmisc/stringsx.c
  * harbour/contrib/hbtip/utils.c
  * harbour/contrib/hbgf/hbgfgtk/msginfo.c
  * harbour/contrib/hbgf/hbgfgtk/harbgtk.h
  * harbour/contrib/hbbmcdx/bmdbfcdx.c
  * harbour/utils/hbmake/hbmgauge.c
    * use const char * instead of char * in places which should be marked
      as const
2008-09-18 05:23:49 +00:00
Przemyslaw Czerpak
29b52145d1 2008-08-01 03:06 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbpp.h
  * harbour/include/hbexprb.c
  * harbour/source/pp/ppcore.c
  * harbour/source/vm/evalhb.c
  * harbour/source/vm/runner.c
  * harbour/source/vm/hvm.c
  * harbour/source/vm/fm.c
  * harbour/source/vm/eval.c
  * harbour/source/vm/dynlibhb.c
  * harbour/source/vm/classes.c
  * harbour/source/rdd/hbsix/sxord.c
  * harbour/source/compiler/hbmain.c
  * harbour/source/compiler/harbour.y
    * pacified warnings
2008-08-01 01:06:47 +00:00
Przemyslaw Czerpak
3d4a97040b 2008-07-17 18:19 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/contrib/hbw32/dllcall.c
    * minor cleanup in return values

  * harbour/contrib/hbole/ole2.c
    * cleaned casting in UNICODE conversions

  * harbour/source/common/expropt2.c
    * replicate CA-Cl*pper compile time optimization bugs:
         "" $ <literString>         => .T.
         AT( "", <literString> )    => 1
         CHR( 256 )                 => ""
      only when Harbour extensions (-kh) are not enabled, f.e.
      in strict Clipper compatibility mode (-kc)

  * harbour/utils/hbtest/rt_hvma.prg
  * harbour/utils/hbtest/rt_str.prg
    * updated to test Clipper and Harbour compile time modes in
      the above situations

  * harbour/common.mak
  * harbour/source/rtl/Makefile
  - harbour/source/rtl/strings.c
  * harbour/source/common/hbstr.c
    * moved hb_strEmpty() from RTL to COMMON library

  * harbour/include/hbexprb.c
  * harbour/include/hbexprop.h
  * harbour/source/common/expropt2.c
    + added compile time optimization for EMPTY() function
    ; removed 'TODO: empty optimization' note

  * harbour/source/rtl/itemseri.c
    % compress trailing spaces during string item serialization

  * harbour/include/hbapi.h
  * harbour/source/vm/hashes.c
    + added hb_hashAddNew() - works like hb_hashAdd() but it adds item
      only if new key is used

  * harbour/source/vm/hvm.c
    * use hb_hashAddNew() instead of hb_hashAdd() for HB_P_HASHGEN
      I cannot revert the order of hash item during compilation because
      it will also change the order of user expression evaluation.
2008-07-17 16:28:11 +00:00
Przemyslaw Czerpak
8d0a5f3542 2008-06-11 04:10 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbexprop.h
  * harbour/include/hbexprb.c
  * harbour/source/common/expropt2.c
    * added optimization for DTOS( <date_constant> ), f.e.:
      static s := DTOS( 0d20080611 )
2008-06-11 02:10:29 +00:00
Przemyslaw Czerpak
3b543d3039 2008-06-11 01:17 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/common/hbwince.c
    ! fixed typo in GetDriveTypeA()
    * temporary disabled GetDriveTypeW() call because not all CRTLs for
      WinCE support it

  * harbour/include/hbexpra.c
  * harbour/include/hbexprb.c
  * harbour/source/common/expropt2.c
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyc
    * added full expression list stripping - it enables optimizations
      in few additional places
    ! fixed code to always refresh expression address after direct or
      indirect reduction - seems that we have some memory leaks and
      possible GPFs not located so far
   Please make tests with your code.
2008-06-10 23:17:39 +00:00
Przemyslaw Czerpak
e97fbe0fb0 2008-06-02 19:55 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbexprop.h
  * harbour/include/hbexprb.c
  * harbour/source/common/expropt2.c
    + added compile time INT( <num> ) optimization

  * harbour/source/compiler/hbusage.c
    * updated -k? description to show "(default)" for really set flags
2008-06-02 17:55:48 +00:00
Przemyslaw Czerpak
ff04244669 2008-06-02 16:46 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbexprb.c
    ! do not optimize HB_BIAND(), HB_BITOR() and HB_BITXOR() when only
      one parameter is passed to keep RT error compatibility
    * use hb_compExprListStrip() to optimize function calls also when
      parameters are passed in parenthesis, f.e.:
         ? CHR(65), CHR((65))
      It's not Clipper compatible and disabled by -kc switch.
      Viktor it will interact with some hbtest tests when compile time
      optimization used by Clipper gives different results then RT function
      f.e. CHR( ( 256 ) ). Please think if we should keep it.
      It's important optimization if someone uses constant values or
      expressions defined in parentheses.
2008-06-02 14:46:20 +00:00
Przemyslaw Czerpak
ed3ab32b06 2008-06-02 15:40 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/contrib/hbsqlit3/hbsqlit3.c
    ! use char * instead of LPSTR to compile in non Windows environment
    ! fixed one printf() parames
    ! fixed casting and parameter type in sqlite3_blob_open()

  * harbour/include/hbexprop.h
  * harbour/include/hbexprb.c
  * harbour/source/common/expropt1.c
  * harbour/source/common/expropt2.c
    - removed unused hb_compExprAsLong()
    + added hb_compExprAsLongNum(), hb_compExprReduceBitFunc()
    + added compiletime optimizatiob for HB_BIT*() functions:
      HB_BITAND(), HB_BITOR(), HB_BITXOR(), HB_BITSET(), HB_BITRESET()
      HB_BITSHIFT(), HB_BITNOT(), HB_BITTEST()
2008-06-02 13:41:00 +00:00
Przemyslaw Czerpak
cea797cf4d 2008-06-02 13:32 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbexprop.h
  * harbour/include/hbexprb.c
  * harbour/source/common/expropt2.c
    + added hb_compExprReducePower() and compile time optimization for:
         <NumConst1> ^ <NumConst2>
    + added compile time optimization for:
         <NumConst1> % <NumConst2>
      when <NumConst1> or <NumConst2> is not integer value
    NOTE: both optimizations are not Clipper compatible and disabled
          when -kc compiler switch is used
2008-06-02 11:33:06 +00:00
Przemyslaw Czerpak
f181406951 2008-04-16 14:41 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbclass.ch
    ! removed:
         MESSAGE <msgName> IS <mthName>
      used as synonym of:
         MESSAGE <msgName> METHOD <mthName>
      If someone was using the removed version then please update the
      code to MESSAGE ... METHOD ...
      The removed command has special meaning in Class(y) and it allow
      to define alternate names for existing messages. I'll add support
      for them in the future.

  * harbour/contrib/hbct/ctwin.c
    * added disabled code which is a workaround for some possible
      bad side effect caused by online shadow showing by CTWIN.

  * harbour/source/rtl/errorint.c
    ! fixed displaying internal error message

  * harbour/source/common/hbver.c
    * added "Rev." prefix to shown revision number

  * harbour/include/hbexprop.h
  * harbour/include/hbexprb.c
  * harbour/source/common/expropt1.c
  * harbour/source/common/expropt2.c
    + added hb_compExprReduceNegate()
    ! fixed wrong negate optimizations for platforms where HB_LONG_MAX
      is smaller then -HB_LONG_MIN, f.e. all x86 based CPUs.
    ! fixed setting the size in optimized negative numbers
    ! fixed some math optimizations to not use casting to double value
      when it's not necessary - when double precision is smaller then HB_LONG
      (f.e. on x86 it's 53 bits and HB_LONG has 64bit) such casting can damage
      up to 11 less significant bits in big 64 bit numbers.

  * harbour/source/rtl/hbinet.c
    * replaced MAKEWORD() macro with HB_MKWORD() to pacify BCC58 warnings

  * harbour/include/hbdefs.h
    + added #include <limits.h>
      It should hide some warnings related to redefined integer size constants
      Viktor if it will not help for BCC58 warnings then you will have to add
         #include <stdint.h>
      few lines below but please remember that older BCC version does not
      have it so check for the exact compiler version.
    ! changed macros which setting default numeric item size for more strict
      Clipper compatible mode. I'm not a fun of some Clipper behavior in
      calculating number size and I left some notes about it in hbdefs.h
      Anyhow this and some other modifications below should cover the
      differences you've found recently. Some things are not addressed by
      me intentionally, f.e. _itemPutNL() in Clipper always set size to 10
      without checking the maximum size so it's too small for values less
      then -999999999. Harbour compiler makes more compile time optimizations
      then Clipper. The formatting rules used by compiler are a little bit
      different then by VM so this can be source of some other differences
      to Clipper. I can easy create some examples. Harbour supports 64bit
      signed integers and Clipper doesn't. This is yet another situation
      when we may have different results then Clipper. Most of them can
      be hidden if we add new PCODE(s) for integer number with explicit
      size but I do not think it's such important to increase PCODE list.
      In few cases it will be necessary to disable some optimizations at
      all and I do not like it. In the future when I will be adding some
      new optimizations I also add compiler switch to disable/enable
      optimizations which can have such side effects for people who need
      strict formatting.

  * harbour/include/hbvmpub.h
  * harbour/source/common/hbstr.c
  * harbour/source/vm/hvm.c
  * harbour/source/vm/itemapi.c
  * harbour/source/rtl/round.c
    * updated for more Clipper compatible number formating using new macros
2008-04-16 12:42:05 +00:00
Przemyslaw Czerpak
25231721f9 2008-02-08 15:58 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbcomp.h
  * harbour/include/hbmacro.h
  * harbour/include/hbexprb.c
  * harbour/source/vm/macro.c
  * harbour/source/compiler/hbmain.c
    ! fixed name conflict in privates/publics declaration.
      Harbour allows to declare memvars with the same name as file
      wide statics or fields but this extensions was not working well
      in some cases and can cause unexpected results in variable
      declaration, f.e. try this code:
               static v:="static"
               proc main()
                  public v:="public"
                  ? v, M->v
               return
      compiled with -n -w switches and also with -n -w -a before
      this fix.
    ! fixed some compile time warnings in memvars declaration to be
      more Clipper compatible
    ! fixed compiling external modules (DO <procname> [WITH <params,...>])
      when function <procname> is already declared but with different
      letter case. Harbour does not convert <procname> in DO statement
      to upper case to play well with case sensitive file systems and
      it could cause confusing warning message:
         Cannot open <procname>.prg, assumed external

  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyc
    ! added protection against bug in bison destructors which might cause
      multiple free the same memory block on syntax error due to 

  * harbour/source/rdd/dbf1.c
    ! added missing binary flag for daytime fields

  * harbour/source/rdd/dbfntx/dbfntx1.c
    ! fixed possible memory leak during accessing corrupted NTX files
    ! fixed possible GPF during accessing corrupted NTX files

  * harbour/source/compiler/genc.c
    * minor cleanup

  * harbour/config/os2/global.cf
    ! use FOR command to delete group of files
2008-02-08 14:58:26 +00:00
Przemyslaw Czerpak
419e6e8e04 2008-02-04 09:31 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/harbour.spec
  * harbour/harbour-ce-spec
  * harbour/harbour-w32-spec
    * updated for new library names

  * harbour/ChangeLog
  * harbour/include/hbexprb.c
    * formatting

  * harbour/source/rtl/net.c
    ! fixed casting

  * harbour/harbour.spec
  * harbour/harbour-ce-spec
  * harbour/harbour-w32-spec
  * harbour/contrib/Makefile
    * removed hbzlib - it cannot be longer part of default build
      because Viktor removed zlib header files. Viktor sorry but
      IMHO you should revert it and also restore ace.h - it creates
      serious problems without any valuable addition. Now we will
      have to rebuild Harbour on many different platforms and often
      it will not be possible to install some libraries. We cannot
      force installing additional libs by people who will create
      binaries for incoming releases so it's important to revert
      it. Please do it.

  * harbour/config/bsd/install.cf
  * harbour/config/darwin/install.cf
  * harbour/config/hpux/install.cf
  * harbour/config/linux/install.cf
  * harbour/config/sunos/install.cf
  * harbour/config/dos/install.cf
  * harbour/config/os2/install.cf
  * harbour/config/w32/install.cf
    * redirected echo error messages to stderr when *sh shell is used

  * harbour/config/lib.cf
  * harbour/config/bin.cf
  * harbour/config/global.cf
  * harbour/config/hpux/gcc.cf
  * harbour/config/hpux/global.cf
  * harbour/config/darwin/gcc.cf
  * harbour/config/darwin/global.cf
  * harbour/config/dos/owatcom.cf
  * harbour/config/dos/global.cf
  * harbour/config/dos/rsx32.cf
  * harbour/config/global.cf
  * harbour/config/linux/owatcom.cf
  * harbour/config/linux/global.cf
  * harbour/config/os2/gcc.cf
  * harbour/config/os2/global.cf
  * harbour/config/sunos/gcc.cf
  * harbour/config/sunos/global.cf
  * harbour/config/bsd/global.cf
  * harbour/config/w32/owatcom.cf
  * harbour/config/w32/bcc32.cf
  * harbour/config/w32/gcc.cf
  * harbour/config/w32/rsxnt.cf
  * harbour/config/w32/global.cf
    ! fixed build process. DOS and WINDOWS users should make tests for
      different compilers. I tested only DOS-OpenWatcom, DOS-DJGPP,
      W32-BCC32, W32-OpenWatcom, W32-POCC, W32-XCC and corss builds
      W32-MinGW, W32-MinGW-CE. OS2 version not testes at all - I hope
      it will work. LINUX-GCC, LINUX-G++, LINUX-OpenWatcom, BSD-GCC,
      HPUX-GCC tested and they are working. I hope that SunOS version
      also works though I do not have any solaris installation where
      I can make real tests.
2008-02-04 08:32:17 +00:00
Przemyslaw Czerpak
2c5bb1c719 2008-01-11 18:13 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbexprb.c
    * removed unused variable
2008-01-11 17:13:51 +00:00
Przemyslaw Czerpak
3611daa5a2 2008-01-11 18:01 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapiitm.h
  * harbour/source/vm/itemapi.c
    + added new functions:
         BOOL hb_itemParamStore( USHORT uiParam, PHB_ITEM pItem )
         BOOL hb_itemParamStoreForward( USHORT uiParam, PHB_ITEM pItem )
      They copy/move pItem body to parameter passed by reference and
      return TRUE when operation was done successfully (uiParam was passed
      by reference)
    + added new functions for string manipulation:
         char * hb_itemLockReadCPtr( PHB_ITEM pItem, ULONG * pulLen );
         char * hb_itemLockWriteCPtr( PHB_ITEM pItem, ULONG * pulLen );
         void   hb_itemUnLockCPtr( char * pszString );
      It's recommended to use them instead of hb_itemGetCPtr().
      Pointer to string buffer returned by hb_itemLockReadCPtr() will
      be always valid even if source item will be cleared, destroyed or
      overwritten until hb_itemUnLockCPtr() is called. Each locked string
      has to be unlocked to avoid memory leaks. After unlocking the string
      pointer cannot be longer used.
      hb_itemLockWriteCPtr() works like hb_itemLockReadCPtr() but string
      pointer returned by this function is writable so user can change
      the body of string item. It's the _ONLY_ one way when it's possible.
      Modifying string items using pointers returned by hb_parc() or
      hb_itemGetCPtr() or extracted directly from HB_ITEM body is _FORBIDDEN_
      and can cause unpredictable results (GPF when constant/readonly memory
      pages are changed, changing many different items which share the same
      memory buffer, etc.).
      This is code illustrates how to use hb_itemLockReadCPtr()/
      hb_itemUnLockCPtr() and it's also good example why hb_itemGetCPtr()
      is very danger function and cannot be used in such case - if you
      replace hb_itemLockReadCPtr() with hb_itemGetCPtr() and remove
      hb_itemUnLockCPtr() then you will have buggy code.

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

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

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

  * harbour/include/hbcompdf.h
  * harbour/include/hbexprop.h
  * harbour/include/hbexprb.c
  * harbour/source/compiler/hbmain.c
  * harbour/source/compiler/cmdcheck.c
  * harbour/source/compiler/hbusage.c
    * removed HB_I18N_SUPPORT macro and enabled I18N code in default build
2008-01-11 17:01:34 +00:00
Mindaugas Kavaliauskas
40d7f55063 2008-01-11 17:32 UTC+0200 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt)
* harbour/include/hbexprb.c
  * harbour/source/compiler/hbmain.c
    ! added string escaping before to i18n .pot files
    + added hb_i18n_gettext_strict() support for compiler. This function 
      generates warning if argument is not literal string. See discussion 
      on mailing list from 2007-11-23 to 2007-11-29, for details.
2008-01-11 15:30:31 +00:00
Przemyslaw Czerpak
021bc664d5 2007-11-23 21:14 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/doc/man/harbour.1
  * harbour/source/compiler/hbusage.c
    + added description for -j switch

  * harbour/include/hbexprb.c
    * replaced // comments by /* */
    * accept <cContext> (domain) parameters of HB_i18nGettext() when
      number of parameters is two or more
      Should we generate compile time warning when wrong number of
      parameters is passed to this function or they are not literal
      strings? Maybe only after -j+ or sth like that?

  * harbour/include/hbclass.ch
  * harbour/include/tbrowse.ch
  * harbour/include/hbpers.ch
  * harbour/include/getexit.ch
    * replaced // comments by /* */
2007-11-23 20:14:30 +00:00
Mindaugas Kavaliauskas
a3cbfe607f 2007-11-23 18:55 UTC+0200 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt)
* harbour/source/include/hbexprb.c
    * changed HB_i18nGettext() to hb_i18n_gettext(), to respect 
      original gettext lowercase function name convention
2007-11-23 16:53:11 +00:00
Mindaugas Kavaliauskas
ce44121edc 2007-11-23 03:55 UTC+0200 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt)
* harbour/source/include/hbcompdf.h
  * harbour/source/include/hbexprop.h
  * harbour/source/include/hbexprb.c
  * harbour/source/compiler/cmdcheck.c
  * harbour/source/compiler/hbmain.c
    + added i18n support
      Implemented -j[filename] switch to indicate output filename. Default 
      filename is <sourcefilename>.pot. If switch -o is used, this file
      is created in speficied output path.
      Output file format is compatible with 'gettext' utils, but not all
      available features are implemented.
      Harbour level function HB_i18nGettext( cText [, cContext ] ) sould be
      used to indicate translatable strings.
      All this commit is commented using #ifdef HB_I18N_SUPPORT and is in 
      development stage. Please, do not use it yet.
2007-11-23 01:55:37 +00:00
Przemyslaw Czerpak
07c9e15d8d 2007-11-06 12:58 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbwince.h
    * put functions declarations inside HB_EXTERN_BEGIN / HB_EXTERN_END

  + harbour/include/hbwmain.c
    + added WinMain() to main() wrapper

  * harbour/include/hbexprb.c
  * harbour/source/common/expropt1.c
    ! fixed typo reported by Chen

  * harbour/source/pp/hbppgen.c
  * harbour/source/main/harbour.c
  * harbour/utils/hbpp/hbpp.c
    * use hbwmain.c when main() is not supported by C compiler/platform

  * harbour/source/rtl/gtwin/gtwin.c
    * include wincon.h in all builds except LCC

  * harbour/source/rtl/fserror.c
  * harbour/source/rtl/fstemp.c
  * harbour/source/rtl/filesys.c
    * use HB_OS_WIN_32_USED as in other files (still on TOFIX list)

  * harbour/source/rtl/seconds.c
    + added HB_OS_WIN_32_USED

  * harbour/source/compiler/hbcomp.c
    ! fixed typo: stderr was used instead of stdout
2007-11-06 11:59:02 +00:00
Przemyslaw Czerpak
c374d6f243 2007-10-13 02:12 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/doc/destruct.txt
    * update description for multiple inherited destructors

  * harbour/source/compiler/complex.c
    * _HB_CLASS and _HB_MEMBER are not longer reserved words

  * harbour/include/hbclass.ch
  * harbour/include/hbexprop.h
  * harbour/include/hbexprb.c
  * harbour/source/macro/macro.y
  * harbour/source/compiler/harbour.y
    * formatting and minor code cleanup

  * harbour/source/compiler/hbusage.c
    * added missing information about -undef:<id> switch to usage
      description

  * harbour/source/compiler/gencc.c
    ! fixed bug reported by Teo in code generated for SWITCH statement
2007-10-13 00:12:25 +00:00
Przemyslaw Czerpak
b5d010fbeb 2007-10-01 19:42 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/rtl/errorapi.c
    + added protection against possible GPF when some assign methods
      were called without parameters

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  * harbour/contrib/Makefile
    + added TIP and XHB

  * harbour/make_rpm.sh
  * harbour/harbour.spec
    * removed HB_COMPAT_XHB, --with tip, --with xhb
      they are not longer necessary
2007-10-01 17:43:52 +00:00
Przemyslaw Czerpak
d5a382e30d 2007-09-28 16:32 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbexprb.c
    * respect -ks in macrovars and array item references

  * harbour/source/vm/memvars.c
    * do not detach array items during detaching enumerator variable
      also in standard (without HB_COMPAT_XHB) build
2007-09-28 14:32:20 +00:00
Przemyslaw Czerpak
af5038b272 2007-09-28 14:08 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapi.h
  * harbour/source/vm/itemapi.c
  * harbour/source/vm/garbage.c
    + added extended item references - it's universal reference which
      can be used by HVM for many different things without introducing
      new item types

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

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

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

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

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

      or:

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

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

  * harbour/source/rtl/gttrm/gttrm.c
    * small cleanup
2007-09-28 12:08:46 +00:00
Przemyslaw Czerpak
503c1ddf13 2007-09-02 17:27 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/hbgtmk.sh
  * harbour/tests/codebl.prg
  * harbour/tests/testprof.prg
  * harbour/tests/keywords.prg
  * harbour/tests/testpp.prg
  * harbour/make_rpm.sh
  * harbour/makefile.gc
  * harbour/bin/hb-mkslib.sh
  * harbour/include/hbexpra.c
  * harbour/include/hbmath.ch
  * harbour/include/hbrddntx.h
  * harbour/include/hbexprb.c
  * harbour/harbour.spec
  * harbour/contrib/dot/pp.prg
  * harbour/contrib/libct/ctwin.c
  * harbour/contrib/ole2/w32ole.c
  * harbour/contrib/hgf/win32/win32.c
  * harbour/contrib/mysql/mysql.ch
  * harbour/contrib/odbc/todbc.prg
  * harbour/contrib/odbc/sql.ch
  * harbour/contrib/hb_struc/hbstruc.ch
  * harbour/contrib/bmdbfcdx/bmdbfcdx1.c
  * harbour/contrib/msql/msql.ch
  * harbour/contrib/msql/readme.txt
  * harbour/source/pp/ppcore.c
  * harbour/source/rtl/gtdos/gtdos.c
  * harbour/source/rtl/gtxwc/gtxwc.h
  * harbour/source/rtl/hbgtcore.c
  * harbour/source/rtl/gtcrs/gtcrs.h
  * harbour/source/rtl/gtalleg/gtalleg.c
  * harbour/source/rtl/gtalleg/ssf.h
  * harbour/source/rtl/gtalleg/fixedth.sfc
  * harbour/source/rtl/gtchrmap.c
  * harbour/source/rtl/itemseri.c
  * harbour/source/rtl/gtstd/gtstd.c
  * harbour/source/rtl/gtsln/gtsln.h
  * harbour/source/rtl/gttrm/gttrm.c
  * harbour/source/rtl/gtpca/gtpca.c
  * harbour/source/rtl/hbhex.c
  * harbour/source/rtl/tget.prg
  * harbour/source/rtl/gtcgi/gtcgi.c
  * harbour/source/rtl/hbinet.c
  * harbour/source/vm/hvm.c
  * harbour/source/debug/dbgtobj.prg
  * harbour/source/debug/dbgwa.prg
  * harbour/source/common/expropt2.c
  * harbour/source/rdd/dbfcdx/dbfcdx1.c
  * harbour/source/rdd/dbffpt/dbffpt1.c
  * harbour/utils/hbpp/hbppcore.c
  * harbour/utils/hbpptest/pp_test.prg
  * harbour/utils/hbpptest/pretest.prg
  * harbour/make_tgz.sh
    * converted TABs to SPACEs
2007-09-02 15:28:05 +00:00
Przemyslaw Czerpak
c775f56f50 2007-08-20 15:50 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbexprb.c
    * do not generate error for QSELF()[...] - Clipper allows such
      operation and because some valid Clipper code needs it then
      I disabled error message.

  * harbour/common.mak
  * harbour/source/rtl/Makefile
  + harbour/source/rtl/einstvar.prg
    + added undocumented CA-Cl*pper function _eInstVar() used to validate
      variable type in assign messages.

  * harbour/include/hbapi.h
  * harbour/source/vm/arrays.c
    * changed 'char *' to 'const char *' in hb_arraySetC() and hb_arraySetCL()

  * harbour/source/rdd/dbcmd.c
    * cleaned DBSKIPPER() code

  * harbour/source/rtl/browdb.prg
    * use written in C DBSKIPPER() function instead of static .prg Skipped()
      when HB_COMPAT_XPP macro is enabled

  * harbour/source/rtl/browse.prg
    ! fixes in BROWSE() function:
      ! displaying box characters
      + added CL53 compatible mouse actions
      + added mouse wheel actions
      + added support for deleting records (K_DEL)
      + added support for edit mode
      + added support for append mode
2007-08-20 13:50:18 +00:00
Przemyslaw Czerpak
20719c1cf1 2007-07-31 21:00 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbexprb.c
    * disable CTOD("") optimization when -kc switch is used

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

  * harbour/source/vm/classes.c
    * fixed typo reported by Lost
2007-07-31 19:01:07 +00:00
Przemyslaw Czerpak
cc578600c5 2007-06-04 22:40 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/contrib/hbzlib/include/stdafx.h
  * harbour/contrib/hbzlib/include/ziparchive.h
    * cleaned some warnings

  * harbour/include/hbexprb.c
  * harbour/include/hbexprop.h
  * harbour/source/common/expropt2.c
    * restored Mindaugas code for UPPER optimization and added logic to
      optimize UPPER for strings with only Latin letters, digit and spaces
      just like in Clipper. Now code like:
         ? Upper( chr(65)+chr(66)+chr(67)+"0123 QWE asd " ) + "ZXC"
      is fully optimized at compile time to single string expression.
    % optimized hb_compExprReduceCHR() by eliminating memory allocation
      for new string
    ! fixed typo in my previous commit
2007-06-04 20:42:33 +00:00
Przemyslaw Czerpak
973468286a 2007-06-04 20:10 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbexprb.c
  * harbour/include/hbexprop.h
  * harbour/source/common/expropt2.c
    % added compile time optimization for CTOD("")
    % added compile time optimization for - used forconstant string values,
      f.e.:
         ? "Harbour   " - " Compiler"

  * harbour/source/vm/hvm.c
    % added optimization for string resizing in cVal1 - cVal2

  * harbour/source/rtl/dateshb.c
    % minor optimization - removed one not necessary ISCHAR()
2007-06-04 18:11:04 +00:00
Mindaugas Kavaliauskas
c8c4a3986e 2007-06-04 19:11 UTC+0300 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt)
* harbour/include/hbexprop.h
  * harbour/include/hbexprb.c
  * harbour/source/common/expropt2.c
     - removed UPPER("") optimisation because of ... ?
2007-06-04 16:11:07 +00:00
Mindaugas Kavaliauskas
caec86d5d5 2007-06-03 23:03 UTC+0300 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt)
* harbour/include/hbexprop.h
  * harbour/include/hbexprb.c
  * harbour/source/common/expropt2.c
     * added UPPER("") optimisation. The side effect of this modification
       is that Harbour becomes Clipper bug compatible in calculation of
       AT(UPPER(""), "test"). Though this optimisation does not introduce
       any buggy behaviour itself.
2007-06-03 19:59:39 +00:00
Przemyslaw Czerpak
defb63f5f2 2007-05-30 01:00 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbcompdf.h
  * harbour/include/hbexprb.c
  * harbour/source/common/expropt1.c
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyc
  * harbour/source/macro/macro.y
  * harbour/source/macro/macro.yyc
    ! fixed bug in operator precedence - seems that it existed from
      beginning and partially were fixed in xHarbour. This code exploits
      the problem:
            #define EOL chr(13)+chr(10)
            #command ? [<x,...>] => [outstd( <x> );]outstd(EOL)
            #command TEST <exp> => BEGIN SEQUENCE     ;
                                 ;   ? <exp>          ;
                                 ; RECOVER USING oErr ;
                                 ;   ? "Error:", oErr:subCode, ;
                                       oErr:description, oErr:operation ;
                                 ; END
            proc main()
            local oErr, s1:="X", s2:="Y", t:=.T.
            errorBlock({|oErr|break(oErr)})
            TEST t != s1 $ s2
            TEST t == s1 $ s2
            TEST t =  s1 $ s2
            TEST t <  s1 $ s2
            TEST t <= s1 $ s2
            TEST t >  s1 $ s2
            TEST t >= s1 $ s2
            TEST s1 $ s2 != t
            TEST s1 $ s2 == t
            TEST s1 $ s2 =  t
            TEST s1 $ s2 >  t
            TEST s1 $ s2 <  t
            TEST s1 $ s2 >= t
            TEST s1 $ s2 <= t
            return
2007-05-29 23:04:09 +00:00
Przemyslaw Czerpak
2f0189d34f 2007-05-12 10:45 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbcomp.h
  * harbour/include/hbexpra.c
  * harbour/include/hbexprb.c
  * harbour/include/hbexprop.h
  * harbour/include/hbpp.h
  * harbour/source/compiler/complex.c
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyc
  * harbour/source/compiler/harbour.yyh
  * harbour/source/compiler/hbmain.c
  * harbour/source/pp/ppcore.c
    + added support for extended multiline codeblocks:
         { |<params,...>| <EOL>
            <statement1>
            ...
            <statementN>
            return <val>
         }
      Such codeblocks allow nested definitions. They can also have their
      own variable declarations (local, static, field, memvar, parameters,
      private, public) and visibility of declared variables is similar to
      nested function in Pascal but please note that there is one limitation
      which exists also for normal codeblocks (Clipper compatible behavior):
      internal codeblock local parameters and local variables cannot be
      used in nested codeblocks, f.e. such code:
            eval( { |p| eval( {|| qout( p + 1 ) } ) } )
      is illegal in Clipper and Harbour. This limitation also can be
      eliminated but but it will be necessary to make deeper modifications
      in code for local detaching changing the method of generating
      codeblocks local variables in nested blocks so unlike the above
      also some modifications in HVM will be necessary.
      Please test.
2007-05-12 08:48:12 +00:00
Przemyslaw Czerpak
91ec7b23a5 2007-05-11 22:50 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbcomp.h
  * harbour/include/hbcompdf.h
  * harbour/include/hbexpra.c
  * harbour/include/hbexprb.c
  * harbour/source/compiler/complex.c
  * harbour/source/compiler/genc.c
  * harbour/source/compiler/gencli.c
  * harbour/source/compiler/genobj32.c
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyc
  * harbour/source/compiler/harbour.yyh
  * harbour/source/compiler/hbmain.c
    * changed code used for variable scoping - now it's much more
      simple (only one function) and allows to use declarations in
      nested functions/codeblocks with visibility similar to Pascal
    ! fixed parsing FILED <fields,...> IN <alias>
      we were accepting code like:
         FIELD f1, f2 IN db1, f3 IN db2 IN db3
      and for all fields the last alias (db2 in this example) was used
    ! fixed calculating number of static variables with -b (debugger)
      compilation (number of file wide statics were doubled)
    ! fixed generation of static variable names for debugger when declared
      with array dimensions, f.e.:
         static sVar[3]

  * harbour/source/rtl/hbffind.c
    * minor cleanup *nix version

  * harbour/contrib/bmdbfcdx/bmdbfcdx1.c
    ! fixed casting for C++ compilation

  * harbour/source/rdd/dbfdbt/dbfdbt1.c
    * updated for some old API modifications (this library is not used now
      but if we keep it in CVS then I think it should be updated)
2007-05-11 20:51:04 +00:00
Przemyslaw Czerpak
74adc6f86c 2007-04-23 18:25 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbcomp.h
  * harbour/include/hbcompdf.h
  * harbour/include/hbexpra.c
  * harbour/include/hbexprb.c
  * harbour/include/hbexprop.h
  * harbour/source/common/expropt1.c
  * harbour/source/compiler/genc.c
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/hbmain.c
  * harbour/source/compiler/hbopt.c
    ! reverted fix for unnecessary -W2 warning:
         Function '...' does not end with RETURN statement
      in code like:
            func f(v)
            if v
               return "TRUE"
            else
               return "FALSE"
            endif
      Sorry but I had to make it because this fix was wrong and causes
      that code like:
            func f(v)
            if v
               ? v
            else
               return "FALSE"
            endif
      was compiled without any warnings but wrong PCODE was generated.
      In some spare time I'll try to implement valid RETURN detection,
      now simply add RETURN NIL at the end of such functions - it will
      be removed by dead code eliminator.
    ! fixed memory leak when more then one .prg file was given as compiler
      parameter
    + cleaned some code for future modifications

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

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

  * harbour/source/vm/classes.c
    * added support for (@func()):eval(...)
2007-04-23 16:27:57 +00:00
Przemyslaw Czerpak
759c045f73 2007-03-30 15:12 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbexprb.c
    % optimize PCODE generated for IIF() used as statement

  * harbour/include/hbpp.h
    * fixed typo in comment

  * harbour/source/pp/ppcore.c
    * fixed .ppo output in some string expressions inside []

  * harbour/source/rdd/dbfcdx/dbfcdx1.c
  * harbour/source/rdd/dbfntx/dbfntx1.c
    + added some missing DBOI_* actions

  * harbour/source/rtl/hbregex.c
    + added comment

  * harbour/source/vm/hashes.c
    * set autoadd by default when compiled with HB_COMPAT_XHB macro

  * harbour/source/debug/debugger.prg
  * harbour/source/rdd/dbstrux.prg
  * harbour/source/rtl/tbrowse.prg
    * removed unnecessary NIL in in IIF() statements
  * harbour/utils/hbtest/rt_misc.prg
    * removed unnecessary ::cValue in in IIF() statements
2007-03-30 13:16:10 +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
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
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
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