[pups] Re: v7 crypt(3)

Dennis Ritchie dmr at plan9.bell-labs.com
Sat Sep 28 14:57:18 AEST 2002

Following up Toomey's and Davidson's notes
(didn't see Garcia's):

It does appear that the early-distributed v7 didn't
require = in initializers.  A slightly later version
of the original 11 C compiler did; the lines Davidson quoted,

	if (o!=ASSIGN)
		peeksym = o;

were replaced by

		if (o!=ASSIGN) {
			error("Declaration syntax");
			peeksym = o;

bringing it into conformity with K&R1, which
did require the =.

Incidentally, if anyone wants to try the v7 crypt(3),
the 'encrypt' routine has an implicit, and unwarranted,
assumption that the L and R arrays are adjacent in storage
and thus that L can be oversubscripted to access R.
This was fixed at some (surprisingly late) point too.


More information about the TUHS mailing list