9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] u9fs and va_copy()
@ 2004-09-20  9:02 Aharon Robbins
  0 siblings, 0 replies; 3+ messages in thread
From: Aharon Robbins @ 2004-09-20  9:02 UTC (permalink / raw)
  To: 9fans

> I also have implementations of the
> POSIX %4$d stuff and %'d stuff, with plans for %'f.  Joy.

It's a trip, ain't it?  I did the %4$d stuff for gawk, which allows
i18n-ing an awk program.  T'was a pain.

The %'d stuff isn't terrible, and I'm lucky that I can punt to sprintf
for %'f and the other floating point formats.  (Quote, Let someone else
do the hard part, Unquote :-)

I have to wonder if the POSIX people got this stuff right.  The recent
versions of gawk follow the POSIX standard, which says that floating
point numbers *in the text of the awk program* always use `.' for the
radix point, but use the locale's radix point for *input and output data*.

Fine and good, but I have gotten complaints from people in non-C locales
wondering why their data is no longer interpreted by gawk the way it
used to be...

This whole area is one where you're damned if you do, and damned if you don't.

Whatever,

Arnold


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [9fans] u9fs and va_copy()
  2004-09-16 14:49 jmk
@ 2004-09-16 15:24 ` Rob Pike
  0 siblings, 0 replies; 3+ messages in thread
From: Rob Pike @ 2004-09-16 15:24 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Yes, you should do this. It's a royal pain, though.  The fmt library needs
a hell of a lot of work to be compliant. I've done it but I don't like the code
and plan to redo it sometime soon.  I also have implementations of the
POSIX %4$d stuff and %'d stuff, with plans for %'f.  Joy.

I'll ship it back when I'm done, but it will be a while; I have other fires at
the moment.

-rob


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [9fans] u9fs and va_copy()
@ 2004-09-16 14:49 jmk
  2004-09-16 15:24 ` Rob Pike
  0 siblings, 1 reply; 3+ messages in thread
From: jmk @ 2004-09-16 14:49 UTC (permalink / raw)
  To: 9fans

Eric Van Hensbergen <ericvh@gmail.com> has provided a fix for u9fs on the PowerPC.
The va_copy() macro is needed if the type of va_list is not an array (as it is on all
the current Plan 9 compilers I believe).

There may be other software ported between Plan 9 and other systems which could run
foul of the va_copy() macro. Should we add it to the Plan9 header files and check
all our code conforms to the correct use of variable arguments as specified in C99?

--jim


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-09-20  9:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-20  9:02 [9fans] u9fs and va_copy() Aharon Robbins
  -- strict thread matches above, loose matches on Subject: below --
2004-09-16 14:49 jmk
2004-09-16 15:24 ` Rob Pike

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).