wcwidth.c revision 133564
1102033Sache/* 2102033Sache * Copyright (c) 1989, 1993 3102033Sache * The Regents of the University of California. All rights reserved. 4102033Sache * (c) UNIX System Laboratories, Inc. 5102033Sache * All or some portions of this file are derived from material licensed 6102033Sache * to the University of California by American Telephone and Telegraph 7102033Sache * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8102033Sache * the permission of UNIX System Laboratories, Inc. 9102033Sache * 10102033Sache * This code is derived from software contributed to Berkeley by 11102033Sache * Paul Borman at Krystal Technologies. 12102033Sache * 13102033Sache * Redistribution and use in source and binary forms, with or without 14102033Sache * modification, are permitted provided that the following conditions 15102033Sache * are met: 16102033Sache * 1. Redistributions of source code must retain the above copyright 17102033Sache * notice, this list of conditions and the following disclaimer. 18102033Sache * 2. Redistributions in binary form must reproduce the above copyright 19102033Sache * notice, this list of conditions and the following disclaimer in the 20102033Sache * documentation and/or other materials provided with the distribution. 21102033Sache * 3. All advertising materials mentioning features or use of this software 22102033Sache * must display the following acknowledgement: 23102033Sache * This product includes software developed by the University of 24102033Sache * California, Berkeley and its contributors. 25102033Sache * 4. Neither the name of the University nor the names of its contributors 26102033Sache * may be used to endorse or promote products derived from this software 27102033Sache * without specific prior written permission. 28102033Sache * 29102033Sache * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 30102033Sache * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 31102033Sache * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 32102033Sache * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 33102033Sache * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 34102033Sache * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 35102033Sache * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 36102033Sache * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 37102033Sache * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 38102033Sache * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 39102033Sache * SUCH DAMAGE. 40102033Sache */ 41102033Sache 42102033Sache#include <sys/cdefs.h> 43102033Sache__FBSDID("$FreeBSD: head/lib/libc/locale/wcwidth.c 133564 2004-08-12 12:19:11Z tjr $"); 44102033Sache 45102033Sache#include <wchar.h> 46102033Sache 47133564Stjr#undef wcwidth 48102096Sache 49102033Sacheint 50102137Sachewcwidth(wchar_t wc) 51102033Sache{ 52102033Sache 53133564Stjr return (__wcwidth(wc)); 54102033Sache} 55