Commit Graph

7481 Commits

Author SHA1 Message Date
Przemyslaw Czerpak
e2297ea62c 2007-10-13 12:48 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/compiler/hbdead.c
    % minor improvement
2007-10-13 10:48:12 +00:00
Przemyslaw Czerpak
01bc547035 2007-10-13 02:13 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/macro/macro.yyc
  * harbour/source/macro/macro.yyh
  * harbour/source/compiler/harbour.yyc
  * harbour/source/compiler/harbour.yyh
    * updated for recent modifications
2007-10-13 00:14:07 +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
Mindaugas Kavaliauskas
bde1c66062 2007-10-10 21:11 UTC+0300 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt)
* harbour/tests/multifnc/t0.prg
  * harbour/tests/multifnc/t1.prg
  * harbour/tests/multifnc/t2.prg
    + one more test for function overload with C function
2007-10-10 18:12:16 +00:00
Przemyslaw Czerpak
ce51877db3 2007-10-10 00:05 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbcompdf.h
  * harbour/source/compiler/hbmain.c
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyc
  * harbour/source/compiler/complex.c
    * cleanup: removed unused variable, some extension to datetime
      decoding, etc.
2007-10-09 22:05:51 +00:00
Przemyslaw Czerpak
4803d0e558 2007-10-09 09:05 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/runner.c
  * harbour/source/compiler/genhrb.c
    ! added support for functions marked as DYNAMIC in .hrb format

  * harbour/source/compiler/complex.c
    + finished code (stil disabled) to decode datetime in
       VFP strict date form
2007-10-09 07:05:39 +00:00
Mindaugas Kavaliauskas
3c909a6e05 2007-10-09 00:11 UTC+0300 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt)
* harbour/source/vm/dynsym.c
    * minor optimzation
  * harbour/tests/multifnc/t0.prg
  * harbour/tests/multifnc/t1.prg
  * harbour/tests/multifnc/t2.prg
    + one more test for function overload
2007-10-08 21:10:12 +00:00
Przemyslaw Czerpak
c5c1113387 2007-10-08 23:05 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/hvm.c
    * do not clear references to public functions in symbol tables used
      by unloaded modules

  * harbour/source/compiler/complex.c
    + added disabled yet code to decode datetime in VFP strict date form
         {^YYYY/MM/DD[,][HH[:MM[:SS[.CCC]]][A|P]]}
      It's for future datetime implementation.
2007-10-08 21:06:12 +00:00
Viktor Szakats
440d61f0ae 2007-10-08 19:34 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/xhb/hbcompat.ch
   * contrib/xhb/xhb.ch
     + Moved lines which do not need xhb lib itself from xhb.ch to hbcompat.ch.
       xhb.ch now includes hbcompat.ch and not vice versa.
       So now hbcompat.ch can be used as a "lighter" compatibility 
       layer which doesn't need the lib binary. Pls test.

   * contrib/mysql/tmysql.prg
   * contrib/mysql/tsqlbrw.prg
   * contrib/mysql/Makefile
     ! Applied MySQL lib patch on behalf of Guy Roussin.
2007-10-08 17:36:21 +00:00
Przemyslaw Czerpak
6ac1bea71f 2007-10-08 01:06 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/arrays.c
    ! fixed value returned by HB_RASCAN( aVal, bCode ) - it was returning
      index -1, f.e. hb_rascan({1,2,3},{|x|x==2}) returned 1 when it
      should 2
2007-10-07 23:06:43 +00:00
Teo Fonrouge
b44223b903 2007-10-06 21:28 UTC-0500 Teo Fonrouge (teo/at/windtelsoft/dot/com)
* contrib/tip/thtml.prg
  * contrib/tip/cgi.prg
  * contrib/tip/httpcln.prg
    * removed HB_HSetAutoAdd, now Harbour hashes by default have AUTOADD on assign.
2007-10-07 02:28:40 +00:00
Przemyslaw Czerpak
dafaea3cbe 2007-10-06 13:55 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/hashes.c
    * set AUTOADD for assign operation by default in new arrays
    * removed last HB_COMPAT_XHB

  * harbour/source/vm/hashfunc.c
    * change HB_HAUTOADD( hHash, .T. ) to set AUTOADD for assign only
      when no default value is set

   Above are minimal modifications to make default Harbour behavior
   more similar to other languages f.e. PHP or xHarbour. Other
   modifications will depend on group decision.
