Re: [e-users] e16: better comment parsing in AclassConfigLineParse
"Dennis Nezic" <[email protected]>
| Newsgroups | gmane.comp.window-managers.enlightenment.user |
|---|---|
| Message-ID | <ZJm4qfX2AAz-tqbl@panther> |
Here's a slightly more robust inside of that for-loop, in case there are
escaped quotes outside a quoted pair (eg. quotes in filenames?), not
sure it's necessary to worry about these :p.
if (*s3 == '\'' && (s3 == s || *(s3 - 1) != '\\')) {
while (++s3<s2 && (*s3 != '\'' || *(s3 - 1) == '\\' )) ;
if (s3 == s2)
quoteclosed = 0;
}
else if (*s3 == '\"' && (s3 == s || *(s3 - 1) != '\\')) {
while (++s3<s2 && (*s3 != '\"' || *(s3 - 1) == '\\' )) ;
if (s3 == s2)
quoteclosed = 0;
}