H
Hallvard B Furuseth
Jeremy said:I think this needs to be something like:
int compare(const void *s1, const void *s2)
{
return strcmp(*(char **)s1 + OFFSET, *(char **)s2 + OFFSET);
}
Or
int compare(const void *s1, const void *s2)
{
return strcmp(*(char *const *)s1 + OFFSET,
*(char *const *)s2 + OFFSET);
}
If you want to avoid some compilers' warnings about casting
away 'const'.