Rev 9229 | Rev 11132 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 9229 | Rev 11123 | ||
---|---|---|---|
Line 238... | Line 238... | ||
238 | p[i]=find_word_start(p[i]); |
238 | p[i]=find_word_start(p[i]); |
239 | if(strncasecmp(p[i],"type",strlen("type"))==0) { |
239 | if(strncasecmp(p[i],"type",strlen("type"))==0) { |
240 | char *tt; |
240 | char *tt; |
241 | tt=find_word_start(p[i]+strlen("type")); |
241 | tt=find_word_start(p[i]+strlen("type")); |
242 | if(*tt=='=') { |
242 | if(*tt=='=') { |
243 | for(j=i;j<6;j++) p[j]=p[j+1] |
243 | for(j=i;j<6;j++) p[j]=p[j+1]; |
- | 244 | i--; |
|
244 | tt=find_word_start(tt+1); *find_word_end(tt)=0; |
245 | tt=find_word_start(tt+1); *find_word_end(tt)=0; |
245 | k=search_list(anstype,anstype_no,sizeof(anstype[0]),tt); |
246 | k=search_list(anstype,anstype_no,sizeof(anstype[0]),tt); |
246 | /* unknown type is now substituted */ |
247 | /* unknown type is now substituted */ |
247 | if(k>=0) { |
248 | if(k>=0) { |
248 | fprintf(outf,"replytype%d=%s\n", |
249 | fprintf(outf,"replytype%d=%s\n", |
Line 260... | Line 261... | ||
260 | char *tt, *tv; |
261 | char *tt, *tv; |
261 | tt=p[i]+strlen("option"); |
262 | tt=p[i]+strlen("option"); |
262 | if(*tt=='s' || *tt=='S') tt++; |
263 | if(*tt=='s' || *tt=='S') tt++; |
263 | tt=find_word_start(tt); |
264 | tt=find_word_start(tt); |
264 | if(*tt=='=') { |
265 | if(*tt=='=') { |
265 | for(j=i;j<6;j++) p[j]=p[j+1] |
266 | for(j=i;j<6;j++) p[j]=p[j+1]; |
- | 267 | i--; |
|
266 | snprintf(nbuf,sizeof(nbuf),"%s",tt+1); subst(nbuf); |
268 | snprintf(nbuf,sizeof(nbuf),"%s",tt+1); subst(nbuf); |
267 | for(tv=nbuf; *tv; tv++) if(*tv==',' || *tv==';') *tv=' '; |
269 | for(tv=nbuf; *tv; tv++) if(*tv==',' || *tv==';') *tv=' '; |
268 | strip_trailing_spaces(nbuf); |
270 | strip_trailing_spaces(nbuf); |
269 | fprintf(outf,"replyoption%d=%s \n",answercnt, |
271 | fprintf(outf,"replyoption%d=%s \n",answercnt, |
270 | find_word_start(nbuf)); |
272 | find_word_start(nbuf)); |
Line 274... | Line 276... | ||
274 | if(strncasecmp(p[i],"weight",strlen("weight"))==0) { |
276 | if(strncasecmp(p[i],"weight",strlen("weight"))==0) { |
275 | char *tt; |
277 | char *tt; |
276 | tt=p[i]+strlen("weight"); |
278 | tt=p[i]+strlen("weight"); |
277 | tt=find_word_start(tt); |
279 | tt=find_word_start(tt); |
278 | if(*tt=='=') { |
280 | if(*tt=='=') { |
279 | for(j=i;j<6;j++) p[j]=p[j+1] |
281 | for(j=i;j<6;j++) p[j]=p[j+1]; |
- | 282 | i--; |
|
280 | snprintf(nbuf,sizeof(nbuf),"%s",tt+1); subst(nbuf); |
283 | snprintf(nbuf,sizeof(nbuf),"%s",tt+1); subst(nbuf); |
281 | strip_trailing_spaces(nbuf); |
284 | strip_trailing_spaces(nbuf); |
282 | fprintf(outf,"replyweight%d=%s \n",answercnt, |
285 | fprintf(outf,"replyweight%d=%s \n",answercnt, |
283 | find_word_start(nbuf)); |
286 | find_word_start(nbuf)); |
284 | } |
287 | } |
Line 358... | Line 361... | ||
358 | char *tt, *tv; |
361 | char *tt, *tv; |
359 | tt=p[i]+strlen("option"); |
362 | tt=p[i]+strlen("option"); |
360 | if(*tt=='s' || *tt=='S') tt++; |
363 | if(*tt=='s' || *tt=='S') tt++; |
361 | tt=find_word_start(tt); |
364 | tt=find_word_start(tt); |
362 | if(*tt=='=') { |
365 | if(*tt=='=') { |
363 | for(j=i;j<6;j++) p[j]=p[j+1] |
366 | for(j=i;j<6;j++) p[j]=p[j+1]; |
- | 367 | i--; |
|
364 | snprintf(nbuf,sizeof(nbuf),"%s",tt+1); subst(nbuf); |
368 | snprintf(nbuf,sizeof(nbuf),"%s",tt+1); subst(nbuf); |
365 | for(tv=nbuf; *tv; tv++) if(*tv==',' || *tv==';') *tv=' '; |
369 | for(tv=nbuf; *tv; tv++) if(*tv==',' || *tv==';') *tv=' '; |
366 | strip_trailing_spaces(nbuf); |
370 | strip_trailing_spaces(nbuf); |
367 | fprintf(outf,"choiceoption%d=%s \n",choicecnt, |
371 | fprintf(outf,"choiceoption%d=%s \n",choicecnt, |
368 | find_word_start(nbuf)); |
372 | find_word_start(nbuf)); |
Line 372... | Line 376... | ||
372 | if(strncasecmp(p[i],"weight",strlen("weight"))==0) { |
376 | if(strncasecmp(p[i],"weight",strlen("weight"))==0) { |
373 | char *tt; |
377 | char *tt; |
374 | tt=p[i]+strlen("weight"); |
378 | tt=p[i]+strlen("weight"); |
375 | tt=find_word_start(tt); |
379 | tt=find_word_start(tt); |
376 | if(*tt=='=') { |
380 | if(*tt=='=') { |
377 | for(j=i;j<6;j++) p[j]=p[j+1] |
381 | for(j=i;j<6;j++) p[j]=p[j+1]; |
- | 382 | i--; |
|
378 | snprintf(nbuf,sizeof(nbuf),"%s",tt+1); subst(nbuf); |
383 | snprintf(nbuf,sizeof(nbuf),"%s",tt+1); subst(nbuf); |
379 | strip_trailing_spaces(nbuf); |
384 | strip_trailing_spaces(nbuf); |
380 | fprintf(outf,"choiceweight%d=%s \n",choicecnt, |
385 | fprintf(outf,"choiceweight%d=%s \n",choicecnt, |
381 | find_word_start(nbuf)); |
386 | find_word_start(nbuf)); |
382 | } |
387 | } |
Line 598... | Line 603... | ||
598 | char *tt, *tv; |
603 | char *tt, *tv; |
599 | tt=p[i]+strlen("option"); |
604 | tt=p[i]+strlen("option"); |
600 | if(*tt=='s' || *tt=='S') tt++; |
605 | if(*tt=='s' || *tt=='S') tt++; |
601 | tt=find_word_start(tt); |
606 | tt=find_word_start(tt); |
602 | if(*tt=='=') { |
607 | if(*tt=='=') { |
603 | for(j=i;j<6;j++) p[j]=p[j+1] |
608 | for(j=i;j<6;j++) p[j]=p[j+1]; |
- | 609 | i--; |
|
604 | snprintf(buf1,sizeof(buf1),"%s",tt+1); subst(buf1); |
610 | snprintf(buf1,sizeof(buf1),"%s",tt+1); subst(buf1); |
605 | for(tv=buf1; *tv; tv++) if(*tv==',' || *tv==';') *tv=' '; |
611 | for(tv=buf1; *tv; tv++) if(*tv==',' || *tv==';') *tv=' '; |
606 | strip_trailing_spaces(buf1); |
612 | strip_trailing_spaces(buf1); |
607 | fprintf(outf,"condoption%d=%s \n",conditioncnt, |
613 | fprintf(outf,"condoption%d=%s \n",conditioncnt, |
608 | find_word_start(buf1)); |
614 | find_word_start(buf1)); |
Line 612... | Line 618... | ||
612 | if(strncasecmp(p[i],"weight",strlen("weight"))==0) { |
618 | if(strncasecmp(p[i],"weight",strlen("weight"))==0) { |
613 | char *tt; |
619 | char *tt; |
614 | tt=p[i]+strlen("weight"); |
620 | tt=p[i]+strlen("weight"); |
615 | tt=find_word_start(tt); |
621 | tt=find_word_start(tt); |
616 | if(*tt=='=') { |
622 | if(*tt=='=') { |
617 | for(j=i;j<6;j++) p[j]=p[j+1] |
623 | for(j=i;j<6;j++) p[j]=p[j+1]; |
- | 624 | i--; |
|
618 | snprintf(buf1,sizeof(buf1),"%s",tt+1); subst(buf1); |
625 | snprintf(buf1,sizeof(buf1),"%s",tt+1); subst(buf1); |
619 | strip_trailing_spaces(buf1); |
626 | strip_trailing_spaces(buf1); |
620 | fprintf(outf,"condweight%d=%s \n",conditioncnt, |
627 | fprintf(outf,"condweight%d=%s \n",conditioncnt, |
621 | find_word_start(buf1)); |
628 | find_word_start(buf1)); |
622 | } |
629 | } |