MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / tic_parse

Function tic_parse

src/mcp/test_impact_cli.c:30–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28} tic_option_t;
29
30static bool tic_parse(int argc, char **argv, const tic_option_t *options, size_t count) {
31 for (int i = 0; i < argc; i++) {
32 const tic_option_t *match = NULL;
33 for (size_t o = 0; o < count; o++) {
34 if (strcmp(argv[i], options[o].name) == 0) {
35 match = &options[o];
36 }
37 }
38 if (!match) {
39 (void)fprintf(stderr, "test-impact: unknown argument %s\n", argv[i]);
40 return false;
41 }
42 if (match->flag) {
43 *match->flag = true;
44 continue;
45 }
46 if (i + 1 >= argc) {
47 (void)fprintf(stderr, "test-impact: %s needs a value\n", argv[i]);
48 return false;
49 }
50 *match->value = argv[++i];
51 }
52 return true;
53}
54
55static int64_t tic_number(const char *text, int64_t fallback) {
56 if (!text || !*text) {

Callers 2

tic_publishFunction · 0.85
tic_selectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected