MCPcopy Create free account
hub / github.com/apache/nuttx / dequote_path

Function dequote_path

tools/mkdeps.c:631–661  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

629
630#ifdef HOST_CYGWIN
631static bool dequote_path(const char *winpath)
632{
633 char *dest = g_dequoted;
634 const char *src = winpath;
635 int len = 0;
636 bool quoted = false;
637
638 while (*src && len < MAX_PATH)
639 {
640 if (*src != '\\' || (src[1] != ' ' && src[1] != '(' && src[1] != ')'))
641 {
642 *dest++ = *src;
643 len++;
644 }
645 else
646 {
647 quoted = true;
648 }
649
650 src++;
651 }
652
653 if (*src || len >= MAX_PATH)
654 {
655 fprintf(stderr, "# ERROR: Path truncated\n");
656 exit(EXIT_FAILURE);
657 }
658
659 *dest = '\0';
660 return quoted;
661}
662#endif
663
664static const char *convert_path(const char *path)

Callers 1

convert_pathFunction · 0.70

Calls 2

fprintfFunction · 0.85
exitFunction · 0.85

Tested by

no test coverage detected