V6 cc needs hash before whitespace before first include?

Noel Chiappa jnc at mercury.lcs.mit.edu
Thu Feb 28 13:59:59 CST 2019


    > From: Phil Budne

    > I'm betting it was a speedup to not fork/exec another process if it was
    > going to be a null transform!

It's worse than that! In vanilla V6, the pre-processor is built into 'cc',
not a separate command.

Here's the relevant code (from expand()):

	if (getc(ibuf1) != '#') {
		close(ibuf1[0]);
		return(file);
		}

The code to implement the directives is, ah, entertaining.

	Noel


More information about the cctalk mailing list