char *skip_operand(char *s) { int par_cnt = 0; char c; for (;;) { c = *s; if (START_PARENTH(c)) { par_cnt++; } else if (END_PARENTH(c)) { if (par_cnt > 0) par_cnt--; else syntax_error(3); /* too many closing parentheses */ } else if (c=='\'' || c=='\"') s = skip_string(s,c,NULL) - 1; else if (!c || (par_cnt==0 && (c==',' || c==commentchar))) break; s++; } if (par_cnt != 0) syntax_error(4); /* missing closing parentheses */ return s; }
static char *skip_macroparam(char *s) { int par_cnt=0; char c; while(1){ c = *s; if(START_PARENTH(c)) par_cnt++; if(END_PARENTH(c)){ if(par_cnt>0) par_cnt--; else return s; } if(ISEOL(s)||((c==','||isspace((unsigned char)c))&&par_cnt==0)) break; s++; } return s; }
char *skip_operand(char *s) { int par_cnt=0; char c; while(1){ c = *s; if(START_PARENTH(c)) par_cnt++; if(END_PARENTH(c)){ if(par_cnt>0) par_cnt--; else syntax_error(3); } if(!c||c==commentchar||(c==','&&par_cnt==0)) break; s++; } if(par_cnt!=0) syntax_error(4); return s; }
char *skip_operand(char *s) { int par_cnt = 0; char c; for (;;) { c = *s; if (START_PARENTH(c)) par_cnt++; if (END_PARENTH(c)) { if (par_cnt>0) par_cnt--; else syntax_error(3); /* too many closing parentheses */ } if(!c || c==commentchar || (c==',' && par_cnt==0)) break; s++; } if(par_cnt != 0) syntax_error(4); /* missing closing parentheses */ return s; }
char *skip_operand(char *s) { int par_cnt=0; char c; while(1){ c = *s; if(START_PARENTH(c)) par_cnt++; else if(END_PARENTH(c)){ if(par_cnt>0) par_cnt--; else syntax_error(3); }else if(c=='\''||c=='\"') s=skip_string(s,c,NULL)-1; else if(ISEOL(s)||(c==','&&par_cnt==0)) break; s++; } if(par_cnt!=0) syntax_error(4); return s; }