2007-10-06 11:56:02 +00:00
Przemyslaw Czerpak
053e67ddeb 2007-10-06 12:45 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbsetup.h
  * harbour/source/rtl/hbffind.c
  * harbour/source/rtl/filesys.c
    * cleanup

  * harbour/source/vm/hvm.c
    % use extended reference for enumerator destructor - it eliminates
      3 hb_itemNew() calls reducing the cost of creating FOR EACH envelope
      about 40%
2007-10-06 10:45:13 +00:00
Przemyslaw Czerpak
0ce94714e6 2007-10-05 23:44 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbsetup.h
    * minor cleanup comment
  * harbour/source/vm/hvm.c
    * save/restore return value in extended references
2007-10-05 21:44:46 +00:00
Przemyslaw Czerpak
2429517eed 2007-10-05 14:00 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/dynsym.c
    * added some additional comments. I still do not know MSVC behavior
      can someone check the results from tests/multifnc in MS[V]C build?
2007-10-05 12:00:38 +00:00
Przemyslaw Czerpak
06eb28d020 2007-10-04 20:14 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/rdd/dbf1.c
    * ignore Sx_SetTrigger( TRIGGER_ENABLE ) when trigger function not set
2007-10-04 18:14:48 +00:00
Przemyslaw Czerpak
a455c0ec2b 2007-10-04 19:50 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/rdd/dbffpt/dbffpt1.c
    ! fixed memo pack when DBF record were not updated but only memo file
      Problem reported by Miguel
2007-10-04 17:51:03 +00:00
Przemyslaw Czerpak
feeb26f162 2007-09-28 15:25 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/rdd/dbffpt/dbffpt1.c
    ! fixed memo pack when DBF record were not updated but only memo file
      Problem reported by Miguel
2007-10-04 17:50:02 +00:00
Miguel Angel Marchuet Frutos
80607d422d 2007-10-04 13:15 UTC+0100 Miguel Angel Marchuet Frutos <miguelangel/at/marchuet.net>
* contrib/bmdbfcdx/bmdbfcdx1.c
    * removed memory leak.
2007-10-04 15:34:31 +00:00
Miguel Angel Marchuet Frutos
e92d579e1c 2007-10-04 13:15 UTC+0100 Miguel Angel Marchuet Frutos <miguelangel/at/marchuet.net>
* contrib/bmdbfcdx/bmdbfcdx1.c
    * removed memory leak.

  * contrib/xhb/makefile.bc
    * added missing file.

  * source/vm/estack.c
    * corrected sintax
2007-10-04 15:02:54 +00:00
Przemyslaw Czerpak
bc5b34f088 2007-10-04 13:15 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/tests/multifnc/t0.prg
    * show information about Harbour version and used C compiler
2007-10-04 11:15:14 +00:00
Przemyslaw Czerpak
9e390bcdcf 2007-10-04 12:36 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/hvm.c
    ! removed one call to hb_vmRequestRestore() left by mistake
    % minor optimization
2007-10-04 10:37:00 +00:00
Przemyslaw Czerpak
2c601eb91c 2007-10-04 02:54 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/compiler/hbmain.c
    ! fixed setting HB_FS_FIRST flag
