Proposed magic number patch

John Cowan cowan at drv.cbc.com
Wed Oct 8 14:28:18 UTC 1997


Chris Newman wrote:

> Excellent idea, but I'd suggest choosing a magic number based on the
> principles outlined in RFC 2083 section 12.11.  I propose:
> 
> \211 T Z \r \n ^Z \n
> 
> as a magic number.

Thanks for the reference to RFC 2083.  I have two problems:

1)	7 bytes is a "peculiar" length.  I suggest adding a NUL
	(\0) byte just after the Z, if we go with this scheme.
	In which case "strncpy" will have to be replaced with
	"memcpy".

2)	There are only 20 available bytes.  I am a little
	reluctant to consume 8 of them, leaving at most 3
	new 32-bit length quantities.  Consuming only 4
	is less risky.

Comments?

-- 
John Cowan	http://www.ccil.org/~cowan		cowan at ccil.org
			e'osai ko sarji la lojban



More information about the tz mailing list