Introduction
Introduction Statistics Contact Development Disclaimer Help
vec.h - bmf - bmf (Bayesian Mail Filter) 0.9.4 fork + patches
git clone git://git.codemadness.org/bmf
Log
Files
Refs
README
LICENSE
---
vec.h (1018B)
---
1 /* $Id: vec.h,v 1.3 2002/10/20 18:19:17 tommy Exp $ */
2
3 /*
4 * Copyright (c) 2002 Tom Marshall <[email protected]>
5 *
6 * This program is free software. It may be distributed under the terms
7 * in the file LICENSE, found in the top level of the distribution.
8 */
9
10 #ifndef _VEC_H
11 #define _VEC_H
12
13 /* item count for initial alloc */
14 #define VEC_INITIAL_SIZE 256
15
16 typedef struct _vec {
17 uint nalloc; /* items allocated in pitems */
18 uint nitems; /* items available */
19 str_t *pitems; /* growing vector of items */
20 } vec_t;
21
22 typedef struct _veciter {
23 struct _vec *plist;
24 uint index;
25 } veciter_t;
26
27 /* class vector */
28 void vec_create(vec_t * pthis);
29 void vec_destroy(vec_t * pthis);
30 void vec_addtail(vec_t * pthis, str_t * pstr);
31 void vec_first(vec_t * pthis, veciter_t * piter);
32
33 /* class sorted_vector */
34 void svec_sort(vec_t * pthis);
35
36 /* veciter_create not needed */
37 void veciter_destroy(veciter_t * pthis);
38
39 str_t *veciter_get(veciter_t * pthis);
40 bool_t veciter_next(veciter_t * pthis);
41
42 #endif /* ndef _VEC_H */
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.