Make today's date bold in -c mode.

This commit is contained in:
Dianne Skoll
2022-09-16 21:01:10 -04:00
parent 58dea8f69b
commit c646bfc63f

View File

@@ -918,10 +918,14 @@ static void DoCalendarOneWeek(int nleft)
snprintf(buf, sizeof(buf), "%d %s ", d, get_month_abbrev(mon)); snprintf(buf, sizeof(buf), "%d %s ", d, get_month_abbrev(mon));
} }
} }
if (OrigJul+i == RealToday) if (OrigJul+i == RealToday) {
PrintLeft(buf, ColSpaces, '*'); printf("\x1B[1m"); /* Bold */
else PrintLeft(buf, ColSpaces-1, '*');
printf("\x1B[0m"); /* Normal */
putchar(' ');
} else {
PrintLeft(buf, ColSpaces, ' '); PrintLeft(buf, ColSpaces, ' ');
}
gon(); gon();
DRAW(tb); DRAW(tb);
goff(); goff();
@@ -1133,7 +1137,9 @@ static int WriteCalendarRow(void)
} }
} }
if (Julian(y, m, d+i-wd) == RealToday) { if (Julian(y, m, d+i-wd) == RealToday) {
printf("\x1B[1m"); /* Bold */
PrintLeft(buf, ColSpaces-1, '*'); PrintLeft(buf, ColSpaces-1, '*');
printf("\x1B[0m"); /* Normal */
putchar(' '); putchar(' ');
} else { } else {
PrintLeft(buf, ColSpaces, ' '); PrintLeft(buf, ColSpaces, ' ');