bk commit - Connector/ODBC 3.53 (1.41)

bk commit - Connector/ODBC 3.53 (1.41)

am 19.04.2005 02:42:17 von pharvey

Below is the list of changes that have just been commited into a local
MyODBC 3.53 repository of 'pharvey'. When 'pharvey' does a push, they will
be propogaged to the main repository and within 2 hours after the push
into the public repository.

For more information on how to access the public repository see:
http://www.mysql.com/products/myodbc/faq_2.html#Development_ source

You can also browse the changes from public repository:
Complete repository: http://mysql.bkbits.net:8080/myodbc-3.53/
This changeset : http://mysql.bkbits.net:8080/myodbc-3.53/cset@1.41

ChangeSet
1.41 05/04/18 17:42:17 pharvey@mysql.com +10 -0
- test work for array lib

MYODBCC/include/MYODBCC.h
1.14 05/04/18 17:42:15 pharvey@mysql.com +1 -0
- test work for array lib

MYODBCArray/MYODBCArrayTest/MYODBCArrayTest.vpj
1.8 05/04/18 17:42:15 pharvey@mysql.com +1 -1
- test work for array lib

MYODBCArray/MYODBCArrayTest/MYODBCArrayTest.c
1.10 05/04/18 17:42:15 pharvey@mysql.com +127 -84
- test work for array lib

MYODBCArray/MYODBCArrayLib/MYODBCArraySet.c
1.11 05/04/18 17:42:15 pharvey@mysql.com +0 -3
- test work for array lib

MYODBCArray/MYODBCArrayLib/MYODBCArrayLib.vpj
1.10 05/04/18 17:42:15 pharvey@mysql.com +1 -0
- test work for array lib

MYODBCArray/MYODBCArrayLib/MYODBCArrayLib.pro
1.9 05/04/18 17:42:15 pharvey@mysql.com +1 -0
- test work for array lib

MYODBCArray/MYODBCArrayLib/MYODBCArrayInsert.c
1.3 05/04/18 17:42:15 pharvey@mysql.com +6 -6
- test work for array lib

MYODBCArray/MYODBCArrayLib/MYODBCArrayDelete.c
1.11 05/04/18 17:42:15 pharvey@mysql.com +5 -4
- test work for array lib

MYODBCArray/MYODBCArrayLib/MYODBCArrayClear.c
1.12 05/04/18 17:42:15 pharvey@mysql.com +1 -0
- test work for array lib

MYODBCArray/MYODBCArrayLib/MYODBCArrayDump.c
1.1 05/04/18 14:43:56 pharvey@mysql.com +54 -0

MYODBCArray/MYODBCArrayLib/MYODBCArrayDump.c
1.0 05/04/18 14:43:56 pharvey@mysql.com +0 -0
BitKeeper file /home/pharvey/SandBox/MySQL/myodbc-3.53/MYODBCArray/MYODBCAr rayLib/MYODBCArrayDump.c

# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: pharvey
# Host: thinkpad.peterharvey.org
# Root: /home/pharvey/SandBox/MySQL/myodbc-3.53

--- 1.9/MYODBCArray/MYODBCArrayLib/MYODBCArrayLib.vpj 2005-04-18 12:25:01 -07:00
+++ 1.10/MYODBCArray/MYODBCArrayLib/MYODBCArrayLib.vpj 2005-04-18 17:42:15 -07:00
@@ -56,6 +56,7 @@



+




--- 1.7/MYODBCArray/MYODBCArrayTest/MYODBCArrayTest.vpj 2005-03-22 14:00:27 -08:00
+++ 1.8/MYODBCArray/MYODBCArrayTest/MYODBCArrayTest.vpj 2005-04-18 17:42:15 -07:00
@@ -22,7 +22,7 @@
CaptureOutputWith="ProcessBuffer"
SaveOption="SaveWorkspaceFiles"
RunFromDir="%rw">
-
+

