From ea69132ff3000439ca584d6b606a59d7f2f5f8c1 Mon Sep 17 00:00:00 2001 From: "mcafee%netscape.com" Date: Thu, 31 Aug 2000 22:08:07 +0000 Subject: [PATCH] Patch #2 to get solaris building (50876). code=harishd, r=jst,mcafee, a=heikki --- htmlparser/src/nsXIFDTD.cpp | 4 ++-- htmlparser/src/nsXIFDTD.h | 11 +++-------- htmlparser/tests/outsinks/Convert.cpp | 16 +--------------- parser/htmlparser/src/nsXIFDTD.cpp | 4 ++-- parser/htmlparser/src/nsXIFDTD.h | 11 +++-------- parser/htmlparser/tests/outsinks/Convert.cpp | 16 +--------------- 6 files changed, 12 insertions(+), 50 deletions(-) diff --git a/htmlparser/src/nsXIFDTD.cpp b/htmlparser/src/nsXIFDTD.cpp index 787098c379ad..eb839a303af8 100644 --- a/htmlparser/src/nsXIFDTD.cpp +++ b/htmlparser/src/nsXIFDTD.cpp @@ -452,7 +452,7 @@ nsresult nsXIFDTD::DidBuildModel(nsresult anErrorCode,PRBool aNotifySink,nsIPars * @return */ -nsresult nsXIFDTD::WillHandleToken(CToken* aToken,eHTMLTokenTypes& aType) { +nsresult nsXIFDTD::WillHandleToken(CToken* aToken,PRInt32& aType) { NS_ASSERTION(aToken!=nsnull,"invalid token"); if(aToken) { @@ -486,7 +486,7 @@ nsresult nsXIFDTD::HandleToken(CToken* aToken,nsIParser* aParser){ if(aToken) { - eHTMLTokenTypes theType=eToken_unknown; + PRInt32 theType=eToken_unknown; result=WillHandleToken(aToken,theType); if(result==NS_OK) { diff --git a/htmlparser/src/nsXIFDTD.h b/htmlparser/src/nsXIFDTD.h index 5c1d477a90a5..14b03fb1d8b5 100644 --- a/htmlparser/src/nsXIFDTD.h +++ b/htmlparser/src/nsXIFDTD.h @@ -37,9 +37,9 @@ #include "nshtmlpars.h" #include "nsIDTD.h" #include "nsIContentSink.h" -#include "nsHTMLTokens.h" #include "nsVoidArray.h" #include "nsParserCIID.h" +#include "nsHTMLTags.h" class nsParser; @@ -53,6 +53,7 @@ class nsEntryStack; class nsCParserNode; class nsTokenAllocator; class CNodeRecycler; +class CToken; //*** This enum is used to define the known universe of XIF tags. //*** The use of this table doesn't preclude of from using non-standard @@ -339,12 +340,6 @@ private: void InitializeDefaultTokenHandlers(); - /** - * DEPRECATED - * @update gpk 06/18/98 - */ - CTokenHandler* GetTokenHandler(eHTMLTokenTypes aType) const; - /** * DEPRECATED * @update gpk 06/18/98 @@ -419,7 +414,7 @@ private: protected: - nsresult WillHandleToken(CToken* aToken,eHTMLTokenTypes& aType); + nsresult WillHandleToken(CToken* aToken,PRInt32& aType); nsresult DidHandleToken(CToken* aToken, nsresult aResult=NS_OK); nsresult WillHandleStartToken(CToken* aToken,eXIFTags aTag, nsIParserNode& aNode); nsresult DidHandleStartToken(CToken* aToken,eXIFTags aTag, nsIParserNode& aNode); diff --git a/htmlparser/tests/outsinks/Convert.cpp b/htmlparser/tests/outsinks/Convert.cpp index 5da25adf4b9c..43022206249a 100644 --- a/htmlparser/tests/outsinks/Convert.cpp +++ b/htmlparser/tests/outsinks/Convert.cpp @@ -23,6 +23,7 @@ #include // for isdigit() #include "CNavDTD.h" +#include "nsXIFDTD.h" #include "nsParserCIID.h" #include "nsIParser.h" #include "nsIHTMLContentSink.h" @@ -32,21 +33,6 @@ extern "C" void NS_SetupRegistry(); -// This is copied from the header files so that we don't accidentally -// include nsHTMLTokens.h and get all the inline junk that confuses -// gcc-2.7.2.3. - -inline nsresult NS_NewXIFDTD(nsIDTD** aInstancePtrResult) -{ - NS_DEFINE_CID(kXIFDTDCID, NS_XIF_DTD_CID); - return nsComponentManager::CreateInstance(kXIFDTDCID, - nsnull, - NS_GET_IID(nsIDTD), - (void**)aInstancePtrResult); -} - - - #ifdef XP_PC #define PARSER_DLL "gkparser.dll" #endif diff --git a/parser/htmlparser/src/nsXIFDTD.cpp b/parser/htmlparser/src/nsXIFDTD.cpp index 787098c379ad..eb839a303af8 100644 --- a/parser/htmlparser/src/nsXIFDTD.cpp +++ b/parser/htmlparser/src/nsXIFDTD.cpp @@ -452,7 +452,7 @@ nsresult nsXIFDTD::DidBuildModel(nsresult anErrorCode,PRBool aNotifySink,nsIPars * @return */ -nsresult nsXIFDTD::WillHandleToken(CToken* aToken,eHTMLTokenTypes& aType) { +nsresult nsXIFDTD::WillHandleToken(CToken* aToken,PRInt32& aType) { NS_ASSERTION(aToken!=nsnull,"invalid token"); if(aToken) { @@ -486,7 +486,7 @@ nsresult nsXIFDTD::HandleToken(CToken* aToken,nsIParser* aParser){ if(aToken) { - eHTMLTokenTypes theType=eToken_unknown; + PRInt32 theType=eToken_unknown; result=WillHandleToken(aToken,theType); if(result==NS_OK) { diff --git a/parser/htmlparser/src/nsXIFDTD.h b/parser/htmlparser/src/nsXIFDTD.h index 5c1d477a90a5..14b03fb1d8b5 100644 --- a/parser/htmlparser/src/nsXIFDTD.h +++ b/parser/htmlparser/src/nsXIFDTD.h @@ -37,9 +37,9 @@ #include "nshtmlpars.h" #include "nsIDTD.h" #include "nsIContentSink.h" -#include "nsHTMLTokens.h" #include "nsVoidArray.h" #include "nsParserCIID.h" +#include "nsHTMLTags.h" class nsParser; @@ -53,6 +53,7 @@ class nsEntryStack; class nsCParserNode; class nsTokenAllocator; class CNodeRecycler; +class CToken; //*** This enum is used to define the known universe of XIF tags. //*** The use of this table doesn't preclude of from using non-standard @@ -339,12 +340,6 @@ private: void InitializeDefaultTokenHandlers(); - /** - * DEPRECATED - * @update gpk 06/18/98 - */ - CTokenHandler* GetTokenHandler(eHTMLTokenTypes aType) const; - /** * DEPRECATED * @update gpk 06/18/98 @@ -419,7 +414,7 @@ private: protected: - nsresult WillHandleToken(CToken* aToken,eHTMLTokenTypes& aType); + nsresult WillHandleToken(CToken* aToken,PRInt32& aType); nsresult DidHandleToken(CToken* aToken, nsresult aResult=NS_OK); nsresult WillHandleStartToken(CToken* aToken,eXIFTags aTag, nsIParserNode& aNode); nsresult DidHandleStartToken(CToken* aToken,eXIFTags aTag, nsIParserNode& aNode); diff --git a/parser/htmlparser/tests/outsinks/Convert.cpp b/parser/htmlparser/tests/outsinks/Convert.cpp index 5da25adf4b9c..43022206249a 100644 --- a/parser/htmlparser/tests/outsinks/Convert.cpp +++ b/parser/htmlparser/tests/outsinks/Convert.cpp @@ -23,6 +23,7 @@ #include // for isdigit() #include "CNavDTD.h" +#include "nsXIFDTD.h" #include "nsParserCIID.h" #include "nsIParser.h" #include "nsIHTMLContentSink.h" @@ -32,21 +33,6 @@ extern "C" void NS_SetupRegistry(); -// This is copied from the header files so that we don't accidentally -// include nsHTMLTokens.h and get all the inline junk that confuses -// gcc-2.7.2.3. - -inline nsresult NS_NewXIFDTD(nsIDTD** aInstancePtrResult) -{ - NS_DEFINE_CID(kXIFDTDCID, NS_XIF_DTD_CID); - return nsComponentManager::CreateInstance(kXIFDTDCID, - nsnull, - NS_GET_IID(nsIDTD), - (void**)aInstancePtrResult); -} - - - #ifdef XP_PC #define PARSER_DLL "gkparser.dll" #endif