2007-10-04 00:54:49 +00:00
Przemyslaw Czerpak
0efe049e5d 2007-10-03 17:04 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
+ harbour/tests/oleenum.prg
    + added Enrico example and test code for enumerators and OLE objects

  * harbour/contrib/Makefile
    * enabled hbole, ado_rdd, hybodbc in most of Windows builds

  * harbour/contrib/ole2/win32ole.prg
  * harbour/contrib/ole2/w32ole.c
    * synced with recent Ron's modifications in xHarbour
      I'd like to ask Windows users to make tests with above
      oleenum.prg and example sent by Luis

  * harbour/source/rtl/gttrm/gttrm.c
    * disable ACS mode before sending BEL on Linux compatibile terminals
      - some of them may try to display chr(7) instead of generating
        sound when ACSC is enabled

  * harbour/source/vm/proc.c
    + added support for character parameter in PROCFILE() - now it can
      accept <nLevel> | <sFuncSym> | <cFuncName> as first parameter

  * harbour/source/vm/dynsym.c
    * added support for detecting not cleanly overloaded by linker .prg
      functions.
      In such case hb_dynsymNew() checks if linker updated function
      addresses and if yes then remove unnecessary HB_FS_LOCAL flag.
      In such case works GCC (but not MinGW and DJGPP), OpwenWatcom
      for Linux, DOS, Windows (and probably for OS2), POCC, XCC (with
      /FORCE:MULTIPLE linker switch) and some other linkers I haven't
      tested.
      Otherwise (two different functions with the same name linked and
      each accessible from different symbol, f.e. BCC32, MinGW, DJGPP)
      it accept multiple HB_FS_LOCAL for dynamically loaded modules
      (.hrb, .dll, .so, .dyn, ...) if HVM also accepted it (for future
      KEEP_LOCAL_FUNC HB_LIBLOAD()/__HBRLOAD() parameter).
      For statically linked modules it overloads one of the functions when
      HB_OVERLOAD_MULTIPLE_FUNC macro is set (now by default to make tests
      with different linkers). I left detail description in source code of
      hb_dynsymNew() in source/vm/dynsym.c.
      I hope it will also help Ron in recent xHarbour modifications - AFAIK
      it's sth what he tires to do.
      Anyhow please remember that that dirty overloading any symbols by
      linker is very bad idea and in such case you have big chance that
      wrong binaries will be created so the most preferable choice is
      eliminating such situations and not using linker switches like
      -Wl,--allow-multiple-definition or /FORCE:MULTIPLE

  + harbour/tests/multifnc
  + harbour/tests/multifnc/t0.prg
  + harbour/tests/multifnc/t1.prg
  + harbour/tests/multifnc/t2.prg
  + harbour/tests/multifnc/Makefile
    + added test code for results of dirty overloaded functions.
      With recent modifications expected results are:
            main t0.prg t0.prg
            alert t1.prg t1.prg [ALERT]
            p0 t0.prg t0.prg P0:t0.prg P0:t0.prg OK
            p1 t0.prg t0.prg P1:t0.prg P1:t0.prg OK
            p2 t1.prg t1.prg P2:t1.prg P2:t1.prg OK
            p3 t0.prg t0.prg P3:t0.prg P3:t0.prg OK
            p4 t1.prg t1.prg P4:t1.prg P4:t1.prg OK
            p5 t2.prg t2.prg P5:t2.prg P5:t2.prg OK
            ===
            main2 t1.prg t1.prg
            alert t1.prg t1.prg [ALERT]
            p0 t0.prg t0.prg P0:t0.prg P0:t0.prg OK
            p1 t0.prg t0.prg P1:t0.prg P1:t0.prg OK
            p2 t1.prg t1.prg P2:t1.prg P2:t1.prg OK
            p3 t0.prg t0.prg P3:t0.prg P3:t0.prg OK
            p4 t1.prg t1.prg P4:t1.prg P4:t1.prg OK
            p5 t2.prg t2.prg P5:t2.prg P5:t2.prg OK
            ===
            main3 t2.prg t2.prg
            alert t1.prg t1.prg [ALERT]
            p0 t0.prg t0.prg P0:t0.prg P0:t0.prg OK
            p1 t0.prg t0.prg P1:t0.prg P1:t0.prg OK
            p2 t1.prg t1.prg P2:t1.prg P2:t1.prg OK
            p3 t0.prg t0.prg P3:t0.prg P3:t0.prg OK
            p4 t1.prg t1.prg P4:t1.prg P4:t1.prg OK
            p5 t2.prg t2.prg P5:t2.prg P5:t2.prg OK

      I've tested only few compilers: GCC/G++ (Linux) MinGW (WINE-W32),
      DJGPP (DOSEMU), OpenWatcom (Linux, WINE-W32, DOSEMU), XCC/POCC
      (WINE-W32) and I'm interesting in results from other compiler/
      platforms, f.e. from M[V]SC.
2007-10-03 15:05:12 +00:00
Przemyslaw Czerpak
2df15f7e13 2007-10-02 14:58 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/contrib/ole2/win32ole.prg
    ! fixed typo in __enumStart() - enum parameter has to be passed
      by reference ro __enumSkip() method
