2007-06-27 19:00 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/common.mak
! removed double quotas from files extension definitions
Neither Borland make nor NMake can accept them, sorry my
fault but I used to work with GNU make
* harbour/makefile.vc
- removed recently added by J. Lefebvre Mafact alternative verion
of file extnesions. Thank you for your help but it was my mistake
and the default definitions in common.mak should not use quotas
* harbour/source/rtl/datesx.c
* harbour/source/common/hbdate.c
* accept date strings longer then 8 characters in STOD() just like
in CT3
* changed casting in date decoding code to be strict Clipper compatible
and cover date string validation by HB_C52_STRICT macro.
Now STOD() can give _EXACTLY_ the same results as Clipper for wrong
date strings if you disable code covered by #ifndef HB_C52_STRICT
in hb_dateStrGet(). It fixes errors reported by hbtest in:
stod("19 90905") -> "17490905"
stod("199 0905") -> "19740905"
but I do not know if you want to have it as default.
* harbour/source/rtl/gtsln/gtsln.c
! fixed variable declaration to be ANSI C compatible
This commit is contained in:
@@ -8,13 +8,37 @@
|
||||
2002-12-01 13:30 UTC+0100 Foo Bar <foo.bar@foobar.org>
|
||||
*/
|
||||
|
||||
2007-06-27 16:00 UTC+0200 J. Lefebvre Mafact (jfl/at/mafact.com)
|
||||
2007-06-27 19:00 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/common.mak
|
||||
! removed double quotas from files extension definitions
|
||||
Neither Borland make nor NMake can accept them, sorry my
|
||||
fault but I used to work with GNU make
|
||||
* harbour/makefile.vc
|
||||
- removed recently added by J. Lefebvre Mafact alternative verion
|
||||
of file extnesions. Thank you for your help but it was my mistake
|
||||
and the default definitions in common.mak should not use quotas
|
||||
|
||||
* harbour/source/rtl/datesx.c
|
||||
* harbour/source/common/hbdate.c
|
||||
* accept date strings longer then 8 characters in STOD() just like
|
||||
in CT3
|
||||
* changed casting in date decoding code to be strict Clipper compatible
|
||||
and cover date string validation by HB_C52_STRICT macro.
|
||||
Now STOD() can give _EXACTLY_ the same results as Clipper for wrong
|
||||
date strings if you disable code covered by #ifndef HB_C52_STRICT
|
||||
in hb_dateStrGet(). It fixes errors reported by hbtest in:
|
||||
stod("19 90905") -> "17490905"
|
||||
stod("199 0905") -> "19740905"
|
||||
but I do not know if you want to have it as default.
|
||||
|
||||
* harbour/source/rtl/gtsln/gtsln.c
|
||||
! fixed variable declaration to be ANSI C compatible
|
||||
|
||||
2007-06-27 16:00 UTC+0200 J. Lefebvre Mafact (jfl/at/mafact.com)
|
||||
* harbour/makefile.vc
|
||||
* Setting file extensions variables without double quotes for nmake
|
||||
Will overide those in common.mak
|
||||
|
||||
|
||||
2007-06-27 10:05 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/source/rtl/hbgtcore.c
|
||||
* harbour/source/rtl/gtdos/gtdos.c
|
||||
|
||||
@@ -21,23 +21,23 @@
|
||||
# binary file suffixes and prefixes
|
||||
#
|
||||
!ifndef OBJEXT
|
||||
OBJEXT=".obj"
|
||||
OBJEXT=.obj
|
||||
!endif
|
||||
|
||||
!ifndef EXEEXT
|
||||
EXEEXT=".exe"
|
||||
EXEEXT=.exe
|
||||
!endif
|
||||
|
||||
!ifndef DLLEXT
|
||||
DLLEXT=".dll"
|
||||
DLLEXT=.dll
|
||||
!endif
|
||||
|
||||
!ifndef LIBEXT
|
||||
LIBEXT=".lib"
|
||||
LIBEXT=.lib
|
||||
!endif
|
||||
|
||||
!ifndef LIBPREF
|
||||
LIBPREF=""
|
||||
LIBPREF=
|
||||
!endif
|
||||
|
||||
#**********************************************************
|
||||
|
||||
@@ -149,29 +149,6 @@ LDFLAGSDLL = /DEBUG $(LDFLAGSDLL)
|
||||
# Include Common Object list files
|
||||
# shared between Msvc and Borland
|
||||
|
||||
#
|
||||
# binary file suffixes and prefixes for nMake !!!
|
||||
#
|
||||
!ifndef OBJEXT
|
||||
OBJEXT=.obj
|
||||
!endif
|
||||
|
||||
!ifndef EXEEXT
|
||||
EXEEXT=.exe
|
||||
!endif
|
||||
|
||||
!ifndef DLLEXT
|
||||
DLLEXT=.dll
|
||||
!endif
|
||||
|
||||
!ifndef LIBEXT
|
||||
LIBEXT=.lib
|
||||
!endif
|
||||
|
||||
!ifndef LIBPREF
|
||||
LIBPREF=
|
||||
!endif
|
||||
|
||||
!include common.mak
|
||||
|
||||
#**********************************************************
|
||||
|
||||
@@ -166,16 +166,26 @@ HB_EXPORT void hb_dateStrGet( const char * szDate, int * piYear, int * piMonth,
|
||||
{
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_dateStrGet(%s, %p, %p, %p)", szDate, piYear, piMonth, piDay));
|
||||
|
||||
if( szDate && szDate[ 8 ] == '\0' )
|
||||
#if !defined( HB_C52_STRICT )
|
||||
if( szDate[ 0 ] >= '0' && szDate[ 0 ] <= '9' &&
|
||||
szDate[ 1 ] >= '0' && szDate[ 1 ] <= '9' &&
|
||||
szDate[ 2 ] >= '0' && szDate[ 2 ] <= '9' &&
|
||||
szDate[ 3 ] >= '0' && szDate[ 3 ] <= '9' &&
|
||||
szDate[ 4 ] >= '0' && szDate[ 4 ] <= '9' &&
|
||||
szDate[ 5 ] >= '0' && szDate[ 5 ] <= '9' &&
|
||||
szDate[ 6 ] >= '0' && szDate[ 6 ] <= '9' &&
|
||||
szDate[ 7 ] >= '0' && szDate[ 7 ] <= '9' )
|
||||
#endif
|
||||
{
|
||||
/* Date string has correct length, so attempt to convert */
|
||||
*piYear = ( ( USHORT ) ( szDate[ 0 ] - '0' ) * 1000 ) +
|
||||
( ( USHORT ) ( szDate[ 1 ] - '0' ) * 100 ) +
|
||||
( ( USHORT ) ( szDate[ 2 ] - '0' ) * 10 ) +
|
||||
( USHORT ) ( szDate[ 3 ] - '0' );
|
||||
*piYear = ( ( int ) ( szDate[ 0 ] - '0' ) * 1000 ) +
|
||||
( ( int ) ( szDate[ 1 ] - '0' ) * 100 ) +
|
||||
( ( int ) ( szDate[ 2 ] - '0' ) * 10 ) +
|
||||
( int ) ( szDate[ 3 ] - '0' );
|
||||
*piMonth = ( ( szDate[ 4 ] - '0' ) * 10 ) + ( szDate[ 5 ] - '0' );
|
||||
*piDay = ( ( szDate[ 6 ] - '0' ) * 10 ) + ( szDate[ 7 ] - '0' );
|
||||
}
|
||||
#if !defined( HB_C52_STRICT )
|
||||
else
|
||||
{
|
||||
/* Date string missing or bad length, so force an empty date */
|
||||
@@ -183,6 +193,7 @@ HB_EXPORT void hb_dateStrGet( const char * szDate, int * piYear, int * piMonth,
|
||||
*piMonth =
|
||||
*piDay = 0;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/* This function always closes the date with a zero byte, so it needs a
|
||||
|
||||
@@ -62,7 +62,7 @@ HB_FUNC( STOD )
|
||||
#ifdef HB_FAST_STOD
|
||||
hb_retds( hb_parc( 1 ) );
|
||||
#else
|
||||
hb_retds( hb_parclen( 1 ) == 8 ? hb_parc( 1 ) : " " );
|
||||
hb_retds( hb_parclen( 1 ) >= 8 ? hb_parc( 1 ) : " " );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -910,18 +910,20 @@ static BOOL hb_gt_sln_SetDispCP( char * pszTermCDP, char * pszHostCDP, BOOL fBox
|
||||
HB_GTSUPER_SETDISPCP( pszTermCDP, pszHostCDP, fBox );
|
||||
|
||||
#ifndef HB_CDP_SUPPORT_OFF
|
||||
PHB_CODEPAGE cdpTerm = NULL, cdpHost = NULL;
|
||||
{
|
||||
PHB_CODEPAGE cdpTerm = NULL, cdpHost = NULL;
|
||||
|
||||
cdpHost = hb_cdpFind( pszHostCDP );
|
||||
if ( pszHostCDP && *pszHostCDP )
|
||||
cdpHost = hb_cdpFind( pszHostCDP );
|
||||
if ( ! cdpHost )
|
||||
cdpHost = hb_cdp_page;
|
||||
if ( pszHostCDP && *pszHostCDP )
|
||||
cdpHost = hb_cdpFind( pszHostCDP );
|
||||
if ( ! cdpHost )
|
||||
cdpHost = hb_cdp_page;
|
||||
|
||||
if ( pszTermCDP && *pszTermCDP )
|
||||
cdpTerm = hb_cdpFind( pszTermCDP );
|
||||
if ( pszTermCDP && *pszTermCDP )
|
||||
cdpTerm = hb_cdpFind( pszTermCDP );
|
||||
|
||||
hb_sln_setCharTrans( cdpHost, cdpTerm, fBox );
|
||||
hb_sln_setCharTrans( cdpHost, cdpTerm, fBox );
|
||||
}
|
||||
#endif
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user