20000302-17:45 GMT+1 Victor Szakats <info@szelvesz.hu>

This commit is contained in:
Viktor Szakats
2000-03-02 16:50:38 +00:00
parent 27faf802c7
commit 6cb05c3a78
29 changed files with 768 additions and 1749 deletions

View File

@@ -1,11 +1,52 @@
20000302-17:45 GMT+1 Victor Szakats <info@szelvesz.hu>
* tests/regress/*
% Modified to take advantage of the code inclusion feature of the PP.
* source/rdd/dbcmd.c
! All direct item accesses changed to Item API calls.
! Fixed direct item string buffer access in DBSETDRIVER()
% Variable scopes and some other minor thing optimized.
+ Static variables prefixed with "s_"
% LASTREC() is now the same speed as RECCOUNT() (minor enh.)
! DBSETDRIVER(), RDDSETDEFAULT(), __RDDSETDEFAULT() synchronized.
! DBSETDRIVER(), RDDSETDEFAULT(), __RDDSETDEFAULT(), RDDREGISTER(),
DBCREATE()
Fixed potential GPF on very large driver names.
* source/rtl/itemapi.c
include/hbapiitm.h
+ Added hb_itemGetDL( PHB_ITEM pItem ) to easily retrieve the julian
date from a date item.
* source/rtl/arrays.c
include/hbapi.h
+ Added hb_arrayGetDL( PHB_ITEM pArray, ULONG ulIndex )
* source/rtl/arrays.c
source/rtl/descend.c
source/rtl/empty.c
source/rtl/memvars.c
source/rtl/math.c
! hb_itemGetNL() calls changed to hb_itemGetDL() calls for date items.
* source/rdd/dbf1.c
source/rdd/dbfcdx1.c
source/tools/dates2.c
source/rtl/dates.c
! All direct item accesses changed to Item API calls.
* source/rtl/do.c
! One direct item accesses changed to Item API calls.
* doc/en/misc.txt
! One copyright fixed.
* source/rtl/alert.prg
! Comments changed to standard NOTE/TOFIX format.
* source/compiler/genc.c
+ Small alignment in the .C output format.
* .cvsignore
+ Added b32/, b16/ and vc/ dirs
(Committed in the previous session)
20000302-11:21 GMT+1 Victor Szakats <info@szelvesz.hu>
* config/rules.cf
makefile.bc
makefile.vc
+ -es2 added as a default Harbour switch.
WARNING! HBDOC will not compile, since it has warnings.
* .cvsignore
+ Added b32/, b16/ and vc/ dirs
* contrib/*
include/*
doc/*

View File

@@ -18,8 +18,6 @@
*
* Copyright 1999 Jose Lalin <dezac@corevia.com>
* Documentation for: SETTYPEAHEAD()
*
* Copyright 1999 Victor Szakats <info@szelvesz.hu>
* Documentation for: __XHELP()
*
* See doc/license.txt for licensing terms.

View File

@@ -333,6 +333,7 @@ extern int hb_arrayGetNI( PHB_ITEM pArray, ULONG ulIndex ); /* retrieves th
extern long hb_arrayGetNL( PHB_ITEM pArray, ULONG ulIndex ); /* retrieves the long numeric value contained on an array element */
extern double hb_arrayGetND( PHB_ITEM pArray, ULONG ulIndex ); /* retrieves the double value contained on an array element */
extern char * hb_arrayGetDS( PHB_ITEM pArray, ULONG ulIndex, char * szDate ); /* retrieves the date value contained on an array element */
extern long hb_arrayGetDL( PHB_ITEM pArray, ULONG ulIndex );
extern USHORT hb_arrayGetType( PHB_ITEM pArray, ULONG ulIndex );
extern BOOL hb_arrayFill( PHB_ITEM pArray, PHB_ITEM pValue, ULONG * pulStart, ULONG * pulCount );
extern ULONG hb_arrayScan( PHB_ITEM pArray, PHB_ITEM pValue, ULONG * pulStart, ULONG * pulCount );

View File

@@ -63,6 +63,7 @@ extern char * hb_itemGetC ( PHB_ITEM pItem );
extern char * hb_itemGetCPtr ( PHB_ITEM pItem );
extern ULONG hb_itemGetCLen ( PHB_ITEM pItem );
extern char * hb_itemGetDS ( PHB_ITEM pItem, char * szDate );
extern long hb_itemGetDL ( PHB_ITEM pItem );
extern BOOL hb_itemGetL ( PHB_ITEM pItem );
extern double hb_itemGetND ( PHB_ITEM pItem );
extern int hb_itemGetNI ( PHB_ITEM pItem );

View File

@@ -80,6 +80,8 @@ void hb_compGenCCode( PHB_FNAME pFileName ) /* generates the C language ou
{
if( pFunc->cScope & FS_STATIC || pFunc->cScope & FS_INIT || pFunc->cScope & FS_EXIT )
fprintf( yyc, "static " );
else
fprintf( yyc, " " );
if( pFunc == hb_comp_pInitFunc )
fprintf( yyc, "HARBOUR hb_INITSTATICS( void );\n" ); /* NOTE: hb_ intentionally in lower case */

File diff suppressed because it is too large Load Diff

View File

