typedefs and prototypes

Doug Gwyn gwyn at smoke.ARPA
Wed Sep 21 13:52:52 AEST 1988


In article <7785 at haddock.ima.isc.com> karl at haddock.ima.isc.com (Karl Heuer) writes:
>In article <8543 at smoke.ARPA> gwyn at smoke.ARPA (Doug Gwyn) writes:
>>	void (*kb_widget1)(int key, void *data) { ... }
>That can't be right.  If kb_widget1 is supposed to be a pointer to a function,
>then its definition would take an initializer, not a function body.

Hm, that's probably right.
"Never mind."

>>In <7135 at bloom-beacon.MIT.EDU> tada at athena.mit.edu (Michael Zehr) writes:
>>>typedef void (*Keyboard_widget)(int key, void *data);
>It looks like what you meant to say was:
>	typedef void Keyboard_widget(int key, void *data);

That's more what I had in mind anyway.

I still can't get some of the PCC-based compilers around here to let
me use function typedefs in the actual function definition.
(Of course the parameter list is not an issue since old-style C
doesn't have prototypes.)



More information about the Comp.lang.c mailing list