Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Oct 2004 23:21:30 +0800
From:      Xin LI <delphij@frontfree.net>
To:        Peter Pentchev <roam@ringlet.net>
Cc:        freebsd-hackers@FreeBSD.org
Subject:   Re: [PATCH] add '-' glibc extension to strftime(3)
Message-ID:  <20041017152130.GA2927@frontfree.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

--lrZ03NoBR/3+SXJZ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi, Peter,

On Sun, Oct 17, 2004 at 05:43:53PM +0300, Peter Pentchev wrote:
> > 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
[snip]
> > @@ -216,6 +216,8 @@
> >  is replaced by national representation of the date and time
> >  (the format is similar to that produced by
> >  .Xr date 1 ) .
> > +.It Cm %-*
> > +GLIBC extensions.  Do not do padding when making output.
>=20
> In mdoc manual pages, it is customary to start new sentences on a new
> line, avoiding the so-called "hard sentence break" of two spaces :)

Hmm...  So I really need to read more mdoc(7) :-)  Thanks!

> > +				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?

Yes for sure.  I will make these changes ASAP.

I'm looking for a piece of code example in our library because
I seemed to need multiple dimensional array, and I wanted to keep the code
more readable (and easier to extend).

Cheers,
--=20
Xin LI <delphij frontfree net>	http://www.delphij.net/
See complete headers for GPG key and other information.


--lrZ03NoBR/3+SXJZ
Content-Type: application/pgp-signature
Content-Disposition: inline

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

iD8DBQFBco36/cVsHxFZiIoRAmqYAKCAcmMLSy1x/LYrDXjlH8bSW6mzPwCfT0kE
MEJp+x82ctm60AXdwvgAqJ4=
=9Cmy
-----END PGP SIGNATURE-----

--lrZ03NoBR/3+SXJZ--



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