diff options
-rw-r--r-- | strbst.c | 6 | ||||
-rw-r--r-- | strbst.h | 10 |
2 files changed, 8 insertions, 8 deletions
@@ -9,7 +9,7 @@ typedef char height; -typedef struct strbstnode{ +typedef struct strbstnode { char* ind; void* data; struct strbstnode* left; @@ -17,6 +17,10 @@ typedef struct strbstnode{ int ht; } strbstnode; +struct strbst { + strbstnode* head; +}; + strbst* newbst(void) { strbst* out = malloc(sizeof(strbst)); out->head = NULL; @@ -1,11 +1,7 @@ -#ifndef _STRBST_ -#define _STRBST_ +#ifndef __STRBST_H__ +#define __STRBST_H__ -typedef struct strbstnode strbstnode; - -typedef struct { - strbstnode* head; -} strbst; +typedef struct strbst strbst; strbst* newbst(void); |