X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin%2Fblame.c;h=f028e8aec82d0936951418f936123041c3b516ad;hb=ec7ff5ba272b565ed093a98dc13dd5cd26aeac92;hp=5a67c202f06abeaa90a7547d78b536f7f2b9db24;hpb=e8f6b51a6bcc904b8a5fed831f718c3f9ed7ef34;p=git.git diff --git a/builtin/blame.c b/builtin/blame.c index 5a67c202f..f028e8aec 100644 --- a/builtin/blame.c +++ b/builtin/blame.c @@ -1828,18 +1828,6 @@ static int read_ancestry(const char *graft_file) return 0; } -/* - * How many columns do we need to show line numbers in decimal? - */ -static int lineno_width(int lines) -{ - int i, width; - - for (width = 1, i = 10; i <= lines; width++) - i *= 10; - return width; -} - /* * How many columns do we need to show line numbers, authors, * and filenames? @@ -1880,9 +1868,9 @@ static void find_alignment(struct scoreboard *sb, int *option) if (largest_score < ent_score(sb, e)) largest_score = ent_score(sb, e); } - max_orig_digits = lineno_width(longest_src_lines); - max_digits = lineno_width(longest_dst_lines); - max_score_digits = lineno_width(largest_score); + max_orig_digits = decimal_width(longest_src_lines); + max_digits = decimal_width(longest_dst_lines); + max_score_digits = decimal_width(largest_score); } /*