Rev 10 | Rev 3902 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 10 | Rev 3879 | ||
---|---|---|---|
Line 44... | Line 44... | ||
44 | alias(euler,Euler)\n\ |
44 | alias(euler,Euler)\n\ |
45 | alias(PI,Pi)\n\ |
45 | alias(PI,Pi)\n\ |
46 | i=I\n\ |
46 | i=I\n\ |
47 | e=exp(1)\n\ |
47 | e=exp(1)\n\ |
48 | E=exp(1)\n\ |
48 | E=exp(1)\n\ |
49 |
|
49 | sec(x)=1/cos(x);\n\ |
50 |
|
50 | csc(x)=1/sin(x);\n\ |
51 |
|
51 | lg(x)=log(x)/log(10);\n\ |
52 |
|
52 | log2(x)=log(x)/log(10);\n\ |
53 | alias(log10,lg)\n\ |
53 | alias(log10,lg)\n\ |
54 | alias(sgn,sign)\n\ |
54 | alias(sgn,sign)\n\ |
55 | alias(ch,cosh)\n\ |
55 | alias(ch,cosh)\n\ |
56 | alias(sh,sinh)\n\ |
56 | alias(sh,sinh)\n\ |
57 | alias(th,tanh)\n\ |
57 | alias(th,tanh)\n\ |
Line 83... | Line 83... | ||
83 | }; |
83 | }; |
84 | 84 | ||
85 | /* names which are not allowed */ |
85 | /* names which are not allowed */ |
86 | char *illegal[]={ |
86 | char *illegal[]={ |
87 | "alias","allocatemem","default","extern", |
87 | "alias","allocatemem","default","extern", |
88 | "getrand","getstack","input","psdraw", |
88 | "getrand", "setrand", "getstack","input","psdraw", |
89 | "read","system", |
89 | "read","readvec","system","install", "externstr", |
- | 90 | "Strexpand" |
|
90 | }; |
91 | }; |
91 | 92 | ||
92 | /* name parts which are not allowed */ |
93 | /* name parts which are not allowed */ |
93 | char *illpart[]={ |
94 | char *illpart[]={ |
94 | "plot", "write", "help" |
95 | "plot", "write", "help" |
Line 177... | Line 178... | ||
177 | char *dynsetup(char *ptr, char *end) |
178 | char *dynsetup(char *ptr, char *end) |
178 | { |
179 | { |
179 | int i; |
180 | int i; |
180 | char *p, *pp; |
181 | char *p, *pp; |
181 | 182 | ||
182 | snprintf(ptr,end-ptr,"\nsetrand(%u)\n",seed&(0x7FFFFFFF)); |
183 | snprintf(ptr,end-ptr,"\nsetrand(%u);\n",seed&(0x7FFFFFFF)); |
183 | ptr+=strlen(ptr); |
184 | ptr+=strlen(ptr); |
184 | for(i=0;i<SETUP_NO;i++) { |
185 | for(i=0;i<SETUP_NO;i++) { |
185 | p=getenv(setups[i].wname); |
186 | p=getenv(setups[i].wname); |
186 | if(p!=NULL) for(pp=p;*pp;pp++) if(!isspace(*pp) && !isalnum(*pp)) p=""; |
187 | if(p!=NULL) for(pp=p;*pp;pp++) if(!isspace(*pp) && !isalnum(*pp)) p=""; |
187 | if(p==NULL || *p==0) p=setups[i].defaultval; |
188 | if(p==NULL || *p==0) p=setups[i].defaultval; |