| 119 | } |
| 120 | |
| 121 | static unsigned tc_line_at(const char *source, uint32_t offset) { |
| 122 | size_t length = strlen(source); |
| 123 | if (offset >= length) return 0; |
| 124 | unsigned line = 1; |
| 125 | for (uint32_t i = 0; i < offset; i++) if (source[i] == '\n') line++; |
| 126 | return line; |
| 127 | } |
| 128 | |
| 129 | static bool tc_body_owner(const CBMFileResult *result, const char *source, |
| 130 | const char *name, unsigned line) { |