I'm looking through the API documentation and not seeing an easy way to stuff the results of NCURSES_WACS(x) into a cchar_t and then modify the internals. Based on what I've read so far, the implementations of cchar_t varies greatly which means it's not wise to write code that access the struct members directly. The recommended way seems to be to use getcchar() and setcchar(). That being true, therein lies my question. As best I can tell, to store the results of NCURSES_WACS(x) for use later I would have to:
memcpy(&my_cchar, NCURSES_WACS(x), sizeof(my_cchar));
getcchar(&my_cchar, data, &attrs, &color_pair, NULL);
attrs = some_attry;
color_pair = some_color_pair;
setcchar(&my_cchar, data, attrs, color_pair, NULL);
Now, assuming I have all of that right, it seems pretty "heavy" just to achieve the desired result for a single cchar_t. Am I going about this all wrong?