[hackers] [PATCH][sbase] cal: Fix grid alignment for years < 1000

From: Richard Ipsum <richardipsum_AT_fastmail.co.uk>
Date: Mon, 22 Apr 2019 23:35:08 +0100

---
 cal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cal.c b/cal.c
index b403d00..bf4f537 100644
--- a/cal.c
+++ b/cal.c
_AT_@ -109,7 +109,7 @@ drawcal(size_t year, int month, size_t ncols, size_t nmons, int fday)
 				cur_month -= 12;
 				cur_year += 1;
 			}
-			printf("   %s %zu    ", smon[cur_month], cur_year);
+			printf("   %s %-4zu    ", smon[cur_month], cur_year);
 			printf("  ");
 		}
 		putchar('\n');
-- 
2.19.1
Received on Tue Apr 23 2019 - 00:35:08 CEST

This archive was generated by hypermail 2.3.0 : Tue Apr 23 2019 - 00:36:26 CEST