1 /***********************************************************************
3 * This software is part of the ast package *
4 * Copyright (c) 1996-2010 AT&T Intellectual Property *
5 * and is licensed under the *
6 * Common Public License, Version 1.0 *
7 * by AT&T Intellectual Property *
9 * A copy of the License is available at *
10 * http://www.opensource.org/licenses/cpl1.0.txt *
11 * (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
13 * Information and Software Systems Research *
17 * Glenn Fowler <gsf@research.att.com> *
19 ***********************************************************************/
26 * checksum library interface
34 #define SUM_SIZE (1<<0) /* print size too */
35 #define SUM_SCALE (1<<1) /* traditional size scale */
36 #define SUM_TOTAL (1<<2) /* print totals since sumopen */
37 #define SUM_LEGACY (1<<3) /* legacy field widths */
39 #define _SUM_PUBLIC_ const char* name;
41 typedef struct Sumdata_s
56 extern Sum_t
* sumopen(const char*);
57 extern int suminit(Sum_t
*);
58 extern int sumblock(Sum_t
*, const void*, size_t);
59 extern int sumdone(Sum_t
*);
60 extern int sumdata(Sum_t
*, Sumdata_t
*);
61 extern int sumprint(Sum_t
*, Sfio_t
*, int, size_t);
62 extern int sumusage(Sfio_t
*);
63 extern int sumclose(Sum_t
*);