From 92541fd1fde190b80f853d1789457e232d9bdcee Mon Sep 17 00:00:00 2001 From: "Unknown (roddey)" <dev-null@apache.org> Date: Sat, 22 Jan 2000 00:01:08 +0000 Subject: [PATCH] Simple change to get rid of two hard coded 'x' type characters, which won't work on EBCDIC systems. git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@171631 13f79535-47bb-0310-9956-ffa450edef68 --- src/internal/XMLReader.cpp | 18 ++++++++++++++++++ src/internal/XMLReader.hpp | 17 ++++------------- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/src/internal/XMLReader.cpp b/src/internal/XMLReader.cpp index 1eb5137b2..d00af0797 100644 --- a/src/internal/XMLReader.cpp +++ b/src/internal/XMLReader.cpp @@ -56,6 +56,10 @@ /** * $Log$ + * Revision 1.5 2000/01/22 00:01:07 roddey + * Simple change to get rid of two hard coded 'x' type characters, which won't + * work on EBCDIC systems. + * * Revision 1.4 2000/01/12 23:52:45 roddey * These are trivial changes required to get the C++ and Java versions * of error messages more into sync. Mostly it was where the Java version @@ -107,6 +111,20 @@ // XMLReader: Public, static methods // --------------------------------------------------------------------------- +bool XMLReader::isFirstNameChar(const XMLCh toCheck) +{ + static const XMLByte ourMask = gBaseCharMask | gLetterCharMask; + if ((fgCharCharsTable[toCheck] & ourMask) != 0) + return true; + + // Check the two special case name start chars + if ((toCheck == chUnderscore) || (toCheck == chColon)) + return true; + + return false; +} + + // // Checks whether all of the chars in the passed buffer are whitespace or // not. Breaks out on the first non-whitespace. diff --git a/src/internal/XMLReader.hpp b/src/internal/XMLReader.hpp index 167118c8e..8c29e9a80 100644 --- a/src/internal/XMLReader.hpp +++ b/src/internal/XMLReader.hpp @@ -56,6 +56,10 @@ /** * $Log$ + * Revision 1.4 2000/01/22 00:01:08 roddey + * Simple change to get rid of two hard coded 'x' type characters, which won't + * work on EBCDIC systems. + * * Revision 1.3 1999/12/18 00:20:00 roddey * More changes to support the new, completely orthagonal, support for * intrinsic encodings. @@ -485,19 +489,6 @@ inline bool XMLReader::isBaseChar(const XMLCh toCheck) return (fgCharCharsTable[toCheck] & gBaseCharMask) != 0; } -inline bool XMLReader::isFirstNameChar(const XMLCh toCheck) -{ - static const XMLByte ourMask = gBaseCharMask | gLetterCharMask; - if ((fgCharCharsTable[toCheck] & ourMask) != 0) - return true; - - // Check the two special case name start chars - if ((toCheck == '_') || (toCheck == ':')) - return true; - - return false; -} - inline bool XMLReader::isNameChar(const XMLCh toCheck) { return (fgCharCharsTable[toCheck] & gNameCharMask) != 0; -- GitLab