2007-10-02 12:58:39 +00:00
Przemyslaw Czerpak
a72b6cfda8 2007-10-02 10:57 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbexpra.c
    + added support for HB_ENUM*([@]<varname>) functions - disabled
      by default can be enabled by HB_USE_ENUM_FUNCTIONS macro

  * harbour/source/rtl/gttone.c
    * use assembler code for tone emulation for POCC/XCC compiler only
      for X86 platforms

  * harbour/source/rtl/filesys.c
    * do not include <share.h> for POCC/XCC

  * harbour/source/compiler/gencli.c
    * pacify warning

  * harbour/config/w32/owatcom.cf
  * harbour/config/w32/xcc.cf
    * updated description in header files

  + harbour/config/w32/pocc.cf
    + added support for Pelles ISO C Compiler
2007-10-02 08:57:50 +00:00
Viktor Szakats
a261e17ab4 2007-10-02 10:49 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* harbour/ChangeLog
   + harbour/ChangeLog.019
     * ChangeLog archived.

   * contrib/tip/cgi.prg
   * contrib/tip/url.prg
   * contrib/tip/httpcln.prg
   * contrib/tip/mail.prg
     ! Some hash function calls corrected after last modification.
       Thanks Juan.
2007-10-02 08:53:04 +00:00
Przemyslaw Czerpak
822c550662 2007-09-28 15:25 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbexpra.c
    + added support for HB_ENUM*([@]<varname>) functions - disabled
      by default can be enabled by HB_USE_ENUM_FUNCTIONS macro

  * harbour/source/rtl/gttone.c
    * use assembler code for tone emulation for POCC/XCC compiler only
      for X86 platforms

  * harbour/source/rtl/filesys.c
    * do not include <share.h> for POCC/XCC

  * harbour/source/compiler/gencli.c
    * pacify warning

  * harbour/config/w32/owatcom.cf
  * harbour/config/w32/xcc.cf
    * updated description in header files

  + harbour/config/w32/pocc.cf
    + added support for Pelles ISO C Compiler
2007-10-02 08:52:28 +00:00
Teo Fonrouge
696c1847d7 2007-10-01 22:53 UTC-0500 Teo Fonrouge (teo/at/windtelsoft/dot/com)
* contrib/tip/httpcln.prg
    * removed unnecesary include file hbcompat.ch
2007-10-02 03:53:21 +00:00
Viktor Szakats
799edeb1e5 2007-10-01 23:50 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/tip/Makefile
   * contrib/tip/makefile.bc
   + contrib/tip/makefile.vc
   + contrib/tip/make_vc.bat
   * contrib/tip/tip.ch
   * contrib/tip/utils.c
   * contrib/tip/base64x.c
   * contrib/tip/encmthd.c
   - contrib/tip/hbhex2n.c
   * contrib/tip/cgi.prg
   * contrib/tip/client.prg
   * contrib/tip/ftpcln.prg
   * contrib/tip/httpcln.prg
   * contrib/tip/mail.prg
   * contrib/tip/thtml.prg
   * contrib/tip/url.prg
     + Code converted to not require xhb lib.
     % Now compiled with -kM switch to avoid macro expansion 
       of strings. This is important here, as "&" char is used 
       quite often in the code, so expect a somewhat better 
       performance.
     - Removed hex number conversion functions, as compatible 
       versions are now available in Harbour with am hb_ prefix.
     + C code update to use Harbour API calls only.
     + Added VC build script.
     ! Fixed two C warnings.
     ! Standardized SVN header in one file.
     ! Set std SVN keywords and eol-style.
     ; Please test it.

   * include/hbextern.ch
   * source/rtl/hbinet.c
   * contrib/xhb/xhb.ch
   * contrib/xhb/xhbfunc.c
     * Renamed hb_IsInetSocket() to hb_inetIsSocket() to 
       keep all inet related functions in one namespace.
2007-10-01 22:17:21 +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
Miguel Angel Marchuet Frutos
556261c165 2007-09-01 17:54 UTC+0100 Miguel Angel Marchuet <miguelangel/at/marchuet.net>
* contrib/bmdbfcdx/bmdbfcdx1.c
  * contrib/bmdbfcdx/hbrddbmcdx.h
    * synced with dbfcdx

  * contrib/tip/make_b32.bat
    * fixed copy of lib by Juan Galvez.

  * contrib/xhb/makefile.bc
    + added missing files by Juan Galvez.
