MCPcopy Create free account
hub / github.com/build-cpp/cmkr / main

Function main

src/main.cpp:8–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6#include <stdexcept>
7
8int main(int argc, char **argv) try {
9 auto output = cmkr::args::handle_args(argc, argv);
10 auto format = "[cmkr] %s\n";
11 if (strchr(output, '\n') != nullptr)
12 format = "%s\n";
13 (void)fprintf(stderr, format, output);
14 return EXIT_SUCCESS;
15} catch (const std::exception &e) {
16 auto format = "[cmkr] error: %s\n";
17 if (strchr(e.what(), '\n') != nullptr)
18 format = "%s\n";
19 (void)fprintf(stderr, format, e.what());
20 return EXIT_FAILURE;
21}

Callers

nothing calls this directly

Calls 1

handle_argsFunction · 0.85

Tested by

no test coverage detected