Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Apr 2009 15:29:01 +0200
From:      Roman Divacky <rdivacky@FreeBSD.ORG>
To:        Robert Watson <rwatson@FreeBSD.ORG>, src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG
Subject:   Re: svn commit: r191330 - head/usr.bin/ncal
Message-ID:  <20090422132901.GA1599@freebsd.org>
In-Reply-To: <20090422124757.GA23877@zim.MIT.EDU>
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> <20090422124757.GA23877@zim.MIT.EDU>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Apr 22, 2009 at 08:47:58AM -0400, David Schultz wrote:
> 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.

yes, as I said. it should be completely rewritten. is there anyone
interested in rewriting it? I certainly am not...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090422132901.GA1599>