MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / doExtract

Function doExtract

tools/brother120tool.cc:458–480  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

456}
457
458static void doExtract(int argc, const char* argv[])
459{
460 if (argc < 2)
461 syntax();
462
463 file.open(argv[1], std::ios::in | std::ios::binary);
464 if (!file.is_open())
465 error("cannot open input file '{}'", argv[1]);
466
467 readDirectory();
468 readAllocationTable();
469 checkConsistency();
470
471 if (argc == 2)
472 listDirectory();
473 else
474 {
475 for (int i = 2; i < argc; i++)
476 extractFile(argv[i]);
477 }
478
479 file.close();
480}
481
482int main(int argc, const char* argv[])
483{

Callers 1

mainFunction · 0.85

Calls 9

errorFunction · 0.85
readDirectoryFunction · 0.85
readAllocationTableFunction · 0.85
checkConsistencyFunction · 0.85
listDirectoryFunction · 0.85
extractFileFunction · 0.85
openMethod · 0.80
syntaxFunction · 0.70
closeMethod · 0.45

Tested by

no test coverage detected