Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-src
Path: blob/main/crypto/krb5/src/lib/rpc/dynP.h
39536 views
1
/*
2
* This file is part of libdyn.a, the C Dynamic Object library. It
3
* contains the private header file.
4
*
5
* There are no restrictions on this code; however, if you make any
6
* changes, I request that you document them so that I do not get
7
* credit or blame for your modifications.
8
*
9
* Written by Barr3y Jaspan, Student Information Processing Board (SIPB)
10
* and MIT-Project Athena, 1989.
11
*/
12
13
14
/*
15
* dynP.h -- private header file included by source files for libdyn.a.
16
*/
17
18
#ifndef _DynP_h
19
#define _DynP_h
20
21
#include "dyn.h"
22
#ifdef USE_DBMALLOC
23
#include <sys/stdtypes.h>
24
#include <malloc.h>
25
#endif
26
27
/*
28
* Rep invariant:
29
* 1) el_size is the number of bytes per element in the object
30
* 2) num_el is the number of elements currently in the object. It is
31
* one higher than the highest index at which an element lives.
32
* 3) size is the number of elements the object can hold without
33
* resizing. num_el <= index.
34
* 4) inc is a multiple of the number of elements the object grows by
35
* each time it is reallocated.
36
*/
37
38
typedef struct _DynObject DynObjectRecP, *DynObjectP;
39
40
#define _DynRealloc gssrpcint_DynRealloc
41
#define _DynResize gssrpcint_DynResize
42
43
/* Internal functions */
44
int _DynRealloc (DynObjectP obj, int req),
45
_DynResize (DynObjectP obj, int req);
46
47
#undef P
48
49
#endif /* _DynP_h */
50
/* DON'T ADD STUFF AFTER THIS #endif */
51
52