| 2112 | static const char sp_stdin_log_sentinel[] = "log-sentinel"; |
| 2113 | |
| 2114 | static 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 | |
| 2127 | static bool sp_stdin_write(const char *path, const void *bytes, size_t count) { |
| 2128 | FILE *file = cbm_fopen(path, "wb"); |