]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/widechar/lib_wunctrl.c
ncurses 5.4
[ncurses.git] / ncurses / widechar / lib_wunctrl.c
index f4887d125fcfa37dafcb9862aeaf9bd063f21e2f..89430e5681ac4d95270e865575bb34ebf54c6433 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 2001 Free Software Foundation, Inc.                        *
+ * Copyright (c) 2001,2003 Free Software Foundation, Inc.                   *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -37,7 +37,7 @@
 
 #if USE_WIDEC_SUPPORT
 
-MODULE_ID("$Id: lib_wunctrl.c,v 1.6 2001/09/22 19:18:02 tom Exp $")
+MODULE_ID("$Id: lib_wunctrl.c,v 1.7 2003/07/05 17:01:43 tom Exp $")
 
 NCURSES_EXPORT(wchar_t *)
 wunctrl(cchar_t * wc)
@@ -46,8 +46,8 @@ wunctrl(cchar_t * wc)
 
     if (Charable(*wc)) {
        const char *p;
-       for (p = unctrl(wctob(CharOf(*wc))), sp = str; *p;)
-           *sp++ = btowc(*p++);
+       for (p = unctrl(_nc_to_char(CharOf(*wc))), sp = str; *p;)
+           *sp++ = _nc_to_widechar(*p++);
        return str;
     } else
        return wc->chars;