Commit Graph

148 Commits

Author SHA1 Message Date
Przemyslaw Czerpak
5d2a6931be 2009-06-14 14:49 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/contrib/gtwvg/wvgwin.c
    ! fixed wrongly used & operator

  * harbour/source/rtl/hbproces.c
    * added TODO warning in OpenWatcom Linux builds

  * harbour/make_gnu.sh
    ! fixed test_param() function definition - it has to be defined it's
      before use

  * harbour/include/hbexpra.c
  * harbour/include/hbexprb.c
  * harbour/source/common/expropt1.c
  * harbour/source/rtl/round.c
    * removed unnecessary <math.h>

  * harbour/source/vm/hvm.c
  * harbour/source/common/expropt2.c
  * harbour/contrib/hbct/ctmath.h
  * harbour/contrib/hbclipsm/num.c
  * harbour/contrib/hbclipsm/numfloor.c
  * harbour/contrib/hbclipsm/numceil.c
    * use "hbmath.h" instead of <math.h> to avoid possible desynchronization
      between used math libraries and header files

  * harbour/source/pp/Makefile
    ! fixed real DOS compilation - replaced Windows only hack by wildcard
      function usage

  * harbour/config/dos/dir.cf
    * removed intermediate sh call from executed commands

  * harbour/source/vm/Makefile
    * disabled HB_HVM_ALL in all Watcom builds - it works but the compilation
      time is very huge so user who wants to use it should set envvar
      HB_HVM_ALL=yes
    * enabled HB_HVM_ALL for DJGPP builds
2009-06-14 12:40:11 +00:00
Przemyslaw Czerpak
d2c2fb58cf 2009-05-17 17:35 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/pp/ppcore.c
    + added new  predefined macro __TIMESTAMP__

  * harbour/source/vm/classes.c
    ! fixed compilation in MT mode and HB_HASH_MSG_ITEMS macro

  * harbour/source/compiler/compi18n.c
    * translate '\' in source code references in .pot files to '/'

  * harbour/contrib/rddsql/sddodbc/odbcdd.c
    * cleared non ANSI C initialization

  * harbour/include/hbmacro.h
  * harbour/source/vm/macro.c
  * harbour/include/hbexprb.c
    ! force memvar context to undeclared variables used with array index
      operator []. Clipper compatible behavior

  * harbour/contrib/hbwin/hbwinole.h
  * harbour/contrib/hbwin/olecore.c
    + added hb_oleItemPut()
2009-05-17 15:27:15 +00:00
Przemyslaw Czerpak
6b916eba63 2009-05-11 14:43 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 optimization for hb_stot() function
2009-05-11 12:35:20 +00:00
Viktor Szakats
ee1a33a40c 2009-05-06 10:50 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* include/hbexprb.c
    + Allowing user defined 'gettext' functions to be used
      under the names hb_i18n_gettext[_strict|_noop]_*(),
      where * is a function name postfix.
2009-05-06 09:08:50 +00:00
Mindaugas Kavaliauskas
5638e5251b 2009-05-04 16:40 UTC+0300 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt)
* harbour/include/hbexprb.h
    * suppressed warning for hb_i18n_gettext("")
2009-05-04 13:48:26 +00:00
Przemyslaw Czerpak
5c2eb974fe 2009-04-29 14:50 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbexprb.c
    ! modified := optimization to keep alive original LValue name
      used in the assign expression. It fixes FOR / NEXT loops which
      in which such optimized expression were used, f.e.:
         FOR n := n + 1 TO 10; ? n; next
      In fact it's only workaround for potentially bigger problem with
      multiple references to single expression which we probably have to
      resolve if we extend the compiler to not generate PCODE online
      for each compiled statement but only after preprocessing and
      optimizing at least whole function or procedure.
2009-04-29 12:42:13 +00:00
Przemyslaw Czerpak
9b31274eb5 2009-04-23 10:26 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbexprb.c
    + added support for indirect (by macro or some other expression)
      assign of object items
2009-04-23 08:18:59 +00:00
Przemyslaw Czerpak
ba6f4192ea 2009-04-02 22:01 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbexpra.c
    ! verify all expression POP operation for usage as LValue

  * harbour/include/hbexprb.c
    ! fixed possible GPF in unverified send context
    + added support for IIF() usage as LValue even if it cannot be
      reduced during [macro]compilation

  * harbour/source/macro/macro.yyc
  * harbour/source/macro/macro.y
  * harbour/source/macro/macrolex.c
    * removed support for some characters unsupported by Clipper in
      macro expressions like chr(10) as trailing expression character, f.e.:
         ? &("DATE()"+chr(10))

  * harbour/source/compiler/complex.c
    * formatting
2009-04-02 19:54:29 +00:00
Przemyslaw Czerpak
26a11bd859 2009-03-21 16:07 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/bin/hb-func.sh
    ! restored default optimization flag (-O3) in hb* scripts

  * harbour/harbour.spec
    ! fixed recent modification

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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


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

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

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

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

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

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

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

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


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

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

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

   Warning: this implementation is not xHarbour compatible. There are many
   important differences. Mostly on C level and used API. Please be careful
   in porting xHarbour source code to Harbour.
2009-03-21 15:04:43 +00:00
Mindaugas Kavaliauskas
61ac0ae0b4 2009-01-15 03:20 UTC+0200 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt)
* harbour/include/hbcomp.h
  * harbour/include/hbcompdf.h
  * harbour/include/hbexprb.c
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyc
  * harbour/source/compiler/harbour.yyh
  * harbour/source/compiler/hbcomp.c
  * harbour/source/compiler/hbmain.c
    * removed global variables HB_COMP_PARAM->cVarType, ->szFromClass
2009-01-15 01:14:11 +00:00
Przemyslaw Czerpak
479c738c83 2008-12-31 14:12 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbexprb.c
    + added optimizations for var := var <op> <exp> => var <op>= <exp>
      when <op> is +, -, *, / %, ^ operator
    % cleanup up checking if message can be used as LValue
2008-12-31 13:09:30 +00:00
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