Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!apple!agate!linus!linus!sdimax2!jrv From: jrv@sdimax2.mitre.org (VanZandt) Newsgroups: comp.lang.c Subject: Re: ANSI C prototypes Message-ID: <126872@linus.mitre.org> Date: 27 Nov 90 19:29:20 GMT References: <1005@christopher-robin.cs.bham.ac.uk> <1906@necisa.ho.necisa.oz> <75@homer.cs.mcgill.ca> Sender: usenet@linus.mitre.org Organization: The MITRE Corp., Bedford, MA Lines: 16 In article <75@homer.cs.mcgill.ca> utility@quiche.cs.mcgill.ca (Ronald BODKIN) writes: >In article <1906@necisa.ho.necisa.oz> boyd@necisa.ho.necisa.oz (Boyd Roberts) writes: >>Right on! The function prototypes are just stupid. I shouldn't have to go: > >> extern gore *good(const char *vomit); Speaking of which, qsort() requires a comparison routine declared as int sort_function( const void *a , const void *b ) Is there a convenient way to write such functions without using a cast for every reference to a or b? Copying their values into local pointers of the appropriate type seems a kludge. I suppose I could avoid #including stdlib.h, and declare the arguments to be whatever type I liked. - Jim Van Zandt