iswctype.c (102031) | iswctype.c (102033) |
---|---|
1/* 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 26 unchanged lines hidden (view full) --- 35 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 36 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 37 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 38 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 39 * SUCH DAMAGE. 40 */ 41 42#include <sys/cdefs.h> | 1/* 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 26 unchanged lines hidden (view full) --- 35 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 36 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 37 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 38 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 39 * SUCH DAMAGE. 40 */ 41 42#include <sys/cdefs.h> |
43__FBSDID("$FreeBSD: head/lib/libc/locale/iswctype.c 102031 2002-08-17 20:11:31Z ache $"); | 43__FBSDID("$FreeBSD: head/lib/libc/locale/iswctype.c 102033 2002-08-17 20:30:34Z ache $"); |
44 45#include <wctype.h> 46 47#undef iswalnum 48int 49iswalnum(wc) 50 wint_t wc; 51{ --- 155 unchanged lines hidden (view full) --- 207#undef towupper 208wint_t 209towupper(wc) 210 wint_t wc; 211{ 212 return (__toupper(wc)); 213} 214 | 44 45#include <wctype.h> 46 47#undef iswalnum 48int 49iswalnum(wc) 50 wint_t wc; 51{ --- 155 unchanged lines hidden (view full) --- 207#undef towupper 208wint_t 209towupper(wc) 210 wint_t wc; 211{ 212 return (__toupper(wc)); 213} 214 |
215int 216wcwidth(wc) 217 wchar_t wc; 218{ 219 int width = __maskrune(wc, _CTYPE_SWM); 220 221 return (width ? (unsigned)width >> _CTYPE_SWS 222 : (iswprint(wc) ? 1 : -1)); 223} 224 | |