| 81 | } |
| 82 | |
| 83 | static bool cv_fields(char *line, char **fields, int count) { |
| 84 | if (!line) { |
| 85 | return false; |
| 86 | } |
| 87 | for (int i = 0; i < count; i++) { |
| 88 | fields[i] = line; |
| 89 | char *tab = strchr(line, '\t'); |
| 90 | if (i + 1 == count) { |
| 91 | return tab == NULL; |
| 92 | } |
| 93 | if (!tab) { |
| 94 | return false; |
| 95 | } |
| 96 | *tab = '\0'; |
| 97 | line = tab + 1; |
| 98 | } |
| 99 | return false; |
| 100 | } |
| 101 | |
| 102 | static bool cv_decimal(const char *text, int *value, const char **end) { |
| 103 | if (*text < '0' || *text > '9') { |
no outgoing calls
no test coverage detected