OSDN Git Service

Fix no pic
[uclinux-h8/uClinux-dist.git] / user / pptp / vector.h
1 /* vector.h ..... store a vector of PPTP_CALL information and search it
2  *                efficiently.
3  *                C. Scott Ananian <cananian@alumni.princeton.edu>
4  *
5  * $Id: vector.h,v 1.1.1.1 2000/12/23 08:19:51 scott Exp $
6  */
7
8 #ifndef INC_VECTOR_H
9 #define INC_VECTOR_H
10
11 #include "pptp_ctrl.h" /* for definition of PPTP_CALL */
12
13 typedef struct vector_struct VECTOR;
14
15 VECTOR *vector_create();
16 void vector_destroy(VECTOR *v);
17
18 int vector_size(VECTOR *v);
19
20 /* vector_insert and vector_search return TRUE on success, FALSE on failure. */
21 int  vector_insert(VECTOR *v, int key, PPTP_CALL * call);
22 int  vector_remove(VECTOR *v, int key);
23 int  vector_search(VECTOR *v, int key, PPTP_CALL ** call);
24 /* vector_contains returns FALSE if not found, TRUE if found. */
25 int  vector_contains(VECTOR *v, int key);
26 /* find first unused key. Returns TRUE on success, FALSE if no. */
27 int  vector_scan(VECTOR *v, int lo, int hi, int *key);
28 /* get a specific PPTP_CALL ... useful only when iterating. */
29 PPTP_CALL * vector_get_Nth(VECTOR *v, int n);
30
31 #endif /* INC_VECTOR_H */