From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 17 14:47:19 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6C71716A4D1 for ; Sun, 17 Oct 2004 14:47:19 +0000 (GMT) Received: from gandalf.online.bg (gandalf.online.bg [217.75.128.9]) by mx1.FreeBSD.org (Postfix) with SMTP id 785D543D1D for ; Sun, 17 Oct 2004 14:47:18 +0000 (GMT) (envelope-from roam@ringlet.net) Received: (qmail 16684 invoked from network); 17 Oct 2004 14:47:13 -0000 Received: from unknown (HELO straylight.m.ringlet.net) (217.75.135.134) by gandalf.online.bg with SMTP; 17 Oct 2004 14:47:13 -0000 Received: (qmail 18811 invoked by uid 1000); 17 Oct 2004 14:47:29 -0000 Date: Sun, 17 Oct 2004 17:47:29 +0300 From: Peter Pentchev To: Xin LI , freebsd-hackers@FreeBSD.org Message-ID: <20041017144729.GC4639@straylight.m.ringlet.net> Mail-Followup-To: Xin LI , freebsd-hackers@FreeBSD.org References: <20041016172302.GA2764@frontfree.net> <20041017144353.GA4639@straylight.m.ringlet.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="S1BNGpv0yoYahz37" Content-Disposition: inline In-Reply-To: <20041017144353.GA4639@straylight.m.ringlet.net> User-Agent: Mutt/1.5.6i Subject: Re: [PATCH] add '-' glibc extension to strftime(3) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Oct 2004 14:47:19 -0000 --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--