Rev 7674 | Rev 8120 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7674 | Rev 8100 | ||
---|---|---|---|
Line 146... | Line 146... | ||
146 | /* strip leading and trailing spaces */ |
146 | /* strip leading and trailing spaces */ |
147 | while(isspace(*pp) && pp<pe) pp++; |
147 | while(isspace(*pp) && pp<pe) pp++; |
148 | pt=pp+strlen(pp)-1; |
148 | pt=pp+strlen(pp)-1; |
149 | while(isspace(*pt) && pt>pp) *pt--=0; |
149 | while(isspace(*pt) && pt>pp) *pt--=0; |
150 | /* remove parentheses of matrix output */ |
150 | /* remove parentheses of matrix output */ |
151 | if(memcmp(pp,"Mat(",4)==0 && *pt==')' && |
151 | if(memcmp(pp,"Mat(",4)==0 && *pt==')' && find_matching2(pp+4,')')==pt) { |
152 | *(pt--)=0; pp+=4; |
152 | *(pt--)=0; pp+=4; |
153 | } |
153 | } |
154 | if(memcmp(pp,"Vecsmall(",9)==0 && *pt==')' && |
154 | if(memcmp(pp,"Vecsmall(",9)==0 && *pt==')' && find_matching2(pp+9,')')==pt) { |
155 | *(pt--)=0; pp+=9; |
155 | *(pt--)=0; pp+=9; |
156 | } |
156 | } |
157 | if(*pp=='[' && *pt==']' && |
157 | if(*pp=='[' && *pt==']' && find_matching2(pp+1,']')==pt) { |
158 | *(pt--)=0; pp++; |
158 | *(pt--)=0; pp++; |
159 | } |
159 | } |
160 | strip_zeros(pp); |
160 | strip_zeros(pp); |
161 | puts(pp); pp=pe; |
161 | puts(pp); pp=pe; |
162 | } |
162 | } |
Line 167... | Line 167... | ||
167 | char *p; |
167 | char *p; |
168 | 168 | ||
169 | prepabout("\\v\nquit\n",outputfname,NULL); |
169 | prepabout("\\v\nquit\n",outputfname,NULL); |
170 | if(readabout()>0) { |
170 | if(readabout()>0) { |
171 | p=strchr(aboutbuf,'\n'); if(p!=NULL) *p=0; |
171 | p=strchr(aboutbuf,'\n'); if(p!=NULL) *p=0; |
172 |
|
172 | strip_trailing_spaces2(aboutbuf); |
173 | printf("<a href=\"%s\">%s</a>",homepage,aboutbuf); |
173 | printf("<a href=\"%s\">%s</a>",homepage,aboutbuf); |
174 | } |
174 | } |
175 | } |
175 | } |
176 | 176 | ||
177 | char *dynsetup(char *ptr, char *end) |
177 | char *dynsetup(char *ptr, char *end) |