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

Function gic_long_make

tests/test_gitignore_checked.c:646–671  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

644} gic_long_input;
645
646static bool gic_long_make(gic_fixture *f, unsigned kind, gic_long_input *out) {
647 out->patterns = cbm_arena_alloc(&f->input, GIC_LONG + 3);
648 out->path = cbm_arena_alloc(&f->input, GIC_LONG + 1);
649 if (!out->patterns || !out->path)
650 return false;
651 memset(out->patterns, 'a', GIC_LONG + 3);
652 memset(out->path, 'a', GIC_LONG);
653 out->path[GIC_LONG] = 0;
654 out->pattern_length = GIC_LONG;
655 out->expected = CBM_IGNORE_IGNORED;
656 if (kind == 1) {
657 out->patterns[0] = '[';
658 out->patterns[GIC_LONG + 1] = ']';
659 out->pattern_length = GIC_LONG + 2;
660 out->path[1] = 0;
661 }
662 if (kind == 2) {
663 out->patterns[0] = 'x';
664 out->pattern_length = 1;
665 for (size_t i = 1; i < GIC_LONG; i += 2)
666 out->path[i] = '/';
667 out->expected = CBM_IGNORE_NO_OPINION;
668 }
669 out->patterns[out->pattern_length] = 0;
670 return true;
671}
672
673typedef struct {
674 size_t polls;

Callers 1

Calls 1

cbm_arena_allocFunction · 0.50

Tested by

no test coverage detected