8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / lib / libsum / sparc / include / ast / sum.h
blobf82fee47d6d73159b38a60df7a85666d91f105b0
2 /* : : generated by proto : : */
3 /***********************************************************************
4 * *
5 * This software is part of the ast package *
6 * Copyright (c) 1996-2010 AT&T Intellectual Property *
7 * and is licensed under the *
8 * Common Public License, Version 1.0 *
9 * by AT&T Intellectual Property *
10 * *
11 * A copy of the License is available at *
12 * http://www.opensource.org/licenses/cpl1.0.txt *
13 * (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
14 * *
15 * Information and Software Systems Research *
16 * AT&T Research *
17 * Florham Park NJ *
18 * *
19 * Glenn Fowler <gsf@research.att.com> *
20 * *
21 ***********************************************************************/
25 * Glenn Fowler
26 * AT&T Research
28 * checksum library interface
31 #ifndef _SUM_H
32 #if !defined(__PROTO__)
33 #include <prototyped.h>
34 #endif
35 #if !defined(__LINKAGE__)
36 #define __LINKAGE__ /* 2004-08-11 transition */
37 #endif
39 #define _SUM_H
41 #include <ast.h>
43 #define SUM_SIZE (1<<0) /* print size too */
44 #define SUM_SCALE (1<<1) /* traditional size scale */
45 #define SUM_TOTAL (1<<2) /* print totals since sumopen */
46 #define SUM_LEGACY (1<<3) /* legacy field widths */
48 #define _SUM_PUBLIC_ const char* name;
50 typedef struct Sumdata_s
52 uint32_t size;
53 uint32_t num;
54 __V_* buf;
55 } Sumdata_t;
57 typedef struct Sum_s
59 _SUM_PUBLIC_
60 #ifdef _SUM_PRIVATE_
61 _SUM_PRIVATE_
62 #endif
63 } Sum_t;
65 extern __MANGLE__ Sum_t* sumopen __PROTO__((const char*));
66 extern __MANGLE__ int suminit __PROTO__((Sum_t*));
67 extern __MANGLE__ int sumblock __PROTO__((Sum_t*, const __V_*, size_t));
68 extern __MANGLE__ int sumdone __PROTO__((Sum_t*));
69 extern __MANGLE__ int sumdata __PROTO__((Sum_t*, Sumdata_t*));
70 extern __MANGLE__ int sumprint __PROTO__((Sum_t*, Sfio_t*, int, size_t));
71 extern __MANGLE__ int sumusage __PROTO__((Sfio_t*));
72 extern __MANGLE__ int sumclose __PROTO__((Sum_t*));
74 #endif