Re: ncurses or slang
- From: Thomas Dickey <dickey his com>
- To: Slava Zanko <slavazanko gmail com>
- Cc: mc devel <mc-devel gnome org>
- Subject: Re: ncurses or slang
- Date: Wed, 23 Sep 2009 18:41:49 -0400 (EDT)
On Thu, 24 Sep 2009, Slava Zanko wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
24.09.2009 00:37, Thomas Dickey wrote:
Thomas, hi. Glad to see you in this maillist.
Preferred to S-Lang (as default), but Ncurses fully supported too.
With NCurses we have some restrictions (like trouble with drawing of
double lines for boxes). S-Lang is a more powerfull library.
not really (just lack of developers for MC that happen to know both
libraries)
Well... Drawing double lines possible in NCurses via tty_print_string()
function (not via hline() vline() and etc). In this case we (side of mc)
must take care of user encoding, terminal type and used current font. If
we use hline or vline functions (like now) then this headache of NCurses.
Now Midnight Commander (from git) have initial support of skins.
Possible to change drawing of lines via skin-file. With Ncurses library
we used vline, hline and ACS_* constants, therefore double lines not
drawing, but lines look good with any codepage of user. With S-Lang
library we used anoter way (in opposite): draw lines directly via
SLsmg_write_char. As result: we have any UTF-8 lines but we have trouble
in one-byte codepages ('LANG=C mc' or 'LANG=POSIX mc' show this trouble
as well).
All that sounds just like you're using slang's equivalent of add_wch() or
addch(), which you can already do with ncurses. (Either way, the solution
depends on locale and terminal support ;-)
The one-byte codepages providing double-lines aren't available in POSIX
locale. ncurses has a use_legacy_coding() function to tell it that the
display can show characters which the locale says aren't printable (though
mixing that with a UTF-8 locale may not give good results).
--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]