xref: /titanic_44/usr/src/lib/libsum/sparcv9/include/ast/sum.h (revision 3e14f97f673e8a630f076077de35afdd43dc1587)
17c2fbfb3SApril Chin 
27c2fbfb3SApril Chin /* : : generated by proto : : */
37c2fbfb3SApril Chin /***********************************************************************
47c2fbfb3SApril Chin *                                                                      *
57c2fbfb3SApril Chin *               This software is part of the ast package               *
6*3e14f97fSRoger A. Faulkner *          Copyright (c) 1996-2010 AT&T Intellectual Property          *
77c2fbfb3SApril Chin *                      and is licensed under the                       *
87c2fbfb3SApril Chin *                  Common Public License, Version 1.0                  *
97c2fbfb3SApril Chin *                    by AT&T Intellectual Property                     *
107c2fbfb3SApril Chin *                                                                      *
117c2fbfb3SApril Chin *                A copy of the License is available at                 *
127c2fbfb3SApril Chin *            http://www.opensource.org/licenses/cpl1.0.txt             *
137c2fbfb3SApril Chin *         (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9)         *
147c2fbfb3SApril Chin *                                                                      *
157c2fbfb3SApril Chin *              Information and Software Systems Research               *
167c2fbfb3SApril Chin *                            AT&T Research                             *
177c2fbfb3SApril Chin *                           Florham Park NJ                            *
187c2fbfb3SApril Chin *                                                                      *
197c2fbfb3SApril Chin *                 Glenn Fowler <gsf@research.att.com>                  *
207c2fbfb3SApril Chin *                                                                      *
217c2fbfb3SApril Chin ***********************************************************************/
227c2fbfb3SApril Chin 
237c2fbfb3SApril Chin 
247c2fbfb3SApril Chin /*
257c2fbfb3SApril Chin  * Glenn Fowler
267c2fbfb3SApril Chin  * AT&T Research
277c2fbfb3SApril Chin  *
287c2fbfb3SApril Chin  * checksum library interface
297c2fbfb3SApril Chin  */
307c2fbfb3SApril Chin 
317c2fbfb3SApril Chin #ifndef _SUM_H
327c2fbfb3SApril Chin #if !defined(__PROTO__)
337c2fbfb3SApril Chin #include <prototyped.h>
347c2fbfb3SApril Chin #endif
357c2fbfb3SApril Chin #if !defined(__LINKAGE__)
367c2fbfb3SApril Chin #define __LINKAGE__		/* 2004-08-11 transition */
377c2fbfb3SApril Chin #endif
387c2fbfb3SApril Chin 
397c2fbfb3SApril Chin #define _SUM_H
407c2fbfb3SApril Chin 
417c2fbfb3SApril Chin #include <ast.h>
427c2fbfb3SApril Chin 
437c2fbfb3SApril Chin #define SUM_SIZE	(1<<0)		/* print size too		*/
447c2fbfb3SApril Chin #define SUM_SCALE	(1<<1)		/* traditional size scale	*/
457c2fbfb3SApril Chin #define SUM_TOTAL	(1<<2)		/* print totals since sumopen	*/
467c2fbfb3SApril Chin #define SUM_LEGACY	(1<<3)		/* legacy field widths		*/
477c2fbfb3SApril Chin 
487c2fbfb3SApril Chin #define _SUM_PUBLIC_	const char*	name;
497c2fbfb3SApril Chin 
507c2fbfb3SApril Chin typedef struct Sumdata_s
517c2fbfb3SApril Chin {
527c2fbfb3SApril Chin 	uint32_t	size;
537c2fbfb3SApril Chin 	uint32_t	num;
547c2fbfb3SApril Chin 	__V_*		buf;
557c2fbfb3SApril Chin } Sumdata_t;
567c2fbfb3SApril Chin 
577c2fbfb3SApril Chin typedef struct Sum_s
587c2fbfb3SApril Chin {
597c2fbfb3SApril Chin 	_SUM_PUBLIC_
607c2fbfb3SApril Chin #ifdef	_SUM_PRIVATE_
617c2fbfb3SApril Chin 	_SUM_PRIVATE_
627c2fbfb3SApril Chin #endif
637c2fbfb3SApril Chin } Sum_t;
647c2fbfb3SApril Chin 
657c2fbfb3SApril Chin extern __MANGLE__ Sum_t*	sumopen __PROTO__((const char*));
667c2fbfb3SApril Chin extern __MANGLE__ int	suminit __PROTO__((Sum_t*));
677c2fbfb3SApril Chin extern __MANGLE__ int	sumblock __PROTO__((Sum_t*, const __V_*, size_t));
687c2fbfb3SApril Chin extern __MANGLE__ int	sumdone __PROTO__((Sum_t*));
697c2fbfb3SApril Chin extern __MANGLE__ int	sumdata __PROTO__((Sum_t*, Sumdata_t*));
707c2fbfb3SApril Chin extern __MANGLE__ int	sumprint __PROTO__((Sum_t*, Sfio_t*, int, size_t));
717c2fbfb3SApril Chin extern __MANGLE__ int	sumusage __PROTO__((Sfio_t*));
727c2fbfb3SApril Chin extern __MANGLE__ int	sumclose __PROTO__((Sum_t*));
737c2fbfb3SApril Chin 
747c2fbfb3SApril Chin #endif
75