Name="Rebuild"
--- New file ---
+++ MYODBCArray/MYODBCArrayLib/MYODBCArrayDump.c 05/04/18 14:43:56
/*!
\file MYODBCArrayDump.c
\author Peter Harvey
Copyright (C) MySQL AB 2004-2005, Released under GPL.
\version Connector/ODBC 3.53
\date 2005
\brief Code to help manage an array of pointers.

\license Copyright (C) 2000-2005 MySQL AB

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.

There are special exceptions to the terms and conditions of the GPL as it
is applied to this software. View the full text of the exception in file
EXCEPTIONS in the directory of this software distribution.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "MYODBCArrayInternal.h"

MYODBC_ARRAY_RETURN MYODBCArrayDump( MYODBC_ARRAY_HANDLE hArray )
{
MYODBC_ARRAY_PTR pArray = (MYODBC_ARRAY_PTR)hArray;
MYODBC_C_ULONGLONG nItem = 0;

if ( !hArray || MYODBCRttiType( hArray ) != MYODBC_RTTI_ARRAY )
{
printf( "[%s][%d][MYODBC_ARRAY_ARGUMENT] hArray\n", __FILE__, __LINE__ );
return MYODBCArraySetError( NULL, MYODBC_ARRAY_ARGUMENT, __FILE__, __LINE__, "hArray" );
}

printf( "[%s][%d] HEADER...\n", __FILE__, __LINE__ );
printf( "nItems = %ld\n", (long)pArray->nItems );
printf( "nItemsCache = %ld\n", (long)pArray->nItemsCache );
printf( "nItemCurrent = %ld\n", (long)pArray->nItemCurrent );
printf( "[%s][%d] ITEMS...\n", __FILE__, __LINE__ );
for ( nItem = 0; nItem < pArray->nItems; nItem++ )
{
printf( "%ld = %p\n", (long)nItem, pArray->ppItems[nItem] );
}

return MYODBCArraySetError( hArray, MYODBC_ARRAY_SUCCESS, __FILE__, __LINE__, NULL );
}



--- 1.2/MYODBCArray/MYODBCArrayLib/MYODBCArrayInsert.c 2005-04-18 12:25:01 -07:00
+++ 1.3/MYODBCArray/MYODBCArrayLib/MYODBCArrayInsert.c 2005-04-18 17:42:15 -07:00
@@ -75,20 +75,20 @@
switch ( nLocation )
{
case MYODBC_ARRAY_INSERT_BEFORE:
- MYODBCCMemMove( &(pArray->ppItems[pArray->nItemCurrent]),
- &(pArray->ppItems[pArray->nItemCurrent + 1]),
+ MYODBCCMemMove( &(pArray->ppItems[pArray->nItemCurrent + 1]),
+ &(pArray->ppItems[pArray->nItemCurrent]),
sizeof(MYODBC_ARRAY_ITEM_DATA_PTR) * (pArray->nItems - pArray->nItemCurrent - 1) );
pArray->nItemCurrent--;
break;
case MYODBC_ARRAY_INSERT_AFTER:
- MYODBCCMemMove( &(pArray->ppItems[pArray->nItemCurrent + 1]),
- &(pArray->ppItems[pArray->nItemCurrent + 2]),
+ MYODBCCMemMove( &(pArray->ppItems[pArray->nItemCurrent + 2]),
+ &(pArray->ppItems[pArray->nItemCurrent + 1]),
sizeof(MYODBC_ARRAY_ITEM_DATA_PTR) * (pArray->nItems - pArray->nItemCurrent) );
pArray->nItemCurrent++;
break;
case MYODBC_ARRAY_INSERT_FIRST:
- MYODBCCMemMove( &(pArray->ppItems[0]),
- &(pArray->ppItems[1]),
+ MYODBCCMemMove( &(pArray->ppItems[1]),
+ &(pArray->ppItems[0]),
sizeof(MYODBC_ARRAY_ITEM_DATA_PTR) * pArray->nItems );
pArray->nItemCurrent = 0;
break;

--- 1.8/MYODBCArray/MYODBCArrayLib/MYODBCArrayLib.pro 2005-04-18 12:25:01 -07:00
+++ 1.9/MYODBCArray/MYODBCArrayLib/MYODBCArrayLib.pro 2005-04-18 17:42:15 -07:00
@@ -22,6 +22,7 @@
MYODBCArrayAppend.c \
MYODBCArrayClear.c \
MYODBCArrayDelete.c \
+ MYODBCArrayDump.c \
MYODBCArrayFirst.c \
MYODBCArrayFree.c \
MYODBCArrayGet.c \

--- 1.11/MYODBCArray/MYODBCArrayLib/MYODBCArrayClear.c 2005-04-18 12:25:01 -07:00
+++ 1.12/MYODBCArray/MYODBCArrayLib/MYODBCArrayClear.c 2005-04-18 17:42:15 -07:00
@@ -41,6 +41,7 @@
{
if ( MYODBCArrayDelete( hArray ) == MYODBC_ARRAY_ERROR )
return MYODBC_ARRAY_ERROR;
+/* MYODBCArrayDump( hArray ); */
}

