diff options
author | darylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-04-27 21:42:16 +0000 |
---|---|---|
committer | darylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-04-27 21:42:16 +0000 |
commit | 2aa62f2bc9a9654687b377d9ca8a8c2c860a3852 (patch) | |
tree | 62a0991a44327154fb88bf95bd6f7522053db7bb /StdLib/LibC/Ctype | |
parent | 98790d814871cc30bbd536673d3a0948047cd2f0 (diff) | |
download | edk2-platforms-2aa62f2bc9a9654687b377d9ca8a8c2c860a3852.tar.xz |
Standard Libraries for EDK II.
This set of three packages: AppPkg, StdLib, StdLibPrivateInternalFiles; contains the implementation of libraries based upon non-UEFI standards such as ISO/IEC-9899, the library portion of the C Language Standard, POSIX, etc.
AppPkg contains applications that make use of the standard libraries defined in the StdLib Package.
StdLib contains header (include) files and the implementations of the standard libraries.
StdLibPrivateInternalFiles contains files for the exclusive use of the library implementations in StdLib. These files should never be directly referenced from applications or other code.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11600 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'StdLib/LibC/Ctype')
-rw-r--r-- | StdLib/LibC/Ctype/CClass.c | 140 | ||||
-rw-r--r-- | StdLib/LibC/Ctype/CConv.c | 48 | ||||
-rw-r--r-- | StdLib/LibC/Ctype/Ctype.inf | 50 | ||||
-rw-r--r-- | StdLib/LibC/Ctype/iCtype.c | 303 |
4 files changed, 541 insertions, 0 deletions
diff --git a/StdLib/LibC/Ctype/CClass.c b/StdLib/LibC/Ctype/CClass.c new file mode 100644 index 0000000000..f350063352 --- /dev/null +++ b/StdLib/LibC/Ctype/CClass.c @@ -0,0 +1,140 @@ +/** @file
+ Character classification and case conversion functions for <ctype.h>.
+
+ Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
+ This program and the accompanying materials are licensed and made available under
+ the terms and conditions of the BSD License that accompanies this distribution.
+ The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php.
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+#include <LibConfig.h>
+
+#define NO_CTYPE_MACROS // So that we don't define the classification macros
+#include <ctype.h>
+
+int
+__isCClass( int _c, unsigned int mask)
+{
+ return ((_c < 0 || _c > 127) ? 0 : (_cClass[_c] & mask));
+}
+
+/**
+
+ @return
+**/
+int isalnum(int c)
+{
+ return (__isCClass( c, (_CD | _CU | _CL | _XA)));
+}
+
+/**
+
+ @return
+**/
+int isalpha(int c)
+{
+ return (__isCClass( c, (_CU | _CL | _XA)));
+}
+
+/**
+
+ @return
+**/
+int iscntrl(int c)
+{
+ return (__isCClass( c, (_CC)));
+}
+
+/**
+
+ @return
+**/
+int isdigit(int c)
+{
+ return (__isCClass( c, (_CD)));
+}
+
+/**
+
+ @return
+**/
+int isgraph(int c)
+{
+ return (__isCClass( c, (_CG)));
+}
+
+/**
+
+ @return
+**/
+int islower(int c)
+{
+ return (__isCClass( c, (_CL)));
+}
+
+/**
+
+ @return
+**/
+int isprint(int c)
+{
+ return (__isCClass( c, (_CS | _CG)));
+}
+
+/**
+
+ @return
+**/
+int ispunct(int c)
+{
+ return (__isCClass( c, (_CP)));
+}
+
+/**
+
+ @return
+**/
+int isspace(int c)
+{
+ return (__isCClass( c, (_CW)));
+}
+
+/**
+
+ @return
+**/
+int isupper(int c)
+{
+ return (__isCClass( c, (_CU)));
+}
+
+/**
+
+ @return
+**/
+int isxdigit(int c)
+{
+ return (__isCClass( c, (_CD | _CX)));
+}
+
+#if defined(_NETBSD_SOURCE)
+int
+isblank(int c)
+{
+ return (__isCClass( c, _CB));
+}
+#endif
+
+/** The isascii function tests that a character is one of the 128 ASCII characters.
+
+ @param[in] c The character to test.
+ @return Returns nonzero (true) if c is a valid ASCII character. Otherwize,
+ zero (false) is returned.
+**/
+int isascii(int c){
+ return ((c >= 0) && (c < 128));
+}
diff --git a/StdLib/LibC/Ctype/CConv.c b/StdLib/LibC/Ctype/CConv.c new file mode 100644 index 0000000000..6ad4f8722d --- /dev/null +++ b/StdLib/LibC/Ctype/CConv.c @@ -0,0 +1,48 @@ +/** @file
+ Case conversion functions for <ctype.h>
+
+ The tolower function converts an uppercase letter to a corresponding
+ lowercase letter. If the argument is a character for which isupper
+ is true and there are one or more corresponding characters, as
+ specified by the current locale, for which islower is true, the tolower
+ function returns one of the corresponding characters (always the same one
+ for any given locale); otherwise, the argument is returned unchanged.
+
+ The toupper function converts a lowercase letter to a corresponding
+ uppercase letter. If the argument is a character for which islower is true
+ and there are one or more corresponding characters, as specified by the
+ current locale, for which isupper is true, the toupper function returns one
+ of the corresponding characters (always the same one for any given locale);
+ otherwise, the argument is returned unchanged.
+
+ Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
+ This program and the accompanying materials are licensed and made available under
+ the terms and conditions of the BSD License that accompanies this distribution.
+ The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php.
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+#include <LibConfig.h>
+
+#define NO_CTYPE_MACROS // So that we don't define the classification macros
+#include <ctype.h>
+
+int
+tolower(
+ int _c
+ )
+{
+// return ((_c < 0 || _c > 127) ? _c : _lConvT[_c]);
+ return (isupper(_c) ? _lConvT[_c] : _c);
+}
+
+int toupper(
+ int _c
+ )
+{
+// return ((_c < 0 || _c > 127) ? _c : _uConvT[_c]);
+ return (islower(_c) ? _uConvT[_c] : _c);
+}
diff --git a/StdLib/LibC/Ctype/Ctype.inf b/StdLib/LibC/Ctype/Ctype.inf new file mode 100644 index 0000000000..e767885326 --- /dev/null +++ b/StdLib/LibC/Ctype/Ctype.inf @@ -0,0 +1,50 @@ +## @file
+#
+# Character Classification library implementing the functionality described
+# by the <ctype.h> header of the C Standard Library, ISO/IEC 9899:1990 with
+# Amendment 1 (C95).
+#
+# Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials are licensed and made available
+# under the terms and conditions of the BSD License which accompanies this
+# distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THIS PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+#
+##
+
+[Defines]
+ INF_VERSION = 0x00010005
+ BASE_NAME = LibCtype
+ FILE_GUID = dcc64575-fa7d-4b7b-b1ad-48427c97c74d
+ MODULE_TYPE = UEFI_APPLICATION
+ VERSION_STRING = 1.0
+ LIBRARY_CLASS = LibCtype
+
+#
+# The following information is for reference only and not required by the build tools.
+#
+# VALID_ARCHITECTURES = IA32 X64 IPF
+#
+
+[Sources]
+ iCtype.c
+ CClass.c
+ CConv.c
+
+[Packages]
+ StdLib/StdLib.dec
+ StdLibPrivateInternalFiles/DoNotUse.dec
+ MdePkg/MdePkg.dec
+
+################################################################
+#
+# The Build Options, below, are only used when building the C library.
+# DO NOT use them when building your application!
+# Nasty things could happen if you do.
+#
+[BuildOptions]
+ MSFT:*_*_*_CC_FLAGS = /GL-
diff --git a/StdLib/LibC/Ctype/iCtype.c b/StdLib/LibC/Ctype/iCtype.c new file mode 100644 index 0000000000..69df21e7ae --- /dev/null +++ b/StdLib/LibC/Ctype/iCtype.c @@ -0,0 +1,303 @@ +/** @file
+ Character classification and case conversion tables, and functions,
+ for the C Standard Library as required to implement ctype.h.
+
+ These are the default, C locale, tables.
+
+ Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
+ This program and the accompanying materials are licensed and made available under
+ the terms and conditions of the BSD License that accompanies this distribution.
+ The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php.
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+#include <LibConfig.h>
+#include <ctype.h>
+
+/// ASCII-8 Character Classification Table
+const UINT16 _C_CharClassTable[128] = {
+ /* 00 NUL */ ( _CC ),
+ /* 01 SOH */ ( _CC ),
+ /* 02 STX */ ( _CC ),
+ /* 03 ETX */ ( _CC ),
+ /* 04 EOT */ ( _CC ),
+ /* 05 ENQ */ ( _CC ),
+ /* 06 ACK */ ( _CC ),
+ /* 07 BEL */ ( _CC ),
+ /* 08 BS */ ( _CC ),
+ /* 09 TAB */ ( _CC | _CW | _CB ),
+ /* 0A LF */ ( _CC | _CW ),
+ /* 0B VT */ ( _CC | _CW ),
+ /* 0C FF */ ( _CC | _CW ),
+ /* 0D CR */ ( _CC | _CW ),
+ /* 0E SO */ ( _CC ),
+ /* 0F SI */ ( _CC ),
+ /* 10 DLE */ ( _CC ),
+ /* 11 DC1 */ ( _CC ),
+ /* 12 DC2 */ ( _CC ),
+ /* 13 DC3 */ ( _CC ),
+ /* 14 DC4 */ ( _CC ),
+ /* 15 NAK */ ( _CC ),
+ /* 16 SYN */ ( _CC ),
+ /* 17 ETB */ ( _CC ),
+ /* 18 CAN */ ( _CC ),
+ /* 19 EM */ ( _CC ),
+ /* 1A SUB */ ( _CC ),
+ /* 1B ESC */ ( _CC ),
+ /* 1C FS */ ( _CC ),
+ /* 1D GS */ ( _CC ),
+ /* 1E RS */ ( _CC ),
+ /* 1F US */ ( _CC ),
+ /* 20 ' ' */ ( _CW | _CS | _CB ),
+ /* 21 '!' */ ( _CP | _CG ),
+ /* 22 '"' */ ( _CP | _CG ),
+ /* 23 '#' */ ( _CP | _CG ),
+ /* 24 '$' */ ( _CP | _CG ),
+ /* 25 '%' */ ( _CP | _CG ),
+ /* 26 '&' */ ( _CP | _CG ),
+ /* 27 '\''*/ ( _CP | _CG ),
+ /* 28 '(' */ ( _CP | _CG ),
+ /* 29 ')' */ ( _CP | _CG ),
+ /* 2A '*' */ ( _CP | _CG ),
+ /* 2B '+' */ ( _CP | _CG ),
+ /* 2C ',' */ ( _CP | _CG ),
+ /* 2D '-' */ ( _CP | _CG ),
+ /* 2E '.' */ ( _CP | _CG ),
+ /* 2F '/' */ ( _CP | _CG ),
+ /* 30 '0' */ ( _CD | _CG ),
+ /* 31 '1' */ ( _CD | _CG ),
+ /* 32 '2' */ ( _CD | _CG ),
+ /* 33 '3' */ ( _CD | _CG ),
+ /* 34 '4' */ ( _CD | _CG ),
+ /* 35 '5' */ ( _CD | _CG ),
+ /* 36 '6' */ ( _CD | _CG ),
+ /* 37 '7' */ ( _CD | _CG ),
+ /* 38 '8' */ ( _CD | _CG ),
+ /* 39 '9' */ ( _CD | _CG ),
+ /* 3A ':' */ ( _CP | _CG ),
+ /* 3B ';' */ ( _CP | _CG ),
+ /* 3C '<' */ ( _CP | _CG ),
+ /* 3D '=' */ ( _CP | _CG ),
+ /* 3E '>' */ ( _CP | _CG ),
+ /* 3F '?' */ ( _CP | _CG ),
+ /* 40 '@' */ ( _CP | _CG ),
+ /* 41 'A' */ ( _CU | _CX | _CG ),
+ /* 42 'B' */ ( _CU | _CX | _CG ),
+ /* 43 'C' */ ( _CU | _CX | _CG ),
+ /* 44 'D' */ ( _CU | _CX | _CG ),
+ /* 45 'E' */ ( _CU | _CX | _CG ),
+ /* 46 'F' */ ( _CU | _CX | _CG ),
+ /* 47 'G' */ ( _CU | _CG ),
+ /* 48 'H' */ ( _CU | _CG ),
+ /* 49 'I' */ ( _CU | _CG ),
+ /* 4A 'J' */ ( _CU | _CG ),
+ /* 4B 'K' */ ( _CU | _CG ),
+ /* 4C 'L' */ ( _CU | _CG ),
+ /* 4D 'M' */ ( _CU | _CG ),
+ /* 4E 'N' */ ( _CU | _CG ),
+ /* 4F 'O' */ ( _CU | _CG ),
+ /* 50 'P' */ ( _CU | _CG ),
+ /* 51 'Q' */ ( _CU | _CG ),
+ /* 52 'R' */ ( _CU | _CG ),
+ /* 53 'S' */ ( _CU | _CG ),
+ /* 54 'T' */ ( _CU | _CG ),
+ /* 55 'U' */ ( _CU | _CG ),
+ /* 56 'V' */ ( _CU | _CG ),
+ /* 57 'W' */ ( _CU | _CG ),
+ /* 58 'X' */ ( _CU | _CG ),
+ /* 59 'Y' */ ( _CU | _CG ),
+ /* 5A 'Z' */ ( _CU | _CG ),
+ /* 5B '[' */ ( _CP | _CG ),
+ /* 5C '\' */ ( _CP | _CG ),
+ /* 5D ']' */ ( _CP | _CG ),
+ /* 5E '^' */ ( _CP | _CG ),
+ /* 5F '_' */ ( _CP | _CG ),
+ /* 60 '`' */ ( _CP | _CG ),
+ /* 61 'a' */ ( _CL | _CX | _CG ),
+ /* 62 'b' */ ( _CL | _CX | _CG ),
+ /* 63 'c' */ ( _CL | _CX | _CG ),
+ /* 64 'd' */ ( _CL | _CX | _CG ),
+ /* 65 'e' */ ( _CL | _CX | _CG ),
+ /* 66 'f' */ ( _CL | _CX | _CG ),
+ /* 67 'g' */ ( _CL | _CG ),
+ /* 68 'h' */ ( _CL | _CG ),
+ /* 69 'i' */ ( _CL | _CG ),
+ /* 6A 'j' */ ( _CL | _CG ),
+ /* 6B 'k' */ ( _CL | _CG ),
+ /* 6C 'l' */ ( _CL | _CG ),
+ /* 6D 'm' */ ( _CL | _CG ),
+ /* 6E 'n' */ ( _CL | _CG ),
+ /* 6F 'o' */ ( _CL | _CG ),
+ /* 70 'p' */ ( _CL | _CG ),
+ /* 71 'q' */ ( _CL | _CG ),
+ /* 72 'r' */ ( _CL | _CG ),
+ /* 73 's' */ ( _CL | _CG ),
+ /* 74 't' */ ( _CL | _CG ),
+ /* 75 'u' */ ( _CL | _CG ),
+ /* 76 'v' */ ( _CL | _CG ),
+ /* 77 'w' */ ( _CL | _CG ),
+ /* 78 'x' */ ( _CL | _CG ),
+ /* 79 'y' */ ( _CL | _CG ),
+ /* 7A 'z' */ ( _CL | _CG ),
+ /* 7B '{' */ ( _CP | _CG ),
+ /* 7C '|' */ ( _CP | _CG ),
+ /* 7D '}' */ ( _CP | _CG ),
+ /* 7E '~' */ ( _CP | _CG ),
+ /* 7F DEL */ ( _CC )
+};
+
+/// ASCII-8 Upper case to Lower case character conversion table
+const UINT8 _C_ToLowerTable[128] = {
+ /* 00 NUL */ 0x00, /* 01 SOH */ 0x01,
+ /* 02 STX */ 0x02, /* 03 ETX */ 0x03,
+ /* 04 EOT */ 0x04, /* 05 ENQ */ 0x05,
+ /* 06 ACK */ 0x06, /* 07 BEL */ 0x07,
+ /* 08 BS */ 0x08, /* 09 TAB */ 0x09,
+ /* 0A LF */ 0x0A, /* 0B VT */ 0x0B,
+ /* 0C FF */ 0x0C, /* 0D CR */ 0x0D,
+ /* 0E SO */ 0x0E, /* 0F SI */ 0x0F,
+ /* 10 DLE */ 0x10, /* 11 DC1 */ 0x11,
+ /* 12 DC2 */ 0x12, /* 13 DC3 */ 0x13,
+ /* 14 DC4 */ 0x14, /* 15 NAK */ 0x15,
+ /* 16 SYN */ 0x16, /* 17 ETB */ 0x17,
+ /* 18 CAN */ 0x18, /* 19 EM */ 0x19,
+ /* 1A SUB */ 0x1A, /* 1B ESC */ 0x1B,
+ /* 1C FS */ 0x1C, /* 1D GS */ 0x1D,
+ /* 1E RS */ 0x1E, /* 1F US */ 0x1F,
+ /* 20 ' ' */ 0x20, /* 21 '!' */ 0x21,
+ /* 22 '"' */ 0x22, /* 23 '#' */ 0x23,
+ /* 24 '$' */ 0x24, /* 25 '%' */ 0x25,
+ /* 26 '&' */ 0x26, /* 27 '\''*/ 0x27,
+ /* 28 '(' */ 0x28, /* 29 ')' */ 0x29,
+ /* 2A '*' */ 0x2A, /* 2B '+' */ 0x2B,
+ /* 2C ',' */ 0x2C, /* 2D '-' */ 0x2D,
+ /* 2E '.' */ 0x2E, /* 2F '/' */ 0x2F,
+ /* 30 '0' */ 0x30, /* 31 '1' */ 0x31,
+ /* 32 '2' */ 0x32, /* 33 '3' */ 0x33,
+ /* 34 '4' */ 0x34, /* 35 '5' */ 0x35,
+ /* 36 '6' */ 0x36, /* 37 '7' */ 0x37,
+ /* 38 '8' */ 0x38, /* 39 '9' */ 0x39,
+ /* 3A ':' */ 0x3A, /* 3B ';' */ 0x3B,
+ /* 3C '<' */ 0x3C, /* 3D '=' */ 0x3D,
+ /* 3E '>' */ 0x3E, /* 3F '?' */ 0x3F,
+ /* 40 '@' */ 0x40, /* 41 'A' */ 0x61,
+ /* 42 'B' */ 0x62, /* 43 'C' */ 0x63,
+ /* 44 'D' */ 0x64, /* 45 'E' */ 0x65,
+ /* 46 'F' */ 0x66, /* 47 'G' */ 0x67,
+ /* 48 'H' */ 0x68, /* 49 'I' */ 0x69,
+ /* 4A 'J' */ 0x6A, /* 4B 'K' */ 0x6B,
+ /* 4C 'L' */ 0x6C, /* 4D 'M' */ 0x6D,
+ /* 4E 'N' */ 0x6E, /* 4F 'O' */ 0x6F,
+ /* 50 'P' */ 0x70, /* 51 'Q' */ 0x71,
+ /* 52 'R' */ 0x72, /* 53 'S' */ 0x73,
+ /* 54 'T' */ 0x74, /* 55 'U' */ 0x75,
+ /* 56 'V' */ 0x76, /* 57 'W' */ 0x77,
+ /* 58 'X' */ 0x78, /* 59 'Y' */ 0x79,
+ /* 5A 'Z' */ 0x7A, /* 5B '[' */ 0x5B,
+ /* 5C '\' */ 0x5C, /* 5D ']' */ 0x5D,
+ /* 5E '^' */ 0x5E, /* 5F '_' */ 0x5F,
+ /* 60 '`' */ 0x60, /* 61 'a' */ 0x61,
+ /* 62 'b' */ 0x62, /* 63 'c' */ 0x63,
+ /* 64 'd' */ 0x64, /* 65 'e' */ 0x65,
+ /* 66 'f' */ 0x66, /* 67 'g' */ 0x67,
+ /* 68 'h' */ 0x68, /* 69 'i' */ 0x69,
+ /* 6A 'j' */ 0x6A, /* 6B 'k' */ 0x6B,
+ /* 6C 'l' */ 0x6C, /* 6D 'm' */ 0x6D,
+ /* 6E 'n' */ 0x6E, /* 6F 'o' */ 0x6F,
+ /* 70 'p' */ 0x70, /* 71 'q' */ 0x71,
+ /* 72 'r' */ 0x72, /* 73 's' */ 0x73,
+ /* 74 't' */ 0x74, /* 75 'u' */ 0x75,
+ /* 76 'v' */ 0x76, /* 77 'w' */ 0x77,
+ /* 78 'x' */ 0x78, /* 79 'y' */ 0x79,
+ /* 7A 'z' */ 0x7A, /* 7B '{' */ 0x7B,
+ /* 7C '|' */ 0x7C, /* 7D '}' */ 0x7D,
+ /* 7E '~' */ 0x7E, /* 7F DEL */ 0x7F
+};
+
+/// ASCII-8 Lower case to Upper case character conversion table
+const UINT8 _C_ToUpperTable[128] = {
+ /* 00 NUL */ 0x00, /* 01 SOH */ 0x01,
+ /* 02 STX */ 0x02, /* 03 ETX */ 0x03,
+ /* 04 EOT */ 0x04, /* 05 ENQ */ 0x05,
+ /* 06 ACK */ 0x06, /* 07 BEL */ 0x07,
+ /* 08 BS */ 0x08, /* 09 TAB */ 0x09,
+ /* 0A LF */ 0x0A, /* 0B VT */ 0x0B,
+ /* 0C FF */ 0x0C, /* 0D CR */ 0x0D,
+ /* 0E SO */ 0x0E, /* 0F SI */ 0x0F,
+ /* 10 DLE */ 0x10, /* 11 DC1 */ 0x11,
+ /* 12 DC2 */ 0x12, /* 13 DC3 */ 0x13,
+ /* 14 DC4 */ 0x14, /* 15 NAK */ 0x15,
+ /* 16 SYN */ 0x16, /* 17 ETB */ 0x17,
+ /* 18 CAN */ 0x18, /* 19 EM */ 0x19,
+ /* 1A SUB */ 0x1A, /* 1B ESC */ 0x1B,
+ /* 1C FS */ 0x1C, /* 1D GS */ 0x1D,
+ /* 1E RS */ 0x1E, /* 1F US */ 0x1F,
+ /* 20 ' ' */ 0x20, /* 21 '!' */ 0x21,
+ /* 22 '"' */ 0x22, /* 23 '#' */ 0x23,
+ /* 24 '$' */ 0x24, /* 25 '%' */ 0x25,
+ /* 26 '&' */ 0x26, /* 27 '\''*/ 0x27,
+ /* 28 '(' */ 0x28, /* 29 ')' */ 0x29,
+ /* 2A '*' */ 0x2A, /* 2B '+' */ 0x2B,
+ /* 2C ',' */ 0x2C, /* 2D '-' */ 0x2D,
+ /* 2E '.' */ 0x2E, /* 2F '/' */ 0x2F,
+ /* 30 '0' */ 0x30, /* 31 '1' */ 0x31,
+ /* 32 '2' */ 0x32, /* 33 '3' */ 0x33,
+ /* 34 '4' */ 0x34, /* 35 '5' */ 0x35,
+ /* 36 '6' */ 0x36, /* 37 '7' */ 0x37,
+ /* 38 '8' */ 0x38, /* 39 '9' */ 0x39,
+ /* 3A ':' */ 0x3A, /* 3B ';' */ 0x3B,
+ /* 3C '<' */ 0x3C, /* 3D '=' */ 0x3D,
+ /* 3E '>' */ 0x3E, /* 3F '?' */ 0x3F,
+ /* 40 '@' */ 0x40, /* 41 'A' */ 0x41,
+ /* 42 'B' */ 0x42, /* 43 'C' */ 0x43,
+ /* 44 'D' */ 0x44, /* 45 'E' */ 0x45,
+ /* 46 'F' */ 0x46, /* 47 'G' */ 0x47,
+ /* 48 'H' */ 0x48, /* 49 'I' */ 0x49,
+ /* 4A 'J' */ 0x4A, /* 4B 'K' */ 0x4B,
+ /* 4C 'L' */ 0x4C, /* 4D 'M' */ 0x4D,
+ /* 4E 'N' */ 0x4E, /* 4F 'O' */ 0x4F,
+ /* 50 'P' */ 0x50, /* 51 'Q' */ 0x51,
+ /* 52 'R' */ 0x52, /* 53 'S' */ 0x53,
+ /* 54 'T' */ 0x54, /* 55 'U' */ 0x55,
+ /* 56 'V' */ 0x56, /* 57 'W' */ 0x57,
+ /* 58 'X' */ 0x58, /* 59 'Y' */ 0x59,
+ /* 5A 'Z' */ 0x5A, /* 5B '[' */ 0x5B,
+ /* 5C '\' */ 0x5C, /* 5D ']' */ 0x5D,
+ /* 5E '^' */ 0x5E, /* 5F '_' */ 0x5F,
+ /* 60 '`' */ 0x60, /* 61 'a' */ 0x41,
+ /* 62 'b' */ 0x42, /* 63 'c' */ 0x43,
+ /* 64 'd' */ 0x44, /* 65 'e' */ 0x45,
+ /* 66 'f' */ 0x46, /* 67 'g' */ 0x47,
+ /* 68 'h' */ 0x48, /* 69 'i' */ 0x49,
+ /* 6A 'j' */ 0x4A, /* 6B 'k' */ 0x4B,
+ /* 6C 'l' */ 0x4C, /* 6D 'm' */ 0x4D,
+ /* 6E 'n' */ 0x4E, /* 6F 'o' */ 0x4F,
+ /* 70 'p' */ 0x50, /* 71 'q' */ 0x51,
+ /* 72 'r' */ 0x52, /* 73 's' */ 0x53,
+ /* 74 't' */ 0x54, /* 75 'u' */ 0x55,
+ /* 76 'v' */ 0x56, /* 77 'w' */ 0x57,
+ /* 78 'x' */ 0x58, /* 79 'y' */ 0x59,
+ /* 7A 'z' */ 0x5A, /* 7B '{' */ 0x7B,
+ /* 7C '|' */ 0x7C, /* 7D '}' */ 0x7D,
+ /* 7E '~' */ 0x7E, /* 7F DEL */ 0x7F
+};
+
+/// Default character classification table is 8-bit ASCII
+const UINT16 *_cClass = _C_CharClassTable;
+
+/// Default upper to lower conversion table is 8-bit ASCII
+const UINT8 *_lConvT = _C_ToLowerTable;
+
+/// Default lower to upper conversion table is 8-bit ASCII
+const UINT8 *_uConvT = _C_ToUpperTable;
+
+void
+__set_C_locale( void )
+{
+ _cClass = _C_CharClassTable;
+ _lConvT = _C_ToLowerTable;
+ _uConvT = _C_ToUpperTable;
+}
|