Remove ucore_ prefix from headers and source files
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
#ifndef RBTREE_H_
|
||||
#define RBTREE_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum RBColor RBColor;
|
||||
enum RBColor {
|
||||
Red,
|
||||
Black
|
||||
};
|
||||
|
||||
typedef struct RBNode RBNode;
|
||||
struct RBNode {
|
||||
unsigned char color; //Red/Black
|
||||
RBNode *parent;
|
||||
RBNode *right;
|
||||
RBNode *left;
|
||||
void *data;
|
||||
};
|
||||
|
||||
typedef struct RBTree RBTree;
|
||||
struct RBTree {
|
||||
RBNode *node;
|
||||
int (*compare)(const void *a, const void *b);
|
||||
};
|
||||
|
||||
void uc_rb_remove(RBTree *root, RBNode *node);
|
||||
RBNode *uc_rb_find(RBTree *root, const void *val);
|
||||
RBNode *uc_rb_insert(RBTree *root, RBNode *child);
|
||||
RBNode *uc_rb_first(const RBTree *root);
|
||||
RBNode *uc_rb_next(RBNode *node);
|
||||
RBNode *uc_rb_last(const RBTree *root);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user