Records were counted before copying. Keep empty TSV fields and trim only a * record-ending CR, as emitted by the Python builder on Windows. */
| 67 | /* Records were counted before copying. Keep empty TSV fields and trim only a |
| 68 | * record-ending CR, as emitted by the Python builder on Windows. */ |
| 69 | static char *cv_line(char **cursor) { |
| 70 | char *line = *cursor; |
| 71 | char *end = strchr(line, '\n'); |
| 72 | if (!end) { |
| 73 | return NULL; |
| 74 | } |
| 75 | *cursor = end + 1; |
| 76 | *end = '\0'; |
| 77 | if (end > line && end[-1] == '\r') { |
| 78 | end[-1] = '\0'; |
| 79 | } |
| 80 | return line; |
| 81 | } |
| 82 | |
| 83 | static bool cv_fields(char *line, char **fields, int count) { |
| 84 | if (!line) { |
no outgoing calls
no test coverage detected