* 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
* 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.
* 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/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/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
* 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.
* harbour/ChangeLog
* fixed description in last commit. Should be HB_GTSYS() not GTSYS()
* harbour/include/hbapi.h
* fixed hb_retl() macro by adding missing parenthesis
* harbour/source/compiler/harbour.c
* removed unnecessary initialization to avoid BCC warning
* harbour/source/rtl/console.c
* harbour/source/rtl/hbgtcore.c
* do not call hb_gtOutStd()/hb_gtOutErr() when given string
has 0 length - it may cause unpredictable results in low level
hb_fsWrite() when trunc operation will be activated for non
real file handles in some systems
* harbour/source/rtl/errorint.c
* increased the error message buffer
* harbour/source/rtl/inkey.c
* fixed typo in comment
* harbour/source/rtl/gtcrs/gtcrs.c
* formatting
* harbour/config/rules.cf
* harbour/config/bsd/gcc.cf
* harbour/config/darwin/gcc.cf
* harbour/config/dos/bcc16.cf
* harbour/config/dos/djgpp.cf
* harbour/config/dos/owatcom.cf
* harbour/config/dos/rsx32.cf
* harbour/config/dos/watcom.cf
* harbour/config/linux/gcc.cf
* harbour/config/os2/gcc.cf
* harbour/config/os2/icc.cf
* harbour/config/sunos/gcc.cf
* harbour/config/w32/bcc32.cf
* harbour/config/w32/gcc.cf
* harbour/config/w32/global.cf
* harbour/config/w32/icc.cf
* harbour/config/w32/mingw32.cf
* harbour/config/w32/msvc.cf
* harbour/config/w32/rsxnt.cf
* harbour/config/w32/watcom.cf
* use F macro extension to extract file name from given macros.
It simplified some rules and allow to use vpath and differ file
locations in GNU Makefiles
* moved the BCC16 excpetion for C_RULE from global rules.cf to
DOS bcc16.cf file
* use mainstd library in MinGW build
* harbour/include/hbapi.h
+ added two new functions: hb_winmainArgInit() and hb_winmainArgGet()
to set/retrieve WinMain() parameters.
+ added hb_strMatchWildExact()
* harbour/source/pp/ppcore.c
* initialized variable to avoid compiler warning
* harbour/source/rtl/console.c
* cleaned comment
* harbour/source/rtl/hbffind.c
! Fixed invalid handle error in Windows when file() fails
(fix borrowed from xHarbour)
* harbour/source/rtl/strmatch.c
+ added hb_strMatchWildExact()
+ added 3-rd parameter <lExact> to WildMatch() - when it's TRUE
WildMatch() will check if given pattern cover the whole string.
Without it it check if pattern is valid prefix only.
* harbour/source/rtl/gtcrs/gtcrs.c
* harbour/source/rtl/gtcrs/gtcrs.h
* harbour/source/rtl/gtsln/mousesln.c
* do not call Gpm_GetSnapshot() to avoid stupid message on stderr
generated from GPM library - I lost the the hope that it will be
fixed ;-)
* harbour/source/rtl/gtpca/gtpca.c
* use select() in *nixes for cursor position terminal feedback.
* harbour/source/rtl/gtwin/gtwin.c
* try to always allocate console when compiled without
HB_NO_ALLOC_CONSOLE. It allow to use GTWIN also in real windows
programs.
+ harbour/source/rtl/gtwvt/Makefile
+ harbour/source/rtl/gtwvt/gtwvt.c
+ harbour/source/rtl/gtwvt/gtwvt.h
+ added new GT driver GTWVT - the core of this driver it's Peter Ress
work in xHarbour. In Harbour GTWVT contains only pure GT code without
local to GTWVT xHarbour extensions and GTWVT contrib libraries.
This extensions can be added but later but I want to keep them
separated from the core GTWVT code and add them as upper level GT
which can inherit from GTWVT. Just like I've implemented CTWIN.
Please update non GNU make files and test this GT in Windows.
The programs which want to use GTWVT should be compiled as standard
Windows GUI programs. GTWVT replaces window console code.
if you add to your code:
proc GTSYS()
request HB_GT_WIN
request HB_GT_WVT
return
then the final binaries will be linked with both GT drivers and you
can switch between them using //gt[:]<name> switch. F.e.:
./my_prog //gtwin
or
./my_prog //gtwvt
this feature works in all platforms.
People who works in shell environment (*nixes, MSYS, DJGPP) and use
hb* scripts does not have to use GTSYS() in source code but can simply
use -gt<name> switch in hblnk and hbmk.
* harbour/source/rtl/gtxwc/gtxwc.c
* some minor cleanups and code formatting
* harbour/source/vm/Makefile
+ harbour/source/vm/mainstd/Makefile
* moved mainstd.c to separate mainstd library for MinGW32 build.
Unfortunately MinGW always link main() function if it locate
it in libraries and ignores WinMain() what effectively makes
impossible to create Windows GUI programs if we have main() in
VM library. People who are using MinGW and wants to create only
pure console programs should now include mainstd library to linked
library list.
* harbour/source/vm/cmdarg.c
* harbour/source/vm/mainwin.c
+ added two new functions: hb_winmainArgInit() and hb_winmainArgGet()
to set/retrieve WinMain() parameters.
* include/hbpp.h
+ added 'extern' declaration
* source/compiler/hbusage.c
+ added short usage info abour /r= switch
* doc/pragma.txt
* doc/en/compiler.txt
+ added documentation about new pragmas and new /r= switch
* harbour/include/dbinfo.ch
* harbour/source/rdd/workarea.c
* added DBI_SCOPEDRELATION action. It alow to test if given
relation on current work area sets scope on child index.
F.e.: dbInfo( DBI_SCOPEDRELATION, 1 )
* harbour/include/hbapicdp.h
* harbour/source/rtl/cdpapi.c
* added optional BOOL parameter to functions which translate to UTF8
to not translate control code characters
* harbour/source/rtl/gtsln/gtsln.c
* harbour/source/rtl/gtxwc/gtxwc.c
* update for new parameter in UTF8 functions
* harbour/contrib/htmllib/default.ch
* fixed few wrong definitions - Ryszard, the definitions where wrong
but Clipper PP seems to parse them.
* harbour/contrib/rdd_ads/ads1.c
* call AdsFlushFileBuffers() only when _SET_HARDCOMMIT is set (default)
* harbour/include/Makefile
+ harbour/include/hbgfx.ch
+ harbour/include/hbgfxdef.ch
+ added hbgfx.ch, hbgfxdef.ch and missing tbrowse.ch
* harbour/include/hbapigt.h
* harbour/include/hbgtcore.h
* harbour/source/rtl/gtapi.c
* harbour/source/rtl/hbgtcore.c
+ added hb_gtGfxPrimitive(), hb_gtGfxText() - it's a work in progress
now this functions works like in xHarbour allow to draw graphic
objects in GTs which can do that (GTALLEG, GTXWC) but I plan to
introduce some modifications in them.
+ harbour/tests/gfx.prg
+ added test program by Mauricio Abre (borrowed from xHarbour) which
illustrates GFX usage
* harbour/include/hbdefs.h
* harbour/source/compiler/genc.c
* harbour/source/compiler/harbour.c
* harbour/source/vm/hvm.c
* minor modification in some harbour func name and symbol scope
definitions - I'd like to keep them in one place for easier
manipulations in the future
* harbour/source/compiler/harbour.y
* harbour/source/pp/ppcore.c
* harbour/source/pp/pplib.c
* harbour/utils/hbpp/hbpp.c
* clean a little bit recent modification it should resolve the
problem with GPFs reported by users and some possible memory
leaks when preprocessing/compilation process is interrupted.
Ryszard I decided to always store copy of file name in open
files structure - it can be used by compiler, preprocessor,
PPLIB and HBPP and IMHO in all cases it should have valid
and always initialized in the same way members for easier
manipulation. In the future I'd like to clean the whole PP
usage. I will need to keep all compiler and PP static variables
in one structure pointed by pointer in thread local data or
passed to called functions for MT support.
* harbour/source/rtl/cdpapi.c
* set 0 at the end of destination string in hb_cdpStrnToUTF8()
* harbour/source/rtl/dateshb.c
! fixed possible GPF in CTOD when badly formated date is given
* harbour/source/rtl/gtxwc/gtxwc.c
* harbour/source/rtl/gtxwc/gtxwc.h
* changed the selection code - now both PRIMARY and CLIPBOARD
selections are set by Harbour. It should work with any programs
which uses any of them but I'd like to remove one of this selections
or give user a way to chose the preferred one. I can also add support
for automatic setting/clearing/pasting PRIMARY selection by GTXWC
with mouse and shift key. I'm waiting for opinions.
+ added basic support for GFX operations
+ harbour/source/rtl/gtalleg/Makefile
+ harbour/source/rtl/gtalleg/fixedth.sfc
+ harbour/source/rtl/gtalleg/gtalleg.c
+ harbour/source/rtl/gtalleg/ssf.c
+ harbour/source/rtl/gtalleg/ssf.h
+ added new GT by Mauricio Abre based on Allegro cross platform
graphic libraries.
Code borrowed from xHarbour and modified by my for new Harbour
GT API.
* include/hbpp.h
* source/pp/ppcore.c
* source/pp/pptable.c
* fixed handling of optional clauses in command/translate
e.g.
#command PRINT TO <oPage> => [<oPage>:=]PrintPage()
* fixed <-x-> match marker
* added fixed length of command/translate/define name to
speed translation
* source/compiler/harbour.l
* fixed GPF in handling of '¯o.tekst' syntax
(introduced recently)
* harbour/bin/hb-func.sh
* added support for -L<librarypath> in xhbmk
* set the highest priority to user libraries specified by
-l<libname> linker option
* harbour/include/hbapicdp.h
* harbour/source/rtl/cdpapi.c
* added UTF8 related functions: hb_cdpUTF8StringLength(),
hb_cdpStringInUTF8Length(), hb_cdpUTF8ToStrn().
* Changed name of hb_cdpStrnToUTF() function to hb_cdpStrnToUTF8()
to avoid confusions with UTF16
* harbour/include/hberrors.h
* harbour/source/compiler/hbgenerr.c
* harbour/source/compiler/harbour.c
+ added to new errors (memory corruption and memory overflow) for
compiler level FM statistic.
* harbour/source/compiler/hbfix.c
! fixed stupid typo in copy and past which broke conditional jump
reduction
* harbour/include/hbgtcore.h
* harbour/source/rtl/hbgtcore.c
* harbour/include/hbgtinfo.ch
* harbour/source/rtl/gtdos/gtdos.c
* harbour/source/rtl/gtos2/gtos2.c
* harbour/source/rtl/gtwin/gtwin.c
* added new method to change screen buffer state (hot/cold/scroll)
and use them in some GTs.
* harbour/source/rtl/gx.c
* use screen dimensions as default values for SETMODE() not maxrow()/
maxcol()
* harbour/source/rtl/gtxwc/gtxwc.c
* harbour/source/rtl/gtxwc/gtxwc.h
* added support for clipboard
* added support for cursor shape - like in DOS/VGA
* harbour/source/rdd/workarea.c
* harbour/source/rdd/dbffpt/dbffpt1.c
* cleaned some redundant extern declarations
* xharbour/contrib/rdd_ads/ads1.c
* xharbour/contrib/rdd_ads/adsfunc.c
* removed some unnecessary #include ...
* harbour/source/rtl/str.c
* harbour/source/rtl/transfrm.c
* harbour/source/vm/itemapi.c
! fixed some small incompatibilities with Clipper in number to string
conversions
* include/hbcomp.h
* source/compiler/Makefile
* source/compiler/cmdcheck.c
* source/compiler/harbour.c
* source/compiler/harbour.y
* source/compiler/hbident.c
* even more fixes to memory leaks in the compiler
(all compiler structures are deallocated on exit now, really :)
* harbour/source/compiler/harbour.c
* do not line striping optimization when -l compiler switch
(suppress line number information) is set - in such case it's only
waste of time
* harbour/include/hbapifs.h
* harbour/source/common/hbfsapi.c
* harbour/source/compiler/cmdcheck.c
* harbour/source/pp/pplib.c
* harbour/source/rtl/filesys.c
* harbour/source/rtl/set.c
* cleaned the usage of hb_fsAddSearchPath()/hb_fsFreeSearchPath()
It fixes few possible memory leaks and GPF traps.
* harbour/source/compiler/harbour.c
* enabled FM statistic by default when compiled without:
-DHB_FM_STATISTICS_OFF
after last Ryszard modification there is no memory leak in valid
.prg code so this may help us to find some unknown problems.
* harbour/include/hbcomp.h
* harbour/source/compiler/hbpcode.c
* formatting
* harbour/source/rdd/dbcmd.c
* fixed GPF in DBF2TEXT when work are is not in use.
* harbour/source/rdd/dbfntx/dbfntx1.c
* disabled validation of unused index pages - Clipper left them
dirty so xHarbour reported that index is corrupted
* harbour/source/rtl/dbdelim.prg
* generate 2001 RT error when work area is not in used() state
before export file is created.
* harbour/source/rtl/errorapi.c
* set DOSERROR() to oError:OSCODE when RT error is generated
It's documented Clipper behavior.
* harbour/source/vm/hvm.c
* some fixes in new operators and removed unnecessary
long->double->long conventions
* harbour/include/hbapi.h
* harbour/include/hbdefs.h
* cleaned BOOL usage
* harbour/include/hbcomp.h
* harbour/include/hbpp.h
* harbour/source/compiler/harbour.l
* harbour/source/compiler/harbour.sly
* harbour/source/compiler/harbour.y
* harbour/source/pp/ppcomp.c
* harbour/source/pp/ppcore.c
* harbour/source/pp/pplib.c
* harbour/source/pp/pragma.c
* keep functions and public variables definitions in header files.
Do not use any extern ... in source code to aviod possible mistakes
! fixed some mistakes in BOOL/int declarations
* use hb_fsFreeSearchPath() to free allocated path list
* harbour/source/compiler/harbour.c
* keep functions and public variables definitions in header files.
+ added memory statistic module - it's disabled now because too
much errors is reported.
Ryszard I hope it will help in locating memory leaks in compiler.
* begun of cleaning static variables to make compiler code
ready for reentrance.
* harbour/source/rtl/gtstd/gtstd.c
! fixed cursor positioning
* harbour/config/os2/gcc.cf
+ added socket library
+ harbour/tests/ctwtest.prg
+ added CTWIN test program
+ harbour/contrib/dot/Makefile
+ added GNU Makefile
* harbour/include/Makefile
* added missing header files
* harbour/source/compiler/harbour.c
* added support for @filelst[.clp] - partially borrowed from xHarbour
It's not exactly the same as in Clipper because Clipper creates
one final file when [x]Harbour series of files.
To make it like in Clipper we will have to add support from more
then one symbol table in the final file. It will be also useful
for proper implementation of:
DO <file>
Now in [x]Harbour it works like #include <file>.prg when in Clipper
also new symbol table is created for included files. The difference
can be easy sync when current file has static functions with exactly
the same names as the one included by DO - compilation fails.
* add HB_P_ENDBLOCK to PCODE with codeblock body before run any
optimization - it fixes pcode tracing in jump optimization and
also allow to make some validation of generated PCODE
* harbour/source/rdd/dbstrux.prg
* harbour/source/rdd/dbtotal.prg
* removed not longer necessary temporary alias creation. Harbour
support empty aliases ("") like Clipper.
* harbour/source/rdd/dbffpt/dbffpt1.c
* harbour/source/rtl/hbgtcore.c
* casting
* harbour/source/rtl/gtos2/gtos2.c
! fixed hb_gt_os2_GetScreenContents()
* harbour/source/rtl/gtdos/gtdos.c
* updated copyright message with authors from removed mousedos.c
* harbour/include/hbgtcore.h
* harbour/source/rtl/hbgtcore.c
* harbour/source/compiler/harbour.c
! fixed BOLL / int typos
* harbour/source/vm/eval.c
* minor modification
* harbour/source/rdd/dbf1.c
* enable 'Y' (currency) fields - translated to HB_IT_DOUBLE
* harbour/source/rdd/dbcmd.c
! fixed some wrong behavior in SORT parameters setting in __dbArrange()
* harbour/source/rdd/dbsort.prg
! removed hack with COPY TO ... when lastrec()==1
which introduced new bugs
* harbour/source/rdd/hbdbsort.c
! fixed sort output when only one record is sorted
There are still some problems with sort like sorting numeric
fields as ASCII strings or using strcmp what will not work
with binary fields but all all this code should be rewritten
due to unacceptable performance so I left it as is to some
spare time in the future.
* harbour/source/rtl/gtwin/gtwin.c
! save cursor position at startup
* harbour/source/rtl/net.c
* harbour/source/rtl/gtos2/gtos2.c
* harbour/contrib/hgf/os2pm/os2pm.c
* some warnings cleaned and updates for new API in OS2 build
* harbour/harbour.spec
* harbour/make_bsd.sh
* harbour/make_drw.sh
* harbour/make_gnu.sh
* harbour/make_rpm.sh
* harbour/make_tgz.sh
* harbour/bin/hb-func.sh
* harbour/bin/pack_src.sh
* harbour/config/c.cf
* harbour/config/global.cf
* harbour/config/rules.cf
* harbour/config/darwin/gcc.cf
* harbour/config/darwin/global.cf
* harbour/config/dos/djgpp.cf
* harbour/config/dos/global.cf
* harbour/config/dos/install.cf
* harbour/config/dos/owatcom.cf
* harbour/config/hpux/gcc.cf
* harbour/config/hpux/global.cf
* harbour/config/linux/gcc.cf
* harbour/config/linux/global.cf
* harbour/config/linux/owatcom.cf
* harbour/config/sunos/gcc.cf
* harbour/config/w32/watcom.cf
* include ADSRDD by default in RPMs
* updated for new RPM which does not accept some old tags
* set -fPIC on 64bit platforms
+ added /etc/harbour/hb-charmap.def
* updated for new GT system and drivers
* harbour/contrib/dot/pp.prg
* harbour/contrib/dot/pp_harb.ch
* use _APMAIN as startup function
* cleaned direct access to item internals
* harbour/contrib/libct/Makefile
+ harbour/contrib/libct/ctwfunc.c
+ harbour/contrib/libct/ctwin.c
+ harbour/contrib/libct/ctwin.h
* added CT3 like Window System - it's a GT driver which inherits
from the existing one and adds CTW functionality
* harbour/contrib/libct/screen1.c
* updated for GTAPI modifications
* harbour/contrib/libnf/Makefile
* harbour/contrib/libnf/chdir.c
* harbour/contrib/libnf/mkdir.c
* harbour/contrib/libnf/rmdir.c
* use hb_fs*() API functions instead of calling DOS interrupts
Now NF dir functions works on all platforms - it will be nice
to update other functions too.
* harbour/contrib/libnf/dispc.c
* harbour/contrib/libnf/ftattr.c
* updated for GT API modifications, some of this code still depends
on EGA/VGA video buffer so will work only if user will force in GT
using it - it will be nice to rewrite them
* harbour/contrib/odbc/odbc.c
* harbour/contrib/ole/ole2.c
* casting and cleaning direct access to item internals
* harbour/contrib/rdd_ads/ads1.c
* harbour/contrib/rdd_ads/adsfunc.c
* harbour/contrib/rdd_ads/adsmgmnt.c
* synced with xHarbour
* harbour/include/Makefile
* added new header files
+ harbour/include/hbgtinfo.ch
+ added GTI_* defintions for hb_gtInfo() function.
This function works in similar way to dbInfo() in RDD.
The GTI_* definitions are taken from xHarbour "as is" and
they should be cleaned - not all functionality are supported
in Harbour and some others should be implemented in differ
way then in xHarbour.
+ harbour/include/hbgtcore.h
* harbour/include/hbapigt.h
* new GTAPI
hbgtcore.h file should not be included by user code
it's only for internal use in GT drivers
* HB_inkey_enum changed to int - this is bit field not enumerated type.
Many of C/C++ compilers forbid bit operations on enum types and
forcing it by casting which finally exceeds the enum range is defined
as bug because it may badly interacts with some compiler optimizations
* harbour/include/hbapi.h
* harbour/include/hbapicdp.h
* harbour/include/hbapierr.h
* harbour/include/hbapifs.h
* harbour/include/hbapiitm.h
* harbour/include/hbapilng.h
* harbour/include/hbapirdd.h
* harbour/include/hbdate.h
* harbour/include/hbdefs.h
* harbour/include/hbinit.h
* harbour/include/hbpcode.h
* harbour/include/hbrdddbf.h
* harbour/include/hbset.h
* harbour/include/hbstack.h
* harbour/include/hbvm.h
* harbour/include/hbvmopt.h
* harbour/include/hbvmpub.h
* separated internal and external API. Now the definitions for
internal HVM structures and functions are excluded by default
they could be enabled if user include hbvmopt.h before other
header files. Such operation should be done _ONLY_ by core
code - if 3-rd party developers make sth like that then it's
for their own risk and such code may stop to work with next
Harbour versions. Without hbvmopt.h the internal structures
like HB_ITEM, HB_DYNS, ... are mapped to 'void' so there is
no way to access their members so we can modify them in the
future without afford for 3-rd party code.
There is one small exception 'type' should be the first member
for HB_ITEM structure because I used a small ugly hack in
HB_IS_*() macros with castin PHB_ITEM to HB_TYPE* - it works
without speed overhead but if you think that it will be
better/cleaner to not use such tricks then it's enough to
change HB_ITEM_TYPE() definitions in hbvmpub.h - see note.
* cleared the usage of HB_EXPORT - to avoid problems with some C/C++
compilers we agreed that the only one common way of using HB_EXPORT
is adding it ad begining of declaration - please keep this convention
in the future.
+ added new functions:
hb_extIsObject(), hb_codeblockId(), hb_idleSleep(),
hb_fsGetOsHandle(),
hb_dynsymFindSymbol(), hb_dynsymGetSymbol(),
hb_dynsymSymbol(), hb_dynsymName(),
hb_dynsymMemvarHandle(), hb_dynsymAreaHandle(), hb_dynsymSetAreaHandle()
* changed hb_arrayClone() declaration to:
PHB_ITEM hb_arrayClone( PHB_ITEM pArray )
* changed hb_arrayFromParams() declaration to:
PHB_ITEM hb_arrayFromParams( int iLevel )
The previous version needed a pointer to stack relocatable area
so any stack resizing could cause GPF.
* harbour/include/inkey.ch
* added definitions for extended mouse keys/events and some key
combinations
* harbour/source/codepage/uc1250.c
* harbour/source/codepage/uc1251.c
* harbour/source/codepage/uc1253.c
* harbour/source/codepage/uc1257.c
* harbour/source/codepage/uc737.c
* harbour/source/codepage/uc850.c
* harbour/source/codepage/uc852.c
* harbour/source/codepage/uc866.c
* harbour/source/codepage/uc88591b.c
* harbour/source/codepage/uc8859_1.c
* harbour/source/codepage/uc8859_2.c
* harbour/source/codepage/uc8859_5.c
* harbour/source/codepage/uckoi8.c
* harbour/source/codepage/uckoi8u.c
* harbour/source/codepage/ucmaz.c
* updated unicode values for characters in rabge 1-31 to keep
DOS compatibility
* harbour/source/common/expropt1.c
* harbour/source/common/hbarch.c
* harbour/source/common/hbdate.c
* harbour/source/common/hbstr.c
* harbour/source/common/hbver.c
* keep HB_EXPORT at the beginning of function declaration
* harbour/include/hbpcode.h
* harbour/include/hbcomp.h
* harbour/source/compiler/harbour.c
* harbour/source/compiler/harbour.y
* harbour/source/compiler/hbfix.c
+ harbour/source/compiler/hbdead.c
* harbour/source/compiler/hbpcode.c
+ harbour/source/compiler/hbstripl.c
% rewritten jump optimization
! fixed some minor problems
* do not optimize jumps and local variable access by shorter
PCODE version and HB_P_NOOP when jump optimization is
disabled, this is a note I left in source code in few places:
/*
* optimizing jumps here by shorting them and setting HB_P_NOOPs
* only slow down the compilation process for three reasons:
* 1. When it's dummy jump to next instruction we need two passes
* in hb_compOptimizeJumps() to fully remove it
* 2. hb_compOptimizeJumps() also make jump shortcutting in each pass
* 3. When Jump Optimization is disabled (-kJ) then it cause slowness
* at runtime because we will have more HVM loops: first for the
* shorter jump and next for the HB_P_NOOP PCODE(s)
* [druzuz]
*/
+ added support for multi passes in jump/dead code elimination
(hb_compOptimizeJumps())
By default is set upto three passes.
Now hb_compOptimizeJumps() keeps all compiler internal data clean
on exist and can be called any times and does not change other
compiler's functions behaviors
+ added dummy jumps elimination
+ added optimization for:
IF .T.
IF .F.
WHILE .T.
WHILE .F.
etc.
* restored empty BEGIN/RECOVER sequence block elimination
if Jump Optimization is enabled then it marks the block
with HB_P_NOOPS else it cut the generated PCODE
+ added dead code eliminator (new functions hb_compCodeTraceMarkDead()/
hb_compPCodeTrace() - it works only when Jump Optimization is
not disabled)
As a result of the above we have smaller and faster PCODE.
I do not think that we will have meta code support in the reasonable
time and because I need some valid compiler data/structures like
updated table of all jumps for real C code (not PCODE in .c files)
generation then I decide to make some modifications and the above
is in practice a side effect of this work.
* harbour/source/rdd/dbcmd.c
* harbour/source/rdd/dbf1.c
* harbour/source/rdd/rddord.prg
* harbour/source/rdd/workarea.c
* harbour/source/rdd/dbfcdx/dbfcdx1.c
* harbour/source/rdd/dbffpt/dbffpt1.c
* harbour/source/rdd/dbfntx/dbfntx1.c
* harbour/source/rdd/nulsys/nulsys.c
* synced with my modifications in xHarbour
* updated for API modifications
* harbour/source/rtl/Makefile
+ added gtsys.c, gtfunc.c, hbgtcore.c
* harbour/source/rtl/accept.c
* harbour/source/rtl/alert.prg
* harbour/source/rtl/cdpapi.c
* harbour/source/rtl/console.c
* harbour/source/rtl/dates.c
* harbour/source/rtl/do.c
* harbour/source/rtl/errorapi.c
* harbour/source/rtl/errorsys.prg
* harbour/source/rtl/file.c
* harbour/source/rtl/fserror.c
* harbour/source/rtl/fstemp.c
* harbour/source/rtl/hbffind.c
* harbour/source/rtl/idle.c
* harbour/source/rtl/math.c
* harbour/source/rtl/oldclear.c
* harbour/source/rtl/strmatch.c
* harbour/source/rtl/strpeek.c
* harbour/source/rtl/valtype.c
* harbour/source/rtl/xsavescr.c
* updated for API modifications
* cleaned some compiler warnings
* harbour/source/rtl/filesys.c
+ added hb_fsGetOsHandle()
* updated for API modifications
* harbour/source/rtl/gt.c
* harbour/source/rtl/gtapi.c
* harbour/source/rtl/gtapiu.c
+ harbour/source/rtl/gtfunc.c
+ harbour/source/rtl/gtsys.c
+ harbour/source/rtl/hbgtcore.c
* harbour/source/rtl/inkey.c
* harbour/source/rtl/maxrow.c
* harbour/source/rtl/mouseapi.c
* harbour/source/rtl/setcolor.c
* harbour/source/rtl/setposbs.c
* harbour/source/rtl/shadow.c
* new GT API code
* harbour/source/rtl/saverest.c
* changed default behavior in SEVESCREEN/RESTSCREEN with parameters
out of screen range to be Clipper compatible. Added last logical
parameter to keep previous behavior for programs which begins to
use it.
* harbour/source/rtl/seconds.c
* include missing header file to fix C++ compilation
* make hb_secondsCPU global function
* harbour/source/rtl/set.c
* make HB_SET_TYPEAHEAD Clipper compatible
* harbour/source/rtl/gtcgi/Makefile
* harbour/source/rtl/gtcgi/gtcgi.c
- harbour/source/rtl/gtcgi/mousecgi.c
* rewritten for new GT API
some detail behaviors has been changed but I think the current
implementation is better for CGI programs output - please check
and fix me if necessary
* harbour/source/rtl/gtcrs/Makefile
- harbour/source/rtl/gtcrs/charmap.prg
+ harbour/source/rtl/gtcrs/chrmap.c
- harbour/source/rtl/gtcrs/debug.map
- harbour/source/rtl/gtcrs/eterm.map
* harbour/source/rtl/gtcrs/gtcrs.c
+ harbour/source/rtl/gtcrs/gtcrs.h
+ harbour/source/rtl/gtcrs/hb-charmap.def
- harbour/source/rtl/gtcrs/kbdcrs.c
- harbour/source/rtl/gtcrs/keymap.prg
- harbour/source/rtl/gtcrs/linux.map
- harbour/source/rtl/gtcrs/mousecrs.c
* new GTCRS based on my xHarbour and Flagship curses code
Please not that at runtime it looks for a file
/etc/harbour/hb-charmap.def where user can fully tune output
for his terminal. This file is included with proper path in
binaries created by make_rpm.sh and make_tgz.sh
Ryszard I've removed some of your extensions which are no longer
necessary and some other (keyboard sequence redefinition) should
be done in a little bit differ way. I would like to talk about it
when you test current code.
Added support for extended mouse keys (middle button and wheel).
* harbour/source/rtl/gtdos/Makefile
* harbour/source/rtl/gtdos/gtdos.c
- harbour/source/rtl/gtdos/mousedos.c
* rewritten for new GT API
Fixed some small problems, finished mouse code which for DJGPP
is fully Clipper compatible with real mouse SAVE/RESTORE code.
For other compilers it should be updated depending on memory
model and used DPMI driver (if any).
* harbour/source/rtl/gtos2/Makefile
* harbour/source/rtl/gtos2/gtos2.c
- harbour/source/rtl/gtos2/mouseos2.c
* rewritten for new GT API
Fixed some problems and finished the mouse code.
Please test it - I made all modifications without OS2 and
I was not able to make any test. I'm interesting in information
if it works and the speed difference - f.e. results from
tests/vidtest.prg run with previous and current version.
* harbour/source/rtl/gtpca/Makefile
* harbour/source/rtl/gtpca/gtpca.c
- harbour/source/rtl/gtpca/kbdos2.gcc
- harbour/source/rtl/gtpca/mousepca.c
* rewritten for new GT API
and finished so now it's full functional GT driver
I'm interesting in keyboard sequences used by PC-ANSI drivers
in DOS so it will be possible to implement also support for
extended keys input.
* harbour/source/rtl/gtsln/Makefile
* 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
* rewritten for new GT API basing on current xHarbour code
added support for slang 1.4x patched for UNICODE (Debian
patches used by most of current Linux distributions) and
slang 2.x - It's unicode ready, tries to detect terminal mode
(utf-8/iso) at startup and switch the internal logic to
iso/unicode mode. When compiled with slang 1.4x or 2.x
and terminal is in UTF-8 it can display all characters like
in DOS if only used font have them or good fall-back table is
loaded (f.e. the one created by QRCZAK)
Added support for extended mouse keys (middle button and wheel).
* harbour/source/rtl/gtstd/Makefile
* harbour/source/rtl/gtstd/gtstd.c
- harbour/source/rtl/gtstd/mousestd.c
* rewritten for new GT API
Now it can work as full screen GT driver redrawing the previous
screen contents from internal GT core buffers. I run with this
GT some of my programs and they work quite well ;-) of course
without colors.
* harbour/source/rtl/gtwin/Makefile
* harbour/source/rtl/gtwin/gtwin.c
- harbour/source/rtl/gtwin/mousewin.c
* updated for new GT API
+ harbour/source/rtl/gtxwc/Makefile
+ harbour/source/rtl/gtxwc/gtxwc.c
+ harbour/source/rtl/gtxwc/gtxwc.h
* new XWindow Console GT driver based on my and Giancarlo Niccolai
code form xHarbour - this GT can work in XWindow environment only
and create its own window for console output. It delays the
initialization to the moment when user try to display anything on
the screen so even without X Window system programs which uses this
GT can work as long as use only outstd/outerr output.
* harbour/source/vm/arrays.c
* updated for API modifications
+ added hb_arrayId(),
* changed hb_arrayClone() declaration to:
HB_EXPORT PHB_ITEM hb_arrayClone( PHB_ITEM pSrcArray )
* changed hb_arrayFromParams() declaration to:
PHB_ITEM hb_arrayFromParams( int iLevel )
* harbour/source/vm/arrayshb.c
* updated for API modifications
+ added new parameter iLevel to function HB_APARAMS()
* harbour/source/vm/classes.c
* harbour/source/vm/cmdarg.c
* harbour/source/vm/dynlibhb.c
* harbour/source/vm/estack.c
* harbour/source/vm/fm.c
* harbour/source/vm/garbage.c
* harbour/source/vm/maindll.c
* harbour/source/vm/maindllh.c
* harbour/source/vm/maindllp.c
* harbour/source/vm/mainstd.c
* harbour/source/vm/mainwin.c
* harbour/source/vm/memvars.c
* harbour/source/vm/pcount.c
* harbour/source/vm/proc.c
* updated for API modifications
* harbour/source/vm/codebloc.c
* updated for API modifications
+ added hb_codeblockId()
* harbour/source/vm/dynsym.c
* updated for API modifications
+ added new functions:
hb_dynsymFindSymbol(), hb_dynsymGetSymbol(),
hb_dynsymSymbol(), hb_dynsymName(),
hb_dynsymMemvarHandle(), hb_dynsymAreaHandle(), hb_dynsymSetAreaHandle()
* harbour/source/vm/eval.c
* updated for API modifications
* call hb_vmPushState()/hb_vmPopState() in hb_itemDo()/hb_itemDoC()
functions - it's necessary to make HVM reentrant safe.
* harbour/source/vm/extend.c
* updated for API modifications
+ added hb_extIsObject() similar to existing hb_extIsArray()
* harbour/source/vm/hvm.c
* updated for API modifications
+ added new functions: hb_vmPushState(), hb_vmPopState()
which save/restore HVM state (the top stack value which can be
processed and return item and maybe sth else in the future) making
HVM ready for reentrant.
* harbour/source/vm/itemapi.c
* updated for API modifications
+ added new function:
HB_EXPORT PHB_SYMB hb_itemGetSymbol( PHB_ITEM pItem );
! fixed bug in hb_itemPutNInt()
* harbour/tests/Makefile
* harbour/utils/hbdoc/Makefile
* harbour/utils/hbextern/Makefile
* harbour/utils/hbmake/Makefile
* harbour/utils/hbrun/Makefile
* harbour/utils/hbtest/Makefile
- removed badly added: dbfntx, dbfcdx, dbffpt, hbsix libraries.
what broke GNU make compilation for some compilers
This libraries should be included automatically when RDD lib
is included by *.cf files
Summary:
The whole patch (cvs diff -uN) is ~1.5MB length and I cannot describe
everything in details - sorry but it was too much modifications in
one commit so now just some of general notes.
The header files included as is does not have any information about
internal HVM structures and some functions. In practice only HB_SYMB
is public and it has to be public for .c files generated from .prg
so I force the fixed size of this structure (alignment independent)
by redefining some members to union with void * - it's a little bit
ugly trick but it effectively eliminates the problem of linking
binaries compiled with differ alignment C compiler switches.
The structures like HB_ITEM, HB_CODEBLOCK, HB_STACK, HB_DYNS are not
longer defined and pointers to the defined as void * - like in Clipper
the ITEM structure. It caused that I had to add some new functions
to make some operation still possible to implement. If I missed sth
and any of you will have a problem with your code then please inform
me about it and after a small discussion on Harbour developers list
we can decide if other functions should be added.
The internal API is still accessible. It's enough to include "hbvmopt.h"
file before other header files to enable it. Now only files in
source/vm directory include it.
The 3-rd party code which does not include hbvmopt.h (or tries to
set some internals macros) should be safe for future HVM modifications
and will work also with new binaries so 3-rd party library developers
should remember about it. If they won't then it's only their and
their clients problem not Harbour developers.
With this modifications I also create new GT model which is similar
to the one used by RDD with multi inheritance. It can be quite easy
extended to simultaneously load more then one GT subsystem (sth like
work areas in RDD) but I left it for the future when someone may
need it. hbapigt.h file now contains only information about public
functions and does not have any code which depends on current
internal implementation - it should be backword compatible as long
as somone did not try to use internal GT functions.
The internal GT system use hbgtcore.h file which should not be
included by 3-rd party code as long as someone will not make new
GT driver. The internal GT code is new so I expect that it will
be changed yet in the nearest future (I'm waiting for other developers
feedback) and in such case any 3-rd party GTs will have to be updated.
How it works:
The base GT driver (GTNUL) is fully functional GT driver which
makes all operations on memory buffer. After each screen write
Flush() method is called which check for dispcount() and if
it's 0 then call Refresh() method to update modified area by
Redraw() method. This method is dummy in GTNUL and external
output with this GT can be reached by outstd()/outerr() which
are now redirected to GT methods. A simple GT driver may overload
only Refresh() method to give full screen output.
Application can use only this GT driver and it seems to be very
good choice for GUI and background daemon/service programs.
This GT is loaded at startup then all other GTs can be loaded
later and inherit from the previously loaded GT drivers.
The new GT driver can overload as much method as wants/needs.
Now all GT operations are implemented as GT method so GT driver
can easy change their default behavior, f.e. it may fully overload
color parsing methods and use differ or extended to Clipper color
definitions.
I rewrote all existing GTs to work with new GT model.
OS2 users - please test GTOS2 which I was not able to test and
see the note in Redraw() method. If possible please make some
speed tests.
In fact now there is much more internal operations then it was
before but because they are done on memory only then current
code is much faster in this GT drivers which so far makes all
operations on real video area. I made some tests with GTNUL
and tests/vidtest.prg and the total overhead is minimal. Now
dipbegin()/dispend() in practice does not cost anything so it
gives additional speed improvement in application which extensively
use it.
More then one GT driver can be linked with final binaries and
chose on application startup by //GT<NAME> switch and/or environment
variable HB_GT=<name>
In the RTL is new GT function GTSYS() which works in similar way
to RDDSYS() in RDD subsystem and for linking default GT driver
for given platform. When RTL is compiled the default GT driver
is set to HB_GT_DEFAULT envvar and if not exist to HB_GT_LIB
envvar and if it also does not exist to hard coded platfom GTs
(see source/rtl/gtsys.c and source/rtl/Makefile for rules)
Adding to source code:
ANNOUNCE GTSYS
disable linking the default GT driver and:
REQUEST HB_GT_<name>
for linking given (<name>) GT driver, f.e.: REQUEST HB_GT_WIN
If you are working in SH environment (Linux and other *nixes users,
DJGPP bash, MinGW shell then it's possible to use -gt<name> switch
in hblnk / hbmk scripts to force linking GT drivers (it could be
repeated with different <name>) and the first one becomes the default
one. F.e.:
xhbmk -m -n -w -es2 -gtcrs -gtsln -gtstd -gtpca vidtest.prg
Usually the GT driver are loaded at HVM startup but it's possible
to load it later. I created new GT driver CTW which gives full
CT3 like Window system. The CT3 extended driver change the behavior
of some function in Clipper extended driver, f.e WRITECON() or
SETPOS() with parameters out of screen range. So I implemented it
CTW as RT GTs which is loaded when some of CTWIN function is used
(f.e. WOPEN()/WBOARD()) and inherits from any existing GT driver.
This is full CT3 WIN implementation with all detail behaviors I
found (with some CT3 bug fixes). It does not have any CT3 limitations
and can be used for any virtual screen/window size though I hardcoded
CT3 limitation for backword compatibility. If somone will want to
remove it then it will be enough to delete few lines from ctwin.c
file. I'm not CTWIN Clipper user so maybe I missed some side effects
in this driver and was not able to well test it so if you will find
any incompatibilities then please inform me.
THe default GT buffer uses 32bit character cell internally but
in savescreen/restscreen it uses VGA compatible two bytes character
cell. Some GT drivers may want to use differ character cell.
Now GTCRS and GTSLN use 32bit character cell by default. They
need additional information about character set (box/normal) to
properly display box characters. It is possible to force in this
GT drivers using Clipper compatible character cell by calling:
hb_gtInfo( GTI_COMPATBUFFER, <lCompat> ) -> <lPreviousSeting>
but in may cause that box drawing characters will be lost in
some countries after RESTSCREEN(). It will depend on used code
page.
HB_GTINFO() is new function which works in similar way to DBINFO()
in RDD. It allows to retrieve/change some of GT driver settings.
GTI_* actions are defined in hbgtinfo.ch - it has all GTI_*
definitions used in xHarbour. Now in Harbour only few of them
are implemented.
The new three .prg functions:
HB_SETKEYCP( <cTermCP> [,<cHostCP>] )
HB_SETDISPCP( <cTermCP> [,<cHostCP>] [,<lBoxChar>] )
HB_SETTERMCP( <cTermCP> [,<cHostCP>] [,<lBoxChar>] )
have been added. They set automatic input (HB_SETKEYCP)
and output (HB_SETDISPCP) (or both: HB_SETTERMCP) character
translation. They are also important for some GTs which
informing them about used internal code page for unicode
translation (GTXWC, GTSLN) and/or chosing proper character
set (standard/alternate) for letters and other (f.e. box
drawing characters) (GTCRS, GTSLN),
<cTermCP> is encoding used on external (terminal) side
<cHostCP> is encoding used internally, if not given then
current code page set HB_SETCODEPAGE() is used.
some of GTs which uses unicode output may
ignore <cTermCP>
<lBoxChar> is optional parameter which interacts with dispbox()
output disabling switching to alternate character
set in some GTs. It effectively causes that if internal
(host) code page contains some letters on the box char
positions then they will be shown also by box drawing
functions like dispbox() instead of CP437 characters.
In some cases it could be useful. By default lBoxChar
is not set and GTs which can switch between standard
and alternate character set (GTCRS, GTSLN) will try to
use alternate character set for box drawing functions.
Victor: I removed some of your functions. They can be very easy
implemented with hb_gt_GetChar()/hb_gt_PutChar() but I do not want to
make them part of documented external API because some GT drivers may
want to use absolutely differ color definitions and they will stop to
work so I do not want to make this functions documented external API.
Ryszard: Setting alternative debug keys does not longer work.
I like such possibilities but it should be implemented in differ
way to f.e. using HB_GTINFO interface to allow low level GT driver
extensions, f.e. in *nixes using CTRL+[A-Z] and SIGINT, SIGQUIT,
SIGTSTP signals for real asynchronous setting of debug/cancel flag
without keyboard polling from main HVM loop. I would like to discus
about such more general solution.
*** Please updated non GNU make files ***
* include/hbexprb.c
* source/compiler/exproptb.c
* source/macro/macrob.c
* fixed to release the memory if macro compiled code contains
a variable or a function reference
* source/rtl/filesys.c
* added missing '(' to copile correctly on UNIX'es
* include/hbpcode.h
+ Comment added about adding new pcodes at the end of
the list for compatibility.
* source/rtl/filesys.c
+ Added hb_fsSetDevMode() Unix branch added (thx Przemek)
* tests/mathtest.prg
* source/rtl/math.c
! Fixed prev commit to comply with 10char function name
rule:
HB_MATHERRMODE() -> HB_MATHERMODE()
HB_MATHERRORBLOCK() -> HB_MATHERBLOCK()
* source/rtl/seconds.c
! hb_secondsCPU() move inside FlagShip guard instead
of HB_EXTENSION.
* hb_secondsCPU() made static (Harbour level function
helper only with non-std name).
* source/vm/dynlibhb.c
* include/hbextern.ch
* LIBLOAD(), LIBFREE() moved (back) to Harbour namespace:
HB_LIBLOAD(), HB_LIBFREE()
+ Added these functions to hbextern.ch
* source/rtl/symbol.prg
* source/vm/dynsym.c
* include/hbextern.ch
* Internal function names renamed to comply and to
not collide with existing ones (mistake in prev
commit).
+ tests/symbolt.prg
; Missed from prev commit.
* source/rtl/symbol.prg
* source/vm/dynsym.c
* include/hbextern.ch
! Moved and renamed two functions from BEGINDUMP to their
proper place.
GETSYMBOLPOINTER() -> __DYNSGETPOINTER()
GETSYMBOLNAME() -> __DYNSGETNAME()
+ Added the two functions to hbextern.ch
+ TOFIX added to symbol.prg to remove the remaining one C
function inside BEGINDUMP. (Antonio, can you take a look?)
* harbour/include/hbsetup.ch
* enable HB_COMPAT_FLAGSHIP by default
I hope it will not be a problem - if it does then I can disable it
but in *nixes for a long time FlagShip was the only one Clipper
alternative and some of its functions are quite often used in
Clipper/FoxPro programs ported to *nixes so I'd want to keep it
enabled at least when HB_OS_LINUX/HB_OS_UNIX is defined.
* harbour/include/hbvm.h
+ added missing extern in hb_vmAtInit() and hb_vmAtExit() declarations
* harbour/include/hbvmpub.h
* formatting
* harbour/source/rdd/dbcmd.c
! fixed the problem with fieldput(<n>,nil) at phantom recrod reported
by Victor
* do not use C level HB_ITEM
* harbour/source/rdd/dbf1.c
* harbour/source/rdd/dbfcdx/dbfcdx1.c
* harbour/source/rdd/dbfntx/dbfntx1.c
! fixed possible GPF when "/an/existing/path/" was used as file name.
No in DOS in such case it will casue RT error that file:
/an/existing/path/.<ext>
cannot be created (like in Clipper) but in other systems (f.e. Linux)
which allow to use such file names it will work without any problems.
* harbour/source/rdd/dbffpt/dbffpt1.c
* do not use C level HB_ITEM
* harbour/source/rtl/Makefile
+ harbour/source/rtl/strpeek.c
+ added STRPEEK and STRPOKE FS functions covered by HB_COMPAT_FLAGSHIP
macro
* harbour/source/rtl/philes.c
! fixed GPF when unshareing string item buffer with embedded 0 by using
hb_itemUnShare()
* harbour/include/hbapiitm.h
* harbour/source/vm/itemapi.c
+ added hb_itemUnShare() - /* un-share given string item */
and hb_itemClone() - /* clone the given item */
+ tests/simplet.prg
* src/rtl/symbol.prg
* Embedded example code moved to the test dir.
* src/rtl/math.c
* include/hbextern.ch
* tests/mathtest.prg
* doc/en/math.txt
! HB_ prefix added for non-Clipper functions.
MATHERRMODE() -> HB_MATHERRMODE()
MATHERRORBLOCK() -> HB_MATHERRORBLOCK()
+ Above two functions added to hbextern.ch
* HB_MATHERRMODE() input validation logic moved to the lower
level function. This is a step to make this a simple Set()
* include/math.ch
+ HB_ prefix added.