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

Function sp_stdin_payload

tests/test_subprocess.c:2114–2125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2112static const char sp_stdin_log_sentinel[] = "log-sentinel";
2113
2114static void sp_stdin_payload(unsigned char bytes[SP_STDIN_BYTES]) {
2115 for (int i = 0; i < SP_STDIN_BYTES; i++)
2116 bytes[i] = (unsigned char)(i % 256);
2117 bytes[0] = 'I';
2118 bytes[1] = 0;
2119 bytes[2] = '\r';
2120 bytes[3] = '\n';
2121 bytes[4] = '\n';
2122 bytes[5] = 0x1a; /* Windows text-mode EOF must not truncate the fixture. */
2123 bytes[1023] = 0;
2124 bytes[SP_STDIN_BYTES - 1] = 0x7f; /* No final LF. */
2125}
2126
2127static bool sp_stdin_write(const char *path, const void *bytes, size_t count) {
2128 FILE *file = cbm_fopen(path, "wb");

Callers 1

test_subprocess.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected