]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/widechar/lib_cchar.c
ncurses 6.1 - patch 20191012
[ncurses.git] / ncurses / widechar / lib_cchar.c
index b465c36089a159c753fbc6271135c9b758d43d98..58a3b94014201e89d49a0e20b96faea235c7c473 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 2001-2016,2017 Free Software Foundation, Inc.              *
+ * Copyright (c) 2001-2017,2019 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            *
@@ -35,7 +35,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_cchar.c,v 1.31 2017/03/31 11:14:26 tom Exp $")
+MODULE_ID("$Id: lib_cchar.c,v 1.32 2019/05/04 20:46:24 tom Exp $")
 
 /* 
  * The SuSv2 description leaves some room for interpretation.  We'll assume wch
@@ -60,7 +60,7 @@ setcchar(cchar_t *wcval,
 
     set_extended_pair(opts, color_pair);
     if (wch == NULL
-       || ((len = (unsigned) wcslen(wch)) > 1 && wcwidth(wch[0]) < 0)
+       || ((len = (unsigned) wcslen(wch)) > 1 && _nc_wacs_width(wch[0]) < 0)
        || color_pair < 0) {
        code = ERR;
     } else {
@@ -74,7 +74,7 @@ setcchar(cchar_t *wcval,
         * are only interested in adding non-spacing characters.
         */
        for (i = 1; i < len; ++i) {
-           if (wcwidth(wch[i]) != 0) {
+           if (_nc_wacs_width(wch[i]) != 0) {
                len = i;
                break;
            }