From ec7ff5ba272b565ed093a98dc13dd5cd26aeac92 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Sun, 12 Feb 2012 15:16:20 +0100 Subject: make lineno_width() from blame reusable for others MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit builtin/blame.c has a helper function to compute how many columns we need to show a line-number, whose implementation is reusable as a more generic helper function to count the number of columns necessary to show any cardinal number. Rename it to decimal_width(), move it to pager.c and export it for use by future callers. Signed-off-by: Zbigniew Jędrzejewski-Szmek Signed-off-by: Junio C Hamano --- cache.h | 1 + 1 file changed, 1 insertion(+) (limited to 'cache.h') diff --git a/cache.h b/cache.h index 9bd8c2d06c..24732e6caf 100644 --- a/cache.h +++ b/cache.h @@ -1176,6 +1176,7 @@ extern void setup_pager(void); extern const char *pager_program; extern int pager_in_use(void); extern int pager_use_color; +extern int decimal_width(int); extern const char *editor_program; extern const char *askpass_program; -- cgit v1.3