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

Function hl_cut_name

tests/test_cli.c:16118–16122  ·  view source on GitHub ↗

The first HL_PATH_CAP - 1 bytes of " / ": the name the old * unchecked 1 KiB buffer cut that path down to. */

Source from the content-addressed store, hash-verified

16116/* The first HL_PATH_CAP - 1 bytes of "<base>/<suffix>": the name the old
16117 * unchecked 1 KiB buffer cut that path down to. */
16118static void hl_cut_name(char *out, const char *base, const char *suffix) {
16119 char full[2 * HL_PATH_CAP];
16120 snprintf(full, sizeof(full), "%s/%s", base, suffix);
16121 snprintf(out, HL_PATH_CAP, "%.*s", HL_PATH_CAP - 1, full);
16122}
16123
16124static bool hl_is_ancestor_or_self(const char *path, const char *of) {
16125 size_t n = strlen(path);

Callers 1

test_cli.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected