[Gambas-user] NCURSES ACS_STERLING revisited

Tobias Boege taboege at gmail.com
Mon Jun 24 19:42:15 CEST 2019


On Mon, 24 Jun 2019, KKing wrote:
> next I found the initscr() in main.c (within gb.ncurses) so I added the
> #include <locale.h> and the setlocale(LC_ALL, "") before the initscr()
> I did a make clean and then a make of all of Gambas but no change in what I
> get.
> 

The Gambas interpreter already initialises the locale before gb.ncurses
gets to set itself up.

> re the  -lncursesw
> I can see in the gambas build essential ncurses but no ncursesw, also I
> could not find any reference to -lncurses in gambas make, where I could
> change it to -lncursesw ?
> 

Apparently there is only ncursesw on Arch Linux, which is why my
gb.ncurses has always been linked against ncursesw -- maybe that's
why it worked for me and it's not an environment issue.

This patch should force the wide character libraries to be used:

diff --git a/gb.ncurses/configure.ac b/gb.ncurses/configure.ac
index f09e5e487..47fdac5a8 100644
--- a/gb.ncurses/configure.ac
+++ b/gb.ncurses/configure.ac
@@ -9,7 +9,7 @@ AC_PROG_LIBTOOL
 
 GB_COMPONENT_PKG_CONFIG(
   ncurses, NCURSES, gb.ncurses, [src],
-  ncurses panel)
+  ncursesw panelw)
 
 AC_OUTPUT( \
 Makefile \

But I will stress again that gb.ncurses does not support wide characters.
You can link it against ncursesw, because that happens to be API-compatible,
and see what it does, but as long as nobody takes the time to properly fix
gb.ncurses, this only gets you so far. Maybe you can print the pound sign,
but its length as a string, for example, will be calculated incorrectly.

> also is it possible to just rebuild the gb.ncurses component(s), rather than
> the whole gambas?
> 

Of course (by running `make` and `make install` inside the gb.ncurses
directory), but only if your current installation of Gambas was built
from the same source tree as well. If you change configure.ac, you have
to reconfigure gb.ncurses before (but again: not your whole Gambas).

Regards,
Tobi

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk


More information about the User mailing list