la
This commit is contained in:
parent
e928e3d459
commit
015e05a0c7
@ -18,12 +18,12 @@ void trim(char *str){
|
||||
|
||||
Tree* read_tree() {
|
||||
char buffer[256];
|
||||
if(fgets(buffer,256,stdin))return NULL;
|
||||
if(!fgets(buffer,256,stdin))return NULL;
|
||||
if(strcmp(buffer, "\n") == 0 ) return NULL;
|
||||
|
||||
trim(buffer);
|
||||
|
||||
Tree* node = calloc(1, sizeof(node));
|
||||
Tree* node = calloc(1, sizeof(Tree));
|
||||
|
||||
strcpy(node->value, buffer);
|
||||
if(buffer[0] == '*'){
|
||||
|
||||
Loading…
Reference in New Issue
Block a user