return MYODBCArraySetError( hArray, MYODBC_ARRAY_SUCCESS, __FILE__, __LINE__, NULL );

--- 1.10/MYODBCArray/MYODBCArrayLib/MYODBCArrayDelete.c 2005-04-16 12:11:06 -07:00
+++ 1.11/MYODBCArray/MYODBCArrayLib/MYODBCArrayDelete.c 2005-04-18 17:42:15 -07:00
@@ -38,6 +38,7 @@
if ( MYODBCArrayIsEOA( hArray ) )
return MYODBCArraySetError( hArray, MYODBC_ARRAY_EOA, __FILE__, __LINE__, NULL );

+printf( "[PAH][%s][%d] %ld = %p\n", __FILE__, __LINE__, (long)pArray->nItemCurrent, pArray->ppItems[pArray->nItemCurrent] );
/* call any free func we may have */
if ( pArray->pFuncFree && pArray->ppItems[pArray->nItemCurrent] )
pArray->pFuncFree( pArray->ppItems[pArray->nItemCurrent] );
@@ -51,13 +52,13 @@
return MYODBCArraySetError( hArray, MYODBC_ARRAY_SUCCESS, __FILE__, __LINE__, NULL );
}

- /* NOT last element? */
+ /* NOT last element in array? */
if ( (pArray->nItemCurrent + 1) < pArray->nItems )
{
/* slide latter elements of pArray back one pos leaving a garbage item at end of array */
- MYODBCCMemMove( &(pArray->ppItems[pArray->nItemCurrent]),
- &(pArray->ppItems[pArray->nItemCurrent + 1]),
- pArray->nItems - pArray->nItemCurrent - 1 );
+ MYODBCCMemMove( &(pArray->ppItems[pArray->nItemCurrent]), /* dest */
+ &(pArray->ppItems[pArray->nItemCurrent + 1]), /* src */
+ (pArray->nItems - pArray->nItemCurrent - 1) * sizeof(MYODBC_ARRAY_ITEM_DATA_PTR) );
}

/* final adjustments to set new size and truncate last item in array */

--- 1.10/MYODBCArray/MYODBCArrayLib/MYODBCArraySet.c 2005-04-16 12:11:06 -07:00
+++ 1.11/MYODBCArray/MYODBCArrayLib/MYODBCArraySet.c 2005-04-18 17:42:15 -07:00
@@ -36,9 +36,6 @@
if ( !hArray || MYODBCRttiType( hArray ) != MYODBC_RTTI_ARRAY )
return MYODBCArraySetError( NULL, MYODBC_ARRAY_ARGUMENT, __FILE__, __LINE__, "hArray" );

