[PATCH] add '-' glibc extension to strftime(3)
Xin LI
delphij at frontfree.net
Sun Oct 17 08:21:46 PDT 2004
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) implementation
> > is somewhat popular in several applications. The patch in the last part of
> > this e-mail will add a simulate implementation for it.
>
[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.
>
> 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 = _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?
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,
--
Xin LI <delphij frontfree net> http://www.delphij.net/
See complete headers for GPG key and other information.
-------------- 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/8c56a039/attachment.bin
More information about the freebsd-hackers
mailing list