2008-04-13 22:16 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* utils/hbtest/make_c5x.bat
* utils/hbtest/hbtest.prg
* utils/hbtest/rt_miscc.c
* utils/hbtest/rt_misc.prg
- Removed dependency on hbclip.
+ Added proper C version of hb_SToD() for C5.x compiles.
(Needs MSC)
! Refixed hb_SToD() results messed up in my previous
commit. Sorry for the confusion, Harbour was perfectly
100% compatible, the reference values were wrong in
default HBTEST for CA-Cl*pper.
+ Disabling hb_SToD() tests with invalid input values
for CA-Cl*pper in case there was no C compiler available
when building HBTEST. This is to avoid any invalid
results (due to the .prg version of hb_SToD() and to
avoid confusions such as above.
This commit is contained in:
@@ -8,6 +8,24 @@
|
||||
2008-12-31 13:59 UTC+0100 Foo Bar <foo.bar@foobar.org>
|
||||
*/
|
||||
|
||||
2008-04-13 22:16 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
|
||||
* utils/hbtest/make_c5x.bat
|
||||
* utils/hbtest/hbtest.prg
|
||||
* utils/hbtest/rt_miscc.c
|
||||
* utils/hbtest/rt_misc.prg
|
||||
- Removed dependency on hbclip.
|
||||
+ Added proper C version of hb_SToD() for C5.x compiles.
|
||||
(Needs MSC)
|
||||
! Refixed hb_SToD() results messed up in my previous
|
||||
commit. Sorry for the confusion, Harbour was perfectly
|
||||
100% compatible, the reference values were wrong in
|
||||
default HBTEST for CA-Cl*pper.
|
||||
+ Disabling hb_SToD() tests with invalid input values
|
||||
for CA-Cl*pper in case there was no C compiler available
|
||||
when building HBTEST. This is to avoid any invalid
|
||||
results (due to the .prg version of hb_SToD() and to
|
||||
avoid confusions such as above.
|
||||
|
||||
2008-04-13 21:59 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
|
||||
* source/rtl/mod.c
|
||||
! Fixed error object to be C5x compatible when wrong or too
|
||||
|
||||
@@ -578,7 +578,7 @@ FUNCTION HB_SToD( cDate )
|
||||
RETURN SToD( cDate )
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_HBCLIP
|
||||
#ifdef RT_NO_C
|
||||
#ifndef __HARBOUR__
|
||||
#ifndef __XPP__
|
||||
|
||||
|
||||
@@ -3,14 +3,6 @@ rem
|
||||
rem $Id$
|
||||
rem
|
||||
|
||||
if not exist ..\..\contrib\hbclip\hbclip.lib goto NO_HBCLIP
|
||||
|
||||
set HB_CLIPOPT=%HB_CLIPOPT% /DHAVE_HBCLIP
|
||||
set HB_LINKOPT=li hbclip
|
||||
set LIB=..\..\contrib\hbclip\;%LIB%
|
||||
|
||||
:NO_HBCLIP
|
||||
|
||||
rem ; TODO: Use /FPi when HB_COMPAT_C53=1
|
||||
%HB_MSC_DIR%\cl.exe /c /AL /Zl /Oalt /Gs /FPa /W3 /G2 rt_miscc.c
|
||||
|
||||
|
||||
@@ -539,6 +539,7 @@ FUNCTION Main_MISC()
|
||||
}
|
||||
*/
|
||||
|
||||
#ifndef RT_NO_C
|
||||
#ifndef __XPP__
|
||||
TEST_LINE( HB_SToD() , HB_SToD(" ") )
|
||||
#endif
|
||||
@@ -551,27 +552,28 @@ FUNCTION Main_MISC()
|
||||
TEST_LINE( HB_SToD(" 1234567") , HB_SToD(" ") )
|
||||
TEST_LINE( HB_SToD("1999 ") , HB_SToD(" ") )
|
||||
TEST_LINE( HB_SToD("99999999") , HB_SToD(" ") )
|
||||
TEST_LINE( HB_SToD("99990101") , HB_SToD(" ") )
|
||||
TEST_LINE( HB_SToD("99990101") , HB_SToD("99990101") )
|
||||
TEST_LINE( HB_SToD("19991301") , HB_SToD(" ") )
|
||||
TEST_LINE( HB_SToD("19991241") , HB_SToD(" ") )
|
||||
TEST_LINE( HB_SToD("01000101") , HB_SToD("01000101") )
|
||||
TEST_LINE( HB_SToD("29991231") , HB_SToD("29991231") )
|
||||
TEST_LINE( HB_SToD("19990905") , HB_SToD("19990905") )
|
||||
TEST_LINE( HB_SToD(" 9990905") , HB_SToD("09990905") )
|
||||
TEST_LINE( HB_SToD(" 990905") , HB_SToD("19990905") )
|
||||
TEST_LINE( HB_SToD(" 90905") , HB_SToD("19090905") )
|
||||
TEST_LINE( HB_SToD(" 9990905") , HB_SToD(" ") )
|
||||
TEST_LINE( HB_SToD(" 990905") , HB_SToD(" ") )
|
||||
TEST_LINE( HB_SToD(" 90905") , HB_SToD(" ") )
|
||||
TEST_LINE( HB_SToD(" 0905") , HB_SToD(" ") )
|
||||
TEST_LINE( HB_SToD(" 905") , HB_SToD(" ") )
|
||||
TEST_LINE( HB_SToD(" 05") , HB_SToD(" ") )
|
||||
TEST_LINE( HB_SToD("1 990905") , HB_SToD(" ") )
|
||||
TEST_LINE( HB_SToD("19 90905") , HB_SToD(" ") ) /* Bug in C5.x. They return "19190909". */
|
||||
TEST_LINE( HB_SToD("199 0905") , HB_SToD(" ") ) /* Bug/feature in C5.x. They return "01990905". */
|
||||
TEST_LINE( HB_SToD("1999 905") , HB_SToD("19990905") )
|
||||
TEST_LINE( HB_SToD("19 90905") , HB_SToD("17490905") )
|
||||
TEST_LINE( HB_SToD("199 0905") , HB_SToD("19740905") )
|
||||
TEST_LINE( HB_SToD("1999 905") , HB_SToD(" ") )
|
||||
TEST_LINE( HB_SToD("19990 05") , HB_SToD(" ") )
|
||||
TEST_LINE( HB_SToD("199909 5") , HB_SToD("19990905") )
|
||||
TEST_LINE( HB_SToD("199909 5") , HB_SToD(" ") )
|
||||
TEST_LINE( HB_SToD("1999090 ") , HB_SToD(" ") )
|
||||
TEST_LINE( HB_SToD("1999 9 5") , HB_SToD("19990905") )
|
||||
TEST_LINE( HB_SToD("1999 9 5") , HB_SToD(" ") )
|
||||
TEST_LINE( HB_SToD("1999090" + Chr(0)) , HB_SToD(" ") )
|
||||
#endif
|
||||
|
||||
/* DESCEND() */
|
||||
|
||||
|
||||
@@ -61,3 +61,15 @@ RT_FUNDEF( R_PASSENLC )
|
||||
{
|
||||
_retnl( 1000000000L );
|
||||
}
|
||||
|
||||
#ifndef __HARBOUR__
|
||||
#ifndef __XPP__
|
||||
|
||||
CLIPPER HB_STOD( void )
|
||||
{
|
||||
// The length check is a fix to avoid buggy behaviour of _retds()
|
||||
_retds( ( ISCHAR( 1 ) && _parclen( 1 ) == 8 ) ? _parc( 1 ) : " " );
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user