9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] strangely typed functions in standard library
@ 2006-05-18  3:06 erik quanstrom
  2006-05-18  9:21 ` Bruce Ellis
  0 siblings, 1 reply; 11+ messages in thread
From: erik quanstrom @ 2006-05-18  3:06 UTC (permalink / raw)
  To: 9fans

while this is true, i believe that the real reason for this is that
on a >=32-bit machine, an ushort can just be declared
to be a long by the compiler whereas the compiler must emit 
instructions to convert a long to an unsigned short.

- erik

On Tue May 16 10:10:37 CDT 2006, 0xef967c36@gmail.com wrote:
> On 5/16/06, Matt Stewart <rotaerk1@gmail.com> wrote:
> > The following functions are described as accepting a Rune, but instead
> > the parameters are of type long.  Why?
> >
> > int runelen(long);
> > char *utfrune(char *, long);
> > char *utfrrune(char *, long);
> 
> full unicode is 32 bit, even if plan9 (afaik)
> supports only characters in the BMP.


^ permalink raw reply	[flat|nested] 11+ messages in thread
* [9fans] strangely typed functions in standard library
@ 2006-05-16  3:03 Matt Stewart
  2006-05-16 11:40 ` Martin Neubauer
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Matt Stewart @ 2006-05-16  3:03 UTC (permalink / raw)
  To: 9fans

The following functions are described as accepting a Rune, but instead
the parameters are of type long.  Why?

int runelen(long);
char *utfrune(char *, long);
char *utfrrune(char *, long);


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

end of thread, other threads:[~2006-05-19 22:49 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-18  3:06 [9fans] strangely typed functions in standard library erik quanstrom
2006-05-18  9:21 ` Bruce Ellis
2006-05-19  4:43   ` quanstro
2006-05-19  5:03     ` geoff
2006-05-19 12:43   ` Joel Salomon
2006-05-19 13:03     ` Victor Nazarov
  -- strict thread matches above, loose matches on Subject: below --
2006-05-16  3:03 Matt Stewart
2006-05-16 11:40 ` Martin Neubauer
2006-05-16 15:09 ` R
2006-05-19 22:49 ` Lluís Batlle i Rossell
2006-05-19 22:43   ` quanstro

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).