Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!gatech!ncar!ames!uhccux!munnari.oz.au!cs.mu.oz.au!ok From: ok@cs.mu.oz.au (Richard O'Keefe) Newsgroups: comp.lang.c Subject: Re: Function-types: compatability, and typedefs Summary: sorry, old manual Message-ID: <1999@munnari.oz.au> Date: 3 Sep 89 06:21:33 GMT References: <19361@mimsy.UUCP> <1989Sep1.113440.28300@jarvis.csri.toronto.edu> Sender: news@cs.mu.oz.au Distribution: comp Lines: 16 In article <1989Sep1.113440.28300@jarvis.csri.toronto.edu>, flaps@dgp.toronto.edu (Alan J Rosenthal) writes: > ok@cs.mu.oz.au (Richard O'Keefe) writes: > >What you need is > > int strptrcmp(char **s1, char **s2) > > { return strcmp(*s1, *s2); } > Actually, you should write > int strptrcmp(void *s1, void *s2) > { return(strcmp(*(char **)s1, *(char **)s2)); } Sorry; I was working from an old manual with char *base and so on. I haven't got a current AN$I C draft: too co$tly. If you're sorting an array of numbers, a half-way decent radix sort will GROSSLY outperform qsort(), and if you're sorting anything else qsort() is too inefficient anyway.