178 |
new_symbol= hash(env->symbols, in_string); |
new_symbol= hash(env->symbols, in_string); |
179 |
new_value->content.ptr= *new_symbol; |
new_value->content.ptr= *new_symbol; |
180 |
|
|
181 |
if(new_value->content.ptr==NULL) { /* If symbol was undefined */ |
if(*new_symbol==NULL) { /* If symbol was undefined */ |
182 |
|
|
183 |
/* Create a new symbol */ |
/* Create a new symbol */ |
184 |
*new_symbol= malloc(sizeof(symbol)); |
(*new_symbol)= malloc(sizeof(symbol)); |
185 |
(*new_symbol)->val= NULL; /* undefined value */ |
(*new_symbol)->val= NULL; /* undefined value */ |
186 |
(*new_symbol)->next= NULL; |
(*new_symbol)->next= NULL; |
187 |
(*new_symbol)->id= malloc(strlen(in_string)+1); |
(*new_symbol)->id= malloc(strlen(in_string)+1); |
392 |
return; |
return; |
393 |
} |
} |
394 |
|
|
|
/* push(&(env->head), copy(env->head)); */ |
|
|
/* swap(env); */ |
|
|
/* toss(env); */ |
|
395 |
} |
} |
396 |
|
|
397 |
/* Make a list. */ |
/* Make a list. */ |