MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / fxNewResult

Function fxNewResult

xs/tools/xst262.c:607–640  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

605}
606
607txResult* fxNewResult(char* path, char* message)
608{
609 int pathLength = mxStringLength(path);
610 txResult* result = NULL;
611 if (message) {
612 int messageLength = mxStringLength(message);
613 result = c_malloc(sizeof(txResult) + pathLength + 1 + messageLength);
614 if (!result) {
615 c_exit(1);
616 }
617 result->next = NULL;
618 result->parent = NULL;
619 result->first = NULL;
620 result->file.flag = -1;
621 result->file.count = 0;
622 result->file.offset = pathLength + 1;
623 c_memcpy(result->path, path, pathLength + 1);
624 c_memcpy(result->path + pathLength + 1, message, messageLength + 1);
625 }
626 else {
627 result = c_malloc(sizeof(txResult) + pathLength);
628 if (!result) {
629 c_exit(1);
630 }
631 result->next = NULL;
632 result->parent = NULL;
633 result->first = NULL;
634 result->folder.testCount = 0;
635 result->folder.successCount = 0;
636 result->folder.pendingCount = 0;
637 c_memcpy(result->path, path, pathLength + 1);
638 }
639 return result;
640}
641
642void fxPopResult(txPool* pool)
643{

Callers 3

fxCountResultFunction · 0.85
fxPushResultFunction · 0.85
fxReadResultFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected