Use C99 uint32_t rather than u_int32_t
[onak.git] / keyarray.h
1 /*
2  * keyarray.h - routines to maintain a sorted array of keyids.
3  *
4  * Copyright 2004 Jonathan McDowell <noodles@earth.li>
5  *
6  * This program is free software: you can redistribute it and/or modify it
7  * under the terms of the GNU General Public License as published by the Free
8  * Software Foundation; version 2 of the License.
9  *
10  * This program is distributed in the hope that it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13  * more details.
14  *
15  * You should have received a copy of the GNU General Public License along with
16  * this program; if not, write to the Free Software Foundation, Inc., 51
17  * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18  */
19
20 #ifndef __KEYARRAY_H__
21 #define __KEYARRAY_H__
22
23 #include <stdbool.h>
24 #include <stdint.h>
25
26 struct keyarray {
27         uint64_t *keys;
28         size_t count;
29         size_t size;
30 };
31
32 bool array_find(struct keyarray *array, uint64_t key);
33 void array_free(struct keyarray *array);
34 bool array_add(struct keyarray *array, uint64_t key);
35
36 #endif /* __KEYARRAY_H__ */