Xref: utzoo comp.lang.c:25929 comp.unix.xenix:10092 Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!munnari.oz.au!cluster!physiol.su.oz!daved From: daved@physiol.su.oz (Dave Davey) Newsgroups: comp.lang.c,comp.unix.xenix Subject: Re: qsort() - HELP Message-ID: <988@physiol.su.oz> Date: 15 Feb 90 02:08:36 GMT References: <5916@ozdaltx.UUCP> <144@spodv5.UUCP> Organization: Physiology Dept., Univ. of Sydney, NSW, Australia Lines: 27 jha@spodv5.UUCP (Johan Harsta) writes: |In article <5916@ozdaltx.UUCP>, root@ozdaltx.UUCP (root) writes: |> After going over the manuals more times than I'd like, I still can't |> figure out how to get qsort() (S) to operate. The example shows |E.g.: | struct ELEMENT buffer[nele]; | sort_buf (&buffer[0], nele); | void | sort_buffer (base, nele) | struct ELEMENT *base; | int nele; | { /*****************************/ int sorting_alg(); /**** needs this declaration */ /*****************************/ | qsort ((char *) base, | (unsigned) nele, | (unsigned) sizeof (struct ELEMENT), | sorting_alg); | return; | }