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. */
| 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. */ |
| 360 | static 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 | |
| 369 | static uint64_t bootstrap_current_pid(void) { |
| 370 | #ifdef _WIN32 |
no outgoing calls
no test coverage detected