* The same heuristics as diff.c::mmfile_is_binary() * We treat files with bare CR as binary */
| 92 | * We treat files with bare CR as binary |
| 93 | */ |
| 94 | static int convert_is_binary(const struct text_stat *stats) |
| 95 | { |
| 96 | if (stats->lonecr) |
| 97 | return 1; |
| 98 | if (stats->nul) |
| 99 | return 1; |
| 100 | if ((stats->printable >> 7) < stats->nonprintable) |
| 101 | return 1; |
| 102 | return 0; |
| 103 | } |
| 104 | |
| 105 | static unsigned int gather_convert_stats(const char *data, unsigned long size) |
| 106 | { |
no outgoing calls
no test coverage detected