From e37935c8fe0ed8441f1ecf91fbf9febea4f48d0d Mon Sep 17 00:00:00 2001 From: Brian Hays Date: Fri, 13 Apr 2001 05:52:38 +0000 Subject: [PATCH] 2001-04-12 10:56 UTC-0800 Brian Hays --- harbour/ChangeLog | 9 +++++++ harbour/contrib/rdd_ads/ads1.c | 7 ++--- harbour/contrib/rdd_ads/adsmgmnt.c | 42 +++++++++++++++++++++--------- harbour/contrib/rdd_ads/testmg.prg | 41 ++++++++++++++++++++--------- 4 files changed, 72 insertions(+), 27 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index d14d1606d1..a3f8ed436a 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,12 @@ +2001-04-12 10:56 UTC-0800 Brian Hays + * contrib/rdd_ads/ads1.c + * Fixed ordName/dbOrderInfo: it returned blank for any + order if in natural order when called + + * contrib/rdd_ads/adsmgmnt.c + * contrib/rdd_ads/testmg.prg + * changed licensing comment at top + 2001-04-12 15:15 UTC-0400 David G. Holm * include/fileio.ch diff --git a/harbour/contrib/rdd_ads/ads1.c b/harbour/contrib/rdd_ads/ads1.c index b8cf44f1d7..56d800021b 100644 --- a/harbour/contrib/rdd_ads/ads1.c +++ b/harbour/contrib/rdd_ads/ads1.c @@ -585,6 +585,7 @@ static ERRCODE adsAppend( ADSAREAP pArea, BOOL bUnLockAll ) HB_TRACE(HB_TR_DEBUG, ("adsAppend(%p, %d)", pArea, (int) bUnLockAll)); AdsAppendRecord ( pArea->hTable ); + pArea->ulRecCount++; hb_adsCheckBofEof( pArea ); return SUCCESS; } @@ -1501,7 +1502,7 @@ static ERRCODE adsOrderDestroy( ADSAREAP pArea, LPDBORDERINFO pOrderInfo ) static ERRCODE adsOrderInfo( ADSAREAP pArea, USHORT uiIndex, LPDBORDERINFO pOrderInfo ) { - ADSHANDLE phIndex; + ADSHANDLE phIndex; UNSIGNED32 ulRetVal = AE_SUCCESS; UNSIGNED8 aucBuffer[MAX_STR_LEN + 1]; UNSIGNED16 pusLen = MAX_STR_LEN; @@ -1652,7 +1653,7 @@ static ERRCODE adsOrderInfo( ADSAREAP pArea, USHORT uiIndex, LPDBORDERINFO pOrde break; case DBOI_NAME: - if ( pArea->hOrdCurrent ) + if( phIndex ) AdsGetIndexName( phIndex, aucBuffer, &pusLen); hb_itemPutCL( pOrderInfo->itmResult, (char*)aucBuffer, pusLen); break; @@ -2258,7 +2259,7 @@ HB_FUNC( ADSCUSTOMIZEAOF ) if ( ulNumRecs ) { pulRecords = (UNSIGNED32 *) hb_xgrab( ulNumRecs * sizeof( UNSIGNED32 ) ); - if ( ulNumRecs > 1 ) /* convert array of recnos to C array */ + if ( ISARRAY( 1 ) ) /* convert array of recnos to C array */ { for ( ulRecord = 0; ulRecord < ulNumRecs; ulRecord++) pulRecords[ulRecord] = hb_parnl( 1, ulRecord + 1); diff --git a/harbour/contrib/rdd_ads/adsmgmnt.c b/harbour/contrib/rdd_ads/adsmgmnt.c index c4a0e454fd..3a545a1d29 100644 --- a/harbour/contrib/rdd_ads/adsmgmnt.c +++ b/harbour/contrib/rdd_ads/adsmgmnt.c @@ -11,15 +11,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version, with one exception: - * - * The exception is that if you link the Harbour Runtime Library (HRL) - * and/or the Harbour Virtual Machine (HVM) with other files to produce - * an executable, this does not by itself cause the resulting executable - * to be covered by the GNU General Public License. Your use of that - * executable is in no way restricted on account of linking the HRL - * and/or HVM code into it. + * the Free Software Foundation; either version 2, or (at your option) + * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -27,12 +20,37 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit - * their web site at http://www.gnu.org/). + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. * */ + #define HB_OS_WIN_32_USED #include "hbapi.h" diff --git a/harbour/contrib/rdd_ads/testmg.prg b/harbour/contrib/rdd_ads/testmg.prg index 08eb293fb4..7b8f4c45cf 100644 --- a/harbour/contrib/rdd_ads/testmg.prg +++ b/harbour/contrib/rdd_ads/testmg.prg @@ -11,15 +11,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version, with one exception: - * - * The exception is that if you link the Harbour Runtime Library (HRL) - * and/or the Harbour Virtual Machine (HVM) with other files to produce - * an executable, this does not by itself cause the resulting executable - * to be covered by the GNU General Public License. Your use of that - * executable is in no way restricted on account of linking the HRL - * and/or HVM code into it. + * the Free Software Foundation; either version 2, or (at your option) + * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -27,9 +20,33 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit - * their web site at http://www.gnu.org/). + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. * */