Rev 18056 | Rev 18108 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 18056 | Rev 18086 | ||
---|---|---|---|
Line 2203... | Line 2203... | ||
2203 | } |
2203 | } |
2204 | } |
2204 | } |
2205 | } |
2205 | } |
2206 | 2206 | ||
2207 | void calc_getexoindex(char *p){ |
2207 | void calc_getexoindex(char *p){ |
2208 | char *c, *p1, *p2; |
2208 | char *c, *p1, *p2, *p3, *p4; |
2209 | char nbuf[MAX_LINELEN+1], |
2209 | char nbuf[MAX_LINELEN+1], fname[MAX_FNAME+1], buf[MAX_LINELEN+1], |
2210 |
|
2210 | fcontent[MAX_LINELEN+1]; |
2211 | int i, sheet, start=1, stop=MAX_SHEETS; |
2211 | int i, sheet, start=1, stop=MAX_SHEETS; |
2212 | c=getvar("wims_class"); if(c==NULL) return; |
2212 | c=getvar("wims_class"); if(c==NULL) return; |
2213 |
|
2213 | p1=strstr(p, "module="); if(p1==NULL) return; |
2214 |
|
2214 | p1=find_word_start(p1+strlen("module=")); |
2215 | p2= |
2215 | p2=find_word_end(p1); *p2=0; |
2216 | if |
2216 | p2=strstr(p2+1, "param="); if(p2==NULL) return; |
2217 |
|
2217 | p2=find_word_start(p2+strlen("param=")); |
2218 |
|
2218 | p3=find_word_end(p2); |
2219 |
|
2219 | p4=strstr(p3, " sheet="); *p3=0; |
2220 |
|
2220 | if (p4!=NULL) start=stop=evalue(p4+strlen(" sheet=")); |
2221 | } |
- | |
2222 | } |
2221 | |
2223 | snprintf( |
2222 | snprintf(fname,sizeof(fname),"%s/%s/sheets/.severity",class_base,c); |
2224 | readfile( |
2223 | readfile(fname,fcontent,MAX_LINELEN); |
2225 | snprintf(nbuf,sizeof(nbuf),":%s\n%s\n", |
2224 | snprintf(nbuf,sizeof(nbuf),":%s\n%s\n",p1,p2); *p=0; |
2226 | for (sheet=start; sheet <= stop; ++sheet){ |
2225 | for (sheet=start; sheet <= stop; ++sheet){ |
2227 | snprintf( |
2226 | snprintf(fname,sizeof(fname),"%s/%s/sheets/.sheet%d",class_base,c,sheet); |
2228 | if(readfile( |
2227 | if(readfile(fname,buf,MAX_LINELEN)==NULL) break; |
2229 | p1=strstr(buf,nbuf); |
2228 | p1=strstr(buf,nbuf); |
2230 | while(p1>buf && *(p1-1)!='\n') p1=strstr(p1+1,nbuf); |
2229 | while(p1>buf && *(p1-1)!='\n') p1=strstr(p1+1,nbuf); |
2231 | if(p1!=NULL) { |
2230 | if(p1!=NULL) { |
2232 | p2=strchr(buf,':'); |
2231 | p2=strchr(buf,':'); |
2233 | while(p2>buf && *(p2-1)!='\n') p2=strchr(p2+1,':'); |
2232 | while(p2>buf && *(p2-1)!='\n') p2=strchr(p2+1,':'); |
2234 | for(i=1;p2!=NULL && p2<p1;i++) { |
2233 | for(i=1;p2!=NULL && p2<p1;i++) { |
2235 | p2=strchr(p2+1,':'); |
2234 | p2=strchr(p2+1,':'); |
2236 | while(p2>buf && *(p2-1)!='\n') p2=strchr(p2+1,':'); |
2235 | while(p2>buf && *(p2-1)!='\n') p2=strchr(p2+1,':'); |
2237 | } |
2236 | } |
2238 | if(p2==NULL) return; |
2237 | if(p2==NULL) return; |
2239 | fnd_line( |
2238 | fnd_line(fcontent,sheet+1,buf); |
2240 | if(! |
2239 | if(!buf[0]) getdef("bases/sys/define.conf","DF_SEVERITY",buf); |
2241 | snprintf(p,20,"%d/%d,%s",sheet,i, |
2240 | snprintf(p,20,"%d/%d,%s",sheet,i,buf); |
2242 | break; |
2241 | break; |
2243 | } |
2242 | } |
2244 | } |
2243 | } |
2245 | } |
2244 | } |
2246 | 2245 |