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

Function discover_lang_of

tests/test_discover.c:2116–2123  ·  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

2114/* Language detected for a discovered file by relative path, or CBM_LANG_COUNT
2115 * if the file was not indexed. */
2116static CBMLanguage discover_lang_of(const cbm_file_info_t *files, int count, const char *rel) {
2117 for (int i = 0; i < count; i++) {
2118 if (strcmp(files[i].rel_path, rel) == 0) {
2119 return files[i].language;
2120 }
2121 }
2122 return CBM_LANG_COUNT;
2123}
2124
2125/* Write raw bytes (may contain embedded NUL) to base/rel. Parent must exist. */
2126static 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