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

Function gc_qual_dir

src/pipeline/pass_operator.c:1162–1172  ·  view source on GitHub ↗

The repository directory a file binds package qualifier `qual` to. */

Source from the content-addressed store, hash-verified

1160
1161/* The repository directory a file binds package qualifier `qual` to. */
1162static bool gc_qual_dir(const gc_t *g, const char *text, const char *qual, size_t ql, char *out,
1163 size_t out_sz) {
1164 char alias[OP_IDENT_MAX];
1165 char import[CBM_SZ_1K];
1166 if (ql == 0 || ql >= sizeof(alias)) {
1167 return false;
1168 }
1169 snprintf(alias, sizeof(alias), "%.*s", (int)ql, qual);
1170 op_import_path(text, alias, import, sizeof(import));
1171 return import[0] && op_import_dir(g->mods, import, out, out_sz);
1172}
1173
1174static bool gc_qual_is(const char *text, const char *qual, size_t ql, const char *path) {
1175 char alias[OP_IDENT_MAX];

Callers 2

gc_evalFunction · 0.85
gc_callsFunction · 0.85

Calls 2

op_import_pathFunction · 0.85
op_import_dirFunction · 0.85

Tested by

no test coverage detected