MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / parseArgs

Function parseArgs

Tools/ToolsBootstrap.c:818–841  ·  view source on GitHub ↗

parseArgs

Source from the content-addressed store, hash-verified

816 size_t toolLength = strlen(toolName);
817 char* stem = (char*)malloc(prefixLength + toolLength + 1);
818 if (!stem) return NULL;
819 memcpy(stem, "SC-", prefixLength);
820 memcpy(stem + prefixLength, toolName, toolLength);
821 stem[prefixLength + toolLength] = 0;
822 return stem;
823}
824
825char* buildToolsObjectPath(const CompilationInfo* ci) {
826 return Path_joinWithExtension(ci->intermediateDir, "Tools", objectExtension());
827}
828
829char* buildToolObjectPath(const CompilationInfo* ci) {
830 char* stem = buildToolStem(ci->args->toolName);
831 if (!stem) return NULL;
832 char* path = Path_joinWithExtension(ci->intermediateDir, stem, objectExtension());
833 free(stem);
834 return path;
835}
836
837char* buildToolsDependencyPath(const CompilationInfo* ci) {
838 return Path_joinWithExtension(ci->intermediateDir, "Tools", dependencyExtension(ci));
839}
840
841char* buildToolDependencyPath(const CompilationInfo* ci) {
842 char* stem = buildToolStem(ci->args->toolName);
843 if (!stem) return NULL;
844 char* path = Path_joinWithExtension(ci->intermediateDir, stem, dependencyExtension(ci));

Callers 1

mainFunction · 0.70

Calls 2

BootloaderArgs_initFunction · 0.85
String_duplicateFunction · 0.85

Tested by

no test coverage detected