20000328-23:10 GMT+3 Alexander Kresin

This commit is contained in:
Alexander S.Kresin
2000-03-28 19:19:07 +00:00
parent ca0b0421ab
commit 7eba7dba8d
6 changed files with 42 additions and 4 deletions

View File

@@ -1,3 +1,15 @@
20000328-23:10 GMT+3 Alexander Kresin
* source/pp/ppcore.c
* Bug fixed, reported by Luiz Rafael Culik
* Problem solved with 16-bit version
* source/pp/pplib.c
* hb_pp_init() call removed from __preprocess()
* source/rdd/dbf1.c
* bug fixed as proposed Janica Lubos
* contrib/rdd_ads/ads.ch
* contrib/rdd_ads/adsfunc.c
* Added third optional parameter to adsKeyCount() as proposed Brian Hays
2000-03-28 13:40 GMT+1 Maurilio Longo <maurilio.longo@libero.it>
* include/hbdefs.h

View File

@@ -56,6 +56,11 @@
#define ADS_TOP 1
#define ADS_BOTTOM 2
/* for calls that can optionally use filters */
#define ADS_RESPECTFILTERS 1
#define ADS_IGNOREFILTERS 2
#define ADS_RESPECTSCOPES 3
#command SET FILETYPE TO <x:NTX,CDX,ADT> ;
=> AdsSetFileType( if( upper( <(x)> ) == "NTX", 1, ;
if( upper( <(x)> ) == "CDX", 2, 3 ) ) )

View File

@@ -220,6 +220,7 @@ HB_FUNC( ADSKEYCOUNT )
UNSIGNED8 ordNum;
UNSIGNED32 pulKey;
ADSHANDLE hIndex;
UNSIGNED16 usFilterOption = ADS_IGNOREFILTERS;
pArea = (ADSAREAP) hb_rddGetCurrentWorkAreaPointer();
if( pArea )
@@ -239,8 +240,19 @@ HB_FUNC( ADSKEYCOUNT )
}
else
hIndex = (pArea->hOrdCurrent == 0)? pArea->hTable:pArea->hOrdCurrent;
if( hb_pcount() > 2 )
{
if( ISNUM( 3 ) )
usFilterOption = hb_parni( 3 );
else
{
hb_errRT_DBCMD( EG_ARG, 1014, NULL, "ADSKEYCOUNT" );
return;
}
AdsGetRecordCount ( hIndex, ADS_IGNOREFILTERS, &pulKey);
}
AdsGetRecordCount ( hIndex, usFilterOption, &pulKey);
hb_retnl( pulKey );
}
else

View File

@@ -582,7 +582,14 @@ static void ParseCommand( char * sLine, BOOL com_or_xcom, BOOL com_or_tra )
HB_TRACE(HB_TR_DEBUG, ("ParseCommand(%s, %d, %d)", sLine, com_or_xcom, com_or_tra));
NextWord( &sLine, cmdname, FALSE );
HB_SKIPTABSPACES( sLine );
ipos = 0;
while( *sLine != '\0' && *sLine != ' ' && *sLine != '\t' && *sLine != '<')
{
*(cmdname+ipos++) = *sLine++;
}
*(cmdname+ipos) = '\0';
if( !ipos ) return;
hb_strupr( cmdname );
HB_SKIPTABSPACES(sLine);
@@ -2171,7 +2178,7 @@ void hb_pp_Stuff(char *ptri, char * ptro, int len1, int len2, int lenres )
{
ptr1 = ptro + lenres;
ptr2 = ptro + lenres + len1 - len2;
for( ; ptr1 >= ptro; ptr1--,ptr2-- ) *ptr2 = *ptr1;
for( i=0; i<=lenres; ptr1--,ptr2--,i++ ) *ptr2 = *ptr1;
}
else
{

View File

@@ -84,7 +84,7 @@ HB_FUNC( __PREPROCESS )
int slen;
hb_pp_Init();
/* hb_pp_Init(); */
slen = HB_MIN( hb_parclen( 1 ), HB_PP_STR_SIZE - 1 );
memcpy( pText, hb_parc( 1 ), slen );

View File

@@ -1133,6 +1133,8 @@ static ERRCODE dbfGoTo( AREAP pArea, ULONG ulRecNo )
return FAILURE;
pArea->lpExtendInfo->ulRecCount = ulRecCount;
}
else
ulRecCount = pArea->lpExtendInfo->ulRecCount;
if( ulRecCount < 1 )
{