ajListSort problem.

raouljp raouljp at libero.it
Thu Jun 26 09:56:01 UTC 2003


hi all,
i have had various problem to understand how it work. Documentation is
undocumented about specification of  "compare" 's function.

void ajListSort  (AjPList thys, int (*compar) (const void*, const void*));

const void*  is a pointer to pointer 
so, an example of comapre function is, in emboss style :

static ajint myCompare(const void* x, const void* y)
{
   MyPItemListType *item_one = NULL;
   MyPItemListType *item_second = NULL;

item_one = ( MyPItemType* ) x;
item_second = ( MyPItemType*) y;
 
then your criteria  
accessing : *item_one, *item_second
 
return an int value;
}

If i have mis understood something plez you explain to me.

by R.J.P.B.





More information about the emboss-dev mailing list