forked from amagnasco/xwpe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWeExpArr.h
59 lines (44 loc) · 2 KB
/
WeExpArr.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef __WEEXPARR_H
#define __WEEXPARR_H
/*-------------------------------------------------------------------------*\
<WeExpArr.h> -- Header file of Xwpe routines for Expanding Arrays
Date Programmer Description
05/25/97 Dennis Created for xwpe reorganization.
\*-------------------------------------------------------------------------*/
#ifdef __cplusplus
extern "C" {
#endif
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
WpeExpArrayCreate - Creates an expandable array.
Parameters:
initial_num (In) Initial number of elements for the array
elem_size (In) Size of each element
growth_num (In) Number by which it increases when necessary
Returns: The new expandable array
\* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
void *WpeExpArrayCreate(int initial_num, int elem_size, int growth_num);
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
WpeExpArrayAdd - Adds another element to an expandable array.
Parameters:
exp_array (In & Out) The expandable array
new_elem (In) The new element to add
\* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
void WpeExpArrayAdd(void **exp_array, void *new_elem);
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
WpeExpArrayGetSize - Get the number of used elements of an expandable
array.
Parameters:
exp_array (In) The expandable array
Returns: Number of used elements
\* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
int WpeExpArrayGetSize(void *exp_array);
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
WpeExpArrayDestroy - Destroys an expandable array.
Parameters:
exp_array (In) Expandable array to be destroyed
\* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
void WpeExpArrayDestroy(void *exp_array);
#ifdef __cplusplus
}
#endif
#endif