2010-09-29 02:08 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapirdd.h
* harbour/src/rdd/workarea.c
+ added new 5-th parameter with pointer to super table ID to
<RDD>_GETFUNCTABLE() function
+ added new C function hb_rddInheritEx() which allows to retrieve
super RDD ID during registration.
+ added new C function:
HB_BOOL hb_rddIsDerivedFrom( HB_USHORT uiRddID,
HB_USHORT uiSupperRddID );
which returns HB_TRUE if one of uiRddID ancestors is uiSupperRddID
* harbour/src/rdd/dbf1.c
* harbour/src/rdd/delim1.c
* harbour/src/rdd/sdf1.c
* harbour/src/rdd/dbffpt/dbffpt1.c
* harbour/src/rdd/dbfntx/dbfntx1.c
* harbour/src/rdd/dbfnsx/dbfnsx1.c
* harbour/src/rdd/dbfcdx/dbfcdx1.c
* harbour/src/rdd/usrrdd/usrrdd.c
* harbour/src/rdd/usrrdd/rdds/arrayrdd.prg
* harbour/src/rdd/usrrdd/rdds/dbtcdx.prg
* harbour/src/rdd/usrrdd/rdds/fptcdx.prg
* harbour/src/rdd/usrrdd/rdds/hscdx.prg
* harbour/src/rdd/usrrdd/rdds/vfpcdx.prg
* harbour/src/rdd/usrrdd/rdds/logrdd.prg
* harbour/src/rdd/usrrdd/rdds/rlcdx.prg
* harbour/src/rdd/usrrdd/rdds/smtcdx.prg
* harbour/contrib/rddbmcdx/bmdbfcdx.c
* harbour/contrib/rddsql/sqlbase.c
* harbour/contrib/rddsql/sqlmix.c
* harbour/contrib/rddads/adsx.c
* harbour/contrib/rddads/ads1.c
* respect new parameter in <RDD>_GETFUNCTABLE() and use
hb_rddInheritEx() instead of hb_rddInherit()
* harbour/contrib/rddads/ads1.c
* use hb_rddIsDerivedFrom() to recognize RDDs which inherits from
one of ADS* RDDs.
It should resolve some problems with ADS*X RDDs and help to simplify
ADS*X RDDs code.
Please test it and update ADS*X code removing some code which is
not longer necessary.
This commit is contained in:
@@ -1236,18 +1236,20 @@ HB_FUNC( SQLBASE ) {;}
|
||||
HB_FUNC( SQLBASE_GETFUNCTABLE )
|
||||
{
|
||||
RDDFUNCS * pTable;
|
||||
HB_USHORT * uiCount, uiRddId;
|
||||
HB_USHORT * puiCount, uiRddId;
|
||||
|
||||
uiCount = ( HB_USHORT * ) hb_itemGetPtr( hb_param( 1, HB_IT_POINTER ) );
|
||||
* uiCount = RDDFUNCSCOUNT;
|
||||
pTable = ( RDDFUNCS * ) hb_itemGetPtr( hb_param( 2, HB_IT_POINTER ) );
|
||||
puiCount = ( HB_USHORT * ) hb_parptr( 1 );
|
||||
pTable = ( RDDFUNCS * ) hb_parptr( 2 );
|
||||
uiRddId = ( HB_USHORT ) hb_parni( 4 );
|
||||
|
||||
if ( pTable )
|
||||
{
|
||||
HB_ERRCODE errCode;
|
||||
|
||||
errCode = hb_rddInherit( pTable, &sqlbaseTable, &sqlbaseSuper, 0 );
|
||||
if( puiCount )
|
||||
* puiCount = RDDFUNCSCOUNT;
|
||||
|
||||
errCode = hb_rddInheritEx( pTable, &sqlbaseTable, &sqlbaseSuper, NULL, NULL );
|
||||
if ( errCode == HB_SUCCESS )
|
||||
{
|
||||
s_rddidSQLBASE = uiRddId;
|
||||
|
||||
Reference in New Issue
Block a user