diff --git a/ChangeLog.txt b/ChangeLog.txt index 5e51d04337..7fe11f68ec 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,5 +1,5 @@ /* - * $Id: 809bfe21bc9117db8fbe7b330e8dc55aa8de7c9f $ + * $Id$ */ /* Read doc/howtorep.txt and use this format for entry headers: @@ -10,11 +10,15 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2013-05-21 07:55 UTC-0300 Antonio Carlos Pantaglione (toninho/at/fwi.com.br) + * contrib/rddads/adsfunc.c + + Enable function ADSSETINDEXDIRECTION only for ADS 9.0 or newer + % small optmizations in ADSSETINDEXDIRECTION + 2013-05-17 14:20 UTC+0200 Jfl mafact (jfl/at/mafact.com) * contrib/rddads/adsfunc.c + Adding new function ADSSETINDEXDIRECTION - 2013-05-16 22:34 UTC+0200 Tamas TEVESZ (ice extreme.hu) * contrib/3rd/sqlite3/sqlite3.hbp * Disable on Minix (no MAP_SHARED which is needed by SQLite WAL); diff --git a/contrib/rddads/adsfunc.c b/contrib/rddads/adsfunc.c index 20658ba72f..156f70452d 100644 --- a/contrib/rddads/adsfunc.c +++ b/contrib/rddads/adsfunc.c @@ -2422,18 +2422,20 @@ HB_FUNC( ADSDDDROPLINK ) HB_FUNC( ADSSETINDEXDIRECTION ) { +#if ADS_LIB_VERSION >= 900 ADSAREAP pArea = hb_adsGetWorkAreaPointer(); + ADSHANDLE hIndex; UNSIGNED32 nRet = 0 ; - if( pArea ) - { - ADSHANDLE hIndex = pArea->hOrdCurrent; + if( pArea && HB_ISNUM( 1 ) ) + { + hIndex = pArea->hOrdCurrent; - if (hb_parinfo(0)==1 && HB_ISNUM(1) ) - { - nRet = AdsSetIndexDirection( hIndex, (UNSIGNED16) hb_parni(1) ); - } - } + nRet = AdsSetIndexDirection( hIndex, ( UNSIGNED16 ) hb_parni( 1 ) ); + } - hb_retni(nRet); + hb_retnl( nRet ); +#else + hb_retnl( 0 ); +#endif }