diff options
author | Lars Hjemli <hjemli@gmail.com> | 2011-02-19 14:00:56 +0100 |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2011-02-19 14:00:59 +0100 |
commit | e66a16cebcdac53b63e77876acef1ca9e4877038 (patch) | |
tree | 839123e66853c4a80c305a3a1c13295fe5e6acc9 /vector.h | |
parent | Use GIT-1.7.4 (diff) | |
parent | html.c: use '+' to escape spaces in urls (diff) | |
download | cgit-pink-e66a16cebcdac53b63e77876acef1ca9e4877038.tar.gz cgit-pink-e66a16cebcdac53b63e77876acef1ca9e4877038.zip |
Merge branch 'lh/improve-range-search'
* lh/improve-range-search: html.c: use '+' to escape spaces in urls ui-log.c: improve handling of range-search argument Add vector utility functions
Diffstat (limited to '')
-rw-r--r-- | vector.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/vector.h b/vector.h new file mode 100644 index 0000000..c64eb1f --- /dev/null +++ b/vector.h @@ -0,0 +1,17 @@ +#ifndef CGIT_VECTOR_H +#define CGIT_VECTOR_H + +#include <stdlib.h> + +struct vector { + size_t size; + size_t count; + size_t alloc; + void *data; +}; + +#define VECTOR_INIT(type) {sizeof(type), 0, 0, NULL} + +int vector_push(struct vector *vec, const void *data, int gently); + +#endif /* CGIT_VECTOR_H */ |