| 827 | ****************************************************************************/ |
| 828 | |
| 829 | static char *findchar(char *ptr, char ch) |
| 830 | { |
| 831 | bool escaped = false; |
| 832 | |
| 833 | /* Search for the leading quotation marked */ |
| 834 | |
| 835 | for (; *ptr; ptr++) |
| 836 | { |
| 837 | if (escaped) |
| 838 | { |
| 839 | /* Skip over this character and reset the escaped flag */ |
| 840 | |
| 841 | escaped = false; |
| 842 | } |
| 843 | else if (*ptr == '\\') |
| 844 | { |
| 845 | /* Set the escaped flag to skip over the next character */ |
| 846 | |
| 847 | escaped = true; |
| 848 | } |
| 849 | else if (*ptr == ch) |
| 850 | { |
| 851 | /* We have found the (unescaped) character we are looking for */ |
| 852 | |
| 853 | return ptr; |
| 854 | } |
| 855 | } |
| 856 | |
| 857 | return NULL; |
| 858 | } |
| 859 | |
| 860 | /**************************************************************************** |
| 861 | * Name: get_token |
no outgoing calls
no test coverage detected