You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

31 lines
732 B

/*
* tree.h
*
* Created by Yigit Colakoglu on 07/06/2021.
* Copyright yigit@yigitcolakoglu.com. 2021. All rights reserved.
*/
#include "urlparse.h"
#include <stdio.h>
#ifndef tree_h
#define tree_h
typedef struct tnode {
char *path;
unsigned int red : 1;
LinkedList *params;
int nparams;
struct tnode *parent;
struct tnode *left;
struct tnode *right;
} TreeNode;
TreeNode *addtree(TreeNode *parent, TreeNode *node);
void rotatetreeright(TreeNode *node);
void rotatetreeleft(TreeNode *node);
void balancetree(TreeNode *root, TreeNode *node);
TreeNode *treealloc(void);
void printtree(TreeNode *root, FILE *out, char *payload, int minparams);
#endif /* Symbol’s value as variable is void: \. */