2001-03-28 00:00 UTC-0800 Brian Hays <bhays@abacuslaw.com>

This commit is contained in:
Brian Hays
2001-03-28 07:59:54 +00:00
parent e5ff2cd515
commit 35bb9fbab3
4 changed files with 115 additions and 36 deletions

View File

@@ -1,24 +1,46 @@
2001-03-28 00:00 UTC-0800 Brian Hays <bhays@abacuslaw.com>
* contrib/rdd_ads/ads1.c
+ added ADSSetRelKeyPos for quick scrollbar guesstimates
* contrib/rdd_ads/adsfunc.c
* moved ADSGetRelKeyPos to ads1.c
+ added AdsIsExprValid() wrapper to test if an expression can be
evaluated by the server
+ contrib/rdd_ads/adsmgmnt.c
* minor edits
2001-03-27 20:05 UTC+0100 Ryszard Glab <rglab@imid.med.pl>
Changes from Marek Paliwoda. Thanks Marek :)
*doc/en/gtslang.txt
*source/rtl/gtsln/gtsln.c
*source/rtl/gtsln/kbsln.c
*source/rtl/gtsln/keytrans.c
- added support for displaying and entering national characters (see
gtslang.txt for details)
- improved keyboard support for linux text console. Almost all
ALT/CTRL+
SpecialKeys should work well. Note that You have to work using true
/dev/tty[1-12] device. This means You can't benefit from it when You
run Harbour programs from within Midnight Commander for example,
because
MC uses pseudoterminals.
- prepared for other Unix text consoles (SCO) (not tested)
- removed support for DOS. It was totally not needed due its
limitations
2001-03-27 05:18 GMT-3 Horacio Roldan <horacioroldan@usa.net>
* harbour/source/rdd/dbcmd.c
* fixed unallocated memory block in dbcreate

View File

@@ -2167,6 +2167,78 @@ HB_FUNC( ADS_GETFUNCTABLE )
hb_retni( FAILURE );
}
HB_FUNC( ADSSETRELKEYPOS )
{
ADSAREAP pArea;
DOUBLE pdPos = hb_parnd( 1 );
pArea = (ADSAREAP) hb_rddGetCurrentWorkAreaPointer();
if( pArea )
{
if ( pdPos >= 1.0)
adsGoBottom( pArea ) ;
else if ( pdPos <= 0)
adsGoTop( pArea ) ;
else
{
if ( pArea->hOrdCurrent )
hb_retnl(AdsSetRelKeyPos ( pArea->hOrdCurrent, pdPos)) ;
else
{
ULONG ulRecCount;
AdsGetRecordCount( pArea->hTable, ADS_IGNOREFILTERS, &ulRecCount );
if ( ulRecCount > 0 )
hb_retnl(AdsGotoRecord( pArea->hTable, (ULONG) (ulRecCount * pdPos) ) );
else
{
if ( pArea->fEof )
hb_retnd( 1.0 );
else
hb_retnd( (double) pArea->ulRecNo/ ulRecCount );
}
}
}
AdsGetRecordNum( pArea->hTable, ADS_IGNOREFILTERS,
(UNSIGNED32 *)&(pArea->ulRecNo) );
}
else
hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSSETRELKEYPOS" );
}
HB_FUNC( ADSGETRELKEYPOS )
{
ADSAREAP pArea;
DOUBLE pdPos = 0.0;
pArea = (ADSAREAP) hb_rddGetCurrentWorkAreaPointer();
if( pArea )
{
if ( pArea->hOrdCurrent )
{
AdsGetRelKeyPos ( pArea->hOrdCurrent, &pdPos);
hb_retnd( pdPos );
}
else
{
ULONG ulRecCount;
AdsGetRecordNum( pArea->hTable, ADS_IGNOREFILTERS,
(UNSIGNED32 *)&(pArea->ulRecNo) );
AdsGetRecordCount( pArea->hTable, ADS_IGNOREFILTERS, &ulRecCount );
if ( pArea->ulRecNo == 0 || ulRecCount == 0 )
hb_retnd( 0.0 );
else
{
if ( pArea->fEof )
hb_retnd( 1.0 );
else
hb_retnd( (double) pArea->ulRecNo/ ulRecCount );
}
}
}
else
hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSGETRELKEYPOS" );
}
HB_FUNC( ADSCUSTOMIZEAOF )
{
ADSAREAP pArea;

View File

@@ -409,39 +409,6 @@ HB_FUNC( ADSSETAOF )
}
HB_FUNC( ADSGETRELKEYPOS )
{
ADSAREAP pArea;
DOUBLE pdPos;
pArea = (ADSAREAP) hb_rddGetCurrentWorkAreaPointer();
if( pArea )
{
if ( pArea->hOrdCurrent )
{
AdsGetRelKeyPos ( pArea->hOrdCurrent, &pdPos);
hb_retnd( pdPos );
}
else
{
ULONG ulRecCount;
AdsGetRecordNum( pArea->hTable, ADS_IGNOREFILTERS,
(UNSIGNED32 *)&(pArea->ulRecNo) );
AdsGetRecordCount( pArea->hTable, ADS_IGNOREFILTERS, &ulRecCount );
if ( pArea->ulRecNo == 0 || ulRecCount == 0 )
hb_retnd( 0.0 );
else
{
if ( pArea->fEof )
hb_retnd( 1.0 );
else
hb_retnd( (double) pArea->ulRecNo/ ulRecCount );
}
}
}
else
hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSGETRELKEYPOS" );
}
HB_FUNC( ADSENABLEENCRYPTION )
{
@@ -862,3 +829,16 @@ HB_FUNC( ADSISINDEXED )
hb_retl( FALSE );
}
HB_FUNC( ADSISEXPRVALID ) /* cExpr */
{
ADSAREAP pArea;
BOOL bValidExpr = FALSE;
pArea = (ADSAREAP) hb_rddGetCurrentWorkAreaPointer();
if(pArea && ISCHAR( 1 ) )
AdsIsExprValid( pArea->hTable, (UNSIGNED8*) hb_parc( 1 ),
(UNSIGNED16*) &bValidExpr );
hb_retl(bValidExpr);
}

View File

@@ -351,6 +351,7 @@ HB_FUNC( ADSMGGETUSERNAMES ) /* Return array of connected users */
UNSIGNED16 usStructSize = sizeof( ADS_MGMT_USER_INFO );
ADS_MGMT_USER_INFO* pastUserInfo;
// ADS_MGMT_USER_INFO astUserInfo[MAX_NUM_USERS];
// bh: Enhancement: Get # of tables from ADS_MGMT_ACTIVITY_INFO.stUsers instead of set size
if ( ISNUM( 2 ) )
ulMaxUsers = hb_parnl( 2 );
@@ -389,8 +390,12 @@ HB_FUNC( ADSMGGETUSERNAMES ) /* Return array of connected users */
HB_FUNC( ADSMGGETOPENTABLES )
{
UNSIGNED32 ulRetVal = AE_SUCCESS;
AdsMgGetOpenTables();
UNSIGNED32 ulRetVal ;
UNSIGNED32 ulMaxUsers = 100 ; // needed for array memory allocation; caller can set with 2nd arg
UNSIGNED32 ulCount;
UNSIGNED16 usStructSize = sizeof( ADS_MGMT_USER_INFO );
ADS_MGMT_USER_INFO* pastUserInfo;
Get # of tables from ADS_MGMT_ACTIVITY_INFO
}
HB_FUNC( ADSMGGETOPENINDEXES )