[net.lang.c] recursive typedef in c

mp@mit-eddie.UUCP (Mark Plotnick) (12/26/83)

One of my favorite examples of C programming came from a compiler
course I took (AM295).  The staff supplied some skeleton C programs
that we had to modify, including one that contained:

#define	EXPRPTR	struct exprnode *

typedef struct exprnode {

	/*operator result*/
	    OPCLASS op;
	    EXPRPTR opleft;
	    EXPRPTR opright;

	/*subprogram call*/
	    char *spname;
	    EXPRPTR spargs;

#undef	EXPRPTR
} *EXPRPTR;

Groan.  My all-time favorite is the following statement-and-comment,
taken verbatim from the PWB/Unix pexec() library routine:

	argv[argc] = 2;		/* don't ask why */

I still don't know what it did.  Perhaps those of you who
participated in the argc[argv] discussion can help.

	Mark