search for: tok_end

Displaying 2 results from an estimated 2 matches for "tok_end".

2009 Sep 11
1
[FOR REVIEW ONLY] guestfish: Enable grouping in string lists
...end quote */ + if (in_quote) { + end += strcspn (end, "'"); + } + + /* Otherwise, look for whitespace or a quote */ + else { + end += strcspn (end, " \t'"); + } + + /* Grow the token to accommodate the fragment */ + char *tok_end = tok_len == 0 ? NULL : tok + tok_len; + tok_len += end - p; + tok = realloc (tok, tok_len + 1); + if (NULL == tok) { perror ("realloc"); exit (1); } + if (NULL == tok_end) tok_end = tok; + + /* Check if we stopped on an escaped quote */ + if ('\''...
2009 Sep 11
1
[PATCH] guestfish: Enable grouping in string lists
...end quote */ + if (in_quote) { + end += strcspn (end, "'"); + } + + /* Otherwise, look for whitespace or a quote */ + else { + end += strcspn (end, " \t'"); + } + + /* Grow the token to accommodate the fragment */ + size_t tok_end = tok_len; + tok_len += end - p; + tok = realloc (tok, tok_len + 1); + if (NULL == tok) { perror ("realloc"); exit (1); } + + /* Check if we stopped on an escaped quote */ + if ('\'' == *end && end != p && *(end-1) == '\\') { +...