_CHECKSUM - compute a checksum using add with carry.
checksum = _checksum(array,count[,awcc,initial]);
- void *array;
- points to the vector to be checksummed.
- int count;
- is the number of words to checksum. This is usually the
number of words in "array".
- int awcc;
- is the number of trailing adds with carries of zero to
do. This argument is optional. The possible values of
"awcc" are listed below, along with
descriptions of the sort of applications for each value.
If no "awcc" is specified, the default is zero.
- is used for object decks
- is used for file system control blocks, and hstar
- is used for all but the last chunk when you
checksum something by chunks. It may also be used
to prepare a Multics-style checksum.
- int initial;
- is the starting value of the checksum. This argument is
optional; if it is omitted, the default is zero.
"_checksum" is used to compute system-compatible
At times it is not possible to hold the entire item to be
checksummed in memory. In this case, you should checksum the file
in chunks, using the checksum from one chunk as the
"initial" value for the next. When using this chunk
checksumming method, you should specify the value of two for
"awcc" for all chunks but the last.
Copyright © 1996, Thinkage Ltd.