[PATCH] add '-' glibc extension to strftime(3)

Peter Pentchev roam at ringlet.net
Sun Oct 17 07:47:19 PDT 2004


On Sun, Oct 17, 2004 at 05:43:53PM +0300, Peter Pentchev wrote:
> On Sun, Oct 17, 2004 at 01:23:02AM +0800, Xin LI wrote:
> > Hi, folks,
> > 
> > It turns out that the GNU extension '-' in their strftime(3) implementation
> > is somewhat popular in several applications.  The patch in the last part of
> > this e-mail will add a simulate implementation for it.
> 
> Thanks for taking this up!  Just a couple of comments further down...
[snip]
> > +				pt = _conv(t->tm_mday, (Palternative == PAD_LESS) ?
> > +					"%d" : "%2d",
> 
> In view of future extensions (PAD_SPACE, etc), could this not be done
> better with an array of printf format specifiers, indexed by
> Palternative?

Just in case this was a bit unclear, I mean something like

  pt = _conv(t->tm_mday, fmt_mday[Palternative], ...);

G'luck,
Peter

-- 
Peter Pentchev	roam at ringlet.net    roam at cnsys.bg    roam at FreeBSD.org
PGP key:	http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint	FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
I am the meaning of this sentence.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20041017/bd644a02/attachment.bin


More information about the freebsd-hackers mailing list