[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: wide characters, get_wch() and form_driver() - cannot get them worki

From: Adam Spragg
Subject: Re: wide characters, get_wch() and form_driver() - cannot get them working together.
Date: Thu, 19 Jun 2008 18:31:30 +0100
User-agent: KMail/1.9.9

On Thursday 19 June 2008 17:13:54 Thomas Dickey wrote:
> On Thu, 19 Jun 2008, Adam Spragg wrote:
> > I can't see anything about needing to cast the "i" parameter of
> > form_driver() to "unsigned char" in any of the guides, the FAQ, the
> The prototype for form_driver() says it expects an int.

Yeah, but -63 *is* an int.

> That's because it would normally hold values from 0 on up (and
> possibly a -1 for illegal keycode).  So it's not expecting a -63 (a
> sign-extended character).  Passing an unsigned char works though.

As far as I can tell, it's not documented that form_driver() expects 
values from 0 up, or that -1 means "illegal keycode". In fact, that's 
probably the kind of implementation detail you specifically *don't* 
want to document. But what I was trying to say[0] was that if there is 
a requirement to cast non-ASCII characters to an "unsigned char" before 
passing them as an int to form_driver(), then I think it might help if 
that were mentioned somewhere.


[0] OK, I said it badly the first time around. Rereading it, I can see 
that. I'm sure it seemed clear when I wrote it though :-/

Adam Spragg                      mailto:address@hidden
Octal Telecom                           http://www.octaltelecom.co.uk/

It reverses the logical flow of conversation!
> Why?
> > No.
> > > Should I top post?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]