[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: CTRL macro conflict on AIX 5.2 - wchar versions of form and menu fun
From: |
Jim Idle |
Subject: |
RE: CTRL macro conflict on AIX 5.2 - wchar versions of form and menu functions |
Date: |
Fri, 12 Mar 2004 09:44:04 -0800 |
-----Original Message-----
From: Thomas Dickey [mailto:address@hidden
>> My next question is whether there are currently any plans to add wchar
>> support to the menu and form/field processing code? I wondered if
>> there was any reason this had not been extended into forms and menus - other
>> than time?
>
>not time - I just didn't happen to think of it, since my focus has always
>been on the ncurses library itself.
>
>I've started working on this. Mike Aubury pointed it out, and the past
>few patches have been directed toward this. At this point I'm using the
>ncurses.c 'r' test, fixing the issues that prevent it from working (by
>pasting a wide-character from dialog's UTF-8 demo into an input field).
That's good to hear. I already hacked a version together for my own testing
purposes, but I really didn’t fancy playing with all the autoconf/configure
stuff.
Menu code takes about 10 minutes to do, but the form stuff is a bit more
intricate and took a bit longer; in the main, because it is using macros to
calculate offsets into the buffers and making assumptions about char *.
In case it's useful info for your efforts, the easiest way (at least as I saw
it) was to change to use UTF-32 for the internal forms buffers and reference
them as int (UINT32 strictly speaking I guess) rather than char. This way the
form code logic is fairly easy to deal with - converting between UTF-32 and
wchar representations is trivial and surrogate pairs go away as an issue for
calculating offsets into buffers etc. Other, probably obvious stuff is things
like using iswspace() to do word wraps and the other iswxxx functions where
appropriate etc.
I think it's perhaps a bit more tricky to decide whether the functions should
just change to accept different parameter types if enable-widec is used, or
whether there should be new function names that accept wchar arguments (which
seems somewhat cleaner and in keeping with the current xopen specs for curses I
guess). However, you probably already have ideas on that.
I would greatly prefer to use the mainline code, than my own hacked version of
menu and form, so I am glad to hear that you are dealing with it :-).
Obviously, I would be happy to offer any assistance that seemed useful but I
understand if you would prefer to just get on and do it yourself.
Thanks,
Jim
>There are some isolated things that I've seen which need attention - they're
>bugs, but not on the thread I'm following.
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.618 / Virus Database: 397 - Release Date: 3/9/2004
- RE: CTRL macro conflict on AIX 5.2 - wchar versions of form and menu functions,
Jim Idle <=