* harbour/utils/hbtest/rt_misc.prg
* harbour/utils/hbtest/make_c5x.bat
+ added alternative results for oGet:colorspec compatible with CL53
when HB_COMPAT_C53 macro is set
* 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.
* source/rtl/hbgtcore.c
! Fixed handling of some strangely formatted colorstrings
mainly inside TGet(). The low-level functionality
modified is the colorstring to number conversion. The
only change is to continue (and not exit) on a non-std
char.
* utils/hbtest/rt_misc.prg
+ Added some color string parsing tests. Some of them fail.
* source/rtl/achoice.prg
* source/debug/debugger.prg
* utils/hbtest/hbtest.prg
* utils/hbtest/rt_array.prg
* Formatting.
* harbour/utils/hbdot/hbdot.prg
* some minor modifications for GT drivers which allow to change
the size of console window
* changed the order of requested GTs for CYGWIN builds
* harbour/source/rtl/gttrm/gttrm.c
* enable automatic LF->CR+LF translation on TTY device
* harbour/utils/hbdot/hbdot.prg
* do not clear screen when hbdot executed with -h or --help switch
* harbour/utils/hbtest/hbtest.prg
* use stdout(<cMsg>) instead of fwrite(1,<cMsg>) - now GT driver
can catch and redirect output if necessary
* harbour/source/rtl/gttrm/gttrm.c
* set cursor position at beginning of new line on application exit
* harbour/include/hbextern.ch
+ added missing functions (CDPs, LANGs, HSX, ...)
* harbour/utils/hbdot/Makefile
* harbour/utils/hbrun/Makefile
+ added codepage library
* harbour/include/hbpp.h
* harbour/include/hbcomp.h
* harbour/include/hbcompdf.h
* harbour/source/pp/ppcore.c
* harbour/source/rtl/gttrm/gttrm.c
* harbour/source/main/harbour.c
* harbour/source/compiler/hbmain.c
* harbour/source/compiler/cmdcheck.c
* harbour/source/compiler/hbcomp.c
* harbour/source/compiler/hbcmplib.c
* harbour/source/compiler/ppcomp.c
* added 'const' to some 'char *' declarations
+ added hb_pp_inBuffer()
+ extended hb_compMain() to accept source code passed as ASCIIZ
string
+ .prg function HB_COMPILEFROMBUF()
+ added support for -q2 compiler switch - it disables _ALL_ stdout/stderr
messages
* harbour/utils/Makefile
+ harbour/utils/hbdot
+ harbour/utils/hbdot/hbdot.prg
+ harbour/utils/hbdot/Makefile
+ added hbdot utility program.
It's a "DOt Prompt" Console for the Harbour Language
Syntax: hbdot [<hrbfile[.prg]> [<parameters,...>]]
It should look and work in similar way to pp/xBaseScript
by Ron Pinkas but unlike xBaseScript is does not have preprocessor
or simulated runtime environment but simply uses Harbour pp and
compiler libraries to preprocess and compile commands. It means
that it supports all language constructions also statements, f.e.:
"for i:=1 to 10; ? i; next"
Additionally it can also compile and execute .prg files given as
first parameter just like hbrun.
Please test it. If it will work as expected then we can remove
'pp' (contrib/dot) from standard packages
* harbour/harbour.spec
! added workaround for undefined Epoch tag
* harbour/source/rtl/Makefile
* harbour/common.mak
- harbour/source/rtl/terror.prg
- removed .prg level ERROR class
* harbour/include/hbapierr.h
* harbour/source/rtl/errorapi.c
+ added ERROR class supported at .c level and updated all necessary
functions to work without PCODE execution - it should allow to
create and update ERROR object when HVM has active exceptions
* harbour/utils/hbtest/rt_hvma.prg
* harbour/utils/hbtest/rt_misc.prg
* harbour/utils/hbtest/rt_array.prg
* update HBTEST for new ERROR object structure
* harbour/common.mak
* harbour/makefile.vc
* added some missing declaration for PCRE library
* harbour/include/hbregex.h
* added PCRE_STATIC - it fixes problem with MinGW build
* harbour/utils/hbrun/Makefile
* removed one redundant hbpcre from library list
* harbour/common.mak
* harbour/makefile.bc
* harbour/makefile.vc
* harbour/bin/hb-func.sh
* harbour/config/bsd/gcc.cf
* harbour/config/darwin/gcc.cf
* harbour/config/hpux/gcc.cf
* harbour/config/linux/gcc.cf
* harbour/config/sunos/gcc.cf
* harbour/source/Makefile
+ harbour/source/hbpcre/ChangeLog
+ harbour/source/hbpcre/Makefile
+ harbour/source/hbpcre/chartabs.c
+ harbour/source/hbpcre/config.h
+ harbour/source/hbpcre/dftables.c
+ harbour/source/hbpcre/pcre.h
+ harbour/source/hbpcre/pcrecomp.c
+ harbour/source/hbpcre/pcreconf.c
+ harbour/source/hbpcre/pcredfa.c
+ harbour/source/hbpcre/pcreexec.c
+ harbour/source/hbpcre/pcrefind.c
+ harbour/source/hbpcre/pcrefinf.c
+ harbour/source/hbpcre/pcreget.c
+ harbour/source/hbpcre/pcreglob.c
+ harbour/source/hbpcre/pcreinal.h
+ harbour/source/hbpcre/pcreinfo.c
+ harbour/source/hbpcre/pcremktb.c
+ harbour/source/hbpcre/pcreoutf.c
+ harbour/source/hbpcre/pcreprni.c
+ harbour/source/hbpcre/pcrerefc.c
+ harbour/source/hbpcre/pcrestud.c
+ harbour/source/hbpcre/pcretabs.c
+ harbour/source/hbpcre/pcretryf.c
+ harbour/source/hbpcre/pcrever.c
+ harbour/source/hbpcre/pcrevutf.c
+ harbour/source/hbpcre/pcrexcls.c
+ harbour/source/hbpcre/ucp.h
+ harbour/source/hbpcre/ucpinter.h
+ harbour/source/hbpcre/ucptable.c
+ added HBPCRE library - based on older xHarbour 6.3 version
filenames changed to 8.3 DOS format
* harbour/include/hbregex.h
* harbour/source/rtl/Makefile
* harbour/source/rtl/hbregex.c
+ harbour/source/rtl/hbregexc.c
* divided harbour regular expression functions into two files
Now regular expression low level library is not linked with
application until user will not use or REQUEST for one of HB_REGEX*
functions. It also means that also DBOI_SKIPREGEX will not work when
regex module is not linked.
+ added support for build-in regular expression library
+ added ulLen parameter to hb_regexMatch() to support strings with
embedded 0
* harbour/contrib/bmdbfcdx/bmdbfcdx1.c
* harbour/source/rdd/dbfcdx/dbfcdx1.c
* harbour/source/rdd/dbfntx/dbfntx1.c
* harbour/source/rtl/strmatch.c
* use new hb_regexMatch() format
* harbour/utils/hbrun/Makefile
+ added hbpcre to linked library list
* harbour/TODO
* removed some not longer necessary TODO/TOFIX
* harbour/common.mak
* harbour/source/rtl/Makefile
- harbour/source/rtl/memoline.c
- harbour/source/rtl/mlcount.c
- harbour/source/rtl/mlctopos.c
- harbour/source/rtl/mlpos.c
- harbour/source/rtl/mpostolc.c
+ harbour/source/rtl/mlcfunc.c
* new version of memo line functions:
MEMOLINE(), MLCOUNT(), MLPOS(), MLCTOPOS(), MPOSTOLC()
* harbour/include/hbexpra.c
! fixed in HB_COMPAT_XHB build hb_enumIndex() used inside internal
FOR/NEXT loop
* harbour/include/hbpp.h
* harbour/source/pp/ppcore.c
! removed some not longer necessary hack
% added some speed optimizations - it's not done in the way I want to
have in the final version but with some very small modifications it
should make people using a lot of #[x]translate (Enrico ;-)) happy.
* harbour/source/rtl/set.c
* minor cleanup in HB_SET_EOL initialization
* harbour/source/vm/hvm.c
* clean MEMO flag in array and hash items created by { MEMOFILED, ... }
or { "KEY" => MEMOFILED, ... } and optimized results of PLUS operation
* harbour/utils/hbtest/rt_misc.prg
* SET EOL to CHR(13) + CHR( 10 ) before MLCTOPOS() tests to avoid false
alarm on platforms with differ default EOL
* harbour/contrib/gd/gdwrp.c
* harbour/contrib/libmisc/hb_f.c
* harbour/contrib/samples/dbf.c
* harbour/contrib/samples/time.c
* harbour/doc/es/hb_apiln.txt
* harbour/include/hbapicdp.h
* harbour/include/hbapilng.h
* harbour/source/rdd/dbcmd.c
* harbour/source/rdd/dbnubs.c
* harbour/source/rdd/hsx/cftsfunc.c
* harbour/source/rtl/accept.c
* harbour/source/rtl/defpath.c
* harbour/source/rtl/oemansi.c
* harbour/source/rtl/pad.c
* harbour/source/rtl/shadow.c
* harbour/source/rtl/trim.c
* harbour/source/vm/debug.c
* changed HB_FUNCNAME( <name> )() to HB_FUNC_EXEC( <name> )
* harbour/utils/hbrun/Makefile
* changed order of linked libraries
* harbour/source/rtl/empty.c
* changed EMPTY( <symboItem> ) - not it returns .T. when <symboItem>
is not a function symbol
* harbour/source/rtl/errorapi.c
% replaced all hb_dynsym{Find,Get}*() by static variables initialized
at HVM startup variables - it reduce the cost of creating and
initializing error object about 50%
* harbour/include/hbapifs.h
* harbour/source/rtl/fssize.c
* harbour/source/rtl/filesys.c
* harbour/source/rtl/hbffind.c
* changed to use 64bit file API
+ harbour/contrib/libct/ctextern.ch
+ added list with EXTERN requests for our CT3 function. List generated
automatically from final binary CT lib created on Linux.
* harbour/include/hbpp.h
* harbour/include/hbcomp.h
* harbour/source/compiler/hbgenerr.c
* harbour/source/compiler/ppcomp.c
* harbour/source/pp/ppcore.c
* harbour/source/pp/pplib.c
* harbour/utils/hbpp/hbpp.c
* harbour/utils/hbpp/hbppcore.c
* harbour/utils/hbpp/hbppdef.h
* changed error and warning messages to const char *
* harbour/source/compiler/genhrb.c
* rewritten to work on memory buffers and with new compiler code
* harbour/include/hbcomp.h
* harbour/include/hbcompdf.h
* harbour/source/compiler/hbmain.c
* harbour/source/main/harbour.c
+ added LANG_PORT_OBJ_BUF which allow to generate .hrb files into
memory buffers
* harbour/source/compiler/hbcmplib.c
+ added HB_COMPILEBUF() functions which returns compiled .hrb file
as string item
* harbour/source/vm/runner.c
+ added support for executing compiled .hrb files stored in string
items in __HRBRUN() function - it works just like in __HRBLOAD()
* harbour/harbour.spec
* harbour/utils/hbrun/hbrun.prg
+ added default include directories to hbrun
* use HB_COMPILEBUF() instead of HB_COMPILE() to eliminate temporary
files
* harbour/source/compiler/harbour.y
* harbour/source/compiler/harbour.yyc
! fixed some possible false warning messages
* harbour/include/hboo.ch
* harbour/source/vm/classes.c
+ added support for HB_OO_MSG_PROPERTY and HB_OO_MSG_CLASSPROPERTY
to make some xHarbour users happy ;-)
* harbour/common.mak
* harbour/harbour.spec
* harbour/include/hbcompdf.h
* harbour/source/compiler/Makefile
+ harbour/source/compiler/hbcmplib.c
+ added HB_COMPILE() function - it accepts exactly the same parameters
as harbour compiler and makes the same job :-)
* harbour/utils/hbrun/Makefile
* harbour/utils/hbrun/hbrun.prg
+ added support for compilation and direct execution of .prg files
Now hbrun can accept as first parameter .hrb or .prg file and if
it's .prg file it's compiled and then executed just like .hrb one.
In *nixes if you copy compiled hbrun to /usr/bin directory then
you can add to your .prg files as first line:
#!/usr/bin/hbrun
and then after setting executable attribute you can directly
execute them, f.e.:
./test.prg
If you are using Linux then you can also chose default gt driver
by dding to above line: //gt<name>
F.e.
#!/usr/bin/hbrun //gtstd
* harbour/include/hbcomp.h
* harbour/include/hbexpra.c
* harbour/include/hbexprb.c
* harbour/include/hbexprc.c
* harbour/include/hbmacro.h
* harbour/include/hbpcode.h
* harbour/include/hbxvm.h
* harbour/source/common/hbdate.c
* harbour/source/compiler/genc.c
* harbour/source/compiler/gencc.c
* harbour/source/compiler/harbour.c
* harbour/source/compiler/harbour.y
* harbour/source/compiler/harbour.yyc
* harbour/source/compiler/hbdead.c
* harbour/source/compiler/hbfix.c
* harbour/source/compiler/hblbl.c
* harbour/source/compiler/hbopt.c
* harbour/source/compiler/hbpcode.c
* harbour/source/compiler/hbstripl.c
* harbour/source/rtl/abs.c
* harbour/source/rtl/at.c
* harbour/source/rtl/chrasc.c
* harbour/source/rtl/datec.c
* harbour/source/rtl/dateshb.c
* harbour/source/rtl/diskspac.c
* harbour/source/rtl/disksphb.c
* harbour/source/rtl/gtfunc.c
* harbour/source/rtl/left.c
* harbour/source/rtl/len.c
* harbour/source/rtl/math.c
* harbour/source/rtl/minmax.c
* harbour/source/rtl/mod.c
* harbour/source/rtl/philes.c
* harbour/source/rtl/philesx.c
* harbour/source/rtl/replic.c
* harbour/source/rtl/round.c
* harbour/source/rtl/set.c
* harbour/source/rtl/space.c
* harbour/source/rtl/strcase.c
* harbour/source/rtl/strpeek.c
* harbour/source/rtl/transfrm.c
* harbour/source/rtl/trim.c
* harbour/source/rtl/type.c
* harbour/source/rtl/val.c
* harbour/source/rtl/word.c
* harbour/source/vm/hvm.c
* harbour/source/vm/macro.c
* added some PCODEs to cover all possible combination of ++, --, <op>=
operations in the same way and keep Clipper compatible RT errors.
* added some other PCODEs to optimize some commonly used expressions/
statements
* use HB_ERR_ARGS_BASEPARAMS instead of hb_paramError()
* some other cleanups and minor optimizations
* harbour/utils/hbtest/rt_math.prg
* update expected result for MOD() - it was not Clipper compatible and
it will be hard to make it compatible without introducing some Clipper's
side effects
* harbour/contrib/libct/ctc.c
* harbour/contrib/libct/files.c
* harbour/contrib/libnf/ftattr.c
* harbour/contrib/libnf/n2color.c
* cleaned some BCC warnings
* harbour/include/hbapi.h
* harbour/include/hbexpra.c
* harbour/include/hbexprb.c
* harbour/include/hbsetup.ch
* harbour/source/common/expropt1.c
* harbour/source/common/expropt2.c
* harbour/source/common/hbver.c
* harbour/source/common/hbverdsp.c
* harbour/source/compiler/hbcomp.c
* harbour/source/vm/arrays.c
* harbour/source/vm/arrayshb.c
* harbour/source/vm/cmdarg.c
* harbour/source/vm/hvm.c
! fixed Harbour support for accessing string characters with array
index operators []
+ added support for #define HB_COMPAT_XHB - it's disabled by default.
When set it enables some of xHarbour features like negative array
indexes calculated from tail, accessing string characters with []
operators (warning it's not compatible with default Harbour version
enabled by -ks during compilation and //flags:s at runtime - in
xHarbour compatibility mode "ABC"[2] returns "B" when in Harbour 66)
and some other minor features.
* harbour/source/compiler/cmdcheck.c
* added support for optional setting C output type in -go switch
Now it accepts optional digit [0123] after -go in the same way
as -gc, f.e.: -go3
* harbour/source/compiler/harbour.c
* call hb_compExprLstDealloc() only when errors appeared during
compilation - it disable automatic freeing all allocated expressions
in clean compilation. I make it intentionally for easier detecting
problems one some expressions are not freed. So far the final cleanup
code always deallocated expressions what can hide some real bugs.
* harbour/source/vm/hvm.c
! fixed very serious bug in HVM closing. The s_uiActionRequest flag
was not cleared before hb_rddShutDown() so when RDD buffers were
hot and flushing required some PCODE evaluation (f.e. index KEY
or FOR expression) then they were not properly evaluated.
* harbour/source/vm/macro.c
* minor improvement
* harbour/utils/hbtest/rt_misc.prg
! fixed one of expected result, it was neither Harbour nor Clipper
result (I've just made some test with Clipper), I do not know why
it existed
* harbour/config/w32/bcc32.cf
* cleanup
+ harbour/config/w32/xcc.cf
+ added XCC support
* harbour/contrib/btree/hb_btree.c
* use hb_vmAtInit()/hb_vmAtExit() instead of INIT/EXIT functions defined
from C code
* harbour/contrib/libct/tab.c
* casting
* harbour/contrib/odbc/odbc.c
! removed #include <malloc.h> - it should not be used with new C
compilers
I think that we should replace this library with hbodbc from xHarbour.
* harbour/contrib/ole/ole2.c
* updated for XCC
* harbour/include/hbdefs.h
* include stdint.h if available
* harbour/source/compiler/complex.c
! fixed yet another stupid mistake in WITHOBJECT token
* harbour/include/hbpcode.h
* harbour/include/hbxvm.h
* harbour/source/compiler/genc.c
* harbour/source/compiler/gencc.c
* harbour/source/compiler/hbdead.c
* harbour/source/compiler/hbfix.c
* harbour/source/compiler/hblbl.c
* harbour/source/compiler/hbpcode.c
* harbour/source/compiler/hbstripl.c
* harbour/source/vm/hvm.c
+ added HB_P_SWAP <n> PCODE
* harbour/include/hbcompdf.h
* harbour/include/hbexpra.c
* harbour/include/hbexprb.c
* harbour/include/hbexprc.c
* harbour/include/hbexprop.h
! fixed GPF during compilation of @:var, @:&var, @o:&var
+ added support for @o:&var and @:var, @:&var inside WITH OBJECT
statement
* changed PCODE generated of ++,--,+=,-=,...
Now left side expression is evaluated _ONLY_ once and when object
messages are used it's guarantied that exactly the same object
variable will be used. It also fixes some problems which exists
in Clipper. This optimization is enabled by -kh flag (by default)
and can be disabled with -kc.
% optimize ald macros in ++,--,+=,-=,... operations
* add automatically "_" prefix when macro message is used in assignment
context, f.e.:
s:="osCode"
o:=errorNew()
? o:&s
o:&s := 100
? ++o:&s
? o:&s *= 5
* harbour/include/hblang.ch
- removed #xtranslate - this file is included by C code and some C
compiler do not like unknown directives
* harbour/utils/hbtest/rt_math.prg
+ added test code for <op>assign and (pre/post)(inc/dec)rementation,
macro messages and WITH OBJECT
* harbour/source/compiler/harbour.c
* harbour/source/rdd/dbf1.c
* harbour/source/rtl/errorapi.c
* harbour/source/rtl/hbgtcore.c
* harbour/source/rtl/gtdos/gtdos.c
* harbour/source/rtl/gtos2/gtos2.c
* harbour/source/rtl/gtpca/gtpca.c
* harbour/source/rtl/gtsln/gtsln.c
* harbour/source/rtl/gtstd/gtstd.c
* harbour/source/rtl/gtwin/gtwin.c
* casting and warning cleanup
* harbour/utils/Makefile
+ added $(HB_UTILS)
- harbour/utils/hbpp/hbpp.h
+ harbour/utils/hbpp/hbppdef.h
* harbour/utils/hbpp/hbpp.c
* harbour/utils/hbpp/hbppcomp.c
* harbour/utils/hbpp/hbppcore.c
* harbour/utils/hbpp/hbpplib.c
* harbour/utils/hbpp/hbpptbl.c
* harbour/utils/hbpp/pragma.c
* renamed hbpp.h to hbppdef.h to avoid possible conflict with hbpp.h
in include directory
* casting and warning cleanup
* harbour/bin/hb-func.sh
* harbour/bin/hb-mkslib.sh
* harbour/bin/postinst.sh
* harbour/config/bsd/gcc.cf
* harbour/config/darwin/gcc.cf
* harbour/config/dos/owatcom.cf
* harbour/config/hpux/gcc.cf
* harbour/config/linux/gcc.cf
* harbour/config/linux/owatcom.cf
* harbour/config/os2/gcc.cf
* harbour/config/sunos/gcc.cf
* harbour/config/w32/watcom.cf
* harbour/contrib/rdd_ads/ads1.c
* harbour/contrib/rdd_ads/adsfunc.c
* harbour/include/hbapifs.h
* harbour/include/hbexprc.c
* harbour/include/hbsetup.h
* harbour/source/common/expropt2.c
* harbour/source/common/hbdate.c
* harbour/source/common/hbgete.c
* harbour/source/common/hbstr.c
* harbour/source/common/hbver.c
* harbour/source/common/hbverdsp.c
* harbour/source/compiler/cmdcheck.c
* harbour/source/compiler/fixflex.c
* harbour/source/compiler/gencobj.c
* harbour/source/compiler/genobj32.c
* harbour/source/compiler/harbour.c
* harbour/source/compiler/harbour.l
* harbour/source/compiler/harbour.y
* harbour/source/compiler/harbour.yyc
* harbour/source/compiler/hbfix.c
* harbour/source/compiler/hbfunchk.c
* harbour/source/pp/ppcore.c
* harbour/source/pp/ppgen.c
* harbour/source/pp/pplib.c
* harbour/source/rdd/dbcmd.c
* harbour/source/rdd/workarea.c
* harbour/source/rdd/dbfcdx/dbfcdx1.c
* harbour/source/rdd/dbffpt/dbffpt1.c
* harbour/source/rdd/hsx/hsx.c
* harbour/source/rtl/accept.c
* harbour/source/rtl/ampm.c
* harbour/source/rtl/console.c
* harbour/source/rtl/defpath.c
* harbour/source/rtl/errorint.c
* harbour/source/rtl/filesys.c
* harbour/source/rtl/fkmax.c
* harbour/source/rtl/fstemp.c
* harbour/source/rtl/hbffind.c
* harbour/source/rtl/hbgtcore.c
* harbour/source/rtl/langapi.c
* harbour/source/rtl/seconds.c
* harbour/source/rtl/set.c
* harbour/source/rtl/tobject.prg
* harbour/source/rtl/transfrm.c
* harbour/source/rtl/gtcrs/chrmap.c
* harbour/source/rtl/gtcrs/gtcrs.c
* harbour/source/rtl/gtcrs/gtcrs.h
* harbour/source/rtl/gtpca/gtpca.c
* harbour/source/rtl/gtwvt/gtwvt.c
* harbour/source/rtl/gtxwc/gtxwc.c
* harbour/source/vm/classes.c
* harbour/source/vm/cmdarg.c
* harbour/source/vm/debug.c
* harbour/source/vm/estack.c
* harbour/source/vm/fm.c
* harbour/source/vm/hvm.c
* harbour/source/vm/macro.c
* harbour/source/vm/proc.c
* harbour/source/vm/runner.c
* harbour/utils/hbmake/hbmlang.c
* harbour/utils/hbpp/hbpp.c
* harbour/utils/hbpp/hbppcomp.c
* harbour/utils/hbpp/hbppcore.c
* harbour/utils/hbpp/hbpplib.c
* harbour/utils/hbpp/pragma.c
* harbour/utils/hbver/hbverfix.c
* general code cleanup: all strcpy() and strcat() replaced hb strn*()
and hb_strn*(), sprintf() by snprintf(), etc.
It fixed some possible buffer overflow but it's also possible that
it will exploit some some hidden so far problems but I strongly
prefer to know about them ASAP to fix them before final 1.0 release.
! fixed bug I introduce in codeblock falgs which disabled early macro
evaluation in codeblocks.
! added missing protection against execution by bison destructor for
used CBSTART token on syntax error.
% use PP stringify logik added for FLEX support to remove all redundant
spaces in stringified for early macro evaluation codeblocks and add
spaces between operators if after preprocessing they were removed.
Now we are supporting also some code which cannot be compiled by
Clipper.
% cleaned and improved the speed of printer redirecting in console code.
Chen please check if CG still reports problems and if not ubdate
TODO/TOFIX or inform me about them.
* some cleanups in building process for different *nixes: MacOSX, SunOS,
*BSD, etc.
* removed not longer necessary (I hope) compiler flag to force default
'char' type as signed. Now Harbour should work with signed and unsigned
char without any problems. To other developers: please remember that
when you are using 'char' as 8 bytes signed integer then it's a bug.
Always explicitly use: 'signed char' in such case. On some platforms
it's not possible to set default type for 'char' so if you hardcode
that 'char' is signed or unsigned somewhere then code will not be
portable. Chen if you will find a while to also rebuild Harbour with
BCC and -K switch to make some tests with CG then I'll be thankful.
* harbour/tests/codebl.prg
* harbour/tests/langmsg.prg
* harbour/utils/hbpptest/pp_test.prg
* harbour/utils/hbpptest/pretest.prg
* harbour/samples/pe/license.txt
* removed carriage return (\r) characters
* harbour/include/hbcomp.h
* harbour/include/hbapi.h
* harbour/include/hbcompdf.h
* harbour/include/hbexprb.c
* harbour/include/hbexprop.h
* harbour/source/vm/macro.c
* harbour/source/compiler/hbcomp.c
* harbour/source/compiler/complex.c
* harbour/source/compiler/harbour.c
* harbour/source/compiler/harbour.l
* harbour/source/compiler/harbour.y
* harbour/source/compiler/genjava.c
* harbour/source/compiler/hbcomp.c
* harbour/source/compiler/hbident.c
* harbour/source/compiler/hbpcode.c
* harbour/source/compiler/ppcomp.c
* separated HB_COMP and HB_MACRO definitions and added HB_COMMON
structure used when HB_COMMON_SUPPORT macro is set
* hide HB_MACRO internal definitions in hbapi.h when HB_MACRO_SUPPORT
is not set
These modifications should help in future compiler and macro compiler
integration into single binary.
+ added clipper compatible error message in unclosed structures
In general we should cleanup rules to make error reporting more
user friendly and Clipper compatible
% eliminated unnecessary allocations
+ added int mode member to common part of HB_COMP and HB_MACRO
structure. It's initialized to HB_MODE_MACRO or HB_MODE_COMPILER
+ add TOFIX note about memory leaks in cParamTypes and pParamClasses
members of COMDECLARED structure. It's a part of unfinished strong
typing code. I do not know what Ryszard plan to do with it so I'm
leaving it as is. The part of strong typing which were operating
on emulated HVM stack has been removed.
* removed static variables from genjava.c. Also gencli.c and genobj32.c
should be fixed but this will not make this code working so I haven't
touched it.
* changed 3-rd parameter of hb_compIdentifierNew() from BOOL to int.
Now it can have the following values: HB_IDENT_STATIC, HB_IDENT_FREE,
HB_IDENT_COPY. This modification will allow in the future using common
for static and dynamic symbol hash table without additional source code
changes. I also plan to use identifier hash table in PP the reduce
number of memory allocations and speed-up preprocessing by using
second level hashing for hash keys.
* harbour/source/common/expropt1.c
* harbour/source/common/expropt2.c
* changed HB_MACRO_SUPPORT to HB_COMMON_SUPPORT to automatically detect
possible conflicts between compiler and macro compiler
! removed first detected conflict which existed for long time
+ added hb_compExprMacroAsAlias() function to convert HB_ET_VARIABLE
expression to HB_ET_ALIAS.
* harbour/source/macro/macro.y
! fixed using prefix¯o-> and ¯o.sufix-> when macro cannot be
substituted by compiler, f.e.:
M->v := NIL
x := "&v.1->fld"
M->v := "v"
M->v1:= "data"
? &x
! fixed memory leak in macro substituted expression compilation
* harbour/source/vm/macro.c
! fixed initialization of some HB_MACRO members
! fixed value returned for type("&V->F") when alias does not exist
- removed not longer used hb_comp_bShortCuts global variable
* harbour/config/bsd/gcc.cf
* harbour/config/darwin/gcc.cf
* harbour/config/dos/djgpp.cf
* harbour/config/dos/owatcom.cf
* harbour/config/hpux/gcc.cf
* harbour/config/linux/gcc.cf
* harbour/config/linux/owatcom.cf
* harbour/config/os2/gcc.cf
* harbour/config/sunos/gcc.cf
* harbour/config/w32/bcc32.cf
* harbour/config/w32/gcc.cf
* harbour/config/w32/mingw32.cf
* harbour/include/hbcomp.h
* harbour/include/hbcompdf.h
* harbour/include/hberrors.h
* harbour/include/hbexpra.c
* harbour/include/hbexprb.c
* harbour/include/hbver.h
* harbour/source/common/hbstr.c
* harbour/source/common/hbver.c
* harbour/source/compiler/Makefile
* harbour/source/compiler/cmdcheck.c
* harbour/source/compiler/complex.c
* harbour/source/compiler/gencli.c
* harbour/source/compiler/genjava.c
* harbour/source/compiler/genobj32.c
* harbour/source/compiler/harbour.c
- harbour/source/compiler/harbour.simple
- harbour/source/compiler/harbour.slx
- harbour/source/compiler/harbour.sly
* harbour/source/compiler/harbour.y
* harbour/source/compiler/hbgenerr.c
- harbour/source/compiler/hbslex.c
- harbour/source/compiler/hbstrong.c
* harbour/source/compiler/hbusage.c
- harbour/source/compiler/simplex.c
* harbour/source/macro/Makefile
- harbour/source/macro/macro.slx
- harbour/source/macro/macroslx.c
* harbour/source/pp/ppcore.c
* harbour/utils/hbpp/hbppcomp.c
- removed SIMPLEX references
! fixed memory leak in request _GET_
* use hb_compIdentifiersNew() in INLINE and AUTOOPEN structures
members
* eliminated all internal exit() calls. Now hb_compGenError() with
fatal errors does not interrupt application but only sets
HB_COMP_PARAM->fExit = TRUE;
What should cause silent clean application close.
Please keep it in mind making future modifications and do not
introduce and exit() function call.
+ added support for \x<hex> and \<oct> quoting in extended strings
(just like in C). Warning !!!. Embedded 0 bytes are supported by
PP, lexer and expression optimizer but not by bison. To make them
working it will be necessary to change Literal terminal symbol
holder and add length field in bison rules and also change the hash
table used to hold identifiers, literals and macros to store and use
real string length. If someone will try to use strings with embedded
0 now then they will be cut but nothing worser should happen.
* harbour/include/hbapi.h
* harbour/include/hbcomp.h
+ harbour/include/hbcompdf.h
* harbour/include/hberrors.h
* harbour/include/hbexpra.c
* harbour/include/hbexprb.c
* harbour/include/hbexprc.c
* harbour/include/hbexprop.h
* harbour/include/hbmacro.h
* harbour/include/hbpp.h
* harbour/include/hbvm.h
* harbour/source/common/expropt1.c
* harbour/source/common/expropt2.c
* harbour/source/compiler/Makefile
* harbour/source/compiler/cmdcheck.c
* harbour/source/compiler/complex.c
* harbour/source/compiler/genc.c
* harbour/source/compiler/gencc.c
* harbour/source/compiler/gencli.c
* harbour/source/compiler/gencobj.c
* harbour/source/compiler/genhrb.c
* harbour/source/compiler/genjava.c
* harbour/source/compiler/genobj32.c
* harbour/source/compiler/harbour.c
* harbour/source/compiler/harbour.l
* harbour/source/compiler/harbour.y
* harbour/source/compiler/hbcomp.c
* harbour/source/compiler/hbdead.c
* harbour/source/compiler/hbfix.c
* harbour/source/compiler/hbfunchk.c
* harbour/source/compiler/hbgenerr.c
* harbour/source/compiler/hbident.c
* harbour/source/compiler/hbpcode.c
* harbour/source/compiler/ppcomp.c
* harbour/source/macro/macro.y
* harbour/source/pp/ppcore.c
* harbour/source/pp/ppgen.c
* harbour/source/pp/pplib.c
* harbour/source/vm/cmdarg.c
* harbour/source/vm/estack.c
* harbour/source/vm/fm.c
* harbour/source/vm/macro.c
* harbour/utils/hbpp/hbpp.c
* harbour/utils/hbpp/hbpp.h
* harbour/utils/hbpp/hbppcomp.c
* harbour/utils/hbpp/hbppcore.c
* harbour/utils/hbpp/hbpplib.c
* harbour/utils/hbpp/pragma.c
* changed the internal compiler API to be MT safe.
All global and static non constant variables replaced by
HB_COMP structure which have all compiler context settings.
It's possible to allocate simultaneously many compiler contexts
and compile code. Only constant/read only variables are shared.
In macro compiler HB_COMP is replaced by HB_MACRO.
In source code I everywhere used to macros: HB_COMP_DECL and
HB_COMP_PARAM which are equivalents of old HB_MACRO_DECL and
HB_MACRO_PARAM definitions.
We will only have to change compiler FATAL errors support to
not execute exit() for non batch systems.
* make macro compiler fully MT safe
* removed not longer used definitions and variables
! add direct accessing to PP line number information - it fixes missing
line numbers reported recently
! added generating .ppo files when tokens are teken directly by compiler
- it fixes empty .ppo file problem
! clear hb_stack internall variables after removing hb_stack to avoid
possible GPF if application still works and try to access unexsiting
hb_stack
! do not allocate new memory block when final FM statistic report is
generated - it fixes problem with GPF when application compiled with
FM statistic exits and CLIPPER envvar is set.
! fixed memory leak hb_cmdargCheck()
! added to harbour.y symbol destructors - it should fixes memory leaks
in syntax errors but it uses quite new bison feature which is not
fully supported yet. Unfortunately it's also not MT safe and the
destructors implementation in 1.875c does not respect %parse-param.
Bison documentation says that it should so I hope it will be fixed
soon (or maybe even already is in the newest bison versions) before
I'll add multi context compilation support. If not then I will have
to add some workaround. I can pass compiler context pointer inside
YYSTYPE using hack in a lexer but it will force really huge number
modifications in existing bison rules so probably it will be much
easier to fix bison or write a small tool to update generated parser.
* other modifications - the total size of patch is nearly 1MB and
detail description will have to take me few days.
* harbour/common.mak
* harbour/source/compiler/Makefile
* harbour/include/hbcomp.h
* harbour/include/hbexprb.c
* harbour/include/hbexprc.c
* harbour/source/compiler/cmdcheck.c
* harbour/source/compiler/genc.c
* harbour/source/compiler/harbour.c
* harbour/source/compiler/harbour.l
* harbour/source/compiler/harbour.slx
* harbour/source/compiler/harbour.y
* harbour/source/compiler/hbgenerr.c
* harbour/source/compiler/hbident.c
* harbour/source/compiler/ppcomp.c
+ harbour/source/compiler/complex.c
+ added new PP based compiler lexer - it's smaller, MT safe and a
little bit faster then then the FLEX version.
+ added HB_COMP structure to hold compiler data in future MT version
+ added global variable HB_COMP_PTR hb_comp_data to make conversion
to MT easier - now it holds only PP and lexer data.
* update PP related code in compiler to be MT safe
+ added %pure-parser, %parse-param and %lex-param for bison to generate
MT safe grammar parser.
* updated FLEX to work with recent compiler modifications and pure-parser
bison API
* harbour/makefile.bc
* harbour/makefile.vc
* harbour/source/macro/Makefile
* harbour/source/macro/macro.l
* harbour/source/macro/macro.y
* harbour/source/macro/macrolex.c
* use hb_macro prefix instead of hb_comp in bison/flex parser/lexer
used in macro compiler to avoid possible conflicts in the future
* separated lexer data
* harbour/include/hbapi.h
* harbour/include/hbpp.h
* harbour/source/pp/ppcore.c
* harbour/source/pp/ppgen.c
* harbour/source/pp/pplib.c
* harbour/source/vm/macro.c
* removed not used members from HB_MACRO structure to make it
cleaner before creating common to compiler and macro compiler
structure
+ added new token HB_PP_TOKEN_EPSILON
+ added void * cargo parameters passed to executed user functions
+ hb_pp_tokenGet(), hb_pp_tokenToString(), hb_pp_tokenBlockString()
functions for new PP based compiler lexer
* harbour/utils/hbpp/hbpp.c
* harbour/utils/hbpp/hbpp.h
* harbour/utils/hbpp/hbppcomp.c
* harbour/utils/hbpp/hbppcore.c
* harbour/utils/hbpp/hbpplib.c
* harbour/utils/hbpp/pragma.c
* updated to compile with recent compiler header file modifications
PP, new lexer and most of grammar parser should be MT safe. Now we should
update all compiler functions to pass pointer to HB_COMP data structure
where we should all current global variables. This structure as first
member should have HB_CMPCOMMON structure which will hold common to
compiler and macro compiler data. Ryszard I think you are the best person
to define this structure.
We have new lexer which is MT safe but please note that it has to be
extensively tested so I would like to ask everybody to compile as much
as possible different code and check if the final programs work as
expected. Working on new code I removed some limitations existing in
FLEX though not all. At the beginning I tried to replicate the exact
FLEX behavior but I've found that in few places it does not work as
it should so I begin to encode rules in a way which remove some
limitations. In fact now it's much easier to control some things.
I kept the FLEX code working and made all necessary modifications
so it still can be used but keeping FLEX working cost us IMHO too
much. It's not possible to introduce some improvements to grammar
parser. All identifiers, keyword and macros returned by new lexer
are converted to upper letters, do not have to be freed by hb_xfree()
and is guarantied that will be always accessible. So from grammar file
we can remove all hb_compIdentifierNew( hb_strupr($1), TRUE ) what
should give noticeable speed improvement but will break the FLEX code.
Ryszard and other you will have to decide if we will support FLEX in
the future. We can also clean the code and remove most of other
redundant hb_strupr() and hb_strdup() used in many places. BTW only
one terminal symbol can be returned with lower letters: DOIDENT
and I make it intentionally so it's possible to use:
DO prog1 WITH "sth"
on case sensitive file systems so this symbol should be cloned in
upper cases as function symbol but used without modification as
file name. It's current behavior but I'm not sure you will want
to keep it. Maybe compiler switch to always convert file names
created from
DO <id> [WITH <params,...>]
to lower cases will be better. Please think about it.
* harbour/include/hbapi.h
+ added
void * pLex;
member to HB_MACRO structure - it will be necessary for MT safe
macro parser
* harbour/include/set.ch
* harbour/include/hbexprb.c
* harbour/source/macro/macro.l
* harbour/source/macro/macro.y
* indenting, formatting and converting tabs to spaces
* harbour/include/hbpp.h
* harbour/source/compiler/ppcomp.c
* harbour/source/pp/ppcore.c
* harbour/source/pp/ppgen.c
* harbour/source/pp/pplib.c
* make HB_PP_TOKEN structure public for other code and changed
public PP API to not force including static rules by programs
which does not need them.
+ added basic API for using PP as lexer
* divided HB_PP_TOKEN_MACRO to HB_PP_TOKEN_MACROVAR and
HB_PP_TOKEN_MACROTEXT and mark
[<keyword>][&<keyword>[.[<nextidchars>]]]+
as HB_PP_TOKEN_MACROTEXT not pair HB_PP_TOKEN_KEYWORD and
HB_PP_TOKEN_MACRO
It allows easier integration PP as (macro)compiler lexer and
fixes preprocessing [<keyword>][&<keyword>[.[<nextidchars>]]]+
in some patterns.
* harbour/utils/hbtest/Makefile
+ added PP library to linked library list
* harbour/source/macro/macro.y
+ added seaport to use PP as lexer. It's disabled by default and
can be enabled using by defining HB_PP_MACROLEX. It eliminates
using FLEX or SIMPLEX lexer in macro compiler. Now it emulates
the behavior of FLEX lexer because I wanted to minimize the
modification but in fact because parsed token are freed when
macro compiler finish its job then we can resolve RT memory
leaks which apear during parsing wrong expressions. It will be
enough to drop allocating memory for new terminal symbols and
using them as is like in compiler. It will also quite nice
simplify include/hbexpr*.c code and will allow to move some
functions to COMMON library. I want to make also pure compiler
code MT safe so I will have to add passing pointer to a structure
with compiler context just like in macro compiler. It means that
if we define a structure which will be common to compiler and macro
compiler with local (not common) data stored in other structure for
which will will keep only a pointer then we will be able to move most
of include/hbexpr*.c code to common library. But I do not want to
make farther modification without consultation without Ryszard.
Also to make PP default lexer some farther modifications should
be done in core PP code and include/hbexpr*.c files to not reduce
the speed. Now using HB_PP_MACROLEX for sure will have to cause
speed reduction in macro compiler. But if we make necessary
modifications then we should keep at least the same speed or
probably reach noticeable better results.
* harbour/makefile.bc
* Adapted to the new Preprocessor utility ppgen.exe
* Cleaned hbpp.exe dependecies due to recent changes
* harbour/makefile.vc
* harbour/common.mak
* Cleaned hbpp.exe dependecies due to recent changes
* harbour/include/hbapi.h
* Added HB_EXPORT to hb_gcAlloc()
* harbour/include/hbstack.h
* Added HB_EXPORT to hb_stackSelfItem()
* harbour/source/vm/fm.c
* Added dipslaying contents of unreleased blocks at
program exit, together with logging unreleased memory
blocks report to fm.log file. Borrowed from xharbour.
* harbour/bin/hb-func.sh
+ added linker parametrs to hbcc
* harbour/include/hbapi.h
+ added hb_retclenAdoptRaw()
* harbour/include/hbapifs.h
* harbour/source/common/hbfsapi.c
* changed first parameters of hb_fsAddSearchPath() to const char *
* harbour/include/hbclass.ch
* update for new PP. I think that now we can try to create final
version of our OOP rules.
* harbour/include/hbdefs.h
+ added UCHAR and SCHAR typedefs
* harbour/include/hbrddcdx.h
* indenting
* harbour/source/rdd/workarea.c
! fixed minor typo
* harbour/source/common/hbdate.c
* harbour/source/rtl/dates.c
* moved hb_dateToday() and hb_dateTimeStr() from RTL to COMMON library
- harbour/include/hbpp.h
- harbour/source/pp/ppcomp.c
- harbour/source/pp/ppcore.c
- harbour/source/pp/pplib.c
- harbour/source/pp/pptable.c
- harbour/source/pp/pragma.c
* harbour/utils/hbpp/Makefile
* harbour/utils/hbpp/hbpp.c
+ harbour/utils/hbpp/hbpp.h
+ harbour/utils/hbpp/ppcomp.c
+ harbour/utils/hbpp/ppcore.c
+ harbour/utils/hbpp/pplib.c
+ harbour/utils/hbpp/pptable.c
+ harbour/utils/hbpp/pragma.c
* moved all PP code to harbour/utils/hbpp
It's interesting and working preprocessor and the code can be
usable for some other things so I do not want to remove it.
Probablly we should move it to contrib/hbpptext
* harbour/include/hbcomp.h
* harbour/include/hberrors.h
* harbour/include/hbsetup.ch
+ harbour/include/hbpp.h
+ harbour/include/hbstdgen.ch
* harbour/source/common/hbstr.c
* harbour/source/compiler/Makefile
* harbour/source/compiler/cmdcheck.c
* harbour/source/compiler/harbour.c
* harbour/source/compiler/harbour.l
* harbour/source/compiler/hbgenerr.c
+ harbour/source/compiler/ppcomp.c
* harbour/source/pp/Makefile
+ harbour/source/pp/ppcore.c
+ harbour/source/pp/pplib.c
+ harbour/source/pp/ppgen.c
+ New PP code written from scratch. It works in similar way to
Clipper PP even the error codes are replicated. The code is MT
safe does not have any limitation on size of preprocessed code,
line, etc. It's also Clipper compatible lexer. It means that
we do not longer need FLEX or SIMPLEX which can be replaced
by new PP after some small modifications. Anyhow I haven't
decided to make it myself. I would like to agree with with the
rest of developers. I will be very happy if such modifications
will be done by someone else, Ryszard?
Meanwhile I current PP join on output the line tokens and give
the string line to FLEX/SIMPLEX. It does not have any sense and
all FLEX/SIMPLEX limitations are still existing. Ryszard, even
if we keep it then I hope you can remove at least FLEX line buffer
and use the one returned from PP.
Because string tokens in parsed line are converted to text which is
later once again decoded to tokens by FLEX I had to introduce new
string format which supports embedded string delimiters. I chose
modified version of xHarbour extension with escaped strings e"<sting>"
so now FLEX understand such strings and decode them like C escaped
strings. It means that you can use them also in the .prg code f.e.:
outstd( e"Hello\n\rWorld" )
The new PP is also noticeable faster. You should see the difference
compiling long files. The build in PP rules are generated automatically
by ppgen program created from source/pp/ppgen.c
I had to add to GNU source/pp/Makefile these two lines:
pptable.c : ppgen$(EXE_EXT)
./ppgen$(EXE_EXT) $(TOP)$(ROOT)include/hbstdgen.ch -opptable.c -q
Sth like that will have to be done also in non GNU make system.
Now Harbour can be compiled only using GNU make.
Marek can you update non GNU make files? I would like to leave this
modification to you or other developers who can test it.
It was quite big modification and I do not believe that I haven't
make any mistakes but I hope that in few weeks I'll fix any reported
bugs and it will resolve any PP problems.
TODO:
* error messages
create one common list of errors and warnings and keep it
in common library. PP and compiler can still generate different
errors with the same number. It can be confusing for the users
and hard to document and add i18n translations.
If possible we should also try to keep Clipper error numbers.
In new PP code I added Clipper error numbers but I cannot use
them until compiler code is not updated.
We should aslo remove the ctype passed to error functions and
hack with first character in warning messages and use only
error number. The codes from 1000 to 1999 should be warnings
where range 1000:1099 is activated by -w, 1100:1199 by -w1,
1200:1299 by -w2, etc. 2000:2999 are errors and 3000:3999
fatal errors. All compiler functions which generate an error
should expect that error function will not stop the compiler
but return and cleanly finished their job. It's necessary for
MT support in compiler and making compiler part of some other
programs which may still work and compile different source code.
* FLEX/SIMPLEX
remove them at all and add some final pass to PP to create
more precise tokens for grammar parser or at least add better
integration to remove some redundant code and existing limits.
* hb_inLine() support - it's broken in new PP but as I can see
it was never working correctly. I can add a hack to PP to support
hb_inLine() but I'm not sure it's worth to do. Maybe in few days.
+ harbour/include/std.ch
+ added new std.ch. It was created without using Clipper's std.ch.
It's quite possible that some rules are wrong and should be fixed
so please help. Anyhow I created a set of programs based on new PP
code generating all possible combinations of different commands I
collected from different source code, documentation and match patterns
of rules I was adding to new std.ch and then I was comparing .ppo
files generated by Clipper and Harbour so I do not expect any bigger
problems then some minor typos. I had to introduce some modifications
in spacing as workaround for FLEX/SIMPLEX which cannot properly decode
text preprocessed by Clipper after stringify.
* harbour/utils/hbpptest/pretest.prg
* updated for new PP
It reports 16 wrong translations but some of them are valid
and some others are caused by escaped string e"..." (one of hack
for FLEX/SIMPLEX support)
I also had to remove all spaces in comparison the results
because they were not Clipper ocmpatible at all. Ryszard please
look at it.
* harbour/include/hbclass.ch
* most of the rules rewritten
! fixed some wrong rules and general cleanup
+ added additional code validation
! fixed compilation of more then one class in single file.
Now it's even possible to declare all classes at beginning of
single file and then implementing their methods in any order
! fixed using static classes and classes
! fixed compilation without <ClassName>_ prefix in method names
+ added support for HB_CLS_NO_DECORATION macro which disable
adding <ClassName>_ prefix to method names - this macro is
set by default when HB_SHORTNAMES is set.
+ added support for declared parameters validation - it can be
disabled with HB_CLS_NO_PARAMS_ERR and I had to disable it
by default due to problems with our preprocessor.
Ryszard seems that our PP has serious problems with decoding
directives when there is no space between symbol and some other
non symbol character. I had to add some workarounds and even
introduce buggy rules to make it working. Please look at it.
You can remove #define HB_CLS_NO_PARAMS_ERR from hbclass.ch
and try to rebuild Harbour core code to see the problem.
* harbour/include/hboo.ch
* harbour/source/vm/classes.c
+ added support for new primitive message: HB_OO_MSG_PERFORM
* harbour/source/rtl/tclass.prg
- removed <lPersistent> parameter from HBClass messages and
internals data. Persistent is supported as scope bit and
separate variable was redundant.
- removed stripping of () from message names. Here is not a place
to fix wrong preprocessor rules.
* harbour/utils/hbtest/rt_class.prg
* use: METHOD PROCEDURE ... CALSS ...
instead of: PROCEDURE ... CALSS ...
The first version is preferable syntax.
* harbour/source/debug/dbgtmenu.prg
* harbour/source/rtl/checkbox.prg
! fixed some parameters in method declaration - global cleanup
will have to wait for preprocessor fixes
Hi all,
Please make test with current hbclass.ch code.
I hope that I haven't broken too much things ;-) but I rewrite
from scratch most rules and it's possible that I missed sth or
made some stupid typos. Current version is much shorter and should
be easier to updated. For sure I've intentionally changed one thing.
CLASSDATA was ignoring SHARED attribute and always created shared
class variables. Seems that it was long existing typo but the fix
may interact with already existing code which needs SHARED class
variables but does not use SHARED clause in CLASSDATA declaration.
In such case please update it and add missing SHARED.
Also in the end of CLASS declaration we have:
[ ; #translate Super( <SuperClassN> ): => ::<SuperClassN>: ] ;
[ ; #translate Super( <SuperClass1> ): => ::<SuperClass1>: ] ;
[ ; #translate Super(): => ::<SuperClass1>: ] ;
[ ; #translate Super: => ::<SuperClass1>: ] ;
[ ; #translate ::Super : => ::<SuperClass1>: ]
These rules introduce very serious bug - they are breaking supercasting
in code which makes sth like:
::super:super:super:msg
or in any other code which sends SUPER message to some other class
objects. I will have to remove them. At least the last three ones.
There were some other things I wanted to write about but it's too late
and I'm to tired - sorry. If you will have any question please ask. if
you will notice some problems with current rules please inform me.
* harbour/source/vm/classes.c
+ added hb_clsRealMethodName() function which I'm using in some
test code
* harbour/tests/clsscast.prg
* updated to use __CLS_CNTSHRDATA() instead of __CLS_CNTCLSDATA()
* harbour/utils/hbtest/rt_class.prg
+ added tests for class and shared class variables/allocating
* xharbour/include/hbvm.h
* xharbour/source/vm/hvm.c
+ added hb_vmPushDynSym( PHB_DYNS )
It should allow most applications to not use [P]HB_SYMB at all.
Removing PHB_SYMB from 3-rd party .c code may allow us to add
freeing unused symbol tables from HVM in the future.
* harbour/source/vm/classes.c
* temporary restored hb_objGetpMethod()
+ added __ClsCntClasses()
! allocated real methods for OnError and Destructor to keep
the same behavior in these methods as in any others, f.e.
scoping checking or debugging.
* harbour/common.mak
* harbour/utils/hbtest/Makefile
* harbour/utils/hbtest/hbtest.prg
+ harbour/utils/hbtest/rt_class.prg
+ added tests for our classy code. Now destructors and instance
area allocating/casting. Some other in the future.
* harbour/contrib/rdd_ads/ads1.c
* harbour/include/hbapi.h
* harbour/include/hbapigt.h
* harbour/include/hbapiitm.h
* harbour/include/hbdefs.h
* harbour/include/hbrdddbf.h
* harbour/include/hbstack.h
* harbour/include/hbsxfunc.h
* harbour/source/common/expropt1.c
* harbour/source/common/hbstr.c
* harbour/source/compiler/harbour.c
* harbour/source/compiler/hbident.c
* harbour/source/pp/ppcore.c
* harbour/source/rdd/hbdbsort.c
* harbour/source/rdd/dbffpt/dbffpt1.c
* harbour/source/rdd/hbsix/sxcompr.c
* harbour/source/rtl/hardcr.c
* harbour/source/rtl/inkey.c
* harbour/source/rtl/isprint.c
* harbour/source/rtl/math.c
* harbour/source/rtl/mtran.c
* harbour/source/rtl/natmsg.c
* harbour/source/rtl/gtcrs/chrmap.c
* harbour/source/rtl/gtcrs/gtcrs.c
* harbour/source/rtl/gtsln/gtsln.c
* harbour/source/rtl/gtsln/gtsln.h
* harbour/source/rtl/gtsln/kbsln.c
* harbour/source/rtl/gtsln/keytrans.c
* harbour/source/rtl/gtsln/mousesln.c
* harbour/source/vm/estack.c
* harbour/source/vm/extend.c
* harbour/source/vm/runner.c
* harbour/utils/hbver/hbverfix.c
* general code cleanup, public functions declared in header files,
local changed to static, added mising void for functions without
parameters, etc.
We still have some public functions which are not used by core code
and not declared in header files, like:
hb_memvarValueBaseAddress(), hb_memvarGetVarHandle(),
hb_memvarGetValueByHandle(), hb_clsCreate(), hb_clsAdd(),
hb_clsAssociate(), hb_hashTableDel(), hb_hashTableSize(),
I haven't touched them yet though we will have to keep in mind that
we should make sth with them.
* source/pp/pplib.c
* suppressed preprocessing of empty lines
* utils/hbpptest/pretest.prg
* added line length to MLCOUNT to correctly count the
number of lines to process
* source/compiler/harbour.y
* fixed to support @funname() syntax in assigments
* utils/hbpptest/pp_test.prg
* fixed preprocessor example
* TODO
* removed 'to fix' vertical spacing in ppo files
* source/pp/ppcore.c
* source/pp/pptable.c
* utils/hbpptest/pp_test.prg
* fixed to be more Clipper compatible
* fixed access to unallocated memory
* added more test cases
* source/pp/ppcore.c
* fixed bugs which I introduced
* utils/hbpptest/pretest.prg
* added more test cases
+ utils/hbpptest/pp_test.prg
* new file to test preprocessor Preprocess both with Clipper
and harbour and next use diff utility to compare outputs -
ignore the number of white spaces (use diff -w -u ...)
* harbour/common.mak
* harbour/makefile.bc
* harbour/makefile.vc
* harbour/utils/Makefile
+ Added hbpptest
* harbour/utils/hbpptest/pretest.prg
+ Output now goes to STDOUT.
* harbour/source/compiler/harbour.c
! Possible memory leak fixed.
* harbour/source/rtl/Makefile
! Fixed tabs (readded them).
- harbour/source/rtl/dbdelim.prg
+ harbour/source/rdd/dbdelim.prg
- harbour/source/rtl/dbjoin.prg
+ harbour/source/rdd/dbjoin.prg
- harbour/source/rtl/dbsdf.prg
+ harbour/source/rdd/dbsdf.prg
* harbour/source/rtl/Makefile
* harbour/source/rdd/Makefile
* harbour/common.mak
* Moved three RDD related internal function source files
to the RDD library. (They did depend on each other
anyway.)
* harbour/source/rdd/dbcmd.c
* harbour/source/rdd/dbfuncs.prg
* harbour/source/rdd/dblist.prg
* harbour/source/rdd/dbsort.prg
* harbour/source/rdd/dbstrux.prg
* harbour/source/rdd/dbtotal.prg
* harbour/source/rdd/dbupdat.prg
* harbour/source/rdd/rddord.prg
* harbour/source/rtl/dbdelim.prg
* harbour/source/rtl/dbedit.prg
* harbour/source/rtl/dbjoin.prg
% Cleanups, minor optimizations.
! __dbApp(), __dbCopy() to return LOGICAL.
! Problem where error condition was not detected if BREAK didn't
set the error object.
! __dbTotal() lRest handling fixed.
! __dbTotal() ErrorBlock overriding removed.
! __dbCreate() now generating default alias.
% __dbCreate() using dbCreate() undoc param to open the tables.
! __dbDelim() return value.
! __dbSDF() return value.
+ CA-Cl*pper undocumented call added: _dtxCondSet()
+ XBase++ compatible calls implemented:
dbJoin(), dbList(), dbSort(), dbTotal(), dbUpdate(), _dbExport()
dbCopyStruct(), dbCopyExtStruct()
+ Added some more 10 chars call stubs:
__dbCopySt(), __dbCopyXS(), __dbOpenSD(), __dbArrang()
+ Comments.
+ Formatting.
; All high-level db functions seems to be compatible now.
DBEDIT() is left TODO for review (refix).
* harbour/source/rtl/tbrowse.prg
* Minor cleanup.
* harbour/include/hbexpra.c
* harbour/source/vm/arrayshb.c
* harbour/source/rdd/dblist.prg
- Removed compiler+RTL __dbList() hack which
made it incompatible with CA-Cl*pper. The
hack targeted an XBase++ extension, but it's
compatible even without the hack. Tested with
XBase++ 1.82.294.
* harbour/source/rtl/typefile.prg
% FUNCTION -> PROCEDURE
+ _TypeFile() XBase++ internal function added.