2 * Copyright (c) 1997-2000 by Sun Microsystems, Inc.
6 #ifndef _KRB5_DYN_DYN_H
7 #define _KRB5_DYN_DYN_H
9 #pragma ident "%Z%%M% %I% %E% SMI"
17 * This file is part of libdyn.a, the C Dynamic Object library. It
18 * contains the public header file.
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.
24 * Written by Barr3y Jaspan, Student Information Processing Board (SIPB)
25 * and MIT-Project Athena, 1989.
30 * dyn.h -- header file to be included by programs linking against
36 typedef struct _DynObject
{
38 int el_size
, num_el
, size
, inc
;
39 int debug
, paranoid
, initzero
;
40 } DynObjectRec
, *DynObject
;
43 #define DynHigh(obj) (DynSize(obj) - 1)
44 #define DynLow(obj) (0)
46 /* Return status codes */
48 #define DYN_NOMEM -1001
49 #define DYN_BADINDEX -1002
50 #define DYN_BADVALUE -1003
52 /* Function declarations */
59 DynObject DynCreate
P((int el_size
, int inc
)), DynCopy
P((DynObject obj
));
60 int DynDestroy
P((DynObject obj
)), DynRelease
P((DynObject obj
));
61 int DynAdd
P((DynObject obj
, void *el
));
62 int DynPut
P((DynObject obj
, void *el
, int idx
));
63 int DynInsert
P((DynObject obj
, int idx
, void *els
, int num
));
64 int DynDelete
P((DynObject obj
, int idx
));
65 DynPtr DynGet
P((DynObject obj
, int num
));
66 DynPtr DynArray
P((DynObject obj
));
67 int DynDebug
P((DynObject obj
, int state
));
68 int DynParanoid
P((DynObject obj
, int state
));
69 int DynInitzero
P((DynObject obj
, int state
));
70 int DynSize
P((DynObject obj
));
71 int DynCapacity
P((DynObject obj
));
76 * N.B. The original code had the following comment line in it, after the last
78 * DO NOT ADD ANYTHING AFTER THIS #endif *
79 * This is in violatation of hdrchk standards, and so has been removed.
80 * If this causes any subsequent build problems, the build issues need
81 * to be resolved in a different fashion.
88 #endif /* !_KRB5_DYN_DYN_H */