Initial import of libucore

This commit is contained in:
Nils O. Selåsdal
2012-10-29 23:07:32 +01:00
commit ed3866e49a
79 changed files with 6181 additions and 0 deletions
+40
View File
@@ -0,0 +1,40 @@
#ifndef UCORE_BUFFER_H_
#define UCORE_BUFFER_H_
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct GBuf GBuf;
struct GBuf {
size_t len;
size_t used;
size_t ref_cnt;
void *buf;
};
GBuf*
uc_new_gbuf(size_t initsz);
void
uc_gbuf_ref(GBuf *buf);
void
uc_gbuf_unref(GBuf *buf);
int
uc_gbuf_append(GBuf *buf,void *data,size_t len);
int
uc_grow_gbuf(GBuf *buf, size_t addlen);
#ifdef __cplusplus
}
#endif
#endif