How do I declare...

Arnold Robbins arnold at gatech.CSNET
Mon Aug 26 03:38:54 AEST 1985


In article <159 at rtp47.UUCP>, throopw at rtp47.UUCP (Wayne Throop) writes:
> [....]  Nor can you declare functions returning pointers to functions. [...]

I couldn't let this one go. Take a look at /usr/include/signal.h:

int	(*signal())();

This is a function returning a pointer to a function returning integer.
The casts for SIG_IGN and friends are also interesting:

#define	SIG_DFL		(int (*)())0
#define	SIG_IGN		(int (*)())1
#define	SIG_CATCH	(int (*)())2
#define	SIG_HOLD	(int (*)())3

'Nuf said.
-- 
Arnold Robbins
CSNET:	arnold at gatech	ARPA:	arnold%gatech.csnet at csnet-relay.arpa
UUCP:	{ akgua, allegra, hplabs, ihnp4, seismo, ut-sally }!gatech!arnold

Hello. You have reached the Coalition to Eliminate Answering Machines.
Unfortunately, no one can come to the phone right now....



More information about the Comp.lang.c mailing list