- if ( !pData )
- return MYODBCArraySetError( hArray, MYODBC_ARRAY_ARGUMENT, __FILE__, __LINE__, "pData" );
-
if ( MYODBCArrayIsEOA( hArray ) )
return MYODBCArraySetError( hArray, MYODBC_ARRAY_EOA, __FILE__, __LINE__, NULL );


--- 1.9/MYODBCArray/MYODBCArrayTest/MYODBCArrayTest.c 2005-04-18 12:25:01 -07:00
+++ 1.10/MYODBCArray/MYODBCArrayTest/MYODBCArrayTest.c 2005-04-18 17:42:15 -07:00
@@ -61,6 +61,7 @@
MYODBCCFree( pAlgonkin->pszTribe );
MYODBCCFree( pAlgonkin->pszLocation );
MYODBCCFree( pAlgonkin );
+/* printf( "[PAH][%s][%d]\n", __FILE__, __LINE__ ); */
}
}

@@ -92,32 +93,48 @@
}

/* prealloc and count */
-MYODBC_C_BOOL test0()
+MYODBC_C_BOOL test1()
{
MYODBC_C_ULONGLONG nItems = 0;
- MYODBC_ARRAY_HANDLE hArray = MYODBCArrayAlloc()
+ MYODBC_ARRAY_HANDLE hArray = NULL;
+
+ nFreeCallCount = 0;
+ nFreeCount = 0;
+
+ MYODBCArrayAlloc( &hArray );

- MYODBCArraySetCacheStep( 10 );
- MYODBCArraySetSize( 3 );
+ MYODBCArraySetCacheStep( hArray, 10 );
+ MYODBCArraySetSize( hArray, 3 );

MYODBCArrayGetCount( hArray, &nItems );

if ( nItems != 3 )
{
- fprintf( stderr, "[%s][%d] nItems = %ld but expected 3.", __FILE__, __LINE__, nItems );
+ fprintf( stderr, "[%s][%d] nItems = %ld but expected 3.", __FILE__, __LINE__, (long)nItems );
return MYODBC_C_FALSE;
}

MYODBCArrayFree( hArray );

+ if ( nFreeCallCount != 0 )
+ {
+ fprintf( stderr, "[%s][%d] nFreeCallCount = %ld but expected 0.", __FILE__, __LINE__, (long)nFreeCallCount );
+ return MYODBC_C_FALSE;
+ }
+
return MYODBC_C_TRUE;
}

