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