Rev 10 | Rev 4326 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 10 | Rev 3901 | ||
---|---|---|---|
Line 33... | Line 33... | ||
33 | /* String to search for answers */ |
33 | /* String to search for answers */ |
34 | char ans_str[]="ans ="; |
34 | char ans_str[]="ans ="; |
35 | 35 | ||
36 | char *nameofcmd="octave -Hf --no-line-editing"; |
36 | char *nameofcmd="octave -Hf --no-line-editing"; |
37 | int precision=9; |
37 | int precision=9; |
38 | char header[]=" |
38 | char header[]="split_long_rows(0)\n\ |
39 |
|
39 | page_screen_output(0)\n\ |
40 | function y=sh(x) y=sinh(x); endfunction\n\ |
40 | function y=sh(x) y=sinh(x); endfunction\n\ |
41 | function y=ch(x) y=cosh(x); endfunction\n\ |
41 | function y=ch(x) y=cosh(x); endfunction\n\ |
42 | function y=th(x) y=tanh(x); endfunction\n\ |
42 | function y=th(x) y=tanh(x); endfunction\n\ |
43 | function y=ln(x) y=log(x); endfunction\n\ |
43 | function y=ln(x) y=log(x); endfunction\n\ |
44 | function y=lg(x) y=log10(x); endfunction\n\ |
44 | function y=lg(x) y=log10(x); endfunction\n\ |
Line 134... | Line 134... | ||
134 | prepabout(quitstring,outputfname,NULL); |
134 | prepabout(quitstring,outputfname,NULL); |
135 | if(readabout()>0) { |
135 | if(readabout()>0) { |
136 | p=strchr(aboutbuf,'\n'); if(p!=NULL) *p=0; |
136 | p=strchr(aboutbuf,'\n'); if(p!=NULL) *p=0; |
137 | p=strchr(aboutbuf,'('); if(p!=NULL) *p=0; |
137 | p=strchr(aboutbuf,'('); if(p!=NULL) *p=0; |
138 | strip_trailing_spaces(aboutbuf); |
138 | strip_trailing_spaces(aboutbuf); |
139 | printf("< |
139 | printf("<a href=\"%s\">%s</a>",homepage,aboutbuf); |
140 | } |
140 | } |
141 | } |
141 | } |
142 | 142 | ||
143 | char *dynsetup(char *ptr, char *end) |
143 | char *dynsetup(char *ptr, char *end) |
144 | { |
144 | { |
Line 146... | Line 146... | ||
146 | char *p, *pp; |
146 | char *p, *pp; |
147 | for(i=0;i<SETUP_NO;i++) { |
147 | for(i=0;i<SETUP_NO;i++) { |
148 | p=getenv(setups[i].wname); |
148 | p=getenv(setups[i].wname); |
149 | if(p!=NULL) for(pp=p;*pp;pp++) if(!isspace(*pp) && !isalnum(*pp)) p=""; |
149 | if(p!=NULL) for(pp=p;*pp;pp++) if(!isspace(*pp) && !isalnum(*pp)) p=""; |
150 | if(p==NULL || *p==0) p=setups[i].defaultval; |
150 | if(p==NULL || *p==0) p=setups[i].defaultval; |
151 | snprintf(ptr,end-ptr," |
151 | snprintf(ptr,end-ptr,"%s(%s)\n",setups[i].setname,p); |
152 | ptr+=strlen(ptr); |
152 | ptr+=strlen(ptr); |
153 | if(strstr(setups[i].wname,"octave_precision")!=NULL) |
153 | if(strstr(setups[i].wname,"octave_precision")!=NULL) |
154 | precision=atoi(p); |
154 | precision=atoi(p); |
155 | if(precision<0) precision=-precision; |
155 | if(precision<0) precision=-precision; |
156 | } |
156 | } |