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