diff --git a/mozilla/htmlparser/src/CRtfDTD.cpp b/mozilla/htmlparser/src/CRtfDTD.cpp index 285e4d3fefe..ab00abf1902 100644 --- a/mozilla/htmlparser/src/CRtfDTD.cpp +++ b/mozilla/htmlparser/src/CRtfDTD.cpp @@ -11,11 +11,11 @@ * NPL. * * The Initial Developer of this code under the NPL is Netscape - * Communications Corporation. Portions created by Netscape are + * Communications Corporation. Portions created by Netscape are * Copyright (C) 1998 Netscape Communications Corporation. All Rights * Reserved. */ - + /** * MODULE NOTES: * @update gess 4/8/98 diff --git a/mozilla/htmlparser/src/CRtfDTD.h b/mozilla/htmlparser/src/CRtfDTD.h index cfc1f82bb83..89c27583aeb 100644 --- a/mozilla/htmlparser/src/CRtfDTD.h +++ b/mozilla/htmlparser/src/CRtfDTD.h @@ -24,8 +24,8 @@ * */ -#ifndef NS_NAVHTMLDTD__ -#define NS_NAVHTMLDTD__ +#ifndef NS_RTFDTD__ +#define NS_RTFDTD__ #include "nsIDTD.h" #include "nsISupports.h" diff --git a/mozilla/htmlparser/src/nsDTDUtils.cpp b/mozilla/htmlparser/src/nsDTDUtils.cpp index 11ea4bcdc95..14ff23823cf 100644 --- a/mozilla/htmlparser/src/nsDTDUtils.cpp +++ b/mozilla/htmlparser/src/nsDTDUtils.cpp @@ -32,11 +32,11 @@ static CTokenDeallocator gTokenKiller; * @update gess9/10/98 */ nsTagStack::nsTagStack(int aDefaultSize) { + mCapacity=aDefaultSize; + mCount=0; #ifndef NS_DEBUG mTags =new eHTMLTags[mCapacity]; #endif - mCapacity=aDefaultSize; - mCount=0; nsCRT::zero(mTags,mCapacity*sizeof(eHTMLTags)); } diff --git a/mozilla/htmlparser/src/nsParser.cpp b/mozilla/htmlparser/src/nsParser.cpp index a3df68bf0e5..9136ca3d03c 100644 --- a/mozilla/htmlparser/src/nsParser.cpp +++ b/mozilla/htmlparser/src/nsParser.cpp @@ -32,7 +32,7 @@ #include "nsWellFormedDTD.h" #include "nsViewSourceHTML.h" //uncomment this to partially enable viewsource... -#undef rickgdebug +#define rickgdebug #ifdef rickgdebug #include "CRtfDTD.h" #endif @@ -619,7 +619,7 @@ nsresult nsParser::Parse(fstream& aStream,PRBool aVerifyEnabled){ */ nsresult nsParser::Parse(nsString& aSourceBuffer,PRBool anHTMLString,PRBool aVerifyEnabled){ -#ifdef rickgdebug +#ifdef _rickgdebug { fstream out("c:/temp/parseout.file",ios::trunc); aSourceBuffer.DebugDump(out); @@ -770,8 +770,7 @@ nsParser::OnStatus(nsIURL* aURL, const PRUnichar* aMsg) return result; } -#undef _DEBUGDUMPFILE -#ifdef _DEBUGDUMPFILE +#ifdef rickgdebug fstream* gDumpFile; #endif @@ -793,7 +792,7 @@ nsresult nsParser::OnStartBinding(nsIURL* aURL, const char *aSourceType){ mParserContext->mDTD=0; mParserContext->mSourceType=aSourceType; -#ifdef _DEBUGDUMPFILE +#ifdef rickgdebug gDumpFile = new fstream("c:/temp/out.file",ios::trunc); #endif @@ -856,7 +855,7 @@ nsresult nsParser::OnDataAvailable(nsIURL* aURL, nsIInputStream *pIStream, PRUin nsString& theBuffer=mParserContext->mScanner->GetBuffer(); theBuffer.ToUCS2(theStartPos); -#ifdef _DEBUGDUMPFILE +#ifdef rickgdebug (*gDumpFile) << mParserContext->mTransferBuffer; #endif @@ -889,7 +888,7 @@ nsresult nsParser::OnStopBinding(nsIURL* aURL, nsresult status, const PRUnichar* mObserver->OnStopBinding(aURL, status, aMsg); } -#ifdef _DEBUGDUMPFILE +#ifdef rickgdebug if(gDumpFile){ gDumpFile->close(); delete gDumpFile; diff --git a/mozilla/parser/htmlparser/src/CRtfDTD.cpp b/mozilla/parser/htmlparser/src/CRtfDTD.cpp index 285e4d3fefe..ab00abf1902 100644 --- a/mozilla/parser/htmlparser/src/CRtfDTD.cpp +++ b/mozilla/parser/htmlparser/src/CRtfDTD.cpp @@ -11,11 +11,11 @@ * NPL. * * The Initial Developer of this code under the NPL is Netscape - * Communications Corporation. Portions created by Netscape are + * Communications Corporation. Portions created by Netscape are * Copyright (C) 1998 Netscape Communications Corporation. All Rights * Reserved. */ - + /** * MODULE NOTES: * @update gess 4/8/98 diff --git a/mozilla/parser/htmlparser/src/CRtfDTD.h b/mozilla/parser/htmlparser/src/CRtfDTD.h index cfc1f82bb83..89c27583aeb 100644 --- a/mozilla/parser/htmlparser/src/CRtfDTD.h +++ b/mozilla/parser/htmlparser/src/CRtfDTD.h @@ -24,8 +24,8 @@ * */ -#ifndef NS_NAVHTMLDTD__ -#define NS_NAVHTMLDTD__ +#ifndef NS_RTFDTD__ +#define NS_RTFDTD__ #include "nsIDTD.h" #include "nsISupports.h" diff --git a/mozilla/parser/htmlparser/src/nsDTDUtils.cpp b/mozilla/parser/htmlparser/src/nsDTDUtils.cpp index 11ea4bcdc95..14ff23823cf 100644 --- a/mozilla/parser/htmlparser/src/nsDTDUtils.cpp +++ b/mozilla/parser/htmlparser/src/nsDTDUtils.cpp @@ -32,11 +32,11 @@ static CTokenDeallocator gTokenKiller; * @update gess9/10/98 */ nsTagStack::nsTagStack(int aDefaultSize) { + mCapacity=aDefaultSize; + mCount=0; #ifndef NS_DEBUG mTags =new eHTMLTags[mCapacity]; #endif - mCapacity=aDefaultSize; - mCount=0; nsCRT::zero(mTags,mCapacity*sizeof(eHTMLTags)); } diff --git a/mozilla/parser/htmlparser/src/nsParser.cpp b/mozilla/parser/htmlparser/src/nsParser.cpp index a3df68bf0e5..9136ca3d03c 100644 --- a/mozilla/parser/htmlparser/src/nsParser.cpp +++ b/mozilla/parser/htmlparser/src/nsParser.cpp @@ -32,7 +32,7 @@ #include "nsWellFormedDTD.h" #include "nsViewSourceHTML.h" //uncomment this to partially enable viewsource... -#undef rickgdebug +#define rickgdebug #ifdef rickgdebug #include "CRtfDTD.h" #endif @@ -619,7 +619,7 @@ nsresult nsParser::Parse(fstream& aStream,PRBool aVerifyEnabled){ */ nsresult nsParser::Parse(nsString& aSourceBuffer,PRBool anHTMLString,PRBool aVerifyEnabled){ -#ifdef rickgdebug +#ifdef _rickgdebug { fstream out("c:/temp/parseout.file",ios::trunc); aSourceBuffer.DebugDump(out); @@ -770,8 +770,7 @@ nsParser::OnStatus(nsIURL* aURL, const PRUnichar* aMsg) return result; } -#undef _DEBUGDUMPFILE -#ifdef _DEBUGDUMPFILE +#ifdef rickgdebug fstream* gDumpFile; #endif @@ -793,7 +792,7 @@ nsresult nsParser::OnStartBinding(nsIURL* aURL, const char *aSourceType){ mParserContext->mDTD=0; mParserContext->mSourceType=aSourceType; -#ifdef _DEBUGDUMPFILE +#ifdef rickgdebug gDumpFile = new fstream("c:/temp/out.file",ios::trunc); #endif @@ -856,7 +855,7 @@ nsresult nsParser::OnDataAvailable(nsIURL* aURL, nsIInputStream *pIStream, PRUin nsString& theBuffer=mParserContext->mScanner->GetBuffer(); theBuffer.ToUCS2(theStartPos); -#ifdef _DEBUGDUMPFILE +#ifdef rickgdebug (*gDumpFile) << mParserContext->mTransferBuffer; #endif @@ -889,7 +888,7 @@ nsresult nsParser::OnStopBinding(nsIURL* aURL, nsresult status, const PRUnichar* mObserver->OnStopBinding(aURL, status, aMsg); } -#ifdef _DEBUGDUMPFILE +#ifdef rickgdebug if(gDumpFile){ gDumpFile->close(); delete gDumpFile;