17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 57257d1b4Sraf * Common Development and Distribution License (the "License"). 67257d1b4Sraf * You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate * 87c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate * and limitations under the License. 127c478bd9Sstevel@tonic-gate * 137c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate * 197c478bd9Sstevel@tonic-gate * CDDL HEADER END 207c478bd9Sstevel@tonic-gate */ 217257d1b4Sraf 227c478bd9Sstevel@tonic-gate /* 237257d1b4Sraf * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 247c478bd9Sstevel@tonic-gate * Use is subject to license terms. 257c478bd9Sstevel@tonic-gate */ 267c478bd9Sstevel@tonic-gate 27*4297a3b0SGarrett D'Amore /* 28*4297a3b0SGarrett D'Amore * Copyright 2010 Nexenta Systems, Inc. All rights reserved. 29*4297a3b0SGarrett D'Amore * Use is subject to license terms. 30*4297a3b0SGarrett D'Amore */ 31*4297a3b0SGarrett D'Amore 327c478bd9Sstevel@tonic-gate /* Copyright (c) 1988 AT&T */ 337c478bd9Sstevel@tonic-gate /* All Rights Reserved */ 347c478bd9Sstevel@tonic-gate 357c478bd9Sstevel@tonic-gate #pragma weak _ctype = __ctype 367c478bd9Sstevel@tonic-gate 377257d1b4Sraf #include "lint.h" 387c478bd9Sstevel@tonic-gate #include <locale.h> 397c478bd9Sstevel@tonic-gate #include "_locale.h" 407c478bd9Sstevel@tonic-gate #include <ctype.h> 417c478bd9Sstevel@tonic-gate #include <sys/types.h> 427c478bd9Sstevel@tonic-gate 43*4297a3b0SGarrett D'Amore unsigned char __ctype_C[SZ_TOTAL] = 44*4297a3b0SGarrett D'Amore { 45*4297a3b0SGarrett D'Amore 0, /* EOF */ 46*4297a3b0SGarrett D'Amore _C, _C, _C, _C, _C, _C, _C, _C, 47*4297a3b0SGarrett D'Amore _C, _S|_C, _S|_C, _S|_C, _S|_C, _S|_C, _C, _C, 48*4297a3b0SGarrett D'Amore _C, _C, _C, _C, _C, _C, _C, _C, 49*4297a3b0SGarrett D'Amore _C, _C, _C, _C, _C, _C, _C, _C, 50*4297a3b0SGarrett D'Amore _S|_B, _P, _P, _P, _P, _P, _P, _P, 51*4297a3b0SGarrett D'Amore _P, _P, _P, _P, _P, _P, _P, _P, 52*4297a3b0SGarrett D'Amore _N|_X, _N|_X, _N|_X, _N|_X, _N|_X, _N|_X, _N|_X, _N|_X, 53*4297a3b0SGarrett D'Amore _N|_X, _N|_X, _P, _P, _P, _P, _P, _P, 54*4297a3b0SGarrett D'Amore _P, _U|_X, _U|_X, _U|_X, _U|_X, _U|_X, _U|_X, _U, 55*4297a3b0SGarrett D'Amore _U, _U, _U, _U, _U, _U, _U, _U, 56*4297a3b0SGarrett D'Amore _U, _U, _U, _U, _U, _U, _U, _U, 57*4297a3b0SGarrett D'Amore _U, _U, _U, _P, _P, _P, _P, _P, 58*4297a3b0SGarrett D'Amore _P, _L|_X, _L|_X, _L|_X, _L|_X, _L|_X, _L|_X, _L, 59*4297a3b0SGarrett D'Amore _L, _L, _L, _L, _L, _L, _L, _L, 60*4297a3b0SGarrett D'Amore _L, _L, _L, _L, _L, _L, _L, _L, 61*4297a3b0SGarrett D'Amore _L, _L, _L, _P, _P, _P, _P, _C, 62*4297a3b0SGarrett D'Amore 0, 0, 0, 0, 0, 0, 0, 0, 63*4297a3b0SGarrett D'Amore 0, 0, 0, 0, 0, 0, 0, 0, 64*4297a3b0SGarrett D'Amore 0, 0, 0, 0, 0, 0, 0, 0, 65*4297a3b0SGarrett D'Amore 0, 0, 0, 0, 0, 0, 0, 0, 66*4297a3b0SGarrett D'Amore 0, 0, 0, 0, 0, 0, 0, 0, 67*4297a3b0SGarrett D'Amore 0, 0, 0, 0, 0, 0, 0, 0, 68*4297a3b0SGarrett D'Amore 0, 0, 0, 0, 0, 0, 0, 0, 69*4297a3b0SGarrett D'Amore 0, 0, 0, 0, 0, 0, 0, 0, 70*4297a3b0SGarrett D'Amore 0, 0, 0, 0, 0, 0, 0, 0, 71*4297a3b0SGarrett D'Amore 0, 0, 0, 0, 0, 0, 0, 0, 72*4297a3b0SGarrett D'Amore 0, 0, 0, 0, 0, 0, 0, 0, 73*4297a3b0SGarrett D'Amore 0, 0, 0, 0, 0, 0, 0, 0, 74*4297a3b0SGarrett D'Amore 0, 0, 0, 0, 0, 0, 0, 0, 75*4297a3b0SGarrett D'Amore 0, 0, 0, 0, 0, 0, 0, 0, 76*4297a3b0SGarrett D'Amore 0, 0, 0, 0, 0, 0, 0, 0, 77*4297a3b0SGarrett D'Amore 0, 0, 0, 0, 0, 0, 0, 0, 78*4297a3b0SGarrett D'Amore 79*4297a3b0SGarrett D'Amore /* tolower() and toupper() conversion table */ 0, 80*4297a3b0SGarrett D'Amore 0, 1, 2, 3, 4, 5, 6, 7, 81*4297a3b0SGarrett D'Amore 8, 9, 10, 11, 12, 13, 14, 15, 82*4297a3b0SGarrett D'Amore 16, 17, 18, 19, 20, 21, 22, 23, 83*4297a3b0SGarrett D'Amore 24, 25, 26, 27, 28, 29, 30, 31, 84*4297a3b0SGarrett D'Amore 32, 33, 34, 35, 36, 37, 38, 39, 85*4297a3b0SGarrett D'Amore 40, 41, 42, 43, 44, 45, 46, 47, 86*4297a3b0SGarrett D'Amore 48, 49, 50, 51, 52, 53, 54, 55, 87*4297a3b0SGarrett D'Amore 56, 57, 58, 59, 60, 61, 62, 63, 88*4297a3b0SGarrett D'Amore 64, 97, 98, 99, 100, 101, 102, 103, 89*4297a3b0SGarrett D'Amore 104, 105, 106, 107, 108, 109, 110, 111, 90*4297a3b0SGarrett D'Amore 112, 113, 114, 115, 116, 117, 118, 119, 91*4297a3b0SGarrett D'Amore 120, 121, 122, 91, 92, 93, 94, 95, 92*4297a3b0SGarrett D'Amore 96, 65, 66, 67, 68, 69, 70, 71, 93*4297a3b0SGarrett D'Amore 72, 73, 74, 75, 76, 77, 78, 79, 94*4297a3b0SGarrett D'Amore 80, 81, 82, 83, 84, 85, 86, 87, 95*4297a3b0SGarrett D'Amore 88, 89, 90, 123, 124, 125, 126, 127, 96*4297a3b0SGarrett D'Amore 0, 0, 0, 0, 0, 0, 0, 0, 97*4297a3b0SGarrett D'Amore 0, 0, 0, 0, 0, 0, 0, 0, 98*4297a3b0SGarrett D'Amore 0, 0, 0, 0, 0, 0, 0, 0, 99*4297a3b0SGarrett D'Amore 0, 0, 0, 0, 0, 0, 0, 0, 100*4297a3b0SGarrett D'Amore 0, 0, 0, 0, 0, 0, 0, 0, 101*4297a3b0SGarrett D'Amore 0, 0, 0, 0, 0, 0, 0, 0, 102*4297a3b0SGarrett D'Amore 0, 0, 0, 0, 0, 0, 0, 0, 103*4297a3b0SGarrett D'Amore 0, 0, 0, 0, 0, 0, 0, 0, 104*4297a3b0SGarrett D'Amore 0, 0, 0, 0, 0, 0, 0, 0, 105*4297a3b0SGarrett D'Amore 0, 0, 0, 0, 0, 0, 0, 0, 106*4297a3b0SGarrett D'Amore 0, 0, 0, 0, 0, 0, 0, 0, 107*4297a3b0SGarrett D'Amore 0, 0, 0, 0, 0, 0, 0, 0, 108*4297a3b0SGarrett D'Amore 0, 0, 0, 0, 0, 0, 0, 0, 109*4297a3b0SGarrett D'Amore 0, 0, 0, 0, 0, 0, 0, 0, 110*4297a3b0SGarrett D'Amore 0, 0, 0, 0, 0, 0, 0, 0, 111*4297a3b0SGarrett D'Amore 0, 0, 0, 0, 0, 0, 0, 0, 112*4297a3b0SGarrett D'Amore /* CSWIDTH information */ 113*4297a3b0SGarrett D'Amore 1, 0, 0, 1, 0, 0, 1, 114*4297a3b0SGarrett D'Amore }; 115*4297a3b0SGarrett D'Amore 1167257d1b4Sraf unsigned char __ctype[SZ_TOTAL] = 1177c478bd9Sstevel@tonic-gate { 1187c478bd9Sstevel@tonic-gate 0, /* EOF */ 1197c478bd9Sstevel@tonic-gate _C, _C, _C, _C, _C, _C, _C, _C, 1207c478bd9Sstevel@tonic-gate _C, _S|_C, _S|_C, _S|_C, _S|_C, _S|_C, _C, _C, 1217c478bd9Sstevel@tonic-gate _C, _C, _C, _C, _C, _C, _C, _C, 1227c478bd9Sstevel@tonic-gate _C, _C, _C, _C, _C, _C, _C, _C, 1237c478bd9Sstevel@tonic-gate _S|_B, _P, _P, _P, _P, _P, _P, _P, 1247c478bd9Sstevel@tonic-gate _P, _P, _P, _P, _P, _P, _P, _P, 1257c478bd9Sstevel@tonic-gate _N|_X, _N|_X, _N|_X, _N|_X, _N|_X, _N|_X, _N|_X, _N|_X, 1267c478bd9Sstevel@tonic-gate _N|_X, _N|_X, _P, _P, _P, _P, _P, _P, 1277c478bd9Sstevel@tonic-gate _P, _U|_X, _U|_X, _U|_X, _U|_X, _U|_X, _U|_X, _U, 1287c478bd9Sstevel@tonic-gate _U, _U, _U, _U, _U, _U, _U, _U, 1297c478bd9Sstevel@tonic-gate _U, _U, _U, _U, _U, _U, _U, _U, 1307c478bd9Sstevel@tonic-gate _U, _U, _U, _P, _P, _P, _P, _P, 1317c478bd9Sstevel@tonic-gate _P, _L|_X, _L|_X, _L|_X, _L|_X, _L|_X, _L|_X, _L, 1327c478bd9Sstevel@tonic-gate _L, _L, _L, _L, _L, _L, _L, _L, 1337c478bd9Sstevel@tonic-gate _L, _L, _L, _L, _L, _L, _L, _L, 1347c478bd9Sstevel@tonic-gate _L, _L, _L, _P, _P, _P, _P, _C, 1357c478bd9Sstevel@tonic-gate 0, 0, 0, 0, 0, 0, 0, 0, 1367c478bd9Sstevel@tonic-gate 0, 0, 0, 0, 0, 0, 0, 0, 1377c478bd9Sstevel@tonic-gate 0, 0, 0, 0, 0, 0, 0, 0, 1387c478bd9Sstevel@tonic-gate 0, 0, 0, 0, 0, 0, 0, 0, 1397c478bd9Sstevel@tonic-gate 0, 0, 0, 0, 0, 0, 0, 0, 1407c478bd9Sstevel@tonic-gate 0, 0, 0, 0, 0, 0, 0, 0, 1417c478bd9Sstevel@tonic-gate 0, 0, 0, 0, 0, 0, 0, 0, 1427c478bd9Sstevel@tonic-gate 0, 0, 0, 0, 0, 0, 0, 0, 1437c478bd9Sstevel@tonic-gate 0, 0, 0, 0, 0, 0, 0, 0, 1447c478bd9Sstevel@tonic-gate 0, 0, 0, 0, 0, 0, 0, 0, 1457c478bd9Sstevel@tonic-gate 0, 0, 0, 0, 0, 0, 0, 0, 1467c478bd9Sstevel@tonic-gate 0, 0, 0, 0, 0, 0, 0, 0, 1477c478bd9Sstevel@tonic-gate 0, 0, 0, 0, 0, 0, 0, 0, 1487c478bd9Sstevel@tonic-gate 0, 0, 0, 0, 0, 0, 0, 0, 1497c478bd9Sstevel@tonic-gate 0, 0, 0, 0, 0, 0, 0, 0, 1507c478bd9Sstevel@tonic-gate 0, 0, 0, 0, 0, 0, 0, 0, 1517c478bd9Sstevel@tonic-gate 1527c478bd9Sstevel@tonic-gate /* tolower() and toupper() conversion table */ 0, 1537c478bd9Sstevel@tonic-gate 0, 1, 2, 3, 4, 5, 6, 7, 1547c478bd9Sstevel@tonic-gate 8, 9, 10, 11, 12, 13, 14, 15, 1557c478bd9Sstevel@tonic-gate 16, 17, 18, 19, 20, 21, 22, 23, 1567c478bd9Sstevel@tonic-gate 24, 25, 26, 27, 28, 29, 30, 31, 1577c478bd9Sstevel@tonic-gate 32, 33, 34, 35, 36, 37, 38, 39, 1587c478bd9Sstevel@tonic-gate 40, 41, 42, 43, 44, 45, 46, 47, 1597c478bd9Sstevel@tonic-gate 48, 49, 50, 51, 52, 53, 54, 55, 1607c478bd9Sstevel@tonic-gate 56, 57, 58, 59, 60, 61, 62, 63, 1617c478bd9Sstevel@tonic-gate 64, 97, 98, 99, 100, 101, 102, 103, 1627c478bd9Sstevel@tonic-gate 104, 105, 106, 107, 108, 109, 110, 111, 1637c478bd9Sstevel@tonic-gate 112, 113, 114, 115, 116, 117, 118, 119, 1647c478bd9Sstevel@tonic-gate 120, 121, 122, 91, 92, 93, 94, 95, 1657c478bd9Sstevel@tonic-gate 96, 65, 66, 67, 68, 69, 70, 71, 1667c478bd9Sstevel@tonic-gate 72, 73, 74, 75, 76, 77, 78, 79, 1677c478bd9Sstevel@tonic-gate 80, 81, 82, 83, 84, 85, 86, 87, 1687c478bd9Sstevel@tonic-gate 88, 89, 90, 123, 124, 125, 126, 127, 1697c478bd9Sstevel@tonic-gate 0, 0, 0, 0, 0, 0, 0, 0, 1707c478bd9Sstevel@tonic-gate 0, 0, 0, 0, 0, 0, 0, 0, 1717c478bd9Sstevel@tonic-gate 0, 0, 0, 0, 0, 0, 0, 0, 1727c478bd9Sstevel@tonic-gate 0, 0, 0, 0, 0, 0, 0, 0, 1737c478bd9Sstevel@tonic-gate 0, 0, 0, 0, 0, 0, 0, 0, 1747c478bd9Sstevel@tonic-gate 0, 0, 0, 0, 0, 0, 0, 0, 1757c478bd9Sstevel@tonic-gate 0, 0, 0, 0, 0, 0, 0, 0, 1767c478bd9Sstevel@tonic-gate 0, 0, 0, 0, 0, 0, 0, 0, 1777c478bd9Sstevel@tonic-gate 0, 0, 0, 0, 0, 0, 0, 0, 1787c478bd9Sstevel@tonic-gate 0, 0, 0, 0, 0, 0, 0, 0, 1797c478bd9Sstevel@tonic-gate 0, 0, 0, 0, 0, 0, 0, 0, 1807c478bd9Sstevel@tonic-gate 0, 0, 0, 0, 0, 0, 0, 0, 1817c478bd9Sstevel@tonic-gate 0, 0, 0, 0, 0, 0, 0, 0, 1827c478bd9Sstevel@tonic-gate 0, 0, 0, 0, 0, 0, 0, 0, 1837c478bd9Sstevel@tonic-gate 0, 0, 0, 0, 0, 0, 0, 0, 1847c478bd9Sstevel@tonic-gate 0, 0, 0, 0, 0, 0, 0, 0, 1857c478bd9Sstevel@tonic-gate /* CSWIDTH information */ 1867c478bd9Sstevel@tonic-gate 1, 0, 0, 1, 0, 0, 1, 1877c478bd9Sstevel@tonic-gate }; 1887c478bd9Sstevel@tonic-gate 1897c478bd9Sstevel@tonic-gate unsigned char _numeric[SZ_NUMERIC] = 1907c478bd9Sstevel@tonic-gate { 1917c478bd9Sstevel@tonic-gate '.', '\0', 1927c478bd9Sstevel@tonic-gate }; 193