You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by James Berry <jb...@criticalpath.com> on 2000/07/19 20:14:53 UTC
Submitting Mac OS fixups
Here are a few fixups for the Mac OS version. Could somebody check in
please? Diffs below.
Changes:
NameIdPool.hpp
- replace include <memory.h> with include <string.h> for access to
memcpy
and friends...memory.h is not an ANSI standard header.
CodeWarriorDefs.cpp
- Include XercesDefs.hpp instead of
CodeWarriorDefs.hpp...CodeWarriorDefs.hpp
relies on macro definitions from XercesDefs.hpp.
Fix parameter of strnicmp.
MacOSPlatformUtils.cpp
- Bug fix: make comparison of volume name case insensitive.
Slight formatting cleanup.
Index: c/src/util/NameIdPool.hpp
===================================================================
RCS file: /home/cvspublic/xml-xerces/c/src/util/NameIdPool.hpp,v
retrieving revision 1.4
diff -r1.4 NameIdPool.hpp
81a82
> #include <string.h>
83d83
< #include <memory.h>
Index: c/src/util/Compilers/CodeWarriorDefs.cpp
===================================================================
RCS file:
/home/cvspublic/xml-xerces/c/src/util/Compilers/CodeWarriorDefs.cpp,v
retrieving revision 1.1
diff -r1.1 CodeWarriorDefs.cpp
58c58
< #include <utils/Compilers/CodeWarriorDefs.hpp>
---
> #include <util/XercesDefs.hpp>
62,63c62,63
< // These functions are needed because MacOS doesn't define them
< // even though they are used.
---
> // These functions are needed because MacOS doesn't define them.
>
79c79
< int strnicmp(const char *s1, const char *s2, int n)
---
> int strnicmp(const char *s1, const char *s2, const unsigned int n)
Index: c/src/util/Platforms/MacOS/MacOSPlatformUtils.cpp
===================================================================
RCS file:
/home/cvspublic/xml-xerces/c/src/util/Platforms/MacOS/MacOSPlatformUtils.cpp,v
retrieving revision 1.5
diff -r1.5 MacOSPlatformUtils.cpp
150,154c150,154
< static bool gGestaltAvail = false;
< static bool gFileSystemCompatible = false;
< static bool gHasFSSpecAPIs = false;
< static bool gHasFS2TBAPIs = false;
< static bool gHasHFSPlusAPIs = false;
---
> static bool gGestaltAvail = false;
> static bool gFileSystemCompatible = false;
> static bool gHasFSSpecAPIs = false;
> static bool gHasFS2TBAPIs = false;
> static bool gHasHFSPlusAPIs = false;
688c688
< TrapAvailable(_Gestalt);
---
> TrapAvailable(_Gestalt);
696,698c696,698
< gHasFSSpecAPIs = (value & gestaltHasFSSpecCalls) != 0;
< gHasFS2TBAPIs = (value & gestaltFSSupports2TBVols) != 0;
< gHasHFSPlusAPIs = (value & gestaltHasHFSPlusAPIs) != 0;
---
> gHasFSSpecAPIs = (value & gestaltHasFSSpecCalls) != 0;
> gHasFS2TBAPIs = (value & gestaltFSSupports2TBVols) != 0;
> gHasHFSPlusAPIs = (value & gestaltHasHFSPlusAPIs) != 0;
820,828c820,821
< const UniChar* a = hfsStr.unicode;
< const XMLCh* b = p;
< while (b != pEnd && *a == *b)
< {
< ++a;
< ++b;
< }
<
< if (b == pEnd)
---
> // Case-insensitive compare
> if (XMLString::compareNIString(hfsStr.unicode, p, segLen)
== 0)
958,966c951,952
< ConstStringPtr a = name + 1;
< const char* b = p;
< while (b != pEnd && (*a == *b))
< {
< ++a;
< ++b;
< }
<
< if (b == pEnd)
---
> // Case-insensitive compare
> if
(XMLString::compareNIString(reinterpret_cast<char*>(&name[1]), p,
segLen) == 0)
Re: Submitting Mac OS fixups
Posted by Andy Heninger <an...@jtcsv.com>.
Done.
-- Andy
From: "James Berry" <jb...@criticalpath.com>
> Here are a few fixups for the Mac OS version. Could somebody check in
> please? Diffs below.
>
> Changes:
>
> NameIdPool.hpp
> - replace include <memory.h> with include <string.h> for access to
> memcpy
> and friends...memory.h is not an ANSI standard header.
>
> CodeWarriorDefs.cpp
> - Include XercesDefs.hpp instead of
> CodeWarriorDefs.hpp...CodeWarriorDefs.hpp
> relies on macro definitions from XercesDefs.hpp.
> Fix parameter of strnicmp.
>
> MacOSPlatformUtils.cpp
> - Bug fix: make comparison of volume name case insensitive.
> Slight formatting cleanup.
>