[EMAIL PROTECTED] wrote:
> I'm trying to use SysInsertionSort to sort a list of strings
> and I'm not having any luck.
>
> static int
> stringCompareFunc(VoidPtr objA, VoidPtr objB, Long other)
> {
>     return StrCompare((CharPtr) objA, (CharPtr) objB);
> }

Change your comparison to this:

      return StrCompare( *(char**)objA, *(char**)objB );

SysInsertionSort calls your compare function with pointers to the
objects being sorted, which themselves are of type (char*) in this
case, so the compare function is actually passed (char**)s.

-slj-

Reply via email to