[hackers] [sbase] cal: Fix grid alignment for years < 1000 || Richard Ipsum

From: <git_AT_suckless.org>
Date: Tue, 23 Apr 2019 05:30:41 +0200 (CEST)

commit aae808fe5b9a3922ac441a29ca7544dcf702efd4
Author: Richard Ipsum <richardipsum_AT_fastmail.co.uk>
AuthorDate: Mon Apr 22 23:35:08 2019 +0100
Commit: Michael Forney <mforney_AT_mforney.org>
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
_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');
Received on Tue Apr 23 2019 - 05:30:41 CEST

This archive was generated by hypermail 2.3.0 : Tue Apr 23 2019 - 05:36:24 CEST