From cab11e9fd609548eeff5528c6cf8408b2af1a0ef Mon Sep 17 00:00:00 2001 From: Brian Hays Date: Mon, 28 Aug 2000 19:11:58 +0000 Subject: [PATCH] 2000-08-28 12:03 UTC+0800 Brian Hays --- harbour/ChangeLog | 15 ++++++ harbour/contrib/rdd_ads/adsfunc.c | 31 ++++++------ harbour/contrib/rdd_ads/doc/en/readme.txt | 13 +++-- harbour/doc/en/idle.txt | 60 +++++++++++------------ harbour/doc/en/misc.txt | 2 +- 5 files changed, 72 insertions(+), 49 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index cd731457a0..5f8da2fbfd 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,18 @@ +2000-08-28 12:03 UTC+0800 Brian Hays + * contrib/rdd_ads/doc/en/readme.txt + * small formatting changes + * contrib/rdd_ads/adsfunc.c + * adsKeyCount: + fixed parameter checking to look at ISNIL/ISNUM instead of pcount + (had a bug if called adsKeyCount(,,ADS_RESPECTFILTERS)) + * adsCustomizeAOF: + fixed parameter checks and retrieval of a record# as a long + fixed array reference to 0 for first element in C array + * doc/en/idle.txt + * misc. grammar fixes + * doc/en/misc.txt + * removed a stray character + 2000-08-28 10:35 UTC+0800 Ron Pinkas * source/compiler/harbour.c * source/compiler/harbour.y diff --git a/harbour/contrib/rdd_ads/adsfunc.c b/harbour/contrib/rdd_ads/adsfunc.c index 6019b2aac9..5b5864ee85 100644 --- a/harbour/contrib/rdd_ads/adsfunc.c +++ b/harbour/contrib/rdd_ads/adsfunc.c @@ -222,21 +222,24 @@ HB_FUNC( ADSKEYCOUNT ) pArea = (ADSAREAP) hb_rddGetCurrentWorkAreaPointer(); if( pArea ) { - if( hb_pcount() > 0 ) + if( ISNUM( 1 ) ) { - if( ISNUM( 1 ) ) - { - ordNum = hb_parni( 1 ); - AdsGetIndexHandleByOrder( pArea->hTable, ordNum, &hIndex ); - } - else - { - ordName = (UCHAR*)hb_parc( 1 ); - AdsGetIndexHandle( pArea->hTable, ordName, &hIndex ); - } + ordNum = hb_parni( 1 ); + AdsGetIndexHandleByOrder( pArea->hTable, ordNum, &hIndex ); + } + else if(ISCHAR( 1 )) + { + ordName = (UCHAR*)hb_parc( 1 ); + AdsGetIndexHandle( pArea->hTable, ordName, &hIndex ); + } + else if(! ISNIL( 1 )) + { + hb_errRT_DBCMD( EG_ARG, 1014, NULL, "ADSKEYCOUNT" ); + return; } else hIndex = (pArea->hOrdCurrent == 0)? pArea->hTable:pArea->hOrdCurrent; + if( hb_pcount() > 2 ) { if( ISNUM( 3 ) ) @@ -278,8 +281,8 @@ HB_FUNC( ADSCUSTOMIZEAOF ) pArea = (ADSAREAP) hb_rddGetCurrentWorkAreaPointer(); if( pArea ) { - pulRecords[1] = hb_parni( 1 ); - if( hb_pcount() > 1 ) + pulRecords[0] = hb_parnl( 1 ); + if( ISNUM(2) ) usOption = hb_parni( 2 ); ulRetVal = AdsCustomizeAOF( pArea->hTable, 1, pulRecords, usOption); if ( ulRetVal == AE_SUCCESS ) @@ -574,4 +577,4 @@ HB_FUNC( ADSISTABLEENCRYPTED ) } else hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, " ADSISTABLEENCRYPTED" ); -} \ No newline at end of file +} diff --git a/harbour/contrib/rdd_ads/doc/en/readme.txt b/harbour/contrib/rdd_ads/doc/en/readme.txt index 52004a4ca4..8e16d8e0fd 100644 --- a/harbour/contrib/rdd_ads/doc/en/readme.txt +++ b/harbour/contrib/rdd_ads/doc/en/readme.txt @@ -4,14 +4,19 @@ /* * $DOC$ * $FUNCNAME$ - * Overview + * ADS Overview * $CATEGORY$ * Document * $ONELINER$ * Advantage Database Server RDD * $DESCRIPTION$ - * RDD for the Advantage Database Server by Extended Systems. - * RDD by Alexander Kresin + * RDDADS is an RDD for the Advantage Database Server, an xBase data + * server by Extended Systems . + * The RDD was written by Alexander Kresin + * + * Your Harbour application can access a remote database server for a + * true client/server architecture, or it can use the "local server" + * ADSLOC32.DLL for stand-alone or even small network installations. * * For using this RDD you need to have: * ace32.dll ( Advantage Client Engine ), @@ -32,7 +37,7 @@ * rddRegister( "ADS", 1 ) * rddsetdefault( "ADS" ) * - * By default RDD is tuned for remote server and cdx indexes. To + * By default RDDADS is tuned for remote server and cdx indexes. To * change this you may use commands, defined in ads.ch: * * SET SERVER LOCAL diff --git a/harbour/doc/en/idle.txt b/harbour/doc/en/idle.txt index a3f4c255b1..8ee640f534 100644 --- a/harbour/doc/en/idle.txt +++ b/harbour/doc/en/idle.txt @@ -9,14 +9,14 @@ * $ONELINER$ * Read me file for Idle States * $DESCRIPTION$ - * The idle state is the state of the harbour virtual machine when it - * waits for the user input from the keyboard or the mouse. The idle - * state is entered during INKEY() calls currently. All applications + * The idle state is the state of the harbour virtual machine when it + * waits for the user input from the keyboard or the mouse. The idle + * state is entered during INKEY() calls currently. All applications * that don't use INKEY() function call can signal the idle states with * the call of HB_IDLESTATE() function (or hb_idleState() on C level). * * During idle states the virtual machine calls the garbage collector and - * it can call user defined actions (background tasks). It also releases + * it can call user defined actions (background tasks). It also releases * the CPU time slices for some poor platforms that are not smart enough * (Windows NT). * @@ -42,21 +42,21 @@ * $SYNTAX$ * HB_IDLEADD( ) --> nHandle * $ARGUMENTS$ - * is an codeblock that will be executed during idle states. - * There is no arguments passed to this codeblock during evaluation. + * is a codeblock that will be executed during idle states. + * There are no arguments passed to this codeblock during evaluation. * $RETURNS$ - * The handle (an integer value) that identifies the task. This - * handle can be used during deleting the task. + * The handle (an integer value) that identifies the task. This + * handle can be used for deleting the task. * $DESCRIPTION$ * HB_IDLEADD() adds a passed codeblock to the list of background - * tasks that will be evaluated during the idle states. There is no + * tasks that will be evaluated during the idle states. There is no * limit for the number of tasks. * $EXAMPLES$ * nTask := HB_IDLEADD( {|| SayTime()} ) * $STATUS$ - * Harbour + * R * $COMPLIANCE$ - * Harbour extension simmilar to FT_ONIDLE() function available + * Harbour extension similar to FT_ONIDLE() function available * in NanForum library. * $PLATFORMS$ * All @@ -77,7 +77,7 @@ * $SYNTAX$ * HB_IDLEDEL( ) --> xAction * $ARGUMENTS$ - * is the identifier of the task returned by the + * is the identifier of the task returned by the * HB_IDLEADD() function. * $RETURNS$ * NIL if invalid handle is passed or a codeblock that was @@ -94,9 +94,9 @@ * INKEY(10) * cbAction := HB_IDLEDEL( nTask ) * $STATUS$ - * Harbour + * R * $COMPLIANCE$ - * Harbour extension + * Harbour extension * $PLATFORMS$ * All * $FILES$ @@ -108,7 +108,7 @@ /* $DOC$ * $FUNCNAME$ - * HB_IDLESTATE() + * HB_IdleState() * $CATEGORY$ * The idle states * $ONELINER$ @@ -118,12 +118,12 @@ * $ARGUMENTS$ * None * $RETURNS$ - * NIL + * NIL * $DESCRIPTION$ - * HB_IDLESTATE() requests the garbage collecting and executes a - * single background task defined by the codeblock code passed with - * HB_IDLEADD() function. Every call for this function evaluates - * different task in the order of tasks creation. There is no + * HB_IDLESTATE() requests the garbage collection and executes a + * single background task defined by the codeblock passed with + * HB_IDLEADD() function. Every call to this function evaluates a + * different task in the order of task creation. There are no * arguments passed during a codeblock evaluation. * * This function can be safely called even if there are no background @@ -138,7 +138,7 @@ * cbAction := HB_IDLEDEL( nTask1 ) * HB_IDLEDEL( nTask2 ) * $STATUS$ - * Harbour + * R * $COMPLIANCE$ * Harbour extension similar to FT_IAMIDLE() function available * in NanForum library. @@ -163,23 +163,23 @@ * $ARGUMENTS$ * None * $RETURNS$ - * Nothing + * Nothing * $DESCRIPTION$ - * hb_idleState() requests the garbage collecting and executes a - * single background task defined by the codeblock code passed with - * HB_IDLEADD() function. It also releases the CPU time slices for + * hb_idleState() is a C function that requests garbage collection and + * executes a single background task defined by the codeblock passed + * with HB_IDLEADD() function. It also releases the CPU time slices for * platforms that require it. * - * Every call for this function evaluates different task in the - * order of tasks creation. There is no arguments passed during - * a codeblock evaluation. + * Every call for this function evaluates different task in the + * order of task creation. There are no arguments passed during + * codeblock evaluation. * * This function can be safely called even if there are no background * tasks defined. * - * This function is automatically called from INKEY() function. + * This function is automatically called from the INKEY() function. * $STATUS$ - * Harbour + * R * $PLATFORMS$ * All * $FILES$ diff --git a/harbour/doc/en/misc.txt b/harbour/doc/en/misc.txt index 2d8cac422f..87c9f649c6 100644 --- a/harbour/doc/en/misc.txt +++ b/harbour/doc/en/misc.txt @@ -52,7 +52,7 @@ * $ARGUMENTS$ * None * $RETURNS$ - * String containing the Harbour Version/ + * String containing the Harbour Version * $DESCRIPTION$ * This function returns the current Harbour Version. * $EXAMPLES$