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

Function ha_read_stdin

src/cli/hook_augment.c:73–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71/* ── stdin ────────────────────────────────────────────────────────── */
72
73static char *ha_read_stdin(void) {
74 char *buf = malloc(HA_STDIN_CAP + 1);
75 if (!buf) {
76 return NULL;
77 }
78 size_t total = 0;
79 size_t n;
80 while (total < HA_STDIN_CAP && (n = fread(buf + total, 1, HA_STDIN_CAP - total, stdin)) > 0) {
81 total += n;
82 }
83 buf[total] = '\0';
84 return buf;
85}
86
87/* ── pattern → token ──────────────────────────────────────────────
88 * Extract the longest identifier-like run ([A-Za-z_][A-Za-z0-9_]*) of at

Callers 1

cbm_cmd_hook_augmentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected