| 2837 | const char mime_boundary_leader[] = "------------"; |
| 2838 | |
| 2839 | static int scale_linear(int it, int width, int max_change) |
| 2840 | { |
| 2841 | if (!it) |
| 2842 | return 0; |
| 2843 | /* |
| 2844 | * make sure that at least one '-' or '+' is printed if |
| 2845 | * there is any change to this path. The easiest way is to |
| 2846 | * scale linearly as if the allotted width is one column shorter |
| 2847 | * than it is, and then add 1 to the result. |
| 2848 | */ |
| 2849 | return 1 + (it * (width - 1) / max_change); |
| 2850 | } |
| 2851 | |
| 2852 | static void show_graph(struct strbuf *out, char ch, int cnt, |
| 2853 | const char *set, const char *reset) |