Escape token for output as CSV string.
| 193 | |
| 194 | // Escape token for output as CSV string. |
| 195 | static void CSV_escape(FILE *out, const char *p, unsigned len) |
| 196 | { |
| 197 | for (; len; len--, p++) { |
| 198 | if (*p == '"') |
| 199 | // Double the double quote: |
| 200 | fputc('\"', out); |
| 201 | //else Not a "; default action. |
| 202 | fputc(*p, out); |
| 203 | } |
| 204 | } |
| 205 | |
| 206 | // Returns length of matched token (ws inclusive) or 0 when in error. |
| 207 | static unsigned get(char const *text) |