From 796e384cae90e5ef5e14ba9aed907a5aaed1999d Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Thu, 18 May 2023 11:28:57 -0400 Subject: bar: Use USHRT_WIDTH --- src/bar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/bar.c') diff --git a/src/bar.c b/src/bar.c index bd5d381..d2c663c 100644 --- a/src/bar.c +++ b/src/bar.c @@ -3,11 +3,11 @@ #include "bar.h" #include "bfstd.h" +#include "bit.h" #include "config.h" #include "dstring.h" #include #include -#include #include #include #include @@ -49,7 +49,7 @@ static int ass_puts(int fd, const char *str) { } /** Number of decimal digits needed for terminal sizes. */ -#define ITOA_DIGITS ((sizeof(unsigned short) * CHAR_BIT + 2) / 3) +#define ITOA_DIGITS ((USHRT_WIDTH + 2) / 3) /** Async Signal Safe itoa(). */ static char *ass_itoa(char *str, unsigned int n) { -- cgit v1.2.3