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