ANSI C prototypes

VanZandt jrv at sdimax2.mitre.org
Wed Nov 28 06:29:20 AEST 1990


In article <75 at homer.cs.mcgill.ca> utility at quiche.cs.mcgill.ca (Ronald BODKIN) writes:
>In article <1906 at necisa.ho.necisa.oz> boyd at 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



More information about the Comp.lang.c mailing list