* harbour/include/hbrddcdx.h
* harbour/include/hbrdddbf.h
* harbour/source/rdd/dbcmd.c
* harbour/source/rdd/delim1.c
* harbour/source/rdd/dbffpt/dbffpt1.c
* cleaned // comments and some compiler warnings
* harbour/include/dbinfo.ch
* harbour/source/rdd/dbf1.c
! fixed setting [V]FP DBF table type
* harbour/source/vm/arrays.c
! fixed ADEL() to clear last element
% optimized a little bit AINS() - use hb_itemMove() instead of
hb_itemCopy()
* harbour/include/hbdefs.h
* use i64 suffix for BCC 3.0 and higher for long long int
* harbour/source/rtl/dummy.prg
* harbour/source/rdd/dbcmd.c
* added undocumented Clipper function: __dbTrans()
__dbOpenSDF() and __dbJoin() I'll commit soon.
There is also __dbTransRec() in dummy.prg but I cannot find any
information about this function and its parameters in GOOGLE.
If someone knows what is this functions syntax and can Inform
me then I'll implement it. I guess it's a wrapper to TRANSREC()
RDD method.
* harbour/source/rdd/dbf1.c
* DBI_LOCKOFFSET now returns DBF record lock offset really used
(f.e. updated in FP locking after open/close production index)
* harbour/source/rdd/delim1.c
* cleaned BCC warning
* harbour/source/rdd/dbfcdx/dbfcdx1.c
! updated internal production index flag after manual opening
production index
* harbour/bin/hb-func.sh
* harbour/config/global.cf
+ harbour/include/usrrdd.ch
+ harbour/source/rdd/usrrdd/Makefile
+ harbour/source/rdd/usrrdd/usrrdd.c
+ harbour/source/rdd/usrrdd/rdds/Makefile
+ added USRRDD library. It allows to create new RDD from scratch
or by inheriting from any other RDDs (except USRRDDs) and overloading
any of their methods at .prg level.
I hope you will find a lot of fun in creating your own RDDs.
I wanted to create more examples and added some documentation
but I do not have time for it now - sorry. Try to look at examples
below and if you need some more detail information then look at
Clipper's NG Technical Reference Guide or ask me. I'll try to help.
Two RDDs which seems to be requested by users are ARRAY RDD and
OLE RDD. I hope that some of you implement them.
+ harbour/source/rdd/usrrdd/rdds/dbtcdx.prg
* Very simple RDD DBTCDX which inherits from DBFCDX and
set default memo type to DBT, see exmemo.prg as an example.
+ harbour/source/rdd/usrrdd/rdds/fptcdx.prg
* Very simple RDD FPTCDX which inherits from DBFCDX and
set default memo type to FPT, see exmemo.prg as an example.
+ harbour/source/rdd/usrrdd/rdds/smtcdx.prg
* Very simple RDD SMTCDX which inherits from DBFCDX and
set default memo type to SMT, see exmemo.prg as an example.
+ harbour/source/rdd/usrrdd/rdds/fcomma.prg
* A simple RDD which uses HB_F*() functions from MISC library
to access CSV files. It allow to open an CSV file and navigate
using SKIP()/GOTO()/GOTOP()/GOBOTTOM() functions using
BOF()/EOF()/RECNO()/LASTREC() to check current state.
HB_F*() functions does not support single field access and allow
to read only the whole line. This RDD also. I only added one
virtual field which exist in all tables open by this RDD called
LINE which contains the current .csv file line.
+ harbour/source/rdd/usrrdd/rdds/hscdx.prg
* A simple RDD which adds automatically update HSX indexes to DBFCDX
To create new HSX index for current work area use: HSX_CREATE()
To open already existing one use HSX_OPEN(),
To close use: HSX_CLOSE()
To retieve an handle use: HSX_HANDLE()
+ harbour/source/rdd/usrrdd/rdds/rlcdx.prg
* A simple RDD which introduce lock counters. It has full DBFCDX
functionality from which it inherits but if you execute DBRLOCK(100)
twice then you will have to also repeat call to DBRUNLOCK(100) to
really unlock the record 100. The same if for FLOCK()
This idea comes from one of messages sent by Mindaugas Kavaliauskas.
+ harbour/source/rdd/usrrdd/example/exfcm.prg
* example of using FCOMMA RDD
+ harbour/source/rdd/usrrdd/example/exhsx.prg
* example of using HSCDX RDD
+ harbour/source/rdd/usrrdd/example/exrlx.prg
* example of using RLCDX RDD
+ harbour/source/rdd/usrrdd/example/exmemo.prg
* example of using DBTCDX, FPTCDX and SMTCDX RDDs
* harbour/include/hbver.h
* changed version number and ChangeLog entry
* harbour/make_tgz.sh
! fixed creating PP in DJGPP builds
* harbour/contrib/dot/pp.prg
! minor fix in parameter checking
* harbour/contrib/libmisc/hb_f.c
! fixed bug in record numbering after reaching EOF position and
backward skipping
* harbour/include/hbrdddel.h
* harbour/source/rdd/delim1.c
+ implemented DELIM RDD. It should be fully Clipper compatible
in comma files parsing. If you will find any difference, please
inform me and I'll update it. Unlike in Clipper in [x]Harbour
these RDD can be used also in direct import operations with
APPEND FROM ... VIA "DELIM"
These RDD also support whole record transfering between RDDs
if they support the same record format and field representation
and can translate extended field types like "I", "B", "V3", "V4",
etc.
* harbour/source/rtl/dbdelim.prg
* replaced old code of __dbDelim() function with simple calls to
__dbCopy()/__dbApp() - it should fix most of the reported
incompatibilities in DELIM import/export operations and
increase their speed many times
* harbour/include/hbrddsdf.h
* harbour/source/rdd/sdf1.c
+ implemented SDF RDD. It should be fully Clipper compatible
in SDF files parsing. If you will find any difference, please
inform me and I'll update it. Unlike in Clipper in [x]Harbour
these RDD can be used also in direct import operations with
APPEND FROM ... VIA "SDF"
These RDD also support whole record transfering between RDDs
if they support the same record format and field representation
and can translate extended field types like "I", "B", "V3", "V4",
etc.
* harbour/source/rtl/dbsdf.prg
* replaced old code of __dbSDF() function with simple calls to
__dbCopy()/__dbApp() - it should fix most of the reported
incompatibilities in SDF import/export operations and
increase their speed many times
* harbour/source/rdd/dbcmd.c
+ added support for table structure inheriting in transfer RDDs.
+ added eleventh parameter with delimiter to __dbCopy()/__dbApp()
* harbour/source/rdd/dbf1.c
* force 10 bytes size for memo fields in DBF and SMT memos.
* some minor clean-up.
* harbour/source/rdd/workarea.c
* added some dummy DBI_* actions in base RDD level
* source/pp/ppcore.c
*fixed invalid memory access
* source/compiler/harbour.c
*fixed to generate error in cases when variable name is duplicated
in PARAMETERS and PRIVATE statements (NOTICE: this error is
generated when automatic memvar declaration was requested only
using -a command line switch)
* harbour/bin/hb-func.sh
* added support -go[0-3] and other -g* switches to xhb* scripts
* harbour/include/hbapi.h
+ added ISSYMBOL() macro
* formatting
* harbour/include/hbapirdd.h
* changed definition of SUPERTABLE for optional dynamic overloading
this modification will not effect existing code
* harbour/include/hbrddfpt.h
* harbour/source/rdd/dbffpt/dbffpt1.c
* added support for NIL value in SIX3 FPT files
* harbour/include/hbcomp.h
* harbour/source/compiler/harbour.c
* harbour/source/compiler/genc.c
* harbour/source/compiler/gencli.c
* harbour/source/compiler/genhrb.c
* harbour/source/compiler/genjava.c
! message symbols are not function symbols - cleaned the HB_FS_MESSAGE
usage and fix the problem with registering static function in global
symbol table
* harbour/source/compiler/gencc.c
! fixed typo in compilation for platforms 64 bit LONG
* harbour/include/hbvmpub.h
* harbour/source/compiler/cmdcheck.c
* harbour/source/vm/asort.c
* harbour/source/vm/evalhb.c
* formatting
* harbour/source/rdd/dbcmd.c
* formatting and some minor clean-up
* harbour/source/rdd/workarea.c
* added default SYSNAME method
! fixed possible memory leak when APPEND failed in TRANSREC method
* harbour/source/rdd/hsx/hsx.c
! fixed using HS_ADD()/HS_REPLACE() without STRING/BLOCK expression
* harbour/source/rtl/cdpapi.c
* cleaned GCC4 warning
* harbour/source/rtl/do.c
* changed to keep parameter references in DO() function. Now it works
like IIF()/EVAL()
* harbour/source/vm/classes.c
* removed some definitions repared from hbapi.h
+ added support to passing function references as HB_IT_SYMBOL
* harbour/source/vm/dynlibhb.c
! fixed GPF in HB_LIBDO called with wrong parameter
* harbour/source/vm/hvm.c
! fixed hb_rddGetFieldValue() to not operate on unallocated stack area
it could cause unpredictable results when RDD had to access HVM, f.e.
for evaluation some pending relations. The whole code should be
carefully checked and to not operate on hb_stackTopItem() if other
functions are called to make the HVM fully reentrant.
+ added commented out support for passing HB_IT_SYMBOL as function
pointer
* formatting
* harbour/source/vm/itemapi.c
* return "S" for HB_IT_SYMBOL by hb_itemType()
* formatting
* harbour/bin/hb-func.sh
* changed the exit code for .hrb file compilation by xhbcmp
* harbour/include/hbcomp.h
* harbour/source/compiler/gencc.c
* harbour/source/compiler/hblbl.c
* removed some variables which are not necessary in Harbour
* harbour/source/compiler/hbfix.c
+ added unconditional and conditional jump joining optimization
* harbour/source/vm/classes.c
* indenting and some minor modifications
* harbour/source/rdd/dbfcdx/dbfcdx1.c
! clear the logical key position buffer for pending relations
or hot record buffer updating
* harbour/source/rdd/dbffpt/dbffpt1.c
* harbour/source/vm/hvm.c
* casting
* harbour/source/vm/macro.c
* xharbour/include/hbvmpub.h
* removed HB_FS_ALLOCATED
* xharbour/source/vm/dynsym.c
* changed the code for hb_symbolNew() to avoid possible memory leak
alerts and keep the list of all dynamic symbols accessible.
It also reduced a little bit the memory fragmentation and total
size of memory allocated for dynamic symbols.
* bin/bld.sh
* fixed typo
* source/pp/ppcore.c
* fixed bug in ParseOptional
<"var"> were not recognized correctly
(This fixes SET RELATION bug reported by David Macias)
* harbour/include/Makefile
+ harbour/include/blob.ch
* harbour/include/dbinfo.ch
* harbour/include/hbdbferr.h
* harbour/include/hbrddfpt.h
* harbour/source/rdd/dbf1.c
* harbour/source/rdd/workarea.c
* harbour/source/rdd/dbffpt/dbffpt1.c
+ added all CL5.3 BLOB*() functions support
+ added new RDD DBFBLOB compatible with CL5.3 DBFBLOB
It operates on memo files only (.dbv) without tables (.dbf)
To create .DBV file use:
dbCreate( cFile, {}, "DBFBLOB" )
* harbour/source/rdd/dbcmd.c
* do not report error when empty structure table is passed to DBCREATE()
CL5.3 allow to create even DBF files without any fields and because
I can imagine some valid code which use it as a feature then I also
allow it in DBF RDD.
Authors of RDDs which do not allow to create tables without fields
should add to their low level RDD code necessary RT error.
* harbour/source/rdd/dbfcdx/dbfcdx1.c
! fixed scope checking when skip is done from the record which
dos not exist in index
* harbour/source/vm/classes.c
* use hb_itemClone() - it will save us modifications in the
future if we will add new items which will be passed as
parameters like arrays (f.e. hashes)
* some source code formatting
* harbour/bin/hb-func.sh
* support for detecting startup function in C++ mode
* harbour/include/hbapi.h
* some few #defines to translate some xHarbour functions names to Harbour
* harbour/include/hbxvm.h
* harbour/source/compiler/gencc.c
* harbour/source/vm/hvm.c
* harbour/source/vm/itemapi.c
* harbour/source/common/hbdate.c
+ added optimizations for add and div by integer value
* changed code generated for double values to avoid limitation in some
C compilers like MSC and possible differ conversion inside C RTL then
the one which uses Harbour RTL
* some minor optimizations, cleanups and code formating
* harbour/source/compiler/hbfix.c
* optimize usage of HB_P_NOT PCODE - remove repeated NOT operations
or revert conditional jumps if they are just after NOT.
* harbour/source/rdd/dbf1.c
* added support for NULL value set in memo fields by ACCESS
* harbour/source/rdd/dbfcdx/dbfcdx1.c
* fixed ordKeyPos() - for records out of scope
* harbour/source/rtl/padc.c
* harbour/source/rtl/padl.c
* harbour/source/rtl/padr.c
* harbour/source/rtl/substr.c
* some minor optimizations to avoid new string item creation when
it's not necessary
* harbour/source/vm/classes.c
* harbour/source/vm/extend.c
* minor code formatting and optimizations
* harbour/source/vm/classes.c
% Optimized __CLSADDMSG() to call hb_parc() only once instead
of 25 times for most cases.
! Possible problem fixed in __CLSADDMSG() where message parameter
was required to be uppercase when overloading operator .NOT.,
.AND. or .OR.
% hb_dynsymGet() calls replaced with hb_dynsymGetCase() where the
parameter was an already uppercased constant.
* harbour/source/vm/dynsym.c
! Fixed HB_TRACE() function name in hb_dynsymGetCase().
* harbour/bin/hb-func.sh
* support for detecting startup function in C++ mode
* harbour/include/hbapi.h
* some few #defines to translate some xHarbour functions names to Harbour
* harbour/include/hbxvm.h
* harbour/source/compiler/gencc.c
* harbour/source/vm/hvm.c
* harbour/source/vm/itemapi.c
* harbour/source/common/hbdate.c
+ added optimizations for add and div by integer value
* changed code generated for double values to avoid limitation in some
C compilers like MSC and possible differ conversion inside C RTL then
the one which uses Harbour RTL
* some minor optimizations, cleanups and code formating
* harbour/source/compiler/hbfix.c
* optimize usage of HB_P_NOT PCODE - remove repeated NOT operations
or revert conditional jumps if they are just after NOT.
* harbour/source/rdd/dbf1.c
* added support for NULL value set in memo fields by ACCESS
* harbour/source/rdd/dbfcdx/dbfcdx1.c
* fixed ordKeyPos() - for records out of scope
* harbour/source/rtl/padc.c
* harbour/source/rtl/padl.c
* harbour/source/rtl/padr.c
* harbour/source/rtl/substr.c
* some minor optimizations to avoid new string item creation when
it's not necessary
* harbour/source/vm/classes.c
* harbour/source/vm/extend.c
* minor code formatting and optimizations
* source/compiler/harbour.c
* fixed allocation of startup procedure name
* source/compiler/harbour.l
* fixed compilation of macro expression (the first letter
was eaten in some cases)
* source/pp/ppcomp.c
* source/pp/ppcore.c
* source/pp/pplib.c
* fixed calls to hb_pp_ParseDirective
* increased back the input buffer to HB_PP_STR_SIZE (12288 bytes)
* harbour/include/hbcomp.h
+ added hb_compPCodeSize() and hb_compStrongType() declarations
* harbour/include/hbpp.h
* formatting
* harbour/source/compiler/Makefile
+ harbour/source/compiler/hbstrong.c
* harbour/source/compiler/hbpcode.c
* moved strong typing code to separate file
* harbour/source/compiler/hbpcode.c
+ added hb_compPCodeSize() function
+ added support for automatic size checking of variable size PCODEs
in hb_compPCodeEval()
* harbour/source/compiler/gencc.c
* added escaping of '?' character in generated strings to
avoid possible conflicts with trigraph sequences which
are part of ANSI C standard
* force .0 at the end of double numbers to avoid possible range
conflicts in generated .c files
* removed unnecessary HB_SYMBOL_UNUSED()
* harbour/source/compiler/harbour.l
* harbour/source/compiler/harbour.y
* harbour/source/macro/macro.l
* harbour/source/macro/macro.y
* added #define realloc hb_xrealloc
* harbour/source/compiler/hbdead.c
* harbour/source/compiler/hbfix.c
* harbour/source/compiler/hblbl.c
* harbour/source/compiler/hbstripl.c
* use hb_compPCodeSize() function
* removed not longer necessary functions for checking the real size
of variable size PCODEs
* harbour/source/vm/hvm.c
* fixed RT error number in hb_vmAddInt() for negative values to be
Clipper compatible
* harbour/include/hbstack.h
* harbour/source/vm/estack.c
* added pEnd to hb_stack structure to speed up hb_stackPush()
which is one of the most often used operation in HVM.
* harbour/include/hbapi.h
* small trick with HB_IS_* macros to give a compiler a chance to make
them faster on some machines
* harbour/source/compiler/genc.c
! fixed stripping non identifier characters from symbol table name
* harbour/source/compiler/hbpcode.c
* cleaned comment
* harbour/source/rdd/dbf1.c
* set Operation in error object to field name in field{put,get} methods.
+ added DBI_LOCKOFFSET
* harbour/source/vm/classes.c
* formatting
* harbour/source/vm/hvm.c
* harbour/source/vm/itemapi.c
* some minor speed optimizations
* source/pp/ppcore.c
* fixed preprocessor to preserve spaces the same way (almost)
as Clipper
* tests/pretest.prg
* added more tests to check preprocessor
* harbour/include/hbstack.h
* harbour/source/vm/estack.c
+ added hb_stackDecrease( ULONG )
* harbour/include/hbxvm.h
* harbour/source/vm/hvm.c
+ added hb_xvmArrayItemPush(), hb_xvmArrayItemPop(), hb_xvmMultByInt()
* harbour/source/compiler/gencc.c
% use hb_xvmArrayItemPush(), hb_xvmArrayItemPop(), hb_xvmMultByInt()
If someone has time then it will be good to also add:
hb_xvmDivByInt(), hb_xvmModulusInt(), hb_xvmPlusInt(), hb_xvmMinusInt()
* harbour/source/vm/itemapi.c
* use simple memcpy() in hb_itemSwap() - it's save in current HVM
It could become unsafe if we add reference tracing or sth like
that in the future but in such case we will have to also update
hb_itemCopy() and hb_itemMove() so we can also update hb_itemSwap()
* harbour/source/vm/asort.c
* harbour/source/vm/classes.c
* harbour/source/vm/memvars.c
* harbour/source/vm/hvm.c
* cleaned the code which created HB_ITEMs on C stack. Only three
places have to be update yet and array/clodeblock creation little
bit modified and we will be able add automatic GC activation in
hb_xgrab() or hb_gcAlloc().
* harbour/make_gnu.bat
* harbour/make_gnu.cmd
* harbour/make_gnu.sh
* added information about GTWVT to GT description for Windows
* harbour/contrib/rdd_ads/ads1.c
* harbour/contrib/rdd_ads/adsfunc.c
* harbour/source/rdd/dbf1.c
* synced with xHarbour
* harbour/source/rtl/console.c
! fixed PROW() updating to be Clipper compatible when row number
exceed 16bit integer value
* harbour/source/rtl/filesys.c
! fixed possible GPF when hb_fsCurDirBuff()
* harbour/source/rtl/str.c
* harbour/source/rtl/strzero.c
* minor optimizations
* harbour/source/rtl/strpeek.c
! fixed accessing the last character in STRPEEK() and STRPOKE()
* harbour/include/hbgtinfo.ch
* harbour/source/rtl/gtwin/gtwin.c
+ synced with recent xHarbour modifications
* harbour/source/rtl/gtwvt/gtwvt.c
* cleaned BCC warning
* harbour/include/hbapi.h
* harbour/source/vm/codebloc.c
* declare BYTE * passed to hb_codeblockNew() as const
* harbour/include/hbpcode.h
! fixed the PCODE numbers in PCODE description, 122 was repeated for
two different PCODEs: HB_P_ONE and HB_P_MACROLIST
* harbour/source/compiler/genc.c
! fixed hb_p_functionshort pcode size returned by genc function
! fixed double value presented in verbose genc mode for HB_P_PUSHDOUBLE
! fixed number of cases presented in verbose genc mode for HB_P_SWITCH
* harbour/source/compiler/hbdead.c
+ added support for dead code elimination in functions which uses
SWITCH ...; CASE ...; ...; END syntax
* harbour/source/compiler/harbour.c
* harbour/source/compiler/hbfix.c
! fixed optimization for HB_P_PUSHLOCALNEAR and HB_P_POPLOCALNEAR.
It was a long existing bug not reported so far because 0, 1 and 2
PCODEs uses only one BYTE and bad PCODE tracing in hbfix.c didn't
caused bad side effects as long as number of locals in function
was smaller then 768. Now for functions HB_P_PUSHLOCAL and
HB_P_POPLOCAL is used and later changed to NEAR version in hbfix.c
if possible.
* harbour/source/compiler/hbfix.c
* join sequential jumps to optimize constructions like:
while ...
...
if ...
exit
endif
enddo
* harbour/source/compiler/hbdead.c
* remove HB_P_END PCODE also at the and of function if is repeated
just before, f.e. in code like (source/rtl/color53.prg):
Function RADGRDEFCO( cColor )
if isdefcolor()
Return applydefau( cColor, "W/N", "W/N", "W+/N")
Else
Return applydefau( cColor, 3, 1, 4)
endif
Return nil
Now such redundant constructions like above are fully stripped by
compiler anyhow if someone has time and think is important then can
clean also this .prg code.
* harbour/include/Makefile
* harbour/include/hbcomp.h
+ harbour/include/hbxvm.h
* harbour/source/compiler/Makefile
* harbour/source/compiler/cmdcheck.c
* harbour/source/compiler/genc.c
+ harbour/source/compiler/gencc.c
+ harbour/source/compiler/hblbl.c
* harbour/source/compiler/hbpcode.c
* harbour/source/vm/hvm.c
+ added support for generating real C code not PCODE in .c files.
Now with -gc3 Harbour will generate .c files with real .c code
which is later compiled to real machine code.
I left PCODE only for code block definitions though it's also
possible to have even code block compiled to machine code but
we will have to add a flag to codeblock structure which will
be checked at runtime and proper method of execution in EVAL
will be chosen. If you think it's worth of afford then I can
add it too in some spare time.
The final binaries are noticable longer then the one which has
only PCODE but they are faster. The speed improvement depends
on type of operations. The pure Clipper code which does not
execute any external time consuming C functions compiled with
-gc3 is from 10% to 50% faster.
The side effect of generating pure machine code is also harder
recompilation but it does not mean that is impossible. If sth
can be executed by some machines (virtual or hardware) then it
can always be decompiled by definition.
This modification opens door for farther optimization, f.e. when
we will have fully working strong type support then we can add
using native .c types.
In fact this module is PCODE to .c translater not part of compiler
and can be used as separate module to translate generated PCODE,
f.e. .hrb files.
Maybe in the future we will change the compiler to generate meta
code not directly PCODE and it will be possible to make optimizations
on this meta code which will depend on selected output type:
VHM PCODE, C code, .NET code, etc. but at this moment adding support
for .c compilation directly into compiler will make the compiler code
too much complicated for me - IMHO it's better to invest time into
clear separation to FRONT_END->REAL_COMPILER->BACK_END
Please make test with your code. I rebuild whole Harbour code with
-gc3 set in HB_FLAGS in harbour/config/rules.cf and all seems to
work correctly. hbtest returns exactly the same results.
I also made tests with my programs and they work correctly but
I had to define actions for all PCODEs and it's possible that made
some typos in some of them which are very seldom used so your tests
will be very important.