[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: |
Tue, 17 Jun 2008 15:14:26 +0100 |
User-agent: |
KMail/1.9.9 |
Hi Thomas,
Thanks for the reply.
On Tuesday 17 June 2008 14:57:01 Thomas Dickey wrote:
> The resolution was basically saying that the form library gets
> compiled to support wide-character mode, and that _it_ knows only
> about byte-at-a-time adds via addch, but that (with the limitation of
> not moving the cursor in the middle of the operation), should work.
Hmmm....in that case I wonder if it might be a problem with the Debian
library. I'll look at compiling/installing a local version from the
gnu.org sources and see if that helps.
> > I realise that you're just implementing The Open Group's spec here
> > and aren't responsible for the API design, so I hope I'm not
> > insulting you when I say that it looks to me like whoever designed
> > it was on some serious WTF-inducing crack.
>
> Actually Open Group hasn't done anything for form/menu/panel
> libraries. Those are from SVr4 "as is", and haven't been touched by
> any more recent standard.
Ah, I was accusing the wrong group of people for WTFery. My apologies to
TOG. :)
> > For instance, I want Ctrl+H and KEY_BACKSPACE to do exactly the
> > same thing,
>
> Well...(this is Open Group ;-) KEY_xxx values aren't really
> characters.
>
> What I did in dialog was to fold the Ctrl+H, etc., into KEY_xxx
> values, (actually mapping to dialog's own equivalents) remembering
> when there's a KEY_xxx value. That gets it down to a single case
> statement - not for the form library, but for a similar goal.
Ah.....so a kind of
if (i == OK) switch (ch) {
case '0x08':
i = KEY_CODE_YES;
ch = KEY_BACKSPACE;
break;
case '\r':
case '\n':
i = KEY_CODE_YES;
ch = KEY_ENTER;
break;
case 'x' /* Do normal character processing */
...
}
if (i == KEY_CODE_YES) switch (ch) {
case KEY_BACKSPACE:
/* Backspace processing */
break;
case KEY_ENTER:
/* Enter processing */
break;
case KEY_FOO: /* Do other key processing */
...
break;
}
Yeah, that makes sense. Ta.
Adam
--
Adam Spragg mailto:address@hidden
Developer
SMS Card http://www.smscard.com/
It reverses the logical flow of conversation!
> Why?
> > No.
> > > Should I top post?
http://www.google.com/search?q=%22top+posting%22
- wide characters, get_wch() and form_driver() - cannot get them working together., Adam Spragg, 2008/06/17
- Re: wide characters, get_wch() and form_driver() - cannot get them working together., Thomas Dickey, 2008/06/17
- Re: wide characters, get_wch() and form_driver() - cannot get them working together.,
Adam Spragg <=
- Re: wide characters, get_wch() and form_driver() - cannot get them working together., Adam Spragg, 2008/06/19
- Re: wide characters, get_wch() and form_driver() - cannot get them working together., Thomas Dickey, 2008/06/18
- Re: wide characters, get_wch() and form_driver() - cannot get them working together., Thomas Dickey, 2008/06/18
- Re: wide characters, get_wch() and form_driver() - cannot get them working together., Adam Spragg, 2008/06/19
- Re: wide characters, get_wch() and form_driver() - cannot get them working together., Thomas Dickey, 2008/06/19
- Re: wide characters, get_wch() and form_driver() - cannot get them working together., Adam Spragg, 2008/06/19