actube/src/capwap/strheap.h
7u83@mail.ru 73aba62d2b Colored debugging...
FossilOrigin-Name: 153201cffee624726d6bcd3e428c0d69d7cc9e9cba6a84a5687de94a850550dd
2015-04-11 17:00:51 +00:00

27 lines
449 B
C

#ifndef __STRHEAP_H
#define __STRHEAP_H
#include <stdint.h>
#include "strlist.h"
#include "avltree.h"
typedef struct avltree * cw_strheap_t;
extern cw_strheap_t cw_strheap_create();
extern int cw_strheap_register_strings(cw_strheap_t h, struct cw_str *s);
static inline const char * cw_strheap_get(cw_strheap_t h, int id) {
struct cw_str s;
s.id=id;
struct cw_str *r = avltree_get(h,&s);
if (r)
return r->str;
return NULL;
}
#endif