From efbd33223d225fc658f4e0164deeff64c8162dad Mon Sep 17 00:00:00 2001 From: "alecf%netscape.com" Date: Wed, 8 Sep 1999 03:55:56 +0000 Subject: [PATCH] switch to using PR_FALSE/PR_TRUE and some nsCRT string routines git-svn-id: svn://10.0.0.236/trunk@46291 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/mailnews/news/src/nsNNTPHost.cpp | 13 +++++++------ .../mailnews/news/src/nsNNTPNewsgroupList.cpp | 16 ++++++++-------- .../mailnews/news/src/nsNNTPNewsgroupPost.cpp | 2 +- mozilla/mailnews/news/src/nsNNTPProtocol.cpp | 12 ++++++------ mozilla/mailnews/news/src/nsNewsFolder.cpp | 3 ++- mozilla/mailnews/news/src/nsNntpUrl.cpp | 1 + 6 files changed, 25 insertions(+), 22 deletions(-) diff --git a/mozilla/mailnews/news/src/nsNNTPHost.cpp b/mozilla/mailnews/news/src/nsNNTPHost.cpp index ee8303e81f3..07a99da4f99 100644 --- a/mozilla/mailnews/news/src/nsNNTPHost.cpp +++ b/mozilla/mailnews/news/src/nsNNTPHost.cpp @@ -17,6 +17,7 @@ */ #include "nsNNTPHost.h" +#include "prlog.h" #include "nsMsgNewsCID.h" @@ -984,7 +985,7 @@ nsNNTPHost::AddGroup(const char *name, nsCOMPtr categoryContainer; char* containerName = nsnull; PRBool needpaneupdate = PR_FALSE; - PRBool isSubscribed=FALSE; + PRBool isSubscribed=PR_FALSE; nsMsgGroupRecord* group = (inGroupRecord) ? inGroupRecord : FindOrCreateGroup(name); if (!group) goto DONE; // Out of memory. @@ -1443,7 +1444,7 @@ PRBool nsNNTPHost::NeedsExtension (const char * /*extension*/) nsresult nsNNTPHost::AddExtension (const char *ext) { - PRBool alreadyHasExtension=FALSE; + PRBool alreadyHasExtension=PR_FALSE; QueryExtension(ext, &alreadyHasExtension); if (!alreadyHasExtension) { @@ -2531,11 +2532,11 @@ nsNNTPHost::AddNewNewsgroup(const char *name, switch (flag) { case 'C': - bIsCategoryContainer = TRUE; + bIsCategoryContainer = PR_TRUE; break; case 'P': // profile case 'V': - bIsVirtual = TRUE; + bIsVirtual = PR_TRUE; break; default: break; @@ -2585,7 +2586,7 @@ nsNNTPHost::DisplaySubscribedGroup(nsINNTPNewsgroup *newsgroup, { nsresult rv = NS_OK; - SetGroupSucceeded(TRUE); + SetGroupSucceeded(PR_TRUE); if (!newsgroup && visit_now) // let's try autosubscribe... { #if SETH_HACK @@ -2604,7 +2605,7 @@ nsNNTPHost::DisplaySubscribedGroup(nsINNTPNewsgroup *newsgroup, rv = newsgroup->GetSubscribed(&subscribed); if (NS_FAILED(rv)) return rv; if (!subscribed) { - rv = newsgroup->SetSubscribed(TRUE); + rv = newsgroup->SetSubscribed(PR_TRUE); if (NS_FAILED(rv)) return rv; } } diff --git a/mozilla/mailnews/news/src/nsNNTPNewsgroupList.cpp b/mozilla/mailnews/news/src/nsNNTPNewsgroupList.cpp index be544cafbdf..4aa83cf7209 100644 --- a/mozilla/mailnews/news/src/nsNNTPNewsgroupList.cpp +++ b/mozilla/mailnews/news/src/nsNNTPNewsgroupList.cpp @@ -213,7 +213,7 @@ nsNNTPNewsgroupList::GetRangeOfArtsToDownload( #ifdef HAVE_PANES if (m_pane != NULL && !m_finishingXover && !m_startedUpdate) { - m_startedUpdate = TRUE; + m_startedUpdate = PR_TRUE; m_pane->StartingUpdate(MSG_NotifyNone, 0, 0); } #endif @@ -249,7 +249,7 @@ nsNNTPNewsgroupList::GetRangeOfArtsToDownload( return rv; } if (last_possible < ((PRInt32)mark)) - newsGroupInfo->SetHighWater(last_possible, TRUE); + newsGroupInfo->SetHighWater(last_possible, PR_TRUE); if (m_knownArts.set) { delete m_knownArts.set; } @@ -293,7 +293,7 @@ nsNNTPNewsgroupList::GetRangeOfArtsToDownload( if (maxextra <= 0 || last_possible < first_possible || last_possible < 1) { - emptyGroup_p = TRUE; + emptyGroup_p = PR_TRUE; } // this is just a temporary hack. these used to be parameters @@ -397,7 +397,7 @@ nsNNTPNewsgroupList::GetRangeOfArtsToDownload( } else *first = *last = 0; - m_promptedAlready = TRUE; + m_promptedAlready = PR_TRUE; } else if (m_promptedAlready && !m_downloadAll) *first = *last - m_maxArticles + 1; @@ -495,7 +495,7 @@ nsNNTPNewsgroupList::InitXOVER(PRInt32 first_msg, PRInt32 last_msg) /* Given a string and a length, removes any "Re:" strings from the front. It also deals with that "Re[2]:" thing that some mailers do. - Returns TRUE if it made a change, FALSE otherwise. + Returns PR_TRUE if it made a change, PR_FALSE otherwise. The string is not altered: the pointer to its head is merely advanced, and the length correspondingly decreased. @@ -544,7 +544,7 @@ nsNNTPNewsgroupList::msg_StripRE(const char **stringP, PRUint32 *lengthP) if ((s2[0] == ']' || s2[0] == ')') && s2[1] == ':') { s = s2+2; /* Skip over "]:" */ - result = TRUE; /* Yes, we stripped it. */ + result = PR_TRUE; /* Yes, we stripped it. */ goto AGAIN; /* Skip whitespace and try again. */ } } @@ -868,7 +868,7 @@ nsNNTPNewsgroupList::FinishXOVERLINE(int status, int *newstatus) // calls which happen when the fe selects a message as a result of getting EndingUpdate, // which interrupts this url right before it was going to finish and causes FinishXOver // to get called again. - m_finishingXover = TRUE; + m_finishingXover = PR_TRUE; // if we haven't started an update, start one so the fe // will know to update the size of the view. if (!m_startedUpdate) @@ -876,7 +876,7 @@ nsNNTPNewsgroupList::FinishXOVERLINE(int status, int *newstatus) #ifdef HAVE_PANES m_pane->StartingUpdate(MSG_NotifyNone, 0, 0); #endif - m_startedUpdate = TRUE; + m_startedUpdate = PR_TRUE; } #ifdef HAVE_PANES m_pane->EndingUpdate(MSG_NotifyNone, 0, 0); diff --git a/mozilla/mailnews/news/src/nsNNTPNewsgroupPost.cpp b/mozilla/mailnews/news/src/nsNNTPNewsgroupPost.cpp index 062adfe10e1..3c11d034db9 100644 --- a/mozilla/mailnews/news/src/nsNNTPNewsgroupPost.cpp +++ b/mozilla/mailnews/news/src/nsNNTPNewsgroupPost.cpp @@ -112,7 +112,7 @@ nsNNTPNewsgroupPost::MakeControlCancel(const char *messageID) PL_strcpy(new_subject, "CANCEL "); PL_strcat(new_subject, messageID); - m_isControl = TRUE; + m_isControl = PR_TRUE; SetSubject(new_subject); return NS_OK; diff --git a/mozilla/mailnews/news/src/nsNNTPProtocol.cpp b/mozilla/mailnews/news/src/nsNNTPProtocol.cpp index 1e352632529..7a90e6a292a 100644 --- a/mozilla/mailnews/news/src/nsNNTPProtocol.cpp +++ b/mozilla/mailnews/news/src/nsNNTPProtocol.cpp @@ -299,7 +299,7 @@ HG25430 (the object that is going to manage the NNTP connections. it would keep track of the connection list.) */ /* PRIVATE XP_List * nntp_connection_list=0; */ -PRIVATE PRBool net_news_last_username_probably_valid=PR_FALSE; +static PRBool net_news_last_username_probably_valid=PR_FALSE; PRInt32 net_NewsChunkSize=DEFAULT_NEWS_CHUNK_SIZE; /* PRIVATE PRInt32 net_news_timeout = 170; */ /* seconds that an idle NNTP conn can live */ @@ -541,10 +541,10 @@ nsresult nsNNTPProtocol::Initialize(nsIURI * aURL) nsresult nsNNTPProtocol::LoadUrl(nsIURI * aURL, nsISupports * aConsumer) { - PRBool bVal = FALSE; + PRBool bVal = PR_FALSE; char *group = nsnull; char *commandSpecificData = nsnull; - PRBool cancel = FALSE; + PRBool cancel = PR_FALSE; nsCOMPtr message; nsresult rv = NS_OK; @@ -627,7 +627,7 @@ nsresult nsNNTPProtocol::LoadUrl(nsIURI * aURL, nsISupports * aConsumer) goto FAIL; if (m_messageID && commandSpecificData && !PL_strcmp (commandSpecificData, "?cancel")) - cancel = TRUE; + cancel = PR_TRUE; NET_SACopy(&m_path, m_messageID); @@ -798,7 +798,7 @@ nsresult nsNNTPProtocol::LoadUrl(nsIURI * aURL, nsISupports * aConsumer) if (NET_IsOffline() || (NS_SUCCEEDED(rv) && articleIsOffline)) { - ce->local_file = TRUE; + ce->local_file = PR_TRUE; cd->articleIsOffline = articleIsOffline; ce->socket = NULL; @@ -1833,7 +1833,7 @@ PRInt32 nsNNTPProtocol::SendFirstNNTPCommandResponse() printf("group not found!\n"); #endif #ifdef UNREADY_CODE - MSG_GroupNotFound(cd->pane, cd->host, cd->control_con->current_group, TRUE /* opening group */); + MSG_GroupNotFound(cd->pane, cd->host, cd->control_con->current_group, PR_TRUE /* opening group */); #else m_newsHost->GroupNotFound(m_currentGroup, PR_TRUE /* opening */); diff --git a/mozilla/mailnews/news/src/nsNewsFolder.cpp b/mozilla/mailnews/news/src/nsNewsFolder.cpp index 9957c48ea4c..bc7976c7478 100644 --- a/mozilla/mailnews/news/src/nsNewsFolder.cpp +++ b/mozilla/mailnews/news/src/nsNewsFolder.cpp @@ -18,6 +18,7 @@ #define NS_IMPL_IDS #include "nsIPref.h" +#include "prlog.h" #include "msgCore.h" // precompiled header... @@ -916,7 +917,7 @@ NS_IMETHODIMP nsMsgNewsFolder::RememberPassword(const char *password) { #ifdef HAVE_DB NewsDB *newsDb = nsnull; - NewsDB::Open(m_pathName, TRUE, &newsDb); + NewsDB::Open(m_pathName, PR_TRUE, &newsDb); if (newsDb) { newsDb->SetCachedPassword(password); diff --git a/mozilla/mailnews/news/src/nsNntpUrl.cpp b/mozilla/mailnews/news/src/nsNntpUrl.cpp index e707dab7597..4e465f38bdf 100644 --- a/mozilla/mailnews/news/src/nsNntpUrl.cpp +++ b/mozilla/mailnews/news/src/nsNntpUrl.cpp @@ -17,6 +17,7 @@ */ #include "msgCore.h" // precompiled header... +#include "prlog.h" #include "nsIURL.h" #include "nsNntpUrl.h"