2011/11/7 Frédéric Delanoy frederic.delanoy@gmail.com:
- /* Note: '==' can't be returned by WCMD_parameter since '=' is a separator */
- p = paramEnd + 1;
- while (*p == ' ' || *p == '\t')
- p++;
- if (!p || *p != '=' || !(p+1) || *(p+1) != '=')
- goto syntax_err;
- strcpyW(operator, eqeqW);
- p += strlenW(operator);
Hi,
This doesn't look general enough, I'm not sure how you want to handle the other operators. Wouldn't it be better to just find next space/tab (skip all non-whitespace chars) then assign the part of the string separated by whitespace to be the operator? With this approach you also don't need that syntax check there.
Octavian