Date: Wed, 22 Apr 2009 08:47:58 -0400 From: David Schultz <das@FreeBSD.ORG> To: Roman Divacky <rdivacky@FreeBSD.ORG> Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG, Robert Watson <rwatson@FreeBSD.ORG> Subject: Re: svn commit: r191330 - head/usr.bin/ncal Message-ID: <20090422124757.GA23877@zim.MIT.EDU> In-Reply-To: <20090422071918.GA88935@freebsd.org> References: <200904201819.n3KIJcZo054306@svn.freebsd.org> <20090421185436.GA18628@zim.MIT.EDU> <20090421190651.GA2505@freebsd.org> <20090421194622.GA19215@zim.MIT.EDU> <alpine.BSF.2.00.0904212046360.67705@fledge.watson.org> <20090421202754.GA19417@zim.MIT.EDU> <20090421203106.GA13661@freebsd.org> <20090422060643.GA22109@zim.MIT.EDU> <20090422071918.GA88935@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090422124757.GA23877>