初次提交,包含c语言实现的,cirbuff和varray
This commit is contained in:
commit
64ad5e515e
9 changed files with 1178 additions and 0 deletions
22
c/varray/varray.h
Normal file
22
c/varray/varray.h
Normal 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);
|
||||
Loading…
Add table
Add a link
Reference in a new issue