--- stack/stack.c 2003/08/04 14:13:16 1.129 +++ stack/stack.c 2003/08/05 09:09:51 1.131 @@ -153,7 +153,7 @@ /* Remove content */ switch(env->gc_ref->item->type){ case string: - free(env->gc_ref->item->content.ptr); + free(env->gc_ref->item->content.string); break; case tcons: free(env->gc_ref->item->content.c); @@ -330,30 +330,6 @@ return new_string; /* The caller must free() it */ } -extern void mangle(environment *env) -{ - char *new_string; - - if(env->head->type==empty) { - printerr("Too Few Arguments"); - env->err= 1; - return; - } - - if(CAR(env->head)->type!=string) { - printerr("Bad Argument Type"); - env->err= 2; - return; - } - - new_string= mangle_str(CAR(env->head)->content.string); - - toss(env); - if(env->err) return; - - push_cstring(env, new_string); -} - /* Push a symbol onto the stack. */ void push_sym(environment *env, const char *in_string) { @@ -379,7 +355,7 @@ /* Look up the symbol name in the hash table */ new_symbol= hash(env->symbols, in_string); - new_value->content.ptr= *new_symbol; + new_value->content.sym= *new_symbol; if(*new_symbol==NULL) { /* If symbol was undefined */ @@ -393,7 +369,7 @@ strcpy((*new_symbol)->id, in_string); /* Intern the new symbol in the hash table */ - new_value->content.ptr= *new_symbol; + new_value->content.sym= *new_symbol; /* Try to load the symbol name as an external function, to see if we should bind the symbol to a new function pointer value */ @@ -822,7 +798,7 @@ } if(myenv.interactive) { - printf("Stack version $Revision: 1.129 $\n\ + printf("Stack version $Revision: 1.131 $\n\ Copyright (C) 2002 Mats Alritzson and Teddy Hogeborn\n\ Stack comes with ABSOLUTELY NO WARRANTY; for details type 'warranty;'.\n\ This is free software, and you are welcome to redistribute it\n\