commit aae808fe5b9a3922ac441a29ca7544dcf702efd4
Author:     Richard Ipsum <[email protected]>
AuthorDate: Mon Apr 22 23:35:08 2019 +0100
Commit:     Michael Forney <[email protected]>
CommitDate: Mon Apr 22 19:08:17 2019 -0700

    cal: Fix grid alignment for years < 1000

diff --git a/cal.c b/cal.c
index b403d00..bf4f537 100644
--- a/cal.c
+++ b/cal.c
@@ -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');

Reply via email to