ECP-VELOC Components
User documentation for all components
kvtree_helpers.h
Go to the documentation of this file.
1 #ifndef KVTREE_HELPERS_H
2 #define KVTREE_HELPERS_H
3 
4 #define KVTREE_FAILURE (1)
5 
6 #include <stdlib.h>
7 #include <stdint.h>
8 
15 int kvtree_atod(char* str, double* val);
16 
19 #define KVTREE_MALLOC(X) kvtree_malloc(X, __FILE__, __LINE__);
20 void* kvtree_malloc(size_t size, const char* file, int line);
21 
23 void kvtree_free(void* ptr);
24 
26 int kvtree_pack_uint16_t(void* buf, size_t buf_size, size_t* buf_pos, uint16_t val);
27 
29 int kvtree_pack_uint32_t(void* buf, size_t buf_size, size_t* buf_pos, uint32_t val);
30 
32 int kvtree_pack_uint64_t(void* buf, size_t buf_size, size_t* buf_pos, uint64_t val);
33 
35 int kvtree_unpack_uint16_t(const void* buf, size_t buf_size, size_t* buf_pos, uint16_t* val);
36 
38 int kvtree_unpack_uint32_t(const void* buf, size_t buf_size, size_t* buf_pos, uint32_t* val);
39 
41 int kvtree_unpack_uint64_t(const void* buf, size_t buf_size, size_t* buf_pos, uint64_t* val);
42 
43 #endif
kvtree_pack_uint16_t
int kvtree_pack_uint16_t(void *buf, size_t buf_size, size_t *buf_pos, uint16_t val)
kvtree_pack_uint64_t
int kvtree_pack_uint64_t(void *buf, size_t buf_size, size_t *buf_pos, uint64_t val)
kvtree_malloc
void * kvtree_malloc(size_t size, const char *file, int line)
kvtree_unpack_uint64_t
int kvtree_unpack_uint64_t(const void *buf, size_t buf_size, size_t *buf_pos, uint64_t *val)
kvtree_atod
int kvtree_atod(char *str, double *val)
kvtree_unpack_uint32_t
int kvtree_unpack_uint32_t(const void *buf, size_t buf_size, size_t *buf_pos, uint32_t *val)
kvtree_unpack_uint16_t
int kvtree_unpack_uint16_t(const void *buf, size_t buf_size, size_t *buf_pos, uint16_t *val)
kvtree_pack_uint32_t
int kvtree_pack_uint32_t(void *buf, size_t buf_size, size_t *buf_pos, uint32_t val)
kvtree_free
void kvtree_free(void *ptr)