renamed capwap directory to cw.
FossilOrigin-Name: 8a43dd9d05a4cb73210243ddd8df2a26f16c7ef2c4d4e36ab446de1f65d88223
This commit is contained in:
26
src/cw/strheap.h
Normal file
26
src/cw/strheap.h
Normal file
@ -0,0 +1,26 @@
|
||||
#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_strlist_elem *s);
|
||||
|
||||
static inline const char * cw_strheap_get(cw_strheap_t h, int id) {
|
||||
struct cw_strlist_elem s;
|
||||
s.id=id;
|
||||
struct cw_strlist_elem *r = avltree_get(h,&s);
|
||||
if (r)
|
||||
return r->str;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user