[Top][All Lists]

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

Converting cchar_t to wchar_t

From: Bryan Christ
Subject: Converting cchar_t to wchar_t
Date: Fri, 14 Jun 2019 11:32:06 -0500

This code works in Linux and FreeBSD but I suspect is not working on Mac OS because of how NCURSES_WACS() may be implemented on Mac OS.

memcpy(&vcell->uch, NCURSES_WACS(c), sizeof(cchar_t));

In this example, 'c' is a char found in this ACS list:

vt100_acs[] = "`afgjklmnopqrstuvwxyz{|}~,+-.";

and vcell->uch is

wchar_t    uch[2];

If there's a portable, more reliable way of doing it?  If so, please share.


reply via email to

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