* include/hbapifs.h
* source/common/hbfsapi.c
! Added missing HB_EXPORTs.
+ Added hb_fsFileExists(). This is the preferred way to check
for the existence of a file, because it is fast and will
find a file even of directory traversal is not possible
for the file's directory. Works the same way as file
existence check in most other tools.
; NOTE: DOS branch was not compiled or tested (it is a
rewrite of a tested ASM function though).
* common.mak
* include/hbextern.ch
* source/rtl/Makefile
+ source/rtl/hbfile.c
+ Added HB_FILEEXISTS() Harbour level function to check
for the existence of a file. This works better than
FILE() in most situations, but it doesn't accept any
wildcards.
* source/compiler/gencobj.c
! Fixed to not used access(). Using hb_fsFileExists() instead.
* include/hbsetup.h
- Removed HOST_OS_UNIX_COMPATIBLE which was a misleading
alias for OS_UNIX_COMPATIBLE.
* source/compiler/hbcomp.c
% HOST_OS_UNIX_COMPATIBLE -> OS_UNIX_COMPATIBLE
* common.mak
* harbour-ce-spec
* make_xmingw.sh
* make_xmingwce.sh
* makefile.bc
* makefile.gc
* makefile.vc
* source/pp/Makefile
- source/pp/ppgen.c
+ source/pp/hbppgen.c
! executable ppgen renamed to hbppgen.
* samples/pe/editorlo.c
* samples/pe/pe.prg
+ samples/pe/bld_b32.bat
+ Added BCC build batch file.
! Fixed to compile under current Harbour.
! Fixed filename casing.
! Fixed several warnings (quite some signedness problem still remain).
; This is a very nice editor written in C (Harbour callable),
I think it is the work of Ryszard.
* samples/hscript/bld_b32.bat
* samples/hscript/hscript.prg
* samples/hscript/dir.hs
* samples/hscript/multiply.hs
* samples/hscript/ugly.hs
* samples/hscript/hello.hs
! Fixed build batch file.
! Fixed to use NFLib file IO rather than libmisc, because
latter was broken (it is a clone of the NFLib file IO).
! Fixed scripts to use Start instead of Main as an entry
point otherwise __hrbRun() got confused and called the
app Main().
! Fixed some other problems to make it run.
* contrib/win32/w32_prn.c
! Changed hb_retnl() -> hb_retptr() for Windows handles.
! Changed hb_parnl() -> hb_parptr() for Windows handles.
; Thanks Przemek.
; The GC-ed version is yet to be done.
- bldcmncf.sh
* make_gcc.sh
% bldcmncf.sh integrated into make_gcc.sh.
After consulting with Przemek.
* include/clipdefs.h
! Fixed HANDLE clash with Windows headers after recent modification.
Notice that I've left HB_VMHANDLE as ULONG for now. It's enough
to revisit this when implementing those VM API calls.
Another notice that because of this name clash legacy Clipper
VM API calls in Harbour won't work with Windows headers,
native Harbour VM API calls will do work however.
- make_xcemgw.sh
+ make_xmingwce.sh
* Rename to be in sync with make_xmingw.ch
* include/vm.api
* include/hbapi.h
* include/clipdefs.h
* common.mak
* source/vm/Makefile
+ source/vm/vm.c
+ Added skeletons for CA-Cl*pper-like C-level VM API.
Types slightly modified for portability and to support
larger memory than C5x.
* include/hbclass.ch
* include/hbsetup.ch
- Removed HB_SHORTNAME last occurences. Harbour doesn't
have a 10 char symbol compatibility since some time, and
it didn't make too much sense anyway since long.
I wonder if HB_CLS_NO_DECORATION (in hbclass.ch) has
any point anymore?
* contrib/libnf/fttext.c
% Optimized _writeeol()
* contrib/libnf/readme.txt
! Old typos fixed.
* include/hbgtinfo.ch
* contrib/xhb/hbcompat.ch
! Some xhb specific MaxRow()/MaxCol() parameter
extension macros (also named GTI_*) moved to xhb contrib.
- bin/bld.cmd
- Removed obsolete version of bld.bat (aimed for OS/2).
OS/2 users should use bld.bat.
- bin/bld.sh
- Removed obsolete file. Linux/Unix users should use hb*.sh
scripts, which are properly working (as opposed to bld.sh).
* harbour-ce-spec
* harbour.spec
* doc/howtobld.txt
- Removed gharbour and harbour-link compatibility commands
(to lessen equivalent user choices and to have every harbour
related stuff to start with hb)
Pls use hbcmp and hblnk respectively.
* harbour/include/hbapicdp.h
* harbour/source/rtl/cdpapi.c
+ added hb_cdpGetChar()
+ harbour/tests/wcecon.prg
+ added demonstration console program for WinCE,
compile it using:
hbmk -n -w -es2 -gtwvt wcecon
* harbour/include/hbwince.h
* harbour/source/common/hbwince.c
* harbour/contrib/win32/w32_ole.c
* harbour/contrib/odbc/odbc.c
* use UNICODE macro instead of HB_WINCE to allow using Unicode
WINAPI also in other MS-Windows versions
* harbour/source/rtl/gtwvt/gtwvt.h
* harbour/source/rtl/gtwvt/gtwvt.c
+ added support for Unicode IO
* harbour/source/rtl/diskspac.c
* harbour/source/rtl/disksphb.c
! fixed wrongly set error code
! fixed possible access to uninitialized memory
* use GetDiskFreeSpaceEx() on WinCE instead of GetDiskFreeSpace()
for disk larger then 4GB - I do not know if PocketPC have such
large devices now or if WinCE can support it but for sure it will
somewhere in the future
* harbour/bin/hb-mkslib.sh
* harbour/bin/pack_src.sh
* updated for recent Viktor's modifications
* harbour/source/rtl/oemansix.c
! added missing #include "hbpai.h"
* harbour/include/Makefile
+ harbour/include/hbwince.h
* harbour/include/hbrdddbf.h
* harbour/include/hbrdddbt.h
* harbour/include/hbdefs.h
* harbour/include/hbsetup.h
* harbour/include/hbrddcdx.h
* harbour/include/hbrddfpt.h
* harbour/contrib/xhb/hboutdbg.c
* harbour/contrib/xhb/hbsyslog.c
* harbour/contrib/xhb/xhbfunc.c
* harbour/contrib/libct/ctnet.c
* harbour/contrib/libct/files.c
* harbour/contrib/libct/disk.c
* harbour/contrib/libnf/getenvrn.c
* harbour/contrib/win32/tprinter.c
* harbour/contrib/win32/w32_ole.c
* harbour/contrib/win32/w32_prn.c
* harbour/contrib/odbc/odbc.c
* harbour/source/pp/ppgen.c
* harbour/source/rtl/diskspac.c
* harbour/source/rtl/gtclip.c
* harbour/source/rtl/fstemp.c
* harbour/source/rtl/gtchrmap.c
* harbour/source/rtl/oemansi.c
* harbour/source/rtl/disksphb.c
* harbour/source/rtl/fssize.c
* harbour/source/rtl/hbffind.c
* harbour/source/rtl/filesys.c
* harbour/source/rtl/net.c
* harbour/source/rtl/gtgui/gtdef.c
* harbour/source/rtl/gtwvt/gtwvt.c
* harbour/source/rtl/gtpca/gtpca.c
* harbour/source/rtl/gtstd/gtstd.c
* harbour/source/rtl/gtwin/gtwin.c
* harbour/source/vm/Makefile
* harbour/source/vm/mainwin.c
* harbour/source/vm/dynlibhb.c
+ harbour/source/vm/mainwin/Makefile
* harbour/source/common/Makefile
* harbour/source/common/hbgete.c
* harbour/source/common/hbver.c
+ harbour/source/common/hbwince.c
* harbour/utils/hbpp/hbpp.c
* harbour/utils/hbdot/hbdot.prg
* harbour/utils/hbver/hbverfix.c
+ added support for WinCE and PocketPC
+ harbour/make_xcemgw.sh
+ harbour/config/w32/cemgw.cf
* harbour/bin/hb-mkslib.sh
* harbour/bin/hb-func.sh
* harbour/bin/postinst.sh
+ added support for CeGCC-MinGW32 port - those of you who want to
create applications for WinCE on PockePC with ARM processors on
Linux or MS-Windows can download from SF cegcc-mingw32ce port.
User using RPM based Linux distribution for x86 CPUs can simply
download cegcc-mingw32ce-0.50-1.i586.rpm and install it.
The hb* scripts created by ./make_xcemgw.sh [tgz|gnu] are
automatically updated to work with CeGCC-MinGW32 so later you
can simply crate WinCE-ARM binaries using them as for native port.
I'm waiting for users feedback. Please remember that I'm not Windows
user and even this port was created without any Pocket machine.
With Marek Paliwoda help I only tested that final applications are
working using PocketPC emulator.
* source/rtl/isprint.c
! Fixed ISPRINTER() on Win32 after last changes.
Thanks Guillermo, pls test now.
* source/rdd/dbcmd.c
! Marked as HB_EXTENSION: FIELDLEN(), FIELDDEC(), FIELDTYPE()
* include/hbextern.ch
* source/rdd/dbcmd.c
! Marked as HB_EXTENSION: DBDROP(), DBEXISTS(), RDDINFO()
(they were properly marked in hbextern.ch but not in source)
* include/hbextern.ch
* source/rtl/disksphb.c
* source/rtl/fssize.c
* source/rtl/fstemp.c
* source/rtl/inkey.c
* source/rtl/oemansi.c
* source/rtl/philes.c
* source/rtl/setcolor.c
* source/rtl/setfunc.prg
* source/rtl/setkey.c
* source/rtl/shadow.c
* source/rtl/trace.c
* source/rtl/valtostr.c
* source/vm/dynsym.c
+ Removed HB_EXTENSION from all the .prg level functions
prefixed with HB_.
(there was a mixed situation here, but there's no need
to mark any HB_ functions as extensions, as it's obvious
by their name. So as a rule, no HB_ prefixed function
should ever be marked as HB_EXTENSION anymore.)
! Fixed some inconsistencies in HB_EXTENSION between
hbextern.ch and actual sources.
* source/rtl/tgetlist.prg
* One HB_EXTENSION changed to !HB_C52_STRICT because it
was guarding a bugfix rather than a real extension.
* source/rtl/gui.prg
* _GetNumCol() is now always strictly compatible.
NOTE added about sloppy C5.3 behaviour.
* source/rtl/inkey.c
* contrib/xhb/xhb.ch
* contrib/xhb/xhbfunc.c
! __KEYBOARD() xhb hidden parameter extension moved to
xhb lib. For similar functionality inside Harbour
pls use HB_KEYPUT(). __KEYBOARD is now 100% C5.x
compatible.
* source/rtl/setfunc.prg
* __SetFunction() extension now uses HB_KEYPUT() instead
of __KEYBOARD() extended parameters.
* source/compiler/hbfunchk.c
* source/rtl/at.c
! AT() extra parameters handled when HB_EXTENSION is on
(was !HB_C52_STRICT). (The first extra parameter is
XPP and Flagship compatible. The three parameter version
of this function is called AT3() in CAVO.)
! TRIM()/RTRIM() extra parameters handled on compiler level
when HB_EXTENSION is on (default).
! FILE() parameter check turned off in compiler.
(to be C5.x compatible)
* source/rtl/alert.prg
! ALERT() Harbour extended parameter (1st parameter type)
is now guarded with HB_EXTENSION instead of HB_C52_STRICT.
* source/rtl/gete.c
! GETE[NV]() Harbour extended parameter guarded with HB_EXTENSION.
* source/vm/proc.c
! PROCFILE() Harbour extended parameter guarded with HB_EXTENSION.
* source/rtl/mlcfunc.c
! Harbour extended parameters for MEMOLINE()/MLCOUNT()/
MLPOS()/MLCTOPOS()/MPOSTOLC() are now guarded with HB_EXTENSION
(instead of HB_C52_STRICT). It seems to be possible to
specify custom EOLs for all these functions. (Maybe simple
automatic Unix/Win EOL style handling would be better here)
* source/vm/memvars.c
! Guarded Harbour extension in __MVRESTORE() with HB_EXTENSION.
; After this cleanup:
- HB_EXTENSION is marking extra features living inside existing C5.x
functions or classes, or Harbour extension functions
not complying with the HB_ prefix rule (we have six
such functions in RDD). If there are more extended
parameters in Harbour pls mark them with HB_EXTENSION
too.
- HB_C52_STRICT is guarding bugfixes compared to C5.x.
- No HB_ functions are guarded with HB_EXTENSION anymore.
- We'd pbly need to review each HB_EXTENSIONs to check whether they
are safe or not.
- A list of HB_EXTENSIONs:
- MLCOUNT()
MEMOLINE()
MLPOS()
MLCPOS()
MPOSTOLC() - 5th and up can specify custom EOLs.
- ALERT() - 1st parameter type can be any type in Harbour, char only in C5.x
- SET FUNCTION TO
__SETFUNCTION - 2nd parameter can be numeric or array of numeric in Harbour.
- SETKEY() - 3rd codeblock parameter ("isactive" block)
- SAVESCREEN() - 5th parameter: lNoCheck (?)
RESTSCREEN() - 6th parameter: lNoCheck (?)
- AT() - 3rd and 4th parameters to set search range. 3rd parameter is
also supported by XPP and FS. Results in compiler error in C5.x.
(CAVO uses AT2() and AT3() for extended versions.)
- TRIM()
RTRIM() - 2nd parameter is an extension regarding space trimming mode.
Results in compiler error in C5.x.
- ALLTRIM() - 2nd parameter is an extension regarding space trimming mode.
- GETE()
GETENV() - 2nd parameter specifies a default value. Can be found in HB_GETENV().
- PROCFILE() - 1st parameter is a Harbour extension. Undocumented function in C5.x.
The extension looks similar to the one found in Flagship.
- __MVRESTORE() - 3rd/4th parameters are Harbour extensions to set variable name
mask. Redirected from the internal 5.x function named __MRESTORE().
- DB*() - cRDD, nConnection, cCodePage extra parameters in many DB*() functions.
TOFIX: None of them is marked as HB_EXTENSION.
- SET()s - These are not marked as HB_EXTENSION.
- ? - Is there anything else?
* include/hbextern.ch
* source/rtl/gete.c
+ Added HB_GETENV(). There you have a 2nd parameter
which will be returned in case the requested
envvar doesn't exist. This extensions is still present
in GETE[NV](), but we'd better remove it.
* include/hbextern.ch
* source/rtl/isprint.c
+ Added HB_ISPRINTER() with support for extra parameter
printer port name. This parameter also currently has
support for Win32 printers. Win32 printer name support
was removed from ISPRINTER() to keep compatibility.
ISPRINTER() extra parameter is enabled with HB_COMPAT_XPP
(which is the default).
* source/rtl/tbcolumn.prg
! Strict C5.2e compatible behaviour made the default.
* source/rtl/inkey.c
+ Added handling of arrays of numbers in HB_KEYPUT().
(this was copied from __KEYBOARD()'s extended section)
+ Added handling of string parameter in HB_KEYPUT().
(this way we don't really need the hidden extensions
in __KEYBOARD() anymore. Also notice that __KEYBOARD()
doesn't clear the keyboard buffer when numeric or
array is passed, which is not consistent with the
Clipper compatible behaviour when strings are passed.)
* common.mak
* include/hbcompdf.h
* source/compiler/hbmain.c
* source/compiler/cmdcheck.c
* source/compiler/hbcomp.c
* source/compiler/harbour.l
* source/compiler/Makefile
* source/compiler/ppcomp.c
* source/compiler/hbusage.c
- source/compiler/genjava.c
- source/compiler/gencli.c
- Removed two non-working (experimental) output types:
Java, CLI
! Prefixed LANG_* enums with HB_
* 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
* 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%
* 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
* 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.
* 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
* harbour/include/hbcomp.h
* pass compile time -ks state to RT macro compiler flags.
It means that if you compile some with which ¯os
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
* 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
* 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
* 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
* 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.
* 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.
* 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.
* 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.
* harbour/include/hbextern.ch
+ harbour/contrib/xhb/xhbextrn.ch
* harbour/contrib/xhb/Makefile
* moved xHarbour compatible functions from hbextern.ch to xhbextrn.ch
* harbour/include/hbclass.ch
+ added new commands for scalar classes:
ASSOCIATE CLASS <ClassName> WITH TYPE
ARRAY|BLOCK|CHARACTER|DATE|HASH|LOGICAL|NIL|
NUMERIC|POINTER|SYMBOL
ENABLE CLASS TYPE ALL
ENABLE TYPE CLASS ARRAY|BLOCK|CHARACTER|DATE|HASH|LOGICAL|NIL|
NUMERIC|POINTER|SYMBOL
Please remeber that:
ENABLE CLASS TYPE ALL
and:
ENABLE TYPE CLASS ...
can be used in any place of code - this commands are translated to
REQUEST HB<TYPENAME>
so are not executed
* harbour/source/vm/classes.c
+ added __clsAssocType( <hClass>, <cType> ) => <lOK>
* harbour/common.mak
* harbour/source/rtl/tscalar.prg
* harbour/source/rtl/Makefile
+ harbour/source/rtl/tscalars.c
+ harbour/source/rtl/tscalard.c
+ harbour/source/rtl/tscalarh.c
+ harbour/source/rtl/tscalarl.c
+ harbour/source/rtl/tscalarp.c
+ harbour/source/rtl/tscalara.c
+ harbour/source/rtl/tscalaru.c
+ harbour/source/rtl/tscalarb.c
+ harbour/source/rtl/tscalarn.c
+ harbour/source/rtl/tscalarc.c
+ added scalar classes for basic types,
Now it's possible to define messages also for basic item types.
It's even possible to overload some not defined in HVM operators,
f.e. in this example we overload operator "+" so it makes
AADD( <aValue>, <xValue> )
for code like <aValue> + <xValue>:
#include "hbclass.ch"
PROC MAIN()
LOCAL a:={}
ASSOCIATE CLASS MyArray WITH TYPE ARRAY
a := a + "elem1"
a += "elem2"
a := a + "elem3"
a += "elem4"
? a:asString, a:isScalar
AEVAL(a,{|x,i|QOUT(i,x)})
RETURN
CREATE CLASS MyArray INHERIT __HBArray
OPERATOR "+" ARG xValue INLINE AADD( Self, xValue ), Self
ENDCLASS
Operators which have default actions for given types defined in HVM
cannot be overloaded.
* harbour/include/hbapicls.h
* harbour/source/vm/hvm.c
+ added hb_clsDoInit() function to initialize classy .prg functions
* harbour/source/compiler/complex.c
* allow to use NIL as class name
* harbour/source/compiler/harbour.yyc
* harbour/source/compiler/harbour.y
* harbour/source/compiler/harbour.yyh
% optimize automatically var[0] declaration and generate the same
PCODE as for var:={}
* harbour/source/rtl/tscalar.prg
+ added HASH, POINTER and SYMBOL scalar classes
* changed NIL class to not use any instance variables
* harbour/source/vm/classes.c
+ added support for scalar classes. Now at startup classy code looks
for hb<TYPENAME> functions and try to execute them to register
scalar classes. It's Class(y) compatible behavior and only the prefix
of scalar ceases class function is different: 'CSY' in class(y) and
'HB' in Harbour, f.e.: hbNumeric()
If you prefer xHarbour like not automatic scalar class registration
with some PP commands:
ASSOCIATE CLASS <ClassName> WITH TYPE
ARRAY|BLOCK|CHARACTER|DATE|HASH|LOGICAL|NIL|
NUMERIC|POINTER|SYMBOL
ENABLE CLASS TYPE ALL
ENABLE TYPE CLASS ARRAY|BLOCK|CHARACTER|DATE|HASH|LOGICAL|NIL|
NUMERIC|POINTER|SYMBOL
EXTEND [TYPE] ARRAY|BLOCK|CHARACTER|DATE|HASH|LOGICAL|NIL|
NUMERIC|POINTER|SYMBOL WITH METHOD <SomeFunc>
Then I can replace current code with it. If not then we should
divide scalar cases definitions into separated files to allow
easier overloading. I'm interesting in your opinions.
* common.mak
+ source/rtl/tbrowsys.prg
* source/rtl/Makefile
* source/rtl/getsys.prg
* source/rtl/tbrowse.prg
+ Added new file for C5.3 TB*() functions.
Most of them is dummy, a few of them were moved
here from existing files.
* include/hbextern.ch
+ Added rest of C5.3 TB*() functions.
* source/rtl/teditor.prg
! Fixed new scope violations reported by Guillermo.
* source/rtl/tbrowse.prg
+ :border implemented (to be tested).
! :setColumn() return value fixed, NOTE added.
! Non-character :picture handled properly.
(to be tested for full compatibility)
% Some optimizations.
- :TApplyKey() removed (it is not a C5.3 method)
; Some source cleanup and other changes.
; Work in progress.
* include/hbextern.ch
* common.mak
* source/rtl/Makefile
+ source/rtl/tscalar.prg
- source/rtl/array.prg
- source/rtl/block.prg
- source/rtl/characte.prg
- source/rtl/date.prg
- source/rtl/logical.prg
- source/rtl/nil.prg
- source/rtl/numeric.prg
- source/rtl/scalar.prg
+ Consolidated scalar classes to one file.
+ Minor optimizations and cleanup done on files.
+ Class function names now consistently HB*()
(was non-Class(y) compatible and a mixed list
of plain unprefixed class names and class names
prefixed with an underscore). Notice however that
Class(y) has only CsyArray() defined in its own
library, the rest was seemingly made only
available as additional source code.
! Fixed NIL class to be named NIL (was _NIL).
% Some unneeded MESSAGE redirections removed.
% LOCAL var[0] -> LOCAL var := {}. This results
in better pcode.
+ Added all these symbols to hbextern.ch
* source/rtl/symbol.prg
* Some cleanup.
; I believe this should be named HBSymbol() and
added to hbextern.ch
* harbour/include/hbapi.h
+ HB_ISFIRSTIDCHAR() and HB_ISNEXTIDCHAR() macros
* harbour/source/rdd/wafunc.c
* changed FIELD->, _FIELD->, <alias>-> stripping from expressions
to respect shortcuts
* harbour/source/compiler/hbmain.c
* harbour/source/compiler/hbdead.c
* harbour/source/compiler/hbopt.c
* jump joining optimization changed to work also for code with line
numbers
* harbour/include/Makefile
+ harbour/include/hbsxdef.ch
* harbour/include/dbinfo.ch
* harbour/include/hbrdddbf.h
* harbour/include/hbrddcdx.h
* harbour/include/hbrddntx.h
* harbour/contrib/bmdbfcdx/hbrddbmcdx.h
* harbour/source/rdd/dbf1.c
* harbour/source/rdd/workarea.c
+ added SIx3 compatible triggers support
They should work like in SIx3 with some intentional excpetions:
1) if 4-th parameter exists (PREUSE/GET/PUT) then it's passed by
reference otherwise is not passed at all and PCOUNT() in trigger
functions returns 3
SIx3 do not pass 4-th parameter by reference and if it not
exist then passes 0
2) EVENT_POSTCLOSE is executed after SUPER_CLOSE()
SIx3 executes EVENT_POSTCLOSE just before SUPER_CLOSE()
3) EVENT_UPDATE is executed _ALWAYS_ when DBF is updated also
when WA does not have open indexes
SIx3 executes EVENT_UPDATE only when at least one index is
open without checking if it's updated or not
4) EVENT_POSTUSE is executed from OPEN() method in "DBF" RDD not
from index RDDs so before the indexes are open
SIx3 executes EVENT_POSTUSE after opening indexes
It's possible that I'll change this condition in the future
* harbour/include/hbrdddbf.h
* harbour/source/rdd/dbf1.c
+ added two new members to DBFAREA structure: fModStamp and fTrigger
* harbour/include/hbrddntx.h
* harbour/include/hbrddcdx.h
* harbour/contrib/bmdbfcdx/hbrddbmcdx.h
* updated for DBFAREA structure modifications
* harbour/contrib/libct/ctnet.c
* use hb_stricmp() instead of stricmp()
* harbour/include/hbrddcdx.h
* harbour/source/rdd/dbfcdx/dbfcdx1.c
* updated for DBFAREA structure modifications
+ added some very basic support for order temperature flags
* harbour/include/std.ch
* cover ENDSEQUENCE translation with HB_C52_STRICT macro
+ added translations for END SWITCH, END WITH, END OBJECT
* harbour/source/compiler/complex.c
* harbour/source/compiler/harbour.y
* harbour/source/compiler/harbour.yyc
* harbour/source/compiler/harbour.yyh
+ added support for ENDSEQ[UENCE], ENDSW[ITCH] and ENDW[ITH]
* harbour/source/rtl/hbgtcore.c
! changed string to color number translation to be fully Clipper
compatible. Now I do not know any examples which we translate
differently - if someone will find any them then please inform me.
The only one intentional difference between Harbour and Clipper
is in color number to string translation and background highlighting
attribute "*", Clipper put it just before "/" as part of foreground
color (f.e.: 248 => "N*+/W") but Harbour as part background color
(f.e.: 248 => "N+/W*") - Clipper compatible behavior is enabled when
Harbour is compiled with HB_C52_STRICT macro
* harbour/utils/hbtest/rt_misc.prg
* control the position of background highlighting attribute (*) in
expected results depending on HB_C52_STRICT. Harbour passes correctly
all included color translation tests.
* include/hbcompat.ch
* include/hbextern.ch
* source/rtl/hbini.prg
+ .ini functions added to hbextern.ch.
* .ini functions renamed so that all of them reside
in the hb_ini*() namespace. xhb compatibility translates
added.
* source/debug/debugger.prg
* Formatting.
* source/rtl/memoedit.prg
% Minor optimization.
* source/rtl/teditor.prg
! Fixed to not ask for confirmation when pressing
<Esc> on an unedited buffer.
* harbour/include/hbset.h
* declare hb_set with HB_EXPORT attribute when HB_SET_IMPORT macro
is not set - it's temporry modification and it will be removed when
we will have real hb_setGet*() and hb_setPut*() functions.
* harbour/include/hbdefs.h
+ added HB_IMPORT macro
* harbour/include/hbset.h
* declare hb_set with HB_IMPORT attribute when HB_SET_IMPORT macro is set
+ added macros to retrieve information from hb_set structure:
hb_setGetCPtr(), hb_setGetNI(), hb_setGetNL(), hb_setGetL()
In the future these macros will be replaced by functions and
direct access to hb_set structure from non core code will be
forbidden so please update your code and and replace all
hb_set.HB_SET_*
with
hb_setGet*( HB_SET_* )
f.e. replace:
hb_set.HB_SET_SOFTSEEK
with:
hb_setGetL( HB_SET_SOFTSEEK )
I'll also add hb_setPut*() functions to assign some set values.
Both hb_setGet*() and hb_setPut*() functions will validate parameters
and in future MT mode will operate on global or thread local structures.
* harbour/contrib/rdd_ads/ads1.c
* define HB_SET_IMPORT before #include "hbset.h"
* use hb_setGet*() to access SET values
* harbour/include/dbinfo.ch
* harbour/source/rdd/workarea.c
* renamed RDDI_TRIGGERS to RDDI_TRIGGER
+ added RDDI_PENDINGTRIGGER, RDDI_PENDINGPASSWORD,
DBI_TRIGGER, DBI_OPENINFO
* do not generate RT error in WA default ORDERINFO() method
* harbour/common.mak
* harbour/source/rtl/Makefile
+ harbour/source/rtl/hbini.prg
+ added HB_ReadIni()/HB_WriteIni() - code by Giancarlo Niccolai
borowed from xHarbour with some minor fixes
* include/setcurs.ch
* include/hbapigt.h
* SC_UNDEF moved to .prg level.
! SC_* defs not duplicated on C level.
* include/hbcompat.ch
+ Added debugger class compatibility translations.
* source/rtl/tmenusys.prg
* source/rtl/menusys.prg
* Formatting.
* source/rtl/teditor.prg
* source/debug/debugger.prg
+ Added :RowPow(), :ColPos(), :IsWordWrap(), :WordWrapCol()
! Changed debugger to use the above methods instead of direct
instance var access.
* source/rtl/tbcolumn.prg
* source/rtl/tget.prg
* source/rtl/tbrowse.prg
! Public class initializator names hidden when in strict
(and non-XPP) mode.
* source/rtl/tbrowse.prg
+ Some work in progress towards better C5.x compatibility
(borrowed from xhb)
* source/rtl/getsys.prg
* source/rtl/tgetlist.prg
+ (Better) C5.3 message line support, several 5.3 fixes,
some of them borrowed from xhb.
* include/hbcompat.ch
* source/debug/dbgtobj.prg
* source/debug/dbgbrwsr.prg
* source/debug/dbgtwin.prg
* source/debug/dbgmenu.prg
* source/debug/dbgthsh.prg
* source/debug/tbrwtext.prg
* source/debug/dbgwa.prg
* source/debug/debugger.prg
* source/debug/dbghelp.prg
* source/debug/dbgtarr.prg
* source/debug/dbgtmenu.prg
* source/debug/dbgtmitm.prg
! Class names named to be in the Harbour namespace.
xhb compatibility translations added to hbcompat.ch
! Unneeded BEGINDUMP and .h inclusions removed.
! Added :End() to HBBrwText to avoid using some
internals vars of the class.
! Fixed problem with HBDebugger:SaveAppScreen()
where it crashed due to wrong initialization
of TBrowse() screen coordinates. Bug appeared
due to the now more compatible TBrowse() behaviour.
% Optimizations and cleanups.
% Unused vars/functions removed.
* Formatting (except large parts of debugger.prg and
those files which were okey).
; Majority of formatting, optimization and code cleanup
work is still left to do.
Please test as much as you can.
* harbour/include/dbinfo.ch
* updated comment
* harbour/contrib/rdd_ads/ads1.c
* replaced hb_itemGetPtr(hb_param(n,HB_IT_POINTER)) with hb_parptr(1)
* harbour/contrib/hbzlib/hbcomprs.c
* changed variable name: PHB_FNAME fDirSpec to PHB_FNAME pDirSpec
* harbour/source/rdd/dbcmd.c
! fixed parameter checking in OrdNumber() to generate Clipper compatible
RT error
* code cleanup
* harbour/source/rdd/dbfntx/dbfntx1.c
* harbour/source/rdd/dbfcdx/dbfcdx1.c
* do not evaluate KEY expresion in custom indexes in KEYDEL operation.
It may interact with MULTIKEY/TEMPLATE indexes.
* updated default order in DBOI_BAGNUMBER and DBOI_BAGORDER