/* prealloc and set */
-MYODBC_C_BOOL test1()
+MYODBC_C_BOOL test2()
{
char * psz = NULL;
- MYODBC_ARRAY_HANDLE hArray = MYODBCArrayAlloc()
+ MYODBC_ARRAY_HANDLE hArray = NULL;
+
+ MYODBCArrayAlloc( &hArray );
+
+ MYODBCArraySetCacheStep( hArray, 10 );
+ MYODBCArraySetSize( hArray, 3 );

MYODBCArrayFirst( hArray );
MYODBCArraySet( hArray, "A" );
@@ -127,16 +144,16 @@

psz = NULL;
MYODBCArrayFirst( hArray );
- MYODBCArrayGet( hArray, &psz );
- if ( !psz || strcmp( psz, "C" ) )
+ MYODBCArrayGet( hArray, (MYODBC_ARRAY_ITEM_DATA_PTR)(&psz) );
+ if ( !psz || strcmp( psz, "A" ) )
{
- fprintf( stderr, "[%s][%d] psz = %s but expected C.", __FILE__, __LINE__, psz );
+ fprintf( stderr, "[%s][%d] psz = %s but expected A.", __FILE__, __LINE__, psz );
return MYODBC_C_FALSE;
}

psz = NULL;
MYODBCArrayNext( hArray );
- MYODBCArrayGet( hArray, &psz );
+ MYODBCArrayGet( hArray, (MYODBC_ARRAY_ITEM_DATA_PTR)(&psz) );
if ( psz )
{
fprintf( stderr, "[%s][%d] psz = %s but expected null.", __FILE__, __LINE__, psz );
@@ -145,10 +162,10 @@

psz = NULL;
MYODBCArrayNext( hArray );
- MYODBCArrayGet( hArray, &psz );
- if ( !psz || strcmp( psz, "A" ) )
+ MYODBCArrayGet( hArray, (MYODBC_ARRAY_ITEM_DATA_PTR)(&psz) );
+ if ( !psz || strcmp( psz, "C" ) )
{
- fprintf( stderr, "[%s][%d] psz = %s but expected A.", __FILE__, __LINE__, psz );
+ fprintf( stderr, "[%s][%d] psz = %s but expected C.", __FILE__, __LINE__, psz );
return MYODBC_C_FALSE;
}

@@ -158,132 +175,159 @@
}

/* free func and delete */
-MYODBC_C_BOOL test2()
+MYODBC_C_BOOL test3()
{
ALGONKIN_PTR pAlgonkin = NULL;
- MYODBC_ARRAY_HANDLE hArray = MYODBCArrayAlloc();
+ MYODBC_ARRAY_HANDLE hArray = NULL;
+
+ MYODBCArrayAlloc( &hArray );

- nFreeCallCount = 0;
- nFreeCount = 0;
MYODBCArraySetFreeFunc( hArray, FreeFunc );

LoadArray( hArray );

MYODBCArraySetPos( hArray, 1 );
- MYODBCArrayGet( hArray, &pAlgonkin );
+ MYODBCArrayGet( hArray, (MYODBC_ARRAY_ITEM_DATA_PTR)(&pAlgonkin) );
FreeFunc( pAlgonkin );
MYODBCArraySet( hArray, NULL );
MYODBCArrayNext( hArray );
MYODBCArrayDelete( hArray );

- MYODBCArrayFree( a );
+ nFreeCallCount = 0;
+ nFreeCount = 0;
+ MYODBCArrayFree( hArray );

- if ( nFreeCallCount != 3 )
+ if ( nFreeCallCount != 2 )
{
- fprintf( stderr, "[%s][%d] nFreeCallCount = %ld but expected 3.", __FILE__, __LINE__, nFreeCallCount );
+ fprintf( stderr, "[%s][%d] nFreeCallCount = %ld but expected 2.", __FILE__, __LINE__, (long)nFreeCallCount );
return MYODBC_C_FALSE;
}
if ( nFreeCount != 2 )
{
- fprintf( stderr, "[%s][%d] nFreeCount = %ld but expected 2.", __FILE__, __LINE__, nFreeCount );
+ fprintf( stderr, "[%s][%d] nFreeCount = %ld but expected 2.", __FILE__, __LINE__, (long)nFreeCount );
return MYODBC_C_FALSE;
}

return MYODBC_C_TRUE;
}

-int test3()
+/* next and EOA */
+MYODBC_C_BOOL test4()
{
- MYODBC_ARRAY_HANDLE a = MYODBCArrayAlloc( 2 );
-
- MYODBCArrayElementFreeSet( a, free );
-
- MYODBCArrayElementSet( a, 0, strdup( "Peter Harvey" ) );
- MYODBCArrayElementSet( a, 1, strdup( "John Doe" ) );
+ ALGONKIN_PTR pAlgonkin = NULL;
+ MYODBC_ARRAY_HANDLE hArray = NULL;

- MYODBCArrayFree( a );
+ MYODBCArrayAlloc( &hArray );

- return 1;
-}
+ MYODBCArraySetFreeFunc( hArray, FreeFunc );

-int test4()
-{
- MYODBC_ARRAY_HANDLE a = MYODBCArrayAlloc( 0 );
+ LoadArray( hArray );

- MYODBCArrayElementFreeSet( a, free );
+ MYODBCArrayFirst( hArray );
+ while ( !MYODBCArrayIsEOA( hArray ) )
+ {
+ MYODBCArrayGet( hArray, (MYODBC_ARRAY_ITEM_DATA_PTR)(&pAlgonkin) );
+ MYODBCArrayNext( hArray );
+ }

- MYODBCArrayElementAdd( a, 0, strdup( "Peter Harvey" ) );
- MYODBCArrayElementAdd( a, 1, strdup( "John Doe" ) );
+ if ( !pAlgonkin || strcmp( pAlgonkin->pszTribe, "Nibachis" ) )
+ {
+ fprintf( stderr, "[%s][%d] Last pAlgonkin->pszTribe = '%s' but expected 'Nibachis'.", __FILE__, __LINE__, pAlgonkin->pszTribe );
+ return MYODBC_C_FALSE;
+ }

- MYODBCArrayFree( a );
+ MYODBCArrayFree( hArray );

- return 1;
+ return MYODBC_C_TRUE;
}

-int test5()
+/* prev and EOA */
+MYODBC_C_BOOL test5()
{
- MYODBC_ARRAY_HANDLE a = MYODBCArrayAlloc( 2 );
+ ALGONKIN_PTR pAlgonkin = NULL;
+ MYODBC_ARRAY_HANDLE hArray = NULL;

- MYODBCArrayElementFreeSet( a, free );
+ MYODBCArrayAlloc( &hArray );

- MYODBCArrayElementSet( a, 0, strdup( "Peter Harvey" ) );
- MYODBCArrayElementSet( a, 0, strdup( "John Doe" ) );
+ MYODBCArraySetFreeFunc( hArray, FreeFunc );

- MYODBCArrayFree( a );
+ LoadArray( hArray );

- return 1;
-}
+ MYODBCArrayLast( hArray );
+ while ( !MYODBCArrayIsEOA( hArray ) )
+ {
+ MYODBCArrayGet( hArray, (MYODBC_ARRAY_ITEM_DATA_PTR)(&pAlgonkin) );
+ MYODBCArrayPrev( hArray );
+ }

-int test6()
-{
- MYODBC_ARRAY_HANDLE rows = MYODBCArrayAlloc( 0 );
- MYODBC_ARRAY_HANDLE cols;
+ if ( !pAlgonkin || strcmp( pAlgonkin->pszTribe, "Iroquet" ) )
+ {
+ fprintf( stderr, "[%s][%d] Last pAlgonkin->pszTribe = '%s' but expected 'Iroquet'.", __FILE__, __LINE__, pAlgonkin->pszTribe );
+ return MYODBC_C_FALSE;
+ }

- MYODBCArrayElementFreeSet( rows, MYODBCArrayFree );
+ MYODBCArrayFree( hArray );

- /* row 1 */
- cols = MYODBCArrayAlloc( 2 );
- MYODBCArrayElementSet( cols, 0, "Peter" );
- MYODBCArrayElementSet( cols, 1, "Harvey" );
- MYODBCArrayElementAdd( rows, 0, cols );
+ return MYODBC_C_TRUE;
+}

- /* row 2 */
- cols = MYODBCArrayAlloc( 2 );
- MYODBCArrayElementSet( cols, 0, "John" );
- MYODBCArrayElementSet( cols, 1, "Doe" );
- MYODBCArrayElementAdd( rows, 1, cols );
+/* insert after */
+MYODBC_C_BOOL test6()
+{
+ MYODBC_C_ULONGLONG nItems = 0;
+ ALGONKIN_PTR pAlgonkin = NULL;
+ MYODBC_ARRAY_HANDLE hArray = NULL;

- MYODBCArrayFree( rows );
+ MYODBCArrayAlloc( &hArray );

- return 1;
-}
+ MYODBCArraySetFreeFunc( hArray, FreeFunc );

+ LoadArray( hArray );
+MYODBCArrayDump( hArray );

-int test10()
-{
- MYODBC_ARRAY_HANDLE a = MYODBCArrayAlloc( 2 );
- THE_ELEMENT * e;
+ /* 'steal' the 2nd items data */
+ MYODBCArraySetPos( hArray, 1 );
+ MYODBCArrayGet( hArray, (MYODBC_ARRAY_ITEM_DATA_PTR)(&pAlgonkin) );
+ MYODBCArraySet( hArray, NULL );
+MYODBCArrayDump( hArray );

- MYODBCArrayElementFreeSet( a, MyFreeFunc );
+ /* insert after */
+ MYODBCArrayInsert( hArray, MYODBC_ARRAY_INSERT_AFTER, pAlgonkin );
+MYODBCArrayDump( hArray );

- e = (THE_ELEMENT *)malloc( sizeof(THE_ELEMENT) );
- e->skill_level = 10;
- e->full_name = strdup( "Peter Harvey" );
- MYODBCArrayElementSet( a, 0, e );
+ /* verify */
+ MYODBCArrayGetCount( hArray, &nItems );
+ if ( nItems != 5 )
+ {
+ fprintf( stderr, "[%s][%d] nItems = %ld but expected 5.", __FILE__, __LINE__, (long)nItems );
+ return MYODBC_C_FALSE;
+ }

- e = (THE_ELEMENT *)malloc( sizeof(THE_ELEMENT) );
- e->skill_level = 9;
- e->full_name = strdup( "John Doe" );
- MYODBCArrayElementSet( a, 1, e );
+ MYODBCArrayGet( hArray, (MYODBC_ARRAY_ITEM_DATA_PTR)(&pAlgonkin) );
+ if ( !pAlgonkin || strcmp( pAlgonkin->pszTribe, "Kinounchepirini" ) )
+ {
+ fprintf( stderr, "[%s][%d] pAlgonkin->pszTribe = '%s' but expected 'Kinounchepirini'.", __FILE__, __LINE__, pAlgonkin->pszTribe );
+ return MYODBC_C_FALSE;
+ }

- MYODBCArrayFree( a );
+ MYODBCArrayPrev( hArray );
+ MYODBCArrayGet( hArray, (MYODBC_ARRAY_ITEM_DATA_PTR)(&pAlgonkin) );
+ if ( pAlgonkin )
+ {
+ fprintf( stderr, "[%s][%d] pAlgonkin = %p but expected null.", __FILE__, __LINE__, pAlgonkin );
+ return MYODBC_C_FALSE;
+ }
+printf( "[PAH][%s][%d]\n", __FILE__, __LINE__ );
+ /* cleanup */
+ MYODBCArrayFree( hArray );

- return 1;
+ return MYODBC_C_TRUE;
}

+/* it all starts here */
int main()
{
- TEST tests[8]=
+ TEST tests[7]=
{
{"test1", test1},
{"test2", test2},
@@ -291,7 +335,6 @@
{"test4", test4},
{"test5", test5},
{"test6", test6},
- {"test10", test10},
{NULL, NULL}
};
int n;

--- 1.13/MYODBCC/include/MYODBCC.h 2005-04-09 20:15:30 -07:00
+++ 1.14/MYODBCC/include/MYODBCC.h 2005-04-18 17:42:15 -07:00
@@ -73,6 +73,7 @@
#define MYODBCCRealloc(A,B) realloc(A,B)
#define MYODBCCFree(A) { if (A) free(A); }
#define MYODBCCMemMove(A,B,C) memmove(A,B,C)
+#define MYODBCCMemCpy(A,B,C) memcpy(A,B,C)
#define MYODBCCFreeNull(A) { if (A) { free(A); A = NULL; } }
#define MYODBCCMemSet(A,B,C) memset(A,B,C)


--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/myodbc?unsub=gcdmo-myodbc@m.gmane.org