~ubuntu-branches/ubuntu/trusty/keepalived/trusty

« back to all changes in this revision

Viewing changes to lib/vector.h

  • Committer: Bazaar Package Importer
  • Author(s): Alexander Wirt
  • Date: 2005-04-29 23:22:40 UTC
  • mfrom: (1.1.1 upstream) (2.1.1 hoary)
  • Revision ID: james.westby@ubuntu.com-20050429232240-a8m3jtpi3cvuyyy2
Tags: 1.1.11-3
Added a warning about sarge kernels to README.Debian and 
the package description 

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 * 
6
6
 * Part:        vector.c include file.
7
7
 *  
8
 
 * Version:     $Id: vector.h,v 1.1.7 2004/04/04 23:28:05 acassen Exp $
 
8
 * Version:     $Id: vector.h,v 1.1.11 2005/03/01 01:22:13 acassen Exp $
9
9
 *
10
10
 * Author:      Alexandre Cassen, <acassen@linux-vs.org>
11
11
 *
19
19
 *              as published by the Free Software Foundation; either version
20
20
 *              2 of the License, or (at your option) any later version.
21
21
 *
22
 
 * Copyright (C) 2001-2004 Alexandre Cassen, <acassen@linux-vs.org>
 
22
 * Copyright (C) 2001-2005 Alexandre Cassen, <acassen@linux-vs.org>
23
23
 */
24
24
 
25
25
#ifndef _VECTOR_H
36
36
#define VECTOR_SLOT(V,E) ((V)->slot[(E)])
37
37
#define VECTOR_SIZE(V)   ((V)->allocated)
38
38
 
 
39
#define vector_foreach_slot(v,p,i) \
 
40
        for (i = 0; i < (v)->allocated && ((p) = (v)->slot[i]); i++)
 
41
 
39
42
/* Prototypes */
40
43
extern vector vector_alloc(void);
41
44
extern void vector_alloc_slot(vector v);
42
45
extern void vector_free(vector v);
43
46
extern void free_strvec(vector strvec);
44
47
extern void vector_set_slot(vector v, void *value);
 
48
extern void vector_del_slot(vector v, int slot);
 
49
extern void vector_insert_slot(vector v, int slot, void *value);
45
50
extern void vector_dump(vector v);
46
51
extern void dump_strvec(vector strvec);
47
52