ID *ids )
{
ID ida, idb;
- ID cursora, cursorb;
+ ID cursora = 0, cursorb = 0;
if ( BDB_IDL_IS_ZERO( a ) || BDB_IDL_IS_ZERO( b ) ) {
ids[0] = 0;
ID *ids )
{
ID ida, idb;
- ID cursora, cursorb;
+ ID cursora = 0, cursorb = 0;
if ( BDB_IDL_IS_ZERO( a ) ) {
BDB_IDL_CPY( ids, b );
return 0;
}
- ida = bdb_idl_first( a, &cursora ),
+ ida = bdb_idl_first( a, &cursora );
idb = bdb_idl_first( b, &cursorb );
ids[0] = 0;
ID *ids )
{
ID ida, idb;
- ID cursora, cursorb;
+ ID cursora = 0, cursorb = 0;
if( BDB_IDL_IS_ZERO( a ) ||
BDB_IDL_IS_ZERO( b ) ||
return *cursor;
}
- pos = bdb_idl_search( ids, *cursor );
+ if ( *cursor == 0 )
+ pos = 1;
+ else
+ pos = bdb_idl_search( ids, *cursor );
if( pos > ids[0] ) {
return NOID;
return *cursor;
}
- if ( *cursor < ids[0] ) {
- return ids[(*cursor)++];
+ if ( ++(*cursor) <= ids[0] ) {
+ return ids[*cursor];
}
return NOID;
}
-