* 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.
* include/hbapifs.c
* src/rtl/filesys.c
! hb_fsSetDevMode() fixed back to return a BOOL value
to be compatible with the CA-Cl*pper undocumented
_tdevraw() function. (hb_fsSetDevMove() is mapped
to _tdevraw() in hbundoc.api, it's the documented
version of the same functionality)
Also fixed warning and error for one of the dummy
platform branches.
Since this came from xHarbour it pbly needs to be
fixed there too.
* tests/Makefile
+ symbolt.prg added
* xharbour/include/hbvmpub.h
* changed definition of HB_SYMB structure.
HB_SYMBOLSCOPE cScope
replaced by:
union
{
HB_SYMBOLSCOPE value; /* the scope of the symbol */
void * pointer; /* filler to force alignment */
} scope;
This modification should only force the same alignment independently
on used compiler alignment switches or executed #pragma pack*
It's important to keep this structure with fixed size because it's
used in .c files generated from .prg code.
The code with #pragma pack* removed - it should not be longer
necessary but please make a real tests with different compiler
alignment switches
* harbour/contrib/btree/hb_btree.c
* harbour/contrib/rdd_ads/ads1.c
* harbour/contrib/runjava/runjava.c
* harbour/source/compiler/genc.c
* harbour/source/rdd/dbf1.c
* harbour/source/rdd/delim1.c
* harbour/source/rdd/sdf1.c
* harbour/source/rdd/dbfcdx/dbfcdx1.c
* harbour/source/rdd/dbfdbt/dbfdbt1.c
* harbour/source/rdd/dbffpt/dbffpt1.c
* harbour/source/rdd/dbfntx/dbfntx1.c
* harbour/source/vm/dynsym.c
* harbour/source/vm/hvm.c
* harbour/source/vm/initsymb.c
* harbour/source/vm/runner.c
* updated for modified HB_SYMB structure.
* harbour/source/common/expropt2.c
* casting
* harbour/include/hbdate.h
+ added hb_dateJulianDOW() - retrieve day of week from Julian's date
* harbour/source/rtl/dates.c
* harbour/source/common/hbdate.c
* moved hb_dateDOW(), hb_dateDecStr() and hb_dateEncStr() to
hbdate.c - Ryszard I'd prefer to keep this function together
It will be much easier to update them.
+ added HB_STR_DATE_BASE for conversion to string - Clipper
compatibility though we are not 100% Clipper compatible in STOD()
because we will have to reduce functionality (supported date
range) to reach it. In Clipper STOD(DTOS()) is not revertible.
I decided to make it revertible in [x]Harbour for the whole supported
in string conversion range: 0000/01/01 : 9999/01/01
% optimized hb_dateEncode()
* some minor fixes for Clipper compatibility
* harbour/source/rtl/dateshb.c
* use faster and Clipper compatible hb_dateJulianDOW() instead of
hb_dateDOW()
* harbour/source/rdd/nulsys/Makefile
- harbour/source/rdd/nulsys/nulsys.prg
+ harbour/source/rdd/nulsys/nulsys.c
* replaced .prg code with #pragma begindump/enddump by native C code
rtl/symbol.prg have to be updated yet.
* harbour/source/rdd/dbf1.c
* harbour/source/rdd/dbffpt/dbffpt1.c
* synced with xHarbour
* hrbdll.vc
* makefile.nt
* makefile.vc
* makefile64.nt
* Change -o linker option to /OUT: to avoid warning with
MS Visual Studio 2005 compiler tools.
+ Added -D_CRT_SECURE_NO_DEPRECATE to suppress the many
new MS warnings about unsafe function usage.
; NOTE: MSVC 14.0 fails to compile macroy.c
; NOTE: Still tons of warnings, but other than these it
compiles fine.
* source/codepage/cdpsl437.c
! Fixed wrong escape char (\ -> \\).
* include/hbsetup.ch
* source/common/hbverdsp.c
+ Added CLIP compatibility switch.
* include/hbextern.ch
+ Updated (somewhat).
* source/rtl/strmatch.c
* source/rdd/rddord.prg
! WILDMATCH() renamed to HB_WILDMATCH()
* source/rdd/rddord.prg
! ORDWILDSEEK() guarded with HB_COMPAT_XPP
* source/rtl/seconds.c
! SECONDSCPU guarded with HB_COMPAT_FLAGSHIP
* include/hbcomp.h
* include/hberrors.h
* include/hbexpra.c
* include/hbexprb.c
* include/hbexprop.h
* include/hbhash.h
* include/hbmacro.h
* include/hbpcode.h
* source/common/Makefile
* source/common/expropt1.c
* source/common/expropt2.c
* source/common/hbhash.c
* source/compiler/expropta.c
* source/compiler/exproptb.c
* source/compiler/genc.c
* source/compiler/harbour.c
* source/compiler/harbour.l
* source/compiler/harbour.y
* source/compiler/hbfix.c
* source/compiler/hbgenerr.c
* source/compiler/hbident.c
* source/compiler/hbpcode.c
* source/macro/macro.l
* source/macro/macro.y
* source/macro/macroa.c
* source/macro/macrob.c
* source/rtl/dates.c
* source/vm/hvm.c
* source/vm/macro.c
+ source/common/hbdate.c
+ tests/ddate.prg
+ tests/switch.prg
+added support for DATE type constants in the following format:
0dYYYYMMDD
for example (see tests/ddate.prg for more):
IF( dDate > 0d20051112 )
+added support for SWITCH command (see tests/switch.prg)
SWITCH <expr>
CASE <integer_expression>
...
[EXIT]
CASE <string_expression>
...
[EXIT]
[OTHERWISE]
...
END
Notice:
- Integer and string expressions can be mixed in a single
SWITCH command with no runtime errors;
- CASE expression have to be resolved at compile time and
the result has to be either an integer or string constant
- if there is no EXIT statement then next CASE is executed
(or OTHERWISE for the last CASE)
For example:
CASE 1+32+2*4
CASE CHR(64)
CASE ASC('A')
CASE "A"+CHR(13)
Notice:
The above changes apply only to FLEX version!
* harbour/source/vm/garbage.c
- removed unnecessary memset()
* harbour/source/vm/hvm.c
% use startup initialized symbols: hb_symEnumIndex, hb_symEnumBase,
hb_symEnumValue instead of strcmp( pSym->szName, ... ) in hb_vmSend()
% remove unnecessary temporary item in hb_vmEnumStart() and use
hb_itemMove() instead of hb_itemCopy()+hb_itemClear()
% changed main VM loop to eliminate one comparision done on each
loop. Now HB_P_ENDBLOCK and HB_P_ENDPROC pcodes set HB_ENDPROC_REQUESTED
and the main loop can be exited only from one place. It gives some
small but noticeable speed improvement.
Ryszard please check this modification. AFAIK it should not cause
any bad side effect and IMHO the code is cleaner now.
* harbour/source/vm/itemapi.c
% removed two unnecessary hb_itemClear() before hb_itemRelease()
* include/hbapi.h
* include/hbapiitm.h
* include/hbcomp.h
* include/hberrors.h
* include/hbexpra.c
* include/hbpcode.h
* include/hbsetup.h
* source/common/expropt1.c
* source/compiler/expropta.c
* source/compiler/genc.c
* source/compiler/gencli.c
* source/compiler/harbour.c
* source/compiler/harbour.l
* source/compiler/harbour.y
* source/compiler/hbfix.c
* source/compiler/hbgenerr.c
* source/compiler/hbpcode.c
* source/macro/macroa.c
* source/vm/hvm.c
* source/vm/itemapi.c
+ tests/foreach.prg
+ added support for FOR EACH loop
FOR EACH var1 [,var255] IN expr1 [,expr255] [DESCEND]
NEXT
Note:
-expr can be a string or an array
if it is a string then assigments to the control
variable does not change the string
-after the loop the controlling variable(s) store the
value which they had before entering the loop
-the controlling variable supports the following properties
:__enumindex - the loop counter for variable
:__enumbase - the value that is being traversed
:__enumvalue - the value of variable
-see tests/foreach.prg for examples
+ added warnings in cases of duplicated loop variables
eg. FOR i:=1 TO 5
FOR i:=i TO i+5
-removed strong typing in the compiler (xHarbour too)
(reactivate it by compiling with -DHB_COMP_STRONG_TYPES)
NOTE:
The new pcodes were added - rebuild everything
* harbour/make_gnu.sh
+ harbour/make_xmingw.sh
* harbour/bin/hb-mkslib.sh
* harbour/bin/postinst.sh
* harbour/config/w32/mingw32.cf
* added support for cross compilation (Windows binaries at Linux) with
MinGW - borrowed from xHarbour Phil Krylov solution
* harbour/contrib/btree/hb_btree.c
* casting
* harbour/contrib/libct/files.c
! fixed iAttr initialization in SETFATTR()
* harbour/contrib/ole/ole2.c
! fixed names of included files
* harbour/contrib/rdd_ads/ace.h
* cover #pragma warning( error : 4706 ) by !defined( __GNUC__ )
* harbour/include/hbapi.h
* harbour/include/hbdefs.h
+ harbour/source/common/hbarch.c
* harbour/source/common/Makefile
* added functions for machine independent double and long long conversions
(my code borrowed from xHarbour)
* harbour/include/hbapifs.h
* synced file IO with xHarbour - it fixes some problems, adds some
missing functionality and long (64bit) file support for Windows.
For Linux I added it some time ago.
* harbour/include/hbcomp.h
* changed 'char cScope' to 'HB_SYMBOLSCOPE cScope'
* harbour/source/common/hbfsapi.c
! fixed some possible buffer overflow
* harbour/source/common/hbstr.c
* synced with xHarbour
* harbour/source/common/hbver.c
+ added hb_iswinnt() (borrowed from xHarbour)
* harbour/source/compiler/cmdcheck.c
+ added -undef: compiler switch (borrowed from xHarbour)
* harbour/source/compiler/gencobj.c
* cleanup
* harbour/source/pp/ppcore.c
! fixed path delimiters in included file names
* harbour/source/rtl/Makefile
+ harbour/source/rtl/fserror.c
+ added C -> OS file error trnalsations - not perfect but better then
the used hacks (borrowed from xHarbour)
* harbour/source/rtl/file.c
* use hb_fileNameConv() instead of hb_filecase() - hb_fileNameConv()
is the only one function to make file name conversions dependent on
some SETs.
* harbour/source/rtl/filesys.c
* synced file IO with xHarbour - it fixes some problems, adds some
missing functionality and long (64bit) file support for Windows.
For Linux I added it some time ago.
* harbour/source/rtl/fstemp.c
* synced with xHarbour
* harbour/source/rtl/strings.c
* use ULONG instead of size_t in hb_strnicmp declaration - we have to
decide what we should use. Using size_t or its Harbour version f.e.
HB_SIZE_T seems to be reasonable but it has to be global - redefining
single functions does not make sense and will create troubles only.
* harbour/include/hbapi.h
* harbour/include/hbapiitm.h
* harbour/include/hbapirdd.h
* harbour/include/hbdefs.h
* harbour/include/hbtypes.h
* harbour/source/rtl/empty.c
* harbour/source/vm/arrays.c
* harbour/source/vm/extend.c
* harbour/source/vm/hvm.c
* harbour/source/vm/itemapi.c
* harbour/source/vm/maindllp.c
+ added HB_TYPE to as HB_ITEM type marker.
* set HB_TYPE as UINT32
* updated to the above modifications
* cleaned some ~HB_IT_BYREF which has no effect in current VM