[btl.unix] Question on the initialization of an interrupt vector in C

4341shn@houxn.UUCP (S.NURENBERG) (08/17/83)

I have a C question.  I want to initialize some interrupt
vectors on a M68000 processor card so that when the
one board programmable timer causes an interrupt, it will
be serviced.  Below is the current way I do it (which works).
What I want to know is why another way doesn't (see below):

typedef long *P_ADDR;
#define PTMVEC 0x78

main()
{
	extern void clock();
	P_ADDR *evec_ptr;

	evec_ptr = (P_ADDR *) PTMVEC;
	*evec_ptr =(P_ADDR) clock;
}

What I want to know is why the following line is syntactically
incorrect (as far as cc says so) but seems to me logically more
correct?

typdef void (*)() P_ADDR;

I appreciate any insight into this problem.

			Steven Nurenbeg
			houxn!4341shn