Rev 8185 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 8185 | Rev 15780 | ||
---|---|---|---|
Line 75... | Line 75... | ||
75 | } |
75 | } |
76 | case exp_and: { |
76 | case exp_and: { |
77 | if(cmcnt<2 || (cmcnt&1)!=0) error("Syntax error."); |
77 | if(cmcnt<2 || (cmcnt&1)!=0) error("Syntax error."); |
78 | commas[cmcnt]=strlen(buf1); |
78 | commas[cmcnt]=strlen(buf1); |
79 | memmove(bufr,buf1,commas[0]); bufr[commas[0]]=0; |
79 | memmove(bufr,buf1,commas[0]); bufr[commas[0]]=0; |
80 | _not(bufr); snprintf(p,MAX_LINELEN,"%s",bufr); l=strlen(p); |
80 | _not(bufr); snprintf(p,MAX_LINELEN+1,"%s",bufr); l=strlen(p); |
81 | for(i=1;i<=cmcnt/2;i++) { |
81 | for(i=1;i<=cmcnt/2;i++) { |
82 | memmove(bufr,buf1+commas[2*i-1],commas[2*i]-commas[2*i-1]); |
82 | memmove(bufr,buf1+commas[2*i-1],commas[2*i]-commas[2*i-1]); |
83 | bufr[commas[2*i]-commas[2*i-1]]=0; |
83 | bufr[commas[2*i]-commas[2*i-1]]=0; |
84 | _not(bufr); |
84 | _not(bufr); |
85 | snprintf(p+l,MAX_LINELEN-l," or %s",bufr); l=strlen(p); |
85 | snprintf(p+l,MAX_LINELEN-l," or %s",bufr); l=strlen(p); |
Line 91... | Line 91... | ||
91 | if(cmcnt<2 || (cmcnt&1)!=0) error("Syntax error."); |
91 | if(cmcnt<2 || (cmcnt&1)!=0) error("Syntax error."); |
92 | commas[cmcnt]=strlen(buf1); |
92 | commas[cmcnt]=strlen(buf1); |
93 | memmove(bufr,buf1,commas[0]); bufr[commas[0]]=0; |
93 | memmove(bufr,buf1,commas[0]); bufr[commas[0]]=0; |
94 | _not(bufr); |
94 | _not(bufr); |
95 | if(_type(bufr,commas2,&cmcnt2)!=exp_or) |
95 | if(_type(bufr,commas2,&cmcnt2)!=exp_or) |
96 | snprintf(p,MAX_LINELEN,"%s",bufr); |
96 | snprintf(p,MAX_LINELEN+1,"%s",bufr); |
97 | else snprintf(p,MAX_LINELEN,"(%s)",bufr); |
97 | else snprintf(p,MAX_LINELEN+3,"(%s)",bufr); |
98 | l=strlen(p); |
98 | l=strlen(p); |
99 | for(i=1;i<=cmcnt/2;i++) { |
99 | for(i=1;i<=cmcnt/2;i++) { |
100 | memmove(bufr,buf1+commas[2*i-1],commas[2*i]-commas[2*i-1]); |
100 | memmove(bufr,buf1+commas[2*i-1],commas[2*i]-commas[2*i-1]); |
101 | bufr[commas[2*i]-commas[2*i-1]]=0; |
101 | bufr[commas[2*i]-commas[2*i-1]]=0; |
102 | _not(bufr); |
102 | _not(bufr); |