19991112-19:29 GMT+1 Victor Szel <info@szelvesz.hu>

This commit is contained in:
Viktor Szakats
1999-11-12 18:41:14 +00:00
parent 0a02f844b3
commit 2e851863dd
3 changed files with 19 additions and 18 deletions

View File

@@ -1,3 +1,12 @@
19991112-19:29 GMT+1 Victor Szel <info@szelvesz.hu>
* source/rtl/itemapi.c
source/rtl/strings.c
! Moved the infinity support from strings.c to itemapi.c.
+ The infinity support changed to not require the init on startup feature
of the compilers, it's now plain ANSI C.
+ Removed to STRICT option from the infinity support, it's now turned on
all the time. Now one more RTL_TEST line will pass.
19991112-11:40 EDT Paul Tucker <ptucker@sympatico.ca>
* makefile.vc
+ source/rtl/dbedit

View File

@@ -64,6 +64,8 @@
*
*/
#include <math.h> /* For log() */
#include "extend.h"
#include "itemapi.h"
#include "ctoharb.h"
@@ -1147,13 +1149,19 @@ char * hb_itemStr( PHB_ITEM pNumber, PHB_ITEM pWidth, PHB_ITEM pDec )
if( IS_DOUBLE( pNumber ) || iDec != 0 )
{
double dNumber = hb_itemGetND( pNumber );
static double s_dInfinity = 0;
static double s_bInfinityInit = FALSE;
if( ! s_bInfinityInit )
{
s_dInfinity = -log( 0 );
s_bInfinityInit = TRUE;
}
#ifdef HARBOUR_STRICT_CLIPPER_COMPATIBILITY
if( pNumber->item.asDouble.length == 99 || dNumber == s_dInfinity || dNumber == -s_dInfinity )
/* Numeric overflow */
iBytes = iSize + 1;
else
#endif
{
if( IS_DOUBLE( pNumber ) && iDec < pNumber->item.asDouble.decimal )
dNumber = hb_numRound( dNumber, iDec );

View File

@@ -51,7 +51,6 @@
*/
#include <ctype.h>
#include <math.h>
#include "extend.h"
#include "dates.h"
@@ -64,21 +63,6 @@
( c ) == HB_CHAR_CR || \
( c ) == ' ' )
#ifdef HARBOUR_STRICT_CLIPPER_COMPATIBILITY
#include "init.h"
static double s_dInfinity = 0;
HB_CALL_ON_STARTUP_BEGIN( Strings_InitInfinity )
s_dInfinity = -log( 0 );
HB_CALL_ON_STARTUP_END( Strings_InitInfinity )
#if ! defined(__GNUC__)
#pragma startup Strings_InitInfinity
#endif
#endif
BOOL hb_strEmpty( const char * szText, ULONG ulLen )
{
HB_TRACE(HB_TR_DEBUG, ("hb_strEmpty(%s, %lu)", szText, ulLen));