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

Function discover_lang_of

tests/test_discover.c:1443–1450  ·  view source on GitHub ↗

Language detected for a discovered file by relative path, or CBM_LANG_COUNT * if the file was not indexed. */

Source from the content-addressed store, hash-verified

1441/* Language detected for a discovered file by relative path, or CBM_LANG_COUNT
1442 * if the file was not indexed. */
1443static CBMLanguage discover_lang_of(const cbm_file_info_t *files, int count, const char *rel) {
1444 for (int i = 0; i < count; i++) {
1445 if (strcmp(files[i].rel_path, rel) == 0) {
1446 return files[i].language;
1447 }
1448 }
1449 return CBM_LANG_COUNT;
1450}
1451
1452/* Write raw bytes (may contain embedded NUL) to base/rel. Parent must exist. */
1453static int write_bytes_file(const char *path, const void *data, size_t n) {

Callers 1

shebang_probeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected