X-Git-Url: https://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=ncurses%2Fwidechar%2Flib_cchar.c;fp=ncurses%2Fwidechar%2Flib_cchar.c;h=58a3b94014201e89d49a0e20b96faea235c7c473;hb=88e7914acafc37f84af25b80f403eb4290e423d4;hp=b465c36089a159c753fbc6271135c9b758d43d98;hpb=b3969973c9f5be7f45107ac2992bf4909b8541bc;p=ncurses.git diff --git a/ncurses/widechar/lib_cchar.c b/ncurses/widechar/lib_cchar.c index b465c360..58a3b940 100644 --- a/ncurses/widechar/lib_cchar.c +++ b/ncurses/widechar/lib_cchar.c @@ -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 -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; }