| 270 | } |
| 271 | |
| 272 | int ws_blank_line(const char *line, int len) |
| 273 | { |
| 274 | /* |
| 275 | * We _might_ want to treat CR differently from other |
| 276 | * whitespace characters when ws_rule has WS_CR_AT_EOL, but |
| 277 | * for now we just use this stupid definition. |
| 278 | */ |
| 279 | while (len-- > 0) { |
| 280 | if (!isspace(*line)) |
| 281 | return 0; |
| 282 | line++; |
| 283 | } |
| 284 | return 1; |
| 285 | } |
| 286 | |
| 287 | /* Copy the line onto the end of the strbuf while fixing whitespaces */ |
| 288 | void ws_fix_copy(struct strbuf *dst, const char *src, int len, unsigned ws_rule, int *error_count) |
no outgoing calls
no test coverage detected