@@ -1166,7 +1166,7 @@ static ERRCODE dbfGoToId( AREAP pArea, PHB_ITEM pItem )
HB_TRACE(HB_TR_DEBUG, ("dbfGoToId(%p, %p)", pArea, pItem));
if( pItem->type & IT_NUMERIC )
if( IS_NUMERIC( pItem ) )
{
ulRecNo = hb_itemGetNL( pItem );
if( ulRecNo == 0 )
@@ -1222,11 +1222,9 @@ static ERRCODE dbfInfo( AREAP pArea, USHORT uiIndex, PHB_ITEM pItem )
break;
case DBI_LASTUPDATE:
hb_itemClear( pItem );
pItem->type = IT_DATE;
pItem->item.asDate.value = hb_dateEncode( pArea->lpExtendInfo->bDay,
pArea->lpExtendInfo->bMonth,
pArea->lpExtendInfo->bYear );
hb_itemPutDL( pItem, hb_dateEncode( pArea->lpExtendInfo->bDay,
pArea->lpExtendInfo->bMonth,
pArea->lpExtendInfo->bYear ) );
break;
case DBI_GETRECSIZE:
@@ -1319,7 +1317,7 @@ static ERRCODE dbfOpen( AREAP pArea, LPDBOPENINFO pOpenInfo )
if( pFileName->szPath )
strcat( szFileName, pFileName->szPath );
strcat( szFileName, pFileName->szName );
strcat( szFileName, pFileExt->item.asString.value );
strcat( szFileName, hb_itemGetCPtr( pFileExt ) );
pOpenInfo->abName = ( BYTE * ) szFileName;
hb_itemRelease( pFileExt );
hb_xfree( pFileName );
@@ -1507,19 +1505,19 @@ static ERRCODE dbfPutValue( AREAP pArea, USHORT uiIndex, PHB_ITEM pItem )
switch( pField->uiType )
{
case 'C':
if( pItem->type & IT_STRING )
if( IS_STRING( pItem ) )
{
uiCount = pItem->item.asString.length;
uiCount = hb_itemGetCLen( pItem );
if( uiCount > pField->uiLen )
uiCount = pField->uiLen;
memcpy( szText, pItem->item.asString.value, uiCount );
memcpy( szText, hb_itemGetCPtr( pItem ), uiCount );
memset( szText + uiCount, ' ', pField->uiLen - uiCount );
bError = FALSE;
}
break;
case 'N':
if( pItem->type & IT_NUMERIC )
if( IS_NUMERIC( pItem ) )
{
if( pField->uiDec )
bError = !hb_ndtoa( hb_itemGetND( pItem ), ( char * ) szText,
@@ -1541,10 +1539,10 @@ static ERRCODE dbfPutValue( AREAP pArea, USHORT uiIndex, PHB_ITEM pItem )
break;
case 'D':
if( pItem->type & IT_DATE )
if( IS_DATE( pItem ) )
{
szEndChar = * ( szText + pField->uiLen );
hb_dateDecode( pItem->item.asDate.value, &lDay, &lMonth, &lYear );
hb_dateDecode( hb_itemGetDL( pItem ), &lDay, &lMonth, &lYear );
hb_dateStrPut( ( char * ) szText, lDay, lMonth, lYear );
* ( szText + pField->uiLen ) = szEndChar;
bError = FALSE;
@@ -1552,20 +1550,17 @@ static ERRCODE dbfPutValue( AREAP pArea, USHORT uiIndex, PHB_ITEM pItem )
break;
case 'L':
if( pItem->type & IT_LOGICAL )
if( IS_LOGICAL( pItem ) )
{
if( pItem->item.asLogical.value )
*szText = 'T';
else
*szText = 'F';
*szText = hb_itemGetL( pItem ) ? 'T' : 'F';
bError = FALSE;
}
break;
case 'M':
if( pItem->type & IT_STRING )
if( IS_STRING( pItem ) )
{
uiCount = pItem->item.asString.length;
uiCount = hb_itemGetCLen( pItem );
if( ( ( LPDBFMEMO ) pField->memo )->uiLen < uiCount )
{
if( ( ( LPDBFMEMO ) pField->memo )->pData )
@@ -1579,7 +1574,7 @@ static ERRCODE dbfPutValue( AREAP pArea, USHORT uiIndex, PHB_ITEM pItem )
( ( LPDBFMEMO ) pField->memo )->uiLen = uiCount;
if( uiCount > 0 )
{
memcpy( ( ( LPDBFMEMO ) pField->memo )->pData, pItem->item.asString.value, uiCount );
memcpy( ( ( LPDBFMEMO ) pField->memo )->pData, hb_itemGetCPtr( pItem ), uiCount );
( ( LPDBFMEMO ) pField->memo )->pData[ uiCount ] = 0;
}
else

View File

@@ -484,7 +484,7 @@ static ERRCODE cdxOrderCreate( AREAP pArea, LPDBORDERCREATEINFO pOrderInfo )
pExpr = pOrderInfo->itmCobExpr;
else /* Otherwise, try compiling the key expression string */
{
if( SELF_COMPILE( pArea, ( BYTE * ) pOrderInfo->abExpr->item.asString.value ) == FAILURE )
if( SELF_COMPILE( pArea, ( BYTE * ) hb_itemGetCPtr( pOrderInfo->abExpr ) ) == FAILURE )
return FAILURE;
pExpr = pArea->valResult;
pArea->valResult = NULL;
@@ -527,8 +527,8 @@ static ERRCODE cdxOrderCreate( AREAP pArea, LPDBORDERCREATEINFO pOrderInfo )
break;
case IT_STRING:
uiLen = pResult->item.asString.length > CDX_MAX_KEY ? CDX_MAX_KEY :
pResult->item.asString.length;
uiLen = hb_itemGetCLen( pResult ) > CDX_MAX_KEY ? CDX_MAX_KEY :
hb_itemGetCLen( pResult );
break;
}
@@ -598,7 +598,7 @@ static ERRCODE cdxOrderCreate( AREAP pArea, LPDBORDERCREATEINFO pOrderInfo )
strcat( szFileName, pFileName->szName );
pExtInfo.itmResult = hb_itemPutC( NULL, "" );
SELF_ORDINFO( pArea, DBOI_BAGEXT, &pExtInfo );
strcat( szFileName, pExtInfo.itmResult->item.asString.value );
strcat( szFileName, hb_itemGetCPtr( pExtInfo.itmResult ) );
hb_itemRelease( pExtInfo.itmResult );
}
else
@@ -609,7 +609,7 @@ static ERRCODE cdxOrderCreate( AREAP pArea, LPDBORDERCREATEINFO pOrderInfo )
{
pExtInfo.itmResult = hb_itemPutC( NULL, "" );
SELF_ORDINFO( pArea, DBOI_BAGEXT, &pExtInfo );
strcat( szFileName, pExtInfo.itmResult->item.asString.value );
strcat( szFileName, hb_itemGetCPtr( pExtInfo.itmResult ) );
hb_itemRelease( pExtInfo.itmResult );
}
}

View File

@@ -30,15 +30,18 @@
#include "inkey.ch"
#include "setcurs.ch"
// ; TOFIX: Clipper defines a clipped window for Alert() [vszakats]
// ; Clipper will return NIL if the first parameter is not a string, but
// this is not documented. This implementation converts the first parameter
// to a string if another type was passed. You can switch back to
// Clipper compatible mode by defining constant
// HARBOUR_STRICT_CLIPPER_COMPATIBILITY. [vszakats]
// ; Clipper handles these buttons { "Ok", "", "Cancel" } in a buggy way.
// This is fixed. [vszakats]
// ; nDelay parameter is a Harbour extension.
/* TOFIX: Clipper defines a clipped window for Alert() [vszakats] */
/* NOTE: Clipper will return NIL if the first parameter is not a string, but
this is not documented. This implementation converts the first
parameter to a string if another type was passed. You can switch back
to Clipper compatible mode by defining constant
HARBOUR_STRICT_CLIPPER_COMPATIBILITY. [vszakats] */
/* NOTE: Clipper handles these buttons { "Ok", "", "Cancel" } in a buggy way.
This is fixed. [vszakats] */
/* NOTE: nDelay parameter is a Harbour extension. */
STATIC s_lNoAlert := NIL
@@ -58,8 +61,8 @@ FUNCTION Alert( xMessage, aOptions, cColorNorm, nDelay )
LOCAL nMRow, nMCol
/* TOFIX: Clipper decides at runtime, whether the GT is linked in, */
/* if it is not, the console mode is choosen here. [vszakats] */
/* TOFIX: Clipper decides at runtime, whether the GT is linked in,
if it is not, the console mode is choosen here. [vszakats] */
LOCAL lConsole := .F.
DEFAULT s_lNoAlert TO __argCheck( "NOALERT" )
@@ -149,7 +152,7 @@ FUNCTION Alert( xMessage, aOptions, cColorNorm, nDelay )
IF Len( aOptionsOK ) == 0
aOptionsOK := { 'Ok' }
#ifdef HARBOUR_STRICT_CLIPPER_COMPATIBILITY
// ; Clipper allows only four options [vszakats]
/* NOTE: Clipper allows only four options [vszakats] */
ELSEIF Len( aOptionsOK ) > 4
aSize( aOptionsOK, 4 )
#endif

View File

@@ -303,6 +303,18 @@ char * hb_arrayGetDS( PHB_ITEM pArray, ULONG ulIndex, char * szDate )
return szDate;
}
long hb_arrayGetDL( PHB_ITEM pArray, ULONG ulIndex )
{
HB_TRACE(HB_TR_DEBUG, ("hb_arrayGetDL(%p, %lu)", pArray, ulIndex ));
if( IS_ARRAY( pArray ) && ulIndex > 0 && ulIndex <= pArray->item.asArray.value->ulLen )
return hb_itemGetDL( pArray->item.asArray.value->pItems + ulIndex - 1 );
else
/* NOTE: Intentionally calling it with a bad parameter in order to get
the default value from hb_itemGetDS(). [vszakats] */
return hb_itemGetDL( NULL );
}
BOOL hb_arrayGetBool( PHB_ITEM pArray, ULONG ulIndex )
{
HB_TRACE(HB_TR_DEBUG, ("hb_arrayGetBool(%p, %lu)", pArray, ulIndex));
@@ -547,14 +559,13 @@ ULONG hb_arrayScan( PHB_ITEM pArray, PHB_ITEM pValue, ULONG * pulStart, ULONG *
}
else if( IS_DATE( pValue ) )
{
/* NOTE: This is correct: Get the date as a long value. [vszakats] */
LONG lValue = hb_itemGetNL( pValue );
LONG lValue = hb_itemGetDL( pValue );
for( ulStart--; ulCount > 0; ulCount--, ulStart++ )
{
PHB_ITEM pItem = pBaseArray->pItems + ulStart;
if( IS_DATE( pItem ) && hb_itemGetNL( pItem ) == lValue )
if( IS_DATE( pItem ) && hb_itemGetDL( pItem ) == lValue )
return ulStart + 1;
}
}

View File

@@ -583,7 +583,7 @@ HARBOUR HB_YEAR( void )
{
long lDay, lMonth, lYear;
hb_dateDecode( pDate->item.asDate.value, &lDay, &lMonth, &lYear );
hb_dateDecode( hb_itemGetDL( pDate ), &lDay, &lMonth, &lYear );
hb_retnllen( lYear, 5 );
}
@@ -607,7 +607,7 @@ HARBOUR HB_MONTH( void )
{
long lDay, lMonth, lYear;
hb_dateDecode( pDate->item.asDate.value, &lDay, &lMonth, &lYear );
hb_dateDecode( hb_itemGetDL( pDate ), &lDay, &lMonth, &lYear );
hb_retnllen( lMonth, 3 );
}
@@ -631,7 +631,7 @@ HARBOUR HB_DAY( void )
{
long lDay, lMonth, lYear;
hb_dateDecode( pDate->item.asDate.value, &lDay, &lMonth, &lYear );
hb_dateDecode( hb_itemGetDL( pDate ), &lDay, &lMonth, &lYear );
hb_retnllen( lDay, 3 );
}
@@ -709,11 +709,13 @@ HARBOUR HB_DOW( void )
if( pDate )
{
if( pDate->item.asDate.value )
long lDate = hb_itemGetDL( pDate );
if( lDate )
{
long lDay, lMonth, lYear;
hb_dateDecode( pDate->item.asDate.value, &lDay, &lMonth, &lYear );
hb_dateDecode( lDate, &lDay, &lMonth, &lYear );
hb_retnllen( hb_dow( lDay, lMonth, lYear ), 3 );
}
@@ -740,7 +742,7 @@ HARBOUR HB_CMONTH( void )
{
long lDay, lMonth, lYear;
hb_dateDecode( pDate->item.asDate.value, &lDay, &lMonth, &lYear );
hb_dateDecode( hb_itemGetDL( pDate ), &lDay, &lMonth, &lYear );
hb_retc( hb_cmonth( lMonth ) );
}
else
@@ -761,11 +763,13 @@ HARBOUR HB_CDOW( void )
if( pDate )
{
if( pDate->item.asDate.value )
long lDate = hb_itemGetDL( pDate );
if( lDate )
{
long lDay, lMonth, lYear;
hb_dateDecode( pDate->item.asDate.value, &lDay, &lMonth, &lYear );
hb_dateDecode( lDate, &lDay, &lMonth, &lYear );
hb_retc( hb_cdow( hb_dow( lDay, lMonth, lYear ) ) );
}
else

View File

@@ -40,14 +40,6 @@
#define HB_DBEMPTY() ( LastRec() == 0 .OR. ( ( Eof() .OR. RecNo() == LastRec() + 1 ) .AND. Bof() ) )
/* TODO: put more comprehensive $EXAMPLES$.
DBEDIT() is a complex function, the doc I had made cover all the
parameters but probably not good enough for a new user that does
not know what this function is all about and how to use it. I am
not that good with the English language (and I did not want to
COPY the NG text) I suggest later some one should add to this
text. [chkedem] */
/* NOTE: Extension: Harbour supports codeblocks as the xUserFunc parameter
[vszakats] */
/* NOTE: Clipper is buggy and will throw an error if the number of

View File

@@ -64,7 +64,7 @@ HARBOUR HB_DESCEND( void )
hb_xfree( szBuffer );
}
else if( IS_DATE( pItem ) )
hb_retnl( 5231808 - hb_itemGetNL( pItem ) );
hb_retnl( 5231808 - hb_itemGetDL( pItem ) );
else if( IS_NUMERIC( pItem ) )
hb_retnd( -1 * hb_itemGetND( pItem ) );
else if( IS_LOGICAL( pItem ) )

View File

@@ -58,7 +58,7 @@ HARBOUR HB_DO( void )
hb_vmDo( uiPCount - 1 );
}
else
hb_errRT_BASE( EG_NOFUNC, 1001, NULL, pItem->item.asString.value );
hb_errRT_BASE( EG_NOFUNC, 1001, NULL, hb_itemGetCPtr( pItem ) );
}
else if( IS_BLOCK( pItem ) )
{

View File

@@ -70,8 +70,7 @@ HARBOUR HB_EMPTY( void )
break;
case IT_DATE:
/* NOTE: This is correct ! Get the date as long value. [vszakats] */
hb_retl( hb_itemGetNL( pItem ) == 0 );
hb_retl( hb_itemGetDL( pItem ) == 0 );
break;
case IT_LOGICAL:

View File

@@ -45,6 +45,7 @@
* hb_itemDoC() ( based on HB_DO() by Ryszard Glab )
* hb_itemPutDL()
* hb_itemPutNI()
* hb_itemGetDL()
* hb_itemGetNI()
* hb_itemGetCPtr()
* hb_itemGetCLen()
@@ -558,6 +559,13 @@ char * hb_itemGetDS( PHB_ITEM pItem, char * szDate )
return szDate;
}
long hb_itemGetDL( PHB_ITEM pItem )
{
HB_TRACE(HB_TR_DEBUG, ("hb_itemGetDL(%p)", pItem));
return ( pItem && IS_DATE( pItem ) ) ? pItem->item.asDate.value : 0;
}
BOOL hb_itemGetL( PHB_ITEM pItem )
{
HB_TRACE(HB_TR_DEBUG, ("hb_itemGetL(%p)", pItem));

View File

@@ -306,7 +306,7 @@ HARBOUR HB_MAX( void )
{
char szDate[ 9 ];
hb_retds( hb_itemGetNL( p1 ) >= hb_itemGetNL( p2 ) ? hb_pardsbuff( szDate, 1 ) : hb_pardsbuff( szDate, 2 ) );
hb_retds( hb_itemGetDL( p1 ) >= hb_itemGetDL( p2 ) ? hb_pardsbuff( szDate, 1 ) : hb_pardsbuff( szDate, 2 ) );
}
else
{
@@ -366,7 +366,7 @@ HARBOUR HB_MIN( void )
{
char szDate[ 9 ];
hb_retds( hb_itemGetNL( p1 ) <= hb_itemGetNL( p2 ) ? hb_pardsbuff( szDate, 1 ) : hb_pardsbuff( szDate, 2 ) );
hb_retds( hb_itemGetDL( p1 ) <= hb_itemGetDL( p2 ) ? hb_pardsbuff( szDate, 1 ) : hb_pardsbuff( szDate, 2 ) );
}
else
{

View File

@@ -1330,7 +1330,7 @@ HARBOUR HB___MVSAVE( void )
}
else if( IS_DATE( pItem ) )
{
double dNumber = ( double ) hb_itemGetNL( pItem );
double dNumber = ( double ) hb_itemGetDL( pItem );
buffer[ 11 ] = 'D' + 128;
buffer[ 16 ] = 1;

View File

@@ -149,7 +149,7 @@ HARBOUR HB_ISLEAPYEAR( void )
PHB_ITEM pDate = hb_param( 1, IT_DATE );
long lDay, lMonth, lYear;
hb_dateDecode( pDate->item.asDate.value, &lDay, &lMonth, &lYear );
hb_dateDecode( hb_itemGetDL( pDate ), &lDay, &lMonth, &lYear );
hb_retl( hb_isleapyear( lYear ) );
}
else
@@ -165,7 +165,7 @@ HARBOUR HB_DAYSINMONTH( void )
PHB_ITEM pDate = hb_param( 1, IT_DATE );
long lDay, lMonth, lYear;
hb_dateDecode( pDate->item.asDate.value, &lDay, &lMonth, &lYear );
hb_dateDecode( hb_itemGetDL( pDate ), &lDay, &lMonth, &lYear );
hb_retni( hb_daysinmonth( lMonth, lYear ) );
}
else
@@ -180,7 +180,7 @@ HARBOUR HB_EOM( void )
long lDay, lMonth, lYear;
char szDateFormat[ 9 ];
hb_dateDecode( pDate->item.asDate.value, &lDay, &lMonth, &lYear );
hb_dateDecode( hb_itemGetDL( pDate ), &lDay, &lMonth, &lYear );
lDay = hb_daysinmonth( lMonth, lYear );
sprintf( szDateFormat, "%04i%02i%02i", (int) lYear, (int) lMonth, (int) lDay );
hb_retds( szDateFormat );
@@ -197,7 +197,7 @@ HARBOUR HB_BOM( void )
long lDay, lMonth, lYear;
char szDateFormat[ 9 ];
hb_dateDecode( pDate->item.asDate.value, &lDay, &lMonth, &lYear );
hb_dateDecode( hb_itemGetDL( pDate ), &lDay, &lMonth, &lYear );
sprintf( szDateFormat, "%04i%02i%02i", (int) lYear, (int) lMonth, 1 );
hb_retds( szDateFormat );
}
@@ -212,7 +212,7 @@ HARBOUR HB_WOM( void )
PHB_ITEM pDate = hb_param( 1, IT_DATE );
long lDay, lMonth, lYear;
hb_dateDecode( pDate->item.asDate.value, &lDay, &lMonth, &lYear );
hb_dateDecode( hb_itemGetDL( pDate ), &lDay, &lMonth, &lYear );
hb_retni( hb_wom( lDay, lMonth, lYear ) );
}
else
@@ -226,7 +226,7 @@ HARBOUR HB_DOY( void )
PHB_ITEM pDate = hb_param( 1, IT_DATE );
long lDay, lMonth, lYear;
hb_dateDecode( pDate->item.asDate.value, &lDay, &lMonth, &lYear );
hb_dateDecode( hb_itemGetDL( pDate ), &lDay, &lMonth, &lYear );
hb_retni( hb_doy( lDay, lMonth, lYear ) );
}
else
@@ -242,7 +242,7 @@ HARBOUR HB_WOY( void )
PHB_ITEM pDate = hb_param( 1, IT_DATE );
long lDay, lMonth, lYear;
hb_dateDecode( pDate->item.asDate.value, &lDay, &lMonth, &lYear );
hb_dateDecode( hb_itemGetDL( pDate ), &lDay, &lMonth, &lYear );
hb_retni( hb_woy( lDay, lMonth, lYear, ISLOG( 2 ) ? hb_parl( 2 ) : TRUE ) );
}
else
@@ -257,7 +257,7 @@ HARBOUR HB_EOY( void )
long lDay, lMonth, lYear;
char szDateFormat[ 9 ];
hb_dateDecode( pDate->item.asDate.value, &lDay, &lMonth, &lYear );
hb_dateDecode( hb_itemGetDL( pDate ), &lDay, &lMonth, &lYear );
sprintf( szDateFormat, "%04i%02i%02i", (int) lYear, 12, 31 );
hb_retds( szDateFormat );
}
@@ -273,7 +273,7 @@ HARBOUR HB_BOY( void )
long lDay, lMonth, lYear;
char szDateFormat[ 9 ];
hb_dateDecode( pDate->item.asDate.value, &lDay, &lMonth, &lYear );
hb_dateDecode( hb_itemGetDL( pDate ), &lDay, &lMonth, &lYear );
sprintf( szDateFormat, "%04i%02i%02i", (int) lYear, 1, 1 );
hb_retds( szDateFormat );
}

View File

@@ -35,110 +35,8 @@
#include "rt_main.ch"
STATIC scString
STATIC scStringM
STATIC scStringE
STATIC scStringZ
STATIC scStringW
STATIC snIntZ
STATIC snDoubleZ
STATIC snIntP
STATIC snIntP1
STATIC snLongP
STATIC snDoubleP
STATIC snIntN
STATIC snLongN
STATIC snDoubleN
STATIC snDoubleI
STATIC sdDate
STATIC sdDateE
STATIC slFalse
STATIC slTrue
STATIC soObject
STATIC suNIL
STATIC sbBlock
STATIC sbBlockC
STATIC saArray
STATIC saAllTypes
MEMVAR mxNotHere /* Please don't declare this variable, since it's used to test undeclared MEMVAR situations. */
MEMVAR mcLongerNameThen10Chars
MEMVAR mcString
MEMVAR mcStringE
MEMVAR mcStringZ
MEMVAR mcStringW
MEMVAR mnIntZ
MEMVAR mnDoubleZ
MEMVAR mnIntP
MEMVAR mnLongP
MEMVAR mnDoubleP
MEMVAR mnDoubleI
MEMVAR mnIntN
MEMVAR mnLongN
MEMVAR mnDoubleN
MEMVAR mdDate
MEMVAR mdDateE
MEMVAR mlFalse
MEMVAR mlTrue
MEMVAR moObject
MEMVAR muNIL
MEMVAR mbBlock
MEMVAR mbBlockC
MEMVAR maArray
INIT PROCEDURE RT_InitStatics()
/* NOTE: Some basic values we may need for some tests.
( passing by reference, avoid preprocessor bugs, etc. ) */
scString := "HELLO"
scStringM := "Hello"
scStringE := ""
scStringZ := "A" + Chr( 0 ) + "B"
scStringW := Chr(13)+Chr(10)+Chr(141)+Chr(10)+Chr(9)
snIntZ := 0
snDoubleZ := 0.0
snIntP := 10
snIntP1 := 65
snLongP := 100000
snDoubleP := 10.567 /* Use different number of decimals than the default */
snIntN := -10
snLongN := -100000
snDoubleN := -10.567 /* Use different number of decimals than the default */
snDoubleI := 0 //Log( 0 )
sdDate := SToD( "19840325" )
sdDateE := SToD( "" )
slFalse := .F.
slTrue := .T.
soObject := ErrorNew()
suNIL := NIL
sbBlock := {|| NIL }
sbBlockC := {|| "(string)" }
saArray := { 9898 }
saAllTypes := {;
scString ,;
scStringE ,;
scStringZ ,;
snIntZ ,;
snDoubleZ ,;
snIntP ,;
snLongP ,;
snDoubleP ,;
snIntN ,;
snLongN ,;
snDoubleN ,;
snDoubleI ,;
sdDateE ,;
slFalse ,;
slTrue ,;
soObject ,;
suNIL ,;
sbBlock ,;
sbBlockC ,;
saArray }
RETURN
/* Don't change the order or place of this #include. */
#include "rt_vars.ch"
FUNCTION Main_ARRAY()
@@ -461,3 +359,6 @@ STATIC FUNCTION TAStr( aArray )
NEXT
RETURN cString
/* Don't change the order or place of this #include. */
#include "rt_init.ch"

View File

@@ -35,110 +35,8 @@
#include "rt_main.ch"
STATIC scString
STATIC scStringM
STATIC scStringE
STATIC scStringZ
STATIC scStringW
STATIC snIntZ
STATIC snDoubleZ
STATIC snIntP
STATIC snIntP1
STATIC snLongP
STATIC snDoubleP
STATIC snIntN
STATIC snLongN
STATIC snDoubleN
STATIC snDoubleI
STATIC sdDate
STATIC sdDateE
STATIC slFalse
STATIC slTrue
STATIC soObject
STATIC suNIL
STATIC sbBlock
STATIC sbBlockC
STATIC saArray
STATIC saAllTypes
MEMVAR mxNotHere /* Please don't declare this variable, since it's used to test undeclared MEMVAR situations. */
MEMVAR mcLongerNameThen10Chars
MEMVAR mcString
MEMVAR mcStringE
MEMVAR mcStringZ
MEMVAR mcStringW
MEMVAR mnIntZ
MEMVAR mnDoubleZ
MEMVAR mnIntP
MEMVAR mnLongP
MEMVAR mnDoubleP
MEMVAR mnDoubleI
MEMVAR mnIntN
MEMVAR mnLongN
MEMVAR mnDoubleN
MEMVAR mdDate
MEMVAR mdDateE
MEMVAR mlFalse
MEMVAR mlTrue
MEMVAR moObject
MEMVAR muNIL
MEMVAR mbBlock
MEMVAR mbBlockC
MEMVAR maArray
INIT PROCEDURE RT_InitStatics()
/* NOTE: Some basic values we may need for some tests.
( passing by reference, avoid preprocessor bugs, etc. ) */
scString := "HELLO"
scStringM := "Hello"
scStringE := ""
scStringZ := "A" + Chr( 0 ) + "B"
scStringW := Chr(13)+Chr(10)+Chr(141)+Chr(10)+Chr(9)
snIntZ := 0
snDoubleZ := 0.0
snIntP := 10
snIntP1 := 65
snLongP := 100000
snDoubleP := 10.567 /* Use different number of decimals than the default */
snIntN := -10
snLongN := -100000
snDoubleN := -10.567 /* Use different number of decimals than the default */
snDoubleI := 0 //Log( 0 )
sdDate := SToD( "19840325" )
sdDateE := SToD( "" )
slFalse := .F.
slTrue := .T.
soObject := ErrorNew()
suNIL := NIL
sbBlock := {|| NIL }
sbBlockC := {|| "(string)" }
saArray := { 9898 }
saAllTypes := {;
scString ,;
scStringE ,;
scStringZ ,;
snIntZ ,;
snDoubleZ ,;
snIntP ,;
snLongP ,;
snDoubleP ,;
snIntN ,;
snLongN ,;
snDoubleN ,;
snDoubleI ,;
sdDateE ,;
slFalse ,;
slTrue ,;
soObject ,;
suNIL ,;
sbBlock ,;
sbBlockC ,;
saArray }
RETURN
/* Don't change the order or place of this #include. */
#include "rt_vars.ch"
FUNCTION Main_DATE()
LOCAL cDate := "1999/11/25"
@@ -277,3 +175,6 @@ FUNCTION Main_DATE()
TEST_LINE( DToS(sdDateE) , " " )
RETURN NIL
/* Don't change the order or place of this #include. */
#include "rt_init.ch"

View File

@@ -37,110 +37,8 @@
#include "fileio.ch"
STATIC scString
STATIC scStringM
STATIC scStringE
STATIC scStringZ
STATIC scStringW
STATIC snIntZ
STATIC snDoubleZ
STATIC snIntP
STATIC snIntP1
STATIC snLongP
STATIC snDoubleP
STATIC snIntN
STATIC snLongN
STATIC snDoubleN
STATIC snDoubleI
STATIC sdDate
STATIC sdDateE
STATIC slFalse
STATIC slTrue
STATIC soObject
STATIC suNIL
STATIC sbBlock
STATIC sbBlockC
STATIC saArray
STATIC saAllTypes
MEMVAR mxNotHere /* Please don't declare this variable, since it's used to test undeclared MEMVAR situations. */
MEMVAR mcLongerNameThen10Chars
MEMVAR mcString
MEMVAR mcStringE
MEMVAR mcStringZ
MEMVAR mcStringW
MEMVAR mnIntZ
MEMVAR mnDoubleZ
MEMVAR mnIntP
MEMVAR mnLongP
MEMVAR mnDoubleP
MEMVAR mnDoubleI
MEMVAR mnIntN
MEMVAR mnLongN
MEMVAR mnDoubleN
MEMVAR mdDate
MEMVAR mdDateE
MEMVAR mlFalse
MEMVAR mlTrue
MEMVAR moObject
MEMVAR muNIL
MEMVAR mbBlock
MEMVAR mbBlockC
MEMVAR maArray
INIT PROCEDURE RT_InitStatics()
/* NOTE: Some basic values we may need for some tests.
( passing by reference, avoid preprocessor bugs, etc. ) */
scString := "HELLO"
scStringM := "Hello"
scStringE := ""
scStringZ := "A" + Chr( 0 ) + "B"
scStringW := Chr(13)+Chr(10)+Chr(141)+Chr(10)+Chr(9)
snIntZ := 0
snDoubleZ := 0.0
snIntP := 10
snIntP1 := 65
snLongP := 100000
snDoubleP := 10.567 /* Use different number of decimals than the default */
snIntN := -10
snLongN := -100000
snDoubleN := -10.567 /* Use different number of decimals than the default */
snDoubleI := 0 //Log( 0 )
sdDate := SToD( "19840325" )
sdDateE := SToD( "" )
slFalse := .F.
slTrue := .T.
soObject := ErrorNew()
suNIL := NIL
sbBlock := {|| NIL }
sbBlockC := {|| "(string)" }
saArray := { 9898 }
saAllTypes := {;
scString ,;
scStringE ,;
scStringZ ,;
snIntZ ,;
snDoubleZ ,;
snIntP ,;
snLongP ,;
snDoubleP ,;
snIntN ,;
snLongN ,;
snDoubleN ,;
snDoubleI ,;
sdDateE ,;
slFalse ,;
slTrue ,;
soObject ,;
suNIL ,;
sbBlock ,;
sbBlockC ,;
saArray }
RETURN
/* Don't change the order or place of this #include. */
#include "rt_vars.ch"
/* NOTE: The order of the tests is relevant here, so don't
rearrange them. */
@@ -287,3 +185,6 @@ FUNCTION Main_FILE()
STATIC FUNCTION TESTFIER( xRetVal )
RETURN PadR( "E: " + LTrim( Str( FError() ) ), 9 ) + " R: " + XToStr( xRetVal )
/* Don't change the order or place of this #include. */
#include "rt_init.ch"

View File

@@ -35,110 +35,8 @@
#include "rt_main.ch"
STATIC scString
STATIC scStringM
STATIC scStringE
STATIC scStringZ
STATIC scStringW
STATIC snIntZ
STATIC snDoubleZ
STATIC snIntP
STATIC snIntP1
STATIC snLongP
STATIC snDoubleP
STATIC snIntN
STATIC snLongN
STATIC snDoubleN
STATIC snDoubleI
STATIC sdDate
STATIC sdDateE
STATIC slFalse
STATIC slTrue
STATIC soObject
STATIC suNIL
STATIC sbBlock
STATIC sbBlockC
STATIC saArray
STATIC saAllTypes
MEMVAR mxNotHere /* Please don't declare this variable, since it's used to test undeclared MEMVAR situations. */
MEMVAR mcLongerNameThen10Chars
MEMVAR mcString
MEMVAR mcStringE
MEMVAR mcStringZ
MEMVAR mcStringW
MEMVAR mnIntZ
MEMVAR mnDoubleZ
MEMVAR mnIntP
MEMVAR mnLongP
MEMVAR mnDoubleP
MEMVAR mnDoubleI
MEMVAR mnIntN
MEMVAR mnLongN
MEMVAR mnDoubleN
MEMVAR mdDate
MEMVAR mdDateE
MEMVAR mlFalse
MEMVAR mlTrue
MEMVAR moObject
MEMVAR muNIL
MEMVAR mbBlock
MEMVAR mbBlockC
MEMVAR maArray
INIT PROCEDURE RT_InitStatics()
/* NOTE: Some basic values we may need for some tests.
( passing by reference, avoid preprocessor bugs, etc. ) */
scString := "HELLO"
scStringM := "Hello"
scStringE := ""
scStringZ := "A" + Chr( 0 ) + "B"
scStringW := Chr(13)+Chr(10)+Chr(141)+Chr(10)+Chr(9)
snIntZ := 0
snDoubleZ := 0.0
snIntP := 10
snIntP1 := 65
snLongP := 100000
snDoubleP := 10.567 /* Use different number of decimals than the default */
snIntN := -10
snLongN := -100000
snDoubleN := -10.567 /* Use different number of decimals than the default */
snDoubleI := 0 //Log( 0 )
sdDate := SToD( "19840325" )
sdDateE := SToD( "" )
slFalse := .F.
slTrue := .T.
soObject := ErrorNew()
suNIL := NIL
sbBlock := {|| NIL }
sbBlockC := {|| "(string)" }
saArray := { 9898 }
saAllTypes := {;
scString ,;
scStringE ,;
scStringZ ,;
snIntZ ,;
snDoubleZ ,;
snIntP ,;
snLongP ,;
snDoubleP ,;
snIntN ,;
snLongN ,;
snDoubleN ,;
snDoubleI ,;
sdDateE ,;
slFalse ,;
slTrue ,;
soObject ,;
suNIL ,;
sbBlock ,;
sbBlockC ,;
saArray }
RETURN
/* Don't change the order or place of this #include. */
#include "rt_vars.ch"
FUNCTION Main_HVM()
LOCAL nA, nB, nC
@@ -1018,3 +916,6 @@ FUNCTION Main_HVM()
TEST_LINE( Empty( ErrorNew() ) , .F. )
RETURN NIL
/* Don't change the order or place of this #include. */
#include "rt_init.ch"

View File

@@ -4,7 +4,7 @@
/*
* Harbour Project source code:
* Regression tests for the runtime library (header and common code)
* Regression tests for the runtime library (header)
*
* Copyright 1999 Victor Szakats <info@szelvesz.hu>
* www - http://www.harbour-project.org
@@ -51,113 +51,3 @@
#define TEST_RESULT_COL4_WIDTH 55
#define TEST_RESULT_COL5_WIDTH 55
/* TODO: Uncomment this, when the PP will support code inclusion */
#ifdef __COMMENT__
STATIC scString
STATIC scStringM
STATIC scStringE
STATIC scStringZ
STATIC scStringW
STATIC snIntZ
STATIC snDoubleZ
STATIC snIntP
STATIC snIntP1
STATIC snLongP
STATIC snDoubleP
STATIC snIntN
STATIC snLongN
STATIC snDoubleN
STATIC snDoubleI
STATIC sdDate
STATIC sdDateE
STATIC slFalse
STATIC slTrue
STATIC soObject
STATIC suNIL
STATIC sbBlock
STATIC sbBlockC
STATIC saArray
STATIC saAllTypes
MEMVAR mxNotHere /* Please don't declare this variable, since it's used to test undeclared MEMVAR situations. */
MEMVAR mcLongerNameThen10Chars
MEMVAR mcString
MEMVAR mcStringE
MEMVAR mcStringZ
MEMVAR mcStringW
MEMVAR mnIntZ
MEMVAR mnDoubleZ
MEMVAR mnIntP
MEMVAR mnLongP
MEMVAR mnDoubleP
MEMVAR mnDoubleI
MEMVAR mnIntN
MEMVAR mnLongN
MEMVAR mnDoubleN
MEMVAR mdDate
MEMVAR mdDateE
MEMVAR mlFalse
MEMVAR mlTrue
MEMVAR moObject
MEMVAR muNIL
MEMVAR mbBlock
MEMVAR mbBlockC
MEMVAR maArray
INIT PROCEDURE RT_InitStatics()
/* NOTE: Some basic values we may need for some tests.
( passing by reference, avoid preprocessor bugs, etc. ) */
scString := "HELLO"
scStringM := "Hello"
scStringE := ""
scStringZ := "A" + Chr( 0 ) + "B"
scStringW := Chr( 13 ) + Chr( 10 ) + Chr( 141 ) + Chr( 10 ) + Chr( 9 )
snIntZ := 0
snDoubleZ := 0.0
snIntP := 10
snIntP1 := 65
snLongP := 100000
snDoubleP := 10.567 /* Use different number of decimals than the default */
snIntN := -10
snLongN := -100000
snDoubleN := -10.567 /* Use different number of decimals than the default */
snDoubleI := 0 // Log( 0 )
sdDate := SToD( "19840325" )
sdDateE := SToD( "" )
slFalse := .F.
slTrue := .T.
soObject := ErrorNew()
suNIL := NIL
sbBlock := {|| NIL }
sbBlockC := {|| "(string)" }
saArray := { 9898 }
saAllTypes := {;
scString ,;
scStringE ,;
scStringZ ,;
snIntZ ,;
snDoubleZ ,;
snIntP ,;
snLongP ,;
snDoubleP ,;
snIntN ,;
snLongN ,;
snDoubleN ,;
snDoubleI ,;
sdDateE ,;
slFalse ,;
slTrue ,;
soObject ,;
suNIL ,;
sbBlock ,;
sbBlockC ,;
saArray }
RETURN
#endif

View File

@@ -53,6 +53,9 @@
#include "error.ch"
#include "fileio.ch"
/* Don't change the order or place of this #include. */
#include "rt_vars.ch"
STATIC s_nPass
STATIC s_nFail
STATIC s_cFileName
@@ -65,57 +68,6 @@ STATIC s_aSkipList
STATIC s_nStartTime
STATIC s_nEndTime
STATIC scString
STATIC scStringM
STATIC scStringE
STATIC scStringZ
STATIC scStringW
STATIC snIntZ
STATIC snDoubleZ
STATIC snIntP
STATIC snIntP1
STATIC snLongP
STATIC snDoubleP
STATIC snIntN
STATIC snLongN
STATIC snDoubleN
STATIC snDoubleI
STATIC sdDate
STATIC sdDateE
STATIC slFalse
STATIC slTrue
STATIC soObject
STATIC suNIL
STATIC sbBlock
STATIC sbBlockC
STATIC saArray
STATIC saAllTypes
MEMVAR mxNotHere /* Please don't declare this variable, since it's used to test undeclared MEMVAR situations. */
MEMVAR mcLongerNameThen10Chars
MEMVAR mcString
MEMVAR mcStringE
MEMVAR mcStringZ
MEMVAR mcStringW
MEMVAR mnIntZ
MEMVAR mnDoubleZ
MEMVAR mnIntP
MEMVAR mnLongP
MEMVAR mnDoubleP
MEMVAR mnDoubleI
MEMVAR mnIntN
MEMVAR mnLongN
MEMVAR mnDoubleN
MEMVAR mdDate
MEMVAR mdDateE
MEMVAR mlFalse
MEMVAR mlTrue
MEMVAR moObject
MEMVAR muNIL
MEMVAR mbBlock
MEMVAR mbBlockC
MEMVAR maArray
FUNCTION Main( cPar1, cPar2 )
/* Initialize test */
@@ -537,57 +489,5 @@ FUNCTION SToD( cDate )
#endif
#endif
INIT PROCEDURE RT_InitStatics()
/* NOTE: Some basic values we may need for some tests.
( passing by reference, avoid preprocessor bugs, etc. ) */
scString := "HELLO"
scStringM := "Hello"
scStringE := ""
scStringZ := "A" + Chr( 0 ) + "B"
scStringW := Chr(13)+Chr(10)+Chr(141)+Chr(10)+Chr(9)
snIntZ := 0
snDoubleZ := 0.0
snIntP := 10
snIntP1 := 65
snLongP := 100000
snDoubleP := 10.567 /* Use different number of decimals than the default */
snIntN := -10
snLongN := -100000
snDoubleN := -10.567 /* Use different number of decimals than the default */
snDoubleI := 0 // Log( 0 )
sdDate := SToD( "19840325" )
sdDateE := SToD( "" )
slFalse := .F.
slTrue := .T.
soObject := ErrorNew()
suNIL := NIL
sbBlock := {|| NIL }
sbBlockC := {|| "(string)" }
saArray := { 9898 }
saAllTypes := {;
scString ,;
scStringE ,;
scStringZ ,;
snIntZ ,;
snDoubleZ ,;
snIntP ,;
snLongP ,;
snDoubleP ,;
snIntN ,;
snLongN ,;
snDoubleN ,;
snDoubleI ,;
sdDateE ,;
slFalse ,;
slTrue ,;
soObject ,;
suNIL ,;
sbBlock ,;
sbBlockC ,;
saArray }
RETURN
/* Don't change the order or place of this #include. */
#include "rt_init.ch"

View File

@@ -35,107 +35,8 @@
#include "rt_main.ch"
STATIC scString
STATIC scStringM
STATIC scStringE
STATIC scStringZ
STATIC scStringW
STATIC snIntZ
STATIC snDoubleZ
STATIC snIntP
STATIC snIntP1
STATIC snLongP
STATIC snDoubleP
STATIC snIntN
STATIC snLongN
STATIC snDoubleN
STATIC snDoubleI
STATIC sdDate
STATIC sdDateE
STATIC slFalse
STATIC slTrue
STATIC soObject
STATIC suNIL
STATIC sbBlock
STATIC sbBlockC
STATIC saArray
STATIC saAllTypes
MEMVAR mxNotHere /* Please don't declare this variable, since it's used to test undeclared MEMVAR situations. */
MEMVAR mcLongerNameThen10Chars
MEMVAR mcString
MEMVAR mcStringE
MEMVAR mcStringZ
MEMVAR mcStringW
MEMVAR mnIntZ
MEMVAR mnDoubleZ
MEMVAR mnIntP
MEMVAR mnLongP
MEMVAR mnDoubleP
MEMVAR mnDoubleI
MEMVAR mnIntN
MEMVAR mnLongN
MEMVAR mnDoubleN
MEMVAR mdDate
MEMVAR mdDateE
MEMVAR mlFalse
MEMVAR mlTrue
MEMVAR moObject
MEMVAR muNIL
MEMVAR mbBlock
MEMVAR mbBlockC
MEMVAR maArray
INIT PROCEDURE RT_InitStatics()
scString := "HELLO"
scStringM := "Hello"
scStringE := ""
scStringZ := "A" + Chr( 0 ) + "B"
scStringW := Chr(13)+Chr(10)+Chr(141)+Chr(10)+Chr(9)
snIntZ := 0
snDoubleZ := 0.0
snIntP := 10
snIntP1 := 65
snLongP := 100000
snDoubleP := 10.567 /* Use different number of decimals than the default */
snIntN := -10
snLongN := -100000
snDoubleN := -10.567 /* Use different number of decimals than the default */
snDoubleI := 0 //Log( 0 )
sdDate := SToD( "19840325" )
sdDateE := SToD( "" )
slFalse := .F.
slTrue := .T.
soObject := ErrorNew()
suNIL := NIL
sbBlock := {|| NIL }
sbBlockC := {|| "(string)" }
saArray := { 9898 }
saAllTypes := {;
scString ,;
scStringE ,;
scStringZ ,;
snIntZ ,;
snDoubleZ ,;
snIntP ,;
snLongP ,;
snDoubleP ,;
snIntN ,;
snLongN ,;
snDoubleN ,;
snDoubleI ,;
sdDateE ,;
slFalse ,;
slTrue ,;
soObject ,;
suNIL ,;
sbBlock ,;
sbBlockC ,;
saArray }
RETURN
/* Don't change the order or place of this #include. */
#include "rt_vars.ch"
FUNCTION Main_MATH()
@@ -474,3 +375,5 @@ FUNCTION Main_MATH()
RETURN NIL
/* Don't change the order or place of this #include. */
#include "rt_init.ch"

View File

@@ -35,107 +35,8 @@
#include "rt_main.ch"
STATIC scString
STATIC scStringM
STATIC scStringE
STATIC scStringZ
STATIC scStringW
STATIC snIntZ
STATIC snDoubleZ
STATIC snIntP
STATIC snIntP1
STATIC snLongP
STATIC snDoubleP
STATIC snIntN
STATIC snLongN
STATIC snDoubleN
STATIC snDoubleI
STATIC sdDate
STATIC sdDateE
STATIC slFalse
STATIC slTrue
STATIC soObject
STATIC suNIL
STATIC sbBlock
STATIC sbBlockC
STATIC saArray
STATIC saAllTypes
MEMVAR mxNotHere /* Please don't declare this variable, since it's used to test undeclared MEMVAR situations. */
MEMVAR mcLongerNameThen10Chars
MEMVAR mcString
MEMVAR mcStringE
MEMVAR mcStringZ
MEMVAR mcStringW
MEMVAR mnIntZ
MEMVAR mnDoubleZ
MEMVAR mnIntP
MEMVAR mnLongP
MEMVAR mnDoubleP
MEMVAR mnDoubleI
MEMVAR mnIntN
MEMVAR mnLongN
MEMVAR mnDoubleN
MEMVAR mdDate
MEMVAR mdDateE
MEMVAR mlFalse
MEMVAR mlTrue
MEMVAR moObject
MEMVAR muNIL
MEMVAR mbBlock
MEMVAR mbBlockC
MEMVAR maArray
INIT PROCEDURE RT_InitStatics()
scString := "HELLO"
scStringM := "Hello"
scStringE := ""
scStringZ := "A" + Chr( 0 ) + "B"
scStringW := Chr(13)+Chr(10)+Chr(141)+Chr(10)+Chr(9)
snIntZ := 0
snDoubleZ := 0.0
snIntP := 10
snIntP1 := 65
snLongP := 100000
snDoubleP := 10.567 /* Use different number of decimals than the default */
snIntN := -10
snLongN := -100000
snDoubleN := -10.567 /* Use different number of decimals than the default */
snDoubleI := 0 //Log( 0 )
sdDate := SToD( "19840325" )
sdDateE := SToD( "" )
slFalse := .F.
slTrue := .T.
soObject := ErrorNew()
suNIL := NIL
sbBlock := {|| NIL }
sbBlockC := {|| "(string)" }
saArray := { 9898 }
saAllTypes := {;
scString ,;
scStringE ,;
scStringZ ,;
snIntZ ,;
snDoubleZ ,;
snIntP ,;
snLongP ,;
snDoubleP ,;
snIntN ,;
snLongN ,;
snDoubleN ,;
snDoubleI ,;
sdDateE ,;
slFalse ,;
slTrue ,;
soObject ,;
suNIL ,;
sbBlock ,;
sbBlockC ,;
saArray }
RETURN
/* Don't change the order or place of this #include. */
#include "rt_vars.ch"
FUNCTION Main_MISC()
LOCAL oError
@@ -875,3 +776,6 @@ STATIC FUNCTION TESTFNAME( cFull )
""
#endif
/* Don't change the order or place of this #include. */
#include "rt_init.ch"

View File

@@ -35,107 +35,8 @@
#include "rt_main.ch"
STATIC scString
STATIC scStringM
STATIC scStringE
STATIC scStringZ
STATIC scStringW
STATIC snIntZ
STATIC snDoubleZ
STATIC snIntP
STATIC snIntP1
STATIC snLongP
STATIC snDoubleP
STATIC snIntN
STATIC snLongN
STATIC snDoubleN
STATIC snDoubleI
STATIC sdDate
STATIC sdDateE
STATIC slFalse
STATIC slTrue
STATIC soObject
STATIC suNIL
STATIC sbBlock
STATIC sbBlockC
STATIC saArray
STATIC saAllTypes
MEMVAR mxNotHere /* Please don't declare this variable, since it's used to test undeclared MEMVAR situations. */
MEMVAR mcLongerNameThen10Chars
MEMVAR mcString
MEMVAR mcStringE
MEMVAR mcStringZ
MEMVAR mcStringW
MEMVAR mnIntZ
MEMVAR mnDoubleZ
MEMVAR mnIntP
MEMVAR mnLongP
MEMVAR mnDoubleP
MEMVAR mnDoubleI
MEMVAR mnIntN
MEMVAR mnLongN
MEMVAR mnDoubleN
MEMVAR mdDate
MEMVAR mdDateE
MEMVAR mlFalse
MEMVAR mlTrue
MEMVAR moObject
MEMVAR muNIL
MEMVAR mbBlock
MEMVAR mbBlockC
MEMVAR maArray
INIT PROCEDURE RT_InitStatics()
scString := "HELLO"
scStringM := "Hello"
scStringE := ""
scStringZ := "A" + Chr( 0 ) + "B"
scStringW := Chr(13)+Chr(10)+Chr(141)+Chr(10)+Chr(9)
snIntZ := 0
snDoubleZ := 0.0
snIntP := 10
snIntP1 := 65
snLongP := 100000
snDoubleP := 10.567 /* Use different number of decimals than the default */
snIntN := -10
snLongN := -100000
snDoubleN := -10.567 /* Use different number of decimals than the default */
snDoubleI := 0 //Log( 0 )
sdDate := SToD( "19840325" )
sdDateE := SToD( "" )
slFalse := .F.
slTrue := .T.
soObject := ErrorNew()
suNIL := NIL
sbBlock := {|| NIL }
sbBlockC := {|| "(string)" }
saArray := { 9898 }
saAllTypes := {;
scString ,;
scStringE ,;
scStringZ ,;
snIntZ ,;
snDoubleZ ,;
snIntP ,;
snLongP ,;
snDoubleP ,;
snIntN ,;
snLongN ,;
snDoubleN ,;
snDoubleI ,;
sdDateE ,;
slFalse ,;
slTrue ,;
soObject ,;
suNIL ,;
sbBlock ,;
sbBlockC ,;
saArray }
RETURN
/* Don't change the order or place of this #include. */
#include "rt_vars.ch"
FUNCTION Main_STR()
@@ -1159,3 +1060,6 @@ FUNCTION Long_STRINGS()
RETURN NIL
#endif
/* Don't change the order or place of this #include. */
#include "rt_init.ch"

View File

@@ -35,107 +35,8 @@
#include "rt_main.ch"
STATIC scString
STATIC scStringM
STATIC scStringE
STATIC scStringZ
STATIC scStringW
STATIC snIntZ
STATIC snDoubleZ
STATIC snIntP
STATIC snIntP1
STATIC snLongP
STATIC snDoubleP
STATIC snIntN
STATIC snLongN
STATIC snDoubleN
STATIC snDoubleI
STATIC sdDate
STATIC sdDateE
STATIC slFalse
STATIC slTrue
STATIC soObject
STATIC suNIL
STATIC sbBlock
STATIC sbBlockC
STATIC saArray
STATIC saAllTypes
MEMVAR mxNotHere /* Please don't declare this variable, since it's used to test undeclared MEMVAR situations. */
MEMVAR mcLongerNameThen10Chars
MEMVAR mcString
MEMVAR mcStringE
MEMVAR mcStringZ
MEMVAR mcStringW
MEMVAR mnIntZ
MEMVAR mnDoubleZ
MEMVAR mnIntP
MEMVAR mnLongP
MEMVAR mnDoubleP
MEMVAR mnDoubleI
MEMVAR mnIntN
MEMVAR mnLongN
MEMVAR mnDoubleN
MEMVAR mdDate
MEMVAR mdDateE
MEMVAR mlFalse
MEMVAR mlTrue
MEMVAR moObject
MEMVAR muNIL
MEMVAR mbBlock
MEMVAR mbBlockC
MEMVAR maArray
INIT PROCEDURE RT_InitStatics()
scString := "HELLO"
scStringM := "Hello"
scStringE := ""
scStringZ := "A" + Chr( 0 ) + "B"
scStringW := Chr(13)+Chr(10)+Chr(141)+Chr(10)+Chr(9)
snIntZ := 0
snDoubleZ := 0.0
snIntP := 10
snIntP1 := 65
snLongP := 100000
snDoubleP := 10.567 /* Use different number of decimals than the default */
snIntN := -10
snLongN := -100000
snDoubleN := -10.567 /* Use different number of decimals than the default */
snDoubleI := 0 //Log( 0 )
sdDate := SToD( "19840325" )
sdDateE := SToD( "" )
slFalse := .F.
slTrue := .T.
soObject := ErrorNew()
suNIL := NIL
sbBlock := {|| NIL }
sbBlockC := {|| "(string)" }
saArray := { 9898 }
saAllTypes := {;
scString ,;
scStringE ,;
scStringZ ,;
snIntZ ,;
snDoubleZ ,;
snIntP ,;
snLongP ,;
snDoubleP ,;
snIntN ,;
snLongN ,;
snDoubleN ,;
snDoubleI ,;
sdDateE ,;
slFalse ,;
slTrue ,;
soObject ,;
suNIL ,;
sbBlock ,;
sbBlockC ,;
saArray }
RETURN
/* Don't change the order or place of this #include. */
#include "rt_vars.ch"
FUNCTION Main_TRANS()
LOCAL cOldDate := Set( _SET_DATEFORMAT )
@@ -559,3 +460,5 @@ FUNCTION Main_TRANS()
RETURN NIL
/* Don't change the order or place of this #include. */
#include "rt_init.ch"