MCPcopy Create free account
hub / github.com/Hamlib/Hamlib / strip_quotes

Function strip_quotes

tests/rigctl_parse.c:497–511  ·  view source on GitHub ↗

modifies s to remove quotes

Source from the content-addressed store, hash-verified

495
496// modifies s to remove quotes
497static 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

Callers 1

rigctl_parseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected