Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: printf

Peter Stephenson wrote:
> Ideally, you should fcvt(), gcvt() and ecvt(), which handle locales as well
> as hiding the details of the conversion.  They are almost certainly widely
> enough available to make it worth getting configure to detect them.
> Unfortunately, you still need a fallback --- maybe the current set of
> fudges using printf(3) is enough for that.

They don't seem to offer anything which sprintf(3) doesn't already so I
couldn't add the extra features with these. The man page on Linux says
that they are obsolete even.

Also, I don't think we should be handling locales unless asked to with a
flag because it is common for programs to need input which isn't in a
local format.

I could update convfloat() etc to just use sprintf() more easily and
with just as good results. With that, I could support -s and -z but not
the other extras which is why I thought about doing the conversion
entirely manually.


This message has been checked for all known viruses by the 
MessageLabs Virus Scanning Service. For further information visit

Messages sorted by: Reverse Date, Date, Thread, Author