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

Function bootstrap_record_field

src/daemon/bootstrap.c:360–367  ·  view source on GitHub ↗

One record field: the line format is tab-separated, so a tab or newline in * a value (a path, in theory) becomes '?' rather than a parser ambiguity. */

Source from the content-addressed store, hash-verified

358/* One record field: the line format is tab-separated, so a tab or newline in
359 * a value (a path, in theory) becomes '?' rather than a parser ambiguity. */
360static void bootstrap_record_field(char *out, size_t capacity, const char *value) {
361 size_t used = 0;
362 for (const char *cursor = value ? value : ""; *cursor && used + 1 < capacity; cursor++) {
363 unsigned char ch = (unsigned char)*cursor;
364 out[used++] = ch == '\t' || ch == '\n' || ch == '\r' ? '?' : (char)ch;
365 }
366 out[used] = '\0';
367}
368
369static uint64_t bootstrap_current_pid(void) {
370#ifdef _WIN32

Calls

no outgoing calls

Tested by

no test coverage detected