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

Function sp_stdout_file_equals

tests/test_subprocess.c:1866–1884  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1864}
1865
1866static bool sp_stdout_file_equals(const char *path, const void *bytes, size_t count) {
1867 FILE *file = cbm_fopen(path, "rb");
1868 if (!file)
1869 return false;
1870 const unsigned char *expected = bytes;
1871 bool equal = true;
1872 for (size_t i = 0; i < count; i++) {
1873 int byte = fgetc(file);
1874 if (byte == EOF || (unsigned char)byte != expected[i]) {
1875 equal = false;
1876 break;
1877 }
1878 }
1879 if (equal)
1880 equal = fgetc(file) == EOF && !ferror(file);
1881 if (fclose(file) != 0)
1882 equal = false;
1883 return equal;
1884}
1885
1886typedef struct {
1887 char lines[4][64];

Callers 3

test_subprocess.cFile · 0.85
sp_stdin_check_rejectionFunction · 0.85
sp_stdin_probeFunction · 0.85

Calls 1

cbm_fopenFunction · 0.85

Tested by

no test coverage detected