svn commit: r191330 - head/usr.bin/ncal
David Schultz
das at FreeBSD.ORG
Wed Apr 22 12:44:37 UTC 2009
On Wed, Apr 22, 2009, Roman Divacky wrote:
>
> I like your idea about using strcat() things but it wont
> help here because the problem is with the overal design.
> in detail - the short patch highlights " XY" instead of
> just "XY" where some sort of hackery is needed... the pointer
> magic there is for exactly this purpose..
>
> I'll see if I can improve anything but I doubt that....
Aah, that explains the mysterious `+ 1' (which doesn't work for
single-digit dates, does it?) It's probably easier just to get
rid of the daystr / jdaystr hack and do something like
`sprintf(..., "%s%d%s", term_r, dt.d, term_e)'. The amount of
left padding needed before the term_r should be
`(jd_flag ? 4 : 3) - snprintf(NULL, 0, "%d", dt.d)'. It's not a
high priority in any case.
More information about the svn-src-head
mailing list