diff --git a/cv8/program.c b/cv8/program.c index 4a60e13..242000a 100644 --- a/cv8/program.c +++ b/cv8/program.c @@ -42,12 +42,12 @@ void search(struct tree* this){ int x = strlen(buffer); buffer[x-1]='\0'; - /*if(this == NULL){ + if(buffer[0] == '\n'){ return; - } */ + } if(buffer[0] == 'a'){ - if(this->value[0] == '*'){ - printf("%s\n", this->value); + if(this->left->value[0] == '*'){ + printf("%s\n", this->left->value); return; } printf("%s\n", this->left->value); @@ -78,17 +78,6 @@ void print_tree(struct tree* tree,int offset){ } } -struct tree* find_minimum(struct tree *root){ - if(root == NULL){ - return NULL; - } - else if(root->left != NULL){ - return find_minimum(root->left); - } - return root; -} - - void destroy_tree(struct tree* root){ if(root == NULL) return;