初次提交,包含c语言实现的,cirbuff和varray

This commit is contained in:
forbelief 2016-11-20 23:31:59 -08:00
commit 64ad5e515e
9 changed files with 1178 additions and 0 deletions

22
c/varray/varray.h Normal file
View file

@ -0,0 +1,22 @@
/*
* varray.h -
*/
#include <stdint.h>
#include <stdbool.h>
struct varray_inside
{
uint8_t *buff; //
uint32_t size; //
uint32_t bsize; //
};
typedef const struct varray_inside varray_t;
bool varray_init(varray_t *varray, uint32_t bsize);
bool check_varray(varray_t *varray, uint32_t req_size);
void destory_varray(varray_t *varray);