File indexing completed on 2024-05-12 15:43:37
0001 /* 0002 * Copyright (C) 2007 Apple Inc. All rights reserved. 0003 * 0004 * Redistribution and use in source and binary forms, with or without 0005 * modification, are permitted provided that the following conditions 0006 * are met: 0007 * 0008 * 1. Redistributions of source code must retain the above copyright 0009 * notice, this list of conditions and the following disclaimer. 0010 * 2. Redistributions in binary form must reproduce the above copyright 0011 * notice, this list of conditions and the following disclaimer in the 0012 * documentation and/or other materials provided with the distribution. 0013 * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of 0014 * its contributors may be used to endorse or promote products derived 0015 * from this software without specific prior written permission. 0016 * 0017 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY 0018 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 0019 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 0020 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY 0021 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 0022 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 0023 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 0024 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 0025 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 0026 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 0027 */ 0028 0029 #ifndef WTF_DisallowCType_h 0030 #define WTF_DisallowCType_h 0031 0032 // The behavior of many of the functions in the <ctype.h> header is dependent 0033 // on the current locale. But almost all uses of these functions are for 0034 // locale-independent, ASCII-specific purposes. In WebKit code we use our own 0035 // ASCII-specific functions instead. This header makes sure we get a compile-time 0036 // error if we use one of the <ctype.h> functions by accident. 0037 0038 #include <ctype.h> 0039 0040 #undef isalnum 0041 #undef isalpha 0042 #undef isascii 0043 #undef isblank 0044 #undef iscntrl 0045 #undef isdigit 0046 #undef isgraph 0047 #undef islower 0048 #undef isprint 0049 #undef ispunct 0050 #undef isspace 0051 #undef isupper 0052 #undef isxdigit 0053 #undef toascii 0054 #undef tolower 0055 #undef toupper 0056 0057 #define isalnum WTF_Please_use_ASCIICType_instead_of_ctype_see_comment_in_ASCIICType_h 0058 #define isalpha WTF_Please_use_ASCIICType_instead_of_ctype_see_comment_in_ASCIICType_h 0059 #define isascii WTF_Please_use_ASCIICType_instead_of_ctype_see_comment_in_ASCIICType_h 0060 #define isblank WTF_Please_use_ASCIICType_instead_of_ctype_see_comment_in_ASCIICType_h 0061 #define iscntrl WTF_Please_use_ASCIICType_instead_of_ctype_see_comment_in_ASCIICType_h 0062 #define isdigit WTF_Please_use_ASCIICType_instead_of_ctype_see_comment_in_ASCIICType_h 0063 #define isgraph WTF_Please_use_ASCIICType_instead_of_ctype_see_comment_in_ASCIICType_h 0064 #define islower WTF_Please_use_ASCIICType_instead_of_ctype_see_comment_in_ASCIICType_h 0065 #define isprint WTF_Please_use_ASCIICType_instead_of_ctype_see_comment_in_ASCIICType_h 0066 #define ispunct WTF_Please_use_ASCIICType_instead_of_ctype_see_comment_in_ASCIICType_h 0067 #define isspace WTF_Please_use_ASCIICType_instead_of_ctype_see_comment_in_ASCIICType_h 0068 #define isupper WTF_Please_use_ASCIICType_instead_of_ctype_see_comment_in_ASCIICType_h 0069 #define isxdigit WTF_Please_use_ASCIICType_instead_of_ctype_see_comment_in_ASCIICType_h 0070 #define toascii WTF_Please_use_ASCIICType_instead_of_ctype_see_comment_in_ASCIICType_h 0071 #define tolower WTF_Please_use_ASCIICType_instead_of_ctype_see_comment_in_ASCIICType_h 0072 #define toupper WTF_Please_use_ASCIICType_instead_of_ctype_see_comment_in_ASCIICType_h 0073 0074 #endif