Fix for a crash which happened when a document couldn't be opened.
[AROS-Contrib.git] / fish / icalc / function.c
blob2991cc9b5889e200516c5a0ff744b44ee052ae14
1 /*
2 * the whole point of the program, really: user-functions.
3 * These are the routines to implement them.
4 * Structure definition is in complex.h.
6 * MWS, March 21, 1991.
7 */
8 #include "complex.h"
9 #include "memory.h"
11 #include <stdlib.h>
13 void clear_ufunc(func)
14 UserFunc *func;
16 RemKey **oldkey = rem_setkey(&func->remkey);
18 rem_freeall();
19 free(func->param->name);
20 free(func->param);
21 func->tree = NULL;
22 rem_setkey(oldkey);