Actually return NULL from wunctrl() when appropriate, and stop claiming

that unctrl() does so.
This commit is contained in:
William McBrine
2019-07-01 17:57:19 -04:00
parent f4c2058bdd
commit aa47fd9a02

View File

@@ -28,7 +28,7 @@ util
unctrl() expands the text portion of the chtype c into a printable
string. Control characters are changed to the "^X" notation; others
are passed through. wunctrl() is the wide- character version of the
are passed through. wunctrl() is the wide-character version of the
function.
filter() and use_env() are no-ops in PDCurses.
@@ -53,8 +53,7 @@ util
### Return Value
unctrl() and wunctrl() return NULL on failure. delay_output() always
returns OK.
wunctrl() returns NULL on failure. delay_output() always returns OK.
getcchar() returns the number of wide characters wcval points to when
wch is NULL; when it's not, getcchar() returns OK or ERR.
@@ -167,6 +166,9 @@ wchar_t *wunctrl(cchar_t *wc)
PDC_LOG(("wunctrl() - called\n"));
if (!wc)
return NULL;
ic = *wc & A_CHARTEXT;
if (ic >= 0x20 && ic != 0x7f) /* normal characters */