106bfebdeSXin LI /**************************************************************************** 2e1865124SBaptiste Daroussin * Copyright 2020 Thomas E. Dickey * 3e1865124SBaptiste Daroussin * Copyright 2010 Free Software Foundation, Inc. * 406bfebdeSXin LI * * 506bfebdeSXin LI * Permission is hereby granted, free of charge, to any person obtaining a * 606bfebdeSXin LI * copy of this software and associated documentation files (the * 706bfebdeSXin LI * "Software"), to deal in the Software without restriction, including * 806bfebdeSXin LI * without limitation the rights to use, copy, modify, merge, publish, * 906bfebdeSXin LI * distribute, distribute with modifications, sublicense, and/or sell * 1006bfebdeSXin LI * copies of the Software, and to permit persons to whom the Software is * 1106bfebdeSXin LI * furnished to do so, subject to the following conditions: * 1206bfebdeSXin LI * * 1306bfebdeSXin LI * The above copyright notice and this permission notice shall be included * 1406bfebdeSXin LI * in all copies or substantial portions of the Software. * 1506bfebdeSXin LI * * 1606bfebdeSXin LI * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * 1706bfebdeSXin LI * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * 1806bfebdeSXin LI * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * 1906bfebdeSXin LI * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * 2006bfebdeSXin LI * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * 2106bfebdeSXin LI * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * 2206bfebdeSXin LI * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * 2306bfebdeSXin LI * * 2406bfebdeSXin LI * Except as contained in this notice, the name(s) of the above copyright * 2506bfebdeSXin LI * holders shall not be used in advertising or otherwise to promote the * 2606bfebdeSXin LI * sale, use or other dealings in this Software without prior written * 2706bfebdeSXin LI * authorization. * 2806bfebdeSXin LI ****************************************************************************/ 2906bfebdeSXin LI #include <curses.priv.h> 3006bfebdeSXin LI 31*7a656419SBaptiste Daroussin MODULE_ID("$Id: wcwidth.c,v 1.4 2020/07/11 21:02:10 tom Exp $") 3206bfebdeSXin LI 3306bfebdeSXin LI #if USE_WIDEC_SUPPORT 3406bfebdeSXin LI #define mk_wcwidth(ucs) _nc_wcwidth(ucs) 3506bfebdeSXin LI #define mk_wcswidth(pwcs, n) _nc_wcswidth(pwcs, n) 3606bfebdeSXin LI #define mk_wcwidth_cjk(ucs) _nc_wcwidth_cjk(ucs) 3706bfebdeSXin LI #define mk_wcswidth_cjk(pwcs, n) _nc_wcswidth_cjk(pwcs, n) 3806bfebdeSXin LI 39*7a656419SBaptiste Daroussin NCURSES_EXPORT(int) mk_wcwidth(wchar_t); 40*7a656419SBaptiste Daroussin NCURSES_EXPORT(int) mk_wcswidth(const wchar_t *, size_t); 41*7a656419SBaptiste Daroussin NCURSES_EXPORT(int) mk_wcwidth_cjk(wchar_t); 42*7a656419SBaptiste Daroussin NCURSES_EXPORT(int) mk_wcswidth_cjk(const wchar_t *, size_t); 4306bfebdeSXin LI 4406bfebdeSXin LI #include <wcwidth.h> 4506bfebdeSXin LI #else 4606bfebdeSXin LI void _nc_empty_wcwidth(void); 4706bfebdeSXin LI void 4806bfebdeSXin LI _nc_empty_wcwidth(void) 4906bfebdeSXin LI { 5006bfebdeSXin LI } 5106bfebdeSXin LI #endif 52