2007-10-01 16:01:38 +00:00
Viktor Szakats
71d16687eb 2007-09-29 11:50 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* source/rdd/dbfntx/dbfntx1.c
   * source/rdd/dbfcdx/dbfcdx1.c
   * source/rdd/dbf1.c
     + Added support for _SET_DEFEXTENSIONS to RDD.
       (Przemek pls review it. I cannot send you direct mail, because 
       it bounces)
2007-09-29 10:01:33 +00:00
Przemyslaw Czerpak
e7d97bea27 2007-09-28 23:57 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/rdd/dbf1.c
    ! fixed typo in hb_dbfGetRowVer() reported by Mindaugas, many
      thanks for information, it was side effect of some experiments
      I hadn't cleanly removed before commit.
2007-09-28 21:57:23 +00:00
Przemyslaw Czerpak
423df1e50d 2007-09-28 19:26 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbcomp.h
    * pass compile time -ks state to RT macro compiler flags.
      It means that if you compile some with which &macros
      then -ks compile time switch will be passed also to
      macro compiler and respected later at runtime

  * harbour/source/macro/macro.yyc
  * harbour/source/macro/macro.y
    + added support for passing by reference array and object items

  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyc
    * generate compile time error for @func(<vars,...>)
      only @func() is acceptable
2007-09-28 17:26:32 +00:00
Viktor Szakats
79d5392cfc 2007-09-28 17:26 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* include/Makefile
   - include/hbcompat.ch
   + contrib/xhb/hbcompat.ch
   * contrib/xhb/xhb.ch
   * contrib/xhb/Makefile
     * Moved content or hbcompat.ch into xhb.ch.
       Those who need compatibility, have to replace 
     * Moved hbcompat.ch (for compatibility) to contrib/xhb
2007-09-28 15:31:45 +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
Viktor Szakats
52cf61b74b 2007-09-28 11:56 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* source/compiler/hbusage.c
     ! Show the -ks switch only when compiled with HB_COMPAT_XHB.
2007-09-28 09:57:26 +00:00
Przemyslaw Czerpak
c384b23f25 2007-09-27 15:29 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/dbinfo.ch
  * harbour/contrib/rdd_ads/ads1.c
  * harbour/source/rdd/workarea.c
  * harbour/source/rdd/delim1.c
  * harbour/source/rdd/dbf1.c
  * harbour/source/rdd/sdf1.c
    + added support for DBI_POSITIONED flag. Because some RDDs may not
      support phantom record then checking for EOF() does not have to
      be enough to detect that the cursor is positioned to phantom
      record. Checking for RecNo() == LastRec() + 1 does not have to
      work either because some RDD may use not use continuous record
      numbers f.e. ADT. So in code like BROWSE() if you want to be sure
      that current record is phantom one then (!dbInfo(DBI_POSITIONED))
      should be used.
2007-09-27 13:30:20 +00:00
Przemyslaw Czerpak
893ba137b4 2007-09-27 14:40 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/contrib/rdd_ads/ads1.c
  * harbour/source/rdd/workarea.c
  * harbour/source/rdd/dbf1.c
    * recognize field { "T", 4, 0 } as TIME and { "T", 8, 0 } as DAYTIME

  * harbour/source/vm/hvm.c
    * formatting
2007-09-27 12:40:32 +00:00
Przemyslaw Czerpak
81e77761a8 2007-09-26 05:37 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/ChangeLog
    ! fixed typo in function names in previous commit description

  * harbour/contrib/xhb/xhbfunc.c
    + added HB_QSELF()
2007-09-26 03:37:08 +00:00
Przemyslaw Czerpak
c32784b716 2007-09-26 05:00 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/contrib/xhb/Makefile
  + harbour/contrib/xhb/xhbwith.c
    + added HB_QWith( [<nLevel>] ), HB_QWithObjectCounter(),  HB_QResetWith()
2007-09-26 03:00:30 +00:00
Przemyslaw Czerpak
d8813e5b29 2007-09-26 02:30 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbclass.ch
    + added:
         ON ERROR FUNCTION <FuncName>
         OPERATOR <op> FUNCTION <FuncName> <scope>

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

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

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

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

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

      All of the above extensions are written in C code so the speed
      overhead is very small. Harbour evaluates PCODE faster then xHarbour
      so in speed tests where above operators are executed in loop without
      any other code the xHarbour results with native support are comparable
      with Harbour ones where above operators are overloaded using scalar
      classes so in normal code you should not find any difference with
      one exception for assigning characters in very long strings.
2007-09-26 00:30:47 +00:00
Viktor Szakats
fdda56d90d 2007-09-25 19:15 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/xhb/xhbcomp.prg
     + Added "string as array" implementation. I didn't test 
       it for 100% compatibility, but the base is there.
       One problem though that Harbour won't allow an zero 
       or negative index even with the -ks switch. (I find 
       the error useful though, so we should keep it, but allow 
       it with a switch -ks?)
2007-09-25 17:20:03 +00:00
Viktor Szakats
a3c5433fa3 2007-09-25 18:51 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* include/hbcompat.ch
   * source/vm/arrayshb.c
   * contrib/xhb/xhb.ch
   * contrib/xhb/xhbfunc.c
     + Added HB_ASCAN() to Harbour, which does the same as 
       the plain AScan() in xhb. I decided to do this 
       because we already had hb_RAscan() implemented, and 
       having hb_Ascan() is good to keep symetry.
     * Modified xhb lib to use the Harbour one.
     * Translations moved to hbcompat.ch.
     - Removed HB_COMPAT_XHB from Harbour level array functions.
2007-09-25 16:52:16 +00:00
Przemyslaw Czerpak
8d8d012bdf 2007-09-25 13:10 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/rdd/wafunc.c
    ! fixed typo which broke array returned by dbStrunct()
2007-09-25 11:33:49 +00:00
Teo Fonrouge
fec7bc7448 2007-09-25 00:55 UTC-0500 Teo Fonrouge (teo/at/windtelsoft/dot/com)
* contrib/xhb/xhbcomp.prg
    + added "[]" operator overloading for the HBCharacter type class:
      <string>[n] : access
      assign is not implemented ( <string>[n] := <char> )
      negative index is not implemented ( <string>[-n] )

    + added "$" operator overloading for the following type classes:
      HBCharacter : <char> $ <array|hash>
      HBDate      : <date> $ <array|hash>
      HBLogical   : <logical> $ <array|hash>
      HBNil       : <nil> $ <array|hash>
      HBNumeric   : <numeric> $ <array|hash>

    ; all the new extended types, has a ::ClassName with the "HB" prefix.
2007-09-25 05:55:44 +00:00
Viktor Szakats
d71fa590e7 2007-09-25 04:30 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/xhb/Makefile
   * contrib/xhb/xhbfunc.c
   + contrib/xhb/xhb.ch
   + contrib/xhb/xhbcomp.prg
     + Added xhb_AScan(), xhb_AIns(), xhb_ADel() plus defines 
       to redirect extended AScan(), AIns(), ADel() calls to these 
       functions. They need to be tested as I'm no xhb user.
     + Added compatibility header, which adds a the above translations 
       and include hbcompat.ch.
     + Added INIT PROC xhb_Init() as a future place for xhb specific 
       startup settings.
     ; TODO:
       - Add $ and [] operator overloading.
       - Add operator overloading for hash type.
       - Add a way hash API call to control the default flag 
         hb_hashNew() uses, then add this default setting to 
         the xhb libs INIT PROC.
     ; For better xhb compatibility, developers should add 
       #ifndef __XHARBOUR__
          #include "xhb.ch"
       #endif
       to every .prg file they use.

   + contrib/xhb/make_b32.bat
   + contrib/xhb/make_vc.bat
   + contrib/xhb/makefile.bc
   + contrib/xhb/makefile.vc
     + Added non-GNU makefiles for xhb lib.

   * include/hbcompat.ch
     + Added xhb compatibility translates for ENDSWITCH end friends.

   * source/rtl/scrollbr.prg
     * Minor formatting.
2007-09-25 02:43:22 +00:00
Przemyslaw Czerpak
b4e5912a0e 2007-09-25 03:35 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbextern.ch
  + harbour/contrib/xhb/xhbextrn.ch
  * harbour/contrib/xhb/Makefile
    * moved xHarbour compatible functions from hbextern.ch to xhbextrn.ch
2007-09-25 01:35:15 +00:00