8 #define EXPR_BUF_SIZE 256
11 extern unsigned int **free_stack;
16 // modified by anderain
17 free_stack = (unsigned int**) calloc(500,sizeof(unsigned int*));
18 mem = (U**) calloc(100,sizeof(U*));
19 stack = (U**) calloc(TOS,sizeof(U*));
20 symtab = (U*) calloc(NSYM,sizeof(U));
21 binding = (U**) calloc(NSYM,sizeof(U*));
22 arglist = (U**) calloc(NSYM,sizeof(U*));
23 logbuf = (char*) calloc(256,1);
26 const unsigned char *Setup[]={
27 "logab(a,b)=log(b)/log(a)",
28 "log10(x)=log(x)/log(10)",
30 "cis(x)=cos(x)+i*sin(x)",
32 "coth(x)=cosh(x)/sinh(x)",
33 "arccot(x)=arctan(1/x)",
34 "arccoth(x)=arctanh(1/x)",
37 "arcsec(x)=arccos(1/x)",
38 "arcsech(x)=arccosh(1/x)",
41 "arccsc(x)=arcsin(1/x)",
42 "arccsch(x)=arcsinh(1/x)",
43 "npr(n,r)=(n!)/(n-r)!",
44 "ncr(n,r)=n!/(r!(n-r)!)",
45 "xor(x,y)=or(and(x,not(y)),and(not(x),y))",
49 int AddIn_main(int isAppli, unsigned short OptionNum)
55 // initialize failed ?
56 if (!(free_stack && mem && stack && symtab && binding && arglist && logbuf))
60 while(Setup[i] != NULL)
62 run((char *)Setup[i++]);
69 if((expr=Console_GetLine())==NULL) stop("memory error");
71 Console_NewLine(LINE_TYPE_OUTPUT,1);
80 #pragma section _BR_Size
81 unsigned long BR_Size;
85 int InitializeSystem(int isAppli, unsigned short OptionNum)
87 return INIT_ADDIN_APPLICATION(isAppli, OptionNum);