+++ /dev/null
-/** @file\r
- Single-byte character classification, case conversion macros, and\r
- function declarations.\r
-\r
- The header <ctype.h> declares several functions useful for testing and mapping\r
- characters. In all cases, the argument is an int, the value of which shall be\r
- representable as an unsigned char or shall equal the value of the macro EOF.\r
- If the argument has any other value, the behavior is undefined.\r
-\r
- The behavior of these functions is affected by the current locale. The\r
- default is the "C" locale.\r
-\r
- The term "printing character" refers to a member of a locale-specific\r
- set of characters, each of which occupies at least one printing position on an output\r
- device; the term control character refers to a member of a locale-specific\r
- set of characters that are not printing characters.\r
-\r
- Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r
- This program and the accompanying materials are licensed and made available under\r
- the terms and conditions of the BSD License that accompanies this distribution.\r
- The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.\r
-\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-**/\r
-#ifndef _CTYPE_H\r
-#define _CTYPE_H\r
-#include <sys/EfiCdefs.h>\r
-#include <sys/_ctype.h>\r
-\r
-__BEGIN_DECLS\r
-// Declarations for the classification Functions\r
-\r
-/** The isalnum function tests for any character for which isalpha or isdigit\r
- is true.\r
-\r
- @param[in] c The character to be tested.\r
-\r
- @return Returns nonzero (true) if and only if the value of the parameter c\r
- can be classified as specified in the description of the function.\r
-**/\r
-int isalnum(int c);\r
-\r
-/** The isalpha function tests for any character for which isupper or islower\r
- is true, or any character that is one of a locale-specific set of\r
- alphabetic characters for which none of iscntrl, isdigit, ispunct, or\r
- isspace is true. In the "C" locale, isalpha returns true only for the\r
- characters for which isupper or islower is true.\r
-\r
- @param[in] c The character to be tested.\r
-\r
- @return Returns nonzero (true) if and only if the value of the parameter c\r
- can be classified as specified in the description of the function.\r
-**/\r
-int isalpha(int c);\r
-\r
-/** The isblank function tests that a character is a white-space character that results\r
- in a number of space (' ') characters being sent to the output device. In the C locale\r
- this is either ' ' or '\t'.\r
-\r
- @param[in] c The character to be tested.\r
-\r
- @return Returns nonzero (true) if and only if the value of the parameter c\r
- can be classified as specified in the description of the function.\r
-**/\r
-int isblank(int);\r
-\r
-/** The iscntrl function tests for any control character.\r
-\r
- @param[in] c The character to be tested.\r
-\r
- @return Returns nonzero (true) if and only if the value of the parameter c\r
- can be classified as specified in the description of the function.\r
-**/\r
-int iscntrl(int c);\r
-\r
-/** The isdigit function tests for any decimal-digit character.\r
-\r
- @param[in] c The character to be tested.\r
-\r
- @return Returns nonzero (true) if and only if the value of the parameter c\r
- can be classified as specified in the description of the function.\r
-**/\r
-int isdigit(int c);\r
-\r
-/** The isgraph function tests for any printing character except space (' ').\r
-\r
- @param[in] c The character to be tested.\r
-\r
- @return Returns nonzero (true) if and only if the value of the parameter c\r
- can be classified as specified in the description of the function.\r
-**/\r
-int isgraph(int c);\r
-\r
-/** The islower function tests for any character that is a lowercase letter or\r
- is one of a locale-specific set of characters for which none of iscntrl,\r
- isdigit, ispunct, or isspace is true. In the "C" locale, islower returns\r
- true only for the lowercase letters.\r
-\r
- @param[in] c The character to be tested.\r
-\r
- @return Returns nonzero (true) if and only if the value of the parameter c\r
- can be classified as specified in the description of the function.\r
-**/\r
-int islower(int c);\r
-\r
-/** The isprint function tests for any printing character including space (' ').\r
-\r
- @param[in] c The character to be tested.\r
-\r
- @return Returns nonzero (true) if and only if the value of the parameter c\r
- can be classified as specified in the description of the function.\r
-**/\r
-int isprint(int c);\r
-\r
-/** The ispunct function tests for any printing character that is one of a\r
- locale-specific set of punctuation characters for which neither isspace nor\r
- isalnum is true. In the "C" locale, ispunct returns true for every printing\r
- character for which neither isspace nor isalnum is true.\r
-\r
- @param[in] c The character to be tested.\r
-\r
- @return Returns nonzero (true) if and only if the value of the parameter c\r
- can be classified as specified in the description of the function.\r
-**/\r
-int ispunct(int c);\r
-\r
-/** The isspace function tests for any character that is a standard white-space\r
- character or is one of a locale-specific set of characters for which\r
- isalnum is false. The standard white-space characters are the following:\r
- space (' '), form feed ('\f'), new-line ('\n'), carriage return ('\r'),\r
- horizontal tab ('\t'), and vertical tab ('\v'). In the "C" locale, isspace\r
- returns true only for the standard white-space characters.\r
-\r
- @param[in] c The character to be tested.\r
-\r
- @return Returns nonzero (true) if and only if the value of the parameter c\r
- can be classified as specified in the description of the function.\r
-**/\r
-int isspace(int c);\r
-\r
-/** The isupper function tests for any character that is an uppercase letter or\r
- is one of a locale-specific set of characters for which none of iscntrl,\r
- isdigit, ispunct, or isspace is true. In the "C" locale, isupper returns\r
- true only for the uppercase letters.\r
-\r
- @param[in] c The character to be tested.\r
-\r
- @return Returns nonzero (true) if and only if the value of the parameter c\r
- can be classified as specified in the description of the function.\r
-**/\r
-int isupper(int c);\r
-\r
-/** The isxdigit function tests for any hexadecimal-digit character.\r
-\r
- @param[in] c The character to be tested.\r
-\r
- @return Returns nonzero (true) if and only if the value of the parameter c\r
- can be classified as specified in the description of the function.\r
-**/\r
-int isxdigit(int c);\r
-\r
-/** The isascii function tests that a character is one of the 128 7-bit ASCII characters.\r
- This function is not part of the C standard, but is commonly used.\r
-\r
- @param[in] c The character to be tested.\r
-\r
- @return Returns nonzero (true) if and only if the value of the parameter c\r
- can be classified as specified in the description of the function.\r
-**/\r
-int isascii(int c);\r
-\r
-/** Test whether a character is one of the characters used as a separator\r
- between directory elements in a path.\r
-\r
- Characters are '/', '\\'\r
-\r
- This non-standard function is unique to this implementation.\r
-\r
- @param[in] c The character to be tested.\r
-\r
- @return Returns nonzero (true) if and only if the value of the parameter c\r
- can be classified as specified in the description of the function.\r
-**/\r
-int isDirSep(int c);\r
-\r
-/** The tolower function converts an uppercase letter to a corresponding\r
- lowercase letter.\r
-\r
- @param[in] c The character to be converted.\r
-\r
- @return If the argument is a character for which isupper is true and\r
- there are one or more corresponding characters, as specified by\r
- the current locale, for which islower is true, the tolower\r
- function returns one of the corresponding characters (always the\r
- same one for any given locale); otherwise, the argument is\r
- returned unchanged.\r
-**/\r
-int tolower(int c);\r
-\r
-/** The toupper function converts a lowercase letter to a corresponding\r
- uppercase letter.\r
-\r
- @param[in] c The character to be converted.\r
-\r
- @return If the argument is a character for which islower is true and\r
- there are one or more corresponding characters, as specified by\r
- the current locale, for which isupper is true, the toupper\r
- function returns one of the corresponding characters (always the\r
- same one for any given locale); otherwise, the argument is\r
- returned unchanged.\r
-**/\r
-int toupper(int c);\r
-\r
-__END_DECLS\r
-\r
-/** Character Classification Macros.\r
- Undefine individually or define NO_CTYPE_MACROS, before including <ctype.h>,\r
- in order to use the Function version of the character classification macros.\r
-@{\r
-**/\r
-#ifndef NO_CTYPE_MACROS\r
- #define isalnum(c) (__isCClass( (int)c, (_CD | _CU | _CL | _XA)))\r
- #define isalpha(c) (__isCClass( (int)c, (_CU | _CL | _XA)))\r
- #define iscntrl(c) (__isCClass( (int)c, (_CC)))\r
- #define isdigit(c) (__isCClass( (int)c, (_CD)))\r
- #define isgraph(c) (__isCClass( (int)c, (_CG)))\r
- #define islower(c) (__isCClass( (int)c, (_CL)))\r
- #define isprint(c) (__isCClass( (int)c, (_CS | _CG)))\r
- #define ispunct(c) (__isCClass( (int)c, (_CP)))\r
- #define isspace(c) (__isCClass( (int)c, (_CW)))\r
- #define isupper(c) (__isCClass( (int)c, (_CU)))\r
- #define isxdigit(c) (__isCClass( (int)c, (_CD | _CX)))\r
- #define isDirSep(c) (__isCClass( (int)c, (_C0)))\r
- #define tolower(c) (__toLower((int)c))\r
- #define toupper(c) (__toUpper((int)c))\r
-#endif /* NO_CTYPE_MACROS */\r
-///@}\r
-\r
-#endif /* _CTYPE_H */\r