knoaman 2004/01/13 07:46:57
Modified: c/src/xercesc/util XMLURL.cpp
Log:
Misc. changes for sanity
Revision Changes Path
1.13 +12 -8 xml-xerces/c/src/xercesc/util/XMLURL.cpp
Index: XMLURL.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/XMLURL.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- XMLURL.cpp 12 Jan 2004 16:15:57 -0000 1.12
+++ XMLURL.cpp 13 Jan 2004 15:46:56 -0000 1.13
@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 1999-2001 The Apache Software Foundation. All rights
+ * Copyright (c) 1999-2004 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -446,14 +446,17 @@
cleanup();
// And copy his stuff
+ fMemoryManager = toAssign.fMemoryManager;
fFragment = XMLString::replicate(toAssign.fFragment, fMemoryManager);
fHost = XMLString::replicate(toAssign.fHost, fMemoryManager);
fPassword = XMLString::replicate(toAssign.fPassword, fMemoryManager);
fPath = XMLString::replicate(toAssign.fPath, fMemoryManager);
+ fPortNum = toAssign.fPortNum;
fProtocol = toAssign.fProtocol;
fQuery = XMLString::replicate(toAssign.fQuery, fMemoryManager);
fUser = XMLString::replicate(toAssign.fUser, fMemoryManager);
fURLText = XMLString::replicate(toAssign.fURLText, fMemoryManager);
+ fHasInvalidChar = toAssign.fHasInvalidChar;
return *this;
}
@@ -822,6 +825,7 @@
fProtocol = Unknown;
fPortNum = 0;
+ fHasInvalidChar = false;
}
@@ -1053,7 +1057,7 @@
fMemoryManager->deallocate(fHost);//delete [] fHost;
fHost = (XMLCh*) fMemoryManager->allocate
(
- (ptr1 - srcPtr + 1) * sizeof(XMLCh)
+ ((ptr1 - srcPtr) + 1) * sizeof(XMLCh)
);//new XMLCh[(ptr1 - srcPtr) + 1];
ptr2 = fHost;
while (srcPtr < ptr1)
@@ -1174,7 +1178,7 @@
fMemoryManager->deallocate(fPath);//delete [] fPath;
fPath = (XMLCh*) fMemoryManager->allocate
(
- (ptr1 - srcPtr + 1) * sizeof(XMLCh)
+ ((ptr1 - srcPtr) + 1) * sizeof(XMLCh)
);//new XMLCh[(ptr1 - srcPtr) + 1];
ptr2 = fPath;
while (srcPtr < ptr1)
@@ -1210,7 +1214,7 @@
{
fQuery = (XMLCh*) fMemoryManager->allocate
(
- (ptr1 - srcPtr + 1) * sizeof(XMLCh)
+ ((ptr1 - srcPtr) + 1) * sizeof(XMLCh)
);//new XMLCh[(ptr1 - srcPtr) + 1];
ptr2 = fQuery;
while (srcPtr < ptr1)
@@ -1336,7 +1340,7 @@
{
xmlURL.fHost = (XMLCh*) xmlURL.fMemoryManager->allocate
(
- (ptr1 - srcPtr + 1) * sizeof(XMLCh)
+ ((ptr1 - srcPtr) + 1) * sizeof(XMLCh)
);//new XMLCh[(ptr1 - srcPtr) + 1];
ptr2 = xmlURL.fHost;
while (srcPtr < ptr1)
@@ -1446,7 +1450,7 @@
{
xmlURL.fPath = (XMLCh*) xmlURL.fMemoryManager->allocate
(
- (ptr1 - srcPtr + 1) * sizeof(XMLCh)
+ ((ptr1 - srcPtr) + 1) * sizeof(XMLCh)
);//new XMLCh[(ptr1 - srcPtr) + 1];
ptr2 = xmlURL.fPath;
while (srcPtr < ptr1)
@@ -1480,7 +1484,7 @@
{
xmlURL.fQuery = (XMLCh*) xmlURL.fMemoryManager->allocate
(
- (ptr1 - srcPtr + 1) * sizeof(XMLCh)
+ ((ptr1 - srcPtr) + 1) * sizeof(XMLCh)
);//new XMLCh[(ptr1 - srcPtr) + 1];
ptr2 = xmlURL.fQuery;
while (srcPtr < ptr1)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]