* Find a character occurrence that is not quoted */
| 81 | * Find a character occurrence that is not quoted |
| 82 | */ |
| 83 | inline static char* find_not_quoted(str* _s, char _c) |
| 84 | { |
| 85 | int quoted = 0, i; |
| 86 | |
| 87 | for(i = 0; i < _s->len; i++) { |
| 88 | if (!quoted) { |
| 89 | if (_s->s[i] == '\"') quoted = 1; |
| 90 | else if (_s->s[i] == _c) return _s->s + i; |
| 91 | } else { |
| 92 | if ((_s->s[i] == '\"') && (_s->s[i - 1] != '\\')) quoted = 0; |
| 93 | } |
| 94 | } |
| 95 | return 0; |
| 96 | } |
| 97 | |
| 98 | |
| 99 | #endif /* parser_f_h */ |
no outgoing calls
no test coverage detected