indexbuf.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef CCN_INDEXBUF_DEFINED
00023 #define CCN_INDEXBUF_DEFINED
00024
00025 #include <stddef.h>
00026
00027 struct ccn_indexbuf {
00028 size_t n;
00029 size_t limit;
00030 size_t *buf;
00031 };
00032
00033 struct ccn_indexbuf *ccn_indexbuf_create(void);
00034 void ccn_indexbuf_destroy(struct ccn_indexbuf **cbp);
00035 size_t *ccn_indexbuf_reserve(struct ccn_indexbuf *c, size_t n);
00036 int ccn_indexbuf_append(struct ccn_indexbuf *c, const size_t *p, size_t n);
00037 int ccn_indexbuf_append_element(struct ccn_indexbuf *c, size_t v);
00038 int ccn_indexbuf_member(struct ccn_indexbuf *x, size_t val);
00039 void ccn_indexbuf_remove_element(struct ccn_indexbuf *x, size_t val);
00040 int ccn_indexbuf_set_insert(struct ccn_indexbuf *x, size_t val);
00041 int ccn_indexbuf_remove_first_match(struct ccn_indexbuf *x, size_t val);
00042 void ccn_indexbuf_move_to_end(struct ccn_indexbuf *x, size_t val);
00043 void ccn_indexbuf_move_to_front(struct ccn_indexbuf *x, size_t val);
00044
00045 #endif