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

Function spawn_head_len

internal/cbm/spawn_patterns.c:395–404  ·  view source on GitHub ↗

Length of the callee's head (before its first separator) and the * separator's offset, or 0 when the callee has none. */

Source from the content-addressed store, hash-verified

393/* Length of the callee's head (before its first separator) and the
394 * separator's offset, or 0 when the callee has none. */
395static size_t spawn_head_len(const char *callee) {
396 size_t best = 0;
397 for (int i = 0; spawn_separators[i]; i++) {
398 const char *at = strstr(callee, spawn_separators[i]);
399 if (at && at > callee && (best == 0 || (size_t)(at - callee) < best)) {
400 best = (size_t)(at - callee);
401 }
402 }
403 return best;
404}
405
406/* True when `val` names `name` as its last segment ("subprocess.run" for
407 * run, "java.lang.ProcessBuilder" for ProcessBuilder). */

Callers 1

spawn_expandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected