Lines Matching refs:sum
26 * sum -- list file checksum and size
30 "[-?\n@(#)$Id: sum (AT&T Research) 2010-07-28 $\n]"
32 "[+NAME?cksum,md5sum,sum - print file checksum and block count]"
38 " \batt\b method is a true sum, all others are order dependent.]"
81 " matched, non-0 means at least one sum failed to match. Ignored for"
113 #include <sum.h>
127 Sum_t* oldsum; /* previous sum method */
135 Sum_t* sum; /* sum method */
174 * compute and print sum on an open file
188 state->oldsum = state->sum;
191 state->sum = state->oldsum;
196 suminit(state->sum);
207 sumblock(state->sum, "\r", 1);
217 sumblock(state->sum, p, r - p - (*r == '\n'));
220 sumblock(state->sum, p, e - p);
223 sumblock(state->sum, "\r", 1);
227 sumblock(state->sum, p, sfvalue(ip));
230 sumdone(state->sum);
233 sumprint(state->sum, op, state->flags|SUM_SCALE, state->scale);
254 * verify previous sum output
390 if (state->sum != state->oldsum)
391 sumclose(state->sum);
392 if (!(state->sum = sumopen(s)))
402 * sum the list of files in lp
547 if (method && !(state.sum = sumopen(method)))
549 if (!state.sum && !(state.sum = sumopen(error_info.id)) && !(state.sum = sumopen(astconf("UNIVERSE", NiL, NiL))))
550 state.sum = sumopen(NiL);
569 sfprintf(sfstdout, "method=%s\n", state.sum->name);
627 sumprint(state.sum, sfstdout, state.flags|SUM_TOTAL|SUM_SCALE, state.scale);
630 sumclose(state.sum);