Synopsis

OLM_LIST *olm_MergeList(long option, OLM_LIST *list1, OLM_LIST *list2, char operation, int (*function) ())

Purpose

Merge two object lists into one object list.

Description

This function will merge two object lists using the specified operation and compare function to create a new object list. If either list pointer is NULL, a copy of the other list will be returned. The data sizes of the two lists must be equal to perform the merge operation.

Input

option

Options (not used)

list1

Object list 1 pointer

list2

Object list 2 pointer

operation

OLM_DIFFERENCE

In one and not the other

OLM_UNION

All

OLM_INTERSECTION

In both

function

Compare function pointer int (*function) (void *object1, void *object2))

Return

New object list pointer or NULL if error