xref: /illumos-gate/usr/src/lib/libc/port/gen/strcase_charmap.c (revision 1da57d551424de5a9d469760be7c4b4d4f10a755)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 
22 /*
23  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
28 /*	  All Rights Reserved  	*/
29 
30 /*
31  * Portions of this source code were derived from Berkeley 4.3 BSD
32  * under license from the Regents of the University of California.
33  */
34 
35 #include "lint.h"
36 #include <sys/types.h>
37 #include <strings.h>
38 
39 /*
40  * This array is designed for mapping upper and lower case letter
41  * together for a case independent comparison.  The mappings are
42  * based upon ascii character sequences.
43  */
44 const char strcase_charmap[] = {
45 	'\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
46 	'\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
47 	'\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
48 	'\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037',
49 	'\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047',
50 	'\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057',
51 	'\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067',
52 	'\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077',
53 	'\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
54 	'\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
55 	'\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
56 	'\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137',
57 	'\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
58 	'\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
59 	'\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
60 	'\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177',
61 	'\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207',
62 	'\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217',
63 	'\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227',
64 	'\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237',
65 	'\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247',
66 	'\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257',
67 	'\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267',
68 	'\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277',
69 	'\300', '\301', '\302', '\303', '\304', '\305', '\306', '\307',
70 	'\310', '\311', '\312', '\313', '\314', '\315', '\316', '\317',
71 	'\320', '\321', '\322', '\323', '\324', '\325', '\326', '\327',
72 	'\330', '\331', '\332', '\333', '\334', '\335', '\336', '\337',
73 	'\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
74 	'\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
75 	'\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
76 	'\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377',
77 };
78