xref: /titanic_51/usr/src/lib/krb5/dyn/dynP.h (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1*7c478bd9Sstevel@tonic-gate /*
2*7c478bd9Sstevel@tonic-gate  * Copyright (c) 1997-2000 by Sun Microsystems, Inc.
3*7c478bd9Sstevel@tonic-gate  * All rights reserved.
4*7c478bd9Sstevel@tonic-gate  */
5*7c478bd9Sstevel@tonic-gate 
6*7c478bd9Sstevel@tonic-gate #ifndef _KRB5_DYN_DYNP_H
7*7c478bd9Sstevel@tonic-gate #define	_KRB5_DYN_DYNP_H
8*7c478bd9Sstevel@tonic-gate 
9*7c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
10*7c478bd9Sstevel@tonic-gate 
11*7c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
12*7c478bd9Sstevel@tonic-gate extern "C" {
13*7c478bd9Sstevel@tonic-gate #endif
14*7c478bd9Sstevel@tonic-gate 
15*7c478bd9Sstevel@tonic-gate 
16*7c478bd9Sstevel@tonic-gate /*
17*7c478bd9Sstevel@tonic-gate  * This file is part of libdyn.a, the C Dynamic Object library.  It
18*7c478bd9Sstevel@tonic-gate  * contains the private header file.
19*7c478bd9Sstevel@tonic-gate  *
20*7c478bd9Sstevel@tonic-gate  * There are no restrictions on this code; however, if you make any
21*7c478bd9Sstevel@tonic-gate  * changes, I request that you document them so that I do not get
22*7c478bd9Sstevel@tonic-gate  * credit or blame for your modifications.
23*7c478bd9Sstevel@tonic-gate  *
24*7c478bd9Sstevel@tonic-gate  * Written by Barr3y Jaspan, Student Information Processing Board (SIPB)
25*7c478bd9Sstevel@tonic-gate  * and MIT-Project Athena, 1989.
26*7c478bd9Sstevel@tonic-gate  */
27*7c478bd9Sstevel@tonic-gate 
28*7c478bd9Sstevel@tonic-gate 
29*7c478bd9Sstevel@tonic-gate /*
30*7c478bd9Sstevel@tonic-gate  * dynP.h -- private header file included by source files for libdyn.a.
31*7c478bd9Sstevel@tonic-gate  */
32*7c478bd9Sstevel@tonic-gate 
33*7c478bd9Sstevel@tonic-gate 
34*7c478bd9Sstevel@tonic-gate #include "dyn.h"
35*7c478bd9Sstevel@tonic-gate #ifdef USE_DBMALLOC
36*7c478bd9Sstevel@tonic-gate #include <sys/stdtypes.h>
37*7c478bd9Sstevel@tonic-gate #include <malloc.h>
38*7c478bd9Sstevel@tonic-gate #endif
39*7c478bd9Sstevel@tonic-gate 
40*7c478bd9Sstevel@tonic-gate /*
41*7c478bd9Sstevel@tonic-gate  * Rep invariant:
42*7c478bd9Sstevel@tonic-gate  * 1) el_size is the number of bytes per element in the object
43*7c478bd9Sstevel@tonic-gate  * 2) num_el is the number of elements currently in the object.  It is
44*7c478bd9Sstevel@tonic-gate  * one higher than the highest index at which an element lives.
45*7c478bd9Sstevel@tonic-gate  * 3) size is the number of elements the object can hold without
46*7c478bd9Sstevel@tonic-gate  * resizing.  num_el <= index.
47*7c478bd9Sstevel@tonic-gate  * 4) inc is a multiple of the number of elements the object grows by
48*7c478bd9Sstevel@tonic-gate  * each time it is reallocated.
49*7c478bd9Sstevel@tonic-gate  */
50*7c478bd9Sstevel@tonic-gate 
51*7c478bd9Sstevel@tonic-gate typedef struct _DynObject DynObjectRecP, *DynObjectP;
52*7c478bd9Sstevel@tonic-gate 
53*7c478bd9Sstevel@tonic-gate /* Internal functions */
54*7c478bd9Sstevel@tonic-gate int _DynRealloc(), _DynResize();
55*7c478bd9Sstevel@tonic-gate 
56*7c478bd9Sstevel@tonic-gate /*
57*7c478bd9Sstevel@tonic-gate  * N.B. The original code had the following comment line after that last #endif:
58*7c478bd9Sstevel@tonic-gate  * DON'T ADD STUFF AFTER THIS #endif *
59*7c478bd9Sstevel@tonic-gate  * Ignoring the fact that this line itself was after the #endif, the line
60*7c478bd9Sstevel@tonic-gate  * caused unacceptable hdrchk breakage. If this results in a build breakage,
61*7c478bd9Sstevel@tonic-gate  * the build MUST be fixed in a more acceptable fashion.
62*7c478bd9Sstevel@tonic-gate  */
63*7c478bd9Sstevel@tonic-gate 
64*7c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
65*7c478bd9Sstevel@tonic-gate }
66*7c478bd9Sstevel@tonic-gate #endif
67*7c478bd9Sstevel@tonic-gate 
68*7c478bd9Sstevel@tonic-gate #endif	/* !_KRB5_DYN_DYNP_H */
69