all repos — cgit @ ef8a97d9c6983e4fc3710bdbe771edd4e3550dba

a hyperfast web frontend for git written in c

vector.h (view raw)

 1#ifndef CGIT_VECTOR_H
 2#define CGIT_VECTOR_H
 3
 4#include <stdlib.h>
 5
 6struct vector {
 7	size_t size;
 8	size_t count;
 9	size_t alloc;
10	void *data;
11};
12
13#define VECTOR_INIT(type) {sizeof(type), 0, 0, NULL}
14
15int vector_push(struct vector *vec, const void *data, int gently);
16
17#endif /* CGIT_VECTOR_H */