Next: , Up: The Header   [Contents][Index]


5.2.1 Checksum

The first line of an SCCS file contains the checksum, preceded by ‘^Ah’. The checksum is in decimal and is generated by adding together the values of all the characters in the file, and taking the result modulo 65536. A checksum line might look like this:-

^Ah36650

On systems whose C implementation considers the char type to be unsigned, characters with their highest bit set appear to be considered positive, and on machines with a signed char type, these characters appear to be considered negative. This seems to mean that these two types of machines will not agree on the correctness of an SCCS file’s checksum.

The BitKeeper suite uses ‘^AH’ to introduce its checksum line rather than ‘^Ah’, but the checksum is computed in the same way.