modifies s to remove quotes
| 495 | |
| 496 | // modifies s to remove quotes |
| 497 | static void strip_quotes(char *s) |
| 498 | { |
| 499 | char *s2; |
| 500 | char *p; |
| 501 | |
| 502 | if (s[0] != '\"') { return; } // no quotes |
| 503 | |
| 504 | s2 = strdup(&s[1]); |
| 505 | p = strrchr(s2, '"'); |
| 506 | |
| 507 | if (p) { *p = 0; } |
| 508 | |
| 509 | strcpy(s, s2); |
| 510 | free(s2); |
| 511 | } |
| 512 | |
| 513 | #ifdef HAVE_LIBREADLINE |
| 514 | /* Frees allocated memory and sets pointers to NULL before calling readline |