* harbour/include/hbcompdf.h
* harbour/source/compiler/harbour.y
* harbour/source/compiler/harbour.yyc
+ added compile time optimization for switch statements with constant
values, i.e. for code like:
proc main()
local x := 0
switch 3
case 1; x += 100; exit
case 2; x += 200
case 3; x += 300
case 4; x += 400; exit
case 5; x += 505; exit
case 6; x += 606
otherwise; x += 1000
endswitch
? x
return
* harbour/include/blob.ch
! fixed minor typo
* harbour/source/rdd/dbffpt/dbffpt1.c
! fixed two bugs in garbage collector. One of them was critical and could
cause FPT or DBV file corruption when memoblock size was smaller then 8
bytes. Thanks to Mike Evans for self contain example.
* include/hbexprb.c
+ Allowing user defined 'gettext' functions to be used
under the names hb_i18n_gettext[_strict|_noop]_*(),
where * is a function name postfix.
* harbour/include/hbcomp.h
* harbour/source/compiler/hbmain.c
* harbour/source/compiler/hbcomp.c
* harbour/source/compiler/compi18n.c
* changed -j<path>/ and -j<file> behavior when more the one .prg file
is compiled. Now when <path>/ is used then it's respected by all
compiler .prg modules. When <file> is used then only single .pot
file is generated but it contains i18n entries from all compiled
.prg modules.
* harbour/ChangeLog
+ added two thanks notes, one to Miguel and using HeapAlloc() and
second to Walter Negro for his DATETIME work in xHarbour what gives
valuable test platform for Harbour and was important inspiration for
Harbour TIMESTAMP implementation.
* harbour/include/hbexprb.c
! modified := optimization to keep alive original LValue name
used in the assign expression. It fixes FOR / NEXT loops which
in which such optimized expression were used, f.e.:
FOR n := n + 1 TO 10; ? n; next
In fact it's only workaround for potentially bigger problem with
multiple references to single expression which we probably have to
resolve if we extend the compiler to not generate PCODE online
for each compiled statement but only after preprocessing and
optimizing at least whole function or procedure.
* harbour/ChangeLog
* removed TOVERIFY note - Viktor checked it.
* harbour/contrib/hbct/ctwin.c
! redraw windows after each WCENTER() call
* harbour/contrib/rddads/ads1.c
+ added support for ADS_VARCHAR_FOX and ADS_VARBINARY_FOX fields
in ADS_VFP tables
* harbour/include/dbinfo.ch
* harbour/include/hbrdddbf.h
* harbour/include/hbrddcdx.h
* harbour/include/hbrddnsx.h
* harbour/include/hbrddntx.h
* harbour/source/rdd/dbf1.c
* harbour/source/rdd/workarea.c
+ added support for VFP tables with VARCHAR and VARBINARY fields
+ added support for VFP tables with NULLABLE fields
+ added new dbFieldInfo() action to check if given field is NULL, f.e.:
? dbFieldInfo( DBS_ISNULL, FieldPos( <cFieldName> ) )
The above modifications were not tested with real VFP files. I do
not have VFP. VFP users should make some real life tests with tables
created by VFP.
* harbour/include/hbapi.h
* harbour/source/common/hbprintf.c
* harbour/source/common/hbstr.c
+ added hb_vsnprintf() - vsnprintf() replacement
* synced type of parameters in hb_snprintf() used for builds with and
without HB__USE_OWN_SNPRINTF
* harbour/include/hbapiitm.h
* harbour/source/vm/itemapi.c
* declared return value of hb_itemTypeStr() as const
* harbour/harbour.spec
* removed hbsqlite3 from default builds - it has to be optional due
to external dependencies in current version
* harbour/include/hbrddcdx.h
* harbour/source/rdd/dbfcdx/dbfcdx1.c
+ added support for numeric indexes which store keys as modified
32bit big endian integer values - undocumented VFP hack.
* harbour/include/hbcomp.h
* harbour/source/common/hbdate.c
* harbour/source/rtl/strmatch.c
* harbour/source/rtl/fssize.c
* harbour/source/rtl/hbffind.c
* harbour/source/rtl/filesys.c
* enabled some POSIX function added to 1.8 Linux OpenWatcom builds
and cleaned some workarounds not longer necessary
* harbour/source/rtl/hbproces.c
+ added hack with small sysconf() implementation which is still missing
in OpenWatcom 1.8. Now it's possible to build Harbour in Linux using
officially distributed OpenWatcom 1.8
* harbour/source/rtl/disksphb.c
* added TODO warning message
* harbour/source/compiler/cmdcheck.c
! fixed typo in memory freeing in repeated -p<path> options
* source/vm/Makefile
+ Enabled "amalgamated" VM lib for all compilers/platforms,
except for those where this doesn't give any advantage, or
it breaks the build, these are: pocc*, xcc, bcc, dmc.
Please note that Open Watcom 1.7 might also fail (I didn't
test), so make sure to upgrade to 1.8.
* harbour-win-spec
* harbour-wce-spec
* mpkg_win.bat
* mpkg_tgz.sh
* harbour.spec
* bin/hb-func.sh
* include/hbsetup.h
* source/vm/Makefile
* source/vm/fm.c
- source/vm/fm
- source/vm/fmmt
* utils/hbmk2/hbmk2.prg
- Removed hbfm and hbfmmt lib references. These libs are
no longer generated or used.
* Narrowed HB_FM_STATISTICS presence in various source
files. From now on the system default for all builds is
HB_FM_STATISTICS_OFF. We may change this to
HB_FM_STATISTICS_DYN_OFF if we find a solution to the
potential and actual problems with this method.
If someone needs to change mem stat default, it can be
done by ususal means.
* tests/speedtst.prg
! Fixed missing hb_progname() for non-Harbour compilers.
* include/hbextern.ch
+ Added time related new functions.
* utils/hbmk2/hbmk2.prg
+ Added -runflag: option to pass flags to target executable.
+ Started -inc (incremental link) support. It's very early
stage, don't expect it to work yet and please don't report
any problems with this feature yet.
* source/vm/asort.c
! Fixed to return Clipper compatible results when non-logical
non-numeric value is returned from ASORT() codeblock.
* utils/hbtest/rt_array.prg
* Cleaned ASORT() tests when sorting block returns constant value.
Now Clipper results aren't bent anymore, instead I've added
different expected results for Harbour and Clipper. The
difference is due to different sorting algorithms used,
here the point is to get similar *pattern* for different
invalid values.
* source/rtl/philes.c
% HB_FGETDATETIME(): Removed double call to hb_stortdt().
* contrib/hbqt/tests/hbqt.hbp
* Removed extra line at EOL.
* contrib/gtqtc/tests/hbqt.hbp
! Removed environment dependent 'libspath=' line.
Please don't add such path to Harbour SVN, since these
can differ from system to system and is also non-portable.
The correct name of the directive is: 'libpaths='.
* contrib/gtqtc/Makefile
% Removed double SVN ID.
This file needs to be updated according to hbqt latest
Makefile portability changes.
* contrib/rddads/ads1.c
* Minor formatting.
* harbour/contrib/hbqt/Makefile
* added /usr/include to list of directories scanned for QT header files
* harbour/contrib/hbole/olecore.c
! added missing return
* formatting and minor cleanup
* harbour/source/vm/arrays.c
* formatting
* harbour/source/vm/asort.c
! minor CA-Cl*pper compatibility fix - if sort codeblock returns
numeric value then it should be used as logical one (0 means FALSE)
* harbour/include/hbstack.h
* harbour/source/vm/estack.c
+ added macro to force static hb_stack declaration even if
HB_STACK_MACROS is internally used
* harbour/source/vm/initsymb.c
* harbour/source/vm/hashfunc.c
* harbour/source/vm/evalhb.c
* harbour/source/vm/pcount.c
* harbour/source/vm/runner.c
* harbour/source/vm/debug.c
* harbour/source/vm/pvalue.c
* harbour/source/vm/cmdarg.c
* harbour/source/vm/proc.c
* harbour/source/vm/eval.c
* harbour/source/vm/dynlibhb.c
* do not use hbvmopt.h if it's not necessary or use hbvmint.h instead
to clean all direct references to hb_stack variable
* harbour/include/hbexpra.c
! verify all expression POP operation for usage as LValue
* harbour/include/hbexprb.c
! fixed possible GPF in unverified send context
+ added support for IIF() usage as LValue even if it cannot be
reduced during [macro]compilation
* harbour/source/macro/macro.yyc
* harbour/source/macro/macro.y
* harbour/source/macro/macrolex.c
* removed support for some characters unsupported by Clipper in
macro expressions like chr(10) as trailing expression character, f.e.:
? &("DATE()"+chr(10))
* harbour/source/compiler/complex.c
* formatting
* harbour/doc/Makefile
! removed unexisting license.txt file
* harbour/include/hbapidbg.h
* do not export Harbour debugger functions. If someone wants to create
3-rd party debugger then we should agree the list of functions which
should be public.
* harbour/include/hbstack.h
* minor cleanup in some definitions
* harbour/include/hbdefs.h
+ added HB_DLL_ENTRY_POINT macro to set default DLL entry point for
different Windows compilers
* harbour/source/vm/maindllh.c
* harbour/source/vm/maindllp.c
* use HB_DLL_ENTRY_POINT macro
* harbour/include/hbsetup.h
* added internal macro to disable flatten optimization
* harbour/include/hbmath.h
* harbour/source/rtl/math.c
* make default math error handler function static
* harbour/include/hbatomic.h
+ added atomic inc/dec inline asm code to OW x86 builds
* harbour/source/rtl/console.c
* small code reorganization to not mix public and private function calls
* harbour/source/rtl/hbregex.c
* harbour/source/hbpcre/_hbpcreg.c
* do not use hb_xfree() function pointer directly to avoid problems
with different calling conventions.
* harbour/config/win/owatcom.cf
* harbour/config/os2/owatcom.cf
* removed unnecessary in recent OpenWatcom versions explicit wlink.lnk
including.
* INSTALL
* Moved Windows CE compilers into a separate section.
* bin/hb-mkdyn.bat
* Changes made to allow wce arch. (provision for wce arch)
* mpkg_win.bat
* Allows to override HB_ARCHITECTURE. (provision for wce arch)
+ Include arch in target directory. (provision for wce arch)
* include/hbatomic.h
- Turned off inline asm for _MSC_VER compilers in 64-bit mode. (pocc64, msvc64)
These target don't support inline asm.
This fixes previously reported regressions with these targets.
* utils/hbmk2/hbmk2.prg
% win/owatcom: Pentium Pro scheduling.
* win/owatcom: Temply set back stack calling convention.
* external/libhpdf/Makefile
- Disabled for pocc64 due to errors, even internal compiler error:
---
can't spill register variable: rcx (3) image
../../hpdf_image.c(480): fatal error: Internal error: best_spillee.
---
* config/win/bcc.cf
+ Added comment about -4, -5, -6.
* ChangeLog
! Minor fix to prev entry.
* include/hbsetup.h
% '( defined(__POCC_TARGET__) && __POCC_TARGET__ == 2 ) )'
removed altogether. WinCE is detected anyway by using _WINCE.
* external/sqlite3/Makefile
- Disabled for poccce due to errors.
* external/libpng/Makefile
! Fix to prev (poccce).
* config/win/poccce.cf
! Added -D_M_ARM.
* config/win/owatcom.cf
* Pentium Pro scheduling.
* Changed back to __cdecl calling convention from register based
until we find a way to tweak HB_EXPORT to force __cdecl for
.dll exported functions.
; TOFIX: Find out how to force __cdecl for HB_EXPORT functions in owatcom.
Or, if this is no good solution for owatcom users, or not
an option and performace is more important, we must rename
owatcom Harbour .dlls to a distinct name: harbour[mt]-11-ow.dll.
We should try to avoid that.
* config/win/bcc.cf
* -4 -> -6 for Pentium Pro instructions. Looking at the generated
code this looks like rescheduling, if someone now can test Harbour
or plain Pentium, it would be good to know if it still works.
* harbour/include/hbapi.h
* harbour/include/hbstack.h
* harbour/source/vm/estack.c
* harbour/source/vm/fm.c
+ added support for thread local memory allocators by using MSPACE
mechanism in DLALLOC.
It can be enabled by compiling Harbour with HB_FM_DLMT_ALLOC macro.
By default up to 16 (HB_MSPACE_COUNT macro) independent memory
allocators is dynamically created for new threads. When more threads
is used then allocators are shared between them and HVM tries to
balance used allocators to reduce number of threads using the
same allocator.
It should give noticeable scalability improvement in some OS-es
where default memory manages has pure MT performance.
Please try to compiler speedtst.prg with Harbour compiled with
and without HB_FM_DLMT_ALLOC and compare results in this test:
speedtst --thread=2 --scale
using real multiCPU machine.
* harbour/source/vm/dlmalloc.c
* pacified warning when FOOTERS are enabled
* harbour/source/vm/garbage.c
* cleanup comment
* harbour/include/hbvm.h
* harbour/source/vm/hvm.c
+ added void hb_vmAtQuit( HB_INIT_FUNC pFunc, void * cargo );
AtQuit functions are executed after deallocating all HVM items and
disabling .prg destructors. They can make final cleanup at C level
but should not reenter HVM.
* harbour/contrib/hbole/oleinit.c
* use hb_vmAtQuit() instead of hb_vmAtExit() - it resolves the problem
with executing destructors to OLE objects after closing OLE connection.
* harbour/contrib/hbole/olecore.c
+ added translation for VT_R4 and VT_CY values.
! fixed MT support by moving OLE error code to TSD
* harbour/source/pp/ppcore.c
! fixed line number set for C preprocessor in #pragma begindump
* harbour/include/hbcomp.h
* harbour/source/compiler/hbmain.c
* harbour/source/compiler/genc.c
* added detection of static Harbour functions in #pragma begindump
code. I do not like it because it cannot be well implemented on
other then real C compiler/preprocessor level but it's probably
better then different workarounds I see in some [x]Harbour 3-rd
party projects.
Warning this functionality is not officially supported. It's a hack
to existing #pragma begindump hack and activated only for dumped C
code. It tries to detect Harbour static functions declared by
HB_FUNC_STATIC( name ) but it does not make any real C preprocessing.
Only strips comments and strings and then looks for above statement
dividing the code to some basic tokens so it will give wrong results
for code like:
#if 0
HB_FUNC_STATIC( MYFUNC )
#else
HB_FUNC( MYFUNC )
#endif
{
hb_retc( "MyFunc" );
}
but it works correctly for simple code which does not use conditional
compilation and does not try to redefine HB_FUNC_STATIC() macro, f.e:
proc main()
? YEAR( DATE() ), MONTH( DATE() ), DAY( DATE() ), TEST()
return
#pragma begindump
#include "hbapi.h"
/* are comments stripped? If not then HB_FUNC_STATIC( DATE )
in comment can create troubles. */
// HB_FUNC_STATIC( YEAR ) just like this one in C++ comments
#define MYHB_FUNC_STATIC( fun ) #fun // to test whole word tokens
/* COMMENT */HB_FUNC_STATIC( TEST )
{
hb_retc( "HB_FUNC_STATIC( DAY )->" MYHB_FUNC_STATIC( MONTH ) );
}
#pragma enddump
Before we had wrong results for any code like:
HB_FUNC_STATIC( MYFUNC )
{
hb_retc( "MyFunc" );
}
so it's not making anything worse (I hope ;-)).
The implementation is intentionally local to -gc output to not
effect other compiler code.
* harbour/include/hbstack.h
! disabled inline assembler code to retrieve HVM stack pointer from TLS
in Win64 builds. In summary I do not even know if Win64 uses the same
memory addresses for TLS as Win32 so it's not safe to enable such code
now. Maybe in the future though I hope that new 64 bit compilers will
have fast enough native TLS support.
* harbour/include/hbclass.ch
+ added support for xBase++ method code declaration by
METHOD <clasName>:<methodName>[ ( <parameters,...> ) ]
f.e.:
METHOD TBrowse:Configure( nMode )
* harbour/source/rtl/tthreadx.prg
* harbour/source/rtl/thfuncx.prg
! fixed 0 timeout parameter in some xBase++ compatible functions
In xBase++ timeout 0 means wait forever
* harbour/tests/speedtst.prg
* update to compile with MT support using xBase++ MT .prg API.
I tested it only using Harbour by compiling this code with
-D__XPP__ macro and it works using only xBase++ MT .prg API
we are emulating.
Please make some tests with real xBase++ compiler.
+ harbour/source/rtl/tscalart.c
+ Added scalar TIMESTAMP
* harbour/source/rtl/Makefile
+ tscalart.c added
* harbour/include/hbclass.ch
* added HBTIMESTAMP scalar type to ENABLE TYPE CLASS
* harbour/source/rtl/tscalar.prg
+ added scalar class TIMESTAMP with methods to extract
parts from Timestamp:
Date(), Time(), Year(), Month(), Day(), Hour(), Minute(), Sec()
* added methods Year(), Month(), Day() to Date scalar class
* harbour/contrib/hbwin/win_ole.c
* updated for new Timestamp type
* harbour/include/hbstack.h
* added alternative asm inline function to __MINGW32__ builds which
operates on 64bit pointers. It's used when __MINGW64__ macro is
defined. I do not know if such macro existing in 64bit MinGW version.
* harbour/include/hbdefs.h
+ added HB_PTRUINT
* harbour/source/common/hbprintf.c
* used HB_PTRUINT for %p casting
* harbour/bin/hb-func.sh
! restored default optimization flag (-O3) in hb* scripts
* harbour/harbour.spec
! fixed recent modification
* harbour/contrib/rddads/ads1.c
* harbour/contrib/rddads/adsfunc.c
* harbour/contrib/hbmisc/strfmt.c
* harbour/contrib/hbcrypt/sha1.c
! fixed wrongly used C reference operator
* harbour/contrib/hbwin/win_prn2.c
* harbour/contrib/hbwin/wapi_commctrl.c
* harbour/source/vm/maindllp.c
! fixes for unicode builds
* harbour/include/std.ch
+ added SET TIME FORMAT [TO] <f>
* harbour/include/set.ch
* harbour/include/hbset.h
* harbour/source/vm/set.c
+ added _SET_TIMEFORMAT
The folowing modifiers are supported:
hh - hours
mm - minutes
ss - seconds
fff - fraction part of seconds
p - 1-st letter from PM / AM signature. When used time is shown
in 12 hour format otherwise 24 hour format is used
ex: Set( __SET_TIMEFORMAT, "hh:mm pm" )
default _SET_TIMEFORMAT value is "hh:mm:ss:fff"
+ added C function: char * hb_setGetTimeFormat( void );
* harbour/include/hbpp.h
* harbour/source/pp/ppcore.c
+ added support for timestamp constant values in the form:
t"YYYY-MM-DD HH:MM:SS.fff"
The exact accepted timestamp pattern is is:
YYYY-MM-DD [H[H][:M[M][:S[S][.f[f[f[f]]]]]]] [PM|AM]
i.e.:
tValue := t"2009-03-21 5:31:45.437 PM"
or:
YYYY-MM-DDT[H[H][:M[M][:S[S][.f[f[f[f]]]]]]] [PM|AM]
with literal "T" as date and time part delimiters (XML timestamp
format), i.e.:
tValue := t"2009-03-21T17:31:45.437"
The folowing characters can be used as date delimiters: "-", "/", "."
if PM or AM is used HH is in range < 1 : 12 > otherwise
in range < 0 : 23 >
* harbour/source/compiler/complex.c
* harbour/source/compiler/harbour.y
* harbour/source/compiler/harbour.yyc
* harbour/source/compiler/harbour.yyh
+ added support for t"YYYY-MM-DD HH:MM:SS.fff" time stamp constant
to compiler
+ added support for VFP datetime constant values:
{ ^ [ YYYY-MM-DD [,] ] [ HH[:MM[:SS][.FFF]] [AM|PM] ] }
The following characters can be used as date delimiters: "-", "/".
Dot "." as date delimiter is not supported.
There is no limit on number of characters in YYYY, MM, DD, HH, MM,
SS, FFF parts. Important is only their value. This is the format
in semi PP notation:
{ ^ <YEAR> <sep:/-> <MONTH> <sep:/-> <DAY> [[<sep2:,>]
[ <HOUR> [ : <MIN> [ : <SEC> [ . <FRAQ> ] ] ] [AM|PP] ] }
In practice it allows to also parse xHarbour datetime constant
values with compatible conditions though xHarbour support onlu "/"
as date delimiter.
NOTE: there is one important difference to VFP and xHarbour in
decoding above format. In VFP and xHarbour when date part is
missing then it's set by default to: 1899-12-30 so this code:
{ ^ 12:00 }
gived the same results as:
{ ^ 1899/12/30 12:00 }
Harbour does not set any default date value when timestamp
constant value contains only time part.
If you want we can change it for strict VFP compatiblity.
Now this extension is enabled by default for testing. In the future
it will be probably covered by HB_COMPAT_FOXPRO macro.
* harbour/source/macro/macro.yyc
* harbour/source/macro/macro.y
* harbour/source/macro/macro.yyh
* harbour/source/macro/macrolex.c
+ added support for t"YYYY-MM-DD HH:MM:SS.fff" time stamp constant
to macro compiler
* harbour/include/hbmacro.h
* harbour/source/vm/macro.c
+ added new function:
void hb_macroGenPushTimeStamp( LONG lDate, LONG lTime, HB_COMP_DECL );
* harbour/include/hberrors.h
* harbour/source/compiler/hbgenerr.c
+ added new compile time error: "Invalid timestamp constant '%s'"
* harbour/source/compiler/cmdcheck.c
* use Harbour API timestamp functions instead of calling system
functions
* harbour/include/hbpcode.h
* harbour/source/compiler/hbfix.c
* harbour/source/compiler/hbpcode.c
* harbour/source/compiler/hbdead.c
* harbour/source/compiler/genc.c
* harbour/source/compiler/gencc.c
* harbour/source/compiler/hblbl.c
* harbour/source/compiler/hbstripl.c
* harbour/source/compiler/hbopt.c
+ added new PCODE HB_P_PUSHTIMESTAMP (replaced one unused PCODE value)
to store timestamp constant values in the PCODE
* harbour/include/hbcomp.h
* harbour/source/compiler/hbmain.c
+ added new function:
void hb_compGenPushTimeStamp( LONG lDate, LONG lTime, HB_COMP_DECL );
* harbour/include/hbexprop.h
* harbour/source/common/expropt1.c
+ added new C functions:
HB_EXPR_PTR hb_compExprNewTimeStamp( LONG, LONG, HB_COMP_DECL );
* harbour/include/hbexprb.c
* harbour/include/hbcompdf.h
* harbour/source/common/expropt2.c
+ added timestamp expressions support
+ added compile time optimization for timestamp expressions
* updated function optimization for timestamp expressions
* harbour/include/hbdate.h
* harbour/source/common/hbdate.c
* changed hb_dateMilliSeconds() to return UTC julian timestamp in
milliseconds
* changed existing seconds, time and timestamp functions to operate
on common OS specific functions to eliminate possible problems
with different OS time counters
+ added new functions to operates on time and timestamp values.
See source code for details.
+ harbour/source/rtl/cputime.c
* moved double hb_secondsCPU( int n ) function to separate file
* harbour/source/rtl/seconds.c
- removed old version of date/seconds functions
* harbour/source/vm/hashes.c
* harbour/source/vm/arrays.c
+ added support for timestamp values as hash item indexes
* harbour/source/vm/hashfunc.c
+ added support for find timestamp values in hash and array items
by simple date value in AScan(), hb_HScan(), hb_AScan() and hb_RAScan()
functions when exact comparison is not used.
* harbour/source/vm/asort.c
+ added support for sorting timestamp values
* harbour/source/vm/classes.c
+ added support for timestamp scallar classes
+ added support for timestamp typed instance variables
* harbour/source/vm/memvars.c
+ added support for timestamp values in .mem files
* harbour/source/vm/estack.c
+ show timestamp values in stack dump
* harbour/include/hbapi.h
* harbour/source/vm/arrays.c
+ added new C functions:
double hb_arrayGetTD( PHB_ITEM pArray, ULONG ulIndex );
BOOL hb_arraySetTD( PHB_ITEM pArray, ULONG ulIndex, double dTimeStamp )
BOOL hb_arrayGetTDT( PHB_ITEM pArray, ULONG ulIndex,
LONG * plJulian, LONG * plMilliSec );
BOOL hb_arraySetTDT( PHB_ITEM pArray, ULONG ulIndex,
LONG lJulian, LONG lMilliSec );
* harbour/include/hbapi.h
* harbour/source/vm/extend.c
+ accept timestamp items in date functions - use only date part of
timestamp value
+ added new C functions:
double hb_partd( int iParam, ... );
BOOL hb_partdt( LONG * plJulian, LONG * plMilliSec , int iParam, ... );
void hb_rettd( double dTimeStamp );
void hb_rettdt( LONG lJulian, LONG lMilliSec );
int hb_stortd( double dTimeStamp, int iParam, ... );
int hb_stortdt( LONG lJulian, LONG lMilliSec, int iParam, ... );
* harbour/include/hbapiitm.h
* harbour/source/vm/itemapi.c
+ accept timestamp items in date functions - use only date part of
timestamp value
+ added new C functions:
char * hb_itemGetTS( PHB_ITEM pItem, char * szDateTime );
PHB_ITEM hb_itemPutTS( PHB_ITEM pItem, const char * szDateTime );
double hb_itemGetTD( PHB_ITEM pItem );
PHB_ITEM hb_itemPutTD( PHB_ITEM pItem, double dTimeStamp )
BOOL hb_itemGetTDT( PHB_ITEM pItem, LONG * plJulian, LONG * plMilliSec );
PHB_ITEM hb_itemPutTDT( PHB_ITEM pItem, LONG lJulian, LONG lMilliSec );
+ support for timestamp items in hb_itemString(), hb_itemPadConv() and
hb_itemTypeStr() functions
* harbour/include/hbvm.h
* harbour/include/hbxvm.h
* harbour/include/hbapi.h
* harbour/source/vm/hvm.c
+ added HB_IT_TIMESTAMP items
* modified HB_IT_DATE internal item structure to use common structure
with HB_IT_TIMESTAMP - it simplifies HVM code and eliminates additional
RT conditions.
+ added HB_IS_TIMESTAMP() and ISTIMESTAMP() macros
+ added HB_IS_DATETIME() and ISDATETIME() macros - they return true
if item/parameter is DATE or TIMESTAMP type.
+ added void hb_vmPushTimeStamp( long lJulian, long lMilliSec );
and xhb_vmPushTimeStamp()
+ added support for timestamp values in relational operators:
<, <=, >, >=, =, ==
When two timestamp values are compared then VM compares date and
time parts in both values.
When date and timestamp values are used in <, <=, >, >=, = operations
then VM compares only date part in both values.
When date and timestamp values are used in == operation then VM
compares date part in both values and then check if time part
of timestamp value is 0.
+ added support for timestamp values in + and - math operations.
The following rules are used in timestamp arithmetic:
<t> + <t> => <t>
<t> - <t> => <n>
<t> + <n> => <t>
<n> + <t> => <t>
<t> - <n> => <t>
<d> + <t> => <t>
<t> + <d> => <t>
<d> - <t> => <n>
<t> - <d> => <n>
When number is result or argument of timestamp operation then the
its integer part is a number of day and fractional part is the time.
* harbour/source/rtl/dateshb.c
+ added new .prg functions to mange date and timestamp values:
HB_DATETIME() -> <tTimeStamp>
HB_CTOD( <cDate> [, <cDateFormat> ] ) -> <dDate>
HB_DTOC( <dDate> [, <cDateFormat> ] ) -> <cDate>
HB_NTOT( <nValue> ) -> <tTimeStamp>
HB_TTON( <tTimeStamp> ) -> <nValue>
HB_TTOC( <tTimeStamp>, [ <cDateFormat> ] [, <cTimeFormat> ] ) ->
<cTimeStamp>
HB_CTOT( <cTimeStamp>, [ <cDateFormat> ] [, <cTimeFormat> ] ) ->
<tTimeStamp>
HB_TTOS( <tTimeStamp> ) -> <cYYYYMMDDHHMMSSFFF>
HB_STOT( <cDateTime> ) -> <tTimeStamp>
<cDateTime> should be in one of the above form:
- "YYYYMMDDHHMMSSFFF"
- "YYYYMMDDHHMMSSFF"
- "YYYYMMDDHHMMSSF"
- "YYYYMMDDHHMMSS"
- "YYYYMMDDHHMM"
- "YYYYMMDDHH"
- "YYYYMMDD"
- "HHMMSSFFF"
- "HHMMSSF"
- "HHMMSS"
- "HHMM"
- "HH"
Important is number of digits.
HB_TSTOSTR( <tTimeStamp> ) -> <cTimeStamp> // YYYY-MM-DD HH:MM:SS.fff
HB_STRTOTS( <cTimeStamp> ) -> <tTimeStamp>
<cTimeStamp> should be in one of the above form:
YYYY-MM-DD [H[H][:M[M][:S[S][.f[f[f[f]]]]]]] [PM|AM]
YYYY-MM-DDT[H[H][:M[M][:S[S][.f[f[f[f]]]]]]] [PM|AM]
The folowing characters can be used as date delimiters: "-", "/", "."
T - is literal "T" - it's for XML timestamp format
if PM or AM is used HH is in range < 1 : 12 > otherwise
in range < 0 : 23 >
HB_HOUR( <tTimeStamp> ) -> <nHour>
HB_MINUTE( <tTimeStamp> ) -> <nMinute>
HB_SEC( <tTimeStamp> ) -> <nSeconds> // with milliseconds
* harbour/source/rtl/datec.c
+ accept timestamp parameters in CMONTH() and CDOW() functions
* harbour/source/rtl/empty.c
+ added support for timestamp items
* harbour/source/rtl/itemseri.c
+ added support for timestamp items serialization
* harbour/source/rtl/minmax.c
+ added support for timestamp values to MIN() and MAX() functions.
when only one of given parameters is timestamp value and other
is date value and date parts are equal then always date item
is returned as both MIN() or MAX() value.
* harbour/source/rtl/dates.c
+ added new C functions: hb_timeFormat(), hb_timeUnformat(),
hb_timeStampFormat(), hb_timeStampUnformat()
* harbour/source/rtl/valtype.c
+ added .prg functions: HB_ISDATETIME(), HB_ISTIMESTAMP()
* harbour/source/rtl/transfrm.c
+ added support for timestamp items formatting.
+ added new function modifier @T.
When @T is used without @D then only time part of timestamp value
is formatted and return.
When @D is used without @T then only date part of timestamp value
is formatted and return.
* harbour/source/rtl/tbrowse.prg
+ display timestamp values
* harbour/source/rtl/philes.c
+ accept timestamp value as second parameter of HB_FSETDATETIME()
function
+ store file data and time in second parameter of HB_FGETDATETIME()
as timestamp value.
Old parameters (2-dDate, 3-cTime) are still supported but please think
about removing them - they are redundant.
* harbour/source/rtl/filesys.c
* updated function names
* harbour/source/rdd/dbf1.c
+ added native support for time and timestamp fields
* harbour/include/hbrddcdx.h
* harbour/include/hbrddnsx.h
* harbour/source/rdd/dbfntx/dbfntx1.c
* harbour/source/rdd/dbfcdx/dbfcdx1.c
* harbour/source/rdd/dbfnsx/dbfnsx1.c
* harbour/source/rdd/dbffpt/dbffpt1.c
+ added support for indexing timestamp fields
+ added support for using DATE values with timestamp fields
which replicate HVM behavior.
SEEK and SEEKLAST with date value when active index is on
timestamp positions to 1-st or last record where date part
of indexed timesamp value is equal.
Settings scopes to date values when active index is on timestamp
value reduce the visible record range to these ones which have
date part of timestamp value in the range of dates values used
for scopes. It possible to mix date and timestamp values in scope
and set one scope to date value and the second to timesamp.
* harbour/source/rdd/sdf1.c
* harbour/source/rdd/delim1.c
+ added support for exporting timestamp fields
* harbour/source/rdd/dbsql.c
! fixed typo in logical value export
+ export timestamp fields.
Please update the format to given SQL syntax.
* harbour/contrib/hbct/files.c
+ changed SETFDATI() to optionally accept timestamp parameter
instead of two parameters dDate and cTime
* harbour/contrib/hbct/misc1.c
+ added timestamp support to XTOC() function
* harbour/contrib/hbct/misc2.c
+ added timestamp support to COMPLEMENT() function
* harbour/contrib/hbct/dattime2.c
+ accept timestamp values in ADDMONTH(), DOY(), ISLEAP(), QUARTER()
LASTDAYOM(), WEEK() functions
* harbour/contrib/hbmzip/hbmzip.c
+ updated HB_ZipFileCreate( hZip, cZipName, tDateTime, cTime, ... )
functions to optionaly accept timestamp value in 3-rd parameter
instead od dDate, and cTime in 3-rd and 4-th parameters.
+ updated HB_UnzipFileInfo( hUnzip, @cZipName, @tDateTime, @cTime, ... )
to return timestamp value in 3-rd parameter instead of date value.
TODO: Please think about removing 4-th parameter from:
HB_ZipFileCreate( hZip, cZipName, tDateTime, cTime, ... )
HB_UnzipFileInfo( hUnzip, @cZipName, @tDateTime, @cTime, ... )
Now it's redundant.
* harbour/contrib/hbmzip/readme.txt
* updated parameters description for above functions
* harbour/contrib/hbnf/descendn.c
+ added timestamp support to FT_DESCEND() function
* harbour/contrib/hbclipsm/date.c
+ accept timestamp values in DATEASAGE(), DATEASARRAY() and DATEISLEAP()
functions
* harbour/contrib/hbmisc/dates2.c
+ accept timestamp values in ISLEAPYEAR(), DAYSINMONTH(), EOM(), BOM(),
WOM(), WOY(), EOY() and BOY() functions
The following contrib files should be updated but I'm leaving it to
other developers who want to keep this code alive:
contrib/hbtip/utils.c
contrib/hbvpdf/hbvpdf.prg
contrib/hbvpdf/hbvpdft.prg
contrib/hbwin/win_dll.c
some minor cleanups if necessary and authors will find
timestamp values usable
contrib/hbole/ole2.c
contrib/hbwin/win_ole.c
add support for timestamp values in OLE
contrib/rddado/adordd.prg
contrib/rddads/ads1.c
contrib/rddads/adsx.c
contrib/rddsql/...
add support for timestamp values in RDDs
Warning: this implementation is not xHarbour compatible. There are many
important differences. Mostly on C level and used API. Please be careful
in porting xHarbour source code to Harbour.
* harbour/include/hbatomic.h
! fixed inline assembler code for atomic inc/dec operations.
It's late and I haven't wrote anything in assembler using
Intel syntax for years.
* reenabled inline assembler code for atomic inc/dec operations
for POCC/XCC builds - such version should work. Please check.
* include/hbatomic.h
! Typo (__inline__ -> __inline).
! Temply disabled new _MSC_VER inline asm code, because it causes this with POCC5:
include\hbatomic.h(268): error #3114: [asm] Invalid combination of opcode and operands.
include\hbatomic.h(273): error #3114: [asm] Invalid combination of opcode and operands.
* harbour/include/hbatomic.h
+ added atomic inc/dec inline assembler code for 32bit MSVC builds
and probably also to other compilers which defines _MSC_VER
macro (XCC/POCC). Thanks to Viktor for help. Please make some tests.
* harbour/source/compiler/hbopt.c
! disabled one assert() in PCODE optimization code.
Mindaugas, I left note which explains why.
* include/hbdefs.h
+ Enabled new Harbour types. Still incomplete, and relying
on old unsafe types in places.
* contrib/gtwvg/gtwvg.c
! Warning.
* contrib/gtwvg/wvgcuig.c
! Cast errors.
* config/win/msvc.cf
+ Enabled C++ mode. This should result in stricter compiler
warnings/errors, and also enables to use standard init
method (non-C++ method is broken when using LTCG
and potentially in other scenarios like IA64). Note, this
doesn't mean we'd allow non-ANSI C usage inside Harbour,
so no C++ features are allowd. This won't cause any
drawbacks for the user AFAIK, if you know otherwise, pls
speak up. [Notice that we're using C++ mode for owatcom
on all platforms.]
* doc/whatsnew.txt
+ Documented win/owatcom and OpenSSL incompatibility.
(maybe it can be resolved, I didn't spend time on it)
* INSTALL
* C compiler -> ANSI C compiler.
* contrib/hbgt/strasint.c
% Using HB_ISDIGIT()
! Fixed to not include hbtrace.h directly.
* make_gnu.bat
% make clean and install phases merged in HB_BUILD_DLL mode.
* bin/postinst.bat
! Fix to recent change.
* include/hbdefs.h
! Moved #include hbtrace.h after HB_EXPORT is defined.
(hack)
* make_gnu_xmingwce.sh
- Disabled modifying PATH when host OS is Windows.
; NOTE: Hack.
* include/hbtrace.h
+ Added HB_EXPORT.
* doc/whatsnew.txt
* contrib/hbfimage/fi_winfu.c
* contrib/hbfimage/fi_wrp.c
* contrib/hbfimage/Makefile
- Restored previous state, because latest changed addressing
Linux build failure were causing problems for the Windows
platform.
; TOFIX: We must clean our types, to avoid these problems
and all bad hacks to work it around.
* mpkg_win.bat
* mpkg_win.nsi
+ Added files ChangeLog, TODO, ERRATA, INSTALL to root dir.
* Some changed to batch targeting robustness for situations
which cannot normally happen in normal cases, but it's
useful for debugging.
* source/compiler/hbusage.c
+ Added -u+ to help screen.
* One remaining non-ASCII char cleaned from credit list.
* include/hbpp.h
* source/pp/ppcore.c
! Renamed HB_PP_MAX_REPATS to HB_PP_MAX_REPEATS.
* ChangeLog
* Added one line to my prev entry.
* harbour/include/hbcompdf.h
* harbour/source/compiler/cmdcheck.c
* harbour/source/compiler/hbcomp.c
* harbour/source/compiler/ppcomp.c
+ added support for extended definition files in Harbour compiler
switches: -u+<file>
This option can be repeated if user wants to use more then one
file with extended definitions. The definitions are added after
standard ones and after defines specified by -D<name>[=<value>]
Harbour compiler switch.
The behavior of -u[<file>] remains unchanged and -u or -u<file>
can can be used together with -u+<file>.
Note for xHarbour users: it's not exactly the same behavior as
in xHarbour compiler.
! fixed memory leak when repeated -u[<file>] options are used.