[Top][All Lists]

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

Re: ncursesw and forms library return empty form_buffer on Solaris

From: Thomas Dickey
Subject: Re: ncursesw and forms library return empty form_buffer on Solaris
Date: Mon, 12 Nov 2007 18:30:27 -0500 (EST)

On Mon, 12 Nov 2007, Alfred Fung wrote:

We are compiling ncurses with wide-character support and the forms library on 
Linux, HP, AIX, and Solaris.  All the platforms are working except for Solaris.

We find that we get empty field values from the form.  This can also be 
reproduced using the included forms_demo program.
Next we tried compiling on Solaris without wide-character support and it works. 
 This is happening in both ncurses 5.5 and 5.6.

Help in resolving this issue would be much appreciated.

Perhaps it's the workaround for a relatively old version of Solaris
(which distributed a non-working version of one of the support
functions).  In ncurses/widechar/lib_get_wch.c, there's this

#define reset_mbytes(state) mblen(NULL, 0), mbtowc(NULL, NULL, 0)
#define count_mbytes(buffer,length,state) mblen(buffer,length)
#define check_mbytes(wch,buffer,length,state) \
        (int) mbtowc(&wch, buffer, length)
#define state_unused
#define reset_mbytes(state) init_mb(state)
#define count_mbytes(buffer,length,state) mbrlen(buffer,length,&state)
#define check_mbytes(wch,buffer,length,state) \
        (int) mbrtowc(&wch, buffer, length, &state)
make an error

One branch of the ifdef was added to work around the Solaris bug.
The other branch might work by now, depending on what release of
Solaris you have (did not see it mentioned).

Thomas E. Dickey

reply via email to

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