API Reference | developer.brewmp.com API Reference | developer.brewmp.com

Developer

API Reference

STD_UNIQ()

Brew Release
Brew MP 1.0.2
Description
Removes duplicate entries from a sorted array.
Params
pElems
[]:
array of elements to be searched. It's size must be nNumElems * nElemWidth in bytes.
nNumElems
[]:
number of elements in pElems
nElemWidth
[]:
the width, in bytes of each element of pElems
pfnCompare
[]:
callback comparison function, should return 0, less than zero or greater than zero if the left comparand is equal to, less than, or greater than, the right comparand, respectively.
pCompareCx
[]:
the context passed as the first parameter by pfnCompare
Interface
Prototype
  •    int std_uniq(void* vpElems, int nNumElems, int nElemWidth, 
                    int (*pfnCompare)(void*, const void*, const void*),
                    void* pCompareCx);
    
Return
  • the number of uniq elements left in vpElems