104b94745Smrg/* $XTermId: wcwidth.h,v 1.14 2017/06/18 17:56:35 tom Exp $ */ 2913cc679Smrg 3d522f475Smrg/* $XFree86: xc/programs/xterm/wcwidth.h,v 1.5 2005/05/03 00:38:25 dickey Exp $ */ 4d522f475Smrg 5913cc679Smrg/* 6913cc679Smrg * Copyright 2000-2005,2017 by Thomas E. Dickey 7913cc679Smrg * 8913cc679Smrg * All Rights Reserved 9913cc679Smrg * 10913cc679Smrg * Permission is hereby granted, free of charge, to any person obtaining a 11913cc679Smrg * copy of this software and associated documentation files (the 12913cc679Smrg * "Software"), to deal in the Software without restriction, including 13913cc679Smrg * without limitation the rights to use, copy, modify, merge, publish, 14913cc679Smrg * distribute, sublicense, and/or sell copies of the Software, and to 15913cc679Smrg * permit persons to whom the Software is furnished to do so, subject to 16913cc679Smrg * the following conditions: 17913cc679Smrg * 18913cc679Smrg * The above copyright notice and this permission notice shall be included 19913cc679Smrg * in all copies or substantial portions of the Software. 20913cc679Smrg * 21913cc679Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 22913cc679Smrg * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 23913cc679Smrg * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 24913cc679Smrg * IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY 25913cc679Smrg * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 26913cc679Smrg * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 27913cc679Smrg * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28913cc679Smrg * 29913cc679Smrg * Except as contained in this notice, the name(s) of the above copyright 30913cc679Smrg * holders shall not be used in advertising or otherwise to promote the 31913cc679Smrg * sale, use or other dealings in this Software without prior written 32913cc679Smrg * authorization. 33913cc679Smrg */ 34d522f475Smrg#ifndef included_wcwidth_h 35d522f475Smrg#define included_wcwidth_h 1 36d522f475Smrg 37d522f475Smrg#include <stddef.h> 38d522f475Smrg 39913cc679Smrgextern void mk_wcwidth_init(int mode); 40913cc679Smrg 41d522f475Smrgextern int mk_wcswidth(const wchar_t * pwcs, size_t n); 42d522f475Smrgextern int mk_wcswidth_cjk(const wchar_t * pwcs, size_t n); 43d522f475Smrgextern int mk_wcwidth(wchar_t ucs); 44d522f475Smrgextern int mk_wcwidth_cjk(wchar_t ucs); 45d522f475Smrgextern int wcswidth_cjk(const wchar_t * pwcs, size_t n); 46d522f475Smrg 47d522f475Smrg#endif /* included_wcwidth_h */ 48