| 103 | } |
| 104 | |
| 105 | static unsigned int gather_convert_stats(const char *data, unsigned long size) |
| 106 | { |
| 107 | struct text_stat stats; |
| 108 | int ret = 0; |
| 109 | if (!data || !size) |
| 110 | return 0; |
| 111 | gather_stats(data, size, &stats); |
| 112 | if (convert_is_binary(&stats)) |
| 113 | ret |= CONVERT_STAT_BITS_BIN; |
| 114 | if (stats.crlf) |
| 115 | ret |= CONVERT_STAT_BITS_TXT_CRLF; |
| 116 | if (stats.lonelf) |
| 117 | ret |= CONVERT_STAT_BITS_TXT_LF; |
| 118 | |
| 119 | return ret; |
| 120 | } |
| 121 | |
| 122 | static const char *gather_convert_stats_ascii(const char *data, unsigned long size) |
| 123 | { |
no test coverage detected