Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Oct 2004 17:47:29 +0300
From:      Peter Pentchev <roam@ringlet.net>
To:        Xin LI <delphij@frontfree.net>, freebsd-hackers@FreeBSD.org
Subject:   Re: [PATCH] add '-' glibc extension to strftime(3)
Message-ID:  <20041017144729.GC4639@straylight.m.ringlet.net>
In-Reply-To: <20041017144353.GA4639@straylight.m.ringlet.net>
References:  <20041016172302.GA2764@frontfree.net> <20041017144353.GA4639@straylight.m.ringlet.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--S1BNGpv0yoYahz37
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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,
> >=20
> > It turns out that the GNU extension '-' in their strftime(3) implementa=
tion
> > is somewhat popular in several applications.  The patch in the last par=
t of
> > this e-mail will add a simulate implementation for it.
>=20
> Thanks for taking this up!  Just a couple of comments further down...
[snip]
> > +				pt =3D _conv(t->tm_mday, (Palternative =3D=3D PAD_LESS) ?
> > +					"%d" : "%2d",
>=20
> 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 =3D _conv(t->tm_mday, fmt_mday[Palternative], ...);

G'luck,
Peter

--=20
Peter Pentchev	roam@ringlet.net    roam@cnsys.bg    roam@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.

--S1BNGpv0yoYahz37
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (FreeBSD)

iD8DBQFBcoYB7Ri2jRYZRVMRAg02AJ0Zjt/xZ9OeJM+oWhoQHivHnwf6LQCeNRKX
JIZlYDu+XaJHSO/BdJGYlhY=
=TrNR
-----END PGP SIGNATURE-----

--S1BNGpv0